summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/txtexppr.cxx18
-rw-r--r--xmloff/source/text/txtprmap.cxx2
2 files changed, 19 insertions, 1 deletions
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 3ab5f8456801..fb1c459d304f 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -34,8 +34,10 @@
#include <xmloff/txtprmap.hxx>
#include <xmloff/xmlexp.hxx>
#include <xmloff/maptype.hxx>
+#include <xmloff/nmspmap.hxx>
#include "XMLSectionFootnoteConfigExport.hxx"
#include <xmlsdtypes.hxx>
+#include <XMLNumberWithAutoForVoidPropHdl.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -147,6 +149,22 @@ void XMLTextExportPropertySetMapper::handleSpecialItem(
switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
{
+ case CTF_PAGENUMBEROFFSET:
+ {
+ OUString value;
+ XMLNumberWithAutoForVoidPropHdl const handler;
+ handler.exportXML(value, rProperty.maValue, rUnitConverter);
+ if (GetExport().getSaneDefaultVersion() < SvtSaveOptions::ODFSVER_013
+ && value == "0") // tdf#91306 ODF 1.3 OFFICE-3923
+ {
+ value = "auto";
+ }
+ OUString const name = rNamespaceMap.GetQNameByKey(
+ getPropertySetMapper()->GetEntryNameSpace(rProperty.mnIndex),
+ getPropertySetMapper()->GetEntryXMLName(rProperty.mnIndex));
+ rAttrList.AddAttribute(name, value);
+ }
+ break;
case CTF_DROPCAPWHOLEWORD:
SAL_WARN_IF( !!bDropWholeWord, "xmloff", "drop whole word is set already!" );
pThis->bDropWholeWord = *o3tl::doAccess<bool>(rProperty.maValue);
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index 4f779c43cdc2..61f59505a9d7 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -363,7 +363,7 @@ XMLPropertyMapEntry const aXMLParaPropMap[] =
MP_E( "ParaIsAutoFirstLineIndent", STYLE, AUTO_TEXT_INDENT, XML_TYPE_BOOL, 0 ),
// RES_PAGEDESC
MP_E( "PageDescName", STYLE, MASTER_PAGE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STYLENAME, CTF_PAGEDESCNAME ),
- MP_E( "PageNumberOffset", STYLE, PAGE_NUMBER, XML_TYPE_NUMBER16_AUTO, 0 ),
+ MP_E( "PageNumberOffset", STYLE, PAGE_NUMBER, XML_TYPE_NUMBER16_AUTO|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_PAGENUMBEROFFSET ),
// RES_BREAK : TODO: does this work?
MP_E( "BreakType", FO, BREAK_BEFORE, XML_TYPE_TEXT_BREAKBEFORE|MID_FLAG_MULTI_PROPERTY, 0 ),
MP_E( "BreakType", FO, BREAK_AFTER, XML_TYPE_TEXT_BREAKAFTER, 0 ),