diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2020-02-26 14:48:55 +0100 |
---|---|---|
committer | Marco Cecchetti <marco.cecchetti@collabora.com> | 2020-05-29 14:38:04 +0200 |
commit | 6665a9970f3c760d340b93b9dcbbd29d8f0cf6fd (patch) | |
tree | 145ad9775fb921d1728f86e26e9370e346428f21 /sc/source/ui | |
parent | 13bcdb3ece6db1c1538435f75f6e2296fdbbfb71 (diff) |
lok: formula input bar: get a function inserted in a not focused top view
Change-Id: Ia52ebbcad8d3febab85f19279859e901f8193c49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89548
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95104
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 7547a5240dfe..74e17af75782 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1621,17 +1621,29 @@ void ScInputHandler::PasteFunctionData() HideTip(); EditView* pActiveView = pTopView ? pTopView : pTableView; + if (comphelper::LibreOfficeKit::isActive() && pTopView && pInputWin) + pInputWin->TextGrabFocus(); if (pActiveView) pActiveView->ShowCursor(); } void ScInputHandler::LOKPasteFunctionData(const OUString& rFunctionName) { - if (pActiveViewSh && (pTopView || pTableView)) + // in case we have no top view try to create it + if (!pTopView && pInputWin) + { + ScInputMode eCurMode = eMode; + SetMode(SC_INPUT_TOP); + if (!pTopView) + SetMode(eCurMode); + } + + EditView* pEditView = pTopView ? pTopView : pTableView; + + if (pActiveViewSh && pEditView) { bool bEdit = false; OUString aFormula; - EditView* pEditView = pTopView ? pTopView : pTableView; const EditEngine* pEditEngine = pEditView->GetEditEngine(); if (pEditEngine) { |