summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/inputwin.cxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2020-02-25 14:07:28 +0100
committerMichael Meeks <michael.meeks@collabora.com>2020-05-27 22:34:32 +0100
commit7e69bacc437807ef50bd769fedb6986e42a85876 (patch)
tree4a5e0d06618547446a424f91a22eae179f4e3960 /sc/source/ui/app/inputwin.cxx
parent9ec1d1d4fca4cde2ddd0f207a08dacf906070f73 (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>
Diffstat (limited to 'sc/source/ui/app/inputwin.cxx')
-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 626c5b2d0a71..04d6143ec900 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -192,10 +192,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);
@@ -218,23 +224,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