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 /vcl/unx/source | |
parent | fad7c8f3e0d0518b1a6411d53d5d0a3a43adf119 (diff) |
Bulk move libs-gui to boost unordered containers
Diffstat (limited to 'vcl/unx/source')
-rw-r--r-- | vcl/unx/source/dtrans/X11_selection.cxx | 54 | ||||
-rw-r--r-- | vcl/unx/source/dtrans/X11_selection.hxx | 14 | ||||
-rw-r--r-- | vcl/unx/source/dtrans/X11_service.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/source/fontmanager/fontconfig.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/source/fontmanager/fontmanager.cxx | 86 | ||||
-rw-r--r-- | vcl/unx/source/gdi/pspgraphics.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi3.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salprnpsp.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/source/printer/cupsmgr.cxx | 20 | ||||
-rw-r--r-- | vcl/unx/source/printer/ppdparser.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/source/printer/printerinfomanager.cxx | 38 | ||||
-rw-r--r-- | vcl/unx/source/printergfx/common_gfx.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/source/printergfx/glyphset.hxx | 6 | ||||
-rw-r--r-- | vcl/unx/source/printergfx/text_gfx.cxx | 4 |
14 files changed, 140 insertions, 140 deletions
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx index dcadf9cb7ec6..b2ac2fdad30c 100644 --- a/vcl/unx/source/dtrans/X11_selection.cxx +++ b/vcl/unx/source/dtrans/X11_selection.cxx @@ -209,9 +209,9 @@ rtl_TextEncoding x11::getTextPlainEncoding( const OUString& rMimeType ) // ------------------------------------------------------------------------ -::std::hash_map< OUString, SelectionManager*, OUStringHash >& SelectionManager::getInstances() +::boost::unordered_map< OUString, SelectionManager*, OUStringHash >& SelectionManager::getInstances() { - static ::std::hash_map< OUString, SelectionManager*, OUStringHash > aInstances; + static ::boost::unordered_map< OUString, SelectionManager*, OUStringHash > aInstances; return aInstances; } @@ -478,7 +478,7 @@ SelectionManager::~SelectionManager() { osl::MutexGuard aGuard( *osl::Mutex::getGlobalMutex() ); - ::std::hash_map< OUString, SelectionManager*, OUStringHash >::iterator it; + ::boost::unordered_map< OUString, SelectionManager*, OUStringHash >::iterator it; for( it = getInstances().begin(); it != getInstances().end(); ++it ) if( it->second == this ) { @@ -543,7 +543,7 @@ SelectionManager::~SelectionManager() SelectionAdaptor* SelectionManager::getAdaptor( Atom selection ) { - ::std::hash_map< Atom, Selection* >::iterator it = + ::boost::unordered_map< Atom, Selection* >::iterator it = m_aSelections.find( selection ); return it != m_aSelections.end() ? it->second->m_pAdaptor : NULL; } @@ -710,7 +710,7 @@ SelectionManager& SelectionManager::get( const OUString& rDisplayName ) aDisplayName = OStringToOUString( getenv( "DISPLAY" ), RTL_TEXTENCODING_ISO_8859_1 ); SelectionManager* pInstance = NULL; - ::std::hash_map< OUString, SelectionManager*, OUStringHash >::iterator it = getInstances().find( aDisplayName ); + ::boost::unordered_map< OUString, SelectionManager*, OUStringHash >::iterator it = getInstances().find( aDisplayName ); if( it != getInstances().end() ) pInstance = it->second; else pInstance = getInstances()[ aDisplayName ] = new SelectionManager(); @@ -724,7 +724,7 @@ const OUString& SelectionManager::getString( Atom aAtom ) { osl::MutexGuard aGuard(m_aMutex); - ::std::hash_map< Atom, OUString >::const_iterator it; + ::boost::unordered_map< Atom, OUString >::const_iterator it; if( ( it = m_aAtomToString.find( aAtom ) ) == m_aAtomToString.end() ) { static OUString aEmpty; @@ -745,7 +745,7 @@ Atom SelectionManager::getAtom( const OUString& rString ) { osl::MutexGuard aGuard(m_aMutex); - ::std::hash_map< OUString, Atom, OUStringHash >::const_iterator it; + ::boost::unordered_map< OUString, Atom, OUStringHash >::const_iterator it; if( ( it = m_aStringToAtom.find( rString ) ) == m_aStringToAtom.end() ) { static Atom nNoDisplayAtoms = 1; @@ -900,7 +900,7 @@ OUString SelectionManager::convertTypeFromNative( Atom nType, Atom selection, in bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData ) { osl::ResettableMutexGuard aGuard(m_aMutex); - ::std::hash_map< Atom, Selection* >::iterator it; + ::boost::unordered_map< Atom, Selection* >::iterator it; bool bSuccess = false; #if OSL_DEBUG_LEVEL > 1 @@ -1040,7 +1040,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp { bool bSuccess = false; - ::std::hash_map< Atom, Selection* >::iterator it; + ::boost::unordered_map< Atom, Selection* >::iterator it; { osl::MutexGuard aGuard(m_aMutex); @@ -1250,7 +1250,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >& rTypes ) { - ::std::hash_map< Atom, Selection* >::iterator it; + ::boost::unordered_map< Atom, Selection* >::iterator it; { osl::MutexGuard aGuard(m_aMutex); @@ -1455,7 +1455,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor > PixmapHolder* SelectionManager::getPixmapHolder( Atom selection ) { - std::hash_map< Atom, Selection* >::const_iterator it = m_aSelections.find( selection ); + boost::unordered_map< Atom, Selection* >::const_iterator it = m_aSelections.find( selection ); if( it == m_aSelections.end() ) return NULL; if( ! it->second->m_pPixmap ) @@ -1577,10 +1577,10 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "using INCR protocol\n" ); - std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >::const_iterator win_it = m_aIncrementals.find( requestor ); + boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > >::const_iterator win_it = m_aIncrementals.find( requestor ); if( win_it != m_aIncrementals.end() ) { - std::hash_map< Atom, IncrementalTransfer >::const_iterator inc_it = win_it->second.find( property ); + boost::unordered_map< Atom, IncrementalTransfer >::const_iterator inc_it = win_it->second.find( property ); if( inc_it != win_it->second.end() ) { const IncrementalTransfer& rInc = inc_it->second; @@ -1851,7 +1851,7 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify ) #endif bool bHandled = false; - ::std::hash_map< Atom, Selection* >::iterator it = + ::boost::unordered_map< Atom, Selection* >::iterator it = m_aSelections.find( rNotify.atom ); if( it != m_aSelections.end() && rNotify.state == PropertyNewValue && @@ -1976,13 +1976,13 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify ) // feed incrementals if( rNotify.state == PropertyDelete ) { - std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >::iterator it; + boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > >::iterator it; it = m_aIncrementals.find( rNotify.window ); if( it != m_aIncrementals.end() ) { bHandled = true; int nCurrentTime = time( NULL ); - std::hash_map< Atom, IncrementalTransfer >::iterator inc_it; + boost::unordered_map< Atom, IncrementalTransfer >::iterator inc_it; // throw out aborted transfers std::list< Atom > aTimeouts; for( inc_it = it->second.begin(); inc_it != it->second.end(); ++inc_it ) @@ -2080,7 +2080,7 @@ bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify ) if( rNotify.requestor != m_aWindow && rNotify.requestor != m_aCurrentDropWindow ) fprintf( stderr, "Warning: selection notify for unknown window 0x%lx\n", rNotify.requestor ); #endif - ::std::hash_map< Atom, Selection* >::iterator it = + ::boost::unordered_map< Atom, Selection* >::iterator it = m_aSelections.find( rNotify.selection ); if ( (rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow) && @@ -2163,7 +2163,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) bool bHandled = false; - ::std::hash_map< XLIB_Window, DropTargetEntry >::iterator it = + ::boost::unordered_map< XLIB_Window, DropTargetEntry >::iterator it = m_aDropTargets.find( aTarget ); #if OSL_DEBUG_LEVEL > 1 @@ -2539,7 +2539,7 @@ void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime ) if( m_bDropSent ) return; - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( m_aDropWindow ); if( it != m_aDropTargets.end() ) { @@ -2602,7 +2602,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) bool bHandled = false; // for shortcut - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( m_aDropWindow ); #if OSL_DEBUG_LEVEL > 1 switch( rMessage.type ) @@ -3103,7 +3103,7 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) dsde.DropAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; dsde.UserAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it; + ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it; if( aNewCurrentWindow != m_aDropWindow ) { #if OSL_DEBUG_LEVEL > 1 @@ -3258,7 +3258,7 @@ void SelectionManager::startDrag( int root_x, root_y, win_x, win_y; unsigned int mask; - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it; + ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it; it = m_aDropTargets.begin(); while( it != m_aDropTargets.end() ) { @@ -3663,7 +3663,7 @@ bool SelectionManager::handleXEvent( XEvent& rEvent ) ); #endif SelectionAdaptor* pAdaptor = getAdaptor( rEvent.xselectionclear.selection ); - std::hash_map< Atom, Selection* >::iterator it( m_aSelections.find( rEvent.xselectionclear.selection ) ); + boost::unordered_map< Atom, Selection* >::iterator it( m_aSelections.find( rEvent.xselectionclear.selection ) ); if( it != m_aSelections.end() ) it->second->m_bOwner = false; aGuard.clear(); @@ -3791,7 +3791,7 @@ void SelectionManager::run( void* pThis ) osl::ClearableMutexGuard aGuard(This->m_aMutex); std::list< std::pair< SelectionAdaptor*, Reference< XInterface > > > aChangeList; - for( std::hash_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it ) + for( boost::unordered_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it ) { if( it->first != This->m_nXdndSelection && ! it->second->m_bOwner ) { @@ -3938,7 +3938,7 @@ void SelectionManager::deregisterHandler( Atom selection ) { osl::MutexGuard aGuard(m_aMutex); - ::std::hash_map< Atom, Selection* >::iterator it = + ::boost::unordered_map< Atom, Selection* >::iterator it = m_aSelections.find( selection ); if( it != m_aSelections.end() ) { @@ -3967,7 +3967,7 @@ void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTar osl::MutexGuard aGuard(m_aMutex); // sanity check - ::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( aWindow ); if( it != m_aDropTargets.end() ) OSL_ASSERT( "attempt to register window as drop target twice" ); @@ -4014,7 +4014,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) if( aWindow == m_aDragSourceWindow && m_aDragRunning.check() ) { // abort drag - std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it = + boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( m_aDropWindow ); if( it != m_aDropTargets.end() ) { diff --git a/vcl/unx/source/dtrans/X11_selection.hxx b/vcl/unx/source/dtrans/X11_selection.hxx index fb01b95a4335..28ff488c5627 100644 --- a/vcl/unx/source/dtrans/X11_selection.hxx +++ b/vcl/unx/source/dtrans/X11_selection.hxx @@ -43,7 +43,7 @@ #include <osl/conditn.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <list> #include "tools/prex.h" @@ -163,7 +163,7 @@ namespace x11 { >, public SelectionAdaptor { - static ::std::hash_map< ::rtl::OUString, SelectionManager*, ::rtl::OUStringHash >& getInstances(); + static ::boost::unordered_map< ::rtl::OUString, SelectionManager*, ::rtl::OUStringHash >& getInstances(); // for INCR type selection transfer // INCR protocol is used if the data cannot @@ -335,7 +335,7 @@ namespace x11 { // drag and drop int m_nCurrentProtocolVersion; - ::std::hash_map< XLIB_Window, DropTargetEntry > + ::boost::unordered_map< XLIB_Window, DropTargetEntry > m_aDropTargets; @@ -366,16 +366,16 @@ namespace x11 { Atom m_nXdndActionPrivate; // caching for atoms - ::std::hash_map< Atom, ::rtl::OUString > + ::boost::unordered_map< Atom, ::rtl::OUString > m_aAtomToString; - ::std::hash_map< ::rtl::OUString, Atom, ::rtl::OUStringHash > + ::boost::unordered_map< ::rtl::OUString, Atom, ::rtl::OUStringHash > m_aStringToAtom; // the registered selections - ::std::hash_map< Atom, Selection* > + ::boost::unordered_map< Atom, Selection* > m_aSelections; // IncrementalTransfers in progress - std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > > + boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > > m_aIncrementals; // do not use X11 multithreading capabilities diff --git a/vcl/unx/source/dtrans/X11_service.cxx b/vcl/unx/source/dtrans/X11_service.cxx index 3eab180f8fec..b9ec35fc23e1 100644 --- a/vcl/unx/source/dtrans/X11_service.cxx +++ b/vcl/unx/source/dtrans/X11_service.cxx @@ -72,7 +72,7 @@ Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames() Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments ) { - static std::hash_map< OUString, ::std::hash_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances; + static boost::unordered_map< OUString, ::boost::unordered_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances; OUString aDisplayName; Atom nSelection; @@ -108,8 +108,8 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& nSelection = rManager.getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("CLIPBOARD")) ); } - ::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] ); - ::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection ); + ::boost::unordered_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] ); + ::boost::unordered_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection ); if( it != rMap.end() ) return it->second; diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx index eddb455c2b07..d41093372990 100644 --- a/vcl/unx/source/fontmanager/fontconfig.cxx +++ b/vcl/unx/source/fontmanager/fontconfig.cxx @@ -263,8 +263,8 @@ public: FcResult LocalizedElementFromPattern(FcPattern* pPattern, FcChar8 **family, const char *elementtype, const char *elementlangtype); //to-do, make private and add some cleanish accessor methods - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aFontNameToLocalized; - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aLocalizedToCanonical; + boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aFontNameToLocalized; + boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aLocalizedToCanonical; private: void cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector< lang_and_element > &lang_and_elements); }; @@ -688,7 +688,7 @@ namespace } } -int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl::OStringHash>& o_rVisitedPaths ) +int PrintFontManager::countFontconfigFonts( boost::unordered_map<rtl::OString, int, rtl::OStringHash>& o_rVisitedPaths ) { int nFonts = 0; @@ -1042,7 +1042,7 @@ rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName, if( eFileRes == FcResultMatch ) { OString sFamily((sal_Char*)family); - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aFontNameToLocalized.find(sFamily); + boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aFontNameToLocalized.find(sFamily); if (aI != rWrapper.m_aFontNameToLocalized.end()) sFamily = aI->second; aName = rtl::OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 ); @@ -1101,7 +1101,7 @@ bool PrintFontManager::getFontOptions( OString sFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); - std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); + boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); if (aI != rWrapper.m_aLocalizedToCanonical.end()) sFamily = aI->second; if( sFamily.getLength() ) @@ -1242,7 +1242,7 @@ bool PrintFontManager::initFontconfig() return false; } -int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl::OStringHash>& ) +int PrintFontManager::countFontconfigFonts( boost::unordered_map<rtl::OString, int, rtl::OStringHash>& ) { return 0; } diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx index 416a48cae2c9..9c59bf9af524 100644 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ b/vcl/unx/source/fontmanager/fontmanager.cxx @@ -75,7 +75,7 @@ #include "sal/alloca.h" #include <set> -#include <hash_set> +#include <boost/unordered_set.hpp> #include <algorithm> #include "adobeenc.tab" // get encoding table for AFM metrics @@ -487,8 +487,8 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr if( pImplTTFont->nkern && pImplTTFont->kerntype == KT_MICROSOFT ) { // create a glyph -> character mapping - ::std::hash_map< sal_uInt16, sal_Unicode > aGlyphMap; - ::std::hash_map< sal_uInt16, sal_Unicode >::iterator left, right; + ::boost::unordered_map< sal_uInt16, sal_Unicode > aGlyphMap; + ::boost::unordered_map< sal_uInt16, sal_Unicode >::iterator left, right; for( i = 21; i < 0xfffd; i++ ) { sal_uInt16 nGlyph = MapChar( pTTFont, (sal_Unicode)i, 0 ); // kerning for horz only @@ -587,8 +587,8 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr if( pImplTTFont->nkern && pImplTTFont->kerntype == KT_APPLE_NEW ) { // create a glyph -> character mapping - ::std::hash_map< sal_uInt16, sal_Unicode > aGlyphMap; - ::std::hash_map< sal_uInt16, sal_Unicode >::iterator left, right; + ::boost::unordered_map< sal_uInt16, sal_Unicode > aGlyphMap; + ::boost::unordered_map< sal_uInt16, sal_Unicode >::iterator left, right; for( i = 21; i < 0xfffd; i++ ) { sal_uInt16 nGlyph = MapChar( pTTFont, (sal_Unicode)i, 0 ); // kerning for horz only @@ -731,7 +731,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr */ static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyName ) { - static std::hash_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 ); + static boost::unordered_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 ); if( aPSNameToFamily.empty() ) // initialization { aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow" ) ) ] = @@ -743,7 +743,7 @@ static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyNa aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Oblique" ) ) ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) ); } - std::hash_map<OUString,OUString,OUStringHash>::const_iterator it = + boost::unordered_map<OUString,OUString,OUStringHash>::const_iterator it = aPSNameToFamily.find( i_rPSname ); bool bReplaced = (it != aPSNameToFamily.end() ); if( bReplaced ) @@ -1083,8 +1083,8 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult } else if( pChar->code != -1 ) { - ::std::pair< ::std::hash_multimap< sal_uInt8, sal_Unicode >::const_iterator, - ::std::hash_multimap< sal_uInt8, sal_Unicode >::const_iterator > + ::std::pair< ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator, + ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator > aCodes = rManager.getUnicodeFromAdobeCode( pChar->code ); while( aCodes.first != aCodes.second ) { @@ -1192,12 +1192,12 @@ PrintFontManager::PrintFontManager() : { for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAdobeCodes ); i++ ) { - m_aUnicodeToAdobename.insert( ::std::hash_multimap< sal_Unicode, ::rtl::OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); - m_aAdobenameToUnicode.insert( ::std::hash_multimap< ::rtl::OString, sal_Unicode, ::rtl::OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); + m_aUnicodeToAdobename.insert( ::boost::unordered_multimap< sal_Unicode, ::rtl::OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); + m_aAdobenameToUnicode.insert( ::boost::unordered_multimap< ::rtl::OString, sal_Unicode, ::rtl::OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); if( aAdobeCodes[i].aAdobeStandardCode ) { - m_aUnicodeToAdobecode.insert( ::std::hash_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); - m_aAdobecodeToUnicode.insert( ::std::hash_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) ); + m_aUnicodeToAdobecode.insert( ::boost::unordered_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); + m_aAdobecodeToUnicode.insert( ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) ); } } } @@ -1207,7 +1207,7 @@ PrintFontManager::PrintFontManager() : PrintFontManager::~PrintFontManager() { deinitFontconfig(); - for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) delete (*it).second; delete m_pAtoms; if( m_pFontCache ) @@ -1218,7 +1218,7 @@ PrintFontManager::~PrintFontManager() const OString& PrintFontManager::getDirectory( int nAtom ) const { - ::std::hash_map< int, OString >::const_iterator it( m_aAtomToDir.find( nAtom ) ); + ::boost::unordered_map< int, OString >::const_iterator it( m_aAtomToDir.find( nAtom ) ); return it != m_aAtomToDir.end() ? it->second : s_aEmptyOString; } @@ -1227,7 +1227,7 @@ const OString& PrintFontManager::getDirectory( int nAtom ) const int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate ) { int nAtom = 0; - ::std::hash_map< OString, int, OStringHash >::const_iterator it + ::boost::unordered_map< OString, int, OStringHash >::const_iterator it ( m_aDirToAtom.find( rDirectory ) ); if( it != m_aDirToAtom.end() ) nAtom = it->second; @@ -1411,7 +1411,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, co fontID PrintFontManager::findFontBuiltinID( int nPSNameAtom ) const { fontID nID = 0; - ::std::hash_map< fontID, PrintFont* >::const_iterator it; + ::boost::unordered_map< fontID, PrintFont* >::const_iterator it; for( it = m_aFonts.begin(); nID == 0 && it != m_aFonts.end(); ++it ) { if( it->second->m_eType == fonttype::Builtin && @@ -1427,12 +1427,12 @@ fontID PrintFontManager::findFontFileID( int nDirID, const OString& rFontFile ) { fontID nID = 0; - ::std::hash_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile ); + ::boost::unordered_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile ); if( set_it != m_aFontFileToFontID.end() ) { for( ::std::set< fontID >::const_iterator font_it = set_it->second.begin(); font_it != set_it->second.end() && ! nID; ++font_it ) { - ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it ); + ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it ); if( it != m_aFonts.end() ) { switch( it->second->m_eType ) @@ -2117,7 +2117,7 @@ void PrintFontManager::initialize() // initialize may be called twice in the future { - for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) delete (*it).second; m_nNextFontID = 1; m_aFonts.clear(); @@ -2169,7 +2169,7 @@ void PrintFontManager::initialize() } // protect against duplicate paths - std::hash_map< OString, int, OStringHash > visited_dirs; + boost::unordered_map< OString, int, OStringHash > visited_dirs; // now that all global and local font dirs are known to fontconfig // check that there are fonts actually managed by fontconfig @@ -2235,7 +2235,7 @@ void PrintFontManager::initialize() if( pDIR ) { // read fonts.dir if possible - ::std::hash_map< OString, ::std::list<OString>, OStringHash > aFontsDir; + ::boost::unordered_map< OString, ::std::list<OString>, OStringHash > aFontsDir; int nDirID = getDirectoryAtom( aPath, true ); // #i38367# no fonts.dir in our own directories anymore std::list< int >::const_iterator priv_dir; @@ -2283,7 +2283,7 @@ void PrintFontManager::initialize() if( findFontFileID( nDirID, aFileName ) == 0 ) { ::std::list<OString> aXLFDs; - ::std::hash_map< OString, ::std::list<OString>, OStringHash >::const_iterator it = + ::boost::unordered_map< OString, ::std::list<OString>, OStringHash >::const_iterator it = aFontsDir.find( aFileName ); if( it != aFontsDir.end() ) aXLFDs = (*it).second; @@ -2414,10 +2414,10 @@ void PrintFontManager::initialize() #endif // part three - fill in family styles - ::std::hash_map< fontID, PrintFont* >::iterator font_it; + ::boost::unordered_map< fontID, PrintFont* >::iterator font_it; for (font_it = m_aFonts.begin(); font_it != m_aFonts.end(); ++font_it) { - ::std::hash_map< int, family::type >::const_iterator it = + ::boost::unordered_map< int, family::type >::const_iterator it = m_aFamilyTypes.find( font_it->second->m_nFamilyName ); if (it != m_aFamilyTypes.end()) continue; @@ -2515,7 +2515,7 @@ namespace { void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDParser* pParser, bool bUseOverrideMetrics ) { rFontIDs.clear(); - std::hash_map< fontID, PrintFont* >::const_iterator it; + boost::unordered_map< fontID, PrintFont* >::const_iterator it; /* * Note: there are two easy steps making this faster: @@ -2537,7 +2537,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDPa if( pParser ) { std::set<int> aBuiltinPSNames; - std::hash_set< BuiltinFontIdentifier, + boost::unordered_set< BuiltinFontIdentifier, BuiltinFontIdentifierHash > aBuiltinFonts; @@ -2548,7 +2548,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDPa for( std::vector<fontID>::const_iterator over = m_aOverrideFonts.begin(); over != m_aOverrideFonts.end(); ++over ) { - std::hash_map<fontID,PrintFont*>::const_iterator font_it = m_aFonts.find( *over ); + boost::unordered_map<fontID,PrintFont*>::const_iterator font_it = m_aFonts.find( *over ); DBG_ASSERT( font_it != m_aFonts.end(), "override to nonexistant font" ); if( font_it != m_aFonts.end() ) aOverridePSNames[ font_it->second->m_nPSName ] = *over; @@ -2638,7 +2638,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDPa void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const { - ::std::hash_map< int, family::type >::const_iterator style_it = + ::boost::unordered_map< int, family::type >::const_iterator style_it = m_aFamilyTypes.find( pFont->m_nFamilyName ); rInfo.m_eType = pFont->m_eType; rInfo.m_aFamilyName = m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ); @@ -2855,7 +2855,7 @@ family::type PrintFontManager::getFontFamilyType( fontID nFontID ) const if( !pFont ) return family::Unknown; - ::std::hash_map< int, family::type >::const_iterator it = + ::boost::unordered_map< int, family::type >::const_iterator it = m_aFamilyTypes.find( pFont->m_nFamilyName ); return (it != m_aFamilyTypes.end()) ? it->second : family::Unknown; } @@ -2909,7 +2909,7 @@ OString PrintFontManager::getFontFile( PrintFont* pFont ) const if( pFont && pFont->m_eType == fonttype::Type1 ) { Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); - ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory ); + ::boost::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory ); aPath = it->second; aPath += "/"; aPath += pPSFont->m_aFontFile; @@ -2917,7 +2917,7 @@ OString PrintFontManager::getFontFile( PrintFont* pFont ) const else if( pFont && pFont->m_eType == fonttype::TrueType ) { TrueTypeFontFile* pTTFont = static_cast< TrueTypeFontFile* >(pFont); - ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pTTFont->m_nDirectory ); + ::boost::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find( pTTFont->m_nDirectory ); aPath = it->second; aPath += "/"; aPath += pTTFont->m_aFontFile; @@ -3031,7 +3031,7 @@ void PrintFontManager::hasVerticalSubstitutions( fontID nFontID, if( ! pFont->m_pMetrics || ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) pFont->queryMetricPage( code >> 8, m_pAtoms ); - ::std::hash_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstitutions.find( code ); + ::boost::unordered_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstitutions.find( code ); pHasSubst[i] = it != pFont->m_pMetrics->m_bVerticalSubstitutions.end(); } } @@ -3136,7 +3136,7 @@ bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, i { int effectiveCode = pString[i]; effectiveCode |= bVertical ? 1 << 16 : 0; - ::std::hash_map< int, CharacterMetric >::const_iterator it = + ::boost::unordered_map< int, CharacterMetric >::const_iterator it = pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); // if no vertical metrics are available assume rotated horizontal metrics if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) @@ -3181,7 +3181,7 @@ bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal { int effectiveCode = code; effectiveCode |= bVertical ? 1 << 16 : 0; - ::std::hash_map< int, CharacterMetric >::const_iterator it = + ::boost::unordered_map< int, CharacterMetric >::const_iterator it = pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); // if no vertical metrics are available assume rotated horizontal metrics if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) @@ -3340,7 +3340,7 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL { // remove all fonts for the same file // discarding their font ids - ::std::hash_map< fontID, PrintFont* >::iterator current, next; + ::boost::unordered_map< fontID, PrintFont* >::iterator current, next; current = m_aFonts.begin(); OString aFileName( OUStringToOString( aTo.GetName(), aEncoding ) ); while( current != m_aFonts.end() ) @@ -3496,7 +3496,7 @@ bool PrintFontManager::getFileDuplicates( fontID nFont, ::std::list< fontID >& r if( ! aFile.getLength() ) return false; - for( ::std::hash_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) + for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it ) { if( nFont != it->first ) { @@ -3519,7 +3519,7 @@ bool PrintFontManager::removeFonts( const ::std::list< fontID >& rFonts ) ::std::list< fontID > aDuplicates; for( ::std::list< fontID >::const_iterator it = rFonts.begin(); it != rFonts.end(); ++it ) { - ::std::hash_map< fontID, PrintFont* >::const_iterator haveFont = m_aFonts.find( *it ); + ::boost::unordered_map< fontID, PrintFont* >::const_iterator haveFont = m_aFonts.find( *it ); if( haveFont == m_aFonts.end() ) continue; @@ -3855,7 +3855,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont, rUnicodeEnc.clear(); rWidths.clear(); rWidths.reserve( pFont->m_pMetrics->m_aMetrics.size() ); - for( std::hash_map< int, CharacterMetric >::const_iterator it = + for( boost::unordered_map< int, CharacterMetric >::const_iterator it = pFont->m_pMetrics->m_aMetrics.begin(); it != pFont->m_pMetrics->m_aMetrics.end(); ++it ) { @@ -3892,8 +3892,8 @@ const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( font std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const { - std::pair< std::hash_multimap< sal_Unicode, rtl::OString >::const_iterator, - std::hash_multimap< sal_Unicode, rtl::OString >::const_iterator > range + std::pair< boost::unordered_multimap< sal_Unicode, rtl::OString >::const_iterator, + boost::unordered_multimap< sal_Unicode, rtl::OString >::const_iterator > range = m_aUnicodeToAdobename.equal_range( aChar ); std::list< OString > aRet; @@ -3913,8 +3913,8 @@ std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aCha // ------------------------------------------------------------------------- std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const rtl::OString& rName ) const { - std::pair< std::hash_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator, - std::hash_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator > range + std::pair< boost::unordered_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator, + boost::unordered_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator > range = m_aAdobenameToUnicode.equal_range( rName ); std::list< sal_Unicode > aRet; diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx index 8e2b7e5921fa..cb481be37b83 100644 --- a/vcl/unx/source/gdi/pspgraphics.cxx +++ b/vcl/unx/source/gdi/pspgraphics.cxx @@ -878,7 +878,7 @@ void PspGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( m_pJobData->m_aPrinterName ); if( rInfo.m_bPerformFontSubstitution ) { - for( std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) + for( boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) pOutDev->ImplAddDevFontSubstitute( it->first, it->second, FONT_SUBSTITUTE_ALWAYS ); } } diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index aaaec1222868..adfe2314b432 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -78,7 +78,7 @@ #include "i18npool/mslangid.hxx" -#include <hash_set> +#include <boost/unordered_set.hpp> #ifdef ENABLE_GRAPHITE #include <vcl/graphite_layout.hxx> @@ -129,7 +129,7 @@ class FontLookup struct hash; struct equal; - typedef ::std::hash_set< FontLookup, + typedef ::boost::unordered_set< FontLookup, FontLookup::hash, FontLookup::equal > fl_hashset; @@ -1987,7 +1987,7 @@ public: bool FindFontSubstitute( ImplFontSelectData& ) const; private: - typedef ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > + typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > CachedFontMapType; mutable CachedFontMapType maCachedFontMap; }; diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx index 7e24bff1a7fc..d6985422f3d1 100644 --- a/vcl/unx/source/gdi/salprnpsp.cxx +++ b/vcl/unx/source/gdi/salprnpsp.cxx @@ -398,7 +398,7 @@ SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn // set/clear backwards compatibility flag bool bStrictSO52Compatibility = false; - std::hash_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it = + boost::unordered_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it = pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); if( compat_it != pJobSetup->maValueMap.end() ) @@ -635,7 +635,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) { // set/clear backwards compatibility flag bool bStrictSO52Compatibility = false; - std::hash_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it = + boost::unordered_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it = pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); if( compat_it != pJobSetup->maValueMap.end() ) @@ -964,7 +964,7 @@ BOOL PspSalPrinter::StartJob( m_aTmpFile = getTmpName(); nMode = S_IRUSR | S_IWUSR; - ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it; + ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it; it = pJobSetup->maValueMap.find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAX#")) ); if( it != pJobSetup->maValueMap.end() ) m_aFaxNr = it->second; @@ -994,7 +994,7 @@ BOOL PspSalPrinter::StartJob( // set/clear backwards compatibility flag bool bStrictSO52Compatibility = false; - std::hash_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it = + boost::unordered_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it = pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) ); if( compat_it != pJobSetup->maValueMap.end() ) diff --git a/vcl/unx/source/printer/cupsmgr.cxx b/vcl/unx/source/printer/cupsmgr.cxx index bcb9f258de03..fca9a4513f27 100644 --- a/vcl/unx/source/printer/cupsmgr.cxx +++ b/vcl/unx/source/printer/cupsmgr.cxx @@ -587,7 +587,7 @@ void CUPSManager::initialize() // behaviour aPrinter.m_aInfo.m_pParser = NULL; aPrinter.m_aInfo.m_aContext.setParser( NULL ); - std::hash_map< OUString, PPDContext, OUStringHash >::const_iterator c_it = m_aDefaultContexts.find( aPrinterName ); + boost::unordered_map< OUString, PPDContext, OUStringHash >::const_iterator c_it = m_aDefaultContexts.find( aPrinterName ); if( c_it != m_aDefaultContexts.end() ) { aPrinter.m_aInfo.m_pParser = c_it->second.getParser(); @@ -603,7 +603,7 @@ void CUPSManager::initialize() // remove everything that is not a CUPS printer and not // a special purpose printer (PDF, Fax) std::list< OUString > aRemovePrinters; - for( std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.begin(); + for( boost::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) { if( m_aCUPSDestMap.find( it->first ) != m_aCUPSDestMap.end() ) @@ -690,7 +690,7 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) { if( m_nDests && m_pDests && ! isCUPSDisabled() ) { - std::hash_map< OUString, int, OUStringHash >::iterator dest_it = + boost::unordered_map< OUString, int, OUStringHash >::iterator dest_it = m_aCUPSDestMap.find( aPrinter ); if( dest_it != m_aCUPSDestMap.end() ) { @@ -786,13 +786,13 @@ void CUPSManager::setupJobContextData( ) { #ifdef ENABLE_CUPS - std::hash_map< OUString, int, OUStringHash >::iterator dest_it = + boost::unordered_map< OUString, int, OUStringHash >::iterator dest_it = m_aCUPSDestMap.find( rData.m_aPrinterName ); if( dest_it == m_aCUPSDestMap.end() ) return PrinterInfoManager::setupJobContextData( rData ); - std::hash_map< OUString, Printer, OUStringHash >::iterator p_it = + boost::unordered_map< OUString, Printer, OUStringHash >::iterator p_it = m_aPrinters.find( rData.m_aPrinterName ); if( p_it == m_aPrinters.end() ) // huh ? { @@ -888,13 +888,13 @@ int CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTit osl::MutexGuard aGuard( m_aCUPSMutex ); - std::hash_map< OUString, int, OUStringHash >::iterator dest_it = + boost::unordered_map< OUString, int, OUStringHash >::iterator dest_it = m_aCUPSDestMap.find( rPrintername ); if( dest_it == m_aCUPSDestMap.end() ) return PrinterInfoManager::endSpool( rPrintername, rJobTitle, pFile, rDocumentJobData ); #ifdef ENABLE_CUPS - std::hash_map< FILE*, OString, FPtrHash >::const_iterator it = m_aSpoolFiles.find( pFile ); + boost::unordered_map< FILE*, OString, FPtrHash >::const_iterator it = m_aSpoolFiles.find( pFile ); if( it != m_aSpoolFiles.end() ) { fclose( pFile ); @@ -1021,7 +1021,7 @@ bool CUPSManager::setDefaultPrinter( const OUString& rName ) { bool bSuccess = false; #ifdef ENABLE_CUPS - std::hash_map< OUString, int, OUStringHash >::iterator nit = + boost::unordered_map< OUString, int, OUStringHash >::iterator nit = m_aCUPSDestMap.find( rName ); if( nit != m_aCUPSDestMap.end() && m_aCUPSMutex.tryToAcquire() ) { @@ -1047,10 +1047,10 @@ bool CUPSManager::writePrinterConfig() bool bDestModified = false; rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - for( std::hash_map< OUString, Printer, OUStringHash >::iterator prt = + for( boost::unordered_map< OUString, Printer, OUStringHash >::iterator prt = m_aPrinters.begin(); prt != m_aPrinters.end(); ++prt ) { - std::hash_map< OUString, int, OUStringHash >::iterator nit = + boost::unordered_map< OUString, int, OUStringHash >::iterator nit = m_aCUPSDestMap.find( prt->first ); if( nit == m_aCUPSDestMap.end() ) continue; diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx index 5436845eadba..f477b43c335b 100644 --- a/vcl/unx/source/printer/ppdparser.cxx +++ b/vcl/unx/source/printer/ppdparser.cxx @@ -32,7 +32,7 @@ #include <stdlib.h> #include <stdio.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include "vcl/ppdparser.hxx" #include "vcl/strhelper.hxx" @@ -80,8 +80,8 @@ namespace psp } }; - typedef std::hash_map< com::sun::star::lang::Locale, rtl::OUString, LocaleHash, LocaleEqual > translation_map; - typedef std::hash_map< rtl::OUString, translation_map, rtl::OUStringHash > key_translation_map; + typedef boost::unordered_map< com::sun::star::lang::Locale, rtl::OUString, LocaleHash, LocaleEqual > translation_map; + typedef boost::unordered_map< rtl::OUString, translation_map, rtl::OUStringHash > key_translation_map; key_translation_map m_aTranslations; public: @@ -251,7 +251,7 @@ namespace psp { public: std::list< PPDParser* > aAllParsers; - std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >* pAllPPDFiles; + boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >* pAllPPDFiles; PPDCache() : pAllPPDFiles(NULL) {} @@ -485,7 +485,7 @@ void PPDParser::initPPDFiles() if( rPPDCache.pAllPPDFiles ) return; - rPPDCache.pAllPPDFiles = new std::hash_map< OUString, OUString, OUStringHash >(); + rPPDCache.pAllPPDFiles = new boost::unordered_map< OUString, OUString, OUStringHash >(); // check installation directories std::list< OUString > aPathList; @@ -527,7 +527,7 @@ void PPDParser::getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers, bool initPPDFiles(); o_rDrivers.clear(); - std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; + boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it; for( it = rPPDCache.pAllPPDFiles->begin(); it != rPPDCache.pAllPPDFiles->end(); ++it ) o_rDrivers.push_back( it->first ); } @@ -539,7 +539,7 @@ String PPDParser::getPPDFile( const String& rFile ) PPDDecompressStream aStream( aPPD.PathToFileName() ); if( ! aStream.IsOpen() ) { - std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; + boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it; PPDCache &rPPDCache = thePPDCache::get(); bool bRetry = true; diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx index 9974849f8cfc..b722a8b7804b 100644 --- a/vcl/unx/source/printer/printerinfomanager.cxx +++ b/vcl/unx/source/printer/printerinfomanager.cxx @@ -58,7 +58,7 @@ // the group of the global defaults #define GLOBAL_DEFAULTS_GROUP "__Global_Printer_Defaults__" -#include <hash_set> +#include <boost/unordered_set.hpp> using namespace psp; using namespace rtl; @@ -534,7 +534,7 @@ void PrinterInfoManager::initialize() FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aPrinter.m_aFile ); aPrinter.m_bModified = false; aPrinter.m_aGroup = aConfig.GetGroupName( nGroup ); - std::hash_map< OUString, Printer, OUStringHash >::const_iterator find_it = + boost::unordered_map< OUString, Printer, OUStringHash >::const_iterator find_it = m_aPrinters.find( aPrinterName ); if( find_it != m_aPrinters.end() ) { @@ -613,7 +613,7 @@ void PrinterInfoManager::initialize() void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const { - ::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it; + ::boost::unordered_map< OUString, Printer, OUStringHash >::const_iterator it; rList.clear(); for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) rList.push_back( it->first ); @@ -624,7 +624,7 @@ void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter ) const { static PrinterInfo aEmptyInfo; - ::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter ); + ::boost::unordered_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter ); DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistant printers" ); @@ -635,7 +635,7 @@ const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter void PrinterInfoManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo& rNewInfo ) { - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinter ); + ::boost::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinter ); DBG_ASSERT( it != m_aPrinters.end(), "Do not change nonexistant printers" ); @@ -666,9 +666,9 @@ static bool checkWriteability( const OUString& rUniPath ) bool PrinterInfoManager::writePrinterConfig() { // find at least one writeable config - ::std::hash_map< OUString, Config*, OUStringHash > files; - ::std::hash_map< OUString, int, OUStringHash > rofiles; - ::std::hash_map< OUString, Config*, OUStringHash >::iterator file_it; + ::boost::unordered_map< OUString, Config*, OUStringHash > files; + ::boost::unordered_map< OUString, int, OUStringHash > rofiles; + ::boost::unordered_map< OUString, Config*, OUStringHash >::iterator file_it; for( ::std::list< WatchFile >::const_iterator wit = m_aWatchFiles.begin(); wit != m_aWatchFiles.end(); ++wit ) { @@ -686,7 +686,7 @@ bool PrinterInfoManager::writePrinterConfig() pGlobal->SetGroup( GLOBAL_DEFAULTS_GROUP ); pGlobal->WriteKey( "DisableCUPS", m_bDisableCUPS ? "true" : "false" ); - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it; + ::boost::unordered_map< OUString, Printer, OUStringHash >::iterator it; for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it ) { if( ! it->second.m_bModified ) @@ -788,7 +788,7 @@ bool PrinterInfoManager::writePrinterConfig() // write font substitution table pConfig->WriteKey( "PerformFontSubstitution", it->second.m_aInfo.m_bPerformFontSubstitution ? "true" : "false" ); - for( ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst = it->second.m_aInfo.m_aFontSubstitutes.begin(); + for( ::boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator subst = it->second.m_aInfo.m_aFontSubstitutes.begin(); subst != it->second.m_aInfo.m_aFontSubstitutes.end(); ++subst ) { ByteString aKey( "SubstFont_" ); @@ -867,7 +867,7 @@ bool PrinterInfoManager::removePrinter( const OUString& rPrinterName, bool bChec { bool bSuccess = true; - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); + ::boost::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); if( it != m_aPrinters.end() ) { if( it->second.m_aFile.getLength() ) @@ -921,7 +921,7 @@ bool PrinterInfoManager::setDefaultPrinter( const OUString& rPrinterName ) { bool bSuccess = false; - ::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); + ::boost::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName ); if( it != m_aPrinters.end() ) { bSuccess = true; @@ -952,7 +952,7 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const return; ::std::list< FastPrintFontInfo > aFonts; - ::std::hash_map< OUString, ::std::list< FastPrintFontInfo >, OUStringHash > aPrinterFonts; + ::boost::unordered_map< OUString, ::std::list< FastPrintFontInfo >, OUStringHash > aPrinterFonts; rFontManager.getFontListWithFastInfo( aFonts, rInfo.m_pParser ); // get builtin fonts @@ -962,8 +962,8 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const aPrinterFonts[ it->m_aFamilyName.toAsciiLowerCase() ].push_back( *it ); // map lower case, so build a local copy of the font substitutions - ::std::hash_map< OUString, OUString, OUStringHash > aSubstitutions; - ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst; + ::boost::unordered_map< OUString, OUString, OUStringHash > aSubstitutions; + ::boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator subst; for( subst = rInfo.m_aFontSubstitutes.begin(); subst != rInfo.m_aFontSubstitutes.end(); ++subst ) { OUString aFamily( subst->first.toAsciiLowerCase() ); @@ -1104,7 +1104,7 @@ int PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUStri void PrinterInfoManager::setupJobContextData( JobData& rData ) { - std::hash_map< OUString, Printer, OUStringHash >::iterator it = + boost::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rData.m_aPrinterName ); if( it != m_aPrinters.end() ) { @@ -1214,8 +1214,8 @@ static void lpgetSysQueueTokenHandler( const SystemCommandParameters* ) { rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - std::hash_set< OUString, OUStringHash > aUniqueSet; - std::hash_set< OUString, OUStringHash > aOnlySet; + boost::unordered_set< OUString, OUStringHash > aUniqueSet; + boost::unordered_set< OUString, OUStringHash > aOnlySet; aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_all" ) ) ); aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) ); @@ -1311,7 +1311,7 @@ static void standardSysQueueTokenHandler( const SystemCommandParameters* i_pParms) { rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - std::hash_set< OUString, OUStringHash > aUniqueSet; + boost::unordered_set< OUString, OUStringHash > aUniqueSet; rtl::OString aForeToken( i_pParms->pForeToken ); rtl::OString aAftToken( i_pParms->pAftToken ); /* Normal Unix print queue discovery, also used for Darwin 5 LPR printing diff --git a/vcl/unx/source/printergfx/common_gfx.cxx b/vcl/unx/source/printergfx/common_gfx.cxx index 78e0461c774f..6e926087f881 100644 --- a/vcl/unx/source/printergfx/common_gfx.cxx +++ b/vcl/unx/source/printergfx/common_gfx.cxx @@ -72,9 +72,9 @@ PrinterGfx::Init (PrinterJob &rPrinterJob) rPrinterJob.GetScale (mfScaleX, mfScaleY); const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rPrinterJob.GetPrinterName() ) ); if( mpFontSubstitutes ) - delete const_cast< ::std::hash_map<fontID,fontID>* >(mpFontSubstitutes); + delete const_cast< ::boost::unordered_map<fontID,fontID>* >(mpFontSubstitutes); if( rInfo.m_bPerformFontSubstitution ) - mpFontSubstitutes = new ::std::hash_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); + mpFontSubstitutes = new ::boost::unordered_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); else mpFontSubstitutes = NULL; mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; @@ -96,9 +96,9 @@ PrinterGfx::Init (const JobData& rData) mfScaleY = (double)72.0 / (double)mnDpi; const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rData.m_aPrinterName ) ); if( mpFontSubstitutes ) - delete const_cast< ::std::hash_map<fontID,fontID>* >(mpFontSubstitutes); + delete const_cast< ::boost::unordered_map<fontID,fontID>* >(mpFontSubstitutes); if( rInfo.m_bPerformFontSubstitution ) - mpFontSubstitutes = new ::std::hash_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); + mpFontSubstitutes = new ::boost::unordered_map< fontID, fontID >( rInfo.m_aFontSubstitutions ); else mpFontSubstitutes = NULL; mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; @@ -152,7 +152,7 @@ PrinterGfx::~PrinterGfx() * Alas, this is not always done real time. So we keep a local copy of * the font substitutes now in case of bad timing. */ - delete const_cast< ::std::hash_map<fontID,fontID>* >(mpFontSubstitutes); + delete const_cast< ::boost::unordered_map<fontID,fontID>* >(mpFontSubstitutes); } void diff --git a/vcl/unx/source/printergfx/glyphset.hxx b/vcl/unx/source/printergfx/glyphset.hxx index f1dee2a08641..c8b009c91155 100644 --- a/vcl/unx/source/printergfx/glyphset.hxx +++ b/vcl/unx/source/printergfx/glyphset.hxx @@ -38,7 +38,7 @@ #include "tools/gen.hxx" #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> namespace psp { @@ -56,9 +56,9 @@ private: rtl_TextEncoding mnBaseEncoding; bool mbUseFontEncoding; - typedef std::hash_map< sal_Unicode, sal_uInt8 > char_map_t; + typedef boost::unordered_map< sal_Unicode, sal_uInt8 > char_map_t; typedef std::list< char_map_t > char_list_t; - typedef std::hash_map< sal_uInt32, sal_uInt8 > glyph_map_t; + typedef boost::unordered_map< sal_uInt32, sal_uInt8 > glyph_map_t; typedef std::list< glyph_map_t > glyph_list_t; char_list_t maCharList; diff --git a/vcl/unx/source/printergfx/text_gfx.cxx b/vcl/unx/source/printergfx/text_gfx.cxx index e963d4ed74c9..0b170565de75 100644 --- a/vcl/unx/source/printergfx/text_gfx.cxx +++ b/vcl/unx/source/printergfx/text_gfx.cxx @@ -703,7 +703,7 @@ PrinterGfx::getFontSubstitute () const { if( mpFontSubstitutes ) { - ::std::hash_map< fontID, fontID >::const_iterator it = + ::boost::unordered_map< fontID, fontID >::const_iterator it = mpFontSubstitutes->find( mnFontID ); if( it != mpFontSubstitutes->end() ) return it->second; @@ -747,7 +747,7 @@ const ::std::list< KernPair >& PrinterGfx::getKernPairs( bool bVertical ) const fontID nFont = mnFontID; if( mpFontSubstitutes ) { - ::std::hash_map< fontID, fontID >::const_iterator it = + ::boost::unordered_map< fontID, fontID >::const_iterator it = mpFontSubstitutes->find( mnFontID ); if( it != mpFontSubstitutes->end() ) nFont = it->second; |