From 84a6fb2367ac2bf3d2d1763cf7c1a246c11870b7 Mon Sep 17 00:00:00 2001 From: Muhammet Kara Date: Sat, 25 Jan 2020 04:10:38 +0300 Subject: lok: Add LOK_CALLBACK_STATE_CHANGED for uno:Orientation Change-Id: Iab3aaf742bdb9fc4b9c5875fee7d769fa0581eeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87370 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea Tested-by: Aron Budea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88451 Tested-by: Jenkins Reviewed-by: Andras Timar --- sw/source/uibase/uiview/viewstat.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index a5bd1d13b527..a5eb1af2362b 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -197,6 +197,20 @@ void SwView::GetState(SfxItemSet &rSet) } ::PageDescToItemSet( rDesc, rSet); + + if (nWhich == SID_ATTR_PAGE_ORIENTATION && comphelper::LibreOfficeKit::isActive()) + { + OString aPayload = ".uno:Orientation="; + if (rDesc.GetLandscape()) + { + aPayload += "IsLandscape"; + } + else + { + aPayload += "IsPortrait"; + } + libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aPayload.getStr()); + } } break; case RES_BACKGROUND: -- cgit v1.2.3