diff options
author | Eike Rathke <erack@redhat.com> | 2015-02-06 23:32:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-12 10:11:58 +0000 |
commit | cd1f5a81b7602040a7c88b30fd8dbde844fa2f71 (patch) | |
tree | 8f49a07b3b09c2eb36288f285bf66a7a474dda54 | |
parent | 97b11a21b64f4bac5af67819549f6e384d61c086 (diff) |
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
(cherry picked from commit e32eff2bb4c12fdc33e476b9f12bb4bb71d22ebc)
Reviewed-on: https://gerrit.libreoffice.org/14355
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/core/tool/formularesult.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx index 658eb97821e5..d50006b27ade 100644 --- a/sc/source/core/tool/formularesult.cxx +++ b/sc/source/core/tool/formularesult.cxx @@ -168,7 +168,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(), |