sc/source/core/tool/compiler.cxx | 5 ++++- sc/source/filter/excel/xecontent.cxx | 7 ++++++- sc/source/filter/excel/xename.cxx | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-)
New commits: commit 6f64ca557b82316ad91cfa058ac2a177a5882bbd Author: Karthik Godha <[email protected]> AuthorDate: Wed Jan 21 20:58:19 2026 +0530 Commit: Karthik Godha <[email protected]> CommitDate: Thu Feb 26 17:23:21 2026 +0100 tdf#170292: R1C1 reference style in defined names Defined names can't contian R1C1 references as name bug-document: forum-mso-de-23552.xls Change-Id: I4798b783cc1e1d84c04d236a11710bd778c6af49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197762 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit d7c06bd82504c66aad79edc2193827b23ba47481) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199421 Reviewed-by: Karthik Godha <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199666 diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index c9e81883fb0a..2c14e871efcc 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -5855,7 +5855,10 @@ void ScCompiler::CreateStringFromIndex( OUStringBuffer& rBuffer, const FormulaTo } OUString sName = pData->GetName(); // If the name is a valid reference then add underscore to the name - if (ScAddress().Parse(sName, rDoc, FormulaGrammar::CONV_XL_A1) & ScRefFlags::VALID) + if ((ScAddress().Parse(sName, rDoc, ::formula::FormulaGrammar::CONV_XL_A1) + != ScRefFlags::ZERO) + || (ScRange().Parse(sName, rDoc, ::formula::FormulaGrammar::CONV_XL_R1C1) + != ScRefFlags::ZERO)) sName = "_" + sName; aBuffer.append(sName); } diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index 7d8de704b8a5..9e9ce1bd2a00 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -356,8 +356,10 @@ void XclExpName::SaveXml( XclExpXmlStream& rStrm ) else { // If the name is a valid reference then add underscore to the name - if (ScAddress().Parse(sName, GetDoc(), ::formula::FormulaGrammar::CONV_XL_A1) - & ScRefFlags::VALID) + if ((ScAddress().Parse(sName, GetDoc(), ::formula::FormulaGrammar::CONV_XL_A1) + != ScRefFlags::ZERO) + || (ScRange().Parse(sName, GetDoc(), ::formula::FormulaGrammar::CONV_XL_R1C1) + != ScRefFlags::ZERO)) sName = "_" + sName; } commit 4d6904f23e8334d84613ab07f83474c21bc21df5 Author: Karthik Godha <[email protected]> AuthorDate: Fri Jan 30 14:12:49 2026 +0530 Commit: Karthik Godha <[email protected]> CommitDate: Thu Feb 26 17:23:09 2026 +0100 XLSX: DataValidation - Handle double quotes in list Data Validation List containing double quotes are not handled during XLSX export bug-document: forum-mso-de-54556.xls Change-Id: Ib77d7030f6c2a75a48d3a3bbd00d1618ba84051c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198404 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 1c0df6304c57ae1896701e85fe77bfb9a9ba9f2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199431 Tested-by: Jenkins Reviewed-by: Karthik Godha <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199665 diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index beb1b95c871d..8ca48f7b39c8 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1790,8 +1790,13 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uInt32 nScHandle ) : } else sListBuf.append(aToken); + + OUString sEscaped(aToken); + if (aToken.find('"') != std::u16string_view::npos) + sEscaped = sEscaped.replaceAll("\"", "\"\""); + mxString1->Append( aToken ); - sFormulaBuf.append( aToken ); + sFormulaBuf.append(sEscaped); if (nStringIx<0) break; sal_Unicode cUnicodeChar = 0;
