diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-11 14:07:37 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-13 08:13:53 +1000 |
commit | 0fe375a17d42e3214ef23f2ff5b5f88edc4f0338 (patch) | |
tree | 7ef7d09602350f1513e2c3e5a523543bc495e25c /vcl/source/app | |
parent | bf703a7ef97008a19b7cd725acd98e3b86889283 (diff) |
vcl: Move ImplDelData functions to app/svdata.cxx
Change-Id: I5b0ef6a1ab77dec1aef0feb0a64d985c1a44820c
Diffstat (limited to 'vcl/source/app')
-rw-r--r-- | vcl/source/app/svapp.cxx | 21 |
1 files changed, 21 insertions, 0 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: */ |