summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 11:27:10 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:37:44 +0100
commit61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch)
tree77a28e38763bc5f9d95e2c278601d31dc6fbf65d /fpicker
parentf1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff)
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/PlacesListBox.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index e795d539619b..2d9f04e3c929 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -194,7 +194,7 @@ IMPL_LINK ( PlacesListBox, DoubleClick, void*, EMPTYARG )
PlacePtr pPlace = maPlaces[nSelected];
if ( pPlace->IsEditable() == true && !pPlace->IsLocal( ) )
{
- VclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(mpDlg, pPlace));
+ ScopedVclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(mpDlg, pPlace));
short aRetCode = aDlg->Execute();
switch(aRetCode) {
case RET_OK :
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index b1c1412eb9cd..55bfcdd7c2c4 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -681,7 +681,7 @@ IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG )
SmartContent aContent( pThis->_pFileView->GetViewURL( ) );
OUString aTitle;
aContent.getTitle( aTitle );
- VclPtr<QueryFolderNameDialog> aDlg(new QueryFolderNameDialog(pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER)) );
+ ScopedVclPtr<QueryFolderNameDialog> aDlg(new QueryFolderNameDialog(pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER)) );
bool bHandled = false;
while ( !bHandled )
@@ -1065,7 +1065,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
"$filename$",
aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)
);
- VclPtr<MessageDialog> aBox(new MessageDialog(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( aBox->Execute() != RET_YES )
return 0;
}
@@ -1110,7 +1110,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
}
sError = sError.replaceFirst( "$name$", sInvalidFile );
- VclPtr<MessageDialog> aError(new MessageDialog(pThis, sError));
+ ScopedVclPtr<MessageDialog> aError(new MessageDialog(pThis, sError));
aError->Execute();
return 0;
}
@@ -1263,7 +1263,7 @@ IMPL_STATIC_LINK ( SvtFileDialog, ConnectToServerPressed_Hdl, void*, EMPTYARG )
{
pThis->_pFileView->EndInplaceEditing( false );
- VclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(pThis));
+ ScopedVclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(pThis));
short aRetCode = aDlg->Execute();
switch (aRetCode) {
@@ -1899,7 +1899,7 @@ short SvtFileDialog::PrepareExecute()
if ( bEmpty )
{
- VclPtr<MessageDialog> aBox(new MessageDialog(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE)));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE)));
aBox->Execute();
return 0;
}