tdf#155368: sc_subsequent_export: Add unittest

Change-Id: Ie177342720df50d160600cf133b87bdf3411203d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152114
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2023-05-22 13:53:19 +02:00
parent e7e9991fd0
commit e34bb6e67a
2 changed files with 21 additions and 0 deletions

Binary file not shown.

View File

@@ -2217,6 +2217,27 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testCellBordersXLSX)
testExcelCellBorders("Calc Office Open XML");
}
CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf155368)
{
createScDoc("ods/tdf155368.ods");
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:WrapText", {});
save("Calc Office Open XML");
xmlDocUniquePtr pStyles = parseExport("xl/styles.xml");
CPPUNIT_ASSERT(pStyles);
assertXPath(pStyles, "/x:styleSheet/x:cellXfs/x:xf[1]/x:alignment", "wrapText", "false");
// Without the fix in place, this test would have failed with
// - Expected: false
// - Actual : true
assertXPath(pStyles, "/x:styleSheet/x:cellXfs/x:xf[2]/x:alignment", "wrapText", "false");
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */