diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-02 16:03:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-02 16:04:27 +0000 |
commit | 0cbcb89fde8cc81db499bc1e388fd53ef6fa3c3f (patch) | |
tree | 45045629999c3cc0bf411278f84bc4ffed868017 /sw | |
parent | dbfa9d4f87b660251ccfe9b854e614abafcb684b (diff) |
update word count dialog when selection is completed or invalidated
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/wrtsh/select.cxx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index d0c10642c358..9583155aca89 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -50,6 +50,7 @@ #include <swevent.hxx> #include <swdtflvr.hxx> #include <crsskip.hxx> +#include <wordcountdialog.hxx> #if OSL_DEBUG_LEVEL > 1 #include <pam.hxx> @@ -70,6 +71,9 @@ void SwWrtShell::Invalidate() // to avoid making the slot volatile, invalidate it everytime if something could have been changed // this is still much cheaper than asking for the state every 200 ms (and avoid background processing) GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE ); + SwWordCountWrapper *pWrdCnt = (SwWordCountWrapper*)GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()); + if (pWrdCnt) + pWrdCnt->UpdateCounts(); } sal_Bool SwWrtShell::SelNearestWrd() @@ -419,14 +423,19 @@ void SwWrtShell::SttSelect() void SwWrtShell::EndSelect() { - if(!bInSelect || bExtMode) - return; - bInSelect = sal_False; - (this->*fnLeaveSelect)(0,sal_False); - if(!bAddMode) { - fnSetCrsr = &SwWrtShell::SetCrsrKillSel; - fnKillSel = &SwWrtShell::ResetSelect; + if(bInSelect && !bExtMode) + { + bInSelect = sal_False; + (this->*fnLeaveSelect)(0,sal_False); + if(!bAddMode) + { + fnSetCrsr = &SwWrtShell::SetCrsrKillSel; + fnKillSel = &SwWrtShell::ResetSelect; + } } + SwWordCountWrapper *pWrdCnt = (SwWordCountWrapper*)GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()); + if (pWrdCnt) + pWrdCnt->UpdateCounts(); } /* Methode, um eine bestehende wortweise oder zeilenweise Selektion * zu erweitern. |