[Libreoffice-commits] core.git: sc/source
Marco Cecchetti (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 8 18:32:42 UTC 2020
sc/source/ui/app/inputwin.cxx | 42 ++++++++++++++++++++++++++----------------
1 file changed, 26 insertions(+), 16 deletions(-)
New commits:
commit c35aef260feda34eae5e4b8a39f1baaa716b717d
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: Fri May 8 20:31:42 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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93342
Tested-by: Jenkins
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 4c186610e0ad..930bfe4e26ef 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