diff options
author | Eike Rathke <erack@redhat.com> | 2024-05-19 15:21:19 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-20 13:51:59 +0200 |
commit | a710956f628418a8a74f5ad3636a046eaa69fd15 (patch) | |
tree | 04c58fccf04b089fdabaf279f996a504ee1fc5f9 | |
parent | 2f51031f05dec2f21b8f587eafa7c399d6e4b19e (diff) |
Resolves: tdf#160804 sc: ResizeMatrix: Use document grammar
API grammar (old GRAM_PODF_A1) here was always wrong and could
never had matched the formula string obtained from the document,
but in earlier days array separators weren't configurable so this
may have worked accidentally.. Likely GRAM_PODF_A1 was introduced
being confused by existance of older bApi parameter that never was
true though and got eliminated later.
Change-Id: Ie77ad4047c21d999bea1ff97c7c2b451f01121eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167844
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit d4ae5abb4d00cc8adb3c45a9410fc71e56211c46)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167817
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 4c333b0502a0..d67e6efa66cb 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5500,11 +5500,11 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, false/*bApi*/ ) ) { - // GRAM_API for API compatibility. - if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, false/*bApi*/, false, OUString(), formula::FormulaGrammar::GRAM_API )) + // Formula string was obtained in document grammar. + if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, false/*bApi*/, false, OUString(), rDoc.GetGrammar() )) { // try to restore the previous state - EnterMatrix( rOldRange, &aMark, nullptr, aFormula, false/*bApi*/, false, OUString(), formula::FormulaGrammar::GRAM_API ); + EnterMatrix( rOldRange, &aMark, nullptr, aFormula, false/*bApi*/, false, OUString(), rDoc.GetGrammar() ); } } |