diff options
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLPropertySet.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index f413ced61d41..1d1724c9c451 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -575,23 +575,23 @@ string OOXMLHexValue::toString() const OOXMLHexColorValue::OOXMLHexColorValue(const char * pValue) : OOXMLHexValue(sal_uInt32(COL_AUTO)) { - if (strcmp(pValue, "auto")) - { - mnValue = rtl_str_toUInt32(pValue, 16); + if (!strcmp(pValue, "auto")) + return; + + mnValue = rtl_str_toUInt32(pValue, 16); - // Convert hash-encoded values (like #FF0080) - const sal_Int32 nLen = strlen(pValue); - if ( !mnValue && nLen > 1 && pValue[0] == '#' ) + // Convert hash-encoded values (like #FF0080) + const sal_Int32 nLen = strlen(pValue); + if ( !mnValue && nLen > 1 && pValue[0] == '#' ) + { + sal_Int32 nColor(COL_AUTO); + // Word appears to require strict 6 digit length, else it ignores it + if ( nLen == 7 ) { - sal_Int32 nColor(COL_AUTO); - // Word appears to require strict 6 digit length, else it ignores it - if ( nLen == 7 ) - { - const OUString sHashColor(pValue, nLen, RTL_TEXTENCODING_ASCII_US); - sax::Converter::convertColor( nColor, sHashColor ); - } - mnValue = nColor; + const OUString sHashColor(pValue, nLen, RTL_TEXTENCODING_ASCII_US); + sax::Converter::convertColor( nColor, sHashColor ); } + mnValue = nColor; } } |