summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-19 17:18:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-23 08:15:35 +0200
commit87a9979c8938b800aab6e35903d60d24892e7f2e (patch)
tree6beb01f22537e63df24c023ab65d391a7bee0cf6 /sw
parentd76c4e5c9aaf8bd27ec97679bcaeba5b18aca493 (diff)
overload std::hash for OUString and OString
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/SwStyleNameMapper.hxx2
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/inc/docstyle.hxx2
-rw-r--r--sw/inc/numrule.hxx4
-rw-r--r--sw/source/core/access/accpara.hxx3
-rw-r--r--sw/source/core/doc/DocumentListsManager.cxx6
-rw-r--r--sw/source/core/doc/number.cxx2
-rw-r--r--sw/source/core/doc/swstylemanager.cxx3
-rw-r--r--sw/source/core/inc/DocumentListsManager.hxx2
-rw-r--r--sw/source/core/inc/MarkManager.hxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
14 files changed, 19 insertions, 21 deletions
diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index 9b120d8314b3..769360f5f605 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -73,7 +73,7 @@
struct SwTableEntry;
-typedef std::unordered_map<OUString, sal_uInt16, OUStringHash> NameToIdHash;
+typedef std::unordered_map<OUString, sal_uInt16> NameToIdHash;
class SwStyleNameMapper
{
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 7476a3665f20..92ee440db7e8 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -308,7 +308,7 @@ class SW_DLLPUBLIC SwDoc
mutable SwNumRuleTable *mpNumRuleTable; //< List of all named NumRules.
// Hash map to find numrules by name
- mutable std::unordered_map<OUString, SwNumRule *, OUStringHash> maNumRuleMap;
+ mutable std::unordered_map<OUString, SwNumRule *> maNumRuleMap;
SwPagePreviewPrtData *mpPgPViewPrtData; //< Indenting / spacing for printing of page view.
SwPaM *mpExtInputRing;
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index cc7281c57314..59dcfe9afa8a 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -147,7 +147,7 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
class SwPoolFormatList
{
std::vector<OUString> maImpl;
- typedef std::unordered_map<OUString, sal_uInt32, OUStringHash> UniqueHash;
+ typedef std::unordered_map<OUString, sal_uInt32> UniqueHash;
UniqueHash maUnique;
void rehash();
public:
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 9639ef9c44be..dbe4290bad26 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -124,7 +124,7 @@ private:
tParagraphStyleList maParagraphStyleList;
/** unordered_map containing "name->rule" relation */
- std::unordered_map<OUString, SwNumRule *, OUStringHash> * mpNumRuleMap;
+ std::unordered_map<OUString, SwNumRule *> * mpNumRuleMap;
OUString msName;
SwNumRuleType meRuleType;
@@ -203,7 +203,7 @@ public:
@param pNumRuleMap map to register in
*/
void SetNumRuleMap(
- std::unordered_map<OUString, SwNumRule *, OUStringHash>* pNumRuleMap );
+ std::unordered_map<OUString, SwNumRule *>* pNumRuleMap );
static OUString GetOutlineRuleName();
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index cd462cedda57..008cef420736 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -50,8 +50,7 @@ namespace com { namespace sun { namespace star {
} } }
typedef std::unordered_map< OUString,
- css::beans::PropertyValue,
- OUStringHash > tAccParaPropValMap;
+ css::beans::PropertyValue > tAccParaPropValMap;
class SwAccessibleParagraph :
public SwClient, // #i108125#
diff --git a/sw/source/core/doc/DocumentListsManager.cxx b/sw/source/core/doc/DocumentListsManager.cxx
index 18554d6f750d..bed767732dec 100644
--- a/sw/source/core/doc/DocumentListsManager.cxx
+++ b/sw/source/core/doc/DocumentListsManager.cxx
@@ -75,7 +75,7 @@ SwList* DocumentListsManager::getListByName( const OUString& sListId ) const
{
SwList* pList = nullptr;
- std::unordered_map< OUString, SwList*, OUStringHash >::const_iterator
+ std::unordered_map< OUString, SwList* >::const_iterator
aListIter = maLists.find( sListId );
if ( aListIter != maLists.end() )
{
@@ -120,7 +120,7 @@ SwList* DocumentListsManager::getListForListStyle( const OUString& sListStyleNam
{
SwList* pList = nullptr;
- std::unordered_map< OUString, SwList*, OUStringHash >::const_iterator
+ std::unordered_map< OUString, SwList* >::const_iterator
aListIter = maListStyleLists.find( sListStyleName );
if ( aListIter != maListStyleLists.end() )
{
@@ -194,7 +194,7 @@ void DocumentListsManager::trackChangeOfListStyleName( const OUString& sListStyl
DocumentListsManager::~DocumentListsManager()
{
- for ( std::unordered_map< OUString, SwList*, OUStringHash >::iterator
+ for ( std::unordered_map< OUString, SwList* >::iterator
aListIter = maLists.begin();
aListIter != maLists.end();
++aListIter )
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index fabadb97b065..3fe67f0c4729 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -152,7 +152,7 @@ void SwNumRule::RemoveTextNode( SwTextNode& rTextNode )
}
}
-void SwNumRule::SetNumRuleMap(std::unordered_map<OUString, SwNumRule *, OUStringHash> *
+void SwNumRule::SetNumRuleMap(std::unordered_map<OUString, SwNumRule *> *
pNumRuleMap)
{
mpNumRuleMap = pNumRuleMap;
diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx
index c5cf9eeeae4a..77cd65a17165 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -27,8 +27,7 @@
#include <unordered_map>
typedef std::unordered_map< OUString,
- std::shared_ptr<SfxItemSet>,
- OUStringHash > SwStyleNameCache;
+ std::shared_ptr<SfxItemSet> > SwStyleNameCache;
class SwStyleCache
{
diff --git a/sw/source/core/inc/DocumentListsManager.hxx b/sw/source/core/inc/DocumentListsManager.hxx
index 6237a0e5d32b..dc6bdc2a5a88 100644
--- a/sw/source/core/inc/DocumentListsManager.hxx
+++ b/sw/source/core/inc/DocumentListsManager.hxx
@@ -57,7 +57,7 @@ class DocumentListsManager : public IDocumentListsAccess
SwDoc& m_rDoc;
- typedef std::unordered_map<OUString, SwList*, OUStringHash> tHashMapForLists;
+ typedef std::unordered_map<OUString, SwList*> tHashMapForLists;
// container to hold the lists of the text document
tHashMapForLists maLists;
// relation between list style and its default list
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index ecfbd0975017..a12657ef2469 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -27,7 +27,7 @@
namespace sw {
namespace mark {
- typedef std::unordered_map<OUString, sal_Int32, OUStringHash> MarkBasenameMapUniqueOffset_t;
+ typedef std::unordered_map<OUString, sal_Int32> MarkBasenameMapUniqueOffset_t;
class MarkManager
: virtual public IDocumentMarkAccess
@@ -116,7 +116,7 @@ namespace sw {
// additional container for fieldmarks
container_t m_vFieldmarks;
- std::unordered_set<OUString, OUStringHash> m_aMarkNamesSet;
+ std::unordered_set<OUString> m_aMarkNamesSet;
mutable MarkBasenameMapUniqueOffset_t m_aMarkBasenameMapUniqueOffset;
// container for annotation marks
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index b02349a9e483..3e2fc6d489dc 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -170,7 +170,7 @@ public:
}
};
-typedef std::unordered_map< OUString, OUString, OUStringHash > StringHashMap;
+typedef std::unordered_map< OUString, OUString > StringHashMap;
class SwVbaProjectNameProvider : public ::cppu::WeakImplHelper< container::XNameContainer >
{
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 0140b5855b18..8be9b2d1ca44 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -318,7 +318,7 @@ void MSWordStyles::BuildStylesTable()
void MSWordStyles::BuildStyleIds()
{
- std::unordered_set<OString, OStringHash> aUsed;
+ std::unordered_set<OString> aUsed;
m_aStyleIds.emplace_back("Normal");
aUsed.insert("normal");
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d266fac6c5d5..949585384d31 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1065,9 +1065,9 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if( !xInfo.is() )
return;
- std::unordered_set< OUString, OUStringHash > aExcludeAlways;
+ std::unordered_set< OUString > aExcludeAlways;
aExcludeAlways.insert("LinkUpdateMode");
- std::unordered_set< OUString, OUStringHash > aExcludeWhenNotLoadingUserSettings;
+ std::unordered_set< OUString > aExcludeWhenNotLoadingUserSettings;
aExcludeWhenNotLoadingUserSettings.insert("ForbiddenCharacters");
aExcludeWhenNotLoadingUserSettings.insert("IsKernAsianPunctuation");
aExcludeWhenNotLoadingUserSettings.insert("CharacterCompressionType");
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index cb3d227fb09a..be3151ea7458 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -658,7 +658,7 @@ public:
}
};
-typedef std::unordered_map< OUString, uno::Reference< XDocumentProperty >, OUStringHash > DocPropsByName;
+typedef std::unordered_map< OUString, uno::Reference< XDocumentProperty > > DocPropsByName;
class BuiltInPropertiesImpl : public PropertiesImpl_BASE
{