diff options
author | Fridrich Strba <fridrich.strba@bluewin.ch> | 2011-02-03 16:55:17 -0700 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-04 01:10:15 +0100 |
commit | e99fcbe58ef7533da06ee4658a4ee2cde4df58ea (patch) | |
tree | 2dffe52eb92af74244d25f19613b1af187d9eab7 /unotools/source | |
parent | fad7c8f3e0d0518b1a6411d53d5d0a3a43adf119 (diff) |
Bulk move libs-gui to boost unordered containers
Diffstat (limited to 'unotools/source')
-rw-r--r-- | unotools/source/config/cmdoptions.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/eventcfg.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/extendedsecurityoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/fontcfg.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/optionsdlg.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/pathoptions.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/viewoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/misc/atom.cxx | 26 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 4 |
9 files changed, 33 insertions, 33 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 3d8fea23c175..84a48390780d 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -46,7 +46,7 @@ #include <itemholder1.hxx> #include <algorithm> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // namespaces @@ -143,7 +143,7 @@ class SvtCmdOptions } private: - class CommandHashMap : public ::std::hash_map< ::rtl::OUString , + class CommandHashMap : public ::boost::unordered_map< ::rtl::OUString , sal_Int32 , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > @@ -292,7 +292,7 @@ SvtCommandOptions_Impl::SvtCommandOptions_Impl() sal_Int32 nItem = 0 ; OUString sCmd ; - // Set size of hash_map reach a used size of approx. 60% + // Set size of boost::unordered_map reach a used size of approx. 60% m_aDisabledCommands.SetContainerSize( lNames.getLength() * 10 / 6 ); // Get names/values for disabled commands. @@ -343,7 +343,7 @@ void SvtCommandOptions_Impl::Notify( const Sequence< OUString >& ) sal_Int32 nItem = 0 ; OUString sCmd ; - // Set size of hash_map reach a used size of approx. 60% + // Set size of boost::unordered_map reach a used size of approx. 60% m_aDisabledCommands.Clear(); m_aDisabledCommands.SetContainerSize( lNames.getLength() * 10 / 6 ); diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 5008c70cdb92..a1dbcda74e0b 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <cppuhelper/weakref.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <tools/urlobj.hxx> #include <rtl/ustrbuf.hxx> diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index db64545f9acb..12598f4fb9ab 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -45,7 +45,7 @@ #include <unotools/pathoptions.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <rtl/logfile.hxx> #include "itemholder1.hxx" @@ -86,7 +86,7 @@ struct OUStringHashCode } }; -class ExtensionHashMap : public ::std::hash_map< ::rtl::OUString, +class ExtensionHashMap : public ::boost::unordered_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index 4da4652e7d6b..da61509cd20b 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -193,7 +193,7 @@ OUString DefaultFontConfiguration::tryLocale( const Locale& rLocale, const OUStr { OUString aRet; - std::hash_map< Locale, LocaleAccess, LocaleHash >::const_iterator it = + boost::unordered_map< Locale, LocaleAccess, LocaleHash >::const_iterator it = m_aConfig.find( rLocale ); if( it != m_aConfig.end() ) { @@ -1093,7 +1093,7 @@ unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::R void FontSubstConfiguration::readLocaleSubst( const com::sun::star::lang::Locale& rLocale ) const { - std::hash_map< Locale, LocaleSubst, LocaleHash >::const_iterator it = + boost::unordered_map< Locale, LocaleSubst, LocaleHash >::const_iterator it = m_aSubst.find( rLocale ); if( it != m_aSubst.end() ) { @@ -1193,7 +1193,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const String& rFontNam while( aLocale.Language.getLength() ) { - std::hash_map< Locale, LocaleSubst, LocaleHash >::const_iterator lang = m_aSubst.find( aLocale ); + boost::unordered_map< Locale, LocaleSubst, LocaleHash >::const_iterator lang = m_aSubst.find( aLocale ); if( lang != m_aSubst.end() ) { if( ! lang->second.bConfigRead ) diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index c922b1f2353b..b3a5f1dc8674 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -38,7 +38,7 @@ #include <osl/mutex.hxx> #include <comphelper/stl_types.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include "itemholder1.hxx" using namespace utl; @@ -66,7 +66,7 @@ private: } }; - typedef std::hash_map< OUString, sal_Bool, OUStringHashCode, ::std::equal_to< OUString > > OptionNodeList; + typedef boost::unordered_map< OUString, sal_Bool, OUStringHashCode, ::std::equal_to< OUString > > OptionNodeList; OUString m_sPathDelimiter; OptionNodeList m_aOptionNodeList; diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index 08042048c74b..1715a0e5ea5f 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -55,7 +55,7 @@ #include <itemholder1.hxx> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> using namespace osl; using namespace utl; @@ -106,19 +106,19 @@ enum VarNameProperty VAR_NEEDS_FILEURL }; -class NameToHandleMap : public ::std::hash_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > +class NameToHandleMap : public ::boost::unordered_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > { public: inline void free() { NameToHandleMap().swap( *this ); } }; -class EnumToHandleMap : public ::std::hash_map< sal_Int32, sal_Int32, std::hash< sal_Int32 >, std::equal_to< sal_Int32 > > +class EnumToHandleMap : public ::boost::unordered_map< sal_Int32, sal_Int32, std::hash< sal_Int32 >, std::equal_to< sal_Int32 > > { public: inline void free() { EnumToHandleMap().swap( *this ); } }; -class VarNameToEnumMap : public ::std::hash_map< OUString, VarNameProperty, OUStringHashCode, ::std::equal_to< OUString > > +class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHashCode, ::std::equal_to< OUString > > { public: inline void free() { VarNameToEnumMap().swap( *this ); } diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index f3b93da38189..a1fc4a59a8a9 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -35,7 +35,7 @@ #include <unotools/viewoptions.hxx> #include <com/sun/star/uno/Any.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -273,7 +273,7 @@ struct IMPL_TStringHashCode } }; -typedef ::std::hash_map< ::rtl::OUString , +typedef ::boost::unordered_map< ::rtl::OUString , IMPL_TViewData , IMPL_TStringHashCode , ::std::equal_to< ::rtl::OUString > > IMPL_TViewHash; diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx index f0e73014bf89..c0070d18ebb8 100644 --- a/unotools/source/misc/atom.cxx +++ b/unotools/source/misc/atom.cxx @@ -47,7 +47,7 @@ AtomProvider::~AtomProvider() int AtomProvider::getAtom( const ::rtl::OUString& rString, sal_Bool bCreate ) { - ::std::hash_map< ::rtl::OUString, int, ::rtl::OUStringHash >::iterator it = m_aAtomMap.find( rString ); + ::boost::unordered_map< ::rtl::OUString, int, ::rtl::OUStringHash >::iterator it = m_aAtomMap.find( rString ); if( it != m_aAtomMap.end() ) return it->second; if( ! bCreate ) @@ -61,7 +61,7 @@ int AtomProvider::getAtom( const ::rtl::OUString& rString, sal_Bool bCreate ) void AtomProvider::getAll( ::std::list< ::utl::AtomDescription >& atoms ) { atoms.clear(); - ::std::hash_map< ::rtl::OUString, int, ::rtl::OUStringHash >::const_iterator it = m_aAtomMap.begin(); + ::boost::unordered_map< ::rtl::OUString, int, ::rtl::OUStringHash >::const_iterator it = m_aAtomMap.begin(); ::utl::AtomDescription aDesc; while( it != m_aAtomMap.end() ) @@ -77,7 +77,7 @@ void AtomProvider::getRecent( int atom, ::std::list< ::utl::AtomDescription >& a { atoms.clear(); - ::std::hash_map< ::rtl::OUString, int, ::rtl::OUStringHash >::const_iterator it = m_aAtomMap.begin(); + ::boost::unordered_map< ::rtl::OUString, int, ::rtl::OUStringHash >::const_iterator it = m_aAtomMap.begin(); ::utl::AtomDescription aDesc; while( it != m_aAtomMap.end() ) @@ -95,7 +95,7 @@ void AtomProvider::getRecent( int atom, ::std::list< ::utl::AtomDescription >& a const ::rtl::OUString& AtomProvider::getString( int nAtom ) const { static ::rtl::OUString aEmpty; - ::std::hash_map< int, ::rtl::OUString, ::std::hash< int > >::const_iterator it = m_aStringMap.find( nAtom ); + ::boost::unordered_map< int, ::rtl::OUString, ::std::hash< int > >::const_iterator it = m_aStringMap.find( nAtom ); return it == m_aStringMap.end() ? aEmpty : it->second; } @@ -121,14 +121,14 @@ MultiAtomProvider::MultiAtomProvider() MultiAtomProvider::~MultiAtomProvider() { - for( ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::iterator it = m_aAtomLists.begin(); it != m_aAtomLists.end(); ++it ) + for( ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::iterator it = m_aAtomLists.begin(); it != m_aAtomLists.end(); ++it ) delete it->second; } sal_Bool MultiAtomProvider::insertAtomClass( int atomClass ) { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::iterator it = + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return sal_False; @@ -138,7 +138,7 @@ sal_Bool MultiAtomProvider::insertAtomClass( int atomClass ) int MultiAtomProvider::getAtom( int atomClass, const ::rtl::OUString& rString, sal_Bool bCreate ) { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::iterator it = + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return it->second->getAtom( rString, bCreate ); @@ -154,7 +154,7 @@ int MultiAtomProvider::getAtom( int atomClass, const ::rtl::OUString& rString, s int MultiAtomProvider::getLastAtom( int atomClass ) const { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); return it != m_aAtomLists.end() ? it->second->getLastAtom() : INVALID_ATOM; @@ -162,7 +162,7 @@ int MultiAtomProvider::getLastAtom( int atomClass ) const void MultiAtomProvider::getRecent( int atomClass, int atom, ::std::list< ::utl::AtomDescription >& atoms ) { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) it->second->getRecent( atom, atoms ); @@ -172,7 +172,7 @@ void MultiAtomProvider::getRecent( int atomClass, int atom, ::std::list< ::utl:: const ::rtl::OUString& MultiAtomProvider::getString( int atomClass, int atom ) const { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return it->second->getString( atom ); @@ -183,13 +183,13 @@ const ::rtl::OUString& MultiAtomProvider::getString( int atomClass, int atom ) c sal_Bool MultiAtomProvider::hasAtom( int atomClass, int atom ) const { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); return it != m_aAtomLists.end() ? it->second->hasAtom( atom ) : sal_False; } void MultiAtomProvider::getClass( int atomClass, ::std::list< ::utl::AtomDescription >& atoms) const { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) it->second->getAll( atoms ); @@ -199,7 +199,7 @@ void MultiAtomProvider::getClass( int atomClass, ::std::list< ::utl::AtomDescrip void MultiAtomProvider::overrideAtom( int atomClass, int atom, const ::rtl::OUString& description ) { - ::std::hash_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); + ::boost::unordered_map< int, AtomProvider*, ::std::hash< int > >::const_iterator it = m_aAtomLists.find( atomClass ); if( it == m_aAtomLists.end() ) m_aAtomLists[ atomClass ] = new AtomProvider(); m_aAtomLists[ atomClass ]->overrideAtom( atom, description ); diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index f03290aef4f8..58121bd85ed0 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -30,7 +30,7 @@ #include "precompiled_unotools.hxx" #include <unotools/fontdefs.hxx> #include <unotools/fontcfg.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> struct ImplLocalizedFontName { @@ -413,7 +413,7 @@ void GetEnglishSearchFontName( String& rName ) // translate normalized localized name to its normalized English ASCII name if( bNeedTranslation ) { - typedef std::hash_map<const String, const char*,FontNameHash> FontNameDictionary; + typedef boost::unordered_map<const String, const char*,FontNameHash> FontNameDictionary; static FontNameDictionary aDictionary( sizeof(aImplLocalizedNamesList) / sizeof(*aImplLocalizedNamesList) ); // the font name dictionary needs to be intialized once if( aDictionary.empty() ) |