Kaydet (Commit) cb71841a authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Noel Grandin

tdf#78431: Clean up pFrame parameter in ImplWindowFrameProc

Change-Id: I441c1b89a975fa7d31094e66ef3ccad37ce40818
Reviewed-on: https://gerrit.libreoffice.org/21497Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 1ae5cecc
...@@ -248,7 +248,6 @@ public: ...@@ -248,7 +248,6 @@ public:
return false; return false;
} }
// Callbacks (indepent part in vcl/source/window/winproc.cxx) // Callbacks (indepent part in vcl/source/window/winproc.cxx)
// for default message handling return 0 // for default message handling return 0
void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc ); void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc );
...@@ -260,7 +259,7 @@ public: ...@@ -260,7 +259,7 @@ public:
// that should not know more than necessary about the SalFrame implementation // that should not know more than necessary about the SalFrame implementation
// (e.g. input methods, printer update handlers). // (e.g. input methods, printer update handlers).
long CallCallback( sal_uInt16 nEvent, const void* pEvent ) const long CallCallback( sal_uInt16 nEvent, const void* pEvent ) const
{ return m_pProc ? long(m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent )) : 0; } { return m_pProc ? long(m_pProc( m_pWindow, nEvent, pEvent )) : 0; }
bool PaintsBlocked() const { return m_bPaintsBlocked; } bool PaintsBlocked() const { return m_bPaintsBlocked; }
}; };
......
...@@ -227,8 +227,7 @@ struct SalQueryCharPositionEvent ...@@ -227,8 +227,7 @@ struct SalQueryCharPositionEvent
// - SalFrame-Types - // - SalFrame-Types -
typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalFrame* pFrame, typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, sal_uInt16 nEvent, const void* pEvent );
sal_uInt16 nEvent, const void* pEvent );
// - SalObject-Events - // - SalObject-Events -
......
...@@ -93,7 +93,7 @@ namespace dnd { ...@@ -93,7 +93,7 @@ namespace dnd {
class XDropTarget; class XDropTarget;
}}}}} }}}}}
bool ImplWindowFrameProc( vcl::Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent ); bool ImplWindowFrameProc( vcl::Window* pInst, sal_uInt16 nEvent, const void* pEvent );
#define WINDOW_HITTEST_INSIDE ((sal_uInt16)0x0001) #define WINDOW_HITTEST_INSIDE ((sal_uInt16)0x0001)
#define WINDOW_HITTEST_TRANSPARENT ((sal_uInt16)0x0002) #define WINDOW_HITTEST_TRANSPARENT ((sal_uInt16)0x0002)
......
...@@ -997,7 +997,7 @@ IMPL_STATIC_LINK_TYPED( Application, PostEventHandler, void*, pCallData, void ) ...@@ -997,7 +997,7 @@ IMPL_STATIC_LINK_TYPED( Application, PostEventHandler, void*, pCallData, void )
}; };
if( pData->mpWin && pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get() && pEventData ) if( pData->mpWin && pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get() && pEventData )
ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), nullptr, (sal_uInt16) nEvent, pEventData ); ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), (sal_uInt16) nEvent, pEventData );
// remove this event from list of posted events, watch for destruction of internal data // remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() ); ::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
......
...@@ -104,7 +104,7 @@ void DebugEventInjector::InjectMenuEvent() ...@@ -104,7 +104,7 @@ void DebugEventInjector::InjectMenuEvent()
sal_uInt16 nEvent = nEvents[ (int)(getRandom() * SAL_N_ELEMENTS( nEvents )) ]; sal_uInt16 nEvent = nEvents[ (int)(getRandom() * SAL_N_ELEMENTS( nEvents )) ];
SalMenuEvent aEvent = aIds[ getRandom() * aIds.size() ]; SalMenuEvent aEvent = aIds[ getRandom() * aIds.size() ];
bool bHandled = ImplWindowFrameProc( pSysWin, nullptr, nEvent, &aEvent); bool bHandled = ImplWindowFrameProc( pSysWin, nEvent, &aEvent);
SAL_INFO( "vcl.debugevent", SAL_INFO( "vcl.debugevent",
"Injected menu event " << aEvent.mpMenu "Injected menu event " << aEvent.mpMenu
...@@ -160,14 +160,14 @@ void DebugEventInjector::InjectTextEvent() ...@@ -160,14 +160,14 @@ void DebugEventInjector::InjectTextEvent()
if( getRandom() < 0.05 ) // modifier if( getRandom() < 0.05 ) // modifier
aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODIFIERS_MASK ) & KEY_MODIFIERS_MASK; aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODIFIERS_MASK ) & KEY_MODIFIERS_MASK;
bool bHandled = ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYINPUT, &aKeyEvent); bool bHandled = ImplWindowFrameProc( pWindow, SALEVENT_KEYINPUT, &aKeyEvent);
SAL_INFO( "vcl.debugevent", SAL_INFO( "vcl.debugevent",
"Injected key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec "Injected key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec
<< " -> " << bHandled << " -> " << bHandled
<< " win " << pWindow ); << " win " << pWindow );
ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYUP, &aKeyEvent ); ImplWindowFrameProc( pWindow, SALEVENT_KEYUP, &aKeyEvent );
} }
/* /*
...@@ -242,13 +242,13 @@ void DebugEventInjector::InjectKeyNavEdit() ...@@ -242,13 +242,13 @@ void DebugEventInjector::InjectKeyNavEdit()
aKeyEvent.mnCharCode = 0x0; // hopefully unused. aKeyEvent.mnCharCode = 0x0; // hopefully unused.
bool bHandled = ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYINPUT, &aKeyEvent ); bool bHandled = ImplWindowFrameProc( pWindow, SALEVENT_KEYINPUT, &aKeyEvent );
SAL_INFO( "vcl.debugevent", SAL_INFO( "vcl.debugevent",
"Injected edit / move key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec "Injected edit / move key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec
<< " -> " << bHandled << " -> " << bHandled
<< " win " << pWindow ); << " win " << pWindow );
ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYUP, &aKeyEvent ); ImplWindowFrameProc( pWindow, SALEVENT_KEYUP, &aKeyEvent );
} }
void DebugEventInjector::Invoke() void DebugEventInjector::Invoke()
......
...@@ -2325,8 +2325,7 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow, ...@@ -2325,8 +2325,7 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow,
} }
} }
bool ImplWindowFrameProc( vcl::Window* _pWindow, SalFrame* /*pFrame*/, bool ImplWindowFrameProc( vcl::Window* _pWindow, sal_uInt16 nEvent, const void* pEvent )
sal_uInt16 nEvent, const void* pEvent )
{ {
DBG_TESTSOLARMUTEX(); DBG_TESTSOLARMUTEX();
......
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