diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-09-14 17:41:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-09-15 14:31:42 +0200 |
commit | 186e31689661e23824b123dd014a65b713bedd8c (patch) | |
tree | 2ff9a84ee809b4d9448930c7e49ca3c3dc49a907 /tools | |
parent | 73bc364347fc8325a632f17fcda220ce7d6f5945 (diff) |
Assert flags passed to rtl_convertTextToUnicode/UnicodeToText are valid
...so that at least some typos of using OUSTRING_TO_OSTRING_CVTFLAGS (0x566)
instead of OSTRING_TO_OUSTRING_CVTFLAGS (0x333) can be found. (Unfortunately,
in the other direction, 0x333 is a valid combination of
RTL_UNICODETOTEXT_FLAGS_*.)
Change-Id: I7cfb3677b103ae90de88833cc93b0a5384607e15
Reviewed-on: https://gerrit.libreoffice.org/42288
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qa/cppunit/test_reversemap.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qa/cppunit/test_reversemap.cxx b/tools/qa/cppunit/test_reversemap.cxx index d6da18a570fd..e9b7adc21dd4 100644 --- a/tools/qa/cppunit/test_reversemap.cxx +++ b/tools/qa/cppunit/test_reversemap.cxx @@ -60,7 +60,7 @@ namespace aAllChars[i-1] = static_cast<sal_Char>(i); //Some slots are unused, so don't map to private, just set them to 'X' - sal_uInt32 const convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE; + sal_uInt32 const convertFlags = OSTRING_TO_OUSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE; OUString sOrigText(&aAllChars[0], aAllChars.size(), eEncoding, convertFlags); sOrigText = sOrigText.replace( 0xfffd, 'X' ); |