summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2020-02-11 21:41:12 +0100
committerMichael Meeks <michael.meeks@collabora.com>2020-05-27 22:12:18 +0100
commit1b8bc87f89d7fc67bb7906ab4f0a6622121b65a6 (patch)
treeb340a133314ad21567d3f901cd0eb81535e6f736
parent208491052f597bec8c16db9f467f07836c364551 (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>
-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 0776958e5df8..55e6613d5256 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>
@@ -819,7 +820,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()
@@ -869,7 +872,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();