[Libreoffice-commits] core.git: 5 commits - include/ucbhelper include/unotools include/vbahelper include/vcl ucbhelper/source ucb/source unotools/source uui/source vbahelper/source vcl/source writerperfect/inc writerperfect/source
Noel Grandin
noel at peralex.com
Tue Nov 17 01:00:17 PST 2015
include/ucbhelper/commandenvironment.hxx | 3 +
include/ucbhelper/contenthelper.hxx | 3 +
include/ucbhelper/contentidentifier.hxx | 3 +
include/ucbhelper/interactionrequest.hxx | 5 +--
include/ucbhelper/providerhelper.hxx | 3 +
include/ucbhelper/resultset.hxx | 3 +
include/ucbhelper/resultsetmetadata.hxx | 3 +
include/unotools/eventlisteneradapter.hxx | 6 ++-
include/unotools/misccfg.hxx | 4 --
include/unotools/searchopt.hxx | 3 +
include/vbahelper/vbaapplicationbase.hxx | 3 +
include/vcl/textview.hxx | 7 ++--
ucb/source/core/ucbstore.cxx | 4 --
ucb/source/core/ucbstore.hxx | 7 ++--
ucb/source/ucp/hierarchy/hierarchydata.cxx | 3 -
ucb/source/ucp/hierarchy/hierarchydata.hxx | 3 +
ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx | 1
ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx | 3 +
ucb/source/ucp/package/pkgdatasupplier.cxx | 1
ucb/source/ucp/package/pkgdatasupplier.hxx | 3 +
ucb/source/ucp/tdoc/tdoc_datasupplier.cxx | 1
ucb/source/ucp/tdoc/tdoc_datasupplier.hxx | 3 +
ucbhelper/source/client/commandenvironment.cxx | 5 +--
ucbhelper/source/provider/contenthelper.cxx | 1
ucbhelper/source/provider/contentidentifier.cxx | 3 -
ucbhelper/source/provider/interactionrequest.cxx | 2 -
ucbhelper/source/provider/providerhelper.cxx | 1
ucbhelper/source/provider/resultset.cxx | 1
ucbhelper/source/provider/resultsetmetadata.cxx | 1
unotools/source/config/misccfg.cxx | 34 ++++++++++-----------
unotools/source/config/searchopt.cxx | 3 -
unotools/source/misc/eventlisteneradapter.cxx | 2 -
uui/source/requeststringresolver.cxx | 1
uui/source/requeststringresolver.hxx | 3 +
vbahelper/source/vbahelper/vbaapplicationbase.cxx | 1
vcl/source/edit/textview.cxx | 1
writerperfect/inc/DirectoryStream.hxx | 5 +--
writerperfect/inc/WPXSvInputStream.hxx | 5 +--
writerperfect/source/common/DirectoryStream.cxx | 1
writerperfect/source/common/WPXSvInputStream.cxx | 1
40 files changed, 67 insertions(+), 79 deletions(-)
New commits:
commit 5fc51f8d254da21d5ed2d3fb9293020bbfbfab92
Author: Noel Grandin <noel at peralex.com>
Date: Tue Nov 17 09:52:47 2015 +0200
use unique_ptr for pImpl in ucbhelper/
Change-Id: Ibae75fc4d843bd38179d4c7afc6ddb532835c7a6
diff --git a/include/ucbhelper/commandenvironment.hxx b/include/ucbhelper/commandenvironment.hxx
index 11bc5e3..5bd8ee64 100644
--- a/include/ucbhelper/commandenvironment.hxx
+++ b/include/ucbhelper/commandenvironment.hxx
@@ -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;
diff --git a/include/ucbhelper/contenthelper.hxx b/include/ucbhelper/contenthelper.hxx
index 20b15c7..91cf993 100644
--- a/include/ucbhelper/contenthelper.hxx
+++ b/include/ucbhelper/contenthelper.hxx
@@ -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;
diff --git a/include/ucbhelper/contentidentifier.hxx b/include/ucbhelper/contentidentifier.hxx
index 29ff867..702febc 100644
--- a/include/ucbhelper/contentidentifier.hxx
+++ b/include/ucbhelper/contentidentifier.hxx
@@ -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 */
diff --git a/include/ucbhelper/interactionrequest.hxx b/include/ucbhelper/interactionrequest.hxx
index 3361ccb..03122c1 100644
--- a/include/ucbhelper/interactionrequest.hxx
+++ b/include/ucbhelper/interactionrequest.hxx
@@ -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:
/**
diff --git a/include/ucbhelper/providerhelper.hxx b/include/ucbhelper/providerhelper.hxx
index 91c76f1..0941e08 100644
--- a/include/ucbhelper/providerhelper.hxx
+++ b/include/ucbhelper/providerhelper.hxx
@@ -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;
diff --git a/include/ucbhelper/resultset.hxx b/include/ucbhelper/resultset.hxx
index 2acd65d..63dec42 100644
--- a/include/ucbhelper/resultset.hxx
+++ b/include/ucbhelper/resultset.hxx
@@ -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:
/**
diff --git a/include/ucbhelper/resultsetmetadata.hxx b/include/ucbhelper/resultsetmetadata.hxx
index 730bdf1..cda709e 100644
--- a/include/ucbhelper/resultsetmetadata.hxx
+++ b/include/ucbhelper/resultsetmetadata.hxx
@@ -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;
diff --git a/ucbhelper/source/client/commandenvironment.cxx b/ucbhelper/source/client/commandenvironment.cxx
index d083f5a..1210d30 100644
--- a/ucbhelper/source/client/commandenvironment.cxx
+++ b/ucbhelper/source/client/commandenvironment.cxx
@@ -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.
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index f4126d4..36aef58 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -136,7 +136,6 @@ ContentImplHelper::ContentImplHelper(
// virtual
ContentImplHelper::~ContentImplHelper()
{
- delete m_pImpl;
}
void SAL_CALL ContentImplHelper::acquire()
diff --git a/ucbhelper/source/provider/contentidentifier.cxx b/ucbhelper/source/provider/contentidentifier.cxx
index 86780ba..b40f28e 100644
--- a/ucbhelper/source/provider/contentidentifier.cxx
+++ b/ucbhelper/source/provider/contentidentifier.cxx
@@ -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;
}
diff --git a/ucbhelper/source/provider/interactionrequest.cxx b/ucbhelper/source/provider/interactionrequest.cxx
index 0e13c32..b3bf575 100644
--- a/ucbhelper/source/provider/interactionrequest.cxx
+++ b/ucbhelper/source/provider/interactionrequest.cxx
@@ -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;
}
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index 9c3c53a..c4148fc 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -67,7 +67,6 @@ ContentProviderImplHelper::ContentProviderImplHelper(
// virtual
ContentProviderImplHelper::~ContentProviderImplHelper()
{
- delete m_pImpl;
}
// XInterface
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index 8d6194c..8328bac 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -228,7 +228,6 @@ ResultSet::ResultSet(
// virtual
ResultSet::~ResultSet()
{
- delete m_pImpl;
}
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index 5afc296..e75b8d9 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -111,7 +111,6 @@ ResultSetMetaData::ResultSetMetaData(
// virtual
ResultSetMetaData::~ResultSetMetaData()
{
- delete m_pImpl;
}
commit edc264d1da7d4240c27c9f98efab09e84d78fff3
Author: Noel Grandin <noel at peralex.com>
Date: Tue Nov 17 09:43:45 2015 +0200
use unique_ptr for pImpl in unotools/
Change-Id: I4128ca0d4ff18f6e0c3c9f8ecad13b69c38c3157
diff --git a/include/unotools/eventlisteneradapter.hxx b/include/unotools/eventlisteneradapter.hxx
index 78408ed..74f6089 100644
--- a/include/unotools/eventlisteneradapter.hxx
+++ b/include/unotools/eventlisteneradapter.hxx
@@ -16,11 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <unotools/unotoolsdllapi.h>
#ifndef INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
#define INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
+
+#include <unotools/unotoolsdllapi.h>
#include <com/sun/star/lang/XComponent.hpp>
+#include <memory>
namespace utl
{
@@ -40,7 +42,7 @@ namespace utl
const OEventListenerAdapter& operator=( const OEventListenerAdapter& _rSource ) = delete;
protected:
- OEventListenerAdapterImpl* m_pImpl;
+ std::unique_ptr<OEventListenerAdapterImpl> m_pImpl;
protected:
OEventListenerAdapter();
diff --git a/include/unotools/misccfg.hxx b/include/unotools/misccfg.hxx
index eca80c4..9aebe79 100644
--- a/include/unotools/misccfg.hxx
+++ b/include/unotools/misccfg.hxx
@@ -24,12 +24,8 @@
namespace utl
{
- class SfxMiscCfg;
-
class UNOTOOLS_DLLPUBLIC MiscCfg : public detail::Options
{
- SfxMiscCfg* pImpl;
-
public:
MiscCfg( );
virtual ~MiscCfg( );
diff --git a/include/unotools/searchopt.hxx b/include/unotools/searchopt.hxx
index c560ae9..5accfba 100644
--- a/include/unotools/searchopt.hxx
+++ b/include/unotools/searchopt.hxx
@@ -21,12 +21,13 @@
#define INCLUDED_UNOTOOLS_SEARCHOPT_HXX
#include <unotools/unotoolsdllapi.h>
+#include <memory>
class SvtSearchOptions_Impl;
class UNOTOOLS_DLLPUBLIC SvtSearchOptions
{
- SvtSearchOptions_Impl *pImpl;
+ std::unique_ptr<SvtSearchOptions_Impl> pImpl;
SvtSearchOptions( const SvtSearchOptions & ) = delete;
SvtSearchOptions & operator = ( const SvtSearchOptions & ) = delete;
diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx
index faf8fd7..527b8eb 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -32,8 +32,9 @@ using namespace com::sun::star::uno;
namespace utl
{
+class SfxMiscCfg;
-static SfxMiscCfg* pOptions = nullptr;
+static SfxMiscCfg* g_pOptions = nullptr;
static sal_Int32 nRefCount = 0;
class SfxMiscCfg : public utl::ConfigItem
@@ -186,69 +187,68 @@ MiscCfg::MiscCfg( )
{
// Global access, must be guarded (multithreading)
::osl::MutexGuard aGuard( LocalSingleton::get() );
- if ( !pOptions )
+ if ( !g_pOptions )
{
- pOptions = new SfxMiscCfg;
+ g_pOptions = new SfxMiscCfg;
ItemHolder1::holdConfigItem(E_MISCCFG);
}
++nRefCount;
- pImpl = pOptions;
- pImpl->AddListener(this);
+ g_pOptions->AddListener(this);
}
MiscCfg::~MiscCfg( )
{
// Global access, must be guarded (multithreading)
::osl::MutexGuard aGuard( LocalSingleton::get() );
- pImpl->RemoveListener(this);
+ g_pOptions->RemoveListener(this);
if ( !--nRefCount )
{
- if ( pOptions->IsModified() )
- pOptions->Commit();
- DELETEZ( pOptions );
+ if ( g_pOptions->IsModified() )
+ g_pOptions->Commit();
+ DELETEZ( g_pOptions );
}
}
bool MiscCfg::IsNotFoundWarning() const
{
- return pImpl->IsNotFoundWarning();
+ return g_pOptions->IsNotFoundWarning();
}
void MiscCfg::SetNotFoundWarning( bool bSet)
{
- pImpl->SetNotFoundWarning( bSet );
+ g_pOptions->SetNotFoundWarning( bSet );
}
bool MiscCfg::IsPaperSizeWarning() const
{
- return pImpl->IsPaperSizeWarning();
+ return g_pOptions->IsPaperSizeWarning();
}
void MiscCfg::SetPaperSizeWarning(bool bSet)
{
- pImpl->SetPaperSizeWarning( bSet );
+ g_pOptions->SetPaperSizeWarning( bSet );
}
bool MiscCfg::IsPaperOrientationWarning() const
{
- return pImpl->IsPaperOrientationWarning();
+ return g_pOptions->IsPaperOrientationWarning();
}
void MiscCfg::SetPaperOrientationWarning( bool bSet)
{
- pImpl->SetPaperOrientationWarning( bSet );
+ g_pOptions->SetPaperOrientationWarning( bSet );
}
sal_Int32 MiscCfg::GetYear2000() const
{
- return pImpl->GetYear2000();
+ return g_pOptions->GetYear2000();
}
void MiscCfg::SetYear2000( sal_Int32 nSet )
{
- pImpl->SetYear2000( nSet );
+ g_pOptions->SetYear2000( nSet );
}
}
diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx
index b1bec8b..5f8cda2 100644
--- a/unotools/source/config/searchopt.cxx
+++ b/unotools/source/config/searchopt.cxx
@@ -240,13 +240,12 @@ bool SvtSearchOptions_Impl::Save()
}
SvtSearchOptions::SvtSearchOptions()
+ : pImpl( new SvtSearchOptions_Impl )
{
- pImpl = new SvtSearchOptions_Impl;
}
SvtSearchOptions::~SvtSearchOptions()
{
- delete pImpl;
}
void SvtSearchOptions::Commit()
diff --git a/unotools/source/misc/eventlisteneradapter.cxx b/unotools/source/misc/eventlisteneradapter.cxx
index c8f726b..ef825ea 100644
--- a/unotools/source/misc/eventlisteneradapter.cxx
+++ b/unotools/source/misc/eventlisteneradapter.cxx
@@ -105,8 +105,6 @@ namespace utl
OEventListenerAdapter::~OEventListenerAdapter()
{
stopAllComponentListening( );
- delete m_pImpl;
- m_pImpl = nullptr;
}
void OEventListenerAdapter::stopComponentListening( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxComp )
commit 85d7a76aba066553b8ecf385f295b1630d50ab8a
Author: Noel Grandin <noel at peralex.com>
Date: Tue Nov 17 09:28:21 2015 +0200
use unique_ptr for pImpl in ucb/
Change-Id: I9a626a11d665b081a7b05db52955598dbd90721e
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index b0f7acd..8d285b8 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -165,7 +165,6 @@ UcbStore::UcbStore( const Reference< XComponentContext >& xContext )
// virtual
UcbStore::~UcbStore()
{
- delete m_pImpl;
}
@@ -268,7 +267,6 @@ PropertySetRegistry::PropertySetRegistry(
// virtual
PropertySetRegistry::~PropertySetRegistry()
{
- delete m_pImpl;
}
@@ -1156,8 +1154,6 @@ PersistentPropertySet::~PersistentPropertySet()
{
// deregister at creator.
m_pImpl->m_pCreator->remove( this );
-
- delete m_pImpl;
}
// XServiceInfo methods.
diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx
index 8c7cc34..40e4470 100644
--- a/ucb/source/core/ucbstore.hxx
+++ b/ucb/source/core/ucbstore.hxx
@@ -36,6 +36,7 @@
#include <cppuhelper/weak.hxx>
#include <ucbhelper/macros.hxx>
#include <cppuhelper/implbase.hxx>
+#include <memory>
#define STORE_SERVICE_NAME "com.sun.star.ucb.Store"
@@ -52,7 +53,7 @@ class UcbStore : public cppu::WeakImplHelper <
css::lang::XInitialization >
{
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- UcbStore_Impl* m_pImpl;
+ std::unique_ptr<UcbStore_Impl> m_pImpl;
public:
explicit UcbStore( const css::uno::Reference< css::uno::XComponentContext >& xContext );
@@ -101,7 +102,7 @@ class PropertySetRegistry : public cppu::WeakImplHelper <
friend class PersistentPropertySet;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- PropertySetRegistry_Impl* m_pImpl;
+ std::unique_ptr<PropertySetRegistry_Impl> m_pImpl;
private:
css::uno::Reference< css::lang::XMultiServiceFactory >
@@ -181,7 +182,7 @@ class PersistentPropertySet : public cppu::WeakImplHelper <
css::beans::XPropertyAccess >
{
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- PersistentPropertySet_Impl* m_pImpl;
+ std::unique_ptr<PersistentPropertySet_Impl> m_pImpl;
private:
void notifyPropertyChangeEvent(
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 48b8d6b..199ca03 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -1069,14 +1069,13 @@ HierarchyEntry::getRootReadAccess()
HierarchyEntry::iterator::iterator()
+ : m_pImpl( new iterator_Impl )
{
- m_pImpl = new iterator_Impl;
}
HierarchyEntry::iterator::~iterator()
{
- delete m_pImpl;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx b/ucb/source/ucp/hierarchy/hierarchydata.hxx
index cb02be2..d3800b1 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.hxx
@@ -24,6 +24,7 @@
#include <osl/mutex.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <memory>
namespace com { namespace sun { namespace star {
namespace container {
@@ -118,7 +119,7 @@ public:
{
friend class HierarchyEntry;
- iterator_Impl* m_pImpl;
+ std::unique_ptr<iterator_Impl> m_pImpl;
public:
iterator();
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
index de1ada0..5789f72 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
@@ -126,7 +126,6 @@ HierarchyResultSetDataSupplier::HierarchyResultSetDataSupplier(
// virtual
HierarchyResultSetDataSupplier::~HierarchyResultSetDataSupplier()
{
- delete m_pImpl;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx
index 505149a..f04b716 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx
@@ -23,6 +23,7 @@
#include <rtl/ref.hxx>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <ucbhelper/resultset.hxx>
+#include <memory>
namespace hierarchy_ucp {
@@ -33,7 +34,7 @@ class HierarchyContent;
class HierarchyResultSetDataSupplier :
public ::ucbhelper::ResultSetDataSupplier
{
- DataSupplier_Impl* m_pImpl;
+ std::unique_ptr<DataSupplier_Impl> m_pImpl;
private:
bool checkResult( const HierarchyEntryData& rResult );
diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx
index 32d893a..3b2687e 100644
--- a/ucb/source/ucp/package/pkgdatasupplier.cxx
+++ b/ucb/source/ucp/package/pkgdatasupplier.cxx
@@ -129,7 +129,6 @@ DataSupplier::DataSupplier(
// virtual
DataSupplier::~DataSupplier()
{
- delete m_pImpl;
}
diff --git a/ucb/source/ucp/package/pkgdatasupplier.hxx b/ucb/source/ucp/package/pkgdatasupplier.hxx
index 4696ad1..719bb26 100644
--- a/ucb/source/ucp/package/pkgdatasupplier.hxx
+++ b/ucb/source/ucp/package/pkgdatasupplier.hxx
@@ -22,6 +22,7 @@
#include <rtl/ref.hxx>
#include <ucbhelper/resultset.hxx>
+#include <memory>
namespace package_ucp {
@@ -30,7 +31,7 @@ class Content;
class DataSupplier : public ::ucbhelper::ResultSetDataSupplier
{
- DataSupplier_Impl* m_pImpl;
+ std::unique_ptr<DataSupplier_Impl> m_pImpl;
public:
DataSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
index 888af77..52d6c07 100644
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
@@ -119,7 +119,6 @@ ResultSetDataSupplier::ResultSetDataSupplier(
// virtual
ResultSetDataSupplier::~ResultSetDataSupplier()
{
- delete m_pImpl;
}
// virtual
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx
index 1bb38c4..8bf1632 100644
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx
@@ -23,6 +23,7 @@
#include <rtl/ref.hxx>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <ucbhelper/resultset.hxx>
+#include <memory>
namespace tdoc_ucp {
@@ -31,7 +32,7 @@ class Content;
class ResultSetDataSupplier : public ::ucbhelper::ResultSetDataSupplier
{
- DataSupplier_Impl* m_pImpl;
+ std::unique_ptr<DataSupplier_Impl> m_pImpl;
private:
bool queryNamesOfChildren();
commit dfb3be7e15bf5a02a6c35a3b6f84aceb6214ce55
Author: Noel Grandin <noel at peralex.com>
Date: Tue Nov 17 09:02:55 2015 +0200
use unique_ptr for pImpl in vcl,vbahelper,uui
Change-Id: Icb7573c24c681a8fc0570d61b6a30dab91378eb8
diff --git a/include/vbahelper/vbaapplicationbase.hxx b/include/vbahelper/vbaapplicationbase.hxx
index 7f46069..5d809b8 100644
--- a/include/vbahelper/vbaapplicationbase.hxx
+++ b/include/vbahelper/vbaapplicationbase.hxx
@@ -23,6 +23,7 @@
#include <ooo/vba/XApplicationBase.hpp>
#include <vbahelper/vbahelperinterface.hxx>
#include <sfx2/objsh.hxx>
+#include <memory>
typedef InheritedHelperInterfaceWeakImpl< ov::XApplicationBase > ApplicationBase_BASE;
@@ -30,7 +31,7 @@ struct VbaApplicationBase_Impl;
class VBAHELPER_DLLPUBLIC VbaApplicationBase : public ApplicationBase_BASE
{
- VbaApplicationBase_Impl* m_pImpl;
+ std::unique_ptr<VbaApplicationBase_Impl> m_pImpl;
protected:
VbaApplicationBase( const css::uno::Reference< css::uno::XComponentContext >& xContext );
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index 44e4ef5..e5bc8c0 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -26,6 +26,7 @@
#include <vcl/dndhelp.hxx>
#include <vcl/textdata.hxx>
#include <vcl/window.hxx>
+#include <memory>
class TextEngine;
class OutputDevice;
@@ -53,10 +54,10 @@ class VCL_DLLPUBLIC TextView : public vcl::unohelper::DragAndDropClient
friend class ExtTextView;
private:
- ImpTextView* mpImpl;
+ std::unique_ptr<ImpTextView> mpImpl;
- TextView( const TextView& ) : vcl::unohelper::DragAndDropClient() {}
- TextView& operator=( const TextView& ) { return *this; }
+ TextView( const TextView& ) = delete;
+ TextView& operator=( const TextView& ) = delete;
protected:
void ShowSelection();
diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx
index daf3316..d2ed7dc 100644
--- a/uui/source/requeststringresolver.cxx
+++ b/uui/source/requeststringresolver.cxx
@@ -33,7 +33,6 @@ UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver(
UUIInteractionRequestStringResolver::~UUIInteractionRequestStringResolver()
{
- delete m_pImpl;
}
OUString SAL_CALL
diff --git a/uui/source/requeststringresolver.hxx b/uui/source/requeststringresolver.hxx
index f15b292..8d7c21e 100644
--- a/uui/source/requeststringresolver.hxx
+++ b/uui/source/requeststringresolver.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/task/XInteractionRequestStringResolver.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
+#include <memory>
class UUIInteractionHelper;
@@ -47,7 +48,7 @@ public:
rServiceFactory);
private:
- UUIInteractionHelper * m_pImpl;
+ std::unique_ptr<UUIInteractionHelper> m_pImpl;
UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver &) = delete;
void operator =(UUIInteractionRequestStringResolver&) = delete;
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 8423066..b468f8c 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -175,7 +175,6 @@ VbaApplicationBase::VbaApplicationBase( const uno::Reference< uno::XComponentCon
VbaApplicationBase::~VbaApplicationBase()
{
- delete m_pImpl;
}
sal_Bool SAL_CALL
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 28bdd32..cde8c85 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -243,7 +243,6 @@ TextView::~TextView()
mpImpl->mpWindow->SetCursor( nullptr );
delete mpImpl->mpCursor;
delete mpImpl->mpDDInfo;
- delete mpImpl;
}
void TextView::Invalidate()
commit b4bd157d0fffcd83e7461de35ee9105b53d21314
Author: Noel Grandin <noel at peralex.com>
Date: Tue Nov 17 08:51:46 2015 +0200
use unique_ptr for pImpl in writerperfect/
Change-Id: I23ab4d214ed01073f26cbbf2e88732ccde4ebc10
diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx
index d35a780..6107af8 100644
--- a/writerperfect/inc/DirectoryStream.hxx
+++ b/writerperfect/inc/DirectoryStream.hxx
@@ -11,10 +11,9 @@
#define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
#include <librevenge-stream/librevenge-stream.h>
-
#include <com/sun/star/uno/Reference.h>
-
#include <writerperfectdllapi.h>
+#include <memory>
namespace com
{
@@ -57,7 +56,7 @@ public:
virtual bool isEnd() override;
private:
- Impl *m_pImpl;
+ std::unique_ptr<Impl> m_pImpl;
};
}
diff --git a/writerperfect/inc/WPXSvInputStream.hxx b/writerperfect/inc/WPXSvInputStream.hxx
index 7de7455..e09f4f1 100644
--- a/writerperfect/inc/WPXSvInputStream.hxx
+++ b/writerperfect/inc/WPXSvInputStream.hxx
@@ -11,10 +11,9 @@
#define INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX
#include <librevenge-stream/librevenge-stream.h>
-
#include <com/sun/star/uno/Reference.h>
-
#include <writerperfectdllapi.h>
+#include <memory>
namespace com
{
@@ -55,7 +54,7 @@ public:
virtual bool isEnd() override;
private:
- WPXSvInputStreamImpl *mpImpl;
+ std::unique_ptr<WPXSvInputStreamImpl> mpImpl;
};
}
diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx
index cfbb043..8680015 100644
--- a/writerperfect/source/common/DirectoryStream.cxx
+++ b/writerperfect/source/common/DirectoryStream.cxx
@@ -111,7 +111,6 @@ DirectoryStream::DirectoryStream(const com::sun::star::uno::Reference<com::sun::
DirectoryStream::~DirectoryStream()
{
- delete m_pImpl;
}
DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent)
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 52d5824..a0edca0 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -817,7 +817,6 @@ WPXSvInputStream::WPXSvInputStream(Reference< XInputStream > xStream) :
WPXSvInputStream::~WPXSvInputStream()
{
- delete mpImpl;
}
#define BUFFER_MAX 65536
More information about the Libreoffice-commits
mailing list