rpms/openoffice.org/devel openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch, NONE, 1.1 openoffice.org.spec, 1.2048, 1.2049
Caolan McNamara
caolanm at fedoraproject.org
Wed Oct 21 09:04:39 UTC 2009
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1083/devel
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/devel/openoffice.org.spec,v
retrieving revision 1.2048
retrieving revision 1.2049
diff -u -p -r1.2048 -r1.2049
--- openoffice.org.spec 20 Oct 2009 19:09:47 -0000 1.2048
+++ openoffice.org.spec 21 Oct 2009 09:04:39 -0000 1.2049
@@ -120,6 +120,7 @@ Patch46: openoffice.org-3.2.0.rhbz521460
Patch47: openoffice.org-3.2.0.oooXXXXXX.vcl.dontresolve.patch
Patch48: openoffice.org-3.2.0.ooo106032.linguistic.defaulttoplain.patch
Patch49: workspace.impress178.patch
+Patch50: 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}
@@ -1629,6 +1630,7 @@ cat %{PATCH10} >> svtools/source/dialogs
%patch47 -p0 -b .oooXXXXXX.vcl.dontresolve.patch
%patch48 -p0 -b .ooo106032.linguistic.defaulttoplain.patch
%patch49 -p0 -b .workspace.impress178.patch
+%patch50 -p0 -b .ooo106130.svx.removedeletedshapes.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4129,8 +4131,9 @@ fi
unopkg list --shared > /dev/null 2>&1 || :
%changelog
-* Tue Oct 20 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-2.5.UNBUILT
+* Wed Oct 21 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-2.5.UNBUILT
- 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.2.0-2.4
- Resolves: rhbz#521460 add openoffice.org-3.2.0.ooo106032.linguistic.defaulttoplain.patch (caolanm)
More information about the scm-commits
mailing list