diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-19 20:12:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-19 22:11:25 +0200 |
commit | d4a01820ae094ef2d4ec2196334120600b1c9621 (patch) | |
tree | a33df12dac1b3ccf14f2b3218c8b44c3e17ab171 /vcl/unx | |
parent | 32778ad663f9f96816366aaaea2131273ce01d18 (diff) |
Related: tdf#116951 rhbz#1569331 end should be in terms of unicode chars
not bytes
Change-Id: I05114019abb6c283586cd5c23ed1d148c9cf71d3
Reviewed-on: https://gerrit.libreoffice.org/53175
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 9fd86abccc3d..ad4b00d26927 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3560,7 +3560,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ pango_attr_iterator_range (iter, &start, &end); if (end == G_MAXINT) - end = pText ? strlen (pText) : 0; + end = pText ? g_utf8_strlen(pText, -1) : 0; if (end == start) continue; diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 1db3a469973f..113fcb425963 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3978,7 +3978,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ pango_attr_iterator_range (iter, &start, &end); if (end == G_MAXINT) - end = pText ? strlen (pText) : 0; + end = pText ? g_utf8_strlen(pText, -1) : 0; if (end == start) continue; |