summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/SidebarDockingWindow.cxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2020-04-20 21:26:26 +0200
committerMichael Meeks <michael.meeks@collabora.com>2020-05-27 22:32:05 +0100
commit0469cdc945908a7c478d2ca715b0412d1e75c1e0 (patch)
tree213581f9a4986299a458dfc5bbfb91651b375f87 /sfx2/source/sidebar/SidebarDockingWindow.cxx
parent2bfbc4d4c83954bb46d0dc34e2838cefa62cf5a2 (diff)
lok: set device form factor of the client on view creation
This patch allows the lok core to know about the device form facor of the client requesting the creation of new view, immediately instead of a later time. When a new view is needed a "DeviceFormFactor" parameter is forwarded to lo_documentLoadWithOptions and doc_createViewWithOptions from the client. This parameter can have one of the following values: 'desktop', 'tablet','mobile' and it is used to set a global variable accessible by SfxLokHelper::setDeviceFormFactor and SfxLokHelper::getDeviceFormFactor. This global variable is retrived in the SfxViewShell constructor for setting SfxViewShell::maLOKDeviceFormFactor attribute. In SfxViewShell we have the following 3 methods: - bool isLOKDesktop() - bool isLOKTablet() - bool isLOKMobilePhone() which replace the following boolean functions: - comphelper::LibreOfficeKit::isTablet - comphelper::LibreOfficeKit::::isMobilePhone Change-Id: I9b36f354278df8c216fcb90f6a9da8256ec9c1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93340 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sfx2/source/sidebar/SidebarDockingWindow.cxx')
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index dd23ffbca51f..0544c998b8aa 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -65,7 +65,7 @@ public:
try
{
- if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+ if (pMobileNotifier && pMobileNotifier->isLOKMobilePhone())
{
// Mobile.
std::stringstream aStream;