diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-19 17:18:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-23 08:15:35 +0200 |
commit | 87a9979c8938b800aab6e35903d60d24892e7f2e (patch) | |
tree | 6beb01f22537e63df24c023ab65d391a7bee0cf6 /sc | |
parent | d76c4e5c9aaf8bd27ec97679bcaeba5b18aca493 (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 'sc')
40 files changed, 63 insertions, 65 deletions
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx index 472faddf823f..be47d59bddcd 100644 --- a/sc/inc/addincol.hxx +++ b/sc/inc/addincol.hxx @@ -42,7 +42,7 @@ class SfxObjectShell; class ScUnoAddInFuncData; class ScFuncDesc; -typedef std::unordered_map< OUString, const ScUnoAddInFuncData*, OUStringHash > ScAddInHashMap; +typedef std::unordered_map< OUString, const ScUnoAddInFuncData* > ScAddInHashMap; enum ScAddInArgumentType { diff --git a/sc/inc/autonamecache.hxx b/sc/inc/autonamecache.hxx index d0bbc05e5ead..0c6d8421bf79 100644 --- a/sc/inc/autonamecache.hxx +++ b/sc/inc/autonamecache.hxx @@ -26,7 +26,7 @@ #include "global.hxx" typedef std::vector< ScAddress > ScAutoNameAddresses; -typedef std::unordered_map< OUString, ScAutoNameAddresses, OUStringHash > ScAutoNameHashMap; +typedef std::unordered_map< OUString, ScAutoNameAddresses > ScAutoNameHashMap; /** Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content is changed). */ diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index c461867eae5a..3fde82bea979 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -128,7 +128,7 @@ class SC_DLLPUBLIC ScChartListenerCollection { public: typedef std::map<OUString, std::unique_ptr<ScChartListener>> ListenersType; - typedef std::unordered_set<OUString, OUStringHash> StringSetType; + typedef std::unordered_set<OUString> StringSetType; private: ListenersType m_Listeners; enum UpdateStatus diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx index 3bac2751600d..8601d7177aae 100644 --- a/sc/inc/dpcache.hxx +++ b/sc/inc/dpcache.hxx @@ -43,7 +43,7 @@ struct ScDPNumGroupInfo; class SC_DLLPUBLIC ScDPCache { public: - typedef std::unordered_set<OUString, OUStringHash> StringSetType; + typedef std::unordered_set<OUString> StringSetType; typedef mdds::flat_segment_tree<SCROW, bool> EmptyRowsType; typedef std::vector<ScDPItemData> ScDPItemDataVec; typedef std::set<ScDPObject*> ScDPObjectSet; diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 1eddcf931e34..421d61f2b3e9 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -119,7 +119,7 @@ public: class ScDPGroupTableData : public ScDPTableData { - typedef std::unordered_set< OUString, OUStringHash > StringHashSet; + typedef std::unordered_set< OUString > StringHashSet; std::shared_ptr<ScDPTableData> pSourceData; long nSourceCount; diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx index 6564b9b34f30..b88b08161495 100644 --- a/sc/inc/dpsave.hxx +++ b/sc/inc/dpsave.hxx @@ -111,8 +111,8 @@ private: css::sheet::DataPilotFieldLayoutInfo* pLayoutInfo; // (level) public: - typedef std::unordered_set<OUString, OUStringHash> MemberSetType; - typedef std::unordered_map <OUString, ScDPSaveMember*, OUStringHash> MemberHash; + typedef std::unordered_set<OUString> MemberSetType; + typedef std::unordered_map <OUString, ScDPSaveMember*> MemberHash; typedef std::list <ScDPSaveMember*> MemberList; private: @@ -220,7 +220,7 @@ public: void WriteToSource( const css::uno::Reference<css::uno::XInterface>& xDim ); - void UpdateMemberVisibility(const std::unordered_map< OUString, bool, OUStringHash>& rData); + void UpdateMemberVisibility(const std::unordered_map< OUString, bool>& rData); bool HasInvisibleMember() const; @@ -233,9 +233,9 @@ public: class ScDPSaveData { - typedef std::unordered_map<OUString, size_t, OUStringHash> DupNameCountType; + typedef std::unordered_map<OUString, size_t> DupNameCountType; public: - typedef std::unordered_map<OUString, size_t, OUStringHash> DimOrderType; + typedef std::unordered_map<OUString, size_t> DimOrderType; typedef std::vector<std::unique_ptr<ScDPSaveDimension>> DimsType; private: diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index c0a29c8ae52f..a0f8048f82ce 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -674,7 +674,7 @@ private: size_t operator()(const ScDPItemData& r) const; }; typedef std::unordered_set<ScDPItemData, MemberHash> VisibleMemberType; - typedef std::unordered_map<OUString, VisibleMemberType, OUStringHash> DimMemberType; + typedef std::unordered_map<OUString, VisibleMemberType> DimMemberType; DimMemberType maDimensions; ScDPSource* mpSource; diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 3d6af78e5cd6..f7bc070e81fa 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -547,7 +547,7 @@ public: }; // hash map from name to index in the member array, for fast name access -typedef std::unordered_map< OUString, sal_Int32, OUStringHash > ScDPMembersHashMap; +typedef std::unordered_map< OUString, sal_Int32 > ScDPMembersHashMap; class ScDPMembers : public cppu::WeakImplHelper< css::sheet::XMembersAccess, diff --git a/sc/inc/dptypes.hxx b/sc/inc/dptypes.hxx index 980b5594e0fc..abb77dbbb9dd 100644 --- a/sc/inc/dptypes.hxx +++ b/sc/inc/dptypes.hxx @@ -14,7 +14,7 @@ #include <unordered_set> -typedef std::unordered_set<OUString, OUStringHash> ScDPUniqueStringSet; +typedef std::unordered_set<OUString> ScDPUniqueStringSet; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 30bc8136b034..19414e2a2084 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -189,7 +189,7 @@ public: }; typedef std::shared_ptr<Table> TableTypeRef; - typedef std::unordered_map< OUString, size_t, OUStringHash> + typedef std::unordered_map< OUString, size_t> TableNameIndexMap; ScExternalRefCache(); @@ -319,9 +319,9 @@ private: } }; - typedef std::unordered_map<OUString, TokenArrayRef, OUStringHash> RangeNameMap; + typedef std::unordered_map<OUString, TokenArrayRef> RangeNameMap; typedef std::unordered_map<ScRange, TokenArrayRef, RangeHash> RangeArrayMap; - typedef std::unordered_map<OUString, OUString, OUStringHash> NamePairMap; + typedef std::unordered_map<OUString, OUString> NamePairMap; /** Represents data cached for a single external document. */ struct DocItem diff --git a/sc/inc/formulaparserpool.hxx b/sc/inc/formulaparserpool.hxx index ba8b1c51d499..8b66791afa39 100644 --- a/sc/inc/formulaparserpool.hxx +++ b/sc/inc/formulaparserpool.hxx @@ -43,8 +43,7 @@ public: private: typedef std::unordered_map< OUString, - css::uno::Reference< css::sheet::XFormulaParser >, - OUStringHash > ParserMap; + css::uno::Reference< css::sheet::XFormulaParser > > ParserMap; const ScDocument& mrDoc; ParserMap maParsers; diff --git a/sc/inc/macromgr.hxx b/sc/inc/macromgr.hxx index 02156f155ece..e524ff59bad2 100644 --- a/sc/inc/macromgr.hxx +++ b/sc/inc/macromgr.hxx @@ -38,7 +38,7 @@ public: void BroadcastModuleUpdate(const OUString& aModuleName); private: - typedef std::unordered_map< OUString, bool, OUStringHash > NameBoolMap; + typedef std::unordered_map< OUString, bool > NameBoolMap; NameBoolMap mhFuncToVolatile; css::uno::Reference< css::container::XContainerListener > mxContainerListener; diff --git a/sc/inc/sheetdata.hxx b/sc/inc/sheetdata.hxx index 107d2b5e2e9c..238a50983c03 100644 --- a/sc/inc/sheetdata.hxx +++ b/sc/inc/sheetdata.hxx @@ -104,7 +104,7 @@ struct ScLoadedNamespaceEntry class ScSheetSaveData { - std::unordered_set<OUString, OUStringHash> maInitialPrefixes; + std::unordered_set<OUString> maInitialPrefixes; std::vector<ScLoadedNamespaceEntry> maLoadedNamespaces; std::vector<ScCellStyleEntry> maCellStyles; diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index dd0dc4afa663..51c7b4083c7f 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -334,7 +334,7 @@ struct InitDocData mbTailEmptyRows(false) {} }; -typedef std::unordered_set<OUString, OUStringHash> LabelSet; +typedef std::unordered_set<OUString> LabelSet; class InsertLabel { diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 5ca9e8d4670f..7b6ed9d18b32 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -659,9 +659,9 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_HAS_HIDDEN_MEMBER, bHasHiddenMember); } -void ScDPSaveDimension::UpdateMemberVisibility(const std::unordered_map<OUString, bool, OUStringHash>& rData) +void ScDPSaveDimension::UpdateMemberVisibility(const std::unordered_map<OUString, bool>& rData) { - typedef std::unordered_map<OUString, bool, OUStringHash> DataMap; + typedef std::unordered_map<OUString, bool> DataMap; MemberList::iterator itrMem = maMemberList.begin(), itrMemEnd = maMemberList.end(); for (; itrMem != itrMemEnd; ++itrMem) { @@ -1292,7 +1292,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) return; // First, build a dimension name-to-index map. - typedef std::unordered_map<OUString, long, OUStringHash> NameIndexMap; + typedef std::unordered_map<OUString, long> NameIndexMap; NameIndexMap aMap; long nColCount = pData->GetColumnCount(); for (long i = 0; i < nColCount; ++i) @@ -1334,7 +1334,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) void ScDPSaveData::SyncAllDimensionMembers(ScDPTableData* pData) { - typedef std::unordered_map<OUString, long, OUStringHash> NameIndexMap; + typedef std::unordered_map<OUString, long> NameIndexMap; // First, build a dimension name-to-index map. NameIndexMap aMap; diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 0d7a0af4de3f..696ddfb3025a 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -3912,7 +3912,7 @@ void ScDPResultVisibilityData::addVisibleMember(const OUString& rDimName, const void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criterion>& rFilters) const { - typedef std::unordered_map<OUString, long, OUStringHash> FieldNameMapType; + typedef std::unordered_map<OUString, long> FieldNameMapType; FieldNameMapType aFieldNames; ScDPTableData* pData = mpSource->GetData(); long nColumnCount = pData->GetColumnCount(); diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 0a036d3db171..f58a453a64a1 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2985,7 +2985,7 @@ void lcl_PrepareQuery( const ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPar SCSIZE ScTable::Query(const ScQueryParam& rParamOrg, bool bKeepSub) { ScQueryParam aParam( rParamOrg ); - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; StrSetType aStrSet; bool bStarted = false; diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index 655b9aa792e3..9bfa9a25bd72 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -40,7 +40,7 @@ struct ScCellKeyword ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const css::lang::Locale& rLocale); }; -typedef std::unordered_map< OUString, ::std::list<ScCellKeyword>, OUStringHash > ScCellKeywordHashMap; +typedef std::unordered_map< OUString, ::std::list<ScCellKeyword> > ScCellKeywordHashMap; /** Translate cell function keywords. diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx index e86d7aa2317e..1cfab3575be7 100644 --- a/sc/source/core/tool/formulaparserpool.cxx +++ b/sc/source/core/tool/formulaparserpool.cxx @@ -46,8 +46,7 @@ public: private: typedef std::unordered_map< - OUString, Reference< XSingleComponentFactory >, - OUStringHash > FactoryMap; + OUString, Reference< XSingleComponentFactory > > FactoryMap; Reference< XComponentContext > mxContext; /// Global component context. FactoryMap maFactories; /// All parser factories, mapped by formula namespace. diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index f18b81aaffdd..33b7cdc56ed2 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -112,7 +112,7 @@ using namespace ::comphelper; class OleNameOverrideContainer : public ::cppu::WeakImplHelper< container::XNameContainer > { private: - typedef std::unordered_map< OUString, uno::Reference< container::XIndexContainer >, OUStringHash > NamedIndexToOleName; + typedef std::unordered_map< OUString, uno::Reference< container::XIndexContainer > > NamedIndexToOleName; NamedIndexToOleName IdToOleNameHash; ::osl::Mutex m_aMutex; public: diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index 57a52aabee22..40b728f4fe35 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -581,7 +581,7 @@ sal_Int32 GetSubtotalAttrToken(ScGeneralFunction eFunc) void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDPObject& rDPObj, sal_Int32 nCacheId ) { - typedef std::unordered_map<OUString, long, OUStringHash> NameToIdMapType; + typedef std::unordered_map<OUString, long> NameToIdMapType; const XclExpXmlPivotCaches::Entry* pCacheEntry = mrCaches.GetCache(nCacheId); if (!pCacheEntry) diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 43575da8293a..0f346a517ba0 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -46,7 +46,7 @@ class ScHTMLTable; */ class ScHTMLStyles { - typedef std::unordered_map<OUString, OUString, OUStringHash> PropsType; + typedef std::unordered_map<OUString, OUString> PropsType; typedef ::std::map<OUString, std::unique_ptr<PropsType>> NamePropsType; typedef ::std::map<OUString, std::unique_ptr<NamePropsType>> ElemsType; diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index bfb844f0ba30..7fe4ea77ab9f 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -486,7 +486,7 @@ class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory StringCellCache(const ScAddress& rPos, size_t nIndex); }; - typedef std::unordered_map<OUString, size_t, OUStringHash> StringHashType; + typedef std::unordered_map<OUString, size_t> StringHashType; typedef std::vector<StringCellCache> StringCellCaches; ScDocumentImport maDoc; diff --git a/sc/source/filter/xml/editattributemap.hxx b/sc/source/filter/xml/editattributemap.hxx index 031e9356c51f..636b38c71137 100644 --- a/sc/source/filter/xml/editattributemap.hxx +++ b/sc/source/filter/xml/editattributemap.hxx @@ -36,7 +36,7 @@ public: const Entry* getEntryByItemID(sal_uInt16 nItemID) const; private: - typedef std::unordered_map<OUString, const Entry*, OUStringHash> StrToEntriesType; + typedef std::unordered_map<OUString, const Entry*> StrToEntriesType; typedef std::unordered_map<sal_uInt16, const Entry*> IndexToEntriesType; StrToEntriesType maAPIEntries; IndexToEntriesType maItemIDEntries; diff --git a/sc/source/filter/xml/pivotsource.hxx b/sc/source/filter/xml/pivotsource.hxx index ed4a40b01263..2b5acdc3d8d8 100644 --- a/sc/source/filter/xml/pivotsource.hxx +++ b/sc/source/filter/xml/pivotsource.hxx @@ -25,7 +25,7 @@ namespace sc { */ struct PivotTableSources { - typedef std::unordered_map<OUString, OUString, OUStringHash> SelectedPagesType; + typedef std::unordered_map<OUString, OUString> SelectedPagesType; typedef std::unordered_map<ScDPObject*, SelectedPagesType> SelectedPagesMapType; struct SelectedPages diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx index 13e315bfcb30..7d89ffeb721d 100644 --- a/sc/source/filter/xml/xmldpimp.hxx +++ b/sc/source/filter/xml/xmldpimp.hxx @@ -62,7 +62,7 @@ public: class ScXMLDataPilotTableContext : public ScXMLImportContext { - typedef std::unordered_map<OUString, OUString, OUStringHash> SelectedPagesType; + typedef std::unordered_map<OUString, OUString> SelectedPagesType; struct GrandTotalItem { diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index cc936bdd1b97..ebee7f8b4dd1 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1637,7 +1637,7 @@ void ScCheckListBox::Init() SetNodeDefaultImages(); } -void ScCheckListBox::GetRecursiveChecked( SvTreeListEntry* pEntry, std::unordered_set<OUString, OUStringHash>& vOut, +void ScCheckListBox::GetRecursiveChecked( SvTreeListEntry* pEntry, std::unordered_set<OUString>& vOut, OUString& rLabel ) { if (GetCheckButtonState(pEntry) == SvButtonState::Checked) @@ -1669,9 +1669,9 @@ void ScCheckListBox::GetRecursiveChecked( SvTreeListEntry* pEntry, std::unordere } } -std::unordered_set<OUString, OUStringHash> ScCheckListBox::GetAllChecked() +std::unordered_set<OUString> ScCheckListBox::GetAllChecked() { - std::unordered_set<OUString, OUStringHash> vResults(0); + std::unordered_set<OUString> vResults(0); sal_uInt32 nRootPos = 0; SvTreeListEntry* pEntry = GetEntry(nRootPos); while (pEntry) @@ -1955,7 +1955,7 @@ bool ScCheckListMenuWindow::isAllSelected() const void ScCheckListMenuWindow::getResult(ResultType& rResult) { ResultType aResult; - std::unordered_set<OUString, OUStringHash> vCheckeds = maChecks->GetAllChecked(); + std::unordered_set<OUString> vCheckeds = maChecks->GetAllChecked(); size_t n = maMembers.size(); for (size_t i = 0; i < n; ++i) { diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 1f3acb3312b7..97ca6c119887 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -317,7 +317,7 @@ void ScDocShell::ReconnectDdeLink(SfxObjectShell& rServer) void ScDocShell::UpdateLinks() { - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); StrSetType aNames; diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 9945bd288efc..c9b2dd313f17 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -471,7 +471,7 @@ void lcl_GetColumnTypes( SCCOL nLastCol = rDataRange.aEnd.Col(); SCROW nLastRow = rDataRange.aEnd.Row(); - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; StrSetType aFieldNames; long nField = 0; diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx index 4cb5e41403f8..e8e365658bfd 100644 --- a/sc/source/ui/docshell/macromgr.cxx +++ b/sc/source/ui/docshell/macromgr.cxx @@ -86,7 +86,7 @@ public: } private: - typedef std::unordered_map<OUString, vector<ScFormulaCell*>, OUStringHash> ModuleCellMap; + typedef std::unordered_map<OUString, vector<ScFormulaCell*>> ModuleCellMap; ModuleCellMap maCells; }; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 5e7a158e7c70..430820b98ad9 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -241,8 +241,8 @@ class ScCheckListBox : public SvTreeListBox void CheckEntry( const OUString& sName, SvTreeListEntry* pParent, bool bCheck ); void CheckEntry( SvTreeListEntry* pEntry, bool bCheck ); SvTreeListEntry* ShowCheckEntry( const OUString& sName, ScCheckListMember& rMember, bool bShow = true, bool bCheck = true ); - void GetRecursiveChecked( SvTreeListEntry* pEntry, std::unordered_set<OUString, OUStringHash>& vOut, OUString& rLabel ); - std::unordered_set<OUString, OUStringHash> GetAllChecked(); + void GetRecursiveChecked( SvTreeListEntry* pEntry, std::unordered_set<OUString>& vOut, OUString& rLabel ); + std::unordered_set<OUString> GetAllChecked(); bool IsChecked( const OUString& sName, SvTreeListEntry* pParent ); SvTreeListEntry* FindEntry( SvTreeListEntry* pParent, const OUString& sNode ); sal_uInt16 GetCheckedEntryCount() const; diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index 6bffcb7d059f..9474fe2f5558 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -65,7 +65,7 @@ private: ScRangePairListRef xColNameRanges; ScRangePairListRef xRowNameRanges; - typedef std::unordered_map< OUString, ScRange, OUStringHash > NameRangeMap; + typedef std::unordered_map< OUString, ScRange > NameRangeMap; NameRangeMap aRangeMap; ScViewData* pViewData; ScDocument* pDoc; diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 7a1fe8f79fad..c7365e4a1b8b 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -56,7 +56,7 @@ private: class ScDPFunctionDlg : public ModalDialog { - typedef std::unordered_map< OUString, OUString, OUStringHash > NameMapType; + typedef std::unordered_map< OUString, OUString > NameMapType; public: explicit ScDPFunctionDlg( vcl::Window* pParent, const ScDPLabelDataVector& rLabelVec, const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ); @@ -182,7 +182,7 @@ private: ScDPObject& mrDPObj; /// The DataPilot object (for member names). ScDPLabelData maLabelData; /// Cache for members data. - typedef std::unordered_map<OUString, ScDPName, OUStringHash> NameMapType; + typedef std::unordered_map<OUString, ScDPName> NameMapType; NameMapType maDataFieldNameMap; /// Cache for displayed name to field name mapping. }; @@ -209,7 +209,7 @@ private: VclPtr<ListBox> mpLbDims; VclPtr<OKButton> mpBtnOk; - typedef std::unordered_map<OUString, long, OUStringHash> DimNameIndexMap; + typedef std::unordered_map<OUString, long> DimNameIndexMap; DimNameIndexMap maNameIndexMap; ScDPObject& mrDPObj; }; diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index 85e8eabfbd6e..7f5793dfb2f6 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -342,10 +342,10 @@ void PivotTableDataProvider::collectPivotTableData() uno::Reference<sheet::XDimensionsSupplier> xDimensionsSupplier(pDPObject->GetSource()); uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess(xDimensionsSupplier->getDimensions()); - std::unordered_map<OUString, sal_Int32, OUStringHash> aDataFieldNumberFormatMap; + std::unordered_map<OUString, sal_Int32> aDataFieldNumberFormatMap; std::vector<OUString> aDataFieldNamesVectors; - std::unordered_map<OUString, OUString, OUStringHash> aDataFieldCaptionNames; + std::unordered_map<OUString, OUString> aDataFieldCaptionNames; sheet::DataPilotFieldOrientation eDataFieldOrientation = sheet::DataPilotFieldOrientation_HIDDEN; diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index ad0da525309d..e96cfe56a7c3 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -389,7 +389,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) if (!pDocShell) return nullptr; - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; StrSetType aNames; ScDocument& rDoc = pDocShell->GetDocument(); SCTAB nTabCount = rDoc.GetTableCount(); @@ -443,7 +443,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScSheetLinksObj::createEnumerat // XIndexAccess sal_Int32 SAL_CALL ScSheetLinksObj::getCount() { - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; SolarMutexGuard aGuard; if (!pDocShell) @@ -521,7 +521,7 @@ sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const OUString& aName ) uno::Sequence<OUString> SAL_CALL ScSheetLinksObj::getElementNames() { - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; SolarMutexGuard aGuard; // Name is the same as file name diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 5f6629597606..9564652e0f44 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -52,7 +52,7 @@ using namespace ::ooo::vba; using namespace ::ooo::vba::excel::XlWindowState; typedef std::unordered_map< OUString, -SCTAB, OUStringHash > NameIndexHash; +SCTAB > NameIndexHash; typedef std::vector< uno::Reference< sheet::XSpreadsheet > > Sheets; diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 568488ff0e91..25fc38d5269d 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; using namespace ::ooo::vba; typedef std::unordered_map< OUString, -sal_Int32, OUStringHash > NameIndexHash; +sal_Int32 > NameIndexHash; static uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ) { diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 2cc79ac57080..dfced2d0229f 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1649,7 +1649,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending typedef ScDPSaveDimension::MemberList MemList; const MemList& rDimMembers = pSaveDim->GetMembers(); vector<OUString> aMembers; - std::unordered_set<OUString, OUStringHash> aMemberSet; + std::unordered_set<OUString> aMemberSet; size_t nMemberCount = 0; for (MemList::const_iterator itr = rDimMembers.begin(), itrEnd = rDimMembers.end(); itr != itrEnd; ++itr) @@ -1666,7 +1666,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending // Collect and rank those custom sort strings that also exist in the member name list. - typedef std::unordered_map<OUString, sal_uInt16, OUStringHash> UserSortMap; + typedef std::unordered_map<OUString, sal_uInt16> UserSortMap; UserSortMap aSubStrs; sal_uInt16 nSubCount = 0; if (pUserListId) @@ -1763,7 +1763,7 @@ bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) bool bValid = ( aDestData.Dimension >= 0 ); // dropping onto a field // look through the source range - std::unordered_set< OUString, OUStringHash > aMembersSet; // for lookup + std::unordered_set< OUString > aMembersSet; // for lookup std::vector< OUString > aMembersVector; // members in original order, for inserting aMembersVector.reserve( std::max( static_cast<SCSIZE>( rSource.aEnd.Col() - rSource.aStart.Col() + 1 ), static_cast<SCSIZE>( rSource.aEnd.Row() - rSource.aStart.Row() + 1 ) ) ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 42328999c762..7e093ddae6a3 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -607,9 +607,9 @@ public: class AddSelectedItemString { - std::unordered_set<OUString, OUStringHash>& mrSet; + std::unordered_set<OUString>& mrSet; public: - explicit AddSelectedItemString(std::unordered_set<OUString, OUStringHash>& r) : + explicit AddSelectedItemString(std::unordered_set<OUString>& r) : mrSet(r) {} void operator() (const ScQueryEntry::Item& rItem) @@ -649,7 +649,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) ScQueryParam aParam; pDBData->GetQueryParam(aParam); std::vector<ScQueryEntry*> aEntries = aParam.FindAllEntriesByField(nCol); - std::unordered_set<OUString, OUStringHash> aSelected; + std::unordered_set<OUString> aSelected; for (ScQueryEntry* pEntry : aEntries) { if (pEntry && pEntry->bDoQuery && pEntry->eOp == SC_EQUAL) diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 5c6daf65c11d..06235979f3e7 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -542,7 +542,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScr void ScGridWindow::UpdateDPFromFieldPopupMenu() { - typedef std::unordered_map<OUString, OUString, OUStringHash> MemNameMapType; + typedef std::unordered_map<OUString, OUString> MemNameMapType; if (!mpDPFieldPopup) return; @@ -571,7 +571,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() ScCheckListMenuWindow::ResultType aRawResult; mpDPFieldPopup->getResult(aRawResult); - std::unordered_map<OUString, bool, OUStringHash> aResult; + std::unordered_map<OUString, bool> aResult; ScCheckListMenuWindow::ResultType::const_iterator itr = aRawResult.begin(), itrEnd = aRawResult.end(); for (; itr != itrEnd; ++itr) { |