diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 11:02:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 11:13:52 +0000 |
commit | 27a8609b2086d232c4d1ff8b92996d638b30cac1 (patch) | |
tree | 49b731957e75b7f68000cff51396144a68394554 /xmloff | |
parent | a16846dada2dc14fdafe2ddb7535929a0fd97ab9 (diff) |
coverity#704114 Unchecked return value
Change-Id: I9f92b4536557d8f6f482d6ce7646125035db3f1d
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 { |