summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlcss1.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-27 09:11:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-01 08:16:13 +0200
commite79b7a51cc4f425112377e2c3cee7f27961557ef (patch)
tree8e132015fd2dd7b29a7db0a2ce59c29c7eeb8c97 /sw/source/filter/html/htmlcss1.cxx
parent7e4631c544146a9b5a4087aab992aedfed6e8c03 (diff)
loplugin:useuniqueptr in SwPendingStack
and simplify, no need for a linked list here, a vector will do fine Change-Id: I0aa3d518ceec305aaa0607306bdf816a52507c58 Reviewed-on: https://gerrit.libreoffice.org/61109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/html/htmlcss1.cxx')
-rw-r--r--sw/source/filter/html/htmlcss1.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 8518decf45e8..9cdc2880e0c1 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1725,15 +1725,13 @@ bool SwHTMLParser::FileDownload( const OUString& rURL,
void SwHTMLParser::InsertLink()
{
bool bFinishDownload = false;
- if( m_pPendStack )
+ if( !m_vPendingStack.empty() )
{
OSL_ENSURE( ShouldFinishFileDownload(),
"Pending-Stack without File-Download?" );
- SwPendingStack* pTmp = m_pPendStack->pNext;
- delete m_pPendStack;
- m_pPendStack = pTmp;
- OSL_ENSURE( !m_pPendStack, "Where does the Pending-Stack come from?" );
+ m_vPendingStack.pop_back();
+ assert( m_vPendingStack.empty() && "Where does the Pending-Stack come from?" );
bFinishDownload = true;
}
@@ -1778,7 +1776,7 @@ void SwHTMLParser::InsertLink()
// The style was load asynchronously and is only available
// on the next continue call. Therefore we must create a
// Pending stack, so that we will return to here.
- m_pPendStack = new SwPendingStack( HtmlTokenId::LINK, m_pPendStack );
+ m_vPendingStack.emplace_back( HtmlTokenId::LINK );
}
}
else