diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-10-06 20:35:54 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-10-06 22:15:43 +0200 |
commit | ad439ded005cffd525ffe874f535fca7a4da1f49 (patch) | |
tree | 4c18a36dae41a7abb486a388f03799983ce47b5c /sc/qa/unit | |
parent | 05c704d3bea7f9a7ec51ac28d4d55ba8068f2da5 (diff) |
tdf#112946: Pivot table: Missing selector for a row field after RT in Calc
We need to explicitly set compact flags to false, since true is
the default. It seems MSO prefers compact mode, when the file
contains colliding mode flags.
Change-Id: Ib311f1cf44345be294e6c6607c227c2baa0fb693
Reviewed-on: https://gerrit.libreoffice.org/43210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sc/qa/unit')
-rwxr-xr-x | sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx | bin | 0 -> 12178 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx b/sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx Binary files differnew file mode 100755 index 000000000000..6b575c0af7b3 --- /dev/null +++ b/sc/qa/unit/data/xlsx/pivottable_outline_mode.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index d0596bdf06ef..21837ff11152 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -226,6 +226,7 @@ public: void testPivotTableBoolFieldFilterXLSX(); void testPivotTableRowColPageFieldFilterXLSX(); void testPivotTableErrorItemFilterXLSX(); + void testPivotTableOutlineModeXLSX(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -346,6 +347,7 @@ public: CPPUNIT_TEST(testPivotTableBoolFieldFilterXLSX); CPPUNIT_TEST(testPivotTableRowColPageFieldFilterXLSX); CPPUNIT_TEST(testPivotTableErrorItemFilterXLSX); + CPPUNIT_TEST(testPivotTableOutlineModeXLSX); CPPUNIT_TEST_SUITE_END(); @@ -5251,6 +5253,23 @@ void ScExportTest::testPivotTableErrorItemFilterXLSX() xDocSh->DoClose(); } +void ScExportTest::testPivotTableOutlineModeXLSX() +{ + ScDocShellRef xShell = loadDoc("pivottable_outline_mode.", FORMAT_XLSX); + CPPUNIT_ASSERT(xShell.is()); + + std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX); + xmlDocPtr pTable = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/pivotTables/pivotTable1.xml"); + CPPUNIT_ASSERT(pTable); + + // Next to the outline flags, compact flags also should be set (true is the default) + assertXPath(pTable, "/x:pivotTableDefinition", "outline", "1"); + assertXPath(pTable, "/x:pivotTableDefinition", "outlineData", "1"); + assertXPath(pTable, "/x:pivotTableDefinition", "compact", "0"); + assertXPath(pTable, "/x:pivotTableDefinition", "compactData", "0"); + assertXPath(pTable, "/x:pivotTableDefinition/x:pivotFields/x:pivotField[1]", "compact", "0"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |