diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-07-29 20:27:24 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-09-03 21:42:32 +0200 |
commit | 3da2462be2eabb8a030cff297345fdbbd494ee5b (patch) | |
tree | bc854fff42c2b55e08e904b9de5805094a20e12c /comphelper | |
parent | cdecd2c2e05b47602312f0875f9e3a719749fb01 (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. ]
(cherry picked from commit 4e144c1ab2ae7ef0a7928f7d4685aabe8e6b9c18)
Change-Id: I3559bee84e6ef6f757809617e303aa090698ce5d
Reviewed-on: https://gerrit.libreoffice.org/78306
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/lok.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 4e8f7af1f672..a5d9689137d0 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -22,6 +22,8 @@ namespace LibreOfficeKit static bool g_bActive(false); +static bool g_bMobile(false); + static bool g_bPartInInvalidation(false); static bool g_bTiledPainting(false); @@ -53,6 +55,16 @@ bool isActive() return g_bActive; } +void setMobile(bool bIsMobile) +{ + g_bMobile = bIsMobile; +} + +bool isMobile() +{ + return g_bMobile; +} + void setPartInInvalidation(bool bPartInInvalidation) { g_bPartInInvalidation = bPartInInvalidation; |