sc/source/ui/app/inputwin.cxx |   21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

New commits:
commit ea846af14bffc9f48862c39e6232f188df4bbe62
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jun 28 17:13:03 2023 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Jul 3 07:34:54 2023 +0200

    lok: formulabar: use IME also on desktop
    
    this makes selection always on the end of content so
    we can remove not matching last X chars and append new content
    easily
    
    Change-Id: I75cbf59f2a536f0e7969409325ac6d549046ef06
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153718
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 85b9bff669d1..a413424a11c5 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1741,23 +1741,10 @@ bool ScTextWnd::Command( const CommandEvent& rCEvt )
 
         sal_Int32 nParaStart, nParaEnd, nPosStart, nPosEnd;
 
-        ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
-        if (pViewSh && pViewSh->isLOKMobilePhone())
-        {
-            // We use IME - do not select anything, put cursor at the end
-            nParaStart = nParaEnd = 
m_xEditView->GetEditEngine()->GetParagraphCount() ?
-                (m_xEditView->GetEditEngine()->GetParagraphCount() - 1) : 0;
-            nPosStart = nPosEnd = 
m_xEditView->GetEditEngine()->GetTextLen(nParaStart);
-        }
-        else
-        {
-            nParaStart = pParaPoint ? pParaPoint->X() : 0;
-            nParaEnd = pParaPoint ? pParaPoint->Y() : 0;
-            nPosStart = m_xEditView->GetPosNoField(nParaStart, 
aSelectionStartEnd.X());
-            nPosEnd = m_xEditView->GetPosNoField(nParaEnd, 
aSelectionStartEnd.Y());
-
-
-        }
+        // We use IME - do not select anything, put cursor at the end
+        nParaStart = nParaEnd = 
m_xEditView->GetEditEngine()->GetParagraphCount() ?
+            (m_xEditView->GetEditEngine()->GetParagraphCount() - 1) : 0;
+        nPosStart = nPosEnd = 
m_xEditView->GetEditEngine()->GetTextLen(nParaStart);
 
         m_xEditView->SetSelection(ESelection(nParaStart, nPosStart, nParaEnd, 
nPosEnd));
         SC_MOD()->InputSelection( m_xEditView.get() );

Reply via email to