sc/source/ui/docshell/docfunc.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit d4ae5abb4d00cc8adb3c45a9410fc71e56211c46 Author: Eike Rathke <er...@redhat.com> AuthorDate: Sun May 19 15:21:19 2024 +0200 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sun May 19 19:26:05 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 diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 556cd6e6c940..d47f6f0bde40 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5521,11 +5521,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() ); } }