summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-03-16 13:50:00 +0200
committerTor Lillqvist <tml@collabora.com>2020-03-16 15:14:01 +0100
commitfc5400b167f1f6a9a788acfd5894622f440ee5f5 (patch)
tree2c6c50351d32861356d393940a1cca7e2dabc61e /svx
parente3daab4a0899ab89b42bdc1086217deba51bb993 (diff)
Rename isMobile to isMobilePhone and introduce a separate isTablet
The intended semantics of isMobile() has been to say whether the device is a mobile phone ot not. Not whether it is a mobile device in general. So make that explicit. Adjust call sites as necessary. Also, in a couple of places where it is likely that what is relevant is whether it is a mobile device in general, not just whether it is a mobile phone, check both isMobile() and isTablet(). For stable interoperability with current Online, keep accepting also the .uno:LOKSetMobile "command" (and .uno:LOKUnSetMobile, except that Online never sends that), but Online will be changed to use .uno:LOKSetMobilePhone. Also drop the default value for the bool parameter to setMobilePhone(). Default bool parameters can be quite confusing, and it was especially silly in this case as there is one (1) call site. Change-Id: I2a71c37323ee151cbc671bd8e714e1dee10f8b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90560 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index eae6f95aa366..6aa27cd3cd59 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -47,14 +47,14 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref
get(mpToolBoxFontColor, "colorbar_others");
get(mpToolBoxBackgroundColor, "colorbar_background");
- bool isMobile = false;
+ bool isMobilePhone = false;
if (comphelper::LibreOfficeKit::isActive() &&
- comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
- isMobile = true;
+ comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
+ isMobilePhone = true;
VclPtr<ToolBox> xSpacingBar;
get(xSpacingBar, "spacingbar");
- xSpacingBar->Show(!isMobile);
- xSpacingBar->ShowItem(0, !isMobile);
+ xSpacingBar->Show(!isMobilePhone);
+ xSpacingBar->ShowItem(0, !isMobilePhone);
}
TextPropertyPanel::~TextPropertyPanel()