starmath/source/view.cxx |   36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 03c43d303b6d32dc4c39bd273d446b66a3e6c42d
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Thu Aug 31 11:55:22 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Mon Sep 4 11:58:15 2023 +0200

    Math: enable in-place editing on desktop
    
    Move the code outside the else block as it doesn’t get hit for me on
    desktop otherwise, and use SmViewShell::IsInlineEditEnabled() instead of
    comphelper::LibreOfficeKit::isActive() (which is included in the former).
    
    Followup to:
    
    commit 737a270c61cd2038ede7911b7d7b4afcf020f53c
    Date:   Mon Jan 17 17:15:46 2022 +0300
    
        lok: enable in-place editing of math equations
    
    Change-Id: Ie604f152344b83479eaf6024b6d58e374abb39b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156331
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 97332a4810c1..a71438bc82b5 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -835,26 +835,24 @@ bool SmGraphicWidget::Command(const CommandEvent& rCEvt)
             default: break;
         }
     }
-    else
+
+    switch (rCEvt.GetCommand())
     {
-        switch (rCEvt.GetCommand())
-        {
-            case CommandEventId::ExtTextInput:
-                if (comphelper::LibreOfficeKit::isActive())
-                {
-                    const CommandExtTextInputData* pData = 
rCEvt.GetExtTextInputData();
-                    assert(pData);
-                    const OUString& rText = pData->GetText();
-                    SmCursor& rCursor = GetCursor();
-                    OutputDevice& rDevice = GetOutputDevice();
-                    for (sal_Int32 i = 0; i < rText.getLength();)
-                        CharInput(rText.iterateCodePoints(&i), rCursor, 
rDevice);
-                    bCallBase = false;
-                }
-                break;
-            default:
-                break;
-        }
+        case CommandEventId::ExtTextInput:
+            if (SmViewShell::IsInlineEditEnabled())
+            {
+                const CommandExtTextInputData* pData = 
rCEvt.GetExtTextInputData();
+                assert(pData);
+                const OUString& rText = pData->GetText();
+                SmCursor& rCursor = GetCursor();
+                OutputDevice& rDevice = GetOutputDevice();
+                for (sal_Int32 i = 0; i < rText.getLength();)
+                    CharInput(rText.iterateCodePoints(&i), rCursor, rDevice);
+                bCallBase = false;
+            }
+            break;
+        default:
+            break;
     }
     return !bCallBase;
 }

Reply via email to