summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fuconnct.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-08-04 07:54:04 +0000
committerRüdiger Timm <rt@openoffice.org>2004-08-04 07:54:04 +0000
commit59d193540120259d2989fe4c929246419fd37360 (patch)
treeda181b58688f9835b117d06a59e10fa44b42cd6e /sd/source/ui/func/fuconnct.cxx
parent2f97f4dbc9d0a68412a696c9c23cc8ad135f4c9e (diff)
INTEGRATION: CWS impress18ea (1.3.164); FILE MERGED
2004/07/26 15:44:06 af 1.3.164.1: #i31643# The dialog is kept in an auto_ptr and thus deleted after its items are transferred to the view.
Diffstat (limited to 'sd/source/ui/func/fuconnct.cxx')
-rw-r--r--sd/source/ui/func/fuconnct.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx
index b1756049b445..e4647cb9e4b3 100644
--- a/sd/source/ui/func/fuconnct.cxx
+++ b/sd/source/ui/func/fuconnct.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fuconnct.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2004-02-04 10:07:30 $
+ * last change: $Author: rt $ $Date: 2004-08-04 08:54:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,17 +104,18 @@ FuConnectionDlg::FuConnectionDlg (
pView->GetAttributes( aNewAttr );
const SfxItemSet* pArgs = rReq.GetArgs();
+ ::std::auto_ptr<AbstractSfxSingleTabDialog> pDlg (NULL);
if( !pArgs )
{
//CHINA001 SvxConnectionDialog* pDlg = new SvxConnectionDialog( NULL, aNewAttr, pView );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet Factory fail!");//CHINA001
- AbstractSfxSingleTabDialog * pDlg = pFact->CreateSfxSingleTabDialog( NULL,
- aNewAttr,
- pView,
- ResId(RID_SVXPAGE_CONNECTION));
- DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ pDlg.reset (pFact->CreateSfxSingleTabDialog( NULL,
+ aNewAttr,
+ pView,
+ ResId(RID_SVXPAGE_CONNECTION)));
+ DBG_ASSERT(pDlg.get()!=NULL, "Dialogdiet fail!");//CHINA001
USHORT nResult = pDlg->Execute();
switch( nResult )
@@ -127,12 +128,8 @@ FuConnectionDlg::FuConnectionDlg (
break;
default:
- {
- delete( pDlg );
- }
- return; // Abbruch
+ return; // Abbruch
}
- delete( pDlg );
}
pView->SetAttributes( *pArgs );
}