sc/source/filter/excel/xiescher.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 6789ec4c1a9c6af84bd62e650a03226a46365d97 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 9 09:59:38 2012 +0100 ensure placeholder substitution on XclImpDrawObjBase::ReadObj8 failure Change-Id: I7a72153d971aaccea937955acc77cdba128985d7 Signed-off-by: Michael Stahl <mst...@redhat.com> diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index f6fda06..c6c2865 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -336,7 +336,7 @@ XclImpDrawObjRef XclImpDrawObjBase::ReadObj8( const XclImpRoot& rRoot, XclImpStr if( rStrm.GetRecLeft() >= 10 ) { - sal_uInt16 nSubRecId, nSubRecSize, nObjType; + sal_uInt16 nSubRecId(0), nSubRecSize(0), nObjType(0); rStrm >> nSubRecId >> nSubRecSize >> nObjType; OSL_ENSURE( nSubRecId == EXC_ID_OBJCMO, "XclImpDrawObjBase::ReadObj8 - OBJCMO subrecord expected" ); if( (nSubRecId == EXC_ID_OBJCMO) && (nSubRecSize >= 6) ) @@ -379,11 +379,16 @@ XclImpDrawObjRef XclImpDrawObjBase::ReadObj8( const XclImpRoot& rRoot, XclImpStr default: OSL_TRACE( "XclImpDrawObjBase::ReadObj8 - unknown object type 0x%04hX", nObjType ); rRoot.GetTracer().TraceUnsupportedObjects(); - xDrawObj.reset( new XclImpPhObj( rRoot ) ); } } } + if (!xDrawObj) //ensure placeholder for unknown or broken records + { + SAL_WARN( "sc", "XclImpDrawObjBase::ReadObj8 import failed, substituting placeholder"); + xDrawObj.reset( new XclImpPhObj( rRoot ) ); + } + xDrawObj->mnTab = rRoot.GetCurrScTab(); xDrawObj->ImplReadObj8( rStrm ); return xDrawObj;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits