rpms/openoffice.org/F-11 openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch, NONE, 1.1 openoffice.org.spec, 1.1936, 1.1937

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


Author: caolanm

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

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-11/openoffice.org.spec,v
retrieving revision 1.1936
retrieving revision 1.1937
diff -u -p -r1.1936 -r1.1937
--- openoffice.org.spec	23 Sep 2009 15:09:28 -0000	1.1936
+++ openoffice.org.spec	21 Oct 2009 09:04:37 -0000	1.1937
@@ -157,6 +157,7 @@ Patch81: workspace.os131.patch
 Patch82: workspace.vcl102.patch
 Patch83: openoffice.org-3.1.1.ooo104157.svx.crashonencryptparse.patch
 Patch84: workspace.aw073.patch
+Patch85: 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}
@@ -1672,6 +1673,7 @@ cat %{PATCH11} >> svtools/source/dialogs
 %patch82 -p0 -b .workspace.vcl102.patch
 %patch83 -p0 -b .ooo104157.svx.crashonencryptparse.patch
 %patch84 -p0 -b .workspace.aw073.patch
+%patch85 -p0 -b .ooo106130.svx.removedeletedshapes.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4175,8 +4177,9 @@ fi
     unopkg list --shared > /dev/null 2>&1 || :
 
 %changelog
-* Wed Sep 23 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.4
+* Wed Oct 21 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.4
 - Resolves: rhbz#522839 crash on exit after loading .doc
+- Resolves: rhbz#529746 crash on exit after loading .ppt
 
 * Mon Sep 07 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.3
 - Resolves: rhbz#521460 - wrong UI label for A3/A5 page sizes in translations




More information about the fedora-extras-commits mailing list