[Libreoffice-commits] .: 9 commits - vcl/aqua vcl/headless vcl/inc vcl/ios vcl/Library_vclplug_gen.mk vcl/source vcl/unx vcl/win
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sat Jan 28 02:07:28 PST 2012
vcl/Library_vclplug_gen.mk | 1
vcl/aqua/source/window/salframe.cxx | 7
vcl/headless/svpframe.cxx | 5
vcl/inc/aqua/salframe.h | 1
vcl/inc/brdwin.hxx | 1
vcl/inc/headless/svpframe.hxx | 1
vcl/inc/ios/salframe.h | 3
vcl/inc/salframe.hxx | 1
vcl/inc/unx/gtk/gtkframe.hxx | 1
vcl/inc/unx/gtk/gtkgdi.hxx | 3
vcl/inc/unx/saldisp.hxx | 36 ---
vcl/inc/unx/salframe.h | 1
vcl/inc/vcl/keycod.hxx | 17 -
vcl/inc/vcl/msgbox.hxx | 1
vcl/inc/win/salframe.h | 1
vcl/ios/source/window/salframe.cxx | 7
vcl/source/window/brdwin.cxx | 10 -
vcl/source/window/menu.cxx | 30 ---
vcl/source/window/msgbox.cxx | 3
vcl/unx/generic/app/keysymnames.cxx | 308 -------------------------------
vcl/unx/generic/app/saldisp.cxx | 148 --------------
vcl/unx/generic/window/salframe.cxx | 5
vcl/unx/gtk/app/gtkdata.cxx | 13 -
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 52 -----
vcl/unx/gtk/window/gtkframe.cxx | 11 -
vcl/win/source/window/salframe.cxx | 7
26 files changed, 9 insertions(+), 665 deletions(-)
New commits:
commit f356508623a258dd16037f86da6183b5875064c0
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Jan 28 00:29:54 2012 +0100
mbHelpBtn is always false
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index d7e21d0..394503d 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -118,7 +118,6 @@ private:
sal_Bool mbMenuHide;
sal_Bool mbDockBtn;
sal_Bool mbHideBtn;
- sal_Bool mbHelpBtn;
sal_Bool mbMenuBtn;
sal_Bool mbDisplayActive;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 7e225ea..712c3b3 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1594,15 +1594,6 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
pData->maRollRect.Left() = pData->maRollRect.Right()-pData->maRollRect.GetHeight()+1;
nRight -= pData->maRollRect.GetWidth();
}
-
- if ( pBorderWindow->mbHelpBtn )
- {
- pData->maHelpRect.Top() = nItemTop;
- pData->maHelpRect.Bottom() = nItemBottom;
- pData->maHelpRect.Right() = nRight;
- pData->maHelpRect.Left() = pData->maHelpRect.Right()-pData->maHelpRect.GetHeight()+1;
- nRight -= pData->maHelpRect.GetWidth()+3;
- }
}
else
{
@@ -1922,7 +1913,6 @@ void ImplBorderWindow::ImplInit( Window* pParent,
mbDockBtn = sal_False;
mbMenuBtn = sal_False;
mbHideBtn = sal_False;
- mbHelpBtn = sal_False;
mbDisplayActive = IsActive();
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
commit 632e2826d02dce2977044815ee604485b29775c1
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Jan 28 00:24:33 2012 +0100
mbSound is always true
diff --git a/vcl/inc/vcl/msgbox.hxx b/vcl/inc/vcl/msgbox.hxx
index 6d6c920..30fae20 100644
--- a/vcl/inc/vcl/msgbox.hxx
+++ b/vcl/inc/vcl/msgbox.hxx
@@ -73,7 +73,6 @@ protected:
Image maImage;
sal_uInt16 mnSoundType;
sal_Bool mbHelpBtn;
- sal_Bool mbSound;
CheckBox* mpCheckBox;
XubString maCheckBoxText;
sal_Bool mbCheck;
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 07610d6..5ffc6b0 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -71,7 +71,6 @@ void MessBox::ImplInitMessBoxData()
mpFixedImage = NULL;
mnSoundType = 0;
mbHelpBtn = sal_False;
- mbSound = sal_True;
mpCheckBox = NULL;
mbCheck = sal_False;
}
@@ -424,7 +423,7 @@ void MessBox::StateChanged( StateChangedType nType )
if ( nType == STATE_CHANGE_INITSHOW )
{
ImplPosControls();
- if ( mbSound && mnSoundType )
+ if ( mnSoundType )
Sound::Beep( (SoundType)(mnSoundType-1), this );
}
ButtonDialog::StateChanged( nType );
commit 3c5dbb2f5405b495ec5fe257df839e955cccf622
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 23:05:44 2012 +0100
remove some dead code
diff --git a/vcl/inc/vcl/keycod.hxx b/vcl/inc/vcl/keycod.hxx
index cdde1fd..e0faa4a 100644
--- a/vcl/inc/vcl/keycod.hxx
+++ b/vcl/inc/vcl/keycod.hxx
@@ -39,23 +39,6 @@
class Window;
-// -------------
-// - Key-Types -
-// -------------
-
-// Logische KeyFunktionen
-/*
-#ifndef ENUM_KEYFUNCTYPE_DECLARED
-#define ENUM_KEYFUNCTYPE_DECLARED
-enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN,
- KEYFUNC_SAVE, KEYFUNC_SAVEAS, KEYFUNC_PRINT,
- KEYFUNC_CLOSE, KEYFUNC_QUIT,
- KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO,
- KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT,
- KEYFUNC_FIND, KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES,
- KEYFUNC_FRONT };
-#endif
-*/
// -----------
// - KeyCode -
// -----------
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index c149de3..0acbdfb 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -473,7 +473,6 @@ private:
Timer aSubmenuCloseTimer;
Timer aScrollTimer;
sal_uLong nSaveFocusId;
-// long nStartY;
sal_uInt16 nHighlightedItem; // highlighted/selected Item
sal_uInt16 nMBDownPos;
sal_uInt16 nScrollerHeight;
@@ -1209,20 +1208,6 @@ void Menu::RemoveEventListener( const Link& rEventListener )
maEventListeners.removeListener( rEventListener );
}
-// -----------------------------------------------------------------------
-
-//void Menu::AddChildEventListener( const Link& rEventListener )
-//{
-// mpDummy4_WindowChildEventListeners->push_back( rEventListener );
-//}
-
-// -----------------------------------------------------------------------
-
-//void Menu::RemoveChildEventListener( const Link& rEventListener )
-//{
-// mpDummy4_WindowChildEventListeners->remove( rEventListener );
-//}
-
void Menu::InsertItem( sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nItemBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "Menu::InsertItem(): ItemId == 0" );
@@ -1466,7 +1451,6 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 n
{
PopupMenu* pNewMenu = new PopupMenu( *pSubMenu );
pThis->SetPopupMenu( nId, pNewMenu );
-// SetAutoMenu( pThis, nId, pNewMenu );
}
else
pThis->SetPopupMenu( nId, pSubMenu );
@@ -2465,9 +2449,6 @@ Size Menu::ImplCalcSize( Window* pWin )
long nTextWidth = pWin->GetCtrlTextWidth( pData->aText );
long nTextHeight = pWin->GetTextHeight();
-// if ( nTextHeight > pData->aSz.Height() )
-// pData->aSz.Height() = nTextHeight;
-
if ( bIsMenuBar )
{
if ( nTextHeight > pData->aSz.Height() )
@@ -3960,7 +3941,6 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt
nMBDownPos = ITEMPOS_INVALID;
nPosInParent = ITEMPOS_INVALID;
nScrollerHeight = 0;
-// nStartY = 0;
nBorder = EXTRASPACEY;
nFirstEntry = 0;
bScrollUp = sal_False;
@@ -4238,8 +4218,6 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
}
pData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
Size MySize = GetOutputSizePixel();
-// Point MyPos = GetPosPixel();
-// Point aItemTopLeft( MyPos.X(), MyPos.Y()+nY );
Point aItemTopLeft( 0, nY );
Point aItemBottomRight( aItemTopLeft );
aItemBottomRight.X() += MySize.Width();
@@ -4320,9 +4298,6 @@ void MenuFloatingWindow::Execute()
Application::Yield();
pSVData->maAppData.mpActivePopupMenu = NULL;
-
-// while ( bCallingSelect )
-// Application::Yield();
}
void MenuFloatingWindow::StopExecute( sal_uLong nFocusId )
@@ -4523,8 +4498,6 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp )
long nScrollEntryHeight = pMenu->GetItemList()->GetDataFromPos( nFirstEntry )->aSz.Height();
-// nStartY += nEntryHeight;
-
if ( !bScrollDown )
{
bScrollDown = sal_True;
@@ -4562,7 +4535,6 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp )
ImplDrawScroller( sal_False );
}
-// nStartY -= nEntryHeight;
Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP );
}
@@ -5357,8 +5329,6 @@ void MenuBarWindow::ImplCreatePopup( sal_Bool bPreSelectFirst )
nX += pData->aSz.Width();
}
pData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
-// Point MyPos = GetPosPixel();
-// Point aItemTopLeft( MyPos.X()+nX, MyPos.Y() );
Point aItemTopLeft( nX, 0 );
Point aItemBottomRight( aItemTopLeft );
aItemBottomRight.X() += pData->aSz.Width();
commit 0c0fbef7cc218ef5c02b986e42c2df63ce17c579
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 22:52:11 2012 +0100
vcl: Remove unused GetSymbolKeyName
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index d90b468..70b247b 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1142,13 +1142,6 @@ rtl::OUString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
// -----------------------------------------------------------------------
-rtl::OUString AquaSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
-{
- return GetKeyName( nKeyCode );
-}
-
-// -----------------------------------------------------------------------
-
static void getAppleScrollBarVariant(void)
{
bool bIsScrollbarDoubleMax = true; // default is DoubleMax
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 56869c2..68fe8e1 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -373,11 +373,6 @@ rtl::OUString SvpSalFrame::GetKeyName( sal_uInt16 )
return rtl::OUString();
}
-rtl::OUString SvpSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 )
-{
- return String();
-}
-
sal_Bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, KeyCode& )
{
return sal_False;
diff --git a/vcl/inc/aqua/salframe.h b/vcl/inc/aqua/salframe.h
index 124bf2d..879e1dd 100644
--- a/vcl/inc/aqua/salframe.h
+++ b/vcl/inc/aqua/salframe.h
@@ -144,7 +144,6 @@ public:
virtual void SetInputContext( SalInputContext* pContext );
virtual void EndExtTextInput( sal_uInt16 nFlags );
virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode );
virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
virtual LanguageType GetInputLanguage();
virtual SalBitmap* SnapShot();
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 5f88e64..217dccc 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -105,7 +105,6 @@ public:
virtual void SetInputContext( SalInputContext* pContext );
virtual void EndExtTextInput( sal_uInt16 nFlags );
virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode );
virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
virtual LanguageType GetInputLanguage();
virtual SalBitmap* SnapShot();
diff --git a/vcl/inc/ios/salframe.h b/vcl/inc/ios/salframe.h
index 7b779e0..68c4cbf 100644
--- a/vcl/inc/ios/salframe.h
+++ b/vcl/inc/ios/salframe.h
@@ -139,8 +139,7 @@ public:
virtual void Sync();
virtual void SetInputContext( SalInputContext* pContext );
virtual void EndExtTextInput( sal_uInt16 nFlags );
- virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode );
+ virtual String GetKeyName( sal_uInt16 nKeyCode );
virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
virtual LanguageType GetInputLanguage();
virtual SalBitmap* SnapShot();
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 3ebd448..f4c3d73 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -213,7 +213,6 @@ public:
virtual void EndExtTextInput( sal_uInt16 nFlags ) = 0;
virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode ) = 0;
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode ) = 0;
// returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType'
// returns sal_False if no mapping exists or function not supported
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index f1d49ac..1d84ca2 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -387,7 +387,6 @@ public:
virtual void EndExtTextInput( sal_uInt16 nFlags );
virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode );
virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
// returns the input language used for the last key stroke
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 5c87692..3ccb875 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -253,7 +253,6 @@ public:
virtual void SetInputContext( SalInputContext* pContext );
virtual void EndExtTextInput( sal_uInt16 nFlags );
virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode );
virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
virtual LanguageType GetInputLanguage();
virtual SalBitmap* SnapShot();
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 0f1c964..b252ad3 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -127,7 +127,6 @@ public:
virtual void SetInputContext( SalInputContext* pContext );
virtual void EndExtTextInput( sal_uInt16 nFlags );
virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode );
virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
virtual LanguageType GetInputLanguage();
virtual SalBitmap* SnapShot();
diff --git a/vcl/ios/source/window/salframe.cxx b/vcl/ios/source/window/salframe.cxx
index baed581..10f087e 100644
--- a/vcl/ios/source/window/salframe.cxx
+++ b/vcl/ios/source/window/salframe.cxx
@@ -704,13 +704,6 @@ rtl::OUString IosSalFrame::GetKeyName( sal_uInt16 nKeyCode )
// -----------------------------------------------------------------------
-rtl::OUString IosSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
-{
- return GetKeyName( nKeyCode );
-}
-
-// -----------------------------------------------------------------------
-
void IosSalFrame::getResolution( long& o_rDPIX, long& o_rDPIY )
{
if( ! mpGraphics )
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index dca1609..b9b9b29 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2579,11 +2579,6 @@ rtl::OUString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode )
return GetDisplay()->GetKeyName( nKeyCode );
}
-rtl::OUString X11SalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
-{
- return GetKeyName( nKeyCode );
-}
-
sal_Bool X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
{
// not supported yet
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 4869c45..84ab2a9 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2362,17 +2362,6 @@ void GtkSalFrame::Sync()
gdk_display_sync( getGdkDisplay() );
}
-rtl::OUString GtkSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
-{
-#if !GTK_CHECK_VERSION(3,0,0)
- return getDisplay()->GetKeyName( nKeyCode );
-#else
- (void)nKeyCode;
-# warning FIXME - key names
- return rtl::OUString();
-#endif
-}
-
rtl::OUString GtkSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
#if !GTK_CHECK_VERSION(3,0,0)
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 591e2ec..6c8dce8 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2649,13 +2649,6 @@ rtl::OUString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode )
// -----------------------------------------------------------------------
-rtl::OUString WinSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
-{
- return GetKeyName( nKeyCode );
-}
-
-// -----------------------------------------------------------------------
-
inline Color ImplWinColorToSal( COLORREF nColor )
{
return Color( GetRValue( nColor ), GetGValue( nColor ), GetBValue( nColor ) );
commit a9e2f766ccc7761f9aad3dbff7d11e58b7ed906d
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 20:27:59 2012 +0100
vcl: SalWM is unused
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 3f08088..fce2a68 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -86,19 +86,6 @@ typedef enum {
extern "C" srv_vendor_t sal_GetServerVendor( Display *p_display );
-// -=-= SalWM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-enum SalWM { olwm, // Open Look
- mwm, // Motif
- kwm, // KDE Desktop Environment
- FourDwm, // SGI
- vuewm, // HP
- dtwm, // CDE
- winmgr, // Oracle NC
- twm,
- fvwm, // ...
- pmwm, // SCO
- otherwm };
-
// -=-= SalRGB -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// MSB/Bigendian Sicht (SalColor == RGB, r=0xFF0000, g=0xFF00, b=0xFF)
@@ -294,7 +281,6 @@ protected:
sal_uLong nMaxRequestSize_; // [byte]
srv_vendor_t meServerVendor;
- SalWM eWindowManager_;
// until x bytes
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index a28b3b2..09bc091 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -651,7 +651,6 @@ void SalDisplay::Init()
for( size_t i = 0; i < POINTER_COUNT; i++ )
aPointerCache_[i] = None;
- eWindowManager_ = otherwm;
mpFactory = (AttributeProvider*)NULL;
m_bXinerama = false;
@@ -2268,8 +2267,6 @@ void SalDisplay::PrintInfo() const
XMaxRequestSize(pDisp_) * 4, XExtendedMaxRequestSize(pDisp_) * 4 );
if( GetProperties() != PROPERTY_DEFAULT )
fprintf( stderr, "\tProperties \t0x%lX\n", GetProperties() );
- if( eWindowManager_ != otherwm )
- fprintf( stderr, "\tWindowmanager \t%d\n", eWindowManager_ );
fprintf( stderr, "\tWMName \t%s\n", rtl::OUStringToOString( getWMAdaptor()->getWindowManagerName(), osl_getThreadTextEncoding() ).getStr() );
}
fprintf( stderr, "Screen\n" );
commit 65f77f5a74f5b96131aaac414fbff4a9ef757578
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 20:23:32 2012 +0100
vcl: Remove unused server vendors
GetServerVendor() is only used to check for vendor_sun. Maybe
remove this method later...
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 547f1f8..3f08088 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -80,17 +80,7 @@ namespace vcl_sal { class WMAdaptor; }
typedef enum {
vendor_none = 0,
- vendor_attachmate,
- vendor_excursion,
- vendor_hp,
- vendor_hummingbird,
- vendor_ibm,
- vendor_sco,
- vendor_sgi,
vendor_sun,
- vendor_xfree,
- vendor_xinside,
- vendor_xprinter,
vendor_unknown
} srv_vendor_t;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 21812ce..a28b3b2 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -237,17 +237,7 @@ sal_GetServerVendor( Display *p_display )
} vendor_t;
const vendor_t p_vendorlist[] = {
- { vendor_xfree, "The XFree86 Project, Inc", 13 },
{ vendor_sun, "Sun Microsystems, Inc.", 10 },
- { vendor_attachmate, "Attachmate Corporation", 10 },
- { vendor_excursion,
- "DECWINDOWS DigitalEquipmentCorporation, eXcursion", 42 },
- { vendor_hp, "Hewlett-Packard Company", 17 },
- { vendor_hummingbird, "Hummingbird Communications Ltd.", 11 },
- { vendor_ibm, "International Business Machines", 24 },
- { vendor_sgi, "Silicon Graphics", 9 },
- { vendor_sco, "The Santa Cruz Operation", 16 },
- { vendor_xinside, "X Inside Inc.", 10 },
// allways the last entry: vendor_none to indicate eol
{ vendor_none, NULL, 0 },
};
commit 8f2a08b9576a50b2046306132cb8cddcf876d0a4
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 20:06:47 2012 +0100
GtkSalGraphics: No extra handling for Blueprint theme
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 878fa61..9f5c4dd 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -134,9 +134,6 @@ public:
// will be set when UI theme was changed
static sal_Bool bThemeChanged;
static sal_Bool bNeedPixmapPaint;
- static sal_Bool bGlobalNeedPixmapPaint;
- static sal_Bool bToolbarGripWorkaround;
- static sal_Bool bNeedButtonStyleAsEditBackgroundWorkaround;
// native widget methods
virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 686c784..a55d3f4 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -50,9 +50,6 @@ typedef struct _cairo_font_options cairo_font_options_t;
// initialize statics
sal_Bool GtkSalGraphics::bThemeChanged = sal_True;
sal_Bool GtkSalGraphics::bNeedPixmapPaint = sal_False;
-sal_Bool GtkSalGraphics::bGlobalNeedPixmapPaint = sal_False;
-sal_Bool GtkSalGraphics::bToolbarGripWorkaround = sal_False;
-sal_Bool GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround = sal_False;
GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
: X11SalGraphics(),
@@ -451,12 +448,12 @@ void GtkData::initNWF( void )
// KDE 3.3 invented a bug in the qt<->gtk theme engine
// that makes direct rendering impossible: they totally
// ignore the clip rectangle passed to the paint methods
- GtkSalGraphics::bNeedPixmapPaint = GtkSalGraphics::bGlobalNeedPixmapPaint = true;
+ GtkSalGraphics::bNeedPixmapPaint = true;
}
}
static const char* pEnv = getenv( "SAL_GTK_USE_PIXMAPPAINT" );
if( pEnv && *pEnv )
- GtkSalGraphics::bNeedPixmapPaint = GtkSalGraphics::bGlobalNeedPixmapPaint = true;
+ GtkSalGraphics::bNeedPixmapPaint = true;
#if OSL_DEBUG_LEVEL > 1
std::fprintf( stderr, "GtkPlugin: using %s NWF\n",
@@ -777,7 +774,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
&& nType != CTRL_TAB_ITEM
&& nType != CTRL_TAB_PANE
&& nType != CTRL_PROGRESS
- && ! (bToolbarGripWorkaround && nType == CTRL_TOOLBAR && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
+ && ! (nType == CTRL_TOOLBAR && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
)
{
// make pixmap a little larger since some themes draw decoration
@@ -1948,21 +1945,13 @@ static void NWPaintOneEditBox( SalX11Screen nScreen,
if ( stateType == GTK_STATE_PRELIGHT )
stateType = GTK_STATE_NORMAL;
- // Blueprint needs to paint entry_bg with a Button widget, not an Entry widget to get
- // a nice white (or whatever default color) background
- GtkWidget* pBGWidget = widget;
- if( GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround )
- {
- NWSetWidgetState( gWidgetData[nScreen].gBtnWidget, nState, stateType );
- pBGWidget = gWidgetData[nScreen].gBtnWidget;
- }
NWSetWidgetState( widget, nState, stateType );
/* This doesn't seem to be necessary, and it causes some weird glitch in
* murrine (with the elementary theme for instance) but it fixes some issue
* with Orta, so... */
- gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
- gdkRect, pBGWidget, "entry_bg",
+ gtk_paint_flat_box( widget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
+ gdkRect, widget, "entry_bg",
aEditBoxRect.Left(), aEditBoxRect.Top(),
aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
@@ -3693,37 +3682,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// finally update the collected settings
rSettings.SetStyleSettings( aStyleSet );
-
- gchar* pThemeName = NULL;
- g_object_get( pSettings, "gtk-theme-name", &pThemeName, (char *)NULL );
- #if OSL_DEBUG_LEVEL > 1
- std::fprintf( stderr, "Theme name is \"%s\"\n", pThemeName );
- #endif
-
- // default behaviour
- bNeedPixmapPaint = bGlobalNeedPixmapPaint;
- bToolbarGripWorkaround = false;
- bNeedButtonStyleAsEditBackgroundWorkaround = false;
-
- // setup some workarounds for "blueprint" theme
- if( pThemeName && strncasecmp( pThemeName, "blueprint", 9 ) == 0 )
- {
- bNeedButtonStyleAsEditBackgroundWorkaround = true;
- if( GetGenericData()->GetSalDisplay()->GetServerVendor() == vendor_sun )
- {
- // #i52570#, #i61532# workaround a weird paint issue;
- // on a Sunray Xserver sometimes painting buttons and edits
- // won't work when using the blueprint theme
- // not reproducible with simpler programs or other themes
- if( pThemeName && strncasecmp( pThemeName, "blueprint", 9 ) == 0 )
- {
- bNeedPixmapPaint = true;
- bToolbarGripWorkaround = true;
- }
- }
- }
- // clean up
- g_free (pThemeName);
}
commit 9a7605b8f08dfcfbc99bc0c635014eac8e41e932
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 19:33:03 2012 +0100
Remove further code belonging to SalDisplay::GetKeyboardName
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 cae3faf..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++ )
commit 04b9c2f633f0be1b676933943bdd0b1dc58b5471
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 27 16:51:04 2012 +0100
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...
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..cae3faf 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 )
More information about the Libreoffice-commits
mailing list