[Libreoffice-commits] core.git: 2 commits - cppu/source extensions/source filter/source idlc/inc include/codemaker include/toolkit include/xmloff scripting/source sfx2/source stoc/source ucbhelper/source ucb/source vcl/unx xmlhelp/source xmloff/source
Stephan Bergmann
sbergman at redhat.com
Thu Sep 18 04:13:39 PDT 2014
cppu/source/uno/lbenv.cxx | 14 +----
cppu/source/uno/lbmap.cxx | 9 ---
extensions/source/ole/ole2uno.hxx | 17 -------
filter/source/svg/svgfilter.hxx | 7 --
filter/source/svg/svgwriter.hxx | 11 ----
idlc/inc/idlc/idlctypes.hxx | 18 -------
idlc/inc/idlc/options.hxx | 3 -
include/codemaker/global.hxx | 16 ------
include/codemaker/options.hxx | 3 -
include/toolkit/controls/eventcontainer.hxx | 19 -------
include/xmloff/nmspmap.hxx | 10 ----
scripting/source/stringresource/stringresource.hxx | 22 ---------
sfx2/source/appl/newhelp.cxx | 19 -------
stoc/source/corereflection/base.hxx | 4 -
stoc/source/corereflection/lrucache.hxx | 41 +++++++---------
stoc/source/inspect/introspection.cxx | 22 ---------
stoc/source/namingservice/namingservice.cxx | 15 ------
stoc/source/servicemanager/servicemanager.cxx | 21 +-------
ucb/source/ucp/hierarchy/hierarchyprovider.hxx | 20 --------
ucb/source/ucp/package/pkgprovider.cxx | 20 --------
ucb/source/ucp/webdav-neon/ContentProperties.hxx | 19 -------
ucb/source/ucp/webdav/ContentProperties.hxx | 19 -------
ucbhelper/source/provider/providerhelper.cxx | 20 --------
vcl/unx/kde4/KDESalFrame.cxx | 10 ++--
xmlhelp/source/cxxhelp/provider/databases.hxx | 51 +++------------------
xmlhelp/source/cxxhelp/provider/db.hxx | 16 ------
xmloff/source/draw/ximpcustomshape.cxx | 2
27 files changed, 61 insertions(+), 387 deletions(-)
New commits:
commit 5aa24b83fca3a507f1c2dc03e3ec52f063029522
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 18 13:12:26 2014 +0200
Font -> vcl::Font in vcl/unx/kde4
Change-Id: Iaa0c71e6d4f2b142821a6546772a3364b5eb7e29
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 9306439..b67b3ed 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -85,7 +85,7 @@ static OUString readEntryUntranslated( KConfigGroup *pGroup, const char *pKey )
Mostly grabbed from the Gtk+ vclplug (salnativewidgets-gtk.cxx).
*/
-static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& rLocale )
+static vcl::Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& rLocale )
{
psp::FastPrintFontInfo aInfo;
QFontInfo qFontInfo( rQFont );
@@ -145,7 +145,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
nPointHeight = rQFont.pointSize();
// Create the font
- Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) );
+ vcl::Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) );
if( aInfo.m_eWeight != WEIGHT_DONTKNOW )
aFont.SetWeight( aInfo.m_eWeight );
if( aInfo.m_eWidth != WIDTH_DONTKNOW )
@@ -189,7 +189,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
pKey = "titleFont";
if ( aGroup.hasKey( pKey ) )
{
- Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), rSettings.GetUILanguageTag().getLocale() );
+ vcl::Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), rSettings.GetUILanguageTag().getLocale() );
style.SetTitleFont( aFont );
bSetTitleFont = true;
}
@@ -204,7 +204,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
pKey = "toolbarFont";
if ( aGroup.hasKey( pKey ) )
{
- Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), rSettings.GetUILanguageTag().getLocale() );
+ vcl::Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), rSettings.GetUILanguageTag().getLocale() );
style.SetToolFont( aFont );
}
}
@@ -260,7 +260,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetHelpTextColor( toColor( QToolTip::palette().color( QPalette::Active, QPalette::ToolTipText )));
// Font
- Font aFont = toFont( QApplication::font(), rSettings.GetUILanguageTag().getLocale() );
+ vcl::Font aFont = toFont( QApplication::font(), rSettings.GetUILanguageTag().getLocale() );
style.SetAppFont( aFont );
commit 32d6415617b5815bb5d18719f6d2df74becc0997
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date: Fri Sep 12 06:17:03 2014 +0000
fdo#83512 Make use of OUStringHash and OStringHash
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 96069a0..0d2bc0a 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -47,6 +47,7 @@
using ::rtl::OUString;
+using ::rtl::OUStringHash;
namespace
{
@@ -102,17 +103,9 @@ struct FctPtrHash :
};
-struct FctOUStringHash :
- public ::std::unary_function< const OUString &, ::std::size_t >
-{
- ::std::size_t operator () ( const OUString & rKey ) const
- { return rKey.hashCode(); }
-};
-
// mapping from environment name to environment
typedef ::boost::unordered_map<
- OUString, uno_Environment *, FctOUStringHash,
- ::std::equal_to< OUString > > OUString2EnvironmentMap;
+ OUString, uno_Environment *, OUStringHash > OUString2EnvironmentMap;
// mapping from ptr to object entry
typedef ::boost::unordered_map<
@@ -120,8 +113,7 @@ typedef ::boost::unordered_map<
::std::equal_to< void * > > Ptr2ObjectMap;
// mapping from oid to object entry
typedef ::boost::unordered_map<
- OUString, ObjectEntry *, FctOUStringHash,
- ::std::equal_to< OUString > > OId2ObjectMap;
+ OUString, ObjectEntry *, OUStringHash > OId2ObjectMap;
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 7c0d765..48185d2 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -50,6 +50,7 @@ using namespace com::sun::star::uno;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using ::rtl::OUStringToOString;
+using ::rtl::OUStringHash;
using ::rtl::OString;
namespace cppu
@@ -120,12 +121,6 @@ struct MappingEntry
{}
};
-struct FctOUStringHash : public std::unary_function< const OUString &, size_t >
-{
- size_t operator()( const OUString & rKey ) const
- { return (size_t)rKey.hashCode(); }
-};
-
struct FctPtrHash : public std::unary_function< uno_Mapping *, size_t >
{
size_t operator()( uno_Mapping * pKey ) const
@@ -133,7 +128,7 @@ struct FctPtrHash : public std::unary_function< uno_Mapping *, size_t >
};
typedef boost::unordered_map<
- OUString, MappingEntry *, FctOUStringHash, equal_to< OUString > > t_OUString2Entry;
+ OUString, MappingEntry *, OUStringHash > t_OUString2Entry;
typedef boost::unordered_map<
uno_Mapping *, MappingEntry *, FctPtrHash, equal_to< uno_Mapping * > > t_Mapping2Entry;
diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx
index b6d74d2..37302fc 100644
--- a/extensions/source/ole/ole2uno.hxx
+++ b/extensions/source/ole/ole2uno.hxx
@@ -70,23 +70,6 @@ const VARTYPE getVarType( const Any& val);
bool getType( BSTR name, Type & type);
void o2u_attachCurrentThread();
-struct equalOUString_Impl
-{
- bool operator()(const OUString & s1, const OUString & s2) const
- {
- return s1 == s2;
- }
-};
-
-struct hashOUString_Impl
-{
- size_t operator()(const OUString & rName) const
- {
- return rName.hashCode();
- }
-};
-
-
class BridgeRuntimeError
{
public:
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index e41a3dc..4288472 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -175,11 +175,6 @@ struct HashReferenceXInterface
}
};
-struct HashOUString
-{
- size_t operator()( const OUString& oustr ) const { return static_cast< size_t >( oustr.hashCode() ); }
-};
-
struct HashUChar
{
size_t operator()( const sal_Unicode uchar ) const { return static_cast< size_t >( uchar ); }
@@ -212,7 +207,7 @@ public:
typedef Sequence< Reference< XDrawPage > > XDrawPageSequence;
typedef ::boost::unordered_set< sal_Unicode, HashUChar > UCharSet;
- typedef ::boost::unordered_map< OUString, UCharSet, HashOUString > UCharSetMap;
+ typedef ::boost::unordered_map< OUString, UCharSet, OUStringHash > UCharSetMap;
typedef ::boost::unordered_map< Reference< XInterface >, UCharSetMap, HashReferenceXInterface > UCharSetMapMap;
typedef ::boost::unordered_map< Reference< XInterface >, OUString, HashReferenceXInterface > UOStringMap;
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 2451142..4190937 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -169,22 +169,13 @@ struct BulletListItemInfo
};
-// - OUStringHasher -
-
-
-struct OUStringHasher
-{
- size_t operator()( const OUString& oustr ) const { return static_cast< size_t >( oustr.hashCode() ); }
-};
-
-
// - SVGTextWriter -
class SVGTextWriter
{
public:
- typedef ::boost::unordered_map< OUString, BulletListItemInfo, OUStringHasher > BulletListItemInfoMap;
+ typedef ::boost::unordered_map< OUString, BulletListItemInfo, OUStringHash > BulletListItemInfoMap;
private:
SVGExport& mrExport;
diff --git a/idlc/inc/idlc/idlctypes.hxx b/idlc/inc/idlc/idlctypes.hxx
index 12c7349..7766f83 100644
--- a/idlc/inc/idlc/idlctypes.hxx
+++ b/idlc/inc/idlc/idlctypes.hxx
@@ -30,22 +30,6 @@
#include <sal/types.h>
#include <rtl/ustring.hxx>
-struct EqualString
-{
- bool operator()(const OString& str1, const OString& str2) const
- {
- return (str1 == str2);
- }
-};
-
-struct HashString
-{
- sal_Int32 operator()(const OString& str) const
- {
- return str.hashCode();
- }
-};
-
struct LessString
{
bool operator()(const OString& str1, const OString& str2) const
@@ -60,7 +44,7 @@ typedef ::std::set< OString, LessString > StringSet;
class AstDeclaration;
-typedef ::boost::unordered_map< OString, AstDeclaration*, HashString, EqualString > DeclMap;
+typedef ::boost::unordered_map< OString, AstDeclaration*, OStringHash > DeclMap;
typedef ::std::list< AstDeclaration* > DeclList;
class AstScope;
diff --git a/idlc/inc/idlc/options.hxx b/idlc/inc/idlc/options.hxx
index 887f053..08d839e 100644
--- a/idlc/inc/idlc/options.hxx
+++ b/idlc/inc/idlc/options.hxx
@@ -24,8 +24,7 @@
typedef ::boost::unordered_map< OString,
OString,
- HashString,
- EqualString > OptionMap;
+ OStringHash > OptionMap;
class IllegalArgument
{
diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx
index 6ee033c..b5aabff 100644
--- a/include/codemaker/global.hxx
+++ b/include/codemaker/global.hxx
@@ -30,22 +30,6 @@
#include <rtl/ustring.hxx>
#include <rtl/strbuf.hxx>
-struct EqualString
-{
- bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const
- {
- return (str1 == str2);
- }
-};
-
-struct HashString
-{
- size_t operator()(const ::rtl::OString& str) const
- {
- return str.hashCode();
- }
-};
-
struct LessString
{
bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const
diff --git a/include/codemaker/options.hxx b/include/codemaker/options.hxx
index 0c71b75..d322a74 100644
--- a/include/codemaker/options.hxx
+++ b/include/codemaker/options.hxx
@@ -28,8 +28,7 @@ typedef ::boost::unordered_map
<
::rtl::OString,
::rtl::OString,
- HashString,
- EqualString
+ OStringHash
> OptionMap;
class IllegalArgument
diff --git a/include/toolkit/controls/eventcontainer.hxx b/include/toolkit/controls/eventcontainer.hxx
index 2744c1d..9ba2391 100644
--- a/include/toolkit/controls/eventcontainer.hxx
+++ b/include/toolkit/controls/eventcontainer.hxx
@@ -36,28 +36,11 @@ namespace toolkit
{
// Hashtable to optimize
-struct hashName_Impl
-{
- size_t operator()(const OUString& Str) const
- {
- return (size_t)Str.hashCode();
- }
-};
-
-struct eqName_Impl
-{
- bool operator()(const OUString& Str1, const OUString& Str2) const
- {
- return ( Str1 == Str2 );
- }
-};
-
typedef boost::unordered_map
<
OUString,
sal_Int32,
- hashName_Impl,
- eqName_Impl
+ OUStringHash
>
NameContainerNameMap;
diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx
index 08340cf..70913f8 100644
--- a/include/xmloff/nmspmap.hxx
+++ b/include/xmloff/nmspmap.hxx
@@ -50,14 +50,6 @@ public:
sal_uInt16 nKey;
};
-struct OUStringEqFunc
-{
- bool operator()( const OUString &r1, const OUString &r2) const
- {
- return r1 == r2;
- }
-};
-
struct uInt32lt
{
bool operator()( const sal_uInt32 &r1, const sal_uInt32 &r2) const
@@ -76,7 +68,7 @@ struct QNamePairHash
};
typedef ::boost::unordered_map < QNamePair, OUString, QNamePairHash > QNameCache;
-typedef ::boost::unordered_map < OUString, ::rtl::Reference <NameSpaceEntry >, OUStringHash, OUStringEqFunc > NameSpaceHash;
+typedef ::boost::unordered_map < OUString, ::rtl::Reference <NameSpaceEntry >, OUStringHash > NameSpaceHash;
typedef ::std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry >, uInt32lt > NameSpaceMap;
class XMLOFF_DLLPUBLIC SvXMLNamespaceMap
diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx
index 5be7acd..adb4710 100644
--- a/scripting/source/stringresource/stringresource.hxx
+++ b/scripting/source/stringresource/stringresource.hxx
@@ -53,28 +53,11 @@ namespace stringresource
// Hashtable to map string ids to string
-struct hashName_Impl
-{
- size_t operator()(const OUString& Str) const
- {
- return (size_t)Str.hashCode();
- }
-};
-
-struct eqName_Impl
-{
- bool operator()(const OUString& Str1, const OUString& Str2) const
- {
- return ( Str1 == Str2 );
- }
-};
-
typedef boost::unordered_map
<
OUString,
OUString,
- hashName_Impl,
- eqName_Impl
+ OUStringHash
>
IdToStringMap;
@@ -82,8 +65,7 @@ typedef boost::unordered_map
<
OUString,
sal_Int32,
- hashName_Impl,
- eqName_Impl
+ OUStringHash
>
IdToIndexMap;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 188ef59..8210a3a 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -553,24 +553,7 @@ IndexTabPage_Impl::~IndexTabPage_Impl()
namespace sfx2 {
- struct equalOUString
- {
- bool operator()( const OUString& rKey1, const OUString& rKey2 ) const
- {
- return !!( rKey1 == rKey2 );
- }
- };
-
-
- struct hashOUString
- {
- size_t operator()( const OUString& rName ) const
- {
- return rName.hashCode();
- }
- };
-
- typedef ::boost::unordered_map< OUString, int, hashOUString, equalOUString > KeywordInfo;
+ typedef ::boost::unordered_map< OUString, int, OUStringHash > KeywordInfo;
}
#define NEW_ENTRY( url, bool ) \
diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx
index 909b182..f49eb74 100644
--- a/stoc/source/corereflection/base.hxx
+++ b/stoc/source/corereflection/base.hxx
@@ -78,9 +78,9 @@ inline typelib_TypeDescription * getTypeByName( const OUString & rName )
}
typedef boost::unordered_map< OUString, css::uno::WeakReference< css::reflection::XIdlField >,
- FctHashOUString, std::equal_to< OUString > > OUString2Field;
+ OUStringHash > OUString2Field;
typedef boost::unordered_map< OUString, css::uno::WeakReference< css::reflection::XIdlMethod >,
- FctHashOUString, std::equal_to< OUString > > OUString2Method;
+ OUStringHash > OUString2Method;
class IdlReflectionServiceImpl
diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx
index 740991d..67f351b 100644
--- a/stoc/source/corereflection/lrucache.hxx
+++ b/stoc/source/corereflection/lrucache.hxx
@@ -32,7 +32,7 @@
<br>
@author Daniel Boelzle
*/
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
+template< class t_Key, class t_Val, class t_KeyHash >
class LRU_Cache
{
struct CacheEntry
@@ -42,7 +42,7 @@ class LRU_Cache
CacheEntry * pPred;
CacheEntry * pSucc;
};
- typedef ::boost::unordered_map< t_Key, CacheEntry *, t_KeyHash, t_KeyEqual > t_Key2Element;
+ typedef ::boost::unordered_map< t_Key, CacheEntry *, t_KeyHash > t_Key2Element;
mutable ::osl::Mutex _aCacheMutex;
sal_Int32 _nCachedElements;
@@ -89,8 +89,8 @@ public:
inline void clear();
};
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::LRU_Cache( sal_Int32 nCachedElements )
+template< class t_Key, class t_Val, class t_KeyHash >
+inline LRU_Cache< t_Key, t_Val, t_KeyHash >::LRU_Cache( sal_Int32 nCachedElements )
#ifdef __CACHE_DIAGNOSE
: _nCachedElements( 4 )
#else
@@ -113,14 +113,14 @@ inline LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::LRU_Cache( sal_Int32 nC
}
}
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::~LRU_Cache()
+template< class t_Key, class t_Val, class t_KeyHash >
+inline LRU_Cache< t_Key, t_Val, t_KeyHash >::~LRU_Cache()
{
delete [] _pBlock;
}
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::toFront( CacheEntry * pEntry ) const
+template< class t_Key, class t_Val, class t_KeyHash >
+inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::toFront( CacheEntry * pEntry ) const
{
if (pEntry != _pHead)
{
@@ -141,16 +141,16 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::toFront( CacheEntr
}
}
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline bool LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::hasValue( const t_Key & rKey ) const
+template< class t_Key, class t_Val, class t_KeyHash >
+inline bool LRU_Cache< t_Key, t_Val, t_KeyHash >::hasValue( const t_Key & rKey ) const
{
::osl::MutexGuard aGuard( _aCacheMutex );
const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) );
return (iFind != _aKey2Element.end());
}
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( const t_Key & rKey ) const
+template< class t_Key, class t_Val, class t_KeyHash >
+inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash >::getValue( const t_Key & rKey ) const
{
::osl::MutexGuard aGuard( _aCacheMutex );
const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) );
@@ -168,8 +168,8 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( const t
return t_Val();
}
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
+template< class t_Key, class t_Val, class t_KeyHash >
+inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::setValue(
const t_Key & rKey, const t_Val & rValue )
{
::osl::MutexGuard aGuard( _aCacheMutex );
@@ -206,8 +206,8 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue(
}
}
-template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual >
-inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear()
+template< class t_Key, class t_Val, class t_KeyHash >
+inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::clear()
{
::osl::MutexGuard aGuard( _aCacheMutex );
_aKey2Element.clear();
@@ -223,16 +223,9 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear()
}
-struct FctHashOUString : public ::std::unary_function< const OUString &, size_t >
-{
- size_t operator()( const OUString & rKey ) const
- { return rKey.hashCode(); }
-};
-
/** Template instance for OUString keys, Any values.<br>
*/
-typedef LRU_Cache< OUString, css::uno::Any,
- FctHashOUString, ::std::equal_to< OUString > >
+typedef LRU_Cache< OUString, css::uno::Any, OUStringHash >
LRU_CacheAnyByOUString;
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 482cb3f..2051b08 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -136,28 +136,11 @@ bool isDerivedFrom( Reference<XIdlClass> xToTestClass, Reference<XIdlClass> xDer
// part of the new Instance-related ImplIntrospectionAccess
// Hashtable for the search of names
-struct hashName_Impl
-{
- size_t operator()(const OUString& Str) const
- {
- return (size_t)Str.hashCode();
- }
-};
-
-struct eqName_Impl
-{
- bool operator()(const OUString& Str1, const OUString& Str2) const
- {
- return ( Str1 == Str2 );
- }
-};
-
typedef boost::unordered_map
<
OUString,
sal_Int32,
- hashName_Impl,
- eqName_Impl
+ OUStringHash
>
IntrospectionNameMap;
@@ -168,8 +151,7 @@ typedef boost::unordered_map
<
OUString,
OUString,
- hashName_Impl,
- eqName_Impl
+ OUStringHash
>
LowerToExactNameMap;
diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx
index 171ee9b..b0b016a 100644
--- a/stoc/source/namingservice/namingservice.cxx
+++ b/stoc/source/namingservice/namingservice.cxx
@@ -61,24 +61,11 @@ static OUString ns_getImplementationName()
return OUString(IMPLNAME);
}
-struct equalOWString_Impl
-{
- bool operator()(const OUString & s1, const OUString & s2) const
- { return s1 == s2; }
-};
-
-struct hashOWString_Impl
-{
- size_t operator()(const OUString & rName) const
- { return rName.hashCode(); }
-};
-
typedef boost::unordered_map
<
OUString,
Reference<XInterface >,
- hashOWString_Impl,
- equalOWString_Impl
+ OUStringHash
> HashMap_OWString_Interface;
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index d338fa4..45d64e1 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -290,39 +290,24 @@ Any ImplementationEnumeration_Impl::nextElement()
/*****************************************************************************
Hash tables
*****************************************************************************/
-struct equalOWString_Impl
-{
- bool operator()(const OUString & s1, const OUString & s2) const
- { return s1 == s2; }
-};
-
-struct hashOWString_Impl
-{
- size_t operator()(const OUString & rName) const
- { return rName.hashCode(); }
-};
-
typedef boost::unordered_set
<
OUString,
- hashOWString_Impl,
- equalOWString_Impl
+ OUStringHash
> HashSet_OWString;
typedef boost::unordered_multimap
<
OUString,
Reference<XInterface >,
- hashOWString_Impl,
- equalOWString_Impl
+ OUStringHash
> HashMultimap_OWString_Interface;
typedef boost::unordered_map
<
OUString,
Reference<XInterface >,
- hashOWString_Impl,
- equalOWString_Impl
+ OUStringHash
> HashMap_OWString_Interface;
/*****************************************************************************
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx
index 4f176f8..7910309 100644
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx
@@ -63,29 +63,11 @@ struct ConfigProviderMapEntry
ConfigProviderMapEntry() : bTriedToGetRootReadAccess( false ) {}
};
-struct equalString
-{
- bool operator()(
- const OUString& rKey1, const OUString& rKey2 ) const
- {
- return !!( rKey1 == rKey2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
typedef boost::unordered_map
<
OUString, // servcie specifier
ConfigProviderMapEntry,
- hashString,
- equalString
+ OUStringHash
>
ConfigProviderMap;
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index 42ee7e7..cf3c354 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -91,29 +91,11 @@ public:
-struct equalString
-{
- bool operator()(
- const OUString& rKey1, const OUString& rKey2 ) const
- {
- return !!( rKey1 == rKey2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
typedef boost::unordered_map
<
OUString,
Package*,
- hashString,
- equalString
+ OUStringHash
>
PackageMap;
diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.hxx b/ucb/source/ucp/webdav-neon/ContentProperties.hxx
index 73c228c..07fecee 100644
--- a/ucb/source/ucp/webdav-neon/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav-neon/ContentProperties.hxx
@@ -48,22 +48,6 @@ struct DAVResource;
-struct equalString
-{
- bool operator()( const OUString& s1, const OUString& s2 ) const
- {
- return !!( s1 == s2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
// PropertyValueMap.
@@ -94,8 +78,7 @@ typedef boost::unordered_map
<
OUString,
PropertyValue,
- hashString,
- equalString
+ OUStringHash
>
PropertyValueMap;
diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx
index 0fa7304..64e227f 100644
--- a/ucb/source/ucp/webdav/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav/ContentProperties.hxx
@@ -41,22 +41,6 @@ struct DAVResource;
-struct equalString
-{
- bool operator()( const OUString& s1, const OUString& s2 ) const
- {
- return !!( s1 == s2 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
// PropertyValueMap.
@@ -87,8 +71,7 @@ typedef boost::unordered_map
<
OUString,
PropertyValue,
- hashString,
- equalString
+ OUStringHash
>
PropertyValueMap;
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index 21dcd08..c7fa7ca 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -38,29 +38,11 @@ using namespace com::sun::star;
namespace ucbhelper_impl
{
-struct equalString
-{
- bool operator()(
- const OUString& rKey11, const OUString& rKey22 ) const
- {
- return !!( rKey11 == rKey22 );
- }
-};
-
-struct hashString
-{
- size_t operator()( const OUString & rName ) const
- {
- return rName.hashCode();
- }
-};
-
typedef boost::unordered_map
<
OUString,
uno::WeakReference< ucb::XContent >,
- hashString,
- equalString
+ OUStringHash
>
Contents;
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 366a914..3e798cf 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -142,22 +142,6 @@ namespace chelp {
{
public:
- struct eq
- {
- bool operator()( const OUString& rKey1, const OUString& rKey2 ) const
- {
- return (rKey1 == rKey2);
- }
- };
-
- struct ha
- {
- size_t operator()( const OUString& rName ) const
- {
- return rName.hashCode();
- }
- };
-
/**
* Input is the installdirectory in system dependent notation
*/
@@ -295,55 +279,37 @@ namespace chelp {
std::vector< OUString > m_avModules;
- typedef boost::unordered_map< OUString,helpdatafileproxy::Hdf*,ha,eq > DatabasesTable;
+ typedef boost::unordered_map< OUString,helpdatafileproxy::Hdf*,OUStringHash > DatabasesTable;
DatabasesTable m_aDatabases; // Language and module dependent databases
- typedef boost::unordered_map< OUString,OUString,ha,eq > LangSetTable;
+ typedef boost::unordered_map< OUString,OUString,OUStringHash > LangSetTable;
LangSetTable m_aLangSet; // Mapping to of lang-country to lang
- typedef boost::unordered_map< OUString,StaticModuleInformation*,ha,eq > ModInfoTable;
+ typedef boost::unordered_map< OUString,StaticModuleInformation*,OUStringHash > ModInfoTable;
ModInfoTable m_aModInfo; // Module information
- typedef boost::unordered_map< OUString,KeywordInfo*,ha,eq > KeywordInfoTable;
+ typedef boost::unordered_map< OUString,KeywordInfo*,OUStringHash > KeywordInfoTable;
KeywordInfoTable m_aKeywordInfo; // Module information
typedef
boost::unordered_map<
OUString,
::com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >,
- ha,
- eq > ZipFileTable;
+ OUStringHash > ZipFileTable;
ZipFileTable m_aZipFileTable; // No closing of an once opened jarfile
typedef
boost::unordered_map<
OUString,
::com::sun::star::uno::Reference< com::sun::star::i18n::XCollator >,
- ha,
- eq > CollatorTable;
+ OUStringHash > CollatorTable;
CollatorTable m_aCollatorTable;
- struct ostring_eq
- {
- bool operator()( const OString& rKey1, const OString& rKey2 ) const
- {
- return (rKey1 == rKey2);
- }
- };
-
- struct ostring_ha
- {
- size_t operator()( const OString& rName ) const
- {
- return rName.hashCode();
- }
- };
typedef
boost::unordered_set<
OString,
- ostring_ha,
- ostring_eq > EmptyActiveTextSet;
+ OStringHash > EmptyActiveTextSet;
EmptyActiveTextSet m_aEmptyActiveTextSet;
// methods
@@ -367,8 +333,7 @@ namespace chelp {
<
OUString,
bool,
- Databases::ha,
- Databases::eq
+ OUStringHash
>
ExtensionHelpExistanceMap;
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 5d5823c..5b363cf 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -62,20 +62,8 @@ namespace helpdatafileproxy {
{ return m_pBuffer; }
};
- struct eq
- {
- bool operator()( const OString& rKey1, const OString& rKey2 ) const
- { return (rKey1 == rKey2); }
- };
-
- struct ha
- {
- size_t operator()( const OString& rName ) const
- { return rName.hashCode(); }
- };
-
- typedef boost::unordered_map< OString,std::pair<int,int>,ha,eq > StringToValPosMap;
- typedef boost::unordered_map< OString,OString,ha,eq > StringToDataMap;
+ typedef boost::unordered_map< OString,std::pair<int,int>,OStringHash > StringToValPosMap;
+ typedef boost::unordered_map< OString,OString,OStringHash > StringToDataMap;
class Hdf : hdf_internal::Noncopyable
{
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index c3938c0..b6b0db9 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -1254,7 +1254,7 @@ void SdXMLCustomShapePropertyMerge( std::vector< com::sun::star::beans::Property
}
}
-typedef boost::unordered_map< OUString, sal_Int32, OUStringHash, OUStringEqFunc> EquationHashMap;
+typedef boost::unordered_map< OUString, sal_Int32, OUStringHash > EquationHashMap;
/* if rPara.Type is from type EnhancedCustomShapeParameterType::EQUATION, the name of the equation
will be converted from OUString to index */
More information about the Libreoffice-commits
mailing list