summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-01-09 22:17:23 -0400
committerJan Holesovsky <kendy@collabora.com>2018-02-09 17:44:25 +0100
commit83202ea1341c98a216871f14702548ce5aabd94a (patch)
tree8e1d642afbd5253a20d143f4e95963f5fb99a82e /sfx2
parente189dd061bb0817e1f9e872c9b8dc82b72bfffc5 (diff)
sw lokit: add page syles to header & footer
Change-Id: I3c0b0603d1e03f1cc19af4324dd2b909320d9d4a Reviewed-on: https://gerrit.libreoffice.org/47687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/48236 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/unoctitm.cxx25
1 files changed, 22 insertions, 3 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index b74f971d6a07..39561e09489e 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1006,9 +1006,7 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
aEvent.FeatureURL.Path == "AlignLeft" ||
aEvent.FeatureURL.Path == "AlignHorizontalCenter" ||
aEvent.FeatureURL.Path == "AlignRight" ||
- aEvent.FeatureURL.Path == "DocumentRepair" ||
- aEvent.FeatureURL.Path == "InsertPageHeader" ||
- aEvent.FeatureURL.Path == "InsertPageFooter")
+ aEvent.FeatureURL.Path == "DocumentRepair")
{
bool bTemp = false;
aEvent.State >>= bTemp;
@@ -1185,6 +1183,27 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
}
}
}
+ else if (aEvent.FeatureURL.Path == "InsertPageHeader" ||
+ aEvent.FeatureURL.Path == "InsertPageFooter")
+ {
+ if (aEvent.IsEnabled)
+ {
+ css::uno::Sequence< OUString > aSeq;
+ if (aEvent.State >>= aSeq)
+ {
+ aBuffer.append(u'{');
+ for (sal_Int32 itSeq = 0; itSeq < aSeq.getLength(); itSeq++)
+ {
+ aBuffer.append("\"" + aSeq[itSeq]);
+ if (itSeq != aSeq.getLength() - 1)
+ aBuffer.append("\":true,");
+ else
+ aBuffer.append("\":true");
+ }
+ aBuffer.append(u'}');
+ }
+ }
+ }
else
{
return;