summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlbahdl.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-12-17 23:44:38 +0100
committerMichael Stahl <mstahl@redhat.com>2013-12-18 00:12:09 +0100
commit22355042a6fc7aecf3caab69b3fa3be1430b697f (patch)
treede4b9c61c1e1997bd11d6e73cf7eb8704ec5bb6f /xmloff/source/style/xmlbahdl.cxx
parent975f62aeaa0c88cca1b7926ff34df1d7afb577c4 (diff)
fdo#72452: ODF import/export: fix handling of style:page-number
Class XMLNumberWithAutoInsteadZeroPropHdl (which appears to be used only for this attribute) needs to be adapted to the change that "PageNumberOffset" value 0 is no longer invalid; use "void" value for invalid instead, which appears more appropriate anyway. Unfortunately the type of style:page-number is positiveInteger so writing 0 would be invalid; write "auto" instead for now. Change-Id: I9621ea201fd928087b863c562607c3d77a3b0269
Diffstat (limited to 'xmloff/source/style/xmlbahdl.cxx')
-rw-r--r--xmloff/source/style/xmlbahdl.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index 3397e47e28ef..0a797e5e471f 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -879,7 +879,7 @@ bool XMLNumberWithAutoInsteadZeroPropHdl::importXML(
lcl_xmloff_setAny( rValue, nValue, 2 );
else if( rStrImpValue == GetXMLToken( XML_AUTO ) )
{
- rValue <<= (sal_Int16)nValue;
+ rValue.clear(); // void
bRet = true;
}
return bRet;
@@ -891,7 +891,8 @@ bool XMLNumberWithAutoInsteadZeroPropHdl::exportXML( OUString& rStrExpValue, con
sal_Int32 nValue = 0;
lcl_xmloff_getAny( rValue, nValue, 2 );
- if( 0 == nValue )
+ // FIXME: 0 is not a valid value - write "auto" instead
+ if (0 == nValue || !rValue.hasValue())
rStrExpValue = GetXMLToken( XML_AUTO );
else
{