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.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 475570e73964..388d6aeb14b4 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -100,6 +100,7 @@ public:
void testMiscRowHeightExport();
void testNamedRangeBugfdo62729();
void testRichTextExportODS();
+ void testRichTextCellFormat();
void testFormulaRefSheetNameODS();
void testCellValuesExportODS();
@@ -174,6 +175,7 @@ public:
CPPUNIT_TEST(testMiscRowHeightExport);
CPPUNIT_TEST(testNamedRangeBugfdo62729);
CPPUNIT_TEST(testRichTextExportODS);
+ CPPUNIT_TEST(testRichTextCellFormat);
CPPUNIT_TEST(testFormulaRefSheetNameODS);
CPPUNIT_TEST(testCellValuesExportODS);
CPPUNIT_TEST(testCellNoteExportODS);
@@ -1012,6 +1014,21 @@ void ScExportTest::testRichTextExportODS()
xNewDocSh3->DoClose();
}
+void ScExportTest::testRichTextCellFormat()
+{
+ ScDocShellRef xDocSh = loadDoc("cellformat.", FORMAT_XLS);
+ CPPUNIT_ASSERT(xDocSh.Is());
+
+ xmlDocPtr pSheet = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
+ CPPUNIT_ASSERT(pSheet);
+
+ // make sure the only cell in this doc is assigned some formatting record
+ OUString aCellFormat = getXPath(pSheet, "/x:worksheet/x:sheetData/x:row/x:c", "s");
+ CPPUNIT_ASSERT_MESSAGE("Cell format is missing", !aCellFormat.isEmpty());
+
+ xDocSh->DoClose();
+}
+
void ScExportTest::testFormulaRefSheetNameODS()
{
ScDocShellRef xDocSh = loadDoc("formula-quote-in-sheet-name.", FORMAT_ODS, true);