starmath/inc/edit.hxx | 1 + starmath/source/edit.cxx | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-)
New commits: commit 13adadee52c71a1b7db95f36e34a8c622ab1179e Author: Ariel Constenla-Haile <[email protected]> Date: Mon Jul 2 10:42:58 2012 +0000 Resolves: #ii120149# Flash changes on slot execution to reflect AutoUpdate (cherry picked from commit b73c741c4f792c71623127fdc711dc3f38603083) Conflicts: starmath/source/edit.cxx Change-Id: Ie073deabb1a48f3479a9c6bbf89d1e40f5cea663 diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 1cb9183..a9d9ca4 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -85,6 +85,7 @@ class SmEditWindow : public Window, public DropTargetHelper void SetScrollBarRanges(); void InitScrollBars(); void InvalidateSlots(); + void UpdateStatus( bool bSetDocModified = false ); public: SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index d10a59b..fc88ba7 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -243,9 +243,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& ) IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ ) { - SmModule *pp = SM_MOD(); - if (pp->GetConfig()->IsAutoRedraw()) - Flush(); + UpdateStatus(); aModifyTimer.Stop(); return 0; } @@ -637,7 +635,7 @@ void SmEditWindow::GetFocus() // Note: will implicitly send the AccessibleStateType::FOCUSED event ::accessibility::AccessibleTextHelper *pHelper = pAccessible->GetTextHelper(); if (pHelper) - pHelper->SetFocus( sal_True ); + pHelper->SetFocus(true); } if (!pEditView) @@ -665,7 +663,7 @@ void SmEditWindow::LoseFocus() // Note: will implicitly send the AccessibleStateType::FOCUSED event ::accessibility::AccessibleTextHelper *pHelper = pAccessible->GetTextHelper(); if (pHelper) - pHelper->SetFocus( sal_False ); + pHelper->SetFocus(false); } } @@ -871,13 +869,23 @@ bool SmEditWindow::IsSelected() const return pEditView ? pEditView->HasSelection() : false; } + +void SmEditWindow::UpdateStatus( bool bSetDocModified ) +{ + SmModule *pMod = SM_MOD(); + if (pMod && pMod->GetConfig()->IsAutoRedraw()) + Flush(); + if ( bSetDocModified ) + GetDoc()->SetModified(true); +} + void SmEditWindow::Cut() { OSL_ENSURE( pEditView, "EditView missing" ); if (pEditView) { pEditView->Cut(); - GetDoc()->SetModified( true ); + UpdateStatus(true); } } @@ -894,7 +902,7 @@ void SmEditWindow::Paste() if (pEditView) { pEditView->Paste(); - GetDoc()->SetModified( true ); + UpdateStatus(true); } } @@ -904,7 +912,7 @@ void SmEditWindow::Delete() if (pEditView) { pEditView->DeleteSelected(); - GetDoc()->SetModified( true ); + UpdateStatus(true); } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
