summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_export-test.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit/subsequent_export-test.cxx')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 36f62373e7e0..2fb53a18ac3c 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -43,6 +43,7 @@
#include <validat.hxx>
#include <attrib.hxx>
#include <global.hxx>
+#include <dpobject.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
@@ -209,6 +210,7 @@ public:
void testKeepSettingsOfBlankRows();
void testTdf118990();
+ void testTdf121612();
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
@@ -319,6 +321,7 @@ public:
CPPUNIT_TEST(testKeepSettingsOfBlankRows);
CPPUNIT_TEST(testTdf118990);
+ CPPUNIT_TEST(testTdf121612);
CPPUNIT_TEST_SUITE_END();
@@ -4068,6 +4071,23 @@ void ScExportTest::testTdf118990()
xDocSh->DoClose();
}
+void ScExportTest::testTdf121612()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf121612.", FORMAT_ODS);
+ CPPUNIT_ASSERT(xDocSh.is());
+ xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // There should be a pivot table
+ CPPUNIT_ASSERT(rDoc.HasPivotTable());
+
+ // DP collection is not lost after export and has one entry
+ ScDPCollection* pDPColl = rDoc.GetDPCollection();
+ CPPUNIT_ASSERT(pDPColl);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDPColl->GetCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();