diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-08-08 19:02:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-11 10:32:36 +0200 |
commit | c8ef47651a32c9cd00183d51fb31912990b89793 (patch) | |
tree | b7f67551ea9e34d2d6c4f98361eaff63d683bf2a /sw/source/filter/ww8/ww8par5.cxx | |
parent | 30efbe72f6b3a025ef12695b23821a77e1b1a887 (diff) |
unique_ptr->optional in SwWW8ImplReader
Change-Id: I9d5961c974cf0ec378dd3560ad24d65e5d3aa197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138104
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.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index d59f41d68174..508cae886c1f 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -569,10 +569,10 @@ sal_uInt16 SwWW8ImplReader::End_Field() m_bCareLastParaEndInToc = true; } - if (m_pPosAfterTOC) + if (m_oPosAfterTOC) { - *m_pPaM = *m_pPosAfterTOC; - m_pPosAfterTOC.reset(); + *m_pPaM = *m_oPosAfterTOC; + m_oPosAfterTOC.reset(); } } } @@ -3479,7 +3479,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) //The TOC field representation contents should be inserted into TOC section, but not after TOC section. //So we need update the document position when loading TOC representation and after loading TOC; - m_pPosAfterTOC.reset(new SwPaM(*m_pPaM, m_pPaM)); + m_oPosAfterTOC.emplace(*m_pPaM, m_pPaM); (*m_pPaM).Move(fnMoveBackward); SwPaM aRegion(*m_pPaM, m_pPaM); @@ -3500,7 +3500,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) // inserting a toc inserts a section before this point, so adjust pos // for future page/section segment insertion - m_aSectionManager.PrependedInlineNode( *m_pPosAfterTOC->GetPoint(), aRegion.GetNode() ); + m_aSectionManager.PrependedInlineNode( *m_oPosAfterTOC->GetPoint(), aRegion.GetNode() ); } // Set end in stack |