[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 11 22:35:42 UTC 2020


 sc/source/ui/app/inputwin.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 03cbf296c1bd00ce54841e974b147af3434bbca6
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Feb 11 21:41:12 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Feb 11 23:35:11 2020 +0100

    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 at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index bacbe4b1ffbd..5193e9e28d6e 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -34,6 +34,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>
@@ -864,7 +865,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();
 
     maScrollbar->SetSizePixel(aSize);
     maScrollbar->SetScrollHdl(LINK(this, ScInputBarGroup, Impl_ScrollHdl));
@@ -924,7 +927,8 @@ void ScInputBarGroup::Resize()
     maScrollbar->SetPosPixel(Point( aSize.Width() - maButton->GetSizePixel().Width(), maButton->GetSizePixel().Height() ) );
 
     Size aTmpSize( aSize );
-    aTmpSize.setWidth( aTmpSize.Width() - maButton->GetSizePixel().Width() - BUTTON_OFFSET );
+    long nButtonWidth = maButton->IsVisible()? maButton->GetSizePixel().Width() + BUTTON_OFFSET: 0;
+    aTmpSize.setWidth(aTmpSize.Width() - nButtonWidth);
     maTextWnd->SetSizePixel(aTmpSize);
 
     maTextWnd->Resize();


More information about the Libreoffice-commits mailing list