[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sc/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 5 00:56:32 PDT 2015
sc/source/filter/excel/impop.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit aaf53996e626bdce0c06c5f918e90c9a488eb42b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 3 11:53:48 2015 +0100
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 at libreoffice.org>
Reviewed-by: David Tardon <dtardon at redhat.com>
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 0c5614f..904209d 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);
More information about the Libreoffice-commits
mailing list