diff options
Diffstat (limited to 'vcl/unx/source/dtrans/X11_selection.cxx')
-rw-r--r-- | vcl/unx/source/dtrans/X11_selection.cxx | 54 |
1 files changed, 27 insertions, 27 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() ) { |