summaryrefslogtreecommitdiff
path: root/sfx2/source/control
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-01-09 22:17:23 -0400
committerHenry Castro <hcastro@collabora.com>2018-01-18 20:55:56 +0100
commit252ce90e39648c47bcfdb39547d0ac82bacdbae6 (patch)
treee3cd98634c37a73859eb4e8839310f10c6345e0d /sfx2/source/control
parent494297afe3a14d9aeef6b54515b7dceff5e1cc5f (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>
Diffstat (limited to 'sfx2/source/control')
-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 63df319437a5..2193914465f2 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1019,9 +1019,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;
@@ -1197,6 +1195,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;