diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-17 09:28:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-17 10:59:47 +0200 |
commit | 85d7a76aba066553b8ecf385f295b1630d50ab8a (patch) | |
tree | 81cb751261744f12278e16774c51e308313db1ee | |
parent | dfb3be7e15bf5a02a6c35a3b6f84aceb6214ce55 (diff) |
use unique_ptr for pImpl in ucb/
Change-Id: I9a626a11d665b081a7b05db52955598dbd90721e
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 4 | ||||
-rw-r--r-- | ucb/source/core/ucbstore.hxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydata.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydata.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx | 1 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgdatasupplier.cxx | 1 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgdatasupplier.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_datasupplier.cxx | 1 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_datasupplier.hxx | 3 |
10 files changed, 13 insertions, 16 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index b0f7acd3ebc3..8d285b8b2134 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 8c7cc34a541a..40e4470d7907 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 48b8d6ba3934..199ca0332e58 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 cb02be2209ee..d3800b139ed1 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 de1ada05fbbb..5789f72481c1 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 505149a5abc5..f04b716ecc98 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 32d893ac061b..3b2687e004e5 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 4696ad10440e..719bb2626f71 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 888af77f29e4..52d6c0703361 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 1bb38c4ec59f..8bf16327d889 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(); |