Kaydet (Commit) 71eab1c4 authored tarafından Arnold Dumas's avatar Arnold Dumas Kaydeden (comit) Noel Grandin

tdf#89329: Use unique_ptr for pImpl in stlfamily

Change-Id: I0c9df5809a906dbc761f9a51c3424cebb215d0bc
Reviewed-on: https://gerrit.libreoffice.org/34132Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst c639ae46
...@@ -112,7 +112,7 @@ private: ...@@ -112,7 +112,7 @@ private:
SfxStyleFamily mnFamily; SfxStyleFamily mnFamily;
rtl::Reference< SfxStyleSheetPool > mxPool; rtl::Reference< SfxStyleSheetPool > mxPool;
SdStyleFamilyImpl* mpImpl; std::unique_ptr<SdStyleFamilyImpl> mpImpl;
}; };
typedef rtl::Reference< SdStyleFamily > SdStyleFamilyRef; typedef rtl::Reference< SdStyleFamily > SdStyleFamilyRef;
......
...@@ -95,7 +95,6 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets() ...@@ -95,7 +95,6 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets()
SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, SfxStyleFamily nFamily ) SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, SfxStyleFamily nFamily )
: mnFamily( nFamily ) : mnFamily( nFamily )
, mxPool( xPool ) , mxPool( xPool )
, mpImpl( nullptr )
{ {
} }
...@@ -111,7 +110,6 @@ SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, ...@@ -111,7 +110,6 @@ SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool,
SdStyleFamily::~SdStyleFamily() SdStyleFamily::~SdStyleFamily()
{ {
DBG_ASSERT( !mxPool.is(), "SdStyleFamily::~SdStyleFamily(), dispose me first!" ); DBG_ASSERT( !mxPool.is(), "SdStyleFamily::~SdStyleFamily(), dispose me first!" );
delete mpImpl;
} }
void SdStyleFamily::throwIfDisposed() const void SdStyleFamily::throwIfDisposed() const
...@@ -462,11 +460,7 @@ void SAL_CALL SdStyleFamily::dispose( ) ...@@ -462,11 +460,7 @@ void SAL_CALL SdStyleFamily::dispose( )
if( mxPool.is() ) if( mxPool.is() )
mxPool.clear(); mxPool.clear();
if( mpImpl ) mpImpl.reset();
{
delete mpImpl;
mpImpl = nullptr;
}
} }
void SAL_CALL SdStyleFamily::addEventListener( const Reference< XEventListener >& ) void SAL_CALL SdStyleFamily::addEventListener( const Reference< XEventListener >& )
......
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