summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-10-02 16:41:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-02 16:49:49 +0200
commit075d472a9d120431f0b8731e4dcfe3e8b4ded521 (patch)
tree90f565b0f3c4afdf3294d857969ef724e091a139
parent3e1bd6961d3317fe2bef4a34a41f5d1fc2a33008 (diff)
Use std::auto_ptr::reset where applicable
(avoids warnings about std::auto_ptr ctor being deprecated) Change-Id: I39d2d155c0bc62ca77a30c02428ea39102213f42
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx2
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--forms/source/xforms/submission.cxx9
-rw-r--r--linguistic/source/convdic.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/tool/chartlock.cxx2
-rw-r--r--sd/source/core/drawdoc.cxx6
-rw-r--r--sfx2/source/dialog/securitypage.cxx2
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx4
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--sw/source/core/undo/rolbck.cxx4
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx2
-rw-r--r--sw/source/ui/uiview/viewling.cxx4
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx8
22 files changed, 33 insertions, 38 deletions
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index a7645088fe27..b73b71d38f36 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -228,7 +228,7 @@ PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(
bool bIsPasswordToModify ) :
SfxModalDialog( pParent, CUI_RES( RID_DLG_PASSWORD_TO_OPEN_MODIFY ) )
{
- m_pImpl = std::auto_ptr< PasswordToOpenModifyDialog_Impl >(
+ m_pImpl.reset(
new PasswordToOpenModifyDialog_Impl( this, nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify ) );
FreeResource();
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8adb5c356b9b..0ece6755e06d 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -2258,7 +2258,7 @@ short OfaTreeOptionsDialog::Execute()
{
// collect all DictionaryList Events while the dialog is executed
Reference<com::sun::star::linguistic2::XSearchableDictionaryList> xDictionaryList(SvxGetDictionaryList());
- pClamp = ::std::auto_ptr< SvxDicListChgClamp >( new SvxDicListChgClamp( xDictionaryList ) );
+ pClamp.reset( new SvxDicListChgClamp( xDictionaryList ) );
}
short nRet = SfxModalDialog::Execute();
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index 95a3b65b12bc..c5868d6de365 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -60,7 +60,7 @@ DBG_NAME(OUserAdminDlg)
{
DBG_CTOR(OUserAdminDlg,NULL);
- m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxORB,_pParent,this));
+ m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,_pParent,this));
m_pImpl->setDataSourceOrName(_aDataSourceName);
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
m_pImpl->translateProperties(xDatasource, *_pItems);
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 50a86b4293e0..84088c7c3ce3 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -431,7 +431,7 @@ namespace dbaui
const Reference< XComponentContext >& _rxContext, const Any& _aDataSourceName )
:SfxTabDialog(_pParent, ModuleRes(DLG_DATABASE_ADVANCED), _pItems)
{
- m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxContext,_pParent,this));
+ m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,_pParent,this));
m_pImpl->setDataSourceOrName(_aDataSourceName);
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
m_pImpl->translateProperties(xDatasource, *_pItems);
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 285feff712e7..609cc9ae81ac 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -60,7 +60,7 @@ ODbAdminDialog::ODbAdminDialog(Window* _pParent
{
DBG_CTOR(ODbAdminDialog,NULL);
- m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxContext,this,this));
+ m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,this,this));
// add the initial tab page
AddTabPage( m_nMainPageID, OUString( ModuleRes( STR_PAGETITLE_GENERAL ) ), OConnectionTabPage::Create, NULL );
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 17a495c1e332..ae57cc294190 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -76,7 +76,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent
,m_bUIEnabled( sal_True )
{
DBG_CTOR(ODbTypeWizDialog,NULL);
- m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
+ m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
m_pImpl->setDataSourceOrName(_aDataSourceName);
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index f5579f6e72f9..db3c14e7221c 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -150,7 +150,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent
FreeResource();
- m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
+ m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
m_pImpl->setDataSourceOrName(_aDataSourceName);
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index 873b6c10467f..1559bb8756a0 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -312,14 +312,11 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
// submit result; set encoding, etc.
auto_ptr<CSubmission> xSubmission;
if (aMethod.equalsIgnoreAsciiCase("PUT"))
- xSubmission = auto_ptr<CSubmission>(
- new CSubmissionPut( getAction(), aFragment));
+ xSubmission.reset(new CSubmissionPut( getAction(), aFragment));
else if (aMethod.equalsIgnoreAsciiCase("post"))
- xSubmission = auto_ptr<CSubmission>(
- new CSubmissionPost( getAction(), aFragment));
+ xSubmission.reset(new CSubmissionPost( getAction(), aFragment));
else if (aMethod.equalsIgnoreAsciiCase("get"))
- xSubmission = auto_ptr<CSubmission>(
- new CSubmissionGet( getAction(), aFragment));
+ xSubmission.reset(new CSubmissionGet( getAction(), aFragment));
else
{
OSL_FAIL("Unsupported xforms submission method");
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 539f884a65f0..66c657eb6db3 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -176,9 +176,9 @@ ConvDic::ConvDic(
aMainURL = rMainURL;
if (bBiDirectional)
- pFromRight = std::auto_ptr< ConvMap >( new ConvMap );
+ pFromRight.reset( new ConvMap );
if (nLang == LANGUAGE_CHINESE_SIMPLIFIED || nLang == LANGUAGE_CHINESE_TRADITIONAL)
- pConvPropType = std::auto_ptr< PropTypeMap >( new PropTypeMap );
+ pConvPropType.reset( new PropTypeMap );
nMaxLeftCharCount = nMaxRightCharCount = 0;
bMaxCharCountIsValid = sal_True;
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index ffcfbc20fad8..f489319fa89e 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -121,7 +121,7 @@ OReportSection::~OReportSection()
if ( m_pReportListener.is() )
m_pReportListener->dispose();
- m_pFunc = ::std::auto_ptr<DlgEdFunc>();
+ m_pFunc.reset();
{
::std::auto_ptr<OSectionView> aTemp( m_pView);
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index cd09ffbd82b2..1086bd166d9b 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -237,7 +237,7 @@ ScDocument::ScDocument( ScDocumentMode eMode,
pDBCollection = new ScDBCollection(this);
pSelectionAttr = NULL;
pChartCollection = new ScChartCollection;
- apTemporaryChartLock = std::auto_ptr< ScTemporaryChartLock >( new ScTemporaryChartLock(this) );
+ apTemporaryChartLock.reset( new ScTemporaryChartLock(this) );
xColNameRanges = new ScRangePairList;
xRowNameRanges = new ScRangePairList;
ImplCreateOptions();
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index dfc2b5c20f97..b63d3b93bd7c 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -158,7 +158,7 @@ ScTemporaryChartLock::~ScTemporaryChartLock()
void ScTemporaryChartLock::StartOrContinueLocking()
{
if(!mapScChartLockGuard.get())
- mapScChartLockGuard = std::auto_ptr< ScChartLockGuard >( new ScChartLockGuard(mpDoc) );
+ mapScChartLockGuard.reset( new ScChartLockGuard(mpDoc) );
maTimer.Start();
}
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 2d23bbda4524..e252589febad 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -173,10 +173,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
, mpMasterPageListWatcher(0)
, mbUseEmbedFonts(false)
{
- mpDrawPageListWatcher = ::std::auto_ptr<ImpDrawPageListWatcher>(
- new ImpDrawPageListWatcher(*this));
- mpMasterPageListWatcher = ::std::auto_ptr<ImpMasterPageListWatcher>(
- new ImpMasterPageListWatcher(*this));
+ mpDrawPageListWatcher.reset(new ImpDrawPageListWatcher(*this));
+ mpMasterPageListWatcher.reset(new ImpMasterPageListWatcher(*this));
InitLayoutVector();
InitObjectVector();
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index e8130f44e062..fba3f5c718ed 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -430,7 +430,7 @@ SfxTabPage* SfxSecurityPage::Create( Window * pParent, const SfxItemSet & rItemS
SfxSecurityPage::SfxSecurityPage( Window* pParent, const SfxItemSet& rItemSet )
: SfxTabPage(pParent, "SecurityInfoPage", "sfx/ui/securityinfopage.ui", rItemSet)
{
- m_pImpl = std::auto_ptr< SfxSecurityPage_Impl >(new SfxSecurityPage_Impl( *this, rItemSet ));
+ m_pImpl.reset(new SfxSecurityPage_Impl( *this, rItemSet ));
}
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index bf3d6ad66f7e..2da034a902d7 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -141,7 +141,7 @@ namespace slideshow
mxPlayerWindow.clear();
}
- mpMediaWindow = ::std::auto_ptr< SystemChildWindow >();
+ mpMediaWindow.reset();
// shutdown player
if( mxPlayer.is() )
@@ -433,7 +433,7 @@ namespace slideshow
rRangePix.getMaxX() - rRangePix.getMinX(),
rRangePix.getMaxY() - rRangePix.getMinY() );
- mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new
+ mpMediaWindow.reset( new
SystemChildWindow( pWindow, WB_CLIPCHILDREN ) );
mpMediaWindow->SetBackground( Color( COL_BLACK ) );
mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 252eed72066f..51898127f79f 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -120,7 +120,7 @@ namespace svt
DBG_NAME(EditBrowseBox);
void EditBrowseBox::impl_construct()
{
- m_aImpl = ::std::auto_ptr<EditBrowseBoxImpl>(new EditBrowseBoxImpl());
+ m_aImpl.reset(new EditBrowseBoxImpl());
SetCompoundControl(sal_True);
SetGridLineColor( Color( COL_LIGHTGRAY ) );
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 59cfec65def5..0d8295b39650 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -611,12 +611,12 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
// #111660# don't crash when nNode1 doesn't point to content node.
if(pCntntNd)
- pPam = ::std::auto_ptr<SwPaM>(new SwPaM(*pCntntNd, m_nCntnt));
+ pPam.reset(new SwPaM(*pCntntNd, m_nCntnt));
}
else
{
pMark = pMarkAccess->findMark(m_aName)->get();
- pPam = ::std::auto_ptr<SwPaM>(new SwPaM(pMark->GetMarkPos()));
+ pPam.reset(new SwPaM(pMark->GetMarkPos()));
}
if(m_bSaveOtherPos)
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index ce767bace9e7..95bac6ed83bb 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1154,7 +1154,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
break;
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
+ pWait.reset(new SwWait( *pView->GetDocShell(), sal_True ));
}
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
@@ -1382,7 +1382,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwEditShell::SplitNode();
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
+ pWait.reset(new SwWait( *pView->GetDocShell(), sal_True ));
}
if( !bSetCrsr && pMark != NULL)
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c67ef7b131ed..44ac4fe5c6ae 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1001,7 +1001,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aEntry.removeSegment();
sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE );
OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*'));
- aTempFile = std::auto_ptr< utl::TempFile >(
+ aTempFile.reset(
new utl::TempFile(sLeading,&sExt,&sPath ));
if( bAsSingleFile )
aTempFile->EnableKillingFile();
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 1d2d9fa5e0c4..fc1bf1ca5bfc 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -689,10 +689,10 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
{
sal_Int32 nPos = aPoint.nContent.GetIndex();
(void) nPos;
- pPopup = std::auto_ptr< SwSpellPopup >(new SwSpellPopup( m_pWrtShell, aGrammarCheckRes, nErrorInResult, aSuggestions, aParaText ));
+ pPopup.reset(new SwSpellPopup( m_pWrtShell, aGrammarCheckRes, nErrorInResult, aSuggestions, aParaText ));
}
else
- pPopup = std::auto_ptr< SwSpellPopup >(new SwSpellPopup( m_pWrtShell, xAlt, aParaText ));
+ pPopup.reset(new SwSpellPopup( m_pWrtShell, xAlt, aParaText ));
ui::ContextMenuExecuteEvent aEvent;
const Point aPixPos = GetEditWin().LogicToPixel( rPt );
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 86d20e220ed8..e601f2478253 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -739,7 +739,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aMergeDesc.bSendAsAttachment = bSendAsAttachment;
aMergeDesc.bCreateSingleFile = sal_False;
- pMMConfigItem = std::auto_ptr< SwMailMergeConfigItem >(new SwMailMergeConfigItem);
+ pMMConfigItem.reset(new SwMailMergeConfigItem);
aMergeDesc.pMailMergeConfigItem = pMMConfigItem.get();
aMergeDesc.xSmtpServer = SwMailMergeHelper::ConnectToSmtpServer(
*pMMConfigItem,
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index eac056cf22e0..e8aa45397125 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -361,19 +361,19 @@ BoundFrameSets::BoundFrameSets(const Reference<XInterface> xModel)
const Reference<XTextEmbeddedObjectsSupplier> xEOS(xModel, UNO_QUERY);
const Reference<XDrawPageSupplier> xDPS(xModel, UNO_QUERY);
if(xTFS.is())
- m_pTexts = auto_ptr<BoundFrames>(new BoundFrames(
+ m_pTexts.reset(new BoundFrames(
Reference<XEnumerationAccess>(xTFS->getTextFrames(), UNO_QUERY),
&lcl_TextContentsUnfiltered));
if(xGOS.is())
- m_pGraphics = auto_ptr<BoundFrames>(new BoundFrames(
+ m_pGraphics.reset(new BoundFrames(
Reference<XEnumerationAccess>(xGOS->getGraphicObjects(), UNO_QUERY),
&lcl_TextContentsUnfiltered));
if(xEOS.is())
- m_pEmbeddeds = auto_ptr<BoundFrames>(new BoundFrames(
+ m_pEmbeddeds.reset(new BoundFrames(
Reference<XEnumerationAccess>(xEOS->getEmbeddedObjects(), UNO_QUERY),
&lcl_TextContentsUnfiltered));
if(xDPS.is())
- m_pShapes = auto_ptr<BoundFrames>(new BoundFrames(
+ m_pShapes.reset(new BoundFrames(
Reference<XEnumerationAccess>(xDPS->getDrawPage(), UNO_QUERY),
&lcl_ShapeFilter));
};