summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-25 14:04:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-25 14:10:49 +0100
commitb1fc17ea25a6c6b0e451d6a1fd420a32ec0369e6 (patch)
tree096c64c4fb1c15439ae11265816fc7e353635c3d
parent5ad80806d6c53a16868d80ae167d9f91f0cda629 (diff)
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
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index c659939babad..3202e5e6d38f 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;