summaryrefslogtreecommitdiff
path: root/sc/source/ui/app
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2020-02-11 21:41:12 +0100
committerAndras Timar <andras.timar@collabora.com>2020-02-12 14:33:41 +0100
commit16fb30a16d1a8470605487097c854671dee62830 (patch)
treea6355dd792a8e028c78e7b951c5a35c3e01083c7 /sc/source/ui/app
parentf5f39903f44f131c6d583ae056412dadee265d10 (diff)
android: Don't show the multiline toggle in the formula input bar on phones.
The interaction there currently distorts the view and occupies too much space anyway. Change-Id: I093432dcfc223e4ea8b0f5a3cc45368f90c3cc0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88477 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88481 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r--sc/source/ui/app/inputwin.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 2017ca88959f..8117330bf114 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -32,6 +32,7 @@
#include <editeng/postitem.hxx>
#include <editeng/langitem.hxx>
#include <sfx2/bindings.hxx>
+#include <sfx2/lokhelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/event.hxx>
@@ -727,7 +728,9 @@ ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, ScTabViewShell* pViewSh)
maButton->Enable();
maButton->SetSymbol(SymbolType::SPIN_DOWN);
maButton->SetQuickHelpText(ScResId(SCSTR_QHELP_EXPAND_FORMULA));
- maButton->Show();
+ // disable the multiline toggle on the mobile phones
+ if (!comphelper::LibreOfficeKit::isActive() || !comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ maButton->Show();
}
ScInputBarGroup::~ScInputBarGroup()
@@ -777,7 +780,8 @@ void ScInputBarGroup::Resize()
aSize.setHeight(maTextWndGroup->GetPixelHeightForLines(maTextWndGroup->GetNumLines()));
SetSizePixel(aSize);
- aSize.setWidth(aSize.Width() - maButton->GetSizePixel().Width() - BUTTON_OFFSET);
+ long nButtonWidth = maButton->IsVisible()? maButton->GetSizePixel().Width() + BUTTON_OFFSET: 0;
+ aSize.setWidth(aSize.Width() - nButtonWidth);
maTextWndGroup->SetSizePixel(aSize);
maTextWndGroup->Resize();