diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/svapp.cxx | 21 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 20 |
2 files changed, 21 insertions, 20 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 10458ef5b44d..78552605b7eb 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1653,4 +1653,25 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM return pSVData->mpDefInst->createFolderPicker( xSM ); } +// helper method to allow inline constructor even for pWindow!=NULL case +void ImplDelData::AttachToWindow( const Window* pWindow ) +{ + if( pWindow ) + const_cast<Window*>(pWindow)->ImplAddDel( this ); +} + +// define dtor for ImplDelData +ImplDelData::~ImplDelData() +{ + // #112873# auto remove of ImplDelData + // due to this code actively calling ImplRemoveDel() is not mandatory anymore + if( !mbDel && mpWindow ) + { + // the window still exists but we were not removed + const_cast<Window*>(mpWindow)->ImplRemoveDel( this ); + mpWindow = NULL; + } +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 047b447ba343..85d30900d8b5 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -296,26 +296,6 @@ WindowImpl::~WindowImpl() delete mpControlFont; } -// helper method to allow inline constructor even for pWindow!=NULL case -void ImplDelData::AttachToWindow( const Window* pWindow ) -{ - if( pWindow ) - const_cast<Window*>(pWindow)->ImplAddDel( this ); -} - -// define dtor for ImplDelData -ImplDelData::~ImplDelData() -{ - // #112873# auto remove of ImplDelData - // due to this code actively calling ImplRemoveDel() is not mandatory anymore - if( !mbDel && mpWindow ) - { - // the window still exists but we were not removed - const_cast<Window*>(mpWindow)->ImplRemoveDel( this ); - mpWindow = NULL; - } -} - #ifdef DBG_UTIL const char* ImplDbgCheckWindow( const void* pObj ) { |