diff options
author | Eike Rathke <erack@redhat.com> | 2015-02-06 23:32:54 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-02-09 10:50:10 +0000 |
commit | 5236e24afddeba986802dea10f988f0559365ff8 (patch) | |
tree | 3e6802667a7fda76e7f124bc27b39634796895e7 | |
parent | 1876ec092382beb8b3d6a9b9fb4dfe3148d758a6 (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/14354
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.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 cf790c8b176a..61b56f5385cd 100644 --- a/sc/source/core/tool/formularesult.cxx +++ b/sc/source/core/tool/formularesult.cxx @@ -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(), |