summaryrefslogtreecommitdiff
path: root/starmath/source/edit.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-24 14:32:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-24 21:21:32 +0100
commit0154f04e8c64df937b793c73ac58d553637f324f (patch)
tree5227c0518db2435ab5359c219c763f39078d9c4f /starmath/source/edit.cxx
parent76d2a9fd461dde817fbb1c5d4aa830cb2c42b504 (diff)
Resolves: rhbz#1931423 start update timer in IM events as well as keyevents
Change-Id: I5a72adebd34c3983e7a414110c3192d05b725e45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111488 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath/source/edit.cxx')
-rw-r--r--starmath/source/edit.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index b6734d6e1aa9..a53089bfa49b 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -364,7 +364,10 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
if (bForwardEvt)
{
if (pEditView)
- pEditView->Command( rCEvt );
+ {
+ if (pEditView->Command(rCEvt))
+ UserPossiblyChangedText();
+ }
else
Window::Command (rCEvt);
}
@@ -475,13 +478,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
@@ -509,6 +506,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)