summaryrefslogtreecommitdiff
path: root/framework/source/xml/imagesdocumenthandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/xml/imagesdocumenthandler.cxx')
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 2280126b22ee..ec14d8f109ec 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -227,15 +227,12 @@ throw( SAXException, RuntimeException )
{
OUString aColor = xAttribs->getValueByIndex( n );
- if ( !aColor.isEmpty() )
+ if ( aColor.startsWith("#") )
{
- if ( aColor.getStr()[0] == '#' )
- {
- // the color value is given as #rrggbb and used the hexadecimal system!!
- sal_uInt32 nColor = aColor.copy( 1 ).toUInt32( 16 );
+ // the color value is given as #rrggbb and used the hexadecimal system!!
+ sal_uInt32 nColor = aColor.copy( 1 ).toUInt32( 16 );
- m_pImages->aMaskColor = Color( COLORDATA_RGB( nColor ) );
- }
+ m_pImages->aMaskColor = Color( COLORDATA_RGB( nColor ) );
}
}
break;