sc/source/filter/excel/xecontent.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1c0df6304c57ae1896701e85fe77bfb9a9ba9f2b
Author:     Karthik Godha <[email protected]>
AuthorDate: Fri Jan 30 14:12:49 2026 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Jan 30 11:09:30 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]>

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index f4d7087cba49..eee757512bc8 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1787,8 +1787,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;

Reply via email to