summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2012-07-02 10:42:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-18 12:06:40 +0100
commit13adadee52c71a1b7db95f36e34a8c622ab1179e (patch)
tree206150e94eaa65e2d41c846d382a9a7721b94156 /starmath
parent90af7007b77f9cd0fcbc9b49350b20d2a5cb6cf4 (diff)
Resolves: #ii120149# Flash changes on slot execution to reflect AutoUpdate
(cherry picked from commit b73c741c4f792c71623127fdc711dc3f38603083) Conflicts: starmath/source/edit.cxx Change-Id: Ie073deabb1a48f3479a9c6bbf89d1e40f5cea663
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/edit.hxx1
-rw-r--r--starmath/source/edit.cxx24
2 files changed, 17 insertions, 8 deletions
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 1cb918314870..a9d9ca465be4 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 d10a59b6285d..fc88ba7cca3d 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);
}
}