diff options
Diffstat (limited to 'sw/source/ui/shells/frmsh.cxx')
-rw-r--r-- | sw/source/ui/shells/frmsh.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index ce35e494febc..6eb2ea712bc5 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -418,22 +418,16 @@ void SwFrameShell::Execute(SfxRequest &rReq) break; case FN_WORDCOUNT_DIALOG: { - SwDocStat aCurr; - SwDocStat aDocStat; + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if (pVFrame != NULL) { - SwWait aWait( *GetView().GetDocShell(), sal_True ); - rSh.StartAction(); - rSh.CountWords( aCurr ); - aDocStat = rSh.GetUpdatedDocStat(); - rSh.EndAction(); - } + pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG); + Invalidate(rReq.GetSlot()); - SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialogdiet fail!"); - AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() ); - pDialog->SetValues(aCurr, aDocStat ); - pDialog->Execute(); - delete pDialog; + SwWordCountWrapper *pWrdCnt = (SwWordCountWrapper*)pVFrame->GetChildWindow(SwWordCountWrapper::GetChildWindowId()); + if (pWrdCnt) + pWrdCnt->UpdateCounts(); + } } break; default: bMore = sal_True; |