sw/source/filter/html/htmltab.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9bfc9c3f414a5ff928fe093a4725e5e00e28aba5
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Aug 7 20:44:27 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Aug 9 08:40:35 2022 +0200

    unique_ptr->optional in CellSaveStruct
    
    Change-Id: I046442f4ebfb62ad4ec346fa5622b37370774698
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137995
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index da067793a9cb..74f956cc3c79 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2835,7 +2835,7 @@ class CellSaveStruct : public SectionSaveStruct
 
     std::shared_ptr<HTMLTableCnts> m_xCnts;              // List of all 
contents
     HTMLTableCnts* m_pCurrCnts;                          // current content or 0
-    std::unique_ptr<SwNodeIndex> m_pNoBreakEndNodeIndex; // Paragraph index of 
a <NOBR>
+    std::optional<SwNodeIndex> m_oNoBreakEndNodeIndex; // Paragraph index of a 
<NOBR>
 
     double m_nValue;
 
@@ -3100,7 +3100,7 @@ void CellSaveStruct::EndNoBreak( const SwPosition& rPos )
 {
     if( m_bNoBreak )
     {
-        m_pNoBreakEndNodeIndex.reset( new SwNodeIndex( rPos.nNode ) );
+        m_oNoBreakEndNodeIndex.emplace( rPos.nNode );
         m_nNoBreakEndContentPos = rPos.GetContentIndex();
         m_bNoBreak = false;
     }
@@ -3116,8 +3116,8 @@ void CellSaveStruct::CheckNoBreak( const SwPosition& rPos 
)
         // <NOBR> wasn't closed
         m_xCnts->SetNoBreak();
     }
-    else if( m_pNoBreakEndNodeIndex &&
-             m_pNoBreakEndNodeIndex->GetIndex() == rPos.GetNodeIndex() )
+    else if( m_oNoBreakEndNodeIndex &&
+             m_oNoBreakEndNodeIndex->GetIndex() == rPos.GetNodeIndex() )
     {
         if( m_nNoBreakEndContentPos == rPos.GetContentIndex() )
         {

Reply via email to