[Libreoffice-commits] core.git: 2 commits - sc/source sw/source

Andras Timar (via logerrit) logerrit at kemper.freedesktop.org
Sun May 10 06:32:09 UTC 2020


 sc/source/ui/app/inputwin.cxx   |   42 ++++++++++++++++++++++++----------------
 sw/source/core/crsr/bookmrk.cxx |    8 ++++++-
 2 files changed, 33 insertions(+), 17 deletions(-)

New commits:
commit 9bfdad316d3ccff1eb6355c2ab4ad6c70cfe596b
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun May 10 08:22:42 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 10 08:31:23 2020 +0200

    fix broken build caused by change in internal LOK API
    
    Change-Id: I1a9f34bbd0cd66d97c92d09cd6bfb8f3a18b6abc

diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 3efdbf98167d..c1de5fb2cbaf 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -718,7 +718,13 @@ namespace sw::mark
 
     void DropDownFieldmark::SendLOKMessage(const OString& sAction)
     {
-        if (comphelper::LibreOfficeKit::isActive() && !comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
+        const SfxViewShell* pViewShell = SfxViewShell::Current();
+        if (pViewShell && pViewShell->isLOKMobilePhone())
+        {
+              return;
+        }
+
+        if (comphelper::LibreOfficeKit::isActive())
         {
             if (!m_pButton)
               return;
commit c818e551123a4c158a72e96a39a81b639b3a8015
Author:     Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Tue Feb 25 14:07:28 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 10 08:31:23 2020 +0200

    lok: remove sum and equal buttons from the formula bar
    
    This patch removes sum and equal buttons from the formula bar in the
    lok case. A tentative to limit that to the mobile case has been done
    however the formula input bar is created before than the client view
    so we are not able to use the LibreOfficeKit::isMobile check.
    
    Change-Id: Icb820a0d77eb9295046997d2f3690d7f8b39680d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89453
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 0b4280855399..c06efda5f978 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -194,10 +194,16 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) :
         InsertSeparator (1);
         InsertItem      (SID_INPUT_FUNCTION, Image(StockImage::Yes, RID_BMP_INPUT_FUNCTION), ToolBoxItemBits::NONE, 2);
     }
-    InsertItem      (SID_INPUT_SUM,      Image(StockImage::Yes, RID_BMP_INPUT_SUM), ToolBoxItemBits::DROPDOWNONLY, 3);
-    InsertItem      (SID_INPUT_EQUAL,    Image(StockImage::Yes, RID_BMP_INPUT_EQUAL), ToolBoxItemBits::NONE, 4);
-    InsertItem      (SID_INPUT_CANCEL,   Image(StockImage::Yes, RID_BMP_INPUT_CANCEL), ToolBoxItemBits::NONE, 5);
-    InsertItem      (SID_INPUT_OK,       Image(StockImage::Yes, RID_BMP_INPUT_OK), ToolBoxItemBits::NONE, 6);
+
+    // sigma and euqal buttons
+    if (!mpViewShell->isLOKMobilePhone())
+    {
+        InsertItem      (SID_INPUT_SUM,      Image(StockImage::Yes, RID_BMP_INPUT_SUM), ToolBoxItemBits::DROPDOWNONLY, 3);
+        InsertItem      (SID_INPUT_EQUAL,    Image(StockImage::Yes, RID_BMP_INPUT_EQUAL), ToolBoxItemBits::NONE, 4);
+        InsertItem      (SID_INPUT_CANCEL,   Image(StockImage::Yes, RID_BMP_INPUT_CANCEL), ToolBoxItemBits::NONE, 5);
+        InsertItem      (SID_INPUT_OK,       Image(StockImage::Yes, RID_BMP_INPUT_OK), ToolBoxItemBits::NONE, 6);
+    }
+
     if (!comphelper::LibreOfficeKit::isActive())
     {
         InsertSeparator (7);
@@ -220,23 +226,27 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) :
         SetHelpId   (SID_INPUT_FUNCTION, HID_INSWIN_CALC);
     }
 
-    SetItemText (SID_INPUT_SUM, ScResId( SCSTR_QHELP_BTNSUM ) );
-    SetHelpId   (SID_INPUT_SUM, HID_INSWIN_SUMME);
+    // sigma and euqal buttons
+    if (!mpViewShell->isLOKMobilePhone())
+    {
+        SetItemText (SID_INPUT_SUM, ScResId( SCSTR_QHELP_BTNSUM ) );
+        SetHelpId   (SID_INPUT_SUM, HID_INSWIN_SUMME);
 
-    SetItemText (SID_INPUT_EQUAL, ScResId( SCSTR_QHELP_BTNEQUAL ) );
-    SetHelpId   (SID_INPUT_EQUAL, HID_INSWIN_FUNC);
+        SetItemText (SID_INPUT_EQUAL, ScResId( SCSTR_QHELP_BTNEQUAL ) );
+        SetHelpId   (SID_INPUT_EQUAL, HID_INSWIN_FUNC);
 
-    SetItemText ( SID_INPUT_CANCEL, ScResId( SCSTR_QHELP_BTNCANCEL ) );
-    SetHelpId   ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL );
+        SetItemText ( SID_INPUT_CANCEL, ScResId( SCSTR_QHELP_BTNCANCEL ) );
+        SetHelpId   ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL );
 
-    SetItemText ( SID_INPUT_OK, ScResId( SCSTR_QHELP_BTNOK ) );
-    SetHelpId   ( SID_INPUT_OK, HID_INSWIN_OK );
+        SetItemText ( SID_INPUT_OK, ScResId( SCSTR_QHELP_BTNOK ) );
+        SetHelpId   ( SID_INPUT_OK, HID_INSWIN_OK );
 
-    EnableItem( SID_INPUT_CANCEL, false );
-    EnableItem( SID_INPUT_OK, false );
+        EnableItem( SID_INPUT_CANCEL, false );
+        EnableItem( SID_INPUT_OK, false );
 
-    HideItem( SID_INPUT_CANCEL );
-    HideItem( SID_INPUT_OK );
+        HideItem( SID_INPUT_CANCEL );
+        HideItem( SID_INPUT_OK );
+    }
 
     SetHelpId( HID_SC_INPUTWIN ); // For the whole input row
 


More information about the Libreoffice-commits mailing list