diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-07-02 10:42:58 +0000 |
---|---|---|
committer | Ariel Constenla-Haile <arielch@apache.org> | 2012-07-02 10:42:58 +0000 |
commit | b73c741c4f792c71623127fdc711dc3f38603083 (patch) | |
tree | 394d26748b004751eec8cf99f2675df106215eb3 /starmath/source/edit.cxx | |
parent | f5226834b66c6ab0277b3ec25a81bd2b156d142f (diff) |
i120149 - Flash changes on slot execution to reflect AutoUpdate
Notes
Notes:
merged as: 13adadee52c71a1b7db95f36e34a8c622ab1179e
Diffstat (limited to 'starmath/source/edit.cxx')
-rw-r--r-- | starmath/source/edit.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index c3a9f21afa4e..5bca547813af 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -245,9 +245,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; } @@ -877,13 +875,23 @@ sal_Bool SmEditWindow::IsSelected() const return pEditView ? pEditView->HasSelection() : sal_False; } + +void SmEditWindow::UpdateStatus( bool bSetDocModified ) +{ + SmModule *pMod = SM_MOD(); + if (pMod && pMod->GetConfig()->IsAutoRedraw()) + Flush(); + if ( bSetDocModified ) + GetDoc()->SetModified( sal_True ); +} + void SmEditWindow::Cut() { DBG_ASSERT( pEditView, "EditView missing" ); if (pEditView) { pEditView->Cut(); - GetDoc()->SetModified( sal_True ); + UpdateStatus( sal_True ); } } @@ -900,7 +908,7 @@ void SmEditWindow::Paste() if (pEditView) { pEditView->Paste(); - GetDoc()->SetModified( sal_True ); + UpdateStatus( sal_True ); } } @@ -910,7 +918,7 @@ void SmEditWindow::Delete() if (pEditView) { pEditView->DeleteSelected(); - GetDoc()->SetModified( sal_True ); + UpdateStatus( sal_True ); } } |