[Libreoffice-commits] .: xmloff/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Feb 11 04:31:53 PST 2011
xmloff/source/draw/EnhancedCustomShapeToken.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 6b3f458f6bf4886bcd1ebd6ede5c75617702e910
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Feb 11 12:30:55 2011 +0000
(std|boost)::hash on a const char* hashes the pointer not the contents
This makes fontwork reappear again
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
index 42b3cec..fc9dacf 100644
--- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx
+++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
@@ -35,6 +35,13 @@
namespace xmloff { namespace EnhancedCustomShapeToken {
+struct THash
+{
+ size_t operator()( const char* s ) const
+ {
+ return rtl_str_hashCode(s);
+ }
+};
struct TCheck
{
bool operator()( const char* s1, const char* s2 ) const
@@ -42,7 +49,7 @@ struct TCheck
return strcmp( s1, s2 ) == 0;
}
};
-typedef boost::unordered_map< const char*, EnhancedCustomShapeTokenEnum, boost::hash<const char*>, TCheck> TypeNameHashMap;
+typedef boost::unordered_map< const char*, EnhancedCustomShapeTokenEnum, THash, TCheck> TypeNameHashMap;
static TypeNameHashMap* pHashMap = NULL;
static ::osl::Mutex& getHashMapMutex()
{
More information about the Libreoffice-commits
mailing list