Kaydet (Commit) e55a8522 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Kohei Yoshida

tdf#116453: Add a test case for this.

Change-Id: I280f070bf974ac2f4a889f4c98a80a87092c013a
Reviewed-on: https://gerrit.libreoffice.org/60118
Tested-by: Jenkins
Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst be5e7fed
This diff is collapsed.
......@@ -246,6 +246,7 @@ public:
void testBorderColorsXLSXML();
void testHiddenRowsColumnsXLSXML();
void testColumnWidthRowHeightXLSXML();
void testCharacterSetXLSXML();
void testTdf62268();
void testVBAMacroFunctionODS();
......@@ -379,6 +380,7 @@ public:
CPPUNIT_TEST(testBorderColorsXLSXML);
CPPUNIT_TEST(testHiddenRowsColumnsXLSXML);
CPPUNIT_TEST(testColumnWidthRowHeightXLSXML);
CPPUNIT_TEST(testCharacterSetXLSXML);
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
CPPUNIT_TEST(testTdf62268);
CPPUNIT_TEST(testVBAMacroFunctionODS);
......@@ -3989,6 +3991,37 @@ void ScFiltersTest::testColumnWidthRowHeightXLSXML()
xDocSh->DoClose();
}
void ScFiltersTest::testCharacterSetXLSXML()
{
ScDocShellRef xDocSh = loadDoc("character-set.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load column-width-row-height.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT_EQUAL(SCTAB(1), rDoc.GetTableCount());
OUString aName;
rDoc.GetName(0, aName);
// Check the sheet name. The values are all Cyrillic letters.
std::vector<sal_Unicode> aBuf = { 0x041b, 0x0438, 0x0441, 0x0442, 0x0031 };
OUString aExpected(aBuf.data(), aBuf.size());
CPPUNIT_ASSERT_EQUAL(aExpected, aName);
// Check the value of I4
OUString aVal = rDoc.GetString(ScAddress(8,3,0));
aBuf = { 0x0421, 0x0443, 0x043c, 0x043c, 0x0430 };
aExpected = OUString(aBuf.data(), aBuf.size());
CPPUNIT_ASSERT_EQUAL(aExpected, aVal);
// Check the value of J3
aVal = rDoc.GetString(ScAddress(9,2,0));
aBuf = { 0x041e, 0x0441, 0x0442, 0x0430, 0x0442, 0x043e, 0x043a };
aExpected = OUString(aBuf.data(), aBuf.size());
CPPUNIT_ASSERT_EQUAL(aExpected, aVal);
xDocSh->DoClose();
}
void ScFiltersTest::testCondFormatXLSB()
{
ScDocShellRef xDocSh = loadDoc("cond_format.", FORMAT_XLSB);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment