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.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index d354de27a7c4..35d349fdbee5 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -89,6 +89,7 @@ public:
virtual void tearDown() override;
void test();
+ void testTdf139394();
void testExtCondFormatXLSX();
void testTdf90104();
void testTdf111876();
@@ -279,6 +280,7 @@ public:
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
+ CPPUNIT_TEST(testTdf139394);
CPPUNIT_TEST(testExtCondFormatXLSX);
CPPUNIT_TEST(testTdf90104);
CPPUNIT_TEST(testTdf111876);
@@ -517,6 +519,31 @@ void ScExportTest::test()
xDocSh->DoClose();
}
+void ScExportTest::testTdf139394()
+{
+ ScDocShellRef xShell = loadDoc(u"tdf139394.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xShell.is());
+
+ ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+
+ std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+ xmlDocUniquePtr pDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPathContent(pDoc,
+ "/x:worksheet/x:extLst/x:ext/x14:conditionalFormattings/x14:conditionalFormatting[1]/"
+ "x14:cfRule/xm:f", "LEFT(A1,LEN(\"+\"))=\"+\"");
+ assertXPathContent(pDoc,
+ "/x:worksheet/x:extLst/x:ext/x14:conditionalFormattings/x14:conditionalFormatting[2]/"
+ "x14:cfRule/xm:f", "RIGHT(A2,LEN(\"-\"))=\"-\"");
+ assertXPathContent(pDoc,
+ "/x:worksheet/x:extLst/x:ext/x14:conditionalFormattings/x14:conditionalFormatting[3]/"
+ "x14:cfRule/xm:f", "LEFT(A3,LEN($B$3))=$B$3");
+
+ xDocSh->DoClose();
+}
+
void ScExportTest::testExtCondFormatXLSX()
{
ScDocShellRef xShell = loadDoc("tdf139021.", FORMAT_XLSX);