diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 09:35:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 14:17:14 +0200 |
commit | b70fa47aec65fe95da94fc17640dda27650e9677 (patch) | |
tree | 7e54f37342fd57c324f43d54659335554a9c8e72 /xmloff/source/draw/EnhancedCustomShapeToken.cxx | |
parent | 6db84250d1c4e7ec5a54ff75e124ea9a84ff89d9 (diff) |
use more SAL_N_ELEMENTS part 1
- teach comphelper::containerToSequence to handle sized arrays
- also use range based for-loop where appropriate.
Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99
Reviewed-on: https://gerrit.libreoffice.org/38769
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw/EnhancedCustomShapeToken.cxx')
-rw-r--r-- | xmloff/source/draw/EnhancedCustomShapeToken.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx index 076ae2728fbd..cf644e34e7f6 100644 --- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx +++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx @@ -141,7 +141,7 @@ static const TokenTable pTokenTableArray[] = { "Origin", EAS_Origin }, { "Color", EAS_Color }, { "Switched", EAS_Switched }, - { "Polar", EAS_Polar }, + { "Polar", EAS_Polar }, { "RangeXMinimum", EAS_RangeXMinimum }, { "RangeXMaximum", EAS_RangeXMaximum }, { "RangeYMinimum", EAS_RangeYMinimum }, @@ -175,10 +175,8 @@ EnhancedCustomShapeTokenEnum EASGet( const OUString& rShapeType ) if ( !pHashMap ) { TypeNameHashMap* pH = new TypeNameHashMap; - const TokenTable* pPtr = pTokenTableArray; - const TokenTable* pEnd = pPtr + ( sizeof( pTokenTableArray ) / sizeof( TokenTable ) ); - for ( ; pPtr < pEnd; pPtr++ ) - (*pH)[ pPtr->pS ] = pPtr->pE; + for (auto const & pair : pTokenTableArray) + (*pH)[pair.pS] = pair.pE; pHashMap = pH; } } |