summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-02-21 14:33:44 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-02-21 14:35:52 +0900
commit5f17e5eaad665337c7d8b7f05a61adc21d80a073 (patch)
treefa653f05c3724046dc9bd373f1e66fd462f282b3
parent24dd10c727ab2d7a38368292498520e11d98e3cb (diff)
Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I674b7ee507258555b667657a13db6fda9b8d8372
-rw-r--r--desktop/source/app/officeipcthread.cxx4
-rw-r--r--extensions/source/propctrlr/browserview.cxx4
-rw-r--r--forms/source/component/ImageControl.cxx4
-rw-r--r--forms/source/misc/InterfaceContainer.cxx18
-rw-r--r--forms/source/xforms/submission.cxx5
-rw-r--r--forms/source/xforms/submission/submission.hxx2
-rw-r--r--forms/source/xforms/submission/submission_get.cxx6
-rw-r--r--fpicker/source/office/asyncfilepicker.cxx4
-rw-r--r--package/source/zippackage/ZipPackage.cxx4
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx2
-rw-r--r--package/source/zippackage/zipfileaccess.cxx2
-rw-r--r--reportdesign/inc/UndoActions.hxx1
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx2
-rw-r--r--sal/workben/clipboardwben/testcopy/XTDataObject.cxx1
-rw-r--r--salhelper/qa/test_api.cxx4
15 files changed, 24 insertions, 39 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index f3e46ec7a0a4..44d8c893bb6f 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -23,7 +23,7 @@
#include "officeipcthread.hxx"
#include "cmdlineargs.hxx"
#include "dispatchwatcher.hxx"
-#include <memory>
+#include <boost/scoped_ptr.hpp>
#include <stdio.h>
#include <osl/process.h>
#include <unotools/bootstrap.hxx>
@@ -713,7 +713,7 @@ void OfficeIPCThread::execute()
if (aArguments.isEmpty())
continue;
- std::auto_ptr< CommandLineArgs > aCmdLineArgs;
+ boost::scoped_ptr< CommandLineArgs > aCmdLineArgs;
try
{
Parser p(aArguments);
diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx
index d6071348e737..cec411bb3273 100644
--- a/extensions/source/propctrlr/browserview.cxx
+++ b/extensions/source/propctrlr/browserview.cxx
@@ -21,7 +21,7 @@
#include "propertyeditor.hxx"
#include "propctrlr.hrc"
#include <tools/debug.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
//............................................................................
namespace pcr
@@ -67,7 +67,7 @@ namespace pcr
sal_uInt16 nTmpPage = m_pPropBox->GetCurPage();
if (nTmpPage)
m_nActivePage = nTmpPage;
- ::std::auto_ptr<Window> aTemp(m_pPropBox);
+ boost::scoped_ptr<Window> aTemp(m_pPropBox);
m_pPropBox = NULL;
}
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index fe648ab9e6b2..c959ab9c7dd6 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -56,7 +56,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <svl/urihelper.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
#define ID_OPEN_GRAPHICS 1
#define ID_CLEAR_GRAPHICS 2
@@ -412,7 +412,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator )
{
// create a stream for the image specified by the URL
- ::std::auto_ptr< SvStream > pImageStream;
+ boost::scoped_ptr< SvStream > pImageStream;
Reference< XInputStream > xImageStream;
if ( ::svt::GraphicAccess::isSupportedURL( _rURL ) )
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index f76f8a0a2c93..7954470c3193 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -45,7 +45,7 @@
#include <tools/diagnose_ex.h>
#include <algorithm>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
//.........................................................................
#include <com/sun/star/frame/XModel.hpp>
@@ -809,9 +809,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
// SYNCHRONIZED ----->
::osl::ClearableMutexGuard aGuard( m_rMutex );
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< ElementDescription > aAutoDeleteMetaData;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::scoped_ptr< ElementDescription > aAutoDeleteMetaData;
ElementDescription* pElementMetaData = _pApprovalResult;
if ( !pElementMetaData )
{ // not yet approved by the caller -> do ourself
@@ -819,9 +817,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
DBG_ASSERT( pElementMetaData, "OInterfaceContainer::implInsert: createElementMetaData returned nonsense!" );
// ensure that the meta data structure will be deleted later on
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- aAutoDeleteMetaData = ::std::auto_ptr< ElementDescription >( pElementMetaData );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ aAutoDeleteMetaData.reset( pElementMetaData );
// will throw an exception if necessary
approveNewElement( _rxElement, pElementMetaData );
@@ -961,9 +957,7 @@ void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any
OSL_PRECOND( ( _nIndex >= 0 ) && ( _nIndex < (sal_Int32)m_aItems.size() ), "OInterfaceContainer::implReplaceByIndex: precondition not met (index)!" );
// approve the new object
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< ElementDescription > aElementMetaData( createElementMetaData() );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::scoped_ptr< ElementDescription > aElementMetaData( createElementMetaData() );
DBG_ASSERT( aElementMetaData.get(), "OInterfaceContainer::implReplaceByIndex: createElementMetaData returned nonsense!" );
{
Reference< XPropertySet > xElementProps;
@@ -1111,9 +1105,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const OUString& _rName, const An
{
Reference< XPropertySet > xElementProps;
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr< ElementDescription > aElementMetaData( createElementMetaData() );
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::scoped_ptr< ElementDescription > aElementMetaData( createElementMetaData() );
DBG_ASSERT( aElementMetaData.get(), "OInterfaceContainer::insertByName: createElementMetaData returned nonsense!" );
// ensure the correct name of the element
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index 1559bb8756a0..83ca748b5a56 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -52,7 +52,7 @@
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/processfactory.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
@@ -76,7 +76,6 @@ using com::sun::star::frame::XFrame;
using xforms::Submission;
using xforms::Model;
using xforms::MIP;
-using std::auto_ptr;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -310,7 +309,7 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
xResult, aMethod.equalsIgnoreAsciiCase("get"));
// submit result; set encoding, etc.
- auto_ptr<CSubmission> xSubmission;
+ boost::scoped_ptr<CSubmission> xSubmission;
if (aMethod.equalsIgnoreAsciiCase("PUT"))
xSubmission.reset(new CSubmissionPut( getAction(), aFragment));
else if (aMethod.equalsIgnoreAsciiCase("post"))
diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx
index e70df209c90c..b3b486e992ce 100644
--- a/forms/source/xforms/submission/submission.hxx
+++ b/forms/source/xforms/submission/submission.hxx
@@ -46,6 +46,8 @@
#include "serialization.hxx"
+#include <memory>
+
namespace CSS = com::sun::star;
class CSubmissionPut;
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index 4698241e6ab0..119186addf49 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -18,8 +18,6 @@
*/
-#include <memory>
-
#include "submission_get.hxx"
#include "serialization_app_xml.hxx"
#include "serialization_urlencoded.hxx"
@@ -32,6 +30,8 @@
#include <com/sun/star/io/Pipe.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
+#include <boost/scoped_ptr.hpp>
+
using namespace CSS::uno;
using namespace CSS::ucb;
using namespace CSS::task;
@@ -50,7 +50,7 @@ CSubmissionGet::CSubmissionGet(const OUString& aURL, const CSS::uno::Reference<
CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& aInteractionHandler)
{
// GET always uses apllicatin/x-www-formurlencoded
- auto_ptr< CSerialization > apSerialization(new CSerializationURLEncoded());
+ boost::scoped_ptr< CSerialization > apSerialization(new CSerializationURLEncoded());
apSerialization->setSource(m_aFragment);
apSerialization->serialize();
diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx
index d296ad915a0b..012bad46a8b3 100644
--- a/fpicker/source/office/asyncfilepicker.cxx
+++ b/fpicker/source/office/asyncfilepicker.cxx
@@ -23,7 +23,7 @@
#include "svtools/fileview.hxx"
#include <tools/debug.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
//........................................................................
namespace svt
@@ -103,7 +103,7 @@ namespace svt
if ( nMaxTimeout <= nMinTimeout )
nMaxTimeout = nMinTimeout + 30000;
- ::std::auto_ptr< FileViewAsyncAction > pActionDescriptor;
+ boost::scoped_ptr< FileViewAsyncAction > pActionDescriptor;
if ( nMinTimeout )
{
pActionDescriptor.reset( new FileViewAsyncAction );
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 46ce17db5ad0..e1cf3f781266 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -67,7 +67,7 @@
#include "com/sun/star/io/XAsyncOutputMonitor.hpp"
#include <cstring>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
#include <vector>
#include <ucbhelper/fileidentifierconverter.hxx>
@@ -505,7 +505,7 @@ void ZipPackage::parseContentType()
void ZipPackage::getZipFileContents()
{
- auto_ptr < ZipEnumeration > pEnum ( m_pZipFile->entries() );
+ boost::scoped_ptr < ZipEnumeration > pEnum ( m_pZipFile->entries() );
ZipPackageStream *pPkgStream;
ZipPackageFolder *pPkgFolder, *pCurrent;
OUString sTemp, sDirName;
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 7dbd7406a895..2f0013e2bc43 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -37,7 +37,7 @@
#include <EncryptedDataHeader.hxx>
#include <rtl/random.h>
#include <rtl/instance.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
using namespace com::sun::star;
using namespace com::sun::star::packages::zip::ZipConstants;
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 7648beeb901a..8db659fd7d59 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -33,8 +33,6 @@
#include <ucbhelper/content.hxx>
#include <rtl/ref.hxx>
-#include <memory>
-
using namespace ::com::sun::star;
#if OSL_DEBUG_LEVEL > 0
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 1bcb131e3975..34c4155396b6 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -44,7 +44,6 @@
#include <svx/svdundo.hxx>
#include <functional>
-#include <memory>
namespace dbaui
{
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 97eca0576b5b..95750f21f3cb 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -43,8 +43,6 @@
#include <cppuhelper/supportsservice.hxx>
-#include <memory>
-
namespace rptui
{
using namespace svt;
diff --git a/sal/workben/clipboardwben/testcopy/XTDataObject.cxx b/sal/workben/clipboardwben/testcopy/XTDataObject.cxx
index 5408fe131c1c..317bc460273a 100644
--- a/sal/workben/clipboardwben/testcopy/XTDataObject.cxx
+++ b/sal/workben/clipboardwben/testcopy/XTDataObject.cxx
@@ -23,7 +23,6 @@
#include <windows.h>
#include <ole2.h>
-#include <memory>
//------------------------------------------------------------------------
// namespace directives
diff --git a/salhelper/qa/test_api.cxx b/salhelper/qa/test_api.cxx
index 8b98ef3489e0..c9d88005b4a5 100644
--- a/salhelper/qa/test_api.cxx
+++ b/salhelper/qa/test_api.cxx
@@ -57,8 +57,6 @@ std::type_info const & getSimpleReferenceObjectTypeInfo()
#include <cppunit/plugin/TestPlugIn.h>
#include <boost/scoped_ptr.hpp>
-#include <memory>
-
namespace {
class DerivedCondition: public salhelper::Condition {
@@ -110,7 +108,7 @@ public:
void Test::testCondition() {
osl::Mutex mutex;
- std::auto_ptr< salhelper::Condition > p(new DerivedCondition(mutex));
+ boost::scoped_ptr< salhelper::Condition > p(new DerivedCondition(mutex));
CPPUNIT_ASSERT(typeid (*p.get()) != typeid (salhelper::Condition));
CPPUNIT_ASSERT(typeid (p.get()) == typeid (salhelper::Condition *));
CPPUNIT_ASSERT(