summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx3
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx14
2 files changed, 16 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ed3bc77c2667..90989c45df96 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2654,7 +2654,8 @@ static void doc_iniUnoCommands ()
OUString(".uno:OnlineAutoFormat"),
OUString(".uno:InsertSymbol"),
OUString(".uno:EditRegion"),
- OUString(".uno:ThesaurusDialog")
+ OUString(".uno:ThesaurusDialog"),
+ OUString(".uno:Orientation")
};
util::URL aCommandURL;
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index ca90d62f1528..caa3bd34a6a2 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -187,6 +187,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: