Kaydet (Commit) 8b028754 authored tarafından Caolán McNamara's avatar Caolán McNamara

These multi-lingual IMs have been always disabled for Linux

Where not-Linux was in practice solaris. We can be pretty sure that the
ismultlingual path is effectively unused. so following that chain of logic
quite a bit can go.
üst 66ec27f6
...@@ -86,7 +86,6 @@ typedef enum { ...@@ -86,7 +86,6 @@ typedef enum {
typedef struct { typedef struct {
SalFrame* pFrame; SalFrame* pFrame;
Bool bIsMultilingual;
preedit_status_t eState; preedit_status_t eState;
preedit_text_t aText; preedit_text_t aText;
SalExtTextInputEvent aInputEv; SalExtTextInputEvent aInputEv;
......
...@@ -38,7 +38,6 @@ class SalI18N_InputContext ...@@ -38,7 +38,6 @@ class SalI18N_InputContext
private: private:
Bool mbUseable; // system supports current locale ? Bool mbUseable; // system supports current locale ?
Bool mbMultiLingual; // system supports iiimp ?
XIC maContext; XIC maContext;
XIMStyle mnSupportedStatusStyle; XIMStyle mnSupportedStatusStyle;
...@@ -66,7 +65,6 @@ private: ...@@ -66,7 +65,6 @@ private:
public: public:
Bool UseContext() { return mbUseable; } Bool UseContext() { return mbUseable; }
Bool IsMultiLingual() { return mbMultiLingual; }
Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; } Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; }
XIC GetContext() { return maContext; } XIC GetContext() { return maContext; }
......
...@@ -39,14 +39,12 @@ class VCLPLUG_GEN_PUBLIC SalI18N_InputMethod ...@@ -39,14 +39,12 @@ class VCLPLUG_GEN_PUBLIC SalI18N_InputMethod
{ {
Bool mbUseable; // system supports locale as well as status Bool mbUseable; // system supports locale as well as status
// and preedit style ? // and preedit style ?
Bool mbMultiLingual; // system supports iiimp
XIM maMethod; XIM maMethod;
XIMCallback maDestroyCallback; XIMCallback maDestroyCallback;
XIMStyles *mpStyles; XIMStyles *mpStyles;
public: public:
Bool IsMultiLingual() { return mbMultiLingual; }
Bool PosixLocale(); Bool PosixLocale();
Bool UseMethod() { return mbUseable; } Bool UseMethod() { return mbUseable; }
XIM GetMethod() { return maMethod; } XIM GetMethod() { return maMethod; }
...@@ -55,7 +53,6 @@ public: ...@@ -55,7 +53,6 @@ public:
XIMStyles *GetSupportedStyles() { return mpStyles; } XIMStyles *GetSupportedStyles() { return mpStyles; }
Bool SetLocale( const char* pLocale = "" ); Bool SetLocale( const char* pLocale = "" );
Bool FilterEvent( XEvent *pEvent, XLIB_Window window ); Bool FilterEvent( XEvent *pEvent, XLIB_Window window );
Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler);
SalI18N_InputMethod(); SalI18N_InputMethod();
~SalI18N_InputMethod(); ~SalI18N_InputMethod();
......
...@@ -164,100 +164,91 @@ enlarge_buffer ( preedit_text_t *ptext, int nnewlimit ) ...@@ -164,100 +164,91 @@ enlarge_buffer ( preedit_text_t *ptext, int nnewlimit )
// //
void void
Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where, Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where)
Bool isMultilingual)
{ {
sal_Unicode *pInsertTextString; sal_Unicode *pInsertTextString;
int nInsertTextLength = 0; int nInsertTextLength = 0;
XIMFeedback *pInsertTextCharStyle = pInsertText->feedback; XIMFeedback *pInsertTextCharStyle = pInsertText->feedback;
nInsertTextLength = pInsertText->length; nInsertTextLength = pInsertText->length;
if (isMultilingual) // can't handle wchar_t strings, so convert to multibyte chars first
char *pMBString;
size_t nMBLength;
if (pInsertText->encoding_is_wchar)
{ {
XIMUnicodeText *pUniText = (XIMUnicodeText*)pInsertText; wchar_t *pWCString = pInsertText->string.wide_char;
pInsertTextString = pUniText->string.utf16_char; size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* dont care */);
} pMBString = (char*)alloca( nBytes + 1 );
nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1);
}
else else
{ {
// can't handle wchar_t strings, so convert to multibyte chars first pMBString = pInsertText->string.multi_byte;
char *pMBString; nMBLength = strlen(pMBString); // xxx
size_t nMBLength; }
if (pInsertText->encoding_is_wchar)
{
wchar_t *pWCString = pInsertText->string.wide_char;
size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* dont care */);
pMBString = (char*)alloca( nBytes + 1 );
nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1);
}
else
{
pMBString = pInsertText->string.multi_byte;
nMBLength = strlen(pMBString); // xxx
}
// convert multibyte chars to unicode // convert multibyte chars to unicode
rtl_TextEncoding nEncoding = osl_getThreadTextEncoding(); rtl_TextEncoding nEncoding = osl_getThreadTextEncoding();
if (nEncoding != RTL_TEXTENCODING_UNICODE) if (nEncoding != RTL_TEXTENCODING_UNICODE)
{ {
rtl_TextToUnicodeConverter aConverter = rtl_TextToUnicodeConverter aConverter =
rtl_createTextToUnicodeConverter( nEncoding ); rtl_createTextToUnicodeConverter( nEncoding );
rtl_TextToUnicodeContext aContext = rtl_TextToUnicodeContext aContext =
rtl_createTextToUnicodeContext(aConverter); rtl_createTextToUnicodeContext(aConverter);
sal_Size nBufferSize = nInsertTextLength * 2; sal_Size nBufferSize = nInsertTextLength * 2;
pInsertTextString = (sal_Unicode*)alloca(nBufferSize); pInsertTextString = (sal_Unicode*)alloca(nBufferSize);
sal_uInt32 nConversionInfo; sal_uInt32 nConversionInfo;
sal_Size nConvertedChars; sal_Size nConvertedChars;
rtl_convertTextToUnicode( aConverter, aContext, rtl_convertTextToUnicode( aConverter, aContext,
pMBString, nMBLength, pMBString, nMBLength,
pInsertTextString, nBufferSize, pInsertTextString, nBufferSize,
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE
| RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE, | RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE,
&nConversionInfo, &nConvertedChars ); &nConversionInfo, &nConvertedChars );
rtl_destroyTextToUnicodeContext(aConverter, aContext); rtl_destroyTextToUnicodeContext(aConverter, aContext);
rtl_destroyTextToUnicodeConverter(aConverter); rtl_destroyTextToUnicodeConverter(aConverter);
} }
else else
{ {
pInsertTextString = (sal_Unicode*)pMBString; pInsertTextString = (sal_Unicode*)pMBString;
} }
}
// enlarge target text-buffer if necessary // enlarge target text-buffer if necessary
if (pText->nSize <= (pText->nLength + nInsertTextLength)) if (pText->nSize <= (pText->nLength + nInsertTextLength))
enlarge_buffer(pText, pText->nLength + nInsertTextLength); enlarge_buffer(pText, pText->nLength + nInsertTextLength);
// insert text: displace old mem and put new bytes in // insert text: displace old mem and put new bytes in
int from = where; int from = where;
int to = where + nInsertTextLength; int to = where + nInsertTextLength;
int howmany = pText->nLength - where; int howmany = pText->nLength - where;
memmove((void*)(pText->pUnicodeBuffer + to), memmove((void*)(pText->pUnicodeBuffer + to),
(void*)(pText->pUnicodeBuffer + from), (void*)(pText->pUnicodeBuffer + from),
howmany * sizeof(sal_Unicode)); howmany * sizeof(sal_Unicode));
memmove((void*)(pText->pCharStyle + to), memmove((void*)(pText->pCharStyle + to),
(void*)(pText->pCharStyle + from), (void*)(pText->pCharStyle + from),
howmany * sizeof(XIMFeedback)); howmany * sizeof(XIMFeedback));
to = from; to = from;
howmany = nInsertTextLength; howmany = nInsertTextLength;
memcpy((void*)(pText->pUnicodeBuffer + to), (void*)pInsertTextString, memcpy((void*)(pText->pUnicodeBuffer + to), (void*)pInsertTextString,
howmany * sizeof(sal_Unicode)); howmany * sizeof(sal_Unicode));
memcpy((void*)(pText->pCharStyle + to), (void*)pInsertTextCharStyle, memcpy((void*)(pText->pCharStyle + to), (void*)pInsertTextCharStyle,
howmany * sizeof(XIMFeedback)); howmany * sizeof(XIMFeedback));
pText->nLength += howmany; pText->nLength += howmany;
// NULL-terminate the string // NULL-terminate the string
pText->pUnicodeBuffer[pText->nLength] = (sal_Unicode)0; pText->pUnicodeBuffer[pText->nLength] = (sal_Unicode)0;
} }
// //
...@@ -372,7 +363,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data, ...@@ -372,7 +363,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
&& (call_data->text->string.wide_char != NULL)) && (call_data->text->string.wide_char != NULL))
{ {
Preedit_InsertText(&(pPreeditData->aText), call_data->text, Preedit_InsertText(&(pPreeditData->aText), call_data->text,
call_data->chg_first, pPreeditData->bIsMultilingual); call_data->chg_first);
} }
else else
// handle text replacement by deletion and insertion of text, // handle text replacement by deletion and insertion of text,
...@@ -383,7 +374,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data, ...@@ -383,7 +374,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
Preedit_DeleteText(&(pPreeditData->aText), Preedit_DeleteText(&(pPreeditData->aText),
call_data->chg_first, call_data->chg_length); call_data->chg_first, call_data->chg_length);
Preedit_InsertText(&(pPreeditData->aText), call_data->text, Preedit_InsertText(&(pPreeditData->aText), call_data->text,
call_data->chg_first, pPreeditData->bIsMultilingual); call_data->chg_first);
} }
else else
// not really a text update, only attributes are concerned // not really a text update, only attributes are concerned
...@@ -567,27 +558,9 @@ StatusDoneCallback (XIC, XPointer, XPointer) ...@@ -567,27 +558,9 @@ StatusDoneCallback (XIC, XPointer, XPointer)
} }
void void
StatusDrawCallback (XIC ic, XPointer client_data, XIMStatusDrawCallbackStruct *call_data) StatusDrawCallback (XIC, XPointer, XIMStatusDrawCallbackStruct *call_data)
{ {
preedit_data_t* pPreeditData = (preedit_data_t*)client_data; if( call_data->type == XIMTextType )
if( pPreeditData->bIsMultilingual )
{
// IIIMP
XIMUnicodeText *cbtext = (XIMUnicodeText *)call_data->data.text;
::vcl::I18NStatus::get().setStatusText( String( cbtext->string.utf16_char, call_data->data.text->length ) );
XIMUnicodeCharacterSubset* pSubset = NULL;
if( ! XGetICValues( ic,
XNUnicodeCharacterSubset, & pSubset,
NULL )
&& pSubset )
{
::vcl::I18NStatus::get().changeIM( String( ByteString( pSubset->name ), RTL_TEXTENCODING_UTF8 ) );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "got XNUnicodeCharacterSubset\n %d\n %d\n %s\n %d\n", pSubset->index, pSubset->subset_id, pSubset->name, pSubset->is_active );
#endif
}
}
else if( call_data->type == XIMTextType )
{ {
String aText; String aText;
if( call_data->data.text ) if( call_data->data.text )
......
...@@ -187,7 +187,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : ...@@ -187,7 +187,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
SalI18N_InputMethod *pInputMethod; SalI18N_InputMethod *pInputMethod;
pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod(); pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod();
mbMultiLingual = pInputMethod->IsMultiLingual();
mnSupportedPreeditStyle = XIMPreeditCallbacks | XIMPreeditPosition mnSupportedPreeditStyle = XIMPreeditCallbacks | XIMPreeditPosition
| XIMPreeditNothing | XIMPreeditNone; | XIMPreeditNothing | XIMPreeditNone;
...@@ -200,7 +199,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : ...@@ -200,7 +199,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
// for status callbacks and commit string callbacks // for status callbacks and commit string callbacks
#define PREEDIT_BUFSZ 16 #define PREEDIT_BUFSZ 16
maClientData.bIsMultilingual = mbMultiLingual;
maClientData.eState = ePreeditStatusStartPending; maClientData.eState = ePreeditStatusStartPending;
maClientData.pFrame = pFrame; maClientData.pFrame = pFrame;
maClientData.aText.pUnicodeBuffer = maClientData.aText.pUnicodeBuffer =
...@@ -359,7 +357,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : ...@@ -359,7 +357,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
#endif #endif
mbUseable = False; mbUseable = False;
mbMultiLingual = False;
if ( mpAttributes != NULL ) if ( mpAttributes != NULL )
XFree( mpAttributes ); XFree( mpAttributes );
...@@ -379,17 +376,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : ...@@ -379,17 +376,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
maClientData.aText.pCharStyle = NULL; maClientData.aText.pCharStyle = NULL;
} }
if ( maContext != NULL && mbMultiLingual )
{
maCommitStringCallback.callback = (XIMProc)::CommitStringCallback;
maCommitStringCallback.client_data = (XPointer)&maClientData;
maSwitchIMCallback.callback = (XIMProc)::SwitchIMCallback;
maSwitchIMCallback.client_data = (XPointer)&maClientData;
XSetICValues( maContext,
XNCommitStringCallback, &maCommitStringCallback,
XNSwitchIMNotifyCallback, &maSwitchIMCallback,
NULL );
}
if ( maContext != NULL) if ( maContext != NULL)
{ {
maDestroyCallback.callback = (XIMProc)IC_IMDestroyCallback; maDestroyCallback.callback = (XIMProc)IC_IMDestroyCallback;
...@@ -398,21 +384,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : ...@@ -398,21 +384,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
XNDestroyCallback, &maDestroyCallback, XNDestroyCallback, &maDestroyCallback,
NULL ); NULL );
} }
if( mbMultiLingual )
{
// set initial IM status
XIMUnicodeCharacterSubset* pSubset = NULL;
if( ! XGetICValues( maContext,
XNUnicodeCharacterSubset, & pSubset,
NULL )
&& pSubset )
{
String aCurrent( ByteString( pSubset->name ), RTL_TEXTENCODING_UTF8 );
::vcl::I18NStatus::get().changeIM( aCurrent );
::vcl::I18NStatus::get().setStatusText( aCurrent );
}
}
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -454,11 +425,6 @@ SalI18N_InputContext::Map( SalFrame *pFrame ) ...@@ -454,11 +425,6 @@ SalI18N_InputContext::Map( SalFrame *pFrame )
maContext = XCreateIC( pInputMethod->GetMethod(), maContext = XCreateIC( pInputMethod->GetMethod(),
XNVaNestedList, mpAttributes, XNVaNestedList, mpAttributes,
NULL ); NULL );
if ( maContext != NULL && mbMultiLingual )
XSetICValues( maContext,
XNCommitStringCallback, &maCommitStringCallback,
XNSwitchIMNotifyCallback, &maSwitchIMCallback,
NULL );
} }
if( maClientData.pFrame != pFrame ) if( maClientData.pFrame != pFrame )
SetICFocus( pFrame ); SetICFocus( pFrame );
......
...@@ -268,8 +268,6 @@ SalI18N_InputMethod::SetLocale( const char* pLocale ) ...@@ -268,8 +268,6 @@ SalI18N_InputMethod::SetLocale( const char* pLocale )
Bool Bool
SalI18N_InputMethod::PosixLocale() SalI18N_InputMethod::PosixLocale()
{ {
if (mbMultiLingual)
return False;
if (maMethod) if (maMethod)
return IsPosixLocale (XLocaleOfIM (maMethod)); return IsPosixLocale (XLocaleOfIM (maMethod));
return False; return False;
...@@ -282,7 +280,6 @@ SalI18N_InputMethod::PosixLocale() ...@@ -282,7 +280,6 @@ SalI18N_InputMethod::PosixLocale()
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
SalI18N_InputMethod::SalI18N_InputMethod( ) : mbUseable( bUseInputMethodDefault ), SalI18N_InputMethod::SalI18N_InputMethod( ) : mbUseable( bUseInputMethodDefault ),
mbMultiLingual( False ),
maMethod( (XIM)NULL ), maMethod( (XIM)NULL ),
mpStyles( (XIMStyles*)NULL ) mpStyles( (XIMStyles*)NULL )
{ {
...@@ -376,58 +373,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay ) ...@@ -376,58 +373,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
{ {
if ( mbUseable ) if ( mbUseable )
{ {
const bool bTryMultiLingual = maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
#ifdef LINUX
false;
#else
true;
#endif
if ( bTryMultiLingual && getenv("USE_XOPENIM") == NULL )
{
mbMultiLingual = True; // set ml-input flag to create input-method
maMethod = XvaOpenIM(pDisplay, NULL, NULL, NULL,
XNMultiLingualInput, mbMultiLingual, /* dummy */
(void *)0);
// get ml-input flag from input-method
if ( maMethod == (XIM)NULL )
mbMultiLingual = False;
else
if ( XGetIMValues(maMethod,
XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL )
mbMultiLingual = False;
if( mbMultiLingual )
{
XIMUnicodeCharacterSubsets* subsets;
if( XGetIMValues( maMethod,
XNQueryUnicodeCharacterSubset, &subsets, NULL ) == NULL )
{
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "IM reports %d subsets: ", subsets->count_subsets );
#endif
I18NStatus& rStatus( I18NStatus::get() );
rStatus.clearChoices();
for( int i = 0; i < subsets->count_subsets; i++ )
{
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr,"\"%s\" ", subsets->supported_subsets[i].name );
#endif
rStatus.addChoice( String( subsets->supported_subsets[i].name, RTL_TEXTENCODING_UTF8 ), &subsets->supported_subsets[i] );
}
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "\n" );
#endif
}
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "query subsets failed\n" );
#endif
}
}
else
{
maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
mbMultiLingual = False;
}
if ((maMethod == (XIM)NULL) && (getenv("XMODIFIERS") != NULL)) if ((maMethod == (XIM)NULL) && (getenv("XMODIFIERS") != NULL))
{ {
...@@ -435,7 +381,6 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay ) ...@@ -435,7 +381,6 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
osl_clearEnvironment(envVar.pData); osl_clearEnvironment(envVar.pData);
XSetLocaleModifiers(""); XSetLocaleModifiers("");
maMethod = XOpenIM(pDisplay, NULL, NULL, NULL); maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
mbMultiLingual = False;
} }
if ( maMethod != (XIM)NULL ) if ( maMethod != (XIM)NULL )
...@@ -444,8 +389,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay ) ...@@ -444,8 +389,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
!= NULL) != NULL)
mbUseable = False; mbUseable = False;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "Creating %s-Lingual InputMethod\n", fprintf(stderr, "Creating Mono-Lingual InputMethod\n" );
mbMultiLingual ? "Multi" : "Mono" );
PrintInputStyle( mpStyles ); PrintInputStyle( mpStyles );
#endif #endif
} }
...@@ -510,7 +454,6 @@ void ...@@ -510,7 +454,6 @@ void
SalI18N_InputMethod::HandleDestroyIM() SalI18N_InputMethod::HandleDestroyIM()
{ {
mbUseable = False; mbUseable = False;
mbMultiLingual = False;
maMethod = NULL; maMethod = NULL;
} }
...@@ -596,26 +539,4 @@ InputMethod_ConnectionWatchProc (Display *pDisplay, XPointer pClientData, ...@@ -596,26 +539,4 @@ InputMethod_ConnectionWatchProc (Display *pDisplay, XPointer pClientData,
} }
} }
Bool
SalI18N_InputMethod::AddConnectionWatch(Display *pDisplay, void *pConnectionHandler)
{
// sanity check
if (pDisplay == NULL || pConnectionHandler == NULL)
return False;
// if we are not ml all the extended text input comes on the stock X queue,
// so there is no need to monitor additional file descriptors.
#ifndef SOLARIS
if (!mbMultiLingual || !mbUseable)
return False;
#endif
// pConnectionHandler must be really a pointer to a SalXLib
Status nStatus = XAddConnectionWatch (pDisplay, InputMethod_ConnectionWatchProc,
(XPointer)pConnectionHandler);
return (Bool)nStatus;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -464,7 +464,6 @@ void SalXLib::Init() ...@@ -464,7 +464,6 @@ void SalXLib::Init()
SalDisplay *pSalDisplay = new SalX11Display( pDisp ); SalDisplay *pSalDisplay = new SalX11Display( pDisp );
pInputMethod->CreateMethod( pDisp ); pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod ); pSalDisplay->SetInputMethod( pInputMethod );
PushXErrorLevel( true ); PushXErrorLevel( true );
......
...@@ -3369,12 +3369,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) ...@@ -3369,12 +3369,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if( aDeleteWatch.isDeleted() ) if( aDeleteWatch.isDeleted() )
return 0; return 0;
rtl_TextEncoding nEncoding; rtl_TextEncoding nEncoding = osl_getThreadTextEncoding();
if (mpInputContext != NULL && mpInputContext->IsMultiLingual() )
nEncoding = RTL_TEXTENCODING_UTF8;
else
nEncoding = osl_getThreadTextEncoding();
sal_Unicode *pBuffer; sal_Unicode *pBuffer;
sal_Unicode *pString; sal_Unicode *pString;
......
...@@ -184,7 +184,6 @@ void KDEXLib::Init() ...@@ -184,7 +184,6 @@ void KDEXLib::Init()
SalDisplay *pSalDisplay = new SalKDEDisplay( pDisp ); SalDisplay *pSalDisplay = new SalKDEDisplay( pDisp );
pInputMethod->CreateMethod( pDisp ); pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod ); pSalDisplay->SetInputMethod( pInputMethod );
PushXErrorLevel( true ); PushXErrorLevel( true );
......
...@@ -178,7 +178,6 @@ void KDEXLib::Init() ...@@ -178,7 +178,6 @@ void KDEXLib::Init()
SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp); SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
pInputMethod->CreateMethod( pDisp ); pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod ); pSalDisplay->SetInputMethod( pInputMethod );
PushXErrorLevel( true ); PushXErrorLevel( true );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment