[Libreoffice-commits] core.git: sc/qa
Bartosz Kosiorek
gang65 at poczta.onet.pl
Thu Apr 6 20:58:30 UTC 2017
sc/qa/unit/data/ods/ceiling-floor.ods |binary
sc/qa/unit/subsequent_export-test.cxx | 18 ++++++++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit d5215e0e58febf582b18ad38f5745f8ae924cc1f
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Date: Thu Mar 23 00:24:34 2017 +0100
unit test for CEILING and FLOOR .xlsx export, tdf#100011
Change-Id: I2ce45db4ae905dedf7c3dc8fb0fd9519ace6c3aa
Reviewed-on: https://gerrit.libreoffice.org/35549
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/ceiling-floor.ods b/sc/qa/unit/data/ods/ceiling-floor.ods
new file mode 100644
index 000000000000..051518b6fc4a
Binary files /dev/null and b/sc/qa/unit/data/ods/ceiling-floor.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index ffb3bbf15157..6cc4bbb407a1 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -144,9 +144,11 @@ public:
void testCeilingFloor( sal_uLong nFormatType );
void testCeilingFloorXLSX();
+ void testCeilingFloorODSToXLSX();
void testCeilingFloorXLS();
void testCeilingFloorODS();
+
#if !defined _WIN32
void testRelativePathsODS();
#endif
@@ -239,6 +241,7 @@ public:
CPPUNIT_TEST(testFunctionsExcel2010XLS);
CPPUNIT_TEST(testFunctionsExcel2010ODS);
CPPUNIT_TEST(testCeilingFloorXLSX);
+ CPPUNIT_TEST(testCeilingFloorODSToXLSX);
CPPUNIT_TEST(testCeilingFloorXLS);
CPPUNIT_TEST(testCeilingFloorODS);
#if !defined(_WIN32)
@@ -2723,6 +2726,20 @@ void ScExportTest::testCeilingFloorXLSX()
testCeilingFloor(FORMAT_XLSX);
}
+void ScExportTest::testCeilingFloorODSToXLSX()
+{
+ // tdf#100011 - Cannot open sheet containg FLOOR/CEILING functions by MS Excel, after export to .xlsx
+ ScDocShellRef xShell = loadDoc("ceiling-floor.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xShell.is());
+
+ std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
+ xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/workbook.xml");
+ CPPUNIT_ASSERT(pSheet);
+
+ // there shouldn't be any defined names during export of FLOOR and CEILING functions to .xlsx
+ assertXPath(pSheet, "/x:workbook/x:definedNames", 0);
+}
+
void ScExportTest::testCeilingFloorXLS()
{
testCeilingFloor(FORMAT_XLS);
@@ -2733,6 +2750,7 @@ void ScExportTest::testCeilingFloorODS()
testCeilingFloor(FORMAT_ODS);
}
+
#if !defined _WIN32
void ScExportTest::testRelativePathsODS()
{
More information about the Libreoffice-commits
mailing list