Kaydet (Commit) aaf53996 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) David Tardon

fix crash on loading certain xls

Change-Id: I4f4563b07109df7e2288458cf8adda37582262cf
(cherry picked from commit c4d1a99e)
Reviewed-on: https://gerrit.libreoffice.org/19110Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst ce321f45
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment