Kaydet (Commit) 5fc51f8d authored tarafından Noel Grandin's avatar Noel Grandin

use unique_ptr for pImpl in ucbhelper/

Change-Id: Ibae75fc4d843bd38179d4c7afc6ddb532835c7a6
üst edc264d1
......@@ -23,6 +23,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <ucbhelper/ucbhelperdllapi.h>
#include <cppuhelper/implbase1.hxx>
#include <memory>
namespace ucbhelper
{
......@@ -36,7 +37,7 @@ struct CommandEnvironment_Impl;
class UCBHELPER_DLLPUBLIC CommandEnvironment :
public cppu::WeakImplHelper1< css::ucb::XCommandEnvironment >
{
CommandEnvironment_Impl* m_pImpl;
std::unique_ptr<CommandEnvironment_Impl> m_pImpl;
private:
CommandEnvironment( const CommandEnvironment& ) = delete;
......
......@@ -38,6 +38,7 @@
#include <rtl/ref.hxx>
#include <ucbhelper/macros.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
#include <memory>
namespace com { namespace sun { namespace star { namespace ucb {
struct CommandInfo;
......@@ -96,7 +97,7 @@ class UCBHELPER_DLLPUBLIC ContentImplHelper :
friend class PropertySetInfo;
friend class CommandProcessorInfo;
ucbhelper_impl::ContentImplHelper_Impl* m_pImpl;
std::unique_ptr<ucbhelper_impl::ContentImplHelper_Impl> m_pImpl;
protected:
osl::Mutex m_aMutex;
......
......@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/ucb/XContentIdentifier.hpp>
#include <ucbhelper/ucbhelperdllapi.h>
#include <memory>
namespace ucbhelper
......@@ -74,7 +75,7 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
private:
ContentIdentifier_Impl* m_pImpl;
std::unique_ptr<ContentIdentifier_Impl> m_pImpl;
};
} /* namespace ucbhelper */
......
......@@ -32,6 +32,7 @@
#include <rtl/ref.hxx>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
#include <memory>
namespace ucbhelper {
......@@ -63,7 +64,7 @@ class UCBHELPER_DLLPUBLIC InteractionRequest : public cppu::OWeakObject,
public css::lang::XTypeProvider,
public css::task::XInteractionRequest
{
InteractionRequest_Impl * m_pImpl;
std::unique_ptr<InteractionRequest_Impl> m_pImpl;
protected:
void setRequest( const css::uno::Any & rRequest );
......@@ -151,7 +152,7 @@ struct InteractionContinuation_Impl;
*/
class UCBHELPER_DLLPUBLIC InteractionContinuation : public cppu::OWeakObject
{
InteractionContinuation_Impl * m_pImpl;
std::unique_ptr<InteractionContinuation_Impl> m_pImpl;
protected:
/**
......
......@@ -21,6 +21,7 @@
#define INCLUDED_UCBHELPER_PROVIDERHELPER_HXX
#include <list>
#include <memory>
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
......@@ -70,7 +71,7 @@ class UCBHELPER_DLLPUBLIC ContentProviderImplHelper : public cppu::OWeakObject,
{
friend class ContentImplHelper;
ucbhelper_impl::ContentProviderImplHelper_Impl* m_pImpl;
std::unique_ptr<ucbhelper_impl::ContentProviderImplHelper_Impl> m_pImpl;
protected:
osl::Mutex m_aMutex;
......
......@@ -37,6 +37,7 @@
#include <cppuhelper/weak.hxx>
#include <ucbhelper/macros.hxx>
#include <ucbhelper/ucbhelperdllapi.h>
#include <memory>
namespace ucbhelper {
......@@ -70,7 +71,7 @@ class UCBHELPER_DLLPUBLIC ResultSet :
public css::sdbc::XCloseable,
public css::beans::XPropertySet
{
ResultSet_Impl* m_pImpl;
std::unique_ptr<ResultSet_Impl> m_pImpl;
public:
/**
......
......@@ -21,6 +21,7 @@
#define INCLUDED_UCBHELPER_RESULTSETMETADATA_HXX
#include <vector>
#include <memory>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/lang/XTypeProvider.hpp>
......@@ -141,7 +142,7 @@ class UCBHELPER_DLLPUBLIC ResultSetMetaData :
public css::sdbc::XResultSetMetaData
{
private:
ucbhelper_impl::ResultSetMetaData_Impl* m_pImpl;
std::unique_ptr<ucbhelper_impl::ResultSetMetaData_Impl> m_pImpl;
protected:
css::uno::Reference< css::uno::XComponentContext > m_xContext;
......
......@@ -55,15 +55,14 @@ struct CommandEnvironment_Impl
CommandEnvironment::CommandEnvironment(
const Reference< XInteractionHandler >& rxInteractionHandler,
const Reference< XProgressHandler >& rxProgressHandler )
: m_pImpl( new CommandEnvironment_Impl( rxInteractionHandler,
rxProgressHandler ) )
{
m_pImpl = new CommandEnvironment_Impl( rxInteractionHandler,
rxProgressHandler );
}
// virtual
CommandEnvironment::~CommandEnvironment()
{
delete m_pImpl;
}
// XCommandEnvironemnt methods.
......
......@@ -136,7 +136,6 @@ ContentImplHelper::ContentImplHelper(
// virtual
ContentImplHelper::~ContentImplHelper()
{
delete m_pImpl;
}
void SAL_CALL ContentImplHelper::acquire()
......
......@@ -82,15 +82,14 @@ ContentIdentifier_Impl::ContentIdentifier_Impl(const OUString& rURL )
ContentIdentifier::ContentIdentifier( const OUString& rURL )
: m_pImpl( new ContentIdentifier_Impl( rURL ) )
{
m_pImpl = new ContentIdentifier_Impl( rURL );
}
// virtual
ContentIdentifier::~ContentIdentifier()
{
delete m_pImpl;
}
......
......@@ -75,7 +75,6 @@ InteractionRequest::InteractionRequest( const uno::Any & rRequest )
// virtual
InteractionRequest::~InteractionRequest()
{
delete m_pImpl;
}
......@@ -222,7 +221,6 @@ InteractionContinuation::InteractionContinuation(
// virtual
InteractionContinuation::~InteractionContinuation()
{
delete m_pImpl;
}
......
......@@ -67,7 +67,6 @@ ContentProviderImplHelper::ContentProviderImplHelper(
// virtual
ContentProviderImplHelper::~ContentProviderImplHelper()
{
delete m_pImpl;
}
// XInterface
......
......@@ -228,7 +228,6 @@ ResultSet::ResultSet(
// virtual
ResultSet::~ResultSet()
{
delete m_pImpl;
}
......
......@@ -111,7 +111,6 @@ ResultSetMetaData::ResultSetMetaData(
// virtual
ResultSetMetaData::~ResultSetMetaData()
{
delete m_pImpl;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment