diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/ods/tdf79398_NatNum5.ods | bin | 0 -> 7420 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf79398_NatNum5.ods b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods Binary files differnew file mode 100644 index 000000000000..08f2028e8c6e --- /dev/null +++ b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 848fbb8c8c2c..18deabd1969d 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -172,6 +172,7 @@ public: void testTdf88657(); void testEscapeCharInNumberFormatXLSX(); + void testNatNumInNumberFormatXLSX(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -252,6 +253,7 @@ public: CPPUNIT_TEST(testTdf88657); CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX); + CPPUNIT_TEST(testNatNumInNumberFormatXLSX); CPPUNIT_TEST_SUITE_END(); @@ -3638,6 +3640,21 @@ void ScExportTest::testEscapeCharInNumberFormatXLSX() xDocSh->DoClose(); } +void ScExportTest::testNatNumInNumberFormatXLSX() +{ + ScDocShellRef xDocSh = loadDoc("tdf79398_NatNum5.", FORMAT_ODS); + CPPUNIT_ASSERT( xDocSh.Is() ); + xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX); // Convert [NatNum5] to [DBNum2] in Chinese + CPPUNIT_ASSERT( xDocSh.Is() ); + + xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", "[DBNum2][$-804]General"); + + xDocSh->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |