diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 10:01:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 13:00:44 +0100 |
commit | 9031a01deaa2bc29dfc30ce7ae76e3852ace5808 (patch) | |
tree | 224663fca166290ca6523620b9533ad8da44a7eb /reportdesign | |
parent | 9ce9e22f664b5db0e6c21ee50ba6467bc369dd0b (diff) |
coverity#1371120 Unchecked return value
Change-Id: I0d515f405ddea289a9610e960c050b28bb842a2f
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlImage.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx index 7133cd9f6a6b..0ab2c3acfd00 100644 --- a/reportdesign/source/filter/xml/xmlImage.cxx +++ b/reportdesign/source/filter/xml/xmlImage.cxx @@ -65,31 +65,31 @@ OXMLImage::OXMLImage( ORptFilter& rImport, switch( rTokenMap.Get( nPrefix, sLocalName ) ) { case XML_TOK_IMAGE_DATA: - { + { SvtPathOptions aPathOptions; sValue = aPathOptions.SubstituteVariable(sValue); _xComponent->setImageURL(rImport.GetAbsoluteReference( sValue )); - } - break; + } case XML_TOK_PRESERVE_IRI: _xComponent->setPreserveIRI(s_sTRUE == sValue); break; case XML_TOK_SCALE: + { + sal_uInt16 nRet = awt::ImageScaleMode::NONE; + if ( s_sTRUE == sValue ) + { + nRet = awt::ImageScaleMode::ANISOTROPIC; + } + else { - sal_uInt16 nRet = awt::ImageScaleMode::NONE; - if ( s_sTRUE == sValue ) - { - nRet = awt::ImageScaleMode::ANISOTROPIC; - } - else - { - const SvXMLEnumMapEntry* aXML_EnumMap = OXMLHelper::GetImageScaleOptions(); - SvXMLUnitConverter::convertEnum( nRet, sValue, aXML_EnumMap ); - } - _xComponent->setScaleMode( nRet ); + const SvXMLEnumMapEntry* aXML_EnumMap = OXMLHelper::GetImageScaleOptions(); + bool bConvertOk = SvXMLUnitConverter::convertEnum( nRet, sValue, aXML_EnumMap ); + SAL_WARN_IF(!bConvertOk, "reportdesign", "convertEnum failed"); } + _xComponent->setScaleMode( nRet ); break; + } case XML_TOK_DATA_FORMULA: _xComponent->setDataField(ORptFilter::convertFormula(sValue)); break; |