summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/drwtxtex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/drwtxtex.cxx')
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx22
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 47a6b1a6caf2..b21da6dd7333 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -346,22 +346,16 @@ void SwDrawTextShell::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;
case SID_PARA_DLG: