diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-03-27 10:07:31 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-04 15:24:49 +0200 |
commit | 4a4b1df72909fe96acdbcb95f90e30bd1a79c5eb (patch) | |
tree | 4da38d52d51c761cbf09f1a57b3f76b2dcd53d3a /include/oox | |
parent | 3154770b49f84981432ccc3756ceb1840ff8d8a0 (diff) |
Get rid of USS macro
The helper marco is used in export code to convert UTF-16 internal
string representation to UTF-8 used in XML encoding. I suppose that all
strings here should be already valid UTF-16 (an invalid input should
have been validated at import/input stage). An invalid string at this
stage means a programming error in another part of code that breaks this
precondition, and should not be handled at export stage.
(See also commit 0267a2326b5282023e8b08a147eca178c5db1980.)
This effectively changes flags used in conversion from UTF-16 to UTF-8,
so that now RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR is used instead of
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT, so that the result would be
truncated on invalid bytes instead of inserting U+FFFD, and would fail
assertion in debug builds.
Other changed flags don't affect UTF-16-to-UTF-8 conversion.
Change-Id: I12b2cc5378208904c3266924187d6402700ed6f3
Reviewed-on: https://gerrit.libreoffice.org/69801
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/export/utils.hxx | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx index fbe4c806dd70..fa758089136e 100644 --- a/include/oox/export/utils.hxx +++ b/include/oox/export/utils.hxx @@ -59,8 +59,6 @@ static constexpr const char* ToPsz10(bool b) return b ? "1" : "0"; } -#define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr() - static constexpr sal_Int64 PPTtoEMU( sal_Int32 nPPT ) { return static_cast<sal_Int64>( static_cast<double>(nPPT) * 1587.5 ); |