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
return &maSysData;
}
// -----------------------------------------------------------------------
void AquaSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -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() {}
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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 )
......
......@@ -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
......
......@@ -95,8 +95,6 @@ public:
virtual void GrabFocus();
virtual const SystemEnvData* GetSystemData() const;
virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
};
#endif // _SV_SALOBJ_H
......
......@@ -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 );
......
......@@ -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
......
......@@ -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;
};
......
......@@ -207,10 +207,4 @@ const SystemEnvData* IosSalObject::GetSystemData() const
return &maSysData;
}
// -----------------------------------------------------------------------
void IosSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -534,10 +534,4 @@ long X11SalObject::Dispatch( XEvent* pEvent )
return 0;
}
// -----------------------------------------------------------------------
void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -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: */
......@@ -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 );
}
}
}
......
......@@ -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 )
......
......@@ -101,44 +101,6 @@ WinSalFrame* ImplFindSalObjectFrame( HWND hWnd )
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 )
......@@ -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: */
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