[libreoffice/f16] Resolves: rhbz#796234 remove dangling XkbUseExtension code
Caolán McNamara
caolanm at fedoraproject.org
Wed Feb 22 15:09:37 UTC 2012
commit 4d48a7cc74406c87b81f211310d9db9b599afe77
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 22 15:09:34 2012 +0000
Resolves: rhbz#796234 remove dangling XkbUseExtension code
0001-Remove-SalDisplay-GetKeyboardName.patch | 176 ++++++++
...her-code-belonging-to-SalDisplay-GetKeybo.patch | 452 ++++++++++++++++++++
libreoffice.spec | 7 +-
3 files changed, 634 insertions(+), 1 deletions(-)
---
diff --git a/0001-Remove-SalDisplay-GetKeyboardName.patch b/0001-Remove-SalDisplay-GetKeyboardName.patch
new file mode 100644
index 0000000..0a2ddfa
--- /dev/null
+++ b/0001-Remove-SalDisplay-GetKeyboardName.patch
@@ -0,0 +1,176 @@
+From 04b9c2f633f0be1b676933943bdd0b1dc58b5471 Mon Sep 17 00:00:00 2001
+From: Thomas Arnhold <thomas at arnhold.org>
+Date: Fri, 27 Jan 2012 16:51:04 +0100
+Subject: [PATCH] Remove SalDisplay::GetKeyboardName
+
+This method seems to be useless. The return value (keyboard name) isn't
+used at any point. And I don't see any point in this method where some
+implicit call is done to refresh mappings...
+---
+ vcl/inc/unx/saldisp.hxx | 2 -
+ vcl/unx/generic/app/keysymnames.cxx | 90 -----------------------------------
+ vcl/unx/generic/app/saldisp.cxx | 8 +--
+ vcl/unx/gtk/app/gtkdata.cxx | 7 +--
+ 4 files changed, 3 insertions(+), 104 deletions(-)
+
+diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
+index 3e4eb4e..8c44784 100644
+--- a/vcl/inc/unx/saldisp.hxx
++++ b/vcl/inc/unx/saldisp.hxx
+@@ -323,7 +323,6 @@ protected:
+ KeySym nShiftKeySym_; // first shift modifier
+ KeySym nCtrlKeySym_; // first control modifier
+ KeySym nMod1KeySym_; // first mod1 modifier
+- rtl::OString m_aKeyboardName;
+
+ vcl_sal::WMAdaptor* m_pWMAdaptor;
+
+@@ -427,7 +426,6 @@ public:
+ { mpInputMethod = pInputMethod; }
+ void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
+ { mpKbdExtension = pKbdExtension; }
+- const char* GetKeyboardName( bool bRefresh = false );
+ ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; }
+ bool IsXinerama() const { return m_bXinerama; }
+ const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; }
+diff --git a/vcl/unx/generic/app/keysymnames.cxx b/vcl/unx/generic/app/keysymnames.cxx
+index ce6a7e7..f4955a5 100644
+--- a/vcl/unx/generic/app/keysymnames.cxx
++++ b/vcl/unx/generic/app/keysymnames.cxx
+@@ -215,94 +215,4 @@ static const keyboard_layout type6_layout[] =
+ #include <stdio.h>
+ #endif
+
+-const char* SalDisplay::GetKeyboardName( bool bRefresh )
+-{
+- if (bRefresh || m_aKeyboardName.isEmpty())
+- {
+-#if defined(SOLARIS)
+- if( IsLocal() )
+- {
+- int kbd = open( "/dev/kbd", O_RDONLY );
+- if( kbd >= 0 )
+- {
+- int kbd_type = 0;
+- if( ! ioctl( kbd, KIOCTYPE, &kbd_type ) )
+- {
+- int kbd_layout = 0;
+- if( ! ioctl( kbd, KIOCLAYOUT, &kbd_layout ) )
+- {
+- const keyboard_layout *p_layout = NULL;
+- switch( kbd_type )
+- {
+- case KB_KLUNK: p_layout = type0_layout; break;
+- case KB_SUN3: p_layout = type3_layout; break;
+- case KB_SUN4: p_layout = type4_layout; break;
+- case KB_USB: p_layout = type6_layout; break;
+- case KB_PC: p_layout = type101_layout; break;
+- }
+-
+- if( p_layout )
+- {
+- while( p_layout->n_layout != -1 )
+- {
+- if ( p_layout->n_layout == kbd_layout )
+- {
+- m_aKeyboardName = p_layout->p_description;
+- break;
+- }
+- p_layout++;
+- }
+- }
+- }
+- }
+- close(kbd);
+- }
+- }
+-#elif !defined(AIX)
+- int opcode, event, error;
+- int major = XkbMajorVersion, minor = XkbMinorVersion;
+- if( XkbQueryExtension( GetDisplay(), &opcode, &event,&error, &major, &minor ) )
+- {
+- XkbDescPtr pXkbDesc = NULL;
+- // try X keyboard extension
+- if( (pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) )
+- {
+- const char* pAtom = NULL;
+- if( pXkbDesc->names->groups[0] )
+- {
+- pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] );
+- m_aKeyboardName = pAtom;
+- XFree( (void*)pAtom );
+- }
+- else
+- m_aKeyboardName = "<unknown keyboard>";
+-#if OSL_DEBUG_LEVEL > 1
+-#define PRINT_ATOM( x ) { if( pXkbDesc->names->x ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x ); fprintf( stderr, "%s: %s\n", #x, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s: <nil>\n", #x ); }
+-
+- PRINT_ATOM( keycodes );
+- PRINT_ATOM( geometry );
+- PRINT_ATOM( symbols );
+- PRINT_ATOM( types );
+- PRINT_ATOM( compat );
+- PRINT_ATOM( phys_symbols );
+-
+-#define PRINT_ATOM_2( x ) { if( pXkbDesc->names->x[i] ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x[i] ); fprintf( stderr, "%s[%d]: %s\n", #x, i, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s[%d]: <nil>\n", #x, i ); }
+- int i;
+- for( i = 0; i < XkbNumVirtualMods; i++ )
+- PRINT_ATOM_2( vmods );
+- for( i = 0; i < XkbNumIndicators; i++ )
+- PRINT_ATOM_2( indicators );
+- for( i = 0; i < XkbNumKbdGroups; i++ )
+- PRINT_ATOM_2( groups );
+-#endif
+- XkbFreeKeyboard( pXkbDesc, XkbAllComponentsMask, True );
+- }
+- }
+-#endif
+- if (m_aKeyboardName.isEmpty())
+- m_aKeyboardName = "<unknown keyboard>";
+- }
+- return m_aKeyboardName.getStr();
+-}
+-
+ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
+index 41b509b..cae3fafa 100644
+--- a/vcl/unx/generic/app/saldisp.cxx
++++ b/vcl/unx/generic/app/saldisp.cxx
+@@ -2170,14 +2170,10 @@ long SalX11Display::Dispatch( XEvent *pEvent )
+ }
+ break;
+ case MappingNotify:
+- if( MappingKeyboard == pEvent->xmapping.request ||
+- MappingModifier == pEvent->xmapping.request )
++ if( MappingModifier == pEvent->xmapping.request )
+ {
+ XRefreshKeyboardMapping( &pEvent->xmapping );
+- if( MappingModifier == pEvent->xmapping.request )
+- ModifierMapping();
+- if( MappingKeyboard == pEvent->xmapping.request ) // refresh mapping
+- GetKeyboardName( true );
++ ModifierMapping();
+ }
+ break;
+ case ButtonPress:
+diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
+index 3685d11..b1bcf8e 100644
+--- a/vcl/unx/gtk/app/gtkdata.cxx
++++ b/vcl/unx/gtk/app/gtkdata.cxx
+@@ -129,12 +129,7 @@ extern "C" {
+ void signalKeysChanged( GdkKeymap*, gpointer data )
+ {
+ GtkSalDisplay* pDisp = (GtkSalDisplay*)data;
+-#if !GTK_CHECK_VERSION(3,0,0)
+- pDisp->GetKeyboardName(true);
+-#else
+- (void)pDisp;
+-#warning FIXME: impl. / check signalKeysChanged ...
+-#endif
++#warning signalKeysChanged called
+ }
+
+ void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
+--
+1.7.7.6
+
diff --git a/0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch b/0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch
new file mode 100644
index 0000000..bc3b566
--- /dev/null
+++ b/0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch
@@ -0,0 +1,452 @@
+From 9a7605b8f08dfcfbc99bc0c635014eac8e41e932 Mon Sep 17 00:00:00 2001
+From: Thomas Arnhold <thomas at arnhold.org>
+Date: Fri, 27 Jan 2012 19:33:03 +0100
+Subject: [PATCH] Remove further code belonging to SalDisplay::GetKeyboardName
+
+---
+ vcl/Library_vclplug_gen.mk | 1 -
+ vcl/inc/unx/saldisp.hxx | 10 --
+ vcl/unx/generic/app/keysymnames.cxx | 218 -----------------------------------
+ vcl/unx/generic/app/saldisp.cxx | 127 --------------------
+ vcl/unx/gtk/app/gtkdata.cxx | 8 --
+ 5 files changed, 0 insertions(+), 364 deletions(-)
+ delete mode 100644 vcl/unx/generic/app/keysymnames.cxx
+
+diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
+index e402914..e29266d 100644
+--- a/vcl/Library_vclplug_gen.mk
++++ b/vcl/Library_vclplug_gen.mk
+@@ -76,7 +76,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
+ vcl/unx/generic/app/i18n_status \
+ vcl/unx/generic/app/i18n_wrp \
+ vcl/unx/generic/app/i18n_xkb \
+- vcl/unx/generic/app/keysymnames \
+ vcl/unx/generic/app/randrwrapper \
+ vcl/unx/generic/app/saldata \
+ vcl/unx/generic/app/saldisp \
+diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
+index 8c44784..547f1f8 100644
+--- a/vcl/inc/unx/saldisp.hxx
++++ b/vcl/inc/unx/saldisp.hxx
+@@ -306,12 +306,6 @@ protected:
+ srv_vendor_t meServerVendor;
+ SalWM eWindowManager_;
+
+-#if defined(SOLARIS)
+- sal_Bool bLocal_; // Server==Client? Init
+- // in SalDisplay::IsLocal()
+- sal_Bool mbLocalIsValid; // bLocal_ is valid ?
+-#endif
+-
+ // until x bytes
+
+ XLIB_Cursor aPointerCache_[POINTER_COUNT];
+@@ -378,10 +372,6 @@ public:
+ XLIB_Cursor GetPointer( int ePointerStyle );
+ virtual int CaptureMouse( SalFrame *pCapture );
+
+-#if defined(SOLARIS)
+- sal_Bool IsLocal();
+-#endif
+-
+ void Remove( XEvent *pEvent );
+ virtual ScreenData *initScreen( SalX11Screen nXScreen ) const;
+ const ScreenData& getDataForScreen( SalX11Screen nXScreen ) const
+diff --git a/vcl/unx/generic/app/keysymnames.cxx b/vcl/unx/generic/app/keysymnames.cxx
+deleted file mode 100644
+index f4955a5..0000000
+--- a/vcl/unx/generic/app/keysymnames.cxx
++++ /dev/null
+@@ -1,218 +0,0 @@
+-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+-/*************************************************************************
+- *
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * Copyright 2000, 2010 Oracle and/or its affiliates.
+- *
+- * OpenOffice.org - a multi-platform office productivity suite
+- *
+- * This file is part of OpenOffice.org.
+- *
+- * OpenOffice.org is free software: you can redistribute it and/or modify
+- * it under the terms of the GNU Lesser General Public License version 3
+- * only, as published by the Free Software Foundation.
+- *
+- * OpenOffice.org is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU Lesser General Public License version 3 for more details
+- * (a copy is included in the LICENSE file that accompanied this code).
+- *
+- * You should have received a copy of the GNU Lesser General Public License
+- * version 3 along with OpenOffice.org. If not, see
+- * <http://www.openoffice.org/license.html>
+- * for a copy of the LGPLv3 License.
+- *
+- ************************************************************************/
+-
+-
+-#if !defined(SOLARIS) && !defined(AIX)
+-#include <tools/prex.h>
+-#include <X11/XKBlib.h>
+-#include <tools/postx.h>
+-#endif
+-
+-#include <unx/saldisp.hxx>
+-#include <X11/keysym.h>
+-#include <sal/macros.h>
+-
+-#if !defined (SunXK_Undo)
+-#define SunXK_Undo 0x0000FF65 // XK_Undo
+-#define SunXK_Again 0x0000FF66 // XK_Redo
+-#define SunXK_Find 0x0000FF68 // XK_Find
+-#define SunXK_Stop 0x0000FF69 // XK_Cancel
+-#define SunXK_Props 0x1005FF70
+-#define SunXK_Front 0x1005FF71
+-#define SunXK_Copy 0x1005FF72
+-#define SunXK_Open 0x1005FF73
+-#define SunXK_Paste 0x1005FF74
+-#define SunXK_Cut 0x1005FF75
+-#endif
+-
+-#ifdef SOLARIS
+-#include <sys/types.h>
+-#include <sys/ioctl.h>
+-#include <sys/kbio.h>
+-#include <sys/kbd.h>
+-#include <stdio.h>
+-#include <fcntl.h>
+-#include <deflt.h>
+-#include <unistd.h>
+-#include <stdlib.h>
+-#endif
+-
+-#include <string.h>
+-
+-#ifdef SOLARIS
+-typedef struct {
+- int n_layout;
+- const char* p_description;
+-} keyboard_layout;
+-
+-static const keyboard_layout type0_layout[] =
+-{
+- { 0, "US4" },
+- { -1, NULL }
+-};
+-
+-static const keyboard_layout type3_layout[] =
+-{
+- { 0, "US3" },
+- { -1, NULL }
+-};
+-
+-static const keyboard_layout type4_layout[] =
+-{
+- { 0, "US4" },
+- { 1, "US4" },
+- { 2, "FranceBelg4" },
+- { 3, "Canada4" },
+- { 4, "Denmark4" },
+- { 5, "Germany4" },
+- { 6, "Italy4" },
+- { 7, "Netherland4" },
+- { 8, "Norway4" },
+- { 9, "Portugal4" },
+- { 10, "SpainLatAm4" },
+- { 11, "SwedenFin4" },
+- { 12, "Switzer_Fr4" },
+- { 13, "Switzer_Ge4" },
+- { 14, "UK4" },
+- { 16, "Korea4" },
+- { 17, "Taiwan4" },
+- { 19, "US101A_PC" },
+- { 19, "US101A_Sun" },
+- { 32, "Japan4" },
+- { 33, "US5" },
+- { 34, "US_UNIX5" },
+- { 35, "France5" },
+- { 36, "Denmark5" },
+- { 37, "Germany5" },
+- { 38, "Italy5" },
+- { 39, "Netherland5" },
+- { 40, "Norway5" },
+- { 41, "Portugal5" },
+- { 42, "Spain5" },
+- { 43, "Sweden5" },
+- { 44, "Switzer_Fr5" },
+- { 45, "Switzer_Ge5" },
+- { 46, "UK5" },
+- { 47, "Korea5" },
+- { 48, "Taiwan5" },
+- { 49, "Japan5" },
+- { 50, "Canada_Fr5" },
+- { 51, "Hungary5" },
+- { 52, "Poland5" },
+- { 53, "Czech5" },
+- { 54, "Russia5" },
+- { 55, "Latvia5" },
+- { 56, "Turkey5" },
+- { 57, "Greece5" },
+- { 58, "Estonia5" },
+- { 59, "Lithuania5" },
+- { 63, "Canada_Fr5_TBITS5" },
+- { 80, "US5_Hobo" },
+- { 81, "US_UNIX5_Hobo" },
+- { 82, "France5_Hobo" },
+- { 83, "Denmark5_Hobo" },
+- { 84, "Germany5_Hobo" },
+- { 85, "Italy5_Hobo" },
+- { 86, "Netherland5_Hobo" },
+- { 87, "Norway5_Hobo" },
+- { 88, "Portugal5_Hobo" },
+- { 89, "Spain5_Hobo" },
+- { 90, "Sweden5_Hobo" },
+- { 91, "Switzer_Fr5_Hobo" },
+- { 92, "Switzer_Ge5_Hobo" },
+- { 93, "UK5_Hobo" },
+- { 94, "Korea5_Hobo" },
+- { 95, "Taiwan5_Hobo" },
+- { 96, "Japan5_Hobo" },
+- { 97, "Canada_Fr5_Hobo" },
+- { -1, NULL }
+-};
+-
+-static const keyboard_layout type101_layout[] =
+-{
+- { 0, "US101A_x86" },
+- { 1, "US101A_x86" },
+- { 34, "J3100_x86" },
+- { 35, "France_x86" },
+- { 36, "Denmark_x86" },
+- { 37, "Germany_x86" },
+- { 38, "Italy_x86" },
+- { 39, "Netherland_x86" },
+- { 40, "Norway_x86" },
+- { 41, "Portugal_x86" },
+- { 42, "Spain_x86" },
+- { 43, "Sweden_x86" },
+- { 44, "Switzer_Fr_x86" },
+- { 45, "Switzer_Ge_x86" },
+- { 46, "UK_x86" },
+- { 47, "Korea_x86" },
+- { 48, "Taiwan_x86" },
+- { 49, "Japan_x86" },
+- { 50, "Canada_Fr2_x86" },
+- { 51, "Hungary_x86" },
+- { 52, "Poland_x86" },
+- { 53, "Czech_x86" },
+- { 54, "Russia_x86" },
+- { 55, "Latvia_x86" },
+- { 56, "Turkey_x86" },
+- { 57, "Greece_x86" },
+- { 59, "Lithuania_x86" },
+- { 1001, "MS_US101A_x86" },
+- { -1, NULL }
+-};
+-
+-static const keyboard_layout type6_layout[] =
+-{
+- { 0, "US6" },
+- { 6, "Denmark6" },
+- { 7, "Finnish6" },
+- { 8, "France6" },
+- { 9, "Germany6" },
+- { 14, "Italy6" },
+- { 15, "Japan6" },
+- { 16, "Korea6" },
+- { 18, "Netherland6" },
+- { 19, "Norway6" },
+- { 22, "Portugal6" },
+- { 25, "Spain6" },
+- { 26, "Sweden6" },
+- { 27, "Switzer_Fr6" },
+- { 28, "Switzer_Ge6" },
+- { 30, "Taiwan6" },
+- { 32, "UK6" },
+- { 33, "US6" },
+- { -1, NULL }
+-};
+-#endif
+-
+-
+-#if OSL_DEBUG_LEVEL > 1
+-#include <stdio.h>
+-#endif
+-
+-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
+index cae3fafa..21812ce 100644
+--- a/vcl/unx/generic/app/saldisp.cxx
++++ b/vcl/unx/generic/app/saldisp.cxx
+@@ -227,127 +227,6 @@ static sal_Bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI
+ }
+
+ // ---------------------------------------------------------------------------
+-
+-/* this stuff is used in SalDisplay::GetKeyboardName for SOLARIS */
+-#if defined(SOLARIS)
+-
+-// check wether displaystring is in format N.M or N. or just N
+-// with N and M beeing natural numbers
+-static sal_Bool
+-sal_IsDisplayNumber( const char *pDisplayString )
+-{
+- if ( ! isdigit(*pDisplayString) )
+- return sal_False;
+- while ( isdigit(*(++pDisplayString)) )
+- ; /* do nothing */
+-
+- if ( *pDisplayString == '.' )
+- {
+- while ( isdigit(*(++pDisplayString)) )
+- ; /* do nothing */
+- }
+-
+- return (*pDisplayString == '\0');
+-}
+-
+-// check whether host1 and host2 point to the same ip address
+-static sal_Bool
+-sal_EqualHosts( const OUString& Host1, const OUString& Host2)
+-{
+- oslSocketAddr pHostAddr1;
+- oslSocketAddr pHostAddr2;
+- sal_Bool bEqualAddress = sal_False;
+-
+- if ( Host1.toChar() >= '0' && Host1.toChar() <= '9' )
+- pHostAddr1 = osl_createInetSocketAddr( Host1.pData, 0 );
+- else
+- pHostAddr1 = osl_resolveHostname( Host1.pData );
+-
+- if ( Host2.toChar() >= '0' && Host2.toChar() <= '9' )
+- pHostAddr2 = osl_createInetSocketAddr( Host2.pData, 0 );
+- else
+- pHostAddr2 = osl_resolveHostname( Host2.pData );
+-
+- if( pHostAddr1 && pHostAddr2 )
+- bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? sal_True : sal_False;
+-
+- if( pHostAddr1 )
+- osl_destroySocketAddr( pHostAddr1 );
+- if( pHostAddr2 )
+- osl_destroySocketAddr( pHostAddr2 );
+-
+- return bEqualAddress;
+-}
+-
+-static sal_Bool
+-sal_IsLocalDisplay( Display *pDisplay )
+-{
+- const char *pDisplayString = DisplayString( pDisplay );
+-
+- // no string, no idea
+- if ( pDisplayString == NULL || pDisplayString[ 0 ] == '\0')
+- return sal_False;
+-
+- // check for ":x.y"
+- if ( pDisplayString[ 0 ] == ':' )
+- return sal_IsDisplayNumber( pDisplayString + 1 );
+-
+- // check for fixed token which all mean localhost:x.y
+- const char pLocal[] = "localhost:";
+- const int nLocalLen = sizeof(pLocal) - 1;
+- if ( strncmp(pDisplayString, pLocal, nLocalLen) == 0 )
+- return sal_IsDisplayNumber( pDisplayString + nLocalLen );
+-
+- const char pUnix[] = "unix:";
+- const int nUnixLen = sizeof(pUnix) - 1;
+- if ( strncmp(pDisplayString, pUnix, nUnixLen) == 0 )
+- return sal_IsDisplayNumber( pDisplayString + nUnixLen );
+-
+- const char pLoopback[] = "127.0.0.1:";
+- const int nLoopbackLen= sizeof(pLoopback) - 1;
+- if ( strncmp(pDisplayString, pLoopback, nLoopbackLen) == 0 )
+- return sal_IsDisplayNumber( pDisplayString + nLoopbackLen );
+-
+- // compare local hostname to displaystring, both may be ip address or
+- // hostname
+- sal_Bool bEqual = sal_False;
+- char *pDisplayHost = strdup( pDisplayString );
+- char *pPtr = strrchr( pDisplayHost, ':' );
+-
+- if( pPtr != NULL )
+- {
+- const OUString& rLocalHostname( GetGenericData()->GetHostname() );
+- if( rLocalHostname.getLength() )
+- {
+- *pPtr = '\0';
+- OUString aDisplayHostname( pDisplayHost, strlen( pDisplayHost ), osl_getThreadTextEncoding() );
+- bEqual = sal_EqualHosts( rLocalHostname, aDisplayHostname );
+- bEqual = bEqual && sal_IsDisplayNumber( pPtr + 1 );
+- }
+- }
+- free( pDisplayHost );
+-
+- return bEqual;
+-}
+-
+-// ---------------------------------------------------------------------------
+-// IsLocal means soffice is running on the same host as the xserver
+-// since it is not called very often and sal_IsLocalDisplay() is relative
+-// expensive bLocal_ is initialized on first call
+-
+-sal_Bool SalDisplay::IsLocal()
+-{
+- if ( ! mbLocalIsValid )
+- {
+- bLocal_ = sal_IsLocalDisplay( pDisp_ );
+- mbLocalIsValid = sal_True;
+- }
+- return (sal_Bool)bLocal_;
+-}
+-
+-#endif //SOLARIS
+-
+-// ---------------------------------------------------------------------------
+ extern "C" srv_vendor_t
+ sal_GetServerVendor( Display *p_display )
+ {
+@@ -822,12 +701,6 @@ void SalDisplay::Init()
+ SetServerVendor();
+ X11SalBitmap::ImplCreateCache();
+
+-#if defined(SOLARIS)
+- bLocal_ = sal_False; /* dont care, initialize later by
+- calling SalDisplay::IsLocal() */
+- mbLocalIsValid = sal_False; /* bLocal_ is not yet initialized */
+-#endif
+-
+ // - - - - - - - - - - Synchronize - - - - - - - - - - - - -
+ if( getenv( "SAL_SYNCHRONIZE" ) )
+ XSynchronize( pDisp_, True );
+diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
+index b1bcf8e..e118f56 100644
+--- a/vcl/unx/gtk/app/gtkdata.cxx
++++ b/vcl/unx/gtk/app/gtkdata.cxx
+@@ -126,12 +126,6 @@ GtkSalDisplay::~GtkSalDisplay()
+
+ extern "C" {
+
+-void signalKeysChanged( GdkKeymap*, gpointer data )
+-{
+- GtkSalDisplay* pDisp = (GtkSalDisplay*)data;
+-#warning signalKeysChanged called
+-}
+-
+ void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
+ {
+ GtkSalDisplay* pDisp = (GtkSalDisplay*)data;
+@@ -724,8 +718,6 @@ void GtkData::Init()
+ # warning unwind keyboard extension bits
+ #endif
+
+- g_signal_connect( G_OBJECT(gdk_keymap_get_default()), "keys_changed", G_CALLBACK(signalKeysChanged), GetGtkDisplay() );
+-
+ // add signal handler to notify screen size changes
+ int nScreens = gdk_display_get_n_screens( pGdkDisp );
+ for( int n = 0; n < nScreens; n++ )
+--
+1.7.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index c951ff3..5404b28 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -221,6 +221,8 @@ Patch102: 0001-fix-support-for-embedded-images-for-basic-Dialogs-fd.patch
Patch103: 0001-fdo-39510-fix-yet-more-layout-crashes-in-SwRootFrm.patch
Patch104: 0001-fdo-39657-fix-crash-when-parsing-XML-signatures.patch
Patch105: 0001-rhbz-794679-use-proper-Indian-Rupee-currency-symbol.patch
+Patch106: 0001-Remove-SalDisplay-GetKeyboardName.patch
+Patch107: 0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@@ -1125,6 +1127,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch103 -p1 -b .fdo-39510-fix-yet-more-layout-crashes-in-SwRootFrm.patch
%patch104 -p1 -b .fdo-39657-fix-crash-when-parsing-XML-signatures.patch
%patch105 -p1 -b .rhbz-794679-use-proper-Indian-Rupee-currency-symbol.patch
+%patch106 -p1 -b .0001-Remove-SalDisplay-GetKeyboardName.patch
+%patch107 -p1 -b .0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
@@ -2435,7 +2439,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
-* Mon Feb 13 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.5.2-6.UNBUILT
+* Wed Feb 22 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.5.2-6
- ensure non broken xml help.tree files
- ensure gdb .py files have the same timstamps so that multilib
.pyc's and .pyo's have the same content (timestamp in binary cache)
@@ -2449,6 +2453,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
- Resolves: fdo#39510 fix yet more layout crashes in ~SwRootFrm
- Resolves: fdo#39657 fix crash when parsing XML signatures
- Resolves: rhbz#794679 use proper Indian Rupee currency symbol U+20B9
+- Resolves: rhbz#796234 remove dangling XkbUseExtension code
* Thu Feb 09 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.5.2-5
- Resolves: fdo#38595 border width lost in ODF import
More information about the scm-commits
mailing list