rpms/openoffice.org/F-12 openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch, NONE, 1.1 openoffice.org.spec, 1.2022, 1.2023

Caolan McNamara caolanm at fedoraproject.org
Wed Oct 21 09:04:38 UTC 2009


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1083/F-12

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch 
Log Message:
Resolves: rhbz#529746 crash on exit after loading .ppt (caolanm)

openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch:
 inc/svx/svdfppt.hxx          |    2 +-
 source/msfilter/msdffimp.cxx |   28 ++++++++++++++++++----------
 source/svdraw/svdfppt.cxx    |   13 ++++++++++++-
 3 files changed, 31 insertions(+), 12 deletions(-)

--- NEW FILE openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch ---
diff -ru svx.orig/inc/svx/svdfppt.hxx svx/inc/svx/svdfppt.hxx
--- svx.orig/inc/svx/svdfppt.hxx	2009-10-21 09:45:21.000000000 +0100
+++ svx/inc/svx/svdfppt.hxx	2009-10-21 09:45:50.000000000 +0100
@@ -610,7 +610,7 @@
 										UINT32& nMappedFontId, Font& rFont, char nDefault ) const;
     const PptDocumentAtom&				GetDocumentAtom() const { return aDocAtom; }
     virtual const PptSlideLayoutAtom*	GetSlideLayoutAtom() const;
-	SdrObject*	CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* ) const;
+	SdrObject*	CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* );
 };
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
diff -ru svx.orig/source/msfilter/msdffimp.cxx svx/source/msfilter/msdffimp.cxx
--- svx.orig/source/msfilter/msdffimp.cxx	2009-10-21 09:45:12.000000000 +0100
+++ svx/source/msfilter/msdffimp.cxx	2009-10-21 09:52:13.000000000 +0100
@@ -7957,25 +7957,31 @@
         delete pWrapPolygon;
 }
 
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
-
 void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape )
 {
 	maShapeIdContainer[nShapeId] = pShape;
 }
 
-void SvxMSDffManager::removeShapeId( SdrObject* pShape )
+namespace
 {
-	SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.begin() );
-	const SvxMSDffShapeIdContainer::iterator aEnd( maShapeIdContainer.end() );
-	while( aIter != aEnd )
+	class IsShape : public std::unary_function<SvxMSDffShapeIdContainer::value_type, bool>
 	{
-		if( (*aIter).second == pShape )
+		const SdrObject *mpShape;
+	public:
+		IsShape(const SdrObject *pShape) : mpShape(pShape) {}
+		bool operator()(const SvxMSDffShapeIdContainer::value_type& rVal)
 		{
-			maShapeIdContainer.erase( aIter );
-			break;
+			return rVal.second == mpShape;
 		}
-	}
+	};
+}
+
+void SvxMSDffManager::removeShapeId( SdrObject* pShape )
+{
+        const SvxMSDffShapeIdContainer::iterator aEnd( maShapeIdContainer.end() );
+	SvxMSDffShapeIdContainer::iterator aIter = std::find_if(maShapeIdContainer.begin(), aEnd, IsShape(pShape));
+	if (aIter != aEnd)
+		maShapeIdContainer.erase( aIter );
 }
 
 SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId )
@@ -7983,3 +7989,5 @@
 	SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.find(nShapeId) );
 	return aIter != maShapeIdContainer.end() ? (*aIter).second : 0;
 }
+
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff -ru svx.orig/source/svdraw/svdfppt.cxx svx/source/svdraw/svdfppt.cxx
--- svx.orig/source/svdraw/svdfppt.cxx	2009-10-21 09:45:12.000000000 +0100
+++ svx/source/svdraw/svdfppt.cxx	2009-10-21 09:45:37.000000000 +0100
@@ -7492,7 +7492,7 @@
 	}
 }
 
-SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) const
+SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer )
 {
 	SdrObject* pRet = pGroup;
 	sal_uInt32 nRows = pTableArry[ 1 ];
@@ -7585,6 +7585,17 @@
 				pTable->uno_unlock();
 				pTable->SetSnapRect( pGroup->GetSnapRect() );
 				pRet = pTable;
+
+
+				//Remove Objects from shape map
+				SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS );
+				while( aIter.IsMore() )
+				{
+					SdrObject* pPartObj = aIter.Next();
+					removeShapeId( pPartObj );
+				}
+
+
 				SdrObject::Free( pGroup );
 			}
 			catch( Exception& )


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-12/openoffice.org.spec,v
retrieving revision 1.2022
retrieving revision 1.2023
diff -u -p -r1.2022 -r1.2023
--- openoffice.org.spec	20 Oct 2009 19:09:47 -0000	1.2022
+++ openoffice.org.spec	21 Oct 2009 09:04:38 -0000	1.2023
@@ -166,6 +166,7 @@ Patch89: openoffice.org-3.1.1.oooXXXXXX.
 Patch90: openoffice.org-3.2.0.ooo105988.svx.a11ycrash.patch
 Patch91: openoffice.org-3.2.0.oooXXXXXX.vcl.dontresolve.patch
 Patch92: workspace.impress178.patch
+Patch93: openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch
 
 %define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
 %define instdir %{_libdir}
@@ -1718,6 +1719,7 @@ cat %{PATCH11} >> svtools/source/dialogs
 %patch90 -p0 -b .ooo105988.svx.a11ycrash.patch
 %patch91 -p0 -b .oooXXXXXX.vcl.dontresolve.patch
 %patch92 -p0 -b .workspace.impress178.patch
+%patch93 -p0 -b .ooo106130.svx.removedeletedshapes.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4251,8 +4253,9 @@ fi
     unopkg list --shared > /dev/null 2>&1 || :
 
 %changelog
-* Tue Oct 20 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.14
+* Wed Oct 21 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.14
 - Resolves: ooo#103757 custom shape cut and paste (caolanm)
+- Resolves: rhbz#529746 crash on exit after loading .ppt (caolanm)
 
 * Mon Oct 19 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.13
 - Resolves: ooo#105988 a11y crash in impress (caolanm)




More information about the scm-commits mailing list