diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /fpicker | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/PlacesListBox.cxx | 8 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 26 |
2 files changed, 17 insertions, 17 deletions
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx index bed0b1a4eda7..35d84aa57edd 100644 --- a/fpicker/source/office/PlacesListBox.cxx +++ b/fpicker/source/office/PlacesListBox.cxx @@ -193,13 +193,13 @@ IMPL_LINK ( PlacesListBox, DoubleClick, void*, EMPTYARG ) PlacePtr pPlace = maPlaces[nSelected]; if ( pPlace->IsEditable() == true && !pPlace->IsLocal( ) ) { - PlaceEditDialog aDlg( mpDlg, pPlace ); - short aRetCode = aDlg.Execute(); + VclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(mpDlg, pPlace)); + short aRetCode = aDlg->Execute(); switch(aRetCode) { case RET_OK : { - pPlace->SetName ( aDlg.GetServerName() ); - pPlace->SetUrl( aDlg.GetServerUrl() ); + pPlace->SetName ( aDlg->GetServerName() ); + pPlace->SetUrl( aDlg->GetServerUrl() ); mbUpdated = true; break; } diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 01d7e6cbfce2..2991262b781c 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -668,17 +668,17 @@ IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG ) SmartContent aContent( pThis->_pFileView->GetViewURL( ) ); OUString aTitle; aContent.getTitle( aTitle ); - QueryFolderNameDialog aDlg( pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER) ); + VclPtr<QueryFolderNameDialog> aDlg(new QueryFolderNameDialog(pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER)) ); bool bHandled = false; while ( !bHandled ) { - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { - OUString aUrl = aContent.createFolder( aDlg.GetName( ) ); + OUString aUrl = aContent.createFolder( aDlg->GetName( ) ); if ( !aUrl.isEmpty( ) ) { - pThis->_pFileView->CreatedFolder( aUrl, aDlg.GetName() ); + pThis->_pFileView->CreatedFolder( aUrl, aDlg->GetName() ); bHandled = true; } } @@ -1052,8 +1052,8 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) "$filename$", aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET) ); - MessageDialog aBox(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aBox.Execute() != RET_YES ) + VclPtr<MessageDialog> aBox(new MessageDialog(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( aBox->Execute() != RET_YES ) return 0; } else @@ -1097,8 +1097,8 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) } sError = sError.replaceFirst( "$name$", sInvalidFile ); - MessageDialog aError(pThis, sError); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(pThis, sError)); + aError->Execute(); return 0; } } @@ -1250,13 +1250,13 @@ IMPL_STATIC_LINK ( SvtFileDialog, ConnectToServerPressed_Hdl, void*, EMPTYARG ) { pThis->_pFileView->EndInplaceEditing( false ); - PlaceEditDialog aDlg( pThis ); - short aRetCode = aDlg.Execute(); + VclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(pThis)); + short aRetCode = aDlg->Execute(); switch (aRetCode) { case RET_OK : { - PlacePtr newPlace = aDlg.GetPlace(); + PlacePtr newPlace = aDlg->GetPlace(); pThis->_pImp->_pPlaces->AppendPlace(newPlace); break; @@ -1886,8 +1886,8 @@ short SvtFileDialog::PrepareExecute() if ( bEmpty ) { - MessageDialog aBox(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE)); - aBox.Execute(); + VclPtr<MessageDialog> aBox(new MessageDialog(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE))); + aBox->Execute(); return 0; } } |