summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-03-25 14:01:03 +0000
committerKurt Zenker <kz@openoffice.org>2004-03-25 14:01:03 +0000
commit9ebd051d6b83a6d6f124e634be5f089cc54ba48b (patch)
tree1bf29587230f6c8260348b1c24df38958f5419d1 /comphelper
parent76212677b5f262036736fd3a2b14f2342352bc9b (diff)
INTEGRATION: CWS jl3 (1.2.82); FILE MERGED
2004/03/10 11:47:17 fs 1.2.82.1: don't use queryAggregation on a proxy after the delegator has been set - the new proxy implementations do not support this
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/proxyaggregation.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx
index e738205f32d2..20f828a2348b 100644
--- a/comphelper/source/misc/proxyaggregation.cxx
+++ b/comphelper/source/misc/proxyaggregation.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: proxyaggregation.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-05-19 12:57:46 $
+ * last change: $Author: kz $ $Date: 2004-03-25 15:01:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,13 +99,16 @@ namespace comphelper
if ( xFactory.is() )
{
m_xProxyAggregate = xFactory->createProxy( _rxComponent );
+ if ( m_xProxyAggregate.is() )
+ m_xProxyAggregate->queryAggregation( ::getCppuType( &m_xProxyTypeAccess ) ) >>= m_xProxyTypeAccess;
// aggregate the proxy
osl_incrementInterlockedCount( &_rRefCount );
if ( m_xProxyAggregate.is() )
{
- // At this point in time, the proxy has a ref count of exactly one - in m_xControlContextProxy.
- // Remember to _not_ reset this member unles the delegator of the proxy has been reset, too!
+ // At this point in time, the proxy has a ref count of exactly two - in m_xControlContextProxy,
+ // and in m_xProxyTypeAccess.
+ // Remember to _not_ reset these members unless the delegator of the proxy has been reset, too!
m_xProxyAggregate->setDelegator( _rDelegator );
}
osl_decrementInterlockedCount( &_rRefCount );
@@ -124,10 +127,8 @@ namespace comphelper
Sequence< Type > aTypes;
if ( m_xProxyAggregate.is() )
{
- Reference< XTypeProvider > xTypes;
- m_xProxyAggregate->queryAggregation( ::getCppuType( &xTypes ) ) >>= xTypes;
- if ( xTypes.is() )
- aTypes = xTypes->getTypes();
+ if ( m_xProxyTypeAccess.is() )
+ aTypes = m_xProxyTypeAccess->getTypes();
}
return aTypes;
}
@@ -138,7 +139,8 @@ namespace comphelper
if ( m_xProxyAggregate.is() )
m_xProxyAggregate->setDelegator( NULL );
m_xProxyAggregate.clear();
- // this should remove the _one_and_only_ "real" reference (means not delegated to
+ m_xProxyTypeAccess.clear();
+ // this should remove the _two_only_ "real" references (means not delegated to
// ourself) to this proxy, and thus delete it
}