diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlbahdl.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/style/xmlbahdl.hxx | 4 |
2 files changed, 5 insertions, 4 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 { diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx index 58c6dc18691b..8b57ccbddc77 100644 --- a/xmloff/source/style/xmlbahdl.hxx +++ b/xmloff/source/style/xmlbahdl.hxx @@ -306,8 +306,8 @@ public: /** PropertyHandler for the XML-data-type: XML_TYPE_NUMBER16_AUTO - Reads/writes numeric properties with special handling for the value zero - (i.e., a value 0 property will be written as "auto") + Reads/writes numeric properties with special handling for "void" value + (i.e., void property will be written as "auto") */ class XMLNumberWithAutoInsteadZeroPropHdl : public XMLNumberWithoutZeroPropHdl { |