[Libreoffice-commits] core.git: sc/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 3 08:00:32 UTC 2020


 sc/qa/unit/data/ods/tdf106181.ods     |binary
 sc/qa/unit/subsequent_export-test.cxx |   24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+)

New commits:
commit 3696b51de1a4075f99fea6ea4e20ad4949188117
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Sep 2 13:34:45 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Sep 3 09:59:49 2020 +0200

    tdf#106181: sc_subsequent_export_test: Add unittest
    
    Change-Id: I0d6481466642173df16bba841ede95a9a018b0eb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101928
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf106181.ods b/sc/qa/unit/data/ods/tdf106181.ods
new file mode 100644
index 000000000000..274790866cb2
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf106181.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 91911ef7d3fd..8172ae52da05 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -225,6 +225,7 @@ public:
 
     void testTdf133595();
     void testTdf134769();
+    void testTdf106181();
     void testTdf105272();
     void testTdf118990();
     void testTdf121612();
@@ -381,6 +382,7 @@ public:
 
     CPPUNIT_TEST(testTdf133595);
     CPPUNIT_TEST(testTdf134769);
+    CPPUNIT_TEST(testTdf106181);
     CPPUNIT_TEST(testTdf105272);
     CPPUNIT_TEST(testTdf118990);
     CPPUNIT_TEST(testTdf121612);
@@ -4622,6 +4624,28 @@ void ScExportTest::testTdf134769()
     xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf106181()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf106181.", FORMAT_ODS);
+    CPPUNIT_ASSERT(xDocSh.is());
+
+    std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+    xmlDocUniquePtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+    CPPUNIT_ASSERT(pSheet);
+
+    assertXPath(pSheet, "/x:worksheet/mc:AlternateContent/mc:Choice/x:controls/mc:AlternateContent/mc:Choice/x:control", "name", "Check Box");
+    assertXPath(pSheet, "/x:worksheet/mc:AlternateContent/mc:Choice/x:controls/mc:AlternateContent/mc:Choice/x:control/x:controlPr", "altText", "Check Box 1");
+
+    xmlDocUniquePtr pDrawing = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/drawings/drawing1.xml");
+    CPPUNIT_ASSERT(pDrawing);
+
+    assertXPath(pDrawing, "/xdr:wsDr/mc:AlternateContent/mc:Choice/xdr:twoCellAnchor/xdr:sp/xdr:nvSpPr/xdr:cNvPr", "name", "Check Box 1");
+    assertXPath(pDrawing, "/xdr:wsDr/mc:AlternateContent/mc:Choice/xdr:twoCellAnchor/xdr:sp/xdr:nvSpPr/xdr:cNvPr", "descr", "Check Box");
+    assertXPath(pDrawing, "/xdr:wsDr/mc:AlternateContent/mc:Choice/xdr:twoCellAnchor/xdr:sp/xdr:nvSpPr/xdr:cNvPr", "hidden", "0");
+
+    xDocSh->DoClose();
+}
+
 void ScExportTest::testTdf105272()
 {
     ScDocShellRef xDocSh = loadDoc("tdf105272.", FORMAT_XLSX);


More information about the Libreoffice-commits mailing list