[Libreoffice-commits] .: tools/inc vcl/unx

François Tigeot ftigeot at kemper.freedesktop.org
Fri Jul 8 08:14:10 PDT 2011


 tools/inc/tools/prex.h           |   10 ----------
 vcl/unx/generic/app/i18n_xkb.cxx |   34 +++-------------------------------
 2 files changed, 3 insertions(+), 41 deletions(-)

New commits:
commit ab7c7a889401b6f4c74b054ac8514cb0468b7c7e
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date:   Fri Jul 8 17:06:13 2011 +0200

    Stop pretending to stay compatible with non-XKB X servers

diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h
index 86a01d8..e23581f 100644
--- a/tools/inc/tools/prex.h
+++ b/tools/inc/tools/prex.h
@@ -44,22 +44,12 @@
 extern "C" {
 #endif
 
-// FIXME: should really check for xfree86 or for X11R6.1 and higher
-#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) || defined(NETBSD) || \
-    defined(OPENBSD) || defined(DRAGONFLY)
-#define __XKeyboardExtension__ 1
-#else
-#define __XKeyboardExtension__ 0
-#endif
-
 #include <X11/X.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/StringDefs.h>
 #include <X11/extensions/Xrender.h>
-#if __XKeyboardExtension__
 #include <X11/XKBlib.h>
-#endif
 typedef unsigned long Pixel;
 
 #undef  DestroyAll
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index 8a1e045..d7650cc 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -36,16 +36,10 @@
 #include "unx/saldata.hxx"
 #include "unx/i18n_xkb.hxx"
 
-SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display*
-#if __XKeyboardExtension__
-pDisplay
-#endif
-)
-    : mbUseExtension( (sal_Bool)__XKeyboardExtension__ ),
+SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
+    : mbUseExtension( sal_True ),
       mnDefaultGroup( 0 )
 {
-    #if __XKeyboardExtension__
-
     mpDisplay = pDisplay;
 
     // allow user to set the default keyboard group idx or to disable the usage
@@ -94,19 +88,11 @@ pDisplay
         XkbGetState( mpDisplay, XkbUseCoreKbd, &aStateRecord );
         mnGroup = aStateRecord.group;
     }
-
-    #endif // __XKeyboardExtension__
 }
 
 void
-SalI18N_KeyboardExtension::Dispatch( XEvent*
-#if __XKeyboardExtension__
-pEvent
-#endif
-)
+SalI18N_KeyboardExtension::Dispatch( XEvent* pEvent )
 {
-    #if __XKeyboardExtension__
-
     // must the event be handled?
     if (   !mbUseExtension
         || (pEvent->type != mnEventBase) )
@@ -130,21 +116,13 @@ pEvent
             #endif
             break;
     }
-    #endif // __XKeyboardExtension__
 }
 
-#if __XKeyboardExtension__
 sal_uInt32
 SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32 nKeyCode,
                                                  sal_uInt32 nShiftState,
                                                    sal_uInt32 nGroup ) const
-#else
-sal_uInt32
-SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32,sal_uInt32,sal_uInt32 ) const
-#endif
 {
-    #if __XKeyboardExtension__
-
     if ( !mbUseExtension )
         return NoSymbol;
 
@@ -153,12 +131,6 @@ SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32,sal_uInt32,sal_uInt32
     KeySym		nKeySymbol;
     nKeySymbol = XkbKeycodeToKeysym( mpDisplay, nKeyCode, nGroup, nShiftState );
     return nKeySymbol;
-
-    #else
-
-    return NoSymbol;
-
-    #endif // __XKeyboardExtension__
 }
 
 


More information about the Libreoffice-commits mailing list