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

use unique_ptr for pImpl in sw/

Change-Id: I8508894d70e1ff16cfb9d7a9d716f11a923f453d
üst 048a32d9
......@@ -21,6 +21,7 @@
#define INCLUDED_SW_INC_ACMPLWRD_HXX
#include <deque>
#include <memory>
#include <editeng/swafopt.hxx>
#include <editeng/Trie.hxx>
......@@ -42,7 +43,7 @@ class SwAutoCompleteWord
editeng::Trie m_LookupTree;
SwAutoCompleteStringPtrDeque aLRULst;
SwAutoCompleteWord_Impl* pImpl;
std::unique_ptr<SwAutoCompleteWord_Impl> pImpl;
sal_uInt16 nMaxCount, nMinWrdLen;
bool bLockWordLst;
......
......@@ -201,7 +201,7 @@ friend class SwConnectionDisposedListener_Impl;
bool bMergeLock : 1; /**< prevent update of database fields while document is
actually printed at the SwViewShell */
SwDSParams_t m_DataSourceParams;
SwDBManager_Impl* pImpl;
std::unique_ptr<SwDBManager_Impl> pImpl;
const SwXMailMerge* pMergeEvtSrc; ///< != 0 if mail merge events are to be send
/// Name of the embedded database that's included in the current document.
OUString m_sEmbeddedName;
......
......@@ -225,7 +225,6 @@ SwAutoCompleteWord::SwAutoCompleteWord( sal_uInt16 nWords, sal_uInt16 nMWrdLen )
SwAutoCompleteWord::~SwAutoCompleteWord()
{
m_WordList.DeleteAndDestroyAll(); // so the assertion below works
delete pImpl;
#if OSL_DEBUG_LEVEL > 0
sal_uLong nStrings = SwAutoCompleteString::GetElementCount();
sal_uLong nClients = SwAutoCompleteClient::GetElementCount();
......
......@@ -421,13 +421,13 @@ SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos,
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )
: pImpl( new SwNode2LayImpl( rNd, nIdx, false ) )
{
pImpl = new SwNode2LayImpl( rNd, nIdx, false );
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd )
: pImpl( new SwNode2LayImpl( rNd, rNd.GetIndex(), true ) )
{
pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), true );
pImpl->SaveUpperFrms();
}
......@@ -449,7 +449,6 @@ SwLayoutFrm* SwNode2Layout::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
SwNode2Layout::~SwNode2Layout()
{
delete pImpl;
}
SwFrm* SwNode2Layout::GetFrm( const Point* pDocPos,
......
......@@ -20,6 +20,7 @@
#define INCLUDED_SW_SOURCE_CORE_INC_NODE2LAY_HXX
#include <tools/solar.h>
#include <memory>
/**
* This class connects the Nodes with the Layouts.
......@@ -53,7 +54,7 @@ struct SwPosition;
class SwNode2Layout
{
SwNode2LayImpl *pImpl;
std::unique_ptr<SwNode2LayImpl> pImpl;
public:
/// Use this ctor for collecting the UpperFrms
SwNode2Layout( const SwNode& rNd );
......
......@@ -23,6 +23,7 @@
#include <set>
#include <map>
#include <vector>
#include <memory>
#include <swtypes.hxx>
#include "wwstyles.hxx"
#include <rtl/textenc.h>
......@@ -180,7 +181,7 @@ namespace sw
{
private:
//I hate these things stupid pImpl things, but its warranted here
::myImplHelpers::StyleMapperImpl<SwTextFormatColl> *mpImpl;
std::unique_ptr<::myImplHelpers::StyleMapperImpl<SwTextFormatColl> > mpImpl;
public:
explicit ParaStyleMapper(SwDoc &rDoc);
~ParaStyleMapper();
......
......@@ -460,7 +460,6 @@ namespace sw
ParaStyleMapper::~ParaStyleMapper()
{
delete mpImpl;
}
ParaStyleMapper::StyleResult ParaStyleMapper::GetStyle(
......
......@@ -23,6 +23,7 @@
#include <sal/types.h>
#include <tools/ref.hxx>
#include <xmloff/xmltoken.hxx>
#include <memory>
#define MID_SW_FLAG_MASK 0x0000ffff
......@@ -58,7 +59,7 @@ class SvXMLItemMapEntries_impl;
class SvXMLItemMapEntries : public SvRefBase
{
protected:
SvXMLItemMapEntries_impl* mpImpl;
std::unique_ptr<SvXMLItemMapEntries_impl> mpImpl;
public:
explicit SvXMLItemMapEntries(SvXMLItemMapEntry* pEntrys);
......
......@@ -32,8 +32,8 @@ public:
};
SvXMLItemMapEntries::SvXMLItemMapEntries( SvXMLItemMapEntry* pEntries )
: mpImpl( new SvXMLItemMapEntries_impl )
{
mpImpl = new SvXMLItemMapEntries_impl;
mpImpl->mpEntries = pEntries;
mpImpl->mnCount = 0;
......@@ -46,7 +46,6 @@ SvXMLItemMapEntries::SvXMLItemMapEntries( SvXMLItemMapEntry* pEntries )
SvXMLItemMapEntries::~SvXMLItemMapEntries()
{
delete mpImpl;
}
SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
......
......@@ -804,7 +804,6 @@ SwDBManager::~SwDBManager()
}
}
}
delete pImpl;
}
// save bulk letters as single documents
......
......@@ -37,7 +37,6 @@ namespace com{namespace sun{namespace star{
}
}}}
class SwMailMergeConfigItem_Impl;
class SwView;
namespace sw { namespace mark { class IMark; }}
......@@ -49,7 +48,6 @@ struct SwDocMergeInfo
class SW_DLLPUBLIC SwMailMergeConfigItem
{
SwMailMergeConfigItem_Impl* m_pImpl;
//session information - not stored in configuration
bool m_bAddressInserted;
bool m_bMergeDone;
......
......@@ -20,13 +20,14 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_VIEWLAYOUTCTRL_HXX
#include <sfx2/stbitem.hxx>
#include <memory>
class SwViewLayoutControl : public SfxStatusBarControl
{
private:
struct SwViewLayoutControl_Impl;
SwViewLayoutControl_Impl* mpImpl;
std::unique_ptr<SwViewLayoutControl_Impl> mpImpl;
public:
......
......@@ -79,7 +79,6 @@ SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId,
SwViewLayoutControl::~SwViewLayoutControl()
{
delete mpImpl;
}
void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
......
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