[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Thu Apr 19 20:12:27 UTC 2018


 vcl/unx/gtk/gtksalframe.cxx   |    2 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d4a01820ae094ef2d4ec2196334120600b1c9621
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 19 20:12:40 2018 +0100

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
 


More information about the Libreoffice-commits mailing list