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/misc | |
parent | fad7c8f3e0d0518b1a6411d53d5d0a3a43adf119 (diff) |
Bulk move libs-gui to boost unordered containers
Diffstat (limited to 'unotools/source/misc')
-rw-r--r-- | unotools/source/misc/atom.cxx | 26 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 4 |
2 files changed, 15 insertions, 15 deletions
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() ) |