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>
This commit is contained in:
Jan Holesovsky
2020-02-12 14:33:41 +01:00
committed by Andras Timar
parent f5f39903f4
commit 16fb30a16d
+6 -2
View File
@@ -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();