summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/keysymnames.cxx218
-rw-r--r--vcl/unx/generic/app/saldisp.cxx127
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx8
3 files changed, 0 insertions, 353 deletions
diff --git a/vcl/unx/generic/app/keysymnames.cxx b/vcl/unx/generic/app/keysymnames.cxx
deleted file mode 100644
index f4955a5ba8c6..000000000000
--- 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 cae3fafa5dca..21812ce263b9 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 b1bcf8eb8d8f..e118f56cee2a 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++ )