[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Aug 15 08:08:29 PDT 2012
sc/source/filter/excel/xiescher.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 6789ec4c1a9c6af84bd62e650a03226a46365d97
Author: Caolán McNamara <caolanm at 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 <mstahl at 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;
More information about the Libreoffice-commits
mailing list