sc/source/filter/excel/xlroot.cxx | 6 +++--- sc/source/ui/unoobj/textuno.cxx | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-)
New commits: commit ed89b3799f2b0131f2150b7762044afd4ffd8fd2 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Apr 26 21:09:52 2012 -0400 Evil manual reference counter manipulations. Let's murder them. Incidentally, this fixes the dbgutil error problem. The old code was passing a copy of the ScHeaderFooterContentObj object to the ScHeaderFooterTextData object, which was why the counter was incremented on copy (though they should still have used a wrapper instead of manual reference counting). My new code passes a reference, which removes the copying, but those pesky acquire() and release() calls were still there. This caused the ScHeaderFooterContentObj object to never get deleted, which in turn caused the dbgutil refcounting check of SvxUnoTextRangeBase object to fail. Change-Id: I4e1780b32b21098a121ec7a43bb3eb842a419584 diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index fbae7fd..b6fd429 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -204,7 +204,6 @@ ScHeaderFooterTextData::ScHeaderFooterTextData( pForwarder( NULL ), bDataValid(false) { - rContentObj.acquire(); // must not go away } ScHeaderFooterTextData::~ScHeaderFooterTextData() @@ -213,8 +212,6 @@ ScHeaderFooterTextData::~ScHeaderFooterTextData() delete pForwarder; delete pEditEngine; - - rContentObj.release(); } SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder() commit 861acd5b73956425da788c78fb1ed5c283a1f6a0 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Apr 26 19:12:07 2012 -0400 Get it to build in non-dbgutil build with debug=true. diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 6f088f4..a3168c6 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -177,7 +177,7 @@ XclRootData::~XclRootData() XclRoot::XclRoot( XclRootData& rRootData ) : mrData( rRootData ) { -#if OSL_DEBUG_LEVEL > 0 +#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 0 ++mrData.mnObjCnt; #endif @@ -189,14 +189,14 @@ XclRoot::XclRoot( XclRootData& rRootData ) : XclRoot::XclRoot( const XclRoot& rRoot ) : mrData( rRoot.mrData ) { -#if OSL_DEBUG_LEVEL > 0 +#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 0 ++mrData.mnObjCnt; #endif } XclRoot::~XclRoot() { -#if OSL_DEBUG_LEVEL > 0 +#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 0 --mrData.mnObjCnt; #endif } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits