summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-12-01 10:25:40 +0000
committerRüdiger Timm <rt@openoffice.org>2003-12-01 10:25:40 +0000
commit706be4b37eff44a040de89250cd10f1f2cb7989f (patch)
tree273482bc041df097ff67a5884cf17919993d3c7d /dtrans
parentb332fc6e0e1958de6e04c58064b9f1116ba7a11a (diff)
INTEGRATION: CWS geordi2q09 (1.64.32); FILE MERGED
2003/11/21 11:03:48 obo 1.64.32.1: #111934#: join CWS pmselectedfixes2
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/X11/X11_selection.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx
index 61d981343bd9..3fcc7ceb3d9c 100644
--- a/dtrans/source/X11/X11_selection.cxx
+++ b/dtrans/source/X11/X11_selection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: X11_selection.cxx,v $
*
- * $Revision: 1.65 $
+ * $Revision: 1.66 $
*
- * last change: $Author: rt $ $Date: 2003-11-25 10:29:04 $
+ * last change: $Author: rt $ $Date: 2003-12-01 11:25:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3548,9 +3548,9 @@ void SelectionManager::run( void* pThis )
if( (aNow.tv_sec - aLast.tv_sec) > 0 )
{
ClearableMutexGuard aGuard(This->m_aMutex);
- ::std::list< SelectionAdaptor* > aChangeList;
+ 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( std::hash_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 )
{
@@ -3558,14 +3558,16 @@ void SelectionManager::run( void* pThis )
if( aOwner != it->second->m_aLastOwner )
{
it->second->m_aLastOwner = aOwner;
- aChangeList.push_back( it->second->m_pAdaptor );
+ std::pair< SelectionAdaptor*, Reference< XInterface > >
+ aKeep( it->second->m_pAdaptor, it->second->m_pAdaptor->getReference() );
+ aChangeList.push_back( aKeep );
}
}
}
aGuard.clear();
while( aChangeList.begin() != aChangeList.end() )
{
- aChangeList.front()->fireContentsChanged();
+ aChangeList.front().first->fireContentsChanged();
aChangeList.pop_front();
}
aLast = aNow;
@@ -3719,6 +3721,13 @@ void SelectionManager::fireContentsChanged() throw()
// ------------------------------------------------------------------------
+Reference< XInterface > SelectionManager::getReference() throw()
+{
+ return Reference< XInterface >( static_cast<OWeakObject*>(this) );
+}
+
+// ------------------------------------------------------------------------
+
/*
* SelectionManagerHolder
*/