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

New commits:
commit e53be4d13c4a328eb4ee0ceb937e4b272ecbde7c
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jun 28 15:46:23 2023 +0200
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Mon Jul 3 01:09:45 2023 +0200

    lok: formulabar: use position sent from client
    
    Change-Id: I0877cd9d5a5ba0319701e50bd5b9e5d63b23becd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153717
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6db4bd6773e6..acbb66c41a4a 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1813,23 +1813,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());
-
-
-        }
+        nParaStart = pParaPoint ? pParaPoint->X() : 0;
+        nParaEnd = pParaPoint ? pParaPoint->Y() : 0;
+        nPosStart = m_xEditView->GetPosNoField(nParaStart, 
aSelectionStartEnd.X());
+        nPosEnd = m_xEditView->GetPosNoField(nParaEnd, aSelectionStartEnd.Y());
 
         m_xEditView->SetSelection(ESelection(nParaStart, nPosStart, nParaEnd, 
nPosEnd));
         SC_MOD()->InputSelection( m_xEditView.get() );

Reply via email to