diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-07-29 20:27:24 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-08-29 12:21:59 +0200 |
commit | 4e144c1ab2ae7ef0a7928f7d4685aabe8e6b9c18 (patch) | |
tree | e6d1beabcddb02980d6a3f7525ac7527be5bdfb6 /desktop/source | |
parent | c8737dcf827cf47f233d3e8ad39a6348c3e36d10 (diff) |
lok: Add isMobile() method
[ Miklos: this allows core to e.g. serve tunelled dialogs with more or
less compact layouts, depending on if the client is mobile or not. ]
Change-Id: I3559bee84e6ef6f757809617e303aa090698ce5d
Reviewed-on: https://gerrit.libreoffice.org/78261
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 7c8b742dfb78..3c81ae6b400d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3211,6 +3211,18 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma if (nView < 0) return; + // Set/unset mobile view for LOK + if (gImpl && aCommand == ".uno:LOKSetMobile") + { + comphelper::LibreOfficeKit::setMobile(); + return; + } + else if (gImpl && aCommand == ".uno:LOKUnSetMobile") + { + comphelper::LibreOfficeKit::setMobile(false); + return; + } + // handle potential interaction if (gImpl && aCommand == ".uno:Save") { |