summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-03 11:53:48 +0100
committerDavid Tardon <dtardon@redhat.com>2015-10-05 07:56:07 +0000
commitaaf53996e626bdce0c06c5f918e90c9a488eb42b (patch)
treee8241719dcd2e63a9f8963932d1ea492127b631c /sc
parentce321f45840fb7e34e823af511221faafc6ef200 (diff)
fix crash on loading certain xls
Change-Id: I4f4563b07109df7e2288458cf8adda37582262cf (cherry picked from commit c4d1a99ec667bdd661669afd72a708bd9a963db2) Reviewed-on: https://gerrit.libreoffice.org/19110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/impop.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 0c5614faa613..904209d2bb1b 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1031,17 +1031,21 @@ void ImportExcel::Array34()
aIn.Ignore( (GetBiff() >= EXC_BIFF5) ? 6 : 2 );
nFormLen = aIn.ReaduInt16();
+ const ScTokenArray* pErgebnis = nullptr;
+
if( ValidColRow( nLastCol, nLastRow ) )
{
// the read mark is now on the formula, length in nFormLen
- const ScTokenArray* pErgebnis;
pFormConv->Reset( ScAddress( static_cast<SCCOL>(nFirstCol),
static_cast<SCROW>(nFirstRow), GetCurrScTab() ) );
pFormConv->Convert( pErgebnis, maStrm, nFormLen, true, FT_CellFormula);
- OSL_ENSURE( pErgebnis, "+ImportExcel::Array34(): ScTokenArray is NULL!" );
+ SAL_WARN_IF(!pErgebnis, "sc", "+ImportExcel::Array34(): ScTokenArray is NULL!");
+ }
+ if (pErgebnis)
+ {
ScDocumentImport& rDoc = GetDocImport();
ScRange aArrayRange(nFirstCol, nFirstRow, GetCurrScTab(), nLastCol, nLastRow, GetCurrScTab());
rDoc.setMatrixCells(aArrayRange, *pErgebnis, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1);