diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-16 02:55:53 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-16 02:55:53 +0200 |
commit | 915303a7903bac1e9a940370e69651dd48d08a01 (patch) | |
tree | bc92cb64621040bc9ecb83d711032eecf995dc3b /oox | |
parent | 5e239836009390a5f2b4ee4d6dfd42b6032f7cc4 (diff) |
fix werror problem around sal_uInt32 vs sal_Int32
Change-Id: Ifab0f5ad300882b1a014f6420094e5db503105e3
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/helper/attributelist.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index 3360c203c830..da8e2b3f1b32 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -105,6 +105,11 @@ sal_Int32 AttributeConversion::decodeIntegerHex( const OUString& rValue ) // cast, but that will have a ripple effect } +sal_uInt32 AttributeConversion::decodeUnsignedHex( const OUString& rValue ) +{ + return rValue.toUInt32( 16 ); +} + AttributeList::AttributeList( const Reference< XFastAttributeList >& rxAttribs ) : mxAttribs( rxAttribs ), mpAttribList( NULL ) @@ -186,6 +191,13 @@ OptValue< sal_Int32 > AttributeList::getIntegerHex( sal_Int32 nAttrToken ) const return OptValue< sal_Int32 >( bValid, bValid ? AttributeConversion::decodeIntegerHex( aValue ) : 0 ); } +OptValue< sal_uInt32 > AttributeList::getUnsignedHex( sal_Int32 nAttrToken ) const +{ + OUString aValue = mxAttribs->getOptionalValue( nAttrToken ); + bool bValid = !aValue.isEmpty(); + return OptValue< sal_uInt32 >( bValid, bValid ? AttributeConversion::decodeUnsignedHex( aValue ) : 0 ); +} + OptValue< bool > AttributeList::getBool( sal_Int32 nAttrToken ) const { const char *pAttr; @@ -296,6 +308,11 @@ sal_Int32 AttributeList::getIntegerHex( sal_Int32 nAttrToken, sal_Int32 nDefault return getIntegerHex( nAttrToken ).get( nDefault ); } +sal_uInt32 AttributeList::getUnsignedHex( sal_Int32 nAttrToken, sal_uInt32 nDefault ) const +{ + return getIntegerHex( nAttrToken ).get( nDefault ); +} + bool AttributeList::getBool( sal_Int32 nAttrToken, bool bDefault ) const { return getBool( nAttrToken ).get( bDefault ); |