summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.hxx5
3 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 97636e64efff..85db134bf892 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1310,7 +1310,7 @@ static void AddControl( HTMLControls& rControls,
std::unique_ptr<HTMLControl> pHCntrl(new HTMLControl( xFormComps, nNodeIdx ));
HTMLControls::const_iterator it = rControls.find( pHCntrl.get() );
if( it == rControls.end() )
- rControls.insert( pHCntrl.release() );
+ rControls.insert( std::move(pHCntrl) );
else
{
if( (*it)->xFormComps==xFormComps )
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 0d14929ca0c3..1095aa60d681 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -486,7 +486,7 @@ ErrCode SwHTMLWriter::WriteStream()
m_pHTMLPosFlyFrames.reset();
}
- m_aHTMLControls.DeleteAndDestroyAll();
+ m_aHTMLControls.clear();
m_CharFormatInfos.clear();
m_TextCollInfos.clear();
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 279ed3ba04c5..e06c4190aa4d 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -200,10 +200,7 @@ struct HTMLControl
}
};
-class HTMLControls : public o3tl::sorted_vector<HTMLControl*, o3tl::less_ptr_to<HTMLControl> > {
-public:
- // will free any items still in the vector
- ~HTMLControls() { DeleteAndDestroyAll(); }
+class HTMLControls : public o3tl::sorted_vector<std::unique_ptr<HTMLControl>, o3tl::less_uniqueptr_to<HTMLControl> > {
};
struct SwHTMLFormatInfo