[libreoffice/f16] tweak patches to apply
Caolán McNamara
caolanm at fedoraproject.org
Wed Feb 22 17:09:20 UTC 2012
commit 4c57728bea1fd2997c4a6d9ea126044e65940a53
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 22 17:09:17 2012 +0000
tweak patches to apply
0001-Remove-SalDisplay-GetKeyboardName.patch | 61 ++--
...her-code-belonging-to-SalDisplay-GetKeybo.patch | 340 +++-----------------
2 files changed, 78 insertions(+), 323 deletions(-)
---
diff --git a/0001-Remove-SalDisplay-GetKeyboardName.patch b/0001-Remove-SalDisplay-GetKeyboardName.patch
index 0a2ddfa..037845b 100644
--- a/0001-Remove-SalDisplay-GetKeyboardName.patch
+++ b/0001-Remove-SalDisplay-GetKeyboardName.patch
@@ -15,35 +15,40 @@ implicit call is done to refresh mappings...
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;
+--- a/vcl/unx/inc/saldisp.hxx
++++ b/vcl/unx/inc/saldisp.hxx
+@@ -371,7 +371,6 @@
+ KeySym nShiftKeySym_; // first shift modifier
+ KeySym nCtrlKeySym_; // first control modifier
+ KeySym nMod1KeySym_; // first mod1 modifier
+- ByteString m_aKeyboardName;
- vcl_sal::WMAdaptor* m_pWMAdaptor;
-
-@@ -427,7 +426,6 @@ public:
+ vcl_sal::WMAdaptor* m_pWMAdaptor;
+ DtIntegrator* m_pDtIntegrator;
+@@ -493,7 +492,6 @@
{ mpInputMethod = pInputMethod; }
- void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
+ void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
{ mpKbdExtension = pKbdExtension; }
-- const char* GetKeyboardName( bool bRefresh = false );
+- 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; }
+ DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; }
+ bool IsXinerama() const { return m_bXinerama; }
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>
+--- a/vcl/unx/source/app/keysymnames.cxx
++++ b/vcl/unx/source/app/keysymnames.cxx
+@@ -594,99 +594,4 @@
+ };
#endif
+-
+-#if OSL_DEBUG_LEVEL > 1
+-#include <stdio.h>
+-#endif
+-
-const char* SalDisplay::GetKeyboardName( bool bRefresh )
-{
-- if (bRefresh || m_aKeyboardName.isEmpty())
+- if( bRefresh || ! m_aKeyboardName.Len() )
- {
-#if defined(SOLARIS)
- if( IsLocal() )
@@ -125,17 +130,17 @@ index ce6a7e7..f4955a5 100644
- }
- }
-#endif
-- if (m_aKeyboardName.isEmpty())
+- if( ! m_aKeyboardName.Len() )
- m_aKeyboardName = "<unknown keyboard>";
- }
-- return m_aKeyboardName.getStr();
+- return m_aKeyboardName.GetBuffer();
-}
-
/* 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
+--- a/vcl/unx/source/app/saldisp.cxx
++++ b/vcl/unx/source/app/saldisp.cxx
@@ -2170,14 +2170,10 @@ long SalX11Display::Dispatch( XEvent *pEvent )
}
break;
@@ -157,20 +162,12 @@ 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" {
+@@ -124,7 +124,7 @@
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
index bc3b566..5d3e395 100644
--- a/0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch
+++ b/0001-Remove-further-code-belonging-to-SalDisplay-GetKeybo.patch
@@ -6,288 +6,54 @@ 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 \
+--- a/vcl/unx/source/app/makefile.mk
++++ b/vcl/unx/source/app/makefile.mk
+@@ -53,7 +53,6 @@
+ $(SLO)$/i18n_status.obj \
+ $(SLO)$/i18n_wrp.obj \
+ $(SLO)$/i18n_xkb.obj \
+- $(SLO)$/keysymnames.obj \
+ $(SLO)$/randrwrapper.obj \
+ $(SLO)$/saldata.obj \
+ $(SLO)$/saldisp.obj \
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
+--- a/vcl/unx/inc/saldisp.hxx
++++ b/vcl/unx/inc/saldisp.hxx
+@@ -353,9 +353,6 @@
+ srv_vendor_t meServerVendor;
+ SalWM eWindowManager_;
+ sal_uLong nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE
+- sal_Bool bLocal_; // Server==Client? Init
- // in SalDisplay::IsLocal()
-- sal_Bool mbLocalIsValid; // bLocal_ is valid ?
--#endif
--
+- sal_Bool mbLocalIsValid; // bLocal_ is valid ?
// until x bytes
- XLIB_Cursor aPointerCache_[POINTER_COUNT];
-@@ -378,10 +372,6 @@ public:
- XLIB_Cursor GetPointer( int ePointerStyle );
- virtual int CaptureMouse( SalFrame *pCapture );
+ oslMutex hEventGuard_;
+@@ -439,8 +436,6 @@
+ 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
--
+- sal_Bool IsLocal();
-
--#if OSL_DEBUG_LEVEL > 1
--#include <stdio.h>
--#endif
--
--/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+ void Remove( XEvent *pEvent );
+
+ virtual void initScreen( int nScreen ) const;
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
+--- a/vcl/unx/source/app/saldisp.cxx
++++ b/vcl/unx/source/app/saldisp.cxx
+@@ -234,122 +234,6 @@
}
// ---------------------------------------------------------------------------
-
--/* 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
@@ -350,30 +116,30 @@ index cae3fafa..21812ce 100644
- 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;
+- 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 )
+- 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 )
+- 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, ':' );
+- char *pDisplayHost = strdup( pDisplayString );
+- char *pPtr = strrchr( pDisplayHost, ':' );
-
- if( pPtr != NULL )
- {
-- const OUString& rLocalHostname( GetGenericData()->GetHostname() );
+- const OUString& rLocalHostname( GetX11SalData()->GetLocalHostName() );
- if( rLocalHostname.getLength() )
- {
- *pPtr = '\0';
@@ -402,30 +168,25 @@ index cae3fafa..21812ce 100644
- return (sal_Bool)bLocal_;
-}
-
--#endif //SOLARIS
--
-// ---------------------------------------------------------------------------
extern "C" srv_vendor_t
sal_GetServerVendor( Display *p_display )
{
-@@ -822,12 +701,6 @@ void SalDisplay::Init()
- SetServerVendor();
+@@ -850,9 +734,6 @@
X11SalBitmap::ImplCreateCache();
--#if defined(SOLARIS)
-- bLocal_ = sal_False; /* dont care, initialize later by
+ hEventGuard_ = osl_createMutex();
+- bLocal_ = sal_False; /* dont care, initialize later by
- calling SalDisplay::IsLocal() */
-- mbLocalIsValid = sal_False; /* bLocal_ is not yet initialized */
--#endif
--
+- mbLocalIsValid = sal_False; /* bLocal_ is not yet initialized */
+
// - - - - - - - - - - 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()
+@@ -121,12 +121,6 @@
extern "C" {
@@ -438,15 +199,12 @@ index b1bcf8e..e118f56 100644
void signalScreenSizeChanged( GdkScreen* pScreen, gpointer data )
{
GtkSalDisplay* pDisp = (GtkSalDisplay*)data;
-@@ -724,8 +718,6 @@ void GtkData::Init()
- # warning unwind keyboard extension bits
- #endif
+@@ -709,8 +703,6 @@
-- g_signal_connect( G_OBJECT(gdk_keymap_get_default()), "keys_changed", G_CALLBACK(signalKeysChanged), GetGtkDisplay() );
--
+ m_pGtkSalDisplay->SetKbdExtension( pKbdExtension );
+
+- g_signal_connect( G_OBJECT(gdk_keymap_get_default()), "keys_changed", G_CALLBACK(signalKeysChanged), m_pGtkSalDisplay );
+-
// 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
-
More information about the scm-commits
mailing list