[Libreoffice-commits] core.git: cppuhelper/source include/cppuhelper
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed May 18 22:47:09 UTC 2016
cppuhelper/source/weak.cxx | 21 ++++++++++++---------
include/cppuhelper/weakref.hxx | 3 +++
2 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit 389d8db4d90d427f886d06c3f7304ad973f0d39c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed May 18 20:12:03 2016 +0200
add some spaces to make it easier to read
Change-Id: I2eb1c74bc0d91d3a12a66989b696fccbf1d2825e
Reviewed-on: https://gerrit.libreoffice.org/25117
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index d81a41b..1433425 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -501,17 +501,20 @@ Reference< XInterface > WeakReferenceHelper::get() const
{
try
{
- Reference< XAdapter > xAdp;
- {
- MutexGuard guard(cppu::getWeakMutex());
- if( m_pImpl && m_pImpl->m_XWeakConnectionPoint.is() )
- xAdp = m_pImpl->m_XWeakConnectionPoint;
- }
+ Reference< XAdapter > xAdp;
+ {
+ MutexGuard guard(cppu::getWeakMutex());
+ if( m_pImpl && m_pImpl->m_XWeakConnectionPoint.is() )
+ xAdp = m_pImpl->m_XWeakConnectionPoint;
+ }
- if (xAdp.is())
- return xAdp->queryAdapted();
+ if (xAdp.is())
+ return xAdp->queryAdapted();
}
- catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected()
+ catch (RuntimeException &)
+ {
+ OSL_ASSERT( false );
+ } // assert here, but no unexpected()
return Reference< XInterface >();
}
diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx
index 458bd93..7836494 100644
--- a/include/cppuhelper/weakref.hxx
+++ b/include/cppuhelper/weakref.hxx
@@ -56,12 +56,14 @@ public:
@param rWeakRef another weak ref
*/
WeakReferenceHelper( const WeakReferenceHelper & rWeakRef );
+
/** Initialize this reference with the hard interface reference xInt. If the implementation
behind xInt does not support XWeak or XInt is null then this reference will be null.
@param xInt another hard interface reference
*/
WeakReferenceHelper( const css::uno::Reference< css::uno::XInterface > & xInt );
+
/** Releases this reference.
*/
~WeakReferenceHelper();
@@ -94,6 +96,7 @@ public:
@return hard reference or null, if the weakly referenced interface has gone
*/
css::uno::Reference< css::uno::XInterface > SAL_CALL get() const;
+
/** Gets a hard reference to the object.
@return hard reference or null, if the weakly referenced interface has gone
More information about the Libreoffice-commits
mailing list