vcl/win/dtrans/MtaOleClipb.cxx | 26 ++++++++++---------------- vcl/win/dtrans/MtaOleClipb.hxx | 2 -- 2 files changed, 10 insertions(+), 18 deletions(-)
New commits: commit eb06e4ff60f6fb7552d39374fd4fcc1681030857 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Jul 30 15:33:34 2025 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Jul 30 16:12:42 2025 +0200 Inline CMtaOleClipboard::run Change-Id: Id4b937fa89117b618002eacedd2ba3eace598d01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188593 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/vcl/win/dtrans/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx index 1c4564fbb78f..879ef6681a2e 100644 --- a/vcl/win/dtrans/MtaOleClipb.cxx +++ b/vcl/win/dtrans/MtaOleClipb.cxx @@ -566,19 +566,24 @@ void CMtaOleClipboard::createMtaOleReqWnd( ) g_szWndClsName, nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, pSalData->mhInst, nullptr ); } -unsigned int CMtaOleClipboard::run( ) +unsigned __stdcall CMtaOleClipboard::oleThreadProc(void* pParam) { + osl_setThreadName("CMtaOleClipboard::oleThreadProc()"); + + CMtaOleClipboard* pInst = static_cast<CMtaOleClipboard*>(pParam); + assert(pInst); + HRESULT hr = OleInitialize( nullptr ); OSL_ASSERT( SUCCEEDED( hr ) ); - createMtaOleReqWnd( ); + pInst->createMtaOleReqWnd(); unsigned int nRet = ~0U; // = error - if ( IsWindow( m_hwndMtaOleReqWnd ) ) + if (IsWindow(pInst->m_hwndMtaOleReqWnd)) { - if ( nullptr != m_hEvtThrdReady ) - SetEvent( m_hEvtThrdReady ); + if (nullptr != pInst->m_hEvtThrdReady) + SetEvent(pInst->m_hEvtThrdReady); nRet = 0; @@ -606,17 +611,6 @@ unsigned int CMtaOleClipboard::run( ) return nRet; } -unsigned __stdcall CMtaOleClipboard::oleThreadProc( void* pParam ) -{ - osl_setThreadName("CMtaOleClipboard::run()"); - - CMtaOleClipboard* pInst = - static_cast<CMtaOleClipboard*>( pParam ); - OSL_ASSERT( nullptr != pInst ); - - return pInst->run( ); -} - unsigned __stdcall CMtaOleClipboard::clipboardChangedNotifierThreadProc(void* pParam) { osl_setThreadName("CMtaOleClipboard::clipboardChangedNotifierThreadProc()"); diff --git a/vcl/win/dtrans/MtaOleClipb.hxx b/vcl/win/dtrans/MtaOleClipb.hxx index ec2bb477cac7..0f2790f75f1b 100644 --- a/vcl/win/dtrans/MtaOleClipb.hxx +++ b/vcl/win/dtrans/MtaOleClipb.hxx @@ -51,8 +51,6 @@ public: void registerClipViewer(LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback); private: - unsigned int run( ); - // create a hidden window which serves as a request target; so we // guarantee synchronization void createMtaOleReqWnd( );