sc/source/ui/docshell/docfunc.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit a710956f628418a8a74f5ad3636a046eaa69fd15 Author: Eike Rathke <er...@redhat.com> AuthorDate: Sun May 19 15:21:19 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon May 20 13:51:59 2024 +0200 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 <er...@redhat.com> Tested-by: Jenkins (cherry picked from commit d4ae5abb4d00cc8adb3c45a9410fc71e56211c46) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167817 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> 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() ); } }