summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-03-16 13:50:00 +0200
committerTor Lillqvist <tml@collabora.com>2020-05-17 23:09:40 +0200
commit659b5abc5987c5e4e63b014521e0cad5086356a8 (patch)
treee750356f2007f6d1bee96917a8ba3a3951debfbc /editeng
parent05128f486e36b024fc405a3d5ad967df99c58964 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94390 Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index ec4aae63b63a..eaa9fe05e932 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1076,13 +1076,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 phone, 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 or tablet, we use the tunneled dialog
aPopupMenu->SetLOKNotifier(SfxViewShell::Current());
}
sal_uInt16 nId = aPopupMenu->Execute(pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose);