diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-23 13:29:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 08:06:10 +0200 |
commit | 0e6a2601b39cbadaff7f7506ba9e804f108060db (patch) | |
tree | ffd6bb4970f689d20087b721eb8dfd4bc86cd53f /framework | |
parent | 457b349edbaf6d9dc747f3a631fee70e0c035bae (diff) |
Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds.
Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/xml/imagesdocumenthandler.cxx | 11 |
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; |