Kaydet (Commit) e32eff2b authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#83461 do not override MatColsRows if already set

ScMatrixFormulaCellToken::SetMatColsRows() via
ScFormulaCell::SetMatColsRows() is used during document import and
preselected cell area input of an array formula. Do not override
existing values with subsequent result matrix dimensions.

Change-Id: I9e844b5064ea276f3cbcb680eb1127c344328e00
üst 78f6e6f7
......@@ -167,7 +167,7 @@ void ScFormulaResult::SetToken( const formula::FormulaToken* p )
{
const ScMatrixFormulaCellToken* pNewMatFormula =
dynamic_cast<const ScMatrixFormulaCellToken*>(pMatResult);
if (pNewMatFormula)
if (pNewMatFormula && (pMatFormula->GetMatCols() <= 0 || pMatFormula->GetMatRows() <= 0))
{
SAL_WARN( "sc", "ScFormulaResult::SetToken: pNewMatFormula and pMatFormula, overriding matrix formula dimension; intended?");
pMatFormula->SetMatColsRows( pNewMatFormula->GetMatCols(),
......
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