diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-11-18 14:51:12 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-11-18 15:08:00 +0100 |
commit | 6264205ee7f719f454585ada69be0a320ddc69cb (patch) | |
tree | 34d08b922921cb3822d6b92a337b7359fe41ecd0 /sc/qa | |
parent | 60f75c333b3040464ca9d251e579c865916d827e (diff) |
tdf#103960: The import of UCS2 data uses a different code path.
The commit b297f7bbfed83f87398231740e910afe6ebfbb97 was too eager from this
point of view, we shouldn't use SetSrcEncoding for UCS2 because in that case
we end up with RTL_TEXTENCODING_DONTKNOW in eSrcEnc.
Change-Id: Id8bcb08aee17c8258c074b481345a2795939edc0
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/bugfix-test.cxx | 13 | ||||
-rw-r--r-- | sc/qa/unit/data/html/tdf103960.html | bin | 0 -> 971 bytes |
2 files changed, 13 insertions, 0 deletions
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx index 5d21670416ec..649eba95d9cb 100644 --- a/sc/qa/unit/bugfix-test.cxx +++ b/sc/qa/unit/bugfix-test.cxx @@ -89,6 +89,7 @@ public: void testTdf98657(); void testTdf88821(); void testTdf88821_2(); + void testTdf103960(); void testRhbz1390776(); CPPUNIT_TEST_SUITE(ScFiltersTest); @@ -101,6 +102,7 @@ public: CPPUNIT_TEST(testTdf98657); CPPUNIT_TEST(testTdf88821); CPPUNIT_TEST(testTdf88821_2); + CPPUNIT_TEST(testTdf103960); CPPUNIT_TEST(testRhbz1390776); CPPUNIT_TEST_SUITE_END(); private: @@ -271,6 +273,17 @@ void ScFiltersTest::testTdf88821_2() xDocSh->DoClose(); } +void ScFiltersTest::testTdf103960() +{ + ScDocShellRef xDocSh = loadDoc("tdf103960.", FORMAT_HTML); + ScDocument& rDoc = xDocSh->GetDocument(); + + // A1 should be 'Data', not the entire content of the file + CPPUNIT_ASSERT_EQUAL(OStringToOUString("Data", RTL_TEXTENCODING_UTF8), rDoc.GetString(0, 0, 0)); + + xDocSh->DoClose(); +} + void ScFiltersTest::testRhbz1390776() { ScDocShellRef xDocSh = loadDoc("rhbz1390776.", FORMAT_XLS_XML); diff --git a/sc/qa/unit/data/html/tdf103960.html b/sc/qa/unit/data/html/tdf103960.html Binary files differnew file mode 100644 index 000000000000..3e07ac12769f --- /dev/null +++ b/sc/qa/unit/data/html/tdf103960.html |