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

Caolán McNamara caolanm at redhat.com
Thu Apr 25 06:11:10 PDT 2013


 vcl/unx/gtk/window/gtksalframe.cxx |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit b1fc17ea25a6c6b0e451d6a1fd420a32ec0369e6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 25 14:04:56 2013 +0100

    Resolves: fdo#63802 return true if we have known empty context
    
    i.e. false for "we can't provide context", and true for
    "we can provide context, even if there isn't any"
    
    Still looks to me that there's a bug in the si-phonetic-dynamic
    im (or something in the stack) that assumes that returning
    false once means it will always return false and give up
    for ever
    
    fix indent while I'm at it
    
    Change-Id: I6df7f2689101250c33318db1fac5ec1b3e340566

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index c659939..3202e5e 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -4177,13 +4177,11 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon
     {
         sal_uInt32 nPosition = xText->getCaretPosition();
         OUString sAllText = xText->getText();
-        if (sAllText.isEmpty())
-            return sal_False;
-    OString sUTF = OUStringToOString(sAllText, RTL_TEXTENCODING_UTF8);
-    OUString sCursorText(sAllText.copy(0, nPosition));
-    gtk_im_context_set_surrounding(pContext, sUTF.getStr(), sUTF.getLength(),
-        OUStringToOString(sCursorText, RTL_TEXTENCODING_UTF8).getLength());
-    return sal_True;
+        OString sUTF = OUStringToOString(sAllText, RTL_TEXTENCODING_UTF8);
+        OUString sCursorText(sAllText.copy(0, nPosition));
+        gtk_im_context_set_surrounding(pContext, sUTF.getStr(), sUTF.getLength(),
+            OUStringToOString(sCursorText, RTL_TEXTENCODING_UTF8).getLength());
+        return sal_True;
     }
 
     return sal_False;


More information about the Libreoffice-commits mailing list