summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-18 09:22:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-18 10:41:13 +0200
commitcdd4b528a4d200aa322891373c80e2bc8e6cd16c (patch)
treebdefe58542e80eb85620eb2c3c6c8bea8ae1eb19
parent73ade0b02905785b0a29a3230049a4fe637d34f6 (diff)
use rtl::Reference in SwChartDataSequence
instead of manual acquire/release Change-Id: I2d827b2f785b34b77adb95ac62afb885bb423879 Reviewed-on: https://gerrit.libreoffice.org/43478 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/unocore/unochart.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 1d06634c6950..79439553fb34 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1860,7 +1860,7 @@ SwChartDataSequence::SwChartDataSequence(
{
m_bDisposed = false;
- acquire();
+ rtl::Reference<SwChartDataSequence> aSelfHold(this);
try
{
const SwTable* pTable = SwTable::FindTable( &rTableFormat );
@@ -1876,13 +1876,11 @@ SwChartDataSequence::SwChartDataSequence(
}
catch (uno::RuntimeException &)
{
- // TODO: shouldn't there be a call to release() here?
throw;
}
catch (uno::Exception &)
{
}
- release();
#if OSL_DEBUG_LEVEL > 0
// check if it can properly convert into a SwUnoTableCursor
@@ -1906,7 +1904,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
{
m_bDisposed = false;
- acquire();
+ rtl::Reference<SwChartDataSequence> aSelfHold(this);
try
{
const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
@@ -1922,13 +1920,11 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
}
catch (uno::RuntimeException &)
{
- // TODO: shouldn't there be a call to release() here?
throw;
}
catch (uno::Exception &)
{
}
- release();
#if OSL_DEBUG_LEVEL > 0
// check if it can properly convert into a SwUnoTableCursor