incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1356190 - in /incubator/ooo/trunk/main/starmath: inc/edit.hxx source/edit.cxx
Date Mon, 02 Jul 2012 11:43:00 GMT
Author: arielch
Date: Mon Jul  2 11:42:58 2012
New Revision: 1356190

URL: http://svn.apache.org/viewvc?rev=1356190&view=rev
Log:
i120149 - Flash changes on slot execution to reflect AutoUpdate

Modified:
    incubator/ooo/trunk/main/starmath/inc/edit.hxx
    incubator/ooo/trunk/main/starmath/source/edit.cxx

Modified: incubator/ooo/trunk/main/starmath/inc/edit.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/starmath/inc/edit.hxx?rev=1356190&r1=1356189&r2=1356190&view=diff
==============================================================================
--- incubator/ooo/trunk/main/starmath/inc/edit.hxx (original)
+++ incubator/ooo/trunk/main/starmath/inc/edit.hxx Mon Jul  2 11:42:58 2012
@@ -93,6 +93,7 @@ class SmEditWindow : public Window, publ
 	void 		SetScrollBarRanges();
 	void 		InitScrollBars();
 	void		InvalidateSlots();
+    void        UpdateStatus( bool bSetDocModified = false );
 
 public:
     SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin );

Modified: incubator/ooo/trunk/main/starmath/source/edit.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/starmath/source/edit.cxx?rev=1356190&r1=1356189&r2=1356190&view=diff
==============================================================================
--- incubator/ooo/trunk/main/starmath/source/edit.cxx (original)
+++ incubator/ooo/trunk/main/starmath/source/edit.cxx Mon Jul  2 11:42:58 2012
@@ -245,9 +245,7 @@ void SmEditWindow::DataChanged( const Da
 
 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() cons
     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 );
     }
 }
 



Mime
View raw message