summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-03-24 09:12:07 +0200
committerTor Lillqvist <tml@collabora.com>2020-03-24 10:10:04 +0100
commit8a30ff491d562129097ff231267729316fda5b7a (patch)
treee0963264f42b8ee69621a44635d95f091b8417fe /desktop/source
parent288e02549bed317730eff0d169f6bdb75c8f40ce (diff)
Simplify the LibreOfficeKit mobile phone and tablet API
There is not need to ever change the kind of device a view is for, so why bother with the bool parameter to setMobilePhone() and setTablet(). Also, make sure just either of them is called, at most once, for a view. Change-Id: I9ac872f0ab4772e4a7c40c49f62b32fa7b1e47f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90968 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e7a81a1c6099..706d826d6722 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3624,25 +3624,14 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
if (nView < 0)
return;
- // Set/unset mobile phone view for LOK
if (gImpl && (aCommand == ".uno:LOKSetMobile" || aCommand == ".uno:LOKSetMobilePhone"))
{
- comphelper::LibreOfficeKit::setMobilePhone(nView, true);
- return;
- }
- else if (gImpl && (aCommand == ".uno:LOKUnSetMobile" || aCommand == ".uno:LOKUnSetMobilePhone"))
- {
- comphelper::LibreOfficeKit::setMobilePhone(nView, false);
+ comphelper::LibreOfficeKit::setMobilePhone(nView);
return;
}
else if (gImpl && aCommand == ".uno:LOKSetTablet")
{
- comphelper::LibreOfficeKit::setTablet(nView, true);
- return;
- }
- else if (gImpl && aCommand == ".uno:LOKUnSetTablet")
- {
- comphelper::LibreOfficeKit::setTablet(nView, false);
+ comphelper::LibreOfficeKit::setTablet(nView);
return;
}
else if (gImpl && aCommand == ".uno:ToggleOrientation")