Kaydet (Commit) 4282865c authored tarafından Thomas Arnhold's avatar Thomas Arnhold Kaydeden (comit) Caolán McNamara

Remove unused InterceptChildWindowKeyDown

- 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
üst b3a3ab05
...@@ -212,10 +212,4 @@ const SystemEnvData* AquaSalObject::GetSystemData() const ...@@ -212,10 +212,4 @@ const SystemEnvData* AquaSalObject::GetSystemData() const
return &maSysData; return &maSysData;
} }
// -----------------------------------------------------------------------
void AquaSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -51,7 +51,6 @@ void SvpSalObject::EndSetClipRegion() {} ...@@ -51,7 +51,6 @@ void SvpSalObject::EndSetClipRegion() {}
void SvpSalObject::SetPosSize( long, long, long, long ) {} void SvpSalObject::SetPosSize( long, long, long, long ) {}
void SvpSalObject::Show( sal_Bool ) {} void SvpSalObject::Show( sal_Bool ) {}
const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; } const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; }
void SvpSalObject::InterceptChildWindowKeyDown( sal_Bool ) {}
// SalI18NImeStatus // SalI18NImeStatus
SvpImeStatus::~SvpImeStatus() {} SvpImeStatus::~SvpImeStatus() {}
......
...@@ -77,7 +77,6 @@ public: ...@@ -77,7 +77,6 @@ public:
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
virtual void Show( sal_Bool bVisible ); virtual void Show( sal_Bool bVisible );
virtual const SystemEnvData* GetSystemData() const; virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
}; };
#endif // _SV_SALOBJ_H #endif // _SV_SALOBJ_H
......
...@@ -55,8 +55,6 @@ public: ...@@ -55,8 +55,6 @@ public:
virtual void Show( sal_Bool bVisible ); virtual void Show( sal_Bool bVisible );
virtual const SystemEnvData* GetSystemData() const; virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
}; };
class SvpImeStatus : public SalI18NImeStatus class SvpImeStatus : public SalI18NImeStatus
......
...@@ -74,7 +74,6 @@ public: ...@@ -74,7 +74,6 @@ public:
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
virtual void Show( sal_Bool bVisible ); virtual void Show( sal_Bool bVisible );
virtual const SystemEnvData* GetSystemData() const; virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
}; };
#endif // _SV_SALOBJ_H #endif // _SV_SALOBJ_H
......
...@@ -76,8 +76,6 @@ public: ...@@ -76,8 +76,6 @@ public:
virtual const SystemEnvData* GetSystemData() const = 0; virtual const SystemEnvData* GetSystemData() const = 0;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0;
void SetCallback( void* pInst, SALOBJECTPROC pProc ) void SetCallback( void* pInst, SALOBJECTPROC pProc )
{ m_pInst = pInst; m_pCallback = pProc; } { m_pInst = pInst; m_pCallback = pProc; }
long CallCallback( sal_uInt16 nEvent, const void* pEvent ) long CallCallback( sal_uInt16 nEvent, const void* pEvent )
......
...@@ -65,8 +65,6 @@ public: ...@@ -65,8 +65,6 @@ public:
virtual void SetForwardKey( sal_Bool bEnable ); virtual void SetForwardKey( sal_Bool bEnable );
virtual const SystemEnvData* GetSystemData() const; virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
}; };
#endif // _SV_SALOBJ_H #endif // _SV_SALOBJ_H
......
...@@ -95,8 +95,6 @@ public: ...@@ -95,8 +95,6 @@ public:
virtual void GrabFocus(); virtual void GrabFocus();
virtual const SystemEnvData* GetSystemData() const; virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
}; };
#endif // _SV_SALOBJ_H #endif // _SV_SALOBJ_H
......
...@@ -216,7 +216,6 @@ void ImplSalYieldMutexAcquire(); ...@@ -216,7 +216,6 @@ void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease(); void ImplSalYieldMutexRelease();
sal_uLong ImplSalReleaseYieldMutex(); sal_uLong ImplSalReleaseYieldMutex();
void ImplSalAcquireYieldMutex( sal_uLong nCount ); void ImplSalAcquireYieldMutex( sal_uLong nCount );
sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg );
// \\WIN\SOURCE\WINDOW\SALFRAME.CXX // \\WIN\SOURCE\WINDOW\SALFRAME.CXX
LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
......
...@@ -46,7 +46,6 @@ public: ...@@ -46,7 +46,6 @@ public:
RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
RECT* mpNextClipRect; // Naechstes ClipRegion-Rect RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
sal_Bool mbFirstClipRect; // Flag for first cliprect to insert 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 WinSalObject* mpNextObject; // pointer to next object
...@@ -63,7 +62,6 @@ public: ...@@ -63,7 +62,6 @@ public:
virtual void Enable( sal_Bool nEnable ); virtual void Enable( sal_Bool nEnable );
virtual void GrabFocus(); virtual void GrabFocus();
virtual const SystemEnvData* GetSystemData() const; virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
}; };
#endif // _SV_SALOBJ_H #endif // _SV_SALOBJ_H
......
...@@ -386,8 +386,7 @@ public: ...@@ -386,8 +386,7 @@ public:
mbDisableAccessibleLabelForRelation:1, mbDisableAccessibleLabelForRelation:1,
mbDisableAccessibleLabeledByRelation:1, mbDisableAccessibleLabeledByRelation:1,
mbHelpTextDynamic:1, mbHelpTextDynamic:1,
mbFakeFocusSet:1, mbFakeFocusSet:1;
mbInterceptChildWindowKeyDown:1;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer;
}; };
......
...@@ -207,10 +207,4 @@ const SystemEnvData* IosSalObject::GetSystemData() const ...@@ -207,10 +207,4 @@ const SystemEnvData* IosSalObject::GetSystemData() const
return &maSysData; return &maSysData;
} }
// -----------------------------------------------------------------------
void IosSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -534,10 +534,4 @@ long X11SalObject::Dispatch( XEvent* pEvent ) ...@@ -534,10 +534,4 @@ long X11SalObject::Dispatch( XEvent* pEvent )
return 0; return 0;
} }
// -----------------------------------------------------------------------
void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -222,8 +222,4 @@ void GtkSalObject::SetForwardKey( sal_Bool bEnable ) ...@@ -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 ) ) ); 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -651,11 +651,8 @@ void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents ) ...@@ -651,11 +651,8 @@ void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents )
{ {
if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
{ {
if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) TranslateMessage( &aMsg );
{ ImplSalDispatchMessage( &aMsg );
TranslateMessage( &aMsg );
ImplSalDispatchMessage( &aMsg );
}
bOneEvent = bWasMsg = true; bOneEvent = bWasMsg = true;
} }
...@@ -667,11 +664,8 @@ void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents ) ...@@ -667,11 +664,8 @@ void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents )
{ {
if ( ImplGetMessage( &aMsg, 0, 0, 0 ) ) if ( ImplGetMessage( &aMsg, 0, 0, 0 ) )
{ {
if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) TranslateMessage( &aMsg );
{ ImplSalDispatchMessage( &aMsg );
TranslateMessage( &aMsg );
ImplSalDispatchMessage( &aMsg );
}
} }
} }
} }
......
...@@ -1406,11 +1406,9 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) ...@@ -1406,11 +1406,9 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
MSG aMsg; MSG aMsg;
if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
{ {
if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) TranslateMessage( &aMsg );
{ ImplDispatchMessage( &aMsg );
TranslateMessage( &aMsg );
ImplDispatchMessage( &aMsg );
}
i++; i++;
if ( i > 15 ) if ( i > 15 )
bWhile = FALSE; bWhile = FALSE;
...@@ -1597,11 +1595,8 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName, ...@@ -1597,11 +1595,8 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
MSG aMsg; MSG aMsg;
if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
{ {
if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) TranslateMessage( &aMsg );
{ ImplDispatchMessage( &aMsg );
TranslateMessage( &aMsg );
ImplDispatchMessage( &aMsg );
}
i++; i++;
if ( i > 15 ) if ( i > 15 )
......
...@@ -101,44 +101,6 @@ WinSalFrame* ImplFindSalObjectFrame( HWND hWnd ) ...@@ -101,44 +101,6 @@ WinSalFrame* ImplFindSalObjectFrame( HWND hWnd )
return pFrame; return pFrame;
} }
// -----------------------------------------------------------------------
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 ) LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
...@@ -630,7 +592,6 @@ WinSalObject::WinSalObject() ...@@ -630,7 +592,6 @@ WinSalObject::WinSalObject()
mhLastFocusWnd = 0; mhLastFocusWnd = 0;
maSysData.nSize = sizeof( SystemEnvData ); maSysData.nSize = sizeof( SystemEnvData );
mpStdClipRgnData = NULL; mpStdClipRgnData = NULL;
mbInterceptChildWindowKeyDown = sal_False;
// Insert object in objectlist // Insert object in objectlist
mpNextObject = pSalData->mpFirstObject; mpNextObject = pSalData->mpFirstObject;
...@@ -830,11 +791,4 @@ const SystemEnvData* WinSalObject::GetSystemData() const ...@@ -830,11 +791,4 @@ const SystemEnvData* WinSalObject::GetSystemData() const
return &maSysData; return &maSysData;
} }
// -----------------------------------------------------------------------
void WinSalObject::InterceptChildWindowKeyDown( sal_Bool bIntercept )
{
mbInterceptChildWindowKeyDown = bIntercept;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment