summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-03 15:36:03 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-03 16:55:51 +0100
commit11e91719ef362e38b3b92e525763a5a89f4eeecb (patch)
treeb2252a8188b9a173b6fac38ee453dedb99eb9c62 /xmloff
parentacfd369ebbd59d64290a846f49815592b6b95b30 (diff)
tdf#91920 sw page gutter margin: add ODF filter
Note that the context filter is not set, since fo:margin affects left margin, but should not affect the gutter margin. Also put the new entry at the end, but before the header and footer sections, so the attribute is written to the correct XML element. Change-Id: I3588d4e76cd713efed168eb93b9456bba96727fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110375 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmltoken.cxx1
-rw-r--r--xmloff/source/style/PageMasterStyleMap.cxx3
-rw-r--r--xmloff/source/token/tokens.txt1
3 files changed, 5 insertions, 0 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index bc8b04334ead..a75b152fb23b 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3394,6 +3394,7 @@ namespace xmloff::token {
TOKEN( "page-content-top", XML_PAGE_CONTENT_TOP ),
TOKEN( "page-content-bottom", XML_PAGE_CONTENT_BOTTOM ),
+ TOKEN("margin-gutter", XML_MARGIN_GUTTER),
#if OSL_DEBUG_LEVEL > 0
{ 0, nullptr, std::nullopt, XML_TOKEN_END }
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 18519b9132dc..d7b9f41e8f02 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -31,6 +31,8 @@ using namespace ::xmloff::token;
MAP(name, prefix, token, type|XML_TYPE_PROP_PAGE_LAYOUT, context, SvtSaveOptions::ODFSVER_012)
#define PLMAP_ODF13(name,prefix,token,type,context) \
MAP(name, prefix, token, type|XML_TYPE_PROP_PAGE_LAYOUT, context, SvtSaveOptions::ODFSVER_013)
+#define PLMAP_EXT(name,prefix,token,type,context) \
+ MAP(name, prefix, token, type|XML_TYPE_PROP_PAGE_LAYOUT, context, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED)
#define HFMAP(name,prefix,token,type,context) \
MAP(name, prefix, token, type|XML_TYPE_PROP_HEADER_FOOTER, context, SvtSaveOptions::ODFSVER_010)
@@ -153,6 +155,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
PLMAP( "FootnoteLineTextDistance", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE ),
PLMAP( "FootnoteLineWeight", XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGHT ),
PLMAP( "FootnoteLineStyle", XML_NAMESPACE_STYLE, XML_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
+ PLMAP_EXT("GutterMargin", XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, 0),
//////////////////////////////////////////////////////////////////////////
//Index 92: Section for 'header-style' own section, all members *have* to use CTF_PM_HEADERFLAG in the context entry (the 5th one)
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index e23cd24abda6..930046909201 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -3152,4 +3152,5 @@ transliteration-spellout
resolved
page-content-top
page-content-bottom
+margin-gutter
TOKEN_END_DUMMY