svx/source/table/accessibletableshape.cxx | 6 ++++++ svx/source/table/svdotable.cxx | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-)
New commits: commit a90e08cb15e712e1d15a16de9a2677e57d81fd13 Author: Caolán McNamara <[email protected]> Date: Wed Dec 11 11:57:34 2013 +0000 disposed but not dtored just die when you are supposed to, without this endless amounts of accessiblity cells remain after sorting slides with tables in them (cherry picked from commit 1c28065d8fe3e9a1394a7ecfc29e95a9639a1012) Conflicts: svx/source/table/accessibletableshape.cxx Change-Id: Ice9a86b8b806e58f9bf871341a38f7729798dda9 diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index a5e910e..8872591 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -113,6 +113,12 @@ void AccessibleTableShapeImpl::dispose() { if( mxTable.is() ) { + //remove all the cell's acc object in table's dispose. + for( AccessibleCellMap::iterator iter( maChildMap.begin() ); iter != maChildMap.end(); iter++ ) + { + (*iter).second->dispose(); + } + maChildMap.clear(); Reference< XModifyListener > xListener( this ); mxTable->removeModifyListener( xListener ); mxTable.clear(); commit 3d742188d402b294af9a06ba15bc16d19966bd6f Author: Caolán McNamara <[email protected]> Date: Tue Dec 10 16:54:59 2013 +0000 correctly dispose to avoid cyclic dependencies accessibility cruft is still listening to dead tables so crashes in slidesorting in main panel if moved slide has tables in it after visiting slide sorter once. Change-Id: I09f9a73b01fb2ddf059402146acdc7bd823798b9 (cherry picked from commit 0b8e2e5efe20519e8b5563314bac0cbb84a3b967) diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 994076e..9c5e64a 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -266,9 +266,9 @@ void SdrTableObjImpl::init( SdrTableObj* pTable, sal_Int32 nColumns, sal_Int32 n mpTableObj = pTable; mxTable = new TableModel( pTable ); mxTable->init( nColumns, nRows ); - mpLayouter = new TableLayouter( mxTable ); Reference< XModifyListener > xListener( static_cast< ::com::sun::star::util::XModifyListener* >(this) ); mxTable->addModifyListener( xListener ); + mpLayouter = new TableLayouter( mxTable ); LayoutTable( mpTableObj->aRect, true, true ); mpTableObj->maLogicRect = mpTableObj->aRect; } @@ -279,6 +279,8 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource ) { if (this != &rSource) { + disconnectTableStyle(); + if( mpLayouter ) { delete mpLayouter; @@ -303,6 +305,8 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource ) ApplyCellStyles(); mpTableObj->aRect = mpTableObj->maLogicRect; LayoutTable( mpTableObj->aRect, false, false ); + + connectTableStyle(); } return *this; } @@ -449,8 +453,22 @@ bool SdrTableObjImpl::ApplyCellStyles() void SdrTableObjImpl::dispose() { + disconnectTableStyle(); + mxTableStyle.clear(); + + if( mpLayouter ) + { + delete mpLayouter; + mpLayouter = 0; + } + if( mxTable.is() ) + { + Reference< XModifyListener > xListener( static_cast< ::com::sun::star::util::XModifyListener* >(this) ); + mxTable->removeModifyListener( xListener ); mxTable->dispose(); + mxTable.clear(); + } } // -----------------------------------------------------------------------------
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
