diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-06-28 17:13:03 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-07-03 07:34:54 +0200 |
commit | ea846af14bffc9f48862c39e6232f188df4bbe62 (patch) | |
tree | ecb689e4b767bc2d08e9555a3508b040f7eb423d /sc | |
parent | 67a663626d6a45acfad686f46686c356336f443a (diff) |
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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 21 |
1 files changed, 4 insertions, 17 deletions
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() ); |