diff options
author | Matt Pratt <mattpratt.au@gmail.com> | 2011-11-01 22:47:33 -0600 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-02 14:55:52 +0000 |
commit | 12402e2cfdacf9a77af390e51ce12a4a6025f286 (patch) | |
tree | 6491410b14f6f9ad94fae0cca944be36dd2c576c /sw/source/ui/shells/drwtxtex.cxx | |
parent | 0c9d2b9cb3f1b5bac034ccfee0eb83aa2182f2cf (diff) |
Resolves: #i46785# Word count dialog modeless
Diffstat (limited to 'sw/source/ui/shells/drwtxtex.cxx')
-rw-r--r-- | sw/source/ui/shells/drwtxtex.cxx | 22 |
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: |