diff options
author | Herbert Dürr <hdu@apache.org> | 2013-05-08 15:17:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-10 12:36:33 +0100 |
commit | 1857688e1f4ba982d147a9cac69fad948361d1c0 (patch) | |
tree | e3a78ed3e6341ed5f968e4fb3b63b135b4933ccc /oox | |
parent | 54a1feb9b9bd654774b9aa60cda7ef9a1cd11064 (diff) |
Resolves: #i122208# introduce rtl::CStringHash and rtl::CStringEqual
unify the various c-string compares and hashes.
(cherry picked from commit b7e3470a154538a92f0a21b14e726d75723f4a92)
Conflicts:
oox/inc/oox/export/shapes.hxx
oox/source/export/shapes.cxx
sal/inc/rtl/string.hxx
sdext/source/minimizer/pppoptimizertoken.cxx
svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
vcl/source/glyphs/gcach_ftyp.cxx
writerfilter/source/resourcemodel/TagLogger.cxx
xmloff/source/draw/EnhancedCustomShapeToken.cxx
Change-Id: Ib742744077bfb4d38a462d88b44bdef45601b4ae
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/shapes.cxx | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index dab14ce6ad16..2f918c2460fc 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -509,23 +509,7 @@ static const CustomShapeTypeTranslationTable pCustomShapeTypeTranslationTable[] { "ooxml-ribbon", "ribbon" }, }; -struct StringHash -{ - size_t operator()( const char* s ) const - { - return rtl_str_hashCode(s); - } -}; - -struct StringCheck -{ - bool operator()( const char* s1, const char* s2 ) const - { - return strcmp( s1, s2 ) == 0; - } -}; - -typedef boost::unordered_map< const char*, const char*, StringHash, StringCheck> CustomShapeTypeTranslationHashMap; +typedef boost::unordered_map< const char*, const char*, rtl::CStringHash, rtl::CStringEqual> CustomShapeTypeTranslationHashMap; static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = NULL; static const char* lcl_GetPresetGeometry( const char* sShapeType ) @@ -1109,7 +1093,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape ) } typedef ShapeExport& (ShapeExport::*ShapeConverter)( Reference< XShape > ); -typedef boost::unordered_map< const char*, ShapeConverter, StringHash, StringCheck> NameToConvertMapType; +typedef boost::unordered_map< const char*, ShapeConverter, rtl::CStringHash, rtl::CStringEqual> NameToConvertMapType; static const NameToConvertMapType& lcl_GetConverters() { |