summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2020-02-25 14:07:28 +0100
committerAndras Timar <andras.timar@collabora.com>2020-04-29 09:54:27 +0200
commit1bb432503f0fb3af12f1405f343c5305206907c4 (patch)
tree85190c1125fd77bd4047ba369800636bc6998ce3
parent470cc5f279aa18f3d03633762e712882c6d115a4 (diff)
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@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sc/source/ui/app/inputwin.cxx42
1 files changed, 26 insertions, 16 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3dd89beb22ae..60a2a2b93c79 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -199,10 +199,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::NONE, 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::NONE, 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);
@@ -224,23 +230,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