[PATCH] Remove unused InterceptChildWindowKeyDown
Thomas Arnhold
thomas at arnhold.org
Fri Jun 8 21:43:18 PDT 2012
- InterceptChildWindowKeyDown never gets called
- so mbInterceptChildWindowKeyDown doesn't get changed
- at ImplInterceptChildWindowKeyDown
a) ImplSendMessage() is never accessed
b) always returns sal_False
Change-Id: I2dc84c88644d19c238064ab1b7dff0a24f90dc5d
---
vcl/aqua/source/window/salobj.cxx | 6 -----
vcl/headless/svpdummies.cxx | 1 -
vcl/inc/aqua/salobj.h | 1 -
vcl/inc/headless/svpdummies.hxx | 2 --
vcl/inc/ios/salobj.h | 1 -
vcl/inc/salobj.hxx | 2 --
vcl/inc/unx/gtk/gtkobject.hxx | 2 --
vcl/inc/unx/salobj.h | 2 --
vcl/inc/win/saldata.hxx | 1 -
vcl/inc/win/salobj.h | 2 --
vcl/inc/window.h | 3 +--
vcl/ios/source/window/salobj.cxx | 6 -----
vcl/unx/generic/window/salobj.cxx | 6 -----
vcl/unx/gtk/window/gtkobject.cxx | 4 ----
vcl/win/source/app/salinst.cxx | 14 ++++-------
vcl/win/source/gdi/salprn.cxx | 15 ++++--------
vcl/win/source/window/salobj.cxx | 46 -------------------------------------
17 files changed, 10 insertions(+), 104 deletions(-)
diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx
index 40ba2d5..a01111f 100644
--- a/vcl/aqua/source/window/salobj.cxx
+++ b/vcl/aqua/source/window/salobj.cxx
@@ -212,10 +212,4 @@ const SystemEnvData* AquaSalObject::GetSystemData() const
return &maSysData;
}
-// -----------------------------------------------------------------------
-
-void AquaSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx
index 9ebf261..2d80332 100644
--- a/vcl/headless/svpdummies.cxx
+++ b/vcl/headless/svpdummies.cxx
@@ -51,7 +51,6 @@ void SvpSalObject::EndSetClipRegion() {}
void SvpSalObject::SetPosSize( long, long, long, long ) {}
void SvpSalObject::Show( sal_Bool ) {}
const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; }
-void SvpSalObject::InterceptChildWindowKeyDown( sal_Bool ) {}
// SalI18NImeStatus
SvpImeStatus::~SvpImeStatus() {}
diff --git a/vcl/inc/aqua/salobj.h b/vcl/inc/aqua/salobj.h
index 2931ca0..490acd8 100644
--- a/vcl/inc/aqua/salobj.h
+++ b/vcl/inc/aqua/salobj.h
@@ -77,7 +77,6 @@ public:
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
virtual void Show( sal_Bool bVisible );
virtual const SystemEnvData* GetSystemData() const;
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index 0fc437e..9e3f4c9 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -55,8 +55,6 @@ public:
virtual void Show( sal_Bool bVisible );
virtual const SystemEnvData* GetSystemData() const;
-
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
class SvpImeStatus : public SalI18NImeStatus
diff --git a/vcl/inc/ios/salobj.h b/vcl/inc/ios/salobj.h
index 751131f..a93f851 100644
--- a/vcl/inc/ios/salobj.h
+++ b/vcl/inc/ios/salobj.h
@@ -74,7 +74,6 @@ public:
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
virtual void Show( sal_Bool bVisible );
virtual const SystemEnvData* GetSystemData() const;
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx
index 32c1d3f..f2d1912 100644
--- a/vcl/inc/salobj.hxx
+++ b/vcl/inc/salobj.hxx
@@ -76,8 +76,6 @@ public:
virtual const SystemEnvData* GetSystemData() const = 0;
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0;
-
void SetCallback( void* pInst, SALOBJECTPROC pProc )
{ m_pInst = pInst; m_pCallback = pProc; }
long CallCallback( sal_uInt16 nEvent, const void* pEvent )
diff --git a/vcl/inc/unx/gtk/gtkobject.hxx b/vcl/inc/unx/gtk/gtkobject.hxx
index 7b1a410..67c5079 100644
--- a/vcl/inc/unx/gtk/gtkobject.hxx
+++ b/vcl/inc/unx/gtk/gtkobject.hxx
@@ -65,8 +65,6 @@ public:
virtual void SetForwardKey( sal_Bool bEnable );
virtual const SystemEnvData* GetSystemData() const;
-
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h
index 74225cf..46eaa2f 100644
--- a/vcl/inc/unx/salobj.h
+++ b/vcl/inc/unx/salobj.h
@@ -95,8 +95,6 @@ public:
virtual void GrabFocus();
virtual const SystemEnvData* GetSystemData() const;
-
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index bc07017..dbe923a 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -216,7 +216,6 @@ void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease();
sal_uLong ImplSalReleaseYieldMutex();
void ImplSalAcquireYieldMutex( sal_uLong nCount );
-sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg );
// \\WIN\SOURCE\WINDOW\SALFRAME.CXX
LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
diff --git a/vcl/inc/win/salobj.h b/vcl/inc/win/salobj.h
index d96c984..5aff5e1 100644
--- a/vcl/inc/win/salobj.h
+++ b/vcl/inc/win/salobj.h
@@ -46,7 +46,6 @@ public:
RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
sal_Bool mbFirstClipRect; // Flag for first cliprect to insert
- sal_Bool mbInterceptChildWindowKeyDown; // Intercept the KeyDown event sent to system child window
WinSalObject* mpNextObject; // pointer to next object
@@ -63,7 +62,6 @@ public:
virtual void Enable( sal_Bool nEnable );
virtual void GrabFocus();
virtual const SystemEnvData* GetSystemData() const;
- virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 106fe96..d563934 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -386,8 +386,7 @@ public:
mbDisableAccessibleLabelForRelation:1,
mbDisableAccessibleLabeledByRelation:1,
mbHelpTextDynamic:1,
- mbFakeFocusSet:1,
- mbInterceptChildWindowKeyDown:1;
+ mbFakeFocusSet:1;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer;
};
diff --git a/vcl/ios/source/window/salobj.cxx b/vcl/ios/source/window/salobj.cxx
index cd90e18..7bf573a 100644
--- a/vcl/ios/source/window/salobj.cxx
+++ b/vcl/ios/source/window/salobj.cxx
@@ -207,10 +207,4 @@ const SystemEnvData* IosSalObject::GetSystemData() const
return &maSysData;
}
-// -----------------------------------------------------------------------
-
-void IosSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index e7ce60f..64cbf66 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -534,10 +534,4 @@ long X11SalObject::Dispatch( XEvent* pEvent )
return 0;
}
-// -----------------------------------------------------------------------
-
-void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index 5525410..ddccd77 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -222,8 +222,4 @@ void GtkSalObject::SetForwardKey( sal_Bool bEnable )
gtk_widget_set_events( GTK_WIDGET( m_pSocket ), ~(GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE) & gtk_widget_get_events( GTK_WIDGET( m_pSocket ) ) );
}
-void GtkSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index e80ff80..f5f678b 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -651,11 +651,8 @@ void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents )
{
if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
{
- if ( !ImplInterceptChildWindowKeyDown( aMsg ) )
- {
- TranslateMessage( &aMsg );
- ImplSalDispatchMessage( &aMsg );
- }
+ TranslateMessage( &aMsg );
+ ImplSalDispatchMessage( &aMsg );
bOneEvent = bWasMsg = true;
}
@@ -667,11 +664,8 @@ void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents )
{
if ( ImplGetMessage( &aMsg, 0, 0, 0 ) )
{
- if ( !ImplInterceptChildWindowKeyDown( aMsg ) )
- {
- TranslateMessage( &aMsg );
- ImplSalDispatchMessage( &aMsg );
- }
+ TranslateMessage( &aMsg );
+ ImplSalDispatchMessage( &aMsg );
}
}
}
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index fbc4fd9..10bb796 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -1406,11 +1406,9 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
MSG aMsg;
if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
{
- if ( !ImplInterceptChildWindowKeyDown( aMsg ) )
- {
- TranslateMessage( &aMsg );
- ImplDispatchMessage( &aMsg );
- }
+ TranslateMessage( &aMsg );
+ ImplDispatchMessage( &aMsg );
+
i++;
if ( i > 15 )
bWhile = FALSE;
@@ -1597,11 +1595,8 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
MSG aMsg;
if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
{
- if ( !ImplInterceptChildWindowKeyDown( aMsg ) )
- {
- TranslateMessage( &aMsg );
- ImplDispatchMessage( &aMsg );
- }
+ TranslateMessage( &aMsg );
+ ImplDispatchMessage( &aMsg );
i++;
if ( i > 15 )
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index cbaef77..461d252 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -103,44 +103,6 @@ WinSalFrame* ImplFindSalObjectFrame( HWND hWnd )
// -----------------------------------------------------------------------
-sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg )
-{
- sal_Bool bResult = sal_False;
- if ( rMsg.message == WM_KEYDOWN )
- {
- wchar_t pClassName[10];
- sal_Int32 nLen = GetClassNameW( rMsg.hwnd, pClassName, 10 );
- if ( !( nLen == 9 && wcsncmp( pClassName, SAL_OBJECT_CLASSNAMEW, nLen ) == 0 ) )
- {
- // look for the first SalObject in the parent hierarchy
- HWND hWin = rMsg.hwnd;
- WinSalObject* pSalObj = NULL;
- do
- {
- hWin = ::GetParent( hWin );
- if ( hWin )
- {
- nLen = GetClassNameW( hWin, pClassName, 10 );
- if ( nLen == 9 && wcsncmp( pClassName, SAL_OBJECT_CLASSNAMEW, nLen ) == 0 )
- pSalObj = GetSalObjWindowPtr( hWin );
- }
- } while( hWin && !pSalObj );
-
- if ( pSalObj && pSalObj->mbInterceptChildWindowKeyDown && pSalObj->maSysData.hWnd )
- {
- bResult = ( 1 == ImplSendMessage( pSalObj->maSysData.hWnd, rMsg.message, rMsg.wParam, rMsg.lParam ) );
- }
- }
- }
-
- return bResult;
-}
-
-// -----------------------------------------------------------------------
-
-
-// -----------------------------------------------------------------------
-
LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
{
// Used for Unicode and none Unicode
@@ -630,7 +592,6 @@ WinSalObject::WinSalObject()
mhLastFocusWnd = 0;
maSysData.nSize = sizeof( SystemEnvData );
mpStdClipRgnData = NULL;
- mbInterceptChildWindowKeyDown = sal_False;
// Insert object in objectlist
mpNextObject = pSalData->mpFirstObject;
@@ -830,11 +791,4 @@ const SystemEnvData* WinSalObject::GetSystemData() const
return &maSysData;
}
-// -----------------------------------------------------------------------
-
-void WinSalObject::InterceptChildWindowKeyDown( sal_Bool bIntercept )
-{
- mbInterceptChildWindowKeyDown = bIntercept;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
--
1.7.10.4
--------------000603040301050306060402--
More information about the LibreOffice
mailing list