summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-09-17 11:49:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-09-17 13:08:13 +0200
commit087995401447a4d452e3daf147c02fb66c7b05c1 (patch)
tree841408966c0717b70cd86158c506b478fc68b4a2
parent4883da6fd25e4645a3b30cb58212a2f666dae75a (diff)
Better fix
...for 32efe70bbfc6c64df7cf73b6a6c0976ae1e038c8 "Fix linux x86 build" Change-Id: Ic935300777fc43dfb315e1117ca7f96916cc43c6 Reviewed-on: https://gerrit.libreoffice.org/79050 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 16897ef51798..f3edf71d9c41 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3999,7 +3999,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
for (sal_Int32 nUtf16Offset = 0; nUtf16Offset < rText.getLength(); rText.iterateCodePoints(&nUtf16Offset))
aUtf16Offsets.push_back(nUtf16Offset);
- int nUtf32Len = aUtf16Offsets.size();
+ sal_Int32 nUtf32Len = aUtf16Offsets.size();
+ // from the above loop filling aUtf16Offsets, we know that its size() fits into sal_Int32
aUtf16Offsets.push_back(rText.getLength());
// sanitize the CurPos which is in utf-32
@@ -4040,8 +4041,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
sal_Int32 nUtf32End = g_utf8_pointer_to_offset(pText, pText + nUtf8End);
// sanitize the utf32 range
- nUtf32Start = std::min(nUtf32Start, sal_Int32(nUtf32Len));
- nUtf32End = std::min(nUtf32End, sal_Int32(nUtf32Len));
+ nUtf32Start = std::min(nUtf32Start, nUtf32Len);
+ nUtf32End = std::min(nUtf32End, nUtf32Len);
if (nUtf32Start >= nUtf32End)
continue;