diff options
-rw-r--r-- | sc/source/core/data/documentimport.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/impop.cxx | 18 |
2 files changed, 10 insertions, 12 deletions
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx index d3dd4dbcb97b..9998e83cc97d 100644 --- a/sc/source/core/data/documentimport.cxx +++ b/sc/source/core/data/documentimport.cxx @@ -243,6 +243,10 @@ void ScDocumentImport::setMatrixCells( pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rBasePos.Row(), pCell); + // Matrix formulas currently need re-calculation on import. + pCell->SetMatColsRows( + rRange.aEnd.Col()-rRange.aStart.Col()+1, rRange.aEnd.Row()-rRange.aStart.Row()+1, true); + // Set the reference cells. ScSingleRefData aRefData; aRefData.InitFlags(); diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 4239a5e8e39f..b855bc25fc8e 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -560,12 +560,9 @@ void ImportExcel::Array25( void ) OSL_ENSURE( pErgebnis, "*ImportExcel::Array25(): ScTokenArray is NULL!" ); - ScMarkData aMarkData; - aMarkData.SelectOneTable( GetCurrScTab() ); - pD->InsertMatrixFormula( static_cast<SCCOL>(nFirstCol), - static_cast<SCROW>(nFirstRow), static_cast<SCCOL>(nLastCol), - static_cast<SCROW>(nLastRow), aMarkData, EMPTY_STRING, - pErgebnis ); + ScDocumentImport& rDoc = GetDocImport(); + ScRange aArrayRange(nFirstCol, nFirstRow, GetCurrScTab(), nLastCol, nLastRow, GetCurrScTab()); + rDoc.setMatrixCells(aArrayRange, *pErgebnis, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1); } } @@ -1072,12 +1069,9 @@ void ImportExcel::Array34( void ) OSL_ENSURE( pErgebnis, "+ImportExcel::Array34(): ScTokenArray is NULL!" ); - ScMarkData aMarkData; - aMarkData.SelectOneTable( GetCurrScTab() ); - pD->InsertMatrixFormula( static_cast<SCCOL>(nFirstCol), - static_cast<SCROW>(nFirstRow), static_cast<SCCOL>(nLastCol), - static_cast<SCROW>(nLastRow), aMarkData, EMPTY_STRING, - pErgebnis); + ScDocumentImport& rDoc = GetDocImport(); + ScRange aArrayRange(nFirstCol, nFirstRow, GetCurrScTab(), nLastCol, nLastRow, GetCurrScTab()); + rDoc.setMatrixCells(aArrayRange, *pErgebnis, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1); } } |