sc/CppunitTest_sc_filter_xml.mk                   |   83 +++++
 sc/CppunitTest_sc_importdescriptorcellrangeobj.mk |   14 
 sc/Module_sc.mk                                   |    2 
 sc/common_unoapi_tests.mk                         |    2 
 sc/qa/extras/scimportdescriptorcellrangeobj.cxx   |   75 +++++
 sc/qa/extras/testdocuments/tdf139467.fods         |  306 +++++++++++++++++++++
 sc/qa/filter/xml/data/sheet1.fods                 |  309 ++++++++++++++++++++++
 sc/qa/filter/xml/xml.cxx                          |   54 +++
 sc/source/filter/xml/XMLExportDatabaseRanges.cxx  |    8 
 sc/source/ui/unoobj/datauno.cxx                   |    5 
 10 files changed, 851 insertions(+), 7 deletions(-)

New commits:
commit 92c6a725b8825e4ffe16edbe27c37b940367759f
Author:     Dan Williams <[email protected]>
AuthorDate: Fri Dec 5 23:09:55 2025 -0600
Commit:     Hossein <[email protected]>
CommitDate: Wed Feb 18 22:20:45 2026 +0100

    tdf#139467 correctly handle DatabaseLocation for Calc cell ranges
    
    svx::ODataAccessDescriptor contains properties for both a database
    name and a local file database location. It parses a given name
    via setDataSource() and puts the value into the correct property
    depending on whether it starts with "file://" or not.
    
    But this means that code which directly checks properties of
    the ODataAccessDescriptor cannot just look for "DataSource"
    but must also handle the "DatabaseLocation" property.
    
    Net effect was that saving a Calc sheet with a cell range
    backed by a database query from a local file database that was
    NOT registered with LibreOffice would not save the database URL
    to the .ods file, and on reload would lose the reference to the
    database. This caused failures when trying to refresh the database
    query.
    
    On the UNO side creating import descriptors for a cell range
    from a file with a database location would also fail to read
    in the location. Fix that.
    
    Change-Id: I7340f2d9f2f0552f436682f2b96249f39413c1fb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195173
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Hossein <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Hossein <[email protected]>

diff --git a/sc/CppunitTest_sc_filter_xml.mk b/sc/CppunitTest_sc_filter_xml.mk
new file mode 100644
index 000000000000..c4e85d8bb915
--- /dev/null
+++ b/sc/CppunitTest_sc_filter_xml.mk
@@ -0,0 +1,83 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,sc_filter_xml))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_filter_xml))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_filter_xml, \
+    sc/qa/filter/xml/xml \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sc_filter_xml, \
+    boost_headers \
+    libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_filter_xml, \
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    drawinglayer \
+    drawinglayercore \
+    editeng \
+    for \
+    forui \
+    i18nlangtag \
+    msfilter \
+    oox \
+    sal \
+    salhelper \
+    sax \
+    sc \
+    scqahelper \
+    sfx \
+    sot \
+    subsequenttest \
+    svl \
+    svt \
+    svx \
+    svxcore \
+    test \
+    tk \
+    tl \
+    ucbhelper \
+    unotest \
+    utl \
+    vcl \
+    xo \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_filter_xml,\
+    -I$(SRCDIR)/sc/source/ui/inc \
+    -I$(SRCDIR)/sc/inc \
+    -I$(SRCDIR)/sc/qa/unit \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sc_filter_xml,\
+    udkapi \
+    offapi \
+    oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_packages,sc_filter_xml, \
+    filter_xhtml \
+    filter_xslt \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_filter_xml))
+$(eval $(call gb_CppunitTest_use_vcl,sc_filter_xml))
+
+$(eval $(call gb_CppunitTest_use_rdb,sc_filter_xml,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_filter_xml))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/CppunitTest_sc_importdescriptorcellrangeobj.mk 
b/sc/CppunitTest_sc_importdescriptorcellrangeobj.mk
new file mode 100644
index 000000000000..0c0a2c0863cd
--- /dev/null
+++ b/sc/CppunitTest_sc_importdescriptorcellrangeobj.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call sc_unoapi_common,importdescriptorcellrangeobj))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index f7ff2b0ed80a..9dcdbcb59968 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -106,6 +106,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
        CppunitTest_sc_vba_macro_test \
        CppunitTest_sc_a11y \
        CppunitTest_sc_filter_html \
+       CppunitTest_sc_filter_xml \
 ))
 
 ifneq ($(ENABLE_JUMBO_SHEETS),)
@@ -202,6 +203,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
        CppunitTest_sc_indexenumeration_tablerowsenumeration \
        CppunitTest_sc_indexenumeration_textfieldenumeration \
        CppunitTest_sc_importdescriptorbaseobj \
+       CppunitTest_sc_importdescriptorcellrangeobj \
        CppunitTest_sc_labelrangeobj \
        CppunitTest_sc_labelrangesobj \
        CppunitTest_sc_modelobj \
diff --git a/sc/common_unoapi_tests.mk b/sc/common_unoapi_tests.mk
index 829a478d9b71..34cc34e45a71 100644
--- a/sc/common_unoapi_tests.mk
+++ b/sc/common_unoapi_tests.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_$(1), \
     sal \
     salhelper \
     sc \
+    sfx \
     subsequenttest \
     test \
     unotest \
@@ -46,6 +47,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_$(1), \
 
 $(eval $(call gb_CppunitTest_set_include,sc_$(1),\
     -I$(SRCDIR)/sc/inc \
+    -I$(SRCDIR)/sc/source/ui/inc \
     $$(INCLUDE) \
 ))
 
diff --git a/sc/qa/extras/scimportdescriptorcellrangeobj.cxx 
b/sc/qa/extras/scimportdescriptorcellrangeobj.cxx
new file mode 100644
index 000000000000..2a2f1b9b4961
--- /dev/null
+++ b/sc/qa/extras/scimportdescriptorcellrangeobj.cxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/unoapi_test.hxx>
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/sheet/DataImportMode.hpp>
+#include <address.hxx>
+#include <cellsuno.hxx>
+#include <docsh.hxx>
+
+#include <cppunit/TestAssert.h>
+
+using namespace css;
+using namespace css::uno;
+using namespace com::sun::star;
+
+namespace sc_apitest
+{
+class ScImportDescriptorCellRangeObj : public UnoApiTest
+{
+public:
+    ScImportDescriptorCellRangeObj()
+        : UnoApiTest(u"/sc/qa/extras/testdocuments"_ustr)
+    {
+    }
+
+    void testDatabaseLocation()
+    {
+        loadFromFile(u"tdf139467.fods");
+
+        SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(mxComponent);
+        CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
+        ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
+        CPPUNIT_ASSERT(xDocSh);
+
+        // Ensure that a cell range import descriptor for a range with an 
embedded
+        // database query that contains a local file URL database-name 
survives the
+        // import process
+        ScRange aRange(0, 0, 0, 2, 6, 0);
+        rtl::Reference<ScCellRangeObj> aCellRange = new ScCellRangeObj(xDocSh, 
aRange);
+        uno::Sequence<beans::PropertyValue> aPropValues = 
aCellRange->createImportDescriptor(false);
+
+        bool found = false;
+        for (auto& rPropValue : aPropValues)
+        {
+            if (rPropValue.Name == "DatabaseName")
+            {
+                OUString aValue;
+                rPropValue.Value >>= aValue;
+                CPPUNIT_ASSERT_EQUAL(u"file:///path/to/Database.odb"_ustr, 
aValue);
+                found = true;
+            }
+        }
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("DatabaseName property not found", true, 
found);
+    }
+
+    CPPUNIT_TEST_SUITE(ScImportDescriptorCellRangeObj);
+    CPPUNIT_TEST(testDatabaseLocation);
+    CPPUNIT_TEST_SUITE_END();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(ScImportDescriptorCellRangeObj);
+
+} // end namespace
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sc/qa/extras/testdocuments/tdf139467.fods 
b/sc/qa/extras/testdocuments/tdf139467.fods
new file mode 100644
index 000000000000..ff58c4a7bc20
--- /dev/null
+++ b/sc/qa/extras/testdocuments/tdf139467.fods
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:c
 hart:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatibl
 e:1.0" xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
office:version="1.4" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
<office:meta><meta:creation-date>2025-12-03T11:15:37.676387000</meta:creation-date><dc:date>2025-12-06T08:52:44.303210000</dc:date><meta:editing-duration>PT44S</meta:editing-duration><meta:editing-cycles>3</meta:editing-cycles><meta:generator>LibreOfficeDev/26.2.0.0.alpha1$MacOSX_AARCH64
 
LibreOffice_project/7bf494112bb05a600fd244f131720abe19fd9d6f</meta:generator><meta:document-statistic
 meta:table-count="1" meta:cell-count="12" meta:object-count="0"/></office:meta>
+ <office:settings>
+  <config:config-item-set config:name="ooo:view-settings">
+   <config:config-item config:name="VisibleAreaTop" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="VisibleAreaLeft" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="VisibleAreaWidth" 
config:type="int">4516</config:config-item>
+   <config:config-item config:name="VisibleAreaHeight" 
config:type="int">2709</config:config-item>
+  </config:config-item-set>
+  <config:config-item-set config:name="ooo:configuration-settings">
+   <config:config-item config:name="AllowPrintJobCancel" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ApplyUserData" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AutoCalculate" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="CharacterCompressionType" 
config:type="short">0</config:config-item>
+   <config:config-item config:name="EmbedAsianScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedComplexScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="EmbedLatinScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedOnlyUsedFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="GridColor" 
config:type="int">12632256</config:config-item>
+   <config:config-item config:name="HasColumnRowHeaders" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="HasSheetTabs" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ImagePreferredDPI" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="IsDocumentShared" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsKernAsianPunctuation" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsOutlineSymbolsSet" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="IsRasterAxisSynchronized" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="IsSnapToRaster" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="LinkUpdateMode" 
config:type="short">3</config:config-item>
+   <config:config-item config:name="LoadReadonly" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrinterName" config:type="string"/>
+   <config:config-item config:name="PrinterPaperFromSetup" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrinterSetup" 
config:type="base64Binary">AAA=</config:config-item>
+   <config:config-item config:name="RasterIsVisible" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="RasterResolutionX" 
config:type="int">1270</config:config-item>
+   <config:config-item config:name="RasterResolutionY" 
config:type="int">1270</config:config-item>
+   <config:config-item config:name="RasterSubdivisionX" 
config:type="int">1</config:config-item>
+   <config:config-item config:name="RasterSubdivisionY" 
config:type="int">1</config:config-item>
+   <config:config-item config:name="SaveThumbnail" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="SaveVersionOnClose" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ShowFormulasMarks" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ShowGrid" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowNoteAuthor" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowNotes" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowPageBreaks" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowZeroValues" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="SyntaxStringRef" 
config:type="short">7</config:config-item>
+   <config:config-item config:name="UpdateFromTemplate" 
config:type="boolean">true</config:config-item>
+   <config:config-item-map-named config:name="ScriptConfiguration">
+    <config:config-item-map-entry config:name="Sheet1">
+     <config:config-item config:name="CodeName" 
config:type="string">Sheet1</config:config-item>
+    </config:config-item-map-entry>
+   </config:config-item-map-named>
+  </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+  <office:script script:language="ooo:Basic">
+   <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink"/>
+  </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+  <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial 
Unicode MS&apos;" style:font-family-generic="system" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Liberation Sans" 
svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Linux Libertine G" svg:font-family="&apos;Linux 
Libertine G&apos;" style:font-family-generic="system" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Noto Sans" svg:font-family="&apos;Noto 
Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="table-cell">
+   <style:paragraph-properties style:tab-stop-distance="0.5in"/>
+   <style:text-properties style:font-name="Liberation Sans" 
fo:font-size="10pt" fo:language="en" fo:country="US" 
style:font-name-asian="Arial Unicode MS" style:font-size-asian="10pt" 
style:language-asian="zh" style:country-asian="CN" 
style:font-name-complex="Arial Unicode MS" style:font-size-complex="10pt" 
style:language-complex="hi" style:country-complex="IN"/>
+  </style:default-style>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#3465a4" 
draw:fill-color="#729fcf" fo:wrap-option="no-wrap" 
draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" 
style:writing-mode="page"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="simple" style:line-break="strict" 
loext:tab-stop-distance="0in" style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" 
loext:opacity="0%" fo:font-family="&apos;Liberation Serif&apos;" 
style:font-family-generic="roman" style:font-pitch="variable" 
fo:font-size="12pt" fo:language="en" fo:country="US" 
style:letter-kerning="true" style:font-family-asian="Tahoma" 
style:font-family-generic-asian="system" style:font-pitch-asian="variable" 
style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" 
style:font-family-complex="Tahoma" style:font-family-generic-complex="system" 
style:font-pitch-complex="variable" style:font-size-complex="12pt" 
style:language-complex="hi" style:country-complex="IN"/>
+  </style:default-style>
+  <style:style style:name="Default" style:family="graphic"/>
+  <style:style style:name="Note" style:family="graphic" 
style:parent-style-name="Default">
+   <style:graphic-properties draw:stroke="solid" 
draw:marker-start="Arrowheads_20_1" draw:marker-start-width="0.0787in" 
draw:marker-start-center="false" draw:fill="solid" draw:fill-color="#ffffc0" 
draw:auto-grow-height="true" draw:auto-grow-width="false" 
fo:padding-top="0.0394in" fo:padding-bottom="0.0394in" 
fo:padding-left="0.0394in" fo:padding-right="0.0394in" draw:shadow="visible" 
draw:shadow-offset-x="0.0394in" draw:shadow-offset-y="0.0394in"/>
+   <style:text-properties style:font-name="Liberation Sans" 
fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" 
style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Arial 
Unicode MS" style:font-family-asian="&apos;Arial Unicode MS&apos;" 
style:font-family-generic-asian="system" style:font-pitch-asian="variable" 
style:font-size-asian="10pt" style:font-name-complex="Arial Unicode MS" 
style:font-family-complex="&apos;Arial Unicode MS&apos;" 
style:font-family-generic-complex="system" style:font-pitch-complex="variable" 
style:font-size-complex="10pt"/>
+  </style:style>
+  <number:number-style style:name="N0">
+   <number:number number:min-integer-digits="1"/>
+  </number:number-style>
+  <style:style style:name="Default" style:family="table-cell"/>
+  <style:style style:name="Heading" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-size="24pt" fo:font-style="normal" 
fo:font-weight="bold" style:font-size-asian="24pt" 
style:font-style-asian="normal" style:font-weight-asian="bold" 
style:font-size-complex="24pt" style:font-style-complex="normal" 
style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Heading_20_1" style:display-name="Heading 1" 
style:family="table-cell" style:parent-style-name="Heading">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+  </style:style>
+  <style:style style:name="Heading_20_2" style:display-name="Heading 2" 
style:family="table-cell" style:parent-style-name="Heading">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-size="12pt" style:font-size-asian="12pt" 
style:font-size-complex="12pt"/>
+  </style:style>
+  <style:style style:name="Text" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+  </style:style>
+  <style:style style:name="Note" style:family="table-cell" 
style:parent-style-name="Text">
+   <style:table-cell-properties fo:background-color="#ffffcc" 
style:diagonal-bl-tr="none" style:diagonal-tl-br="none" 
fo:wrap-option="no-wrap" fo:border="0.74pt solid #808080" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#333333"/>
+  </style:style>
+  <style:style style:name="Footnote" style:family="table-cell" 
style:parent-style-name="Text">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#808080" fo:font-style="italic" 
style:font-style-asian="italic" style:font-style-complex="italic"/>
+  </style:style>
+  <style:style style:name="Hyperlink" style:family="table-cell" 
style:parent-style-name="Text">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#0000ee" 
style:text-underline-style="solid" style:text-underline-width="auto" 
style:text-underline-color="#0000ee"/>
+  </style:style>
+  <style:style style:name="Status" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+  </style:style>
+  <style:style style:name="Good" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#ccffcc" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#006600"/>
+  </style:style>
+  <style:style style:name="Neutral" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#ffffcc" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#996600"/>
+  </style:style>
+  <style:style style:name="Bad" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#ffcccc" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#cc0000"/>
+  </style:style>
+  <style:style style:name="Warning" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#cc0000"/>
+  </style:style>
+  <style:style style:name="Error" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#cc0000" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#ffffff" fo:font-weight="bold" 
style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Accent" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" 
style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Accent_20_1" style:display-name="Accent 1" 
style:family="table-cell" style:parent-style-name="Accent">
+   <style:table-cell-properties fo:background-color="#000000" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#ffffff"/>
+  </style:style>
+  <style:style style:name="Accent_20_2" style:display-name="Accent 2" 
style:family="table-cell" style:parent-style-name="Accent">
+   <style:table-cell-properties fo:background-color="#808080" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#ffffff"/>
+  </style:style>
+  <style:style style:name="Accent_20_3" style:display-name="Accent 3" 
style:family="table-cell" style:parent-style-name="Accent">
+   <style:table-cell-properties fo:background-color="#dddddd" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+  </style:style>
+  <style:style style:name="Result" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-style="italic" 
style:text-underline-style="solid" style:text-underline-width="auto" 
style:text-underline-color="font-color" fo:font-weight="bold" 
style:font-style-asian="italic" style:font-weight-asian="bold" 
style:font-style-complex="italic" style:font-weight-complex="bold"/>
+  </style:style>
+  <draw:marker draw:name="Arrowheads_20_1" draw:display-name="Arrowheads 1" 
svg:viewBox="0 0 20 30" svg:d="M10 0l-10 30h20z"/>
+  <loext:theme loext:name="Office">
+   <loext:theme-colors loext:name="LibreOffice">
+    <loext:color loext:name="dark1" loext:color="#000000"/>
+    <loext:color loext:name="light1" loext:color="#ffffff"/>
+    <loext:color loext:name="dark2" loext:color="#000000"/>
+    <loext:color loext:name="light2" loext:color="#ffffff"/>
+    <loext:color loext:name="accent1" loext:color="#18a303"/>
+    <loext:color loext:name="accent2" loext:color="#0369a3"/>
+    <loext:color loext:name="accent3" loext:color="#a33e03"/>
+    <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+    <loext:color loext:name="accent5" loext:color="#c99c00"/>
+    <loext:color loext:name="accent6" loext:color="#c9211e"/>
+    <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+    <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+   </loext:theme-colors>
+  </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+  <style:style style:name="co1" style:family="table-column">
+   <style:table-column-properties fo:break-before="auto" 
style:column-width="0.889in"/>
+  </style:style>
+  <style:style style:name="ro1" style:family="table-row">
+   <style:table-row-properties style:row-height="0.178in" 
fo:break-before="auto" style:use-optimal-row-height="true"/>
+  </style:style>
+  <style:style style:name="ta1" style:family="table" 
style:master-page-name="Default">
+   <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
+  </style:style>
+  <number:number-style style:name="N2">
+   <number:number number:decimal-places="2" number:min-decimal-places="2" 
number:min-integer-digits="1"/>
+  </number:number-style>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties style:writing-mode="lr-tb"/>
+   <style:header-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.0984in"/>
+   </style:header-style>
+   <style:footer-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.0984in"/>
+   </style:footer-style>
+  </style:page-layout>
+  <style:page-layout style:name="pm2">
+   <style:page-layout-properties style:writing-mode="lr-tb"/>
+   <style:header-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.0984in" 
fo:border="1.5pt solid #000000" fo:padding="0.0071in" 
fo:background-color="#c0c0c0">
+     <style:background-image/>
+    </style:header-footer-properties>
+   </style:header-style>
+   <style:footer-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.0984in" 
fo:border="1.5pt solid #000000" fo:padding="0.0071in" 
fo:background-color="#c0c0c0">
+     <style:background-image/>
+    </style:header-footer-properties>
+   </style:footer-style>
+  </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Default" style:page-layout-name="pm1">
+   <style:header>
+    <text:p><text:sheet-name>???</text:sheet-name></text:p>
+   </style:header>
+   <style:header-left style:display="false"/>
+   <style:header-first style:display="false"/>
+   <style:footer>
+    <text:p>Page <text:page-number>1</text:page-number></text:p>
+   </style:footer>
+   <style:footer-left style:display="false"/>
+   <style:footer-first style:display="false"/>
+  </style:master-page>
+  <style:master-page style:name="Report" style:page-layout-name="pm2">
+   <style:header>
+    <style:region-left>
+     
<text:p><text:sheet-name>???</text:sheet-name><text:s/>(<text:title>???</text:title>)</text:p>
+    </style:region-left>
+    <style:region-right>
+     <text:p><text:date style:data-style-name="N2" 
text:date-value="2025-12-06">00/00/0000</text:date>, <text:time 
style:data-style-name="N2" 
text:time-value="08:53:26.783813000">00:00:00</text:time></text:p>
+    </style:region-right>
+   </style:header>
+   <style:header-left style:display="false"/>
+   <style:header-first style:display="false"/>
+   <style:footer>
+    <text:p>Page <text:page-number>1</text:page-number><text:s/>/ 
<text:page-count>99</text:page-count></text:p>
+   </style:footer>
+   <style:footer-left style:display="false"/>
+   <style:footer-first style:display="false"/>
+  </style:master-page>
+ </office:master-styles>
+ <office:body>
+  <office:spreadsheet>
+   <table:calculation-settings table:automatic-find-labels="false" 
table:use-regular-expressions="false" table:use-wildcards="true"/>
+   <table:table table:name="Sheet1" table:style-name="ta1">
+    <table:table-column table:style-name="co1" 
table:number-columns-repeated="2" table:default-cell-style-name="Default"/>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>ID</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>name</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="1" 
calcext:value-type="float">
+      <text:p>1</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>chair</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="2" 
calcext:value-type="float">
+      <text:p>2</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>table</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="3" 
calcext:value-type="float">
+      <text:p>3</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>lamp</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="4" 
calcext:value-type="float">
+      <text:p>4</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>plate</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="5" 
calcext:value-type="float">
+      <text:p>5</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>cup</text:p>
+     </table:table-cell>
+    </table:table-row>
+   </table:table>
+   <table:named-expressions/>
+   <table:database-ranges>
+    <table:database-range table:name="Import1" 
table:target-range-address="Sheet1.A1:Sheet1.B6">
+     <table:database-source-query 
table:database-name="file:///path/to/Database.odb" table:query-name="Abfrage1"/>
+    </table:database-range>
+   </table:database-ranges>
+  </office:spreadsheet>
+ </office:body>
+</office:document>
diff --git a/sc/qa/filter/xml/data/sheet1.fods 
b/sc/qa/filter/xml/data/sheet1.fods
new file mode 100644
index 000000000000..c8264560d6e5
--- /dev/null
+++ b/sc/qa/filter/xml/data/sheet1.fods
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:c
 hart:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatibl
 e:1.0" xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
office:version="1.4" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
<office:meta><meta:creation-date>2025-12-03T11:15:37.676387000</meta:creation-date><dc:date>2025-12-03T11:15:52.846676000</dc:date><meta:editing-duration>PT17S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:generator>LibreOfficeDev/26.2.0.0.alpha1$MacOSX_AARCH64
 
LibreOffice_project/7bf494112bb05a600fd244f131720abe19fd9d6f</meta:generator><meta:document-statistic
 meta:table-count="1" meta:cell-count="12" meta:object-count="0"/></office:meta>
+ <office:settings>
+  <config:config-item-set config:name="ooo:view-settings">
+   <config:config-item config:name="VisibleAreaTop" 
config:type="int">2709</config:config-item>
+   <config:config-item config:name="VisibleAreaLeft" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="VisibleAreaWidth" 
config:type="int">4516</config:config-item>
+   <config:config-item config:name="VisibleAreaHeight" 
config:type="int">2710</config:config-item>
+  </config:config-item-set>
+  <config:config-item-set config:name="ooo:configuration-settings">
+   <config:config-item config:name="AllowPrintJobCancel" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ApplyUserData" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AutoCalculate" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="CharacterCompressionType" 
config:type="short">0</config:config-item>
+   <config:config-item config:name="EmbedAsianScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedComplexScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="EmbedLatinScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedOnlyUsedFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="GridColor" 
config:type="int">12632256</config:config-item>
+   <config:config-item config:name="HasColumnRowHeaders" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="HasSheetTabs" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ImagePreferredDPI" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="IsDocumentShared" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsKernAsianPunctuation" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsOutlineSymbolsSet" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="IsRasterAxisSynchronized" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="IsSnapToRaster" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="LinkUpdateMode" 
config:type="short">3</config:config-item>
+   <config:config-item config:name="LoadReadonly" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrinterName" config:type="string"/>
+   <config:config-item config:name="PrinterPaperFromSetup" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrinterSetup" 
config:type="base64Binary">AAA=</config:config-item>
+   <config:config-item config:name="RasterIsVisible" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="RasterResolutionX" 
config:type="int">1270</config:config-item>
+   <config:config-item config:name="RasterResolutionY" 
config:type="int">1270</config:config-item>
+   <config:config-item config:name="RasterSubdivisionX" 
config:type="int">1</config:config-item>
+   <config:config-item config:name="RasterSubdivisionY" 
config:type="int">1</config:config-item>
+   <config:config-item config:name="SaveThumbnail" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="SaveVersionOnClose" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ShowFormulasMarks" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ShowGrid" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowNoteAuthor" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowNotes" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowPageBreaks" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ShowZeroValues" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="SyntaxStringRef" 
config:type="short">7</config:config-item>
+   <config:config-item config:name="UpdateFromTemplate" 
config:type="boolean">true</config:config-item>
+   <config:config-item-map-named config:name="ScriptConfiguration">
+    <config:config-item-map-entry config:name="Sheet1">
+     <config:config-item config:name="CodeName" 
config:type="string">Sheet1</config:config-item>
+    </config:config-item-map-entry>
+   </config:config-item-map-named>
+  </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+  <office:script script:language="ooo:Basic">
+   <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink"/>
+  </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+  <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial 
Unicode MS&apos;" style:font-family-generic="system" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Liberation Sans" 
svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Linux Libertine G" svg:font-family="&apos;Linux 
Libertine G&apos;" style:font-family-generic="system" 
style:font-pitch="variable"/>
+  <style:font-face style:name="Noto Sans" svg:font-family="&apos;Noto 
Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="table-cell">
+   <style:paragraph-properties style:tab-stop-distance="0.5in"/>
+   <style:text-properties style:font-name="Liberation Sans" 
fo:font-size="10pt" fo:language="en" fo:country="US" 
style:font-name-asian="Arial Unicode MS" style:font-size-asian="10pt" 
style:language-asian="zh" style:country-asian="CN" 
style:font-name-complex="Arial Unicode MS" style:font-size-complex="10pt" 
style:language-complex="hi" style:country-complex="IN"/>
+  </style:default-style>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#3465a4" 
draw:fill-color="#729fcf" fo:wrap-option="no-wrap" 
draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" 
style:writing-mode="page"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="simple" style:line-break="strict" 
loext:tab-stop-distance="0in" style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" 
loext:opacity="0%" fo:font-family="&apos;Liberation Serif&apos;" 
style:font-family-generic="roman" style:font-pitch="variable" 
fo:font-size="12pt" fo:language="en" fo:country="US" 
style:letter-kerning="true" style:font-family-asian="Tahoma" 
style:font-family-generic-asian="system" style:font-pitch-asian="variable" 
style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" 
style:font-family-complex="Tahoma" style:font-family-generic-complex="system" 
style:font-pitch-complex="variable" style:font-size-complex="12pt" 
style:language-complex="hi" style:country-complex="IN"/>
+  </style:default-style>
+  <style:style style:name="Default" style:family="graphic"/>
+  <style:style style:name="Note" style:family="graphic" 
style:parent-style-name="Default">
+   <style:graphic-properties draw:stroke="solid" 
draw:marker-start="Arrowheads_20_1" draw:marker-start-width="0.0787in" 
draw:marker-start-center="false" draw:fill="solid" draw:fill-color="#ffffc0" 
draw:auto-grow-height="true" draw:auto-grow-width="false" 
fo:padding-top="0.0394in" fo:padding-bottom="0.0394in" 
fo:padding-left="0.0394in" fo:padding-right="0.0394in" draw:shadow="visible" 
draw:shadow-offset-x="0.0394in" draw:shadow-offset-y="0.0394in"/>
+   <style:text-properties style:font-name="Liberation Sans" 
fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" 
style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Arial 
Unicode MS" style:font-family-asian="&apos;Arial Unicode MS&apos;" 
style:font-family-generic-asian="system" style:font-pitch-asian="variable" 
style:font-size-asian="10pt" style:font-name-complex="Arial Unicode MS" 
style:font-family-complex="&apos;Arial Unicode MS&apos;" 
style:font-family-generic-complex="system" style:font-pitch-complex="variable" 
style:font-size-complex="10pt"/>
+  </style:style>
+  <number:number-style style:name="N0">
+   <number:number number:min-integer-digits="1"/>
+  </number:number-style>
+  <style:style style:name="Default" style:family="table-cell"/>
+  <style:style style:name="Heading" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-size="24pt" fo:font-style="normal" 
fo:font-weight="bold" style:font-size-asian="24pt" 
style:font-style-asian="normal" style:font-weight-asian="bold" 
style:font-size-complex="24pt" style:font-style-complex="normal" 
style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Heading_20_1" style:display-name="Heading 1" 
style:family="table-cell" style:parent-style-name="Heading">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" 
style:font-size-complex="18pt"/>
+  </style:style>
+  <style:style style:name="Heading_20_2" style:display-name="Heading 2" 
style:family="table-cell" style:parent-style-name="Heading">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-size="12pt" style:font-size-asian="12pt" 
style:font-size-complex="12pt"/>
+  </style:style>
+  <style:style style:name="Text" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+  </style:style>
+  <style:style style:name="Note" style:family="table-cell" 
style:parent-style-name="Text">
+   <style:table-cell-properties fo:background-color="#ffffcc" 
style:diagonal-bl-tr="none" style:diagonal-tl-br="none" 
fo:wrap-option="no-wrap" fo:border="0.74pt solid #808080" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#333333"/>
+  </style:style>
+  <style:style style:name="Footnote" style:family="table-cell" 
style:parent-style-name="Text">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#808080" fo:font-style="italic" 
style:font-style-asian="italic" style:font-style-complex="italic"/>
+  </style:style>
+  <style:style style:name="Hyperlink" style:family="table-cell" 
style:parent-style-name="Text">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#0000ee" 
style:text-underline-style="solid" style:text-underline-width="auto" 
style:text-underline-color="#0000ee"/>
+  </style:style>
+  <style:style style:name="Status" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+  </style:style>
+  <style:style style:name="Good" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#ccffcc" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#006600"/>
+  </style:style>
+  <style:style style:name="Neutral" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#ffffcc" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#996600"/>
+  </style:style>
+  <style:style style:name="Bad" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#ffcccc" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#cc0000"/>
+  </style:style>
+  <style:style style:name="Warning" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#cc0000"/>
+  </style:style>
+  <style:style style:name="Error" style:family="table-cell" 
style:parent-style-name="Status">
+   <style:table-cell-properties fo:background-color="#cc0000" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#ffffff" fo:font-weight="bold" 
style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Accent" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" 
style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Accent_20_1" style:display-name="Accent 1" 
style:family="table-cell" style:parent-style-name="Accent">
+   <style:table-cell-properties fo:background-color="#000000" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#ffffff"/>
+  </style:style>
+  <style:style style:name="Accent_20_2" style:display-name="Accent 2" 
style:family="table-cell" style:parent-style-name="Accent">
+   <style:table-cell-properties fo:background-color="#808080" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+   <style:text-properties fo:color="#ffffff"/>
+  </style:style>
+  <style:style style:name="Accent_20_3" style:display-name="Accent 3" 
style:family="table-cell" style:parent-style-name="Accent">
+   <style:table-cell-properties fo:background-color="#dddddd" 
fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+  </style:style>
+  <style:style style:name="Result" style:family="table-cell" 
style:parent-style-name="Default">
+   <style:table-cell-properties fo:wrap-option="no-wrap" 
style:shrink-to-fit="false"/>
+   <style:text-properties fo:font-style="italic" 
style:text-underline-style="solid" style:text-underline-width="auto" 
style:text-underline-color="font-color" fo:font-weight="bold" 
style:font-style-asian="italic" style:font-weight-asian="bold" 
style:font-style-complex="italic" style:font-weight-complex="bold"/>
+  </style:style>
+  <draw:marker draw:name="Arrowheads_20_1" draw:display-name="Arrowheads 1" 
svg:viewBox="0 0 20 30" svg:d="M10 0l-10 30h20z"/>
+  <loext:theme loext:name="Office">
+   <loext:theme-colors loext:name="LibreOffice">
+    <loext:color loext:name="dark1" loext:color="#000000"/>
+    <loext:color loext:name="light1" loext:color="#ffffff"/>
+    <loext:color loext:name="dark2" loext:color="#000000"/>
+    <loext:color loext:name="light2" loext:color="#ffffff"/>
+    <loext:color loext:name="accent1" loext:color="#18a303"/>
+    <loext:color loext:name="accent2" loext:color="#0369a3"/>
+    <loext:color loext:name="accent3" loext:color="#a33e03"/>
+    <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+    <loext:color loext:name="accent5" loext:color="#c99c00"/>
+    <loext:color loext:name="accent6" loext:color="#c9211e"/>
+    <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+    <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+   </loext:theme-colors>
+  </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+  <style:style style:name="co1" style:family="table-column">
+   <style:table-column-properties fo:break-before="auto" 
style:column-width="0.889in"/>
+  </style:style>
+  <style:style style:name="ro1" style:family="table-row">
+   <style:table-row-properties style:row-height="0.178in" 
fo:break-before="auto" style:use-optimal-row-height="true"/>
+  </style:style>
+  <style:style style:name="ta1" style:family="table" 
style:master-page-name="Default">
+   <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
+  </style:style>
+  <number:number-style style:name="N2">
+   <number:number number:decimal-places="2" number:min-decimal-places="2" 
number:min-integer-digits="1"/>
+  </number:number-style>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties style:writing-mode="lr-tb"/>
+   <style:header-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.0984in"/>
+   </style:header-style>
+   <style:footer-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.0984in"/>
+   </style:footer-style>
+  </style:page-layout>
+  <style:page-layout style:name="pm2">
+   <style:page-layout-properties style:writing-mode="lr-tb"/>
+   <style:header-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.0984in" 
fo:border="1.5pt solid #000000" fo:padding="0.0071in" 
fo:background-color="#c0c0c0">
+     <style:background-image/>
+    </style:header-footer-properties>
+   </style:header-style>
+   <style:footer-style>
+    <style:header-footer-properties fo:min-height="0.2953in" 
fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.0984in" 
fo:border="1.5pt solid #000000" fo:padding="0.0071in" 
fo:background-color="#c0c0c0">
+     <style:background-image/>
+    </style:header-footer-properties>
+   </style:footer-style>
+  </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Default" style:page-layout-name="pm1">
+   <style:header>
+    <text:p><text:sheet-name>???</text:sheet-name></text:p>
+   </style:header>
+   <style:header-left style:display="false"/>
+   <style:header-first style:display="false"/>
+   <style:footer>
+    <text:p>Page <text:page-number>1</text:page-number></text:p>
+   </style:footer>
+   <style:footer-left style:display="false"/>
+   <style:footer-first style:display="false"/>
+  </style:master-page>
+  <style:master-page style:name="Report" style:page-layout-name="pm2">
+   <style:header>
+    <style:region-left>
+     
<text:p><text:sheet-name>???</text:sheet-name><text:s/>(<text:title>???</text:title>)</text:p>
+    </style:region-left>
+    <style:region-right>
+     <text:p><text:date style:data-style-name="N2" 
text:date-value="2025-12-05">00/00/0000</text:date>, <text:time 
style:data-style-name="N2" 
text:time-value="22:37:17.705385000">00:00:00</text:time></text:p>
+    </style:region-right>
+   </style:header>
+   <style:header-left style:display="false"/>
+   <style:header-first style:display="false"/>
+   <style:footer>
+    <text:p>Page <text:page-number>1</text:page-number><text:s/>/ 
<text:page-count>99</text:page-count></text:p>
+   </style:footer>
+   <style:footer-left style:display="false"/>
+   <style:footer-first style:display="false"/>
+  </style:master-page>
+ </office:master-styles>
+ <office:body>
+  <office:spreadsheet>
+   <table:calculation-settings table:automatic-find-labels="false" 
table:use-regular-expressions="false" table:use-wildcards="true"/>
+   <table:table table:name="Sheet1" table:style-name="ta1">
+    <table:table-column table:style-name="co1" 
table:number-columns-repeated="2" table:default-cell-style-name="Default"/>
+    <table:table-row table:style-name="ro1" table:number-rows-repeated="6">
+     <table:table-cell table:number-columns-repeated="2"/>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>ID</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>name</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="1" 
calcext:value-type="float">
+      <text:p>1</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>chair</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="2" 
calcext:value-type="float">
+      <text:p>2</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>table</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="3" 
calcext:value-type="float">
+      <text:p>3</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>lamp</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="4" 
calcext:value-type="float">
+      <text:p>4</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>plate</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <table:table-row table:style-name="ro1">
+     <table:table-cell office:value-type="float" office:value="5" 
calcext:value-type="float">
+      <text:p>5</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="string" calcext:value-type="string">
+      <text:p>cup</text:p>
+     </table:table-cell>
+    </table:table-row>
+   </table:table>
+   <table:named-expressions/>
+   <table:database-ranges>
+    <table:database-range table:name="Import1" 
table:target-range-address="Sheet1.A7:Sheet1.B12">
+     <table:database-source-query 
table:database-name="file:///path/to/Database.odb" table:query-name="Abfrage1"/>
+    </table:database-range>
+   </table:database-ranges>
+  </office:spreadsheet>
+ </office:body>
+</office:document>
diff --git a/sc/qa/filter/xml/xml.cxx b/sc/qa/filter/xml/xml.cxx
new file mode 100644
index 000000000000..4eacc0a5a2d5
--- /dev/null
+++ b/sc/qa/filter/xml/xml.cxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/unoapi_test.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+
+#include <editeng/udlnitem.hxx>
+
+#include <comphelper/propertyvalue.hxx>
+#include <svl/numformat.hxx>
+#include <svl/zformat.hxx>
+
+#include <helper/qahelper.hxx>
+#include <impex.hxx>
+
+using namespace com::sun::star;
+
+namespace
+{
+/// Covers sc/source/filter/xml/ fixes.
+class Test : public ScModelTestBase
+{
+public:
+    Test()
+        : ScModelTestBase(u"/sc/qa/filter/xml/data/"_ustr)
+    {
+    }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testDatabaseLocationRoundTrip)
+{
+    createScDoc("sheet1.fods");
+
+    save(TestFilter::ODS);
+    xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+    assertXPath(pXmlDoc,
+                "/office:document-content/office:body/office:spreadsheet/"
+                
"table:database-ranges/table:database-range/table:database-source-query",
+                "database-name", u"file:///path/to/Database.odb");
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx 
b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index b93d54be867e..bef2ae3dd5dd 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -292,12 +292,10 @@ private:
         OUString sConRes;
 
         svx::ODataAccessDescriptor aDescriptor;
+        // Normalize data source to handle both Name and Location formats
         aDescriptor.setDataSource(aParam.aDBName);
-        if (aDescriptor.has(svx::DataAccessDescriptorProperty::DataSource))
-        {
-            sDatabaseName = aParam.aDBName;
-        }
-        else if 
(aDescriptor.has(svx::DataAccessDescriptorProperty::ConnectionResource))
+        sDatabaseName = aDescriptor.getDataSource();
+        if (sDatabaseName.isEmpty() && 
aDescriptor.has(svx::DataAccessDescriptorProperty::ConnectionResource))
         {
             sConRes = aParam.aDBName;
         }
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index c3a67d959b32..a0454f8937bf 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -187,10 +187,11 @@ void ScImportDescriptor::FillProperties( 
uno::Sequence<beans::PropertyValue>& rS
 
     svx::ODataAccessDescriptor aDescriptor;
     aDescriptor.setDataSource(rParam.aDBName);
-    if (aDescriptor.has( svx::DataAccessDescriptorProperty::DataSource ))
+    if (aDescriptor.has( svx::DataAccessDescriptorProperty::DataSource ) ||
+        aDescriptor.has( svx::DataAccessDescriptorProperty::DatabaseLocation ))
     {
         pArray[0].Name = SC_UNONAME_DBNAME;
-        pArray[0].Value <<= rParam.aDBName;
+        pArray[0].Value <<= aDescriptor.getDataSource();
     }
     else if (aDescriptor.has( 
svx::DataAccessDescriptorProperty::ConnectionResource ))
     {

Reply via email to