summaryrefslogtreecommitdiff
path: root/sc/source/ui/app
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-05-08 20:31:42 +0200
commitc35aef260feda34eae5e4b8a39f1baaa716b717d (patch)
tree57e7c7fa6a217f8c42c311fed78fa56c8f6bd9f1 /sc/source/ui/app
parent88173bd3ca4becc59282e58c035b882ca827a753 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93342 Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/app')
-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 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