summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-14 10:49:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-15 06:58:07 +0100
commit2e0763633719f9f2a009956ace3e30d79d236ff9 (patch)
tree182f46c76430529ae2cc8c87023ff76287ee1569 /sw/source/filter/ww8/ww8par5.cxx
parent11f85d828a16b1beee5c476bd4d8d21c3e450592 (diff)
use unique_ptr in sw
Change-Id: I02026ffd808fa4939666c791c476cd0c0632cde3 Reviewed-on: https://gerrit.libreoffice.org/66319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/ww8par5.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 4ff133dca23a..ef2bc17f0986 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -3270,7 +3270,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
// In an ideal world we could handle the tab stop between the number and
// the entry correctly, but I currently have no clue how to obtain
// the tab stop position. It is _not_ set at the paragraph style.
- SwForm* pForm = nullptr;
+ std::unique_ptr<SwForm> pForm;
for (SwWW8StyInf & rSI : m_vColl)
{
if (rSI.IsOutlineNumbered())
@@ -3282,7 +3282,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
++nStyleLevel;
if ( !pForm )
- pForm = new SwForm( pBase->GetTOXForm() );
+ pForm.reset(new SwForm( pBase->GetTOXForm() ));
SwFormTokens aPattern = pForm->GetPattern(nStyleLevel);
SwFormTokens::iterator aIt =
@@ -3302,7 +3302,6 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
if ( pForm )
{
pBase->SetTOXForm( *pForm );
- delete pForm;
}
}