[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - starmath/inc starmath/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 26 16:12:41 UTC 2021


 starmath/inc/edit.hxx    |    1 +
 starmath/source/edit.cxx |   24 ++++++++++++++++--------
 2 files changed, 17 insertions(+), 8 deletions(-)

New commits:
commit 7ec69e34f87a73b1414ff36b9fb921b7405fe5aa
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 24 14:32:21 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 26 17:12:06 2021 +0100

    Resolves: rhbz#1931423 start update timer in IM events as well as keyevents
    
    Change-Id: I5a72adebd34c3983e7a414110c3192d05b725e45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111455
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index c1ce769ab1c6..08ef2c716cbe 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -81,6 +81,7 @@ class SmEditWindow final : public vcl::Window, public DropTargetHelper
     void InitScrollBars();
     void InvalidateSlots();
     void UpdateStatus(bool bSetDocModified);
+    void UserPossiblyChangedText();
 
 public:
     explicit SmEditWindow(SmCmdBoxWindow& rMyCmdBoxWin);
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 755bb3b5c667..ae01f4144611 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -341,7 +341,10 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
     if (bForwardEvt)
     {
         if (pEditView)
-            pEditView->Command( rCEvt );
+        {
+            pEditView->Command(rCEvt);
+            UserPossiblyChangedText();
+        }
         else
             Window::Command (rCEvt);
     }
@@ -452,13 +455,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
         }
         else
         {
-            // have doc-shell modified only for formula input/change and not
-            // cursor travelling and such things...
-            SmDocShell *pDocShell = GetDoc();
-            EditEngine *pEditEngine = GetEditEngine();
-            if (pDocShell && pEditEngine)
-                pDocShell->SetModified(pEditEngine->IsModified());
-            aModifyIdle.Start();
+            UserPossiblyChangedText();
         }
 
         // get the current char of the key event
@@ -486,6 +483,17 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
     }
 }
 
+void SmEditWindow::UserPossiblyChangedText()
+{
+    // have doc-shell modified only for formula input/change and not
+    // cursor travelling and such things...
+    SmDocShell *pDocShell = GetDoc();
+    EditEngine *pEditEngine = GetEditEngine();
+    if (pDocShell && pEditEngine)
+        pDocShell->SetModified(pEditEngine->IsModified());
+    aModifyIdle.Start();
+}
+
 void SmEditWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
 {
     if (!pEditView)


More information about the Libreoffice-commits mailing list