summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppuhelper/source/gcc3.map2
-rw-r--r--cppuhelper/source/weak.cxx27
-rw-r--r--include/unotools/weakref.hxx9
3 files changed, 10 insertions, 28 deletions
diff --git a/cppuhelper/source/gcc3.map b/cppuhelper/source/gcc3.map
index 07099853afb7..2af95d60a7e1 100644
--- a/cppuhelper/source/gcc3.map
+++ b/cppuhelper/source/gcc3.map
@@ -435,7 +435,7 @@ global:
_ZN3com3sun4star3uno19WeakReferenceHelperaSEOS3_; # com::sun::star::uno::WeakReferenceHelper::operator=(com::sun::star::uno::WeakReferenceHelper&&)
} LIBO_UDK_3.9;
-LIBO_UDK_7.5 { # LibO 7.5
+LIBO_UDK_7.4 { # LibO 7.4
global:
_ZN3com3sun4star3uno19WeakReferenceHelperaSERKNS2_9ReferenceINS2_5XWeakEEE; # com::sun::star::uno::WeakReferenceHelper::operator=(com::sun::star::uno::Reference<com::sun::star::uno::XWeak> const&)
_ZN3com3sun4star3uno19WeakReferenceHelperC1ERKNS2_9ReferenceINS2_5XWeakEEE; # com::sun::star::uno::WeakReferenceHelper::WeakReferenceHelper(com::sun::star::uno::Reference<com::sun::star::uno::XWeak> const&)
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 65c9e7f81912..e51f9ccf86a6 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -376,19 +376,12 @@ OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt)
OWeakRefListener::OWeakRefListener(const Reference< XWeak >& xWeak)
: m_aRefCount( 1 )
{
- try
- {
- if (xWeak.is())
- {
- m_XWeakConnectionPoint = xWeak->queryAdapter();
+ m_XWeakConnectionPoint = xWeak->queryAdapter();
- if (m_XWeakConnectionPoint.is())
- {
- m_XWeakConnectionPoint->addReference(static_cast<XReference*>(this));
- }
- }
+ if (m_XWeakConnectionPoint.is())
+ {
+ m_XWeakConnectionPoint->addReference(static_cast<XReference*>(this));
}
- catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected()
osl_atomic_decrement( &m_aRefCount );
}
@@ -526,16 +519,12 @@ WeakReferenceHelper::operator= (const Reference< XInterface > & xInt)
WeakReferenceHelper &
WeakReferenceHelper::operator= (const Reference< XWeak > & xWeak)
{
- try
+ clear();
+ if (xWeak)
{
- clear();
- if (xWeak.is())
- {
- m_pImpl = new OWeakRefListener(xWeak);
- m_pImpl->acquire();
- }
+ m_pImpl = new OWeakRefListener(xWeak);
+ m_pImpl->acquire();
}
- catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected()
return *this;
}
diff --git a/include/unotools/weakref.hxx b/include/unotools/weakref.hxx
index ca5682416033..104737404054 100644
--- a/include/unotools/weakref.hxx
+++ b/include/unotools/weakref.hxx
@@ -77,22 +77,15 @@ public:
{
}
- /** Copy ctor. Initialize this reference with a hard reference.
+ /** Copy ctor. Initialize this reference with a hard reference.
@param rRef another hard ref
*/
-#if defined LIBO_INTERNAL_ONLY
WeakReference(interface_type* pRef)
: WeakReferenceHelper(
css::uno::Reference<css::uno::XWeak>(static_cast<cppu::OWeakObject*>(pRef)))
{
}
-#else
- WeakReference(interface_type* pRef)
- : WeakReferenceHelper(static_cast<cppu::OWeakObject*>(pRef))
- {
- }
-#endif
/** Releases this reference and takes over hard reference xInt.
If the implementation behind xInt does not support XWeak