summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-03-16 13:50:00 +0200
committerTor Lillqvist <tml@collabora.com>2020-03-20 15:10:48 +0100
commit5ccb7ecf7cda92934d63cc171674b6c4f7f51af7 (patch)
treed1ca3398df7d517f0f466b5cc226cf1730ca3ed3
parentb1e9ab0dd38c76413b46111d5bdbc837099b8f69 (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). Online will eventually be changed to use .uno:LOKSetMobilePhone or .uno:LOGSetTablet only (and never the UnSet variants). 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. This is a work in progress and will be improved. Currently there are undefined corner cases. 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90778 Tested-by: Jenkins
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx4
-rw-r--r--comphelper/source/misc/lok.cxx31
-rw-r--r--desktop/source/lib/init.cxx20
-rw-r--r--editeng/source/editeng/editview.cxx6
-rw-r--r--include/comphelper/lok.hxx14
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx2
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx5
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
-rw-r--r--sd/source/core/sdpage.cxx20
-rw-r--r--sd/source/ui/func/futext.cxx2
-rw-r--r--sfx2/source/sidebar/Deck.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx6
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx10
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx4
18 files changed, 84 insertions, 54 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index e7b999eb604e..dcae80581d8b 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -933,8 +933,8 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
void ChartController::execute_DoubleClick( const Point* pMousePixel )
{
- bool isMobile = comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
- if (isMobile)
+ bool isMobilePhone = comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+ if (isMobilePhone)
return;
bool bEditText = false;
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index c4e5b8e23979..292de13effe3 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -88,8 +88,11 @@ static LanguageAndLocale g_aLanguageAndLocale;
/// Scaling of the cairo canvas painting for hi-dpi
static double g_fDPIScale(1.0);
-/// List of <viewid, bMobile> pairs
-static std::map<int, bool> g_vIsViewMobile;
+/// Which views are on mobile phones?
+static std::map<int, bool> g_vIsViewMobilePhone;
+
+/// Which views are on tablets?
+static std::map<int, bool> g_vIsViewTablet;
void setActive(bool bActive)
{
@@ -101,18 +104,28 @@ bool isActive()
return g_bActive;
}
-void setMobile(int nViewId, bool bMobile)
+void setMobilePhone(int nViewId, bool bIsMobilePhone)
+{
+ g_vIsViewMobilePhone[nViewId] = bIsMobilePhone;
+}
+
+bool isMobilePhone(int nViewId)
{
- if (g_vIsViewMobile.find(nViewId) != g_vIsViewMobile.end())
- g_vIsViewMobile[nViewId] = bMobile;
+ if (g_vIsViewMobilePhone.find(nViewId) != g_vIsViewMobilePhone.end())
+ return g_vIsViewMobilePhone[nViewId];
else
- g_vIsViewMobile.insert(std::make_pair(nViewId, bMobile));
+ return false;
+}
+
+void setTablet(int nViewId, bool bIsTablet)
+{
+ g_vIsViewTablet[nViewId] = bIsTablet;
}
-bool isMobile(int nViewId)
+bool isTablet(int nViewId)
{
- if (g_vIsViewMobile.find(nViewId) != g_vIsViewMobile.end())
- return g_vIsViewMobile[nViewId];
+ if (g_vIsViewTablet.find(nViewId) != g_vIsViewTablet.end())
+ return g_vIsViewTablet[nViewId];
else
return false;
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index da2a29c3f7d4..e7a81a1c6099 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3624,15 +3624,25 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
if (nView < 0)
return;
- // Set/unset mobile view for LOK
- if (gImpl && aCommand == ".uno:LOKSetMobile")
+ // Set/unset mobile phone view for LOK
+ if (gImpl && (aCommand == ".uno:LOKSetMobile" || aCommand == ".uno:LOKSetMobilePhone"))
{
- comphelper::LibreOfficeKit::setMobile(nView);
+ comphelper::LibreOfficeKit::setMobilePhone(nView, true);
return;
}
- else if (gImpl && aCommand == ".uno:LOKUnSetMobile")
+ else if (gImpl && (aCommand == ".uno:LOKUnSetMobile" || aCommand == ".uno:LOKUnSetMobilePhone"))
{
- comphelper::LibreOfficeKit::setMobile(nView, false);
+ comphelper::LibreOfficeKit::setMobilePhone(nView, false);
+ return;
+ }
+ else if (gImpl && aCommand == ".uno:LOKSetTablet")
+ {
+ comphelper::LibreOfficeKit::setTablet(nView, true);
+ return;
+ }
+ else if (gImpl && aCommand == ".uno:LOKUnSetTablet")
+ {
+ comphelper::LibreOfficeKit::setTablet(nView, false);
return;
}
else if (gImpl && aCommand == ".uno:ToggleOrientation")
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index bbe64366e408..71f13298f511 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1071,13 +1071,13 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
if (comphelper::LibreOfficeKit::isActive())
{
- // For mobile, send the context menu structure
- if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ // For mobile phones, send the context menu structure
+ if (comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
LOKSendSpellPopupMenu(aPopupMenu, nGuessLangWord, nGuessLangPara, nWords);
return;
}
- else // For desktop, we use the tunneled dialog
+ else // For desktop and tablets, we use the tunneled dialog
aPopupMenu->SetLOKNotifier(SfxViewShell::Current());
}
sal_uInt16 nId = aPopupMenu->Execute(pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose);
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index ca875b8df4a2..d88ddfd1dfa5 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -29,8 +29,11 @@ namespace LibreOfficeKit
COMPHELPER_DLLPUBLIC void setActive(bool bActive = true);
-// Set LOK view to mobile
-COMPHELPER_DLLPUBLIC void setMobile(int nViewId, bool bIsMobile = true);
+// Tell that LOK view is on a mobile phone (regardless what its pixel resolution is, whether its form factor is "phablet" or not)
+COMPHELPER_DLLPUBLIC void setMobilePhone(int nViewId, bool bIsMobilePhone);
+
+// Tell that LOK view is on a tablet
+COMPHELPER_DLLPUBLIC void setTablet(int nViewId, bool bIsTablet);
enum class statusIndicatorCallbackType { Start, SetValue, Finish };
@@ -42,8 +45,11 @@ COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(void (*callback)(void *data
// Check whether the code is running as invoked through LibreOfficeKit.
COMPHELPER_DLLPUBLIC bool isActive();
-// Check whether we are serving to a mobile view/device
-COMPHELPER_DLLPUBLIC bool isMobile(int nViewId);
+// Check whether we are serving to a mobile phone
+COMPHELPER_DLLPUBLIC bool isMobilePhone(int nViewId);
+
+// Check whether we are serving to a tablet
+COMPHELPER_DLLPUBLIC bool isTablet(int nViewId);
/// Shift the coordinates before rendering each bitmap.
/// Used by Calc to render each tile separately.
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 076acd2f06de..bea2cc244eb3 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1309,7 +1309,7 @@ namespace {
void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec )
{
if (comphelper::LibreOfficeKit::isActive() &&
- comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
SfxViewShell* pViewShell = SfxViewShell::Current();
if (pViewShell && rFuncStrVec.size())
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 1fdb5ad5eddc..26035be992ca 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -821,7 +821,7 @@ ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, ScTabViewShell* pViewSh)
maButton->SetSymbol(SymbolType::SPIN_DOWN);
maButton->SetQuickHelpText(ScResId(SCSTR_QHELP_EXPAND_FORMULA));
// disable the multiline toggle on the mobile phones
- if (!comphelper::LibreOfficeKit::isActive() || !comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (!comphelper::LibreOfficeKit::isActive() || !comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
maButton->Show();
}
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 80753e59c3cd..e18dd815396f 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -608,7 +608,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV
if( xChartModel.is() )
xChartModel->unlockControllers();
}
- else if (!comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ else if (!comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
//the controller will be unlocked by the dialog when the dialog is told to do so
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 78363b683ebe..f5c8f7e4955b 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -175,7 +175,7 @@ boost::property_tree::ptree AlignmentPropertyPanel::DumpAsPropertyTree()
{
boost::property_tree::ptree aTree = PanelLayout::DumpAsPropertyTree();
- if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
eraseNode(aTree, "textorientbox");
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 44096e0c7f43..ffcdf1656b15 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2211,10 +2211,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
return;
}
- // in mobile view there is no ctrl+click and for hyperlink popup
+ // On a mobile device view there is no ctrl+click and for hyperlink popup
// the cell coordinates must be sent along with click position for elegance
if (isTiledRendering &&
- comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ (comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) ||
+ comphelper::LibreOfficeKit::isTablet(SfxLokHelper::getView())))
{
ScTabViewShell* pViewShell = pViewData->GetViewShell();
Point aPos = rMEvt.GetPosPixel();
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index c0a108c1045d..758c0621478d 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -337,7 +337,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
{
// Do CSV dialog if more than one line. But not if invoked from Automation.
sal_Int32 nDelim = pStrBuffer->indexOf('\n');
- if (!comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) && !comphelper::Automation::AutomationInvokedZone::isActive()
+ if (!comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) && !comphelper::Automation::AutomationInvokedZone::isActive()
&& nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
{
vcl::Window* pParent = GetActiveWin();
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 31bc4cec27d1..fc2fcdafe155 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2601,9 +2601,9 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
OUString aString;
#if defined(IOS) || defined(ANDROID)
- bool isMobile = true;
+ bool isMobileDevice = true;
#else
- bool isMobile = comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
+ bool isMobileDevice = comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) || comphelper::LibreOfficeKit::isTablet(SfxLokHelper::getView());
#endif
if (eObjKind == PRESOBJ_TITLE)
@@ -2612,20 +2612,20 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
{
if (mePageKind != PageKind::Notes)
{
- if (isMobile)
+ if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_MPTITLE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_MPTITLE);
}
else
{
- if (isMobile)
+ if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_MPNOTESTITLE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_MPNOTESTITLE);
}
}
- else if (isMobile)
+ else if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_TITLE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_TITLE);
@@ -2634,12 +2634,12 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
{
if (mbMaster)
{
- if (isMobile)
+ if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_MPOUTLINE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_MPOUTLINE);
}
- else if (isMobile)
+ else if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_OUTLINE_MOBILE);
else
aString = SdResId(STR_PRESOBJ_OUTLINE);
@@ -2648,19 +2648,19 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
{
if (mbMaster)
{
- if (isMobile)
+ if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_MPNOTESTEXT_MOBILE);
else
aString = SdResId(STR_PRESOBJ_MPNOTESTEXT);
}
- else if (isMobile)
+ else if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_NOTESTEXT_MOBILE);
else
aString = SdResId(STR_PRESOBJ_NOTESTEXT);
}
else if (eObjKind == PRESOBJ_TEXT)
{
- if (isMobile)
+ if (isMobileDevice)
aString = SdResId(STR_PRESOBJ_TEXT_MOBILE);
else
aString = SdResId(STR_PRESOBJ_TEXT);
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index a6b7677debae..fc216d5d1389 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -524,7 +524,7 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
pTxtObj->SetMergedItemSet(aSet);
- if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) || comphelper::LibreOfficeKit::isTablet(SfxLokHelper::getView()))
pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE));
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index d5910704d50e..3bfb21134e3b 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -307,7 +307,7 @@ void Deck::RequestLayout()
bChangeNeeded = true;
}
if (mnMinimalWidth > 0 && (mnMinimalWidth != aParentSize.Width() || GetSizePixel().Width() != mnMinimalWidth)
- && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
aParentSize.setWidth(mnMinimalWidth);
bChangeNeeded = true;
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 55b953b207df..ec077be3b44b 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1222,9 +1222,9 @@ void SidebarController::RequestCloseDeck()
{
const vcl::ILibreOfficeKitNotifier* pNotifier = mpCurrentDeck->GetLOKNotifier();
auto pMobileNotifier = SfxViewShell::Current();
- if (pMobileNotifier && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (pMobileNotifier && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
- // Mobile.
+ // Mobile phone.
std::stringstream aStream;
boost::property_tree::ptree aTree;
aTree.put("id", mpParentWindow->get_id()); // TODO could be missing - sort out
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 553d6df95455..faa135017633 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -65,9 +65,9 @@ public:
try
{
- if (pMobileNotifier && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (pMobileNotifier && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
{
- // Mobile.
+ // Mobile phone.
std::stringstream aStream;
boost::property_tree::ptree aTree = m_rSidebarDockingWin.DumpAsPropertyTree();
aTree.put("id", m_rSidebarDockingWin.GetLOKWindowId());
@@ -81,7 +81,7 @@ public:
}
// Notify the sidebar is created, and its LOKWindowId, which
- // is needed on both Mobile and Desktop.
+ // is needed on mobile phones, tablets, and desktop.
const Point pos(m_rSidebarDockingWin.GetOutOffXPixel(),
m_rSidebarDockingWin.GetOutOffYPixel());
const OString posMessage = pos.toString();
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index d96d51c86446..7cc3c7995fa5 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()
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index 77e5e0d851af..1f8902867b3c 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -31,7 +31,7 @@
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>
-#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+#define IS_MOBILE_PHONE (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
SwWordCountFloatDlg::~SwWordCountFloatDlg()
{
@@ -104,7 +104,7 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings,
SfxChildWindow* pChild,
weld::Window *pParent,
SfxChildWinInfo const * pInfo)
- : SfxModelessDialogController(_pBindings, pChild, pParent, IS_MOBILE ? OUString("modules/swriter/ui/wordcount-mobile.ui") : OUString("modules/swriter/ui/wordcount.ui"), "WordCountDialog")
+ : SfxModelessDialogController(_pBindings, pChild, pParent, IS_MOBILE_PHONE ? OUString("modules/swriter/ui/wordcount-mobile.ui") : OUString("modules/swriter/ui/wordcount.ui"), "WordCountDialog")
, m_xCurrentWordFT(m_xBuilder->weld_label("selectwords"))
, m_xCurrentCharacterFT(m_xBuilder->weld_label("selectchars"))
, m_xCurrentCharacterExcludingSpacesFT(m_xBuilder->weld_label("selectcharsnospaces"))