Kaydet (Commit) f5457c85 authored tarafından Noel Grandin's avatar Noel Grandin

Revert "use rtl::Reference in SwChartDataSequence"

This reverts commit cdd4b528.

The manual acquire()/release() is necessary to prevent a double-delete
if the exception is thrown

Change-Id: I5acc0840befba3981e13b084b8d347f8a2766e70
Reviewed-on: https://gerrit.libreoffice.org/43889Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9be47276
...@@ -1860,7 +1860,7 @@ SwChartDataSequence::SwChartDataSequence( ...@@ -1860,7 +1860,7 @@ SwChartDataSequence::SwChartDataSequence(
{ {
m_bDisposed = false; m_bDisposed = false;
rtl::Reference<SwChartDataSequence> aSelfHold(this); acquire();
try try
{ {
const SwTable* pTable = SwTable::FindTable( &rTableFormat ); const SwTable* pTable = SwTable::FindTable( &rTableFormat );
...@@ -1876,11 +1876,13 @@ SwChartDataSequence::SwChartDataSequence( ...@@ -1876,11 +1876,13 @@ SwChartDataSequence::SwChartDataSequence(
} }
catch (uno::RuntimeException &) catch (uno::RuntimeException &)
{ {
// TODO: shouldn't there be a call to release() here?
throw; throw;
} }
catch (uno::Exception &) catch (uno::Exception &)
{ {
} }
release();
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
// check if it can properly convert into a SwUnoTableCursor // check if it can properly convert into a SwUnoTableCursor
...@@ -1904,7 +1906,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : ...@@ -1904,7 +1906,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
{ {
m_bDisposed = false; m_bDisposed = false;
rtl::Reference<SwChartDataSequence> aSelfHold(this); acquire();
try try
{ {
const SwTable* pTable = SwTable::FindTable( GetFrameFormat() ); const SwTable* pTable = SwTable::FindTable( GetFrameFormat() );
...@@ -1920,11 +1922,13 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : ...@@ -1920,11 +1922,13 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
} }
catch (uno::RuntimeException &) catch (uno::RuntimeException &)
{ {
// TODO: shouldn't there be a call to release() here?
throw; throw;
} }
catch (uno::Exception &) catch (uno::Exception &)
{ {
} }
release();
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
// check if it can properly convert into a SwUnoTableCursor // check if it can properly convert into a SwUnoTableCursor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment