summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-04-13 11:53:28 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2020-04-13 14:26:20 +0200
commitd2505dd4cc0960e97a5fca848996c8f1b043880d (patch)
tree4fe4aaf5e64e47a39131784929d56a09c970c75d /sc
parentdbd98ebe9f90cedb41a90375688b200c35dd8928 (diff)
tdf#112936: Add unittest
Change-Id: I9c2f21491ef97f9a1b82f43cdb9b0b978689f70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92110 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/tdf112936.xlsxbin0 -> 12032 bytes
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf112936.xlsx b/sc/qa/unit/data/xlsx/tdf112936.xlsx
new file mode 100644
index 000000000000..a292679e8b16
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf112936.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index b75189fe6618..4e6136aaa6b0 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -218,6 +218,7 @@ public:
void testTdf105272();
void testTdf118990();
void testTdf121612();
+ void testTdf112936();
void testPivotCacheAfterExportXLSX();
void testTdf114969XLSX();
void testTdf115192XLSX();
@@ -358,6 +359,7 @@ public:
CPPUNIT_TEST(testTdf105272);
CPPUNIT_TEST(testTdf118990);
CPPUNIT_TEST(testTdf121612);
+ CPPUNIT_TEST(testTdf112936);
CPPUNIT_TEST(testPivotCacheAfterExportXLSX);
CPPUNIT_TEST(testTdf114969XLSX);
CPPUNIT_TEST(testTdf115192XLSX);
@@ -4403,6 +4405,20 @@ void ScExportTest::testTdf121612()
xDocSh->DoClose();
}
+void ScExportTest::testTdf112936()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf112936.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+
+ xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/pivotCache/pivotCacheDefinition1.xml", FORMAT_XLSX);
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPath(pDoc, "//x:pivotCacheDefinition", "recordCount", "4");
+ assertXPath(pDoc, "//x:pivotCacheDefinition", "createdVersion", "3");
+
+ xDocSh->DoClose();
+}
+
void ScExportTest::testXltxExport()
{
// Create new document