summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_filters-test.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-08-23 17:00:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-08-23 17:00:36 +0200
commit9a19e96d0d9df032d51748c02adb4fe778291afd (patch)
tree773c48ababc4ed7b2e5f9210874396d26997a85f /sc/qa/unit/subsequent_filters-test.cxx
parent486d3b214c270fbd2651a0b0895d600e0f647750 (diff)
ScFiltersTest::testUnicodeFileNameGnumeric only works with UTF-8
Change-Id: If31062abf50125c65a90566f1276f37d6725f73c
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 1fdec5f26079..86a67c2cea91 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -3932,6 +3932,13 @@ void ScFiltersTest::testTdf97598XLSX()
#ifdef UNX
void ScFiltersTest::testUnicodeFileNameGnumeric()
{
+ // Mapping the LO-interal URL
+ // <file:///.../sc/qa/unit/data/gnumeric/t%C3%A4%C3%9Ft.gnumeric> to the
+ // repo's file sc/qa/unit/data/gnumeric/t\303\244\303\237t.gnumeric only
+ // works when the system encoding is UTF-8:
+ if (osl_getThreadTextEncoding() != RTL_TEXTENCODING_UTF8) {
+ return;
+ }
OString aFileNamePrefix= "t" + OString(RTL_CONSTASCII_STRINGPARAM("\u00e4\u00df")) + "t.";
ScDocShellRef xDocSh = loadDoc(OStringToOUString(aFileNamePrefix, RTL_TEXTENCODING_UTF8), FORMAT_GNUMERIC);
CPPUNIT_ASSERT(xDocSh.is());