summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/bitset.hxx8
-rw-r--r--sfx2/source/appl/appcfg.cxx13
-rw-r--r--sfx2/source/appl/appchild.cxx2
-rw-r--r--sfx2/source/appl/childwin.cxx1
-rw-r--r--sfx2/source/appl/linksrc.cxx40
-rw-r--r--sfx2/source/appl/lnkbase2.cxx11
-rw-r--r--sfx2/source/bastyp/bitset.cxx17
-rw-r--r--sfx2/source/bastyp/mieclip.cxx17
-rw-r--r--sfx2/source/control/request.cxx16
-rw-r--r--sfx2/source/doc/docinsert.cxx9
-rw-r--r--sfx2/source/doc/doctemplates.cxx10
-rw-r--r--sfx2/source/doc/printhelper.cxx3
-rw-r--r--sfx2/source/doc/printhelper.hxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx1
-rw-r--r--sfx2/source/view/viewprn.cxx14
15 files changed, 62 insertions, 102 deletions
diff --git a/sfx2/inc/bitset.hxx b/sfx2/inc/bitset.hxx
index d3f3b281ca1f..d33ccf54bebe 100644
--- a/sfx2/inc/bitset.hxx
+++ b/sfx2/inc/bitset.hxx
@@ -19,12 +19,14 @@
#ifndef INCLUDED_SFX2_INC_BITSET_HXX
#define INCLUDED_SFX2_INC_BITSET_HXX
+#include <memory>
+
class IndexBitSet
{
private:
- sal_uInt16 nBlocks;
- sal_uInt16 nCount;
- sal_uInt32* pBitmap;
+ sal_uInt16 nBlocks;
+ sal_uInt16 nCount;
+ std::unique_ptr<sal_uInt32[]> pBitmap;
IndexBitSet& operator|=( sal_uInt16 nBit );
IndexBitSet& operator-=( sal_uInt16 nBit );
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index a4303961c8b2..b7e89dcd2de5 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -81,14 +81,13 @@ using namespace ::com::sun::star::beans;
class SfxEventAsyncer_Impl : public SfxListener
{
- SfxEventHint aHint;
- Idle* pIdle;
+ SfxEventHint aHint;
+ std::unique_ptr<Idle> pIdle;
public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
explicit SfxEventAsyncer_Impl(const SfxEventHint& rHint);
- virtual ~SfxEventAsyncer_Impl() override;
DECL_LINK( IdleHdl, Idle*, void );
};
@@ -108,19 +107,13 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
{
if( rHint.GetObjShell() )
StartListening( *rHint.GetObjShell() );
- pIdle = new Idle("SfxEventASyncer");
+ pIdle.reset( new Idle("SfxEventASyncer") );
pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
pIdle->SetPriority( SchedulerPriority::HIGHEST );
pIdle->Start();
}
-SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl()
-{
- delete pIdle;
-}
-
-
IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle, void)
{
SfxObjectShellRef xRef( aHint.GetObjShell() );
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index 2669ab991bae..1c36be3c1b77 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -115,7 +115,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
if ( pF )
{
if ( !pF->pArr )
- pF->pArr = new SfxChildWinContextArr_Impl;
+ pF->pArr.reset( new SfxChildWinContextArr_Impl );
pF->pArr->push_back( pFact );
return;
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index a637818b227a..54a581cad7c8 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -51,7 +51,6 @@ SfxChildWinFactory::SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID
SfxChildWinFactory::~SfxChildWinFactory()
{
- delete pArr;
}
struct SfxChildWindow_Impl
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index d146fe92c7d5..e7c5a38f97e9 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -53,14 +53,14 @@ void SvLinkSourceTimer::Invoke()
pOwner->SendDataChanged();
}
-static void StartTimer( SvLinkSourceTimer ** ppTimer, SvLinkSource * pOwner,
+static void StartTimer( std::unique_ptr<SvLinkSourceTimer>& pTimer, SvLinkSource * pOwner,
sal_uIntPtr nTimeout )
{
- if( !*ppTimer )
+ if( !pTimer )
{
- *ppTimer = new SvLinkSourceTimer( pOwner );
- (*ppTimer)->SetTimeout( nTimeout );
- (*ppTimer)->Start();
+ pTimer.reset( new SvLinkSourceTimer( pOwner ) );
+ pTimer->SetTimeout( nTimeout );
+ pTimer->Start();
}
}
@@ -182,11 +182,12 @@ struct SvLinkSource_Impl
{
SvLinkSource_Array_Impl aArr;
OUString aDataMimeType;
- SvLinkSourceTimer * pTimer;
+ std::unique_ptr<SvLinkSourceTimer>
+ pTimer;
sal_uIntPtr nTimeout;
css::uno::Reference<css::io::XInputStream>
- m_xInputStreamToLoadFrom;
- bool m_bIsReadOnly;
+ m_xInputStreamToLoadFrom;
+ bool m_bIsReadOnly;
SvLinkSource_Impl()
: pTimer(nullptr)
@@ -199,7 +200,6 @@ struct SvLinkSource_Impl
SvLinkSource_Impl::~SvLinkSource_Impl()
{
- delete pTimer;
}
SvLinkSource::SvLinkSource()
@@ -279,18 +279,14 @@ void SvLinkSource::SendDataChanged()
}
}
}
- if( pImpl->pTimer )
- {
- delete pImpl->pTimer;
- pImpl->pTimer = nullptr;
- }
+ pImpl->pTimer.reset();
pImpl->aDataMimeType.clear();
}
void SvLinkSource::NotifyDataChanged()
{
if( pImpl->nTimeout )
- StartTimer( &pImpl->pTimer, this, pImpl->nTimeout ); // New timeout
+ StartTimer( pImpl->pTimer, this, pImpl->nTimeout ); // New timeout
else
{
SvLinkSource_EntryIter_Impl aIter( pImpl->aArr );
@@ -313,11 +309,7 @@ void SvLinkSource::NotifyDataChanged()
}
}
- if( pImpl->pTimer )
- {
- delete pImpl->pTimer;
- pImpl->pTimer = nullptr;
- }
+ pImpl->pTimer.reset();
}
}
@@ -330,7 +322,7 @@ void SvLinkSource::DataChanged( const OUString & rMimeType,
{ // only when no data was included
// fire all data to the sink, independent of the requested format
pImpl->aDataMimeType = rMimeType;
- StartTimer( &pImpl->pTimer, this, pImpl->nTimeout ); // New timeout
+ StartTimer( pImpl->pTimer, this, pImpl->nTimeout ); // New timeout
}
else
{
@@ -351,11 +343,7 @@ void SvLinkSource::DataChanged( const OUString & rMimeType,
}
}
- if( pImpl->pTimer )
- {
- delete pImpl->pTimer;
- pImpl->pTimer = nullptr;
- }
+ pImpl->pTimer.reset();
}
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index fd0d8fb21e30..44f7e5e28472 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -46,7 +46,8 @@ struct BaseLink_Impl
Link<SvBaseLink&,void> m_aEndEditLink;
LinkManager* m_pLinkMgr;
VclPtr<vcl::Window> m_pParentWin;
- FileDialogHelper* m_pFileDlg;
+ std::unique_ptr<FileDialogHelper>
+ m_pFileDlg;
bool m_bIsConnect;
BaseLink_Impl() :
@@ -57,7 +58,7 @@ struct BaseLink_Impl
{}
~BaseLink_Impl()
- { delete m_pFileDlg; }
+ {}
};
// only for internal management
@@ -535,11 +536,9 @@ void SvBaseLink::Closed()
FileDialogHelper & SvBaseLink::GetInsertFileDialog(const OUString& rFactory) const
{
- if ( pImpl->m_pFileDlg )
- delete pImpl->m_pFileDlg;
- pImpl->m_pFileDlg = new FileDialogHelper(
+ pImpl->m_pFileDlg.reset( new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::Insert, rFactory);
+ FileDialogFlags::Insert, rFactory) );
return *pImpl->m_pFileDlg;
}
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index d03a7d22da9c..ac113cf0117f 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -35,9 +35,9 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit)
if ( nBlock >= nBlocks )
return *this;
- if ( (*(pBitmap+nBlock) & nBitVal) )
+ if ( pBitmap[nBlock] & nBitVal )
{
- *(pBitmap+nBlock) &= ~nBitVal;
+ pBitmap[nBlock] &= ~nBitVal;
--nCount;
}
@@ -58,16 +58,15 @@ IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit )
if ( pBitmap )
{
- memcpy( pNewMap, pBitmap, 4 * nBlocks );
- delete [] pBitmap;
+ memcpy( pNewMap, pBitmap.get(), 4 * nBlocks );
}
- pBitmap = pNewMap;
+ pBitmap.reset(pNewMap);
nBlocks = nBlock+1;
}
- if ( (*(pBitmap+nBlock) & nBitVal) == 0 )
+ if ( (pBitmap[nBlock] & nBitVal) == 0 )
{
- *(pBitmap+nBlock) |= nBitVal;
+ pBitmap[nBlock] |= nBitVal;
++nCount;
}
@@ -84,19 +83,17 @@ bool IndexBitSet::Contains( sal_uInt16 nBit ) const
if ( nBlock >= nBlocks )
return false;
- return ( nBitVal & *(pBitmap+nBlock) ) == nBitVal;
+ return ( nBitVal & pBitmap[nBlock] ) == nBitVal;
}
IndexBitSet::IndexBitSet()
{
nCount = 0;
nBlocks = 0;
- pBitmap = nullptr;
}
IndexBitSet::~IndexBitSet()
{
- delete [] pBitmap;
}
sal_uInt16 IndexBitSet::GetFreeIndex()
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index 65c2fee624a1..b9680af0a9dd 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -27,17 +27,12 @@
MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj()
{
- delete pStrm;
}
SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
{
bool bRet = false;
- if( pStrm )
- {
- delete pStrm;
- pStrm = nullptr;
- }
+ pStrm.reset();
OString sLine, sVersion;
sal_Int32 nStt = -1, nEnd = -1, nFragStart = -1, nFragEnd = -1;
@@ -78,13 +73,13 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
{
rStream.Seek( nStt );
- pStrm = new SvMemoryStream( ( nEnd - nStt < 0x10000l
+ pStrm.reset( new SvMemoryStream( ( nEnd - nStt < 0x10000l
? nEnd - nStt + 32
- : 0 ));
+ : 0 )) );
pStrm->WriteStream( rStream );
pStrm->SetStreamSize( nEnd - nStt + 1L );
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
- return pStrm;
+ return pStrm.get();
}
if (nFragStart > 0 && nFragEnd > 0 && nFragEnd > nFragStart)
@@ -93,11 +88,11 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
if (nSize < 0x10000L)
{
rStream.Seek(nFragStart);
- pStrm = new SvMemoryStream(nSize);
+ pStrm.reset( new SvMemoryStream(nSize) );
pStrm->WriteStream( rStream );
pStrm->SetStreamSize(nSize);
pStrm->Seek(STREAM_SEEK_TO_BEGIN);
- return pStrm;
+ return pStrm.get();
}
}
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index de254f1b2e8c..a7785cf2e2b6 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -64,7 +64,8 @@ struct SfxRequest_Impl: public SfxListener
bool bCancelled; // no longer notify
SfxCallMode nCallMode; // Synch/Asynch/API/Record
bool bAllowRecording;
- SfxAllItemSet* pInternalArgs;
+ std::unique_ptr<SfxAllItemSet>
+ pInternalArgs;
SfxViewFrame* pViewFrame;
css::uno::Reference< css::frame::XDispatchRecorder > xRecorder;
@@ -81,10 +82,8 @@ struct SfxRequest_Impl: public SfxListener
, bCancelled(false)
, nCallMode( SfxCallMode::SYNCHRON )
, bAllowRecording( false )
- , pInternalArgs( nullptr )
, pViewFrame(nullptr)
{}
- virtual ~SfxRequest_Impl() override { delete pInternalArgs; }
void SetPool( SfxItemPool *pNewPool );
@@ -146,7 +145,7 @@ SfxRequest::SfxRequest
pImpl->nModifier = rOrig.pImpl->nModifier;
// deep copy needed !
- pImpl->pInternalArgs = (rOrig.pImpl->pInternalArgs ? new SfxAllItemSet(*rOrig.pImpl->pInternalArgs) : nullptr);
+ pImpl->pInternalArgs.reset( rOrig.pImpl->pInternalArgs ? new SfxAllItemSet(*rOrig.pImpl->pInternalArgs) : nullptr);
if ( pArgs )
pImpl->SetPool( pArgs->GetPool() );
@@ -301,13 +300,12 @@ void SfxRequest::SetSynchronCall( bool bSynchron )
void SfxRequest::SetInternalArgs_Impl( const SfxAllItemSet& rArgs )
{
- delete pImpl->pInternalArgs;
- pImpl->pInternalArgs = new SfxAllItemSet( rArgs );
+ pImpl->pInternalArgs.reset( new SfxAllItemSet( rArgs ) );
}
const SfxItemSet* SfxRequest::GetInternalArgs_Impl() const
{
- return pImpl->pInternalArgs;
+ return pImpl->pInternalArgs.get();
}
@@ -495,7 +493,7 @@ void SfxRequest::Done( bool bRelease )
void SfxRequest::ForgetAllArgs()
{
DELETEZ( pArgs );
- DELETEZ( pImpl->pInternalArgs );
+ pImpl->pInternalArgs.reset();
}
@@ -754,7 +752,7 @@ bool SfxRequest::AllowsRecording() const
void SfxRequest::ReleaseArgs()
{
DELETEZ( pArgs );
- DELETEZ( pImpl->pInternalArgs );
+ pImpl->pInternalArgs.reset();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 36079f27ee7d..6288d5ce765c 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -63,7 +63,6 @@ DocumentInserter::DocumentInserter(
DocumentInserter::~DocumentInserter()
{
- delete m_pFileDlg;
}
void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink )
@@ -72,9 +71,9 @@ void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,voi
m_nError = ERRCODE_NONE;
if ( !m_pFileDlg )
{
- m_pFileDlg = new FileDialogHelper(
+ m_pFileDlg.reset( new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- m_nDlgFlags, m_sDocFactory );
+ m_nDlgFlags, m_sDocFactory ) );
}
m_pFileDlg->StartExecuteModal( LINK( this, DocumentInserter, DialogClosedHdl ) );
}
@@ -171,7 +170,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void
m_nError = m_pFileDlg->GetError();
if ( ERRCODE_NONE == m_nError )
- impl_FillURLList( m_pFileDlg, m_pURLList );
+ impl_FillURLList( m_pFileDlg.get(), m_pURLList );
Reference < XFilePicker2 > xFP = m_pFileDlg->GetFilePicker();
Reference < XFilePickerControlAccess > xCtrlAccess( xFP, UNO_QUERY );
@@ -267,7 +266,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void
m_sFilter = m_pFileDlg->GetRealFilter();
- m_aDialogClosedLink.Call( m_pFileDlg );
+ m_aDialogClosedLink.Call( m_pFileDlg.get() );
}
} // namespace sfx2
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index d0ecf8862f2a..48234d01bf94 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2165,11 +2165,10 @@ bool SfxDocTplService_Impl::renameTemplate( const OUString& rGroupName,
class SfxDocTplService: public ::cppu::WeakImplHelper< css::lang::XLocalizable, css::frame::XDocumentTemplates, css::lang::XServiceInfo >
{
- SfxDocTplService_Impl *pImp;
+ std::unique_ptr<SfxDocTplService_Impl> pImp;
public:
explicit SfxDocTplService( const css::uno::Reference < uno::XComponentContext >& xContext );
- virtual ~SfxDocTplService() override;
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
@@ -2218,15 +2217,10 @@ public:
SfxDocTplService::SfxDocTplService( const uno::Reference< XComponentContext >& xContext )
{
- pImp = new SfxDocTplService_Impl(xContext);
+ pImp.reset( new SfxDocTplService_Impl(xContext) );
}
-SfxDocTplService::~SfxDocTplService()
-{
- delete pImp;
-}
-
//--- XLocalizable ---
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 9da2bc273d09..8ed498457bd9 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -145,7 +145,7 @@ void SAL_CALL SfxPrintJob_Impl::cancelJob() throw (RuntimeException, std::except
SfxPrintHelper::SfxPrintHelper()
{
- m_pData = new IMPL_PrintListener_DataContainer(m_aMutex);
+ m_pData.reset(new IMPL_PrintListener_DataContainer(m_aMutex));
}
void SAL_CALL SfxPrintHelper::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw (css::uno::Exception, css::uno::RuntimeException, std::exception)
@@ -167,7 +167,6 @@ void SAL_CALL SfxPrintHelper::initialize( const css::uno::Sequence< css::uno::An
SfxPrintHelper::~SfxPrintHelper()
{
- delete m_pData;
}
namespace
diff --git a/sfx2/source/doc/printhelper.hxx b/sfx2/source/doc/printhelper.hxx
index a91e5b5c384c..6faca49f89eb 100644
--- a/sfx2/source/doc/printhelper.hxx
+++ b/sfx2/source/doc/printhelper.hxx
@@ -60,7 +60,7 @@ public:
private:
osl::Mutex m_aMutex;
- IMPL_PrintListener_DataContainer* m_pData ;
+ std::unique_ptr<IMPL_PrintListener_DataContainer> m_pData ;
void impl_setPrinter(const css::uno::Sequence< css::beans::PropertyValue >& rPrinter,
VclPtr<SfxPrinter>& pPrinter,
SfxPrinterChangeFlags& nChangeFlags,
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index a7cd7cfac138..c68a851adb4f 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -474,7 +474,6 @@ SfxBaseController::SfxBaseController( SfxViewShell* pViewShell )
SfxBaseController::~SfxBaseController()
{
- delete m_pData;
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 8ae4c73d1207..b73e1c4150ee 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -404,17 +404,17 @@ class SfxDialogExecutor_Impl
private:
SfxViewShell* _pViewSh;
VclPtr<PrinterSetupDialog> _pSetupParent;
- SfxItemSet* _pOptions;
+ std::unique_ptr<SfxItemSet> _pOptions;
bool _bHelpDisabled;
DECL_LINK( Execute, Button*, void );
public:
SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSetupDialog* pParent );
- ~SfxDialogExecutor_Impl() { delete _pOptions; }
+ ~SfxDialogExecutor_Impl() {}
Link<Button*, void> GetLink() const { return LINK(const_cast<SfxDialogExecutor_Impl*>(this), SfxDialogExecutor_Impl, Execute); }
- const SfxItemSet* GetOptions() const { return _pOptions; }
+ const SfxItemSet* GetOptions() const { return _pOptions.get(); }
void DisableHelp() { _bHelpDisabled = true; }
};
@@ -435,7 +435,7 @@ IMPL_LINK_NOARG(SfxDialogExecutor_Impl, Execute, Button*, void)
{
DBG_ASSERT( _pSetupParent, "no dialog parent" );
if( _pSetupParent )
- _pOptions = static_cast<SfxPrinter*>( _pSetupParent->GetPrinter() )->GetOptions().Clone();
+ _pOptions.reset( static_cast<SfxPrinter*>( _pSetupParent->GetPrinter() )->GetOptions().Clone() );
}
assert(_pOptions);
@@ -444,14 +444,12 @@ IMPL_LINK_NOARG(SfxDialogExecutor_Impl, Execute, Button*, void)
// Create Dialog
VclPtrInstance<SfxPrintOptionsDialog> pDlg( static_cast<vcl::Window*>(_pSetupParent),
- _pViewSh, _pOptions );
+ _pViewSh, _pOptions.get() );
if ( _bHelpDisabled )
pDlg->DisableHelp();
if ( pDlg->Execute() == RET_OK )
{
- delete _pOptions;
- _pOptions = pDlg->GetOptions().Clone();
-
+ _pOptions.reset( pDlg->GetOptions().Clone() );
}
}