summaryrefslogtreecommitdiff
path: root/unoidl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-19 15:41:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-19 16:52:22 +0200
commit7320d7a4a4dd0657f2d650a6f580ad399529f0f1 (patch)
treed6d4e3865290d2bbbbed0fcc13ae9981f648ca3f /unoidl
parent766cdd869d7d983e9e171a3eae0629cb9a0206ff (diff)
OUStringChar must either take a sal_Unicode or an ASCII char
...so forbid anything else, to avoid issues like the one described in 766cdd869d7d983e9e171a3eae0629cb9a0206ff "This code wants to add the numeric SvxRotateMode value". Some remaining places that apparently do want to convert some numeric value to sal_Unicode have been augmented with an explicit cast. Change-Id: I6200a84e250e697bc88694bd71142ca1d9a13651 Reviewed-on: https://gerrit.libreoffice.org/81132 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unoidl')
-rw-r--r--unoidl/source/sourceprovider-scanner.l6
1 files changed, 4 insertions, 2 deletions
diff --git a/unoidl/source/sourceprovider-scanner.l b/unoidl/source/sourceprovider-scanner.l
index a688dd24c9e5..1c80c9e6d5b4 100644
--- a/unoidl/source/sourceprovider-scanner.l
+++ b/unoidl/source/sourceprovider-scanner.l
@@ -241,10 +241,12 @@ ALNUM {DIGIT}|{ALPHA}
}
. {
- unsigned char c = yytext[0];
+ char c = yytext[0];
yyextra->errorMessage = c >= ' ' && c <= '~'
? OUString("invalid character \"" + OUStringChar(c) + "\"")
- : OUString("invalid byte x" + OUString::number(c, 16).toAsciiUpperCase());
+ : OUString(
+ "invalid byte x"
+ + OUString::number(static_cast<unsigned char>(c), 16).toAsciiUpperCase());
return TOK_ERROR;
}