summaryrefslogtreecommitdiff
path: root/forms
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 /forms
parent24dd10c727ab2d7a38368292498520e11d98e3cb (diff)
Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I674b7ee507258555b667657a13db6fda9b8d8372
Diffstat (limited to 'forms')
-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
5 files changed, 14 insertions, 21 deletions
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();