[Libreoffice-commits] core.git: desktop/source extensions/source forms/source fpicker/source package/source reportdesign/inc reportdesign/source salhelper/qa sal/workben

Takeshi Abe tabe at fixedpoint.jp
Thu Feb 20 21:37:04 PST 2014


 desktop/source/app/officeipcthread.cxx              |    4 ++--
 extensions/source/propctrlr/browserview.cxx         |    4 ++--
 forms/source/component/ImageControl.cxx             |    4 ++--
 forms/source/misc/InterfaceContainer.cxx            |   18 +++++-------------
 forms/source/xforms/submission.cxx                  |    5 ++---
 forms/source/xforms/submission/submission.hxx       |    2 ++
 forms/source/xforms/submission/submission_get.cxx   |    6 +++---
 fpicker/source/office/asyncfilepicker.cxx           |    4 ++--
 package/source/zippackage/ZipPackage.cxx            |    4 ++--
 package/source/zippackage/ZipPackageFolder.cxx      |    2 +-
 package/source/zippackage/zipfileaccess.cxx         |    2 --
 reportdesign/inc/UndoActions.hxx                    |    1 -
 reportdesign/source/ui/misc/toolboxcontroller.cxx   |    2 --
 sal/workben/clipboardwben/testcopy/XTDataObject.cxx |    1 -
 salhelper/qa/test_api.cxx                           |    4 +---
 15 files changed, 24 insertions(+), 39 deletions(-)

New commits:
commit 5f17e5eaad665337c7d8b7f05a61adc21d80a073
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Feb 21 14:33:44 2014 +0900

    Replace deprecated std::auto_ptr with boost::scoped_ptr
    
    Change-Id: I674b7ee507258555b667657a13db6fda9b8d8372

diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index f3e46ec..44d8c89 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 d607134..cec411b 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 fe648ab..c959ab9 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 f76f8a0..7954470 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 1559bb8..83ca748 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 e70df20..b3b486e 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 4698241..119186a 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 d296ad9..012bad4 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 46ce17d..e1cf3f7 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 7dbd740..2f0013e 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 7648bee..8db659f 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 1bcb131..34c4155 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 97eca05..95750f2 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 5408fe1..317bc46 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 8b98ef3..c9d8800 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(


More information about the Libreoffice-commits mailing list