This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch STLport-cleanup in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit e7e35e0e9aa14377ae1e8d0fdbec4b1de942329c Author: Pedro Giffuni <[email protected]> AuthorDate: Sun Nov 8 14:55:27 2026 -0500 Migrate remaining std::hash_map/std::hash_set to std::unordered_map/std::unordered_set Replace TR1/backport hash containers with C++11 standard equivalents in source files not yet covered by trunk's migration. --- main/crashrep/source/unx/main.cxx | 26 +++++++++++----------- main/crashrep/source/win32/soreport.cpp | 10 ++++----- main/extensions/source/ole/oleobjw.hxx | 6 ++--- .../source/ole/unoconversionutilities.hxx | 26 +++++++++++----------- main/extensions/source/ole/unoobjw.cxx | 4 ++-- .../extensions/source/propctrlr/browserlistbox.hxx | 4 ++-- main/extensions/source/propctrlr/eventhandler.cxx | 2 +- main/extensions/source/propctrlr/eventhandler.hxx | 2 +- .../extensions/source/propctrlr/pcrcommontypes.hxx | 4 ++-- .../extensions/source/propctrlr/propcontroller.hxx | 6 ++--- .../cpp/complextoolbarcontrols/ListenerHelper.h | 6 ++--- main/sfx2/inc/sfx2/sidebar/Theme.hxx | 4 ++-- main/sfx2/source/appl/imagemgr.cxx | 4 ++-- main/sfx2/source/appl/newhelp.cxx | 4 ++-- main/sfx2/source/appl/workwin.cxx | 4 ++-- main/sfx2/source/control/bindings.cxx | 4 ++-- main/sfx2/source/doc/Metadatable.cxx | 14 ++++++------ main/sfx2/source/toolbox/imgmgr.cxx | 4 ++-- main/sfx2/source/view/sfxbasecontroller.cxx | 4 ++-- main/ucbhelper/source/provider/contenthelper.cxx | 4 ++-- main/ucbhelper/source/provider/providerhelper.cxx | 4 ++-- main/xmlscript/source/xml_helper/xml_impctx.cxx | 8 +++---- 22 files changed, 77 insertions(+), 77 deletions(-) diff --git a/main/crashrep/source/unx/main.cxx b/main/crashrep/source/unx/main.cxx index cc409e5644..4e9d80e6af 100644 --- a/main/crashrep/source/unx/main.cxx +++ b/main/crashrep/source/unx/main.cxx @@ -36,7 +36,7 @@ #include <pthread.h> #include <limits.h> -#include <hash_map> +#include <unordered_map> #include <vector> #include <string> @@ -178,7 +178,7 @@ static size_t fcopy( FILE *fpout, FILE *fpin ) from which it can be reviewed and sent */ -bool write_report( const unordered_map< string, string >& rSettings ) +bool write_report( const std::unordered_map< string, string >& rSettings ) { FILE *fp = fopen( tmpnam( g_szReportFile ), "w" ); const char *pszUserType = getenv( "STAROFFICE_USERTYPE" ); @@ -245,7 +245,7 @@ bool write_report( const unordered_map< string, string >& rSettings ) } -bool write_description( const unordered_map< string, string >& rSettings ) +bool write_description( const std::unordered_map< string, string >& rSettings ) { bool bSuccess = false; FILE *fp = fopen( tmpnam( g_szDescriptionFile ), "w" ); @@ -263,17 +263,17 @@ bool write_description( const unordered_map< string, string >& rSettings ) #if 0 // unused -static void printSettings( const unordered_map<string,string>& rSettings ) +static void printSettings( const std::unordered_map<string,string>& rSettings ) { printf( "Settings:\n" ); - for( unordered_map<string,string>::const_iterator it = rSettings.begin(); it != rSettings.end(); ++it ) + for( std::unordered_map<string,string>::const_iterator it = rSettings.begin(); it != rSettings.end(); ++it ) { printf( "%s=\"%s\"\n", it->first.c_str(), it->second.c_str() ); } } #endif -bool save_crash_report( const string& rFileName, const unordered_map< string, string >& /*rSettings*/ ) +bool save_crash_report( const string& rFileName, const std::unordered_map< string, string >& /*rSettings*/ ) { bool bSuccess = false; FILE *fpout = fopen( rFileName.c_str(), "w" ); @@ -489,7 +489,7 @@ struct RequestParams }; -bool send_crash_report( const unordered_map< string, string >& rSettings ) +bool send_crash_report( const std::unordered_map< string, string >& rSettings ) { if ( 0 == strcasecmp( rSettings.find( "CONTACT" )->second.c_str(), "true" ) && !trim_string(rSettings.find( "EMAIL" )->second).length() ) @@ -553,7 +553,7 @@ static bool append_file( const char *filename, string& rString ) return true; } -string crash_get_details( const unordered_map< string, string >& rSettings ) +string crash_get_details( const std::unordered_map< string, string >& rSettings ) { string aRet; @@ -907,7 +907,7 @@ static bool write_crash_data() #if 0 // unused -static bool write_settings( const unordered_map< string, string >& rSettings ) +static bool write_settings( const std::unordered_map< string, string >& rSettings ) { bool success = false; string sRCFile = get_home_dir(); @@ -932,7 +932,7 @@ static bool write_settings( const unordered_map< string, string >& rSettings ) } #endif -static void read_settings( unordered_map< string, string >& rSettings ) +static void read_settings( std::unordered_map< string, string >& rSettings ) { string sRCFile = get_home_dir(); @@ -948,7 +948,7 @@ static void read_settings( unordered_map< string, string >& rSettings ) rSettings[ "TITLE" ] = ""; } -static void read_settings_from_environment( unordered_map< string, string >& rSettings ) +static void read_settings_from_environment( std::unordered_map< string, string >& rSettings ) { string strEnv; @@ -1067,7 +1067,7 @@ int main( int argc, char** argv ) if ( g_bSendReport ) { - unordered_map< string, string > aDialogSettings; + std::unordered_map< string, string > aDialogSettings; read_settings( aDialogSettings ); read_settings_from_environment( aDialogSettings ); @@ -1076,7 +1076,7 @@ int main( int argc, char** argv ) } else { - unordered_map< string, string > aDialogSettings; + std::unordered_map< string, string > aDialogSettings; read_settings( aDialogSettings ); read_settings_from_environment( aDialogSettings ); diff --git a/main/crashrep/source/win32/soreport.cpp b/main/crashrep/source/win32/soreport.cpp index 7443c1a1b3..5002c4bbf1 100644 --- a/main/crashrep/source/win32/soreport.cpp +++ b/main/crashrep/source/win32/soreport.cpp @@ -65,7 +65,7 @@ #include <io.h> #include <fcntl.h> #include <string> -#include <hash_map> +#include <unordered_map> #include <winsock.h> #include <malloc.h> #include <process.h> @@ -1695,7 +1695,7 @@ static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, #endif //*************************************************************************** -static bool WriteStackFile( FILE *fout, unordered_map< string, string >& rLibraries, DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers ) +static bool WriteStackFile( FILE *fout, std::unordered_map< string, string >& rLibraries, DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers ) { bool fSuccess = false; @@ -1841,7 +1841,7 @@ static bool WriteStackFile( FILE *fout, unordered_map< string, string >& rLibrar return fSuccess; } -bool WriteChecksumFile( FILE *fchksum, const unordered_map< string, string >& rLibraries ) +bool WriteChecksumFile( FILE *fchksum, const std::unordered_map< string, string >& rLibraries ) { bool success = false; @@ -1849,7 +1849,7 @@ bool WriteChecksumFile( FILE *fchksum, const unordered_map< string, string >& rL { fprintf( fchksum, "<errormail:Checksums type=\"MD5\">\n" ); - unordered_map< string, string >::const_iterator iter; + std::unordered_map< string, string >::const_iterator iter; for ( iter = rLibraries.begin(); iter != rLibraries.end(); @@ -2902,7 +2902,7 @@ int WINAPI _tWinMain( HINSTANCE hInstance, HINSTANCE, LPTSTR /*lpCmdLine*/, int if( bGotDumpFile ) { - unordered_map< string, string > aLibraries; + std::unordered_map< string, string > aLibraries; if ( g_bLoadReport ) { diff --git a/main/extensions/source/ole/oleobjw.hxx b/main/extensions/source/ole/oleobjw.hxx index 2b9e311126..084d2ad0a4 100644 --- a/main/extensions/source/ole/oleobjw.hxx +++ b/main/extensions/source/ole/oleobjw.hxx @@ -38,7 +38,7 @@ #endif #include <atlbase.h> #include <vector> -#include <hash_map> +#include <unordered_map> #include <tools/postsys.h> #ifdef _MSC_VER @@ -71,9 +71,9 @@ namespace ole_adapter -typedef unordered_map<OUString, pair<DISPID, unsigned short>, hashOUString_Impl, equalOUString_Impl> DispIdMap; +typedef std::unordered_map<OUString, pair<DISPID, unsigned short>, hashOUString_Impl, equalOUString_Impl> DispIdMap; -typedef unordered_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_Impl> TLBFuncIndexMap; +typedef hash_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_Impl> TLBFuncIndexMap; // This class wraps an IDispatch and maps XInvocation calls to IDispatch calls on the wrapped object. // If m_TypeDescription is set then this class represents an UNO interface implemented in a COM component. diff --git a/main/extensions/source/ole/unoconversionutilities.hxx b/main/extensions/source/ole/unoconversionutilities.hxx index 0c944c629e..6aa4dda4bc 100644 --- a/main/extensions/source/ole/unoconversionutilities.hxx +++ b/main/extensions/source/ole/unoconversionutilities.hxx @@ -36,7 +36,7 @@ #include "ole2uno.hxx" #include "unotypewrapper.hxx" -#include <hash_map> +#include <unordered_map> // for some reason DECIMAL_NEG (wtypes.h) which contains BYTE is not resolved. typedef unsigned char BYTE; @@ -67,17 +67,17 @@ using namespace com::sun::star::bridge::oleautomation; using namespace boost; namespace ole_adapter { -extern unordered_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; -extern unordered_map<sal_uInt32, sal_uInt32> WrapperToAdapterMap; -typedef unordered_map<sal_uInt32, sal_uInt32>::iterator IT_Wrap; -typedef unordered_map<sal_uInt32, sal_uInt32>::iterator CIT_Wrap; +extern std::unordered_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; +extern std::unordered_map<sal_uInt32, sal_uInt32> WrapperToAdapterMap; +typedef std::unordered_map<sal_uInt32, sal_uInt32>::iterator IT_Wrap; +typedef std::unordered_map<sal_uInt32, sal_uInt32>::iterator CIT_Wrap; //Maps IUnknown pointers to a weak reference of the respective wrapper class (e.g. // IUnknownWrapperImpl. It is the responsibility of the wrapper to remove the entry when // it is being destroyed. // Used to ensure that an Automation object is always mapped to the same UNO objects. -extern unordered_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; -typedef unordered_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Com; -typedef unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com; +extern std::unordered_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; +typedef std::unordered_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Com; +typedef std::unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com; // Maps XInterface pointers to a weak reference of its wrapper class (i.e. // InterfaceOleWrapper_Impl). It is the responsibility of the wrapper to remove the entry when @@ -85,9 +85,9 @@ typedef unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CI // is mapped to IDispatch which is kept alive in the COM environment. If the same // UNO interface is mapped again to COM then the IDispatch of the first mapped instance // must be returned. -extern unordered_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; -typedef unordered_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Uno; -typedef unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Uno; +extern std::unordered_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; +typedef std::unordered_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Uno; +typedef std::unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Uno; #ifdef __MINGW32__ inline void reduceRange( Any& any); #endif @@ -1407,7 +1407,7 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT else { Reference<XInterface> xIntComWrapper = xInt; - typedef unordered_map<sal_uInt32,sal_uInt32>::iterator _IT; + typedef std::unordered_map<sal_uInt32,sal_uInt32>::iterator _IT; // Adapter? then get the COM wrapper to which the adapter delegates its calls _IT it= AdapterToWrapperMap.find( (sal_uInt32) xInt.get()); if( it != AdapterToWrapperMap.end() ) @@ -1897,7 +1897,7 @@ Reference<XInterface> UnoConversionUtilities<T>::createAdapter(const Sequence<Ty // in a global map. Thus we can determine in a call to createUnoObjectWrapper whether the UNO // object is a wrapped COM object. In that case we extract the original COM object rather than // creating a wrapper around the UNO object. - typedef unordered_map<sal_uInt32,sal_uInt32>::value_type VALUE; + typedef std::unordered_map<sal_uInt32,sal_uInt32>::value_type VALUE; AdapterToWrapperMap.insert( VALUE( (sal_uInt32) xIntAdapted.get(), (sal_uInt32) receiver.get())); WrapperToAdapterMap.insert( VALUE( (sal_uInt32) receiver.get(), (sal_uInt32) xIntAdapted.get())); } diff --git a/main/extensions/source/ole/unoobjw.cxx b/main/extensions/source/ole/unoobjw.cxx index 26504694e4..0f775ff7b5 100644 --- a/main/extensions/source/ole/unoobjw.cxx +++ b/main/extensions/source/ole/unoobjw.cxx @@ -30,7 +30,7 @@ #include <olectl.h> #include <vector> #include <list> -#include <hash_map> +#include <unordered_map> #include "comifaces.hxx" #include <tools/postsys.h> @@ -82,7 +82,7 @@ extern "C" const GUID IID_IDispatchEx; namespace ole_adapter { -unordered_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; +std::unordered_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource); static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource); static HRESULT mapCannotConvertException( CannotConvertException e, unsigned int * puArgErr); diff --git a/main/extensions/source/propctrlr/browserlistbox.hxx b/main/extensions/source/propctrlr/browserlistbox.hxx index 3d652de352..1ae8f72cc6 100644 --- a/main/extensions/source/propctrlr/browserlistbox.hxx +++ b/main/extensions/source/propctrlr/browserlistbox.hxx @@ -44,7 +44,7 @@ #include <set> #include <vector> -#include <hash_map> +#include <unordered_map> #include <boost/shared_ptr.hpp> //............................................................................ @@ -75,7 +75,7 @@ namespace pcr { } }; - typedef ::std::hash_map< ::rtl::OUString, ListBoxLine, ::rtl::OUStringHash > ListBoxLines; + typedef ::std::unordered_map< ::rtl::OUString, ListBoxLine, ::rtl::OUStringHash > ListBoxLines; typedef ::std::vector< ListBoxLines::iterator > OrderedListBoxLines; //======================================================================== diff --git a/main/extensions/source/propctrlr/eventhandler.cxx b/main/extensions/source/propctrlr/eventhandler.cxx index fde873f2b4..7ee795efd3 100644 --- a/main/extensions/source/propctrlr/eventhandler.cxx +++ b/main/extensions/source/propctrlr/eventhandler.cxx @@ -351,7 +351,7 @@ namespace pcr class EventHolder : public EventHolder_Base { private: - typedef ::std::hash_map< ::rtl::OUString, ScriptEventDescriptor, ::rtl::OUStringHash > EventMap; + typedef ::std::unordered_map< ::rtl::OUString, ScriptEventDescriptor, ::rtl::OUStringHash > EventMap; typedef ::std::map< EventId, EventMap::iterator > EventMapIndexAccess; EventMap m_aEventNameAccess; diff --git a/main/extensions/source/propctrlr/eventhandler.hxx b/main/extensions/source/propctrlr/eventhandler.hxx index b592831ffc..2e5c606da2 100644 --- a/main/extensions/source/propctrlr/eventhandler.hxx +++ b/main/extensions/source/propctrlr/eventhandler.hxx @@ -72,7 +72,7 @@ namespace pcr const rtl::OString& _sUniqueBrowseId ); }; - typedef ::std::hash_map< ::rtl::OUString, EventDescription, ::rtl::OUStringHash > EventMap; + typedef ::std::unordered_map< ::rtl::OUString, EventDescription, ::rtl::OUStringHash > EventMap; //==================================================================== //= EventHandler diff --git a/main/extensions/source/propctrlr/pcrcommontypes.hxx b/main/extensions/source/propctrlr/pcrcommontypes.hxx index 2a29d9fb89..fd36490cf9 100644 --- a/main/extensions/source/propctrlr/pcrcommontypes.hxx +++ b/main/extensions/source/propctrlr/pcrcommontypes.hxx @@ -29,14 +29,14 @@ /** === end UNO includes === **/ #include <rtl/ustring.hxx> -#include <hash_map> +#include <unordered_map> //........................................................................ namespace pcr { //........................................................................ - typedef ::std::hash_map< ::rtl::OUString, ::com::sun::star::beans::Property, ::rtl::OUStringHash > + typedef ::std::unordered_map< ::rtl::OUString, ::com::sun::star::beans::Property, ::rtl::OUStringHash > PropertyMap; //........................................................................ diff --git a/main/extensions/source/propctrlr/propcontroller.hxx b/main/extensions/source/propctrlr/propcontroller.hxx index f455bf2245..3a635e896b 100644 --- a/main/extensions/source/propctrlr/propcontroller.hxx +++ b/main/extensions/source/propctrlr/propcontroller.hxx @@ -66,7 +66,7 @@ #include <comphelper/broadcasthelper.hxx> #include <map> -#include <hash_map> +#include <unordered_map> #include <vector> #include <memory> @@ -135,7 +135,7 @@ namespace pcr typedef ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > PropertyHandlerRef; typedef ::std::vector< PropertyHandlerRef > PropertyHandlerArray; - typedef ::std::hash_map< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > + typedef ::std::unordered_map< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > PropertyHandlerRepository; typedef ::std::hash_multimap< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > PropertyHandlerMultiRepository; @@ -155,7 +155,7 @@ namespace pcr /// the property we're just committing ::rtl::OUString m_sCommittingProperty; - typedef ::std::hash_map< ::rtl::OUString, sal_uInt16, ::rtl::OUStringHash > HashString2Int16; + typedef ::std::unordered_map< ::rtl::OUString, sal_uInt16, ::rtl::OUStringHash > HashString2Int16; HashString2Int16 m_aPageIds; bool m_bContainerFocusListening; diff --git a/main/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h b/main/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h index 0ee54e12d2..21184d8a86 100644 --- a/main/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h +++ b/main/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h @@ -20,7 +20,7 @@ *************************************************************/ #include <vector> -#include <hash_map> +#include <unordered_map> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XStatusListener.hpp> @@ -32,14 +32,14 @@ typedef std::vector < com::sun::star::uno::Reference < com::sun::star::frame::XStatusListener > > StatusListeners; -typedef std::hash_map < rtl::OUString, +typedef std::unordered_map < rtl::OUString, StatusListeners, rtl::OUStringHash, std::equal_to< rtl::OUString > > ListenerMap; // For every frame there is *one* Dispatch object for all possible commands // this struct contains an array of listeners for every supported command -// these arrays are accessed by a hash_map (with the command string as index) +// these arrays are accessed by a std::unordered_map (with the command string as index) struct ListenerItem { ListenerMap aContainer; diff --git a/main/sfx2/inc/sfx2/sidebar/Theme.hxx b/main/sfx2/inc/sfx2/sidebar/Theme.hxx index 34d2b2b76d..e3b8460d34 100644 --- a/main/sfx2/inc/sfx2/sidebar/Theme.hxx +++ b/main/sfx2/inc/sfx2/sidebar/Theme.hxx @@ -34,7 +34,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> -#include <hash_map> +#include <unordered_map> #include <map> #include <boost/optional.hpp> @@ -203,7 +203,7 @@ private: bool mbIsHighContrastMode; bool mbIsHighContrastModeSetManually; - typedef ::std::hash_map<rtl::OUString,ThemeItem, rtl::OUStringHash> PropertyNameToIdMap; + typedef ::std::unordered_map<rtl::OUString,ThemeItem, rtl::OUStringHash> PropertyNameToIdMap; PropertyNameToIdMap maPropertyNameToIdMap; typedef ::std::vector<rtl::OUString> PropertyIdToNameMap; PropertyIdToNameMap maPropertyIdToNameMap; diff --git a/main/sfx2/source/appl/imagemgr.cxx b/main/sfx2/source/appl/imagemgr.cxx index 0968a86840..2ca27b625a 100644 --- a/main/sfx2/source/appl/imagemgr.cxx +++ b/main/sfx2/source/appl/imagemgr.cxx @@ -48,7 +48,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/docfac.hxx> -#include <hash_map> +#include <unordered_map> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; @@ -57,7 +57,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::ui; using namespace ::com::sun::star::frame; -typedef std::hash_map< ::rtl::OUString, +typedef std::unordered_map< ::rtl::OUString, WeakReference< XImageManager >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleIdToImagegMgr; diff --git a/main/sfx2/source/appl/newhelp.cxx b/main/sfx2/source/appl/newhelp.cxx index 7e1beb59d5..db57a794c7 100644 --- a/main/sfx2/source/appl/newhelp.cxx +++ b/main/sfx2/source/appl/newhelp.cxx @@ -41,7 +41,7 @@ #include "newhelp.hrc" #include "helpid.hrc" -#include <hash_map> +#include <unordered_map> #include <rtl/ustrbuf.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/configurationhelper.hxx> @@ -609,7 +609,7 @@ namespace sfx2 { } }; - typedef ::std::hash_map< ::rtl::OUString, int, hashOUString, equalOUString > KeywordInfo; + typedef ::std::unordered_map< ::rtl::OUString, int, hashOUString, equalOUString > KeywordInfo; } #define UNIFY_AND_INSERT_TOKEN( aToken ) \ diff --git a/main/sfx2/source/appl/workwin.cxx b/main/sfx2/source/appl/workwin.cxx index db6ee56ac9..b57fa1a78f 100644 --- a/main/sfx2/source/appl/workwin.cxx +++ b/main/sfx2/source/appl/workwin.cxx @@ -28,7 +28,7 @@ #endif #include <stdio.h> -#include <hash_map> +#include <unordered_map> #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> @@ -319,7 +319,7 @@ void SAL_CALL LayoutManagerListener::layoutEvent( //==================================================================== -typedef std::hash_map< sal_Int32, rtl::OUString > ToolBarResIdToResourceURLMap; +typedef std::unordered_map< sal_Int32, rtl::OUString > ToolBarResIdToResourceURLMap; static sal_Bool bMapInitialized = sal_False; static ToolBarResIdToResourceURLMap aResIdToResourceURLMap; diff --git a/main/sfx2/source/control/bindings.cxx b/main/sfx2/source/control/bindings.cxx index b7ddc7bc34..b1540b872c 100644 --- a/main/sfx2/source/control/bindings.cxx +++ b/main/sfx2/source/control/bindings.cxx @@ -24,7 +24,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <hash_map> +#include <unordered_map> #include <svl/itempool.hxx> #include <svl/itemiter.hxx> #include <svl/eitem.hxx> @@ -96,7 +96,7 @@ static sal_uInt16 nTimeOut = 300; static sal_uInt32 nCache1 = 0; static sal_uInt32 nCache2 = 0; -typedef std::hash_map< sal_uInt16, bool > InvalidateSlotMap; +typedef std::unordered_map< sal_uInt16, bool > InvalidateSlotMap; //==================================================================== diff --git a/main/sfx2/source/doc/Metadatable.cxx b/main/sfx2/source/doc/Metadatable.cxx index 071e31cdab..39df8b8a91 100644 --- a/main/sfx2/source/doc/Metadatable.cxx +++ b/main/sfx2/source/doc/Metadatable.cxx @@ -34,7 +34,7 @@ #include <boost/bind.hpp> #include <memory> -#include <hash_map> +#include <unordered_map> #include <list> #include <algorithm> #if OSL_DEBUG_LEVEL > 0 @@ -397,11 +397,11 @@ XmlIdRegistry::GetXmlIdForElement(const Metadatable& i_rObject) const /// generate unique xml:id template< typename T > /*static*/ ::rtl::OUString create_id(const - ::std::hash_map< ::rtl::OUString, T, ::rtl::OUStringHash > & i_rXmlIdMap) + ::std::unordered_map< ::rtl::OUString, T, ::rtl::OUStringHash > & i_rXmlIdMap) { static rtlRandomPool s_Pool( rtl_random_createPool() ); const ::rtl::OUString prefix( ::rtl::OUString::createFromAscii(s_prefix) ); - typename ::std::hash_map< ::rtl::OUString, T, ::rtl::OUStringHash > + typename ::std::unordered_map< ::rtl::OUString, T, ::rtl::OUStringHash > ::const_iterator iter; ::rtl::OUString id; do @@ -422,7 +422,7 @@ template< typename T > typedef ::std::list< Metadatable* > XmlIdList_t; /// Idref -> (content.xml element list, styles.xml element list) -typedef ::std::hash_map< ::rtl::OUString, +typedef ::std::unordered_map< ::rtl::OUString, ::std::pair< XmlIdList_t, XmlIdList_t >, ::rtl::OUStringHash > XmlIdMap_t; /// pointer hash template @@ -435,7 +435,7 @@ template<typename T> struct PtrHash }; /// element -> (stream name, idref) -typedef ::std::hash_map< const Metadatable*, +typedef ::std::unordered_map< const Metadatable*, ::std::pair< ::rtl::OUString, ::rtl::OUString>, PtrHash<Metadatable> > XmlIdReverseMap_t; @@ -918,13 +918,13 @@ struct RMapEntry }; /// element -> (stream name, idref, source) -typedef ::std::hash_map< const Metadatable*, +typedef ::std::unordered_map< const Metadatable*, struct RMapEntry, PtrHash<Metadatable> > ClipboardXmlIdReverseMap_t; /// Idref -> (content.xml element, styles.xml element) -typedef ::std::hash_map< ::rtl::OUString, +typedef ::std::unordered_map< ::rtl::OUString, ::std::pair< Metadatable*, Metadatable* >, ::rtl::OUStringHash > ClipboardXmlIdMap_t; diff --git a/main/sfx2/source/toolbox/imgmgr.cxx b/main/sfx2/source/toolbox/imgmgr.cxx index d9db942f1f..c2bc2a2075 100644 --- a/main/sfx2/source/toolbox/imgmgr.cxx +++ b/main/sfx2/source/toolbox/imgmgr.cxx @@ -25,7 +25,7 @@ #include "precompiled_sfx2.hxx" #include <stdio.h> -#include <hash_map> +#include <unordered_map> #include "sfx2/imgmgr.hxx" #include <sfx2/sfx.hrc> @@ -78,7 +78,7 @@ public: ~SfxImageManager_Impl(); }; -typedef std::hash_map< sal_Int64, sal_Int64 > SfxImageManagerMap; +typedef std::unordered_map< sal_Int64, sal_Int64 > SfxImageManagerMap; // global image lists static SfxImageManager_Impl* pGlobalImageManager = 0; diff --git a/main/sfx2/source/view/sfxbasecontroller.cxx b/main/sfx2/source/view/sfxbasecontroller.cxx index 65539939dd..82861f673d 100644 --- a/main/sfx2/source/view/sfxbasecontroller.cxx +++ b/main/sfx2/source/view/sfxbasecontroller.cxx @@ -86,7 +86,7 @@ #include <comphelper/processfactory.hxx> #include <tools/diagnose_ex.h> -#include <hash_map> +#include <unordered_map> #include <sfx2/event.hxx> #include "sfx2/viewfac.hxx" @@ -173,7 +173,7 @@ static GroupIDToCommandGroup GroupIDCommandGroupMap[] = { 0 , 0 } }; -typedef std::hash_map< sal_Int16, sal_Int16 > GroupHashMap; +typedef std::unordered_map< sal_Int16, sal_Int16 > GroupHashMap; sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID ) diff --git a/main/ucbhelper/source/provider/contenthelper.cxx b/main/ucbhelper/source/provider/contenthelper.cxx index 1998d42b47..df6fd1ed83 100644 --- a/main/ucbhelper/source/provider/contenthelper.cxx +++ b/main/ucbhelper/source/provider/contenthelper.cxx @@ -29,7 +29,7 @@ *************************************************************************/ -#include <hash_map> +#include <unordered_map> #include <com/sun/star/ucb/ContentAction.hpp> #include <com/sun/star/ucb/CommandInfoChange.hpp> #include <com/sun/star/ucb/XPersistentPropertySet.hpp> @@ -97,7 +97,7 @@ struct hashPtr } }; -typedef std::hash_map +typedef std::unordered_map < XPropertiesChangeListenerPtr, PropertyEventSequence*, diff --git a/main/ucbhelper/source/provider/providerhelper.cxx b/main/ucbhelper/source/provider/providerhelper.cxx index 1826460c9c..cd8d011d78 100644 --- a/main/ucbhelper/source/provider/providerhelper.cxx +++ b/main/ucbhelper/source/provider/providerhelper.cxx @@ -30,7 +30,7 @@ *************************************************************************/ -#include <hash_map> +#include <unordered_map> #include <com/sun/star/beans/XPropertyAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNamed.hpp> @@ -72,7 +72,7 @@ struct hashString } }; -typedef std::hash_map +typedef std::unordered_map < rtl::OUString, uno::WeakReference< ucb::XContent >, diff --git a/main/xmlscript/source/xml_helper/xml_impctx.cxx b/main/xmlscript/source/xml_helper/xml_impctx.cxx index 2055cae8e3..f8eabefd6e 100644 --- a/main/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/main/xmlscript/source/xml_helper/xml_impctx.cxx @@ -38,7 +38,7 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include <vector> -#include <hash_map> +#include <unordered_map> #include <memory> @@ -66,8 +66,8 @@ OUString getImplementationName_DocumentHandlerImpl() "com.sun.star.comp.xml.input.SaxDocumentHandler") ); } -typedef ::std::hash_map< OUString, sal_Int32, OUStringHash > t_OUString2LongMap; -typedef ::std::hash_map< sal_Int32, OUString > t_Long2OUStringMap; +typedef ::std::unordered_map< OUString, sal_Int32, OUStringHash > t_OUString2LongMap; +typedef ::std::unordered_map< sal_Int32, OUString > t_Long2OUStringMap; struct PrefixEntry { @@ -77,7 +77,7 @@ struct PrefixEntry { m_Uids.reserve( 4 ); } }; -typedef ::std::hash_map< +typedef ::std::unordered_map< OUString, PrefixEntry *, OUStringHash > t_OUString2PrefixMap; struct ElementEntry
