diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlbahdl.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index 0a797e5e471f..9d94f6a0e48c 100644 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -889,10 +889,11 @@ bool XMLNumberWithAutoInsteadZeroPropHdl::exportXML( OUString& rStrExpValue, con { sal_Int32 nValue = 0; - lcl_xmloff_getAny( rValue, nValue, 2 ); + bool bRet = lcl_xmloff_getAny( rValue, nValue, 2 ); + bRet &= nValue != 0; // FIXME: 0 is not a valid value - write "auto" instead - if (0 == nValue || !rValue.hasValue()) + if (!bRet) rStrExpValue = GetXMLToken( XML_AUTO ); else { |