[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 26 20:12:02 UTC 2020
sc/qa/unit/data/xlsx/tdf134769.xlsx |binary
sc/qa/unit/subsequent_export-test.cxx | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit e59ac9bea9caf5b24258ac1fecfc886a0fc7374f
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sat Jul 25 19:55:41 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sun Jul 26 22:11:27 2020 +0200
tdf#134769: sc_subsequent_export_test: Add unittest
Change-Id: Ief7138716bb15a1b7a87fa9baee2cfaf7bbfc9c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99447
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/xlsx/tdf134769.xlsx b/sc/qa/unit/data/xlsx/tdf134769.xlsx
new file mode 100644
index 000000000000..2f7c74adff57
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf134769.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index ae42341df323..b645979f6b84 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -224,6 +224,7 @@ public:
void testKeepSettingsOfBlankRows();
void testTdf133595();
+ void testTdf134769();
void testTdf105272();
void testTdf118990();
void testTdf121612();
@@ -375,6 +376,7 @@ public:
CPPUNIT_TEST(testKeepSettingsOfBlankRows);
CPPUNIT_TEST(testTdf133595);
+ CPPUNIT_TEST(testTdf134769);
CPPUNIT_TEST(testTdf105272);
CPPUNIT_TEST(testTdf118990);
CPPUNIT_TEST(testTdf121612);
@@ -4593,6 +4595,25 @@ void ScExportTest::testTdf133595()
xDocSh->DoClose();
}
+void ScExportTest::testTdf134769()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf134769.", FORMAT_XLSX);
+ 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);
+
+ // without the fix in place, the legacyDrawing would have been exported after the checkbox
+ // and Excel would have claimed the document is corrupted
+ // Use their ids to check the order
+ assertXPath(pSheet, "/x:worksheet/x:drawing", "id", "rId2");
+ assertXPath(pSheet, "/x:worksheet/x:legacyDrawing", "id", "rId3");
+ assertXPath(pSheet, "/x:worksheet/mc:AlternateContent/mc:Choice/x:controls/mc:AlternateContent/mc:Choice/x:control", "id", "rId4");
+
+ xDocSh->DoClose();
+}
+
void ScExportTest::testTdf105272()
{
ScDocShellRef xDocSh = loadDoc("tdf105272.", FORMAT_XLSX);
More information about the Libreoffice-commits
mailing list