diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-06-09 06:43:18 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 16:31:34 +0100 |
commit | 4282865c517f8de814696fa75d0662aba73a4624 (patch) | |
tree | 2728a30b33a211d3ad9d75838a9d844e1ecd5223 /vcl/win | |
parent | b3a3ab05e41a34c4a9d62639993f215dd47a2ae9 (diff) |
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
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/app/salinst.cxx | 14 | ||||
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 15 | ||||
-rw-r--r-- | vcl/win/source/window/salobj.cxx | 46 |
3 files changed, 9 insertions, 66 deletions
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index e80ff8092da7..f5f678b61e0b 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 fbc4fd90f3f7..10bb796cdfdd 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 cbaef77412d6..461d252cb5ca 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: */ |