Kaydet (Commit) 87f15b94 authored tarafından Michael Stahl's avatar Michael Stahl

sw: replace boost::ptr_vector with std::vector<std::unique_ptr>

Change-Id: I95ce84f7e82dc03233878de4324f2cb5c282a8aa
üst a2c8358c
......@@ -620,7 +620,6 @@
#include <memory>
#include <numeric>
#include <o3tl/numeric.hxx>
#include <o3tl/ptr_container.hxx>
#include <o3tl/sorted_vector.hxx>
#include <officecfg/Office/Common.hxx>
#include <officecfg/Office/Writer.hxx>
......
......@@ -95,13 +95,13 @@ ImageMap *SwHTMLParser::FindImageMap( const OUString& rName ) const
{
OSL_ENSURE( rName[0] != '#', "FindImageMap: name begins with '#'!" );
if( pImageMaps )
if (m_pImageMaps)
{
for( auto &rIMap : *pImageMaps )
for (auto &rpIMap : *m_pImageMaps)
{
if( rName.equalsIgnoreAsciiCase( rIMap.GetName() ) )
if (rName.equalsIgnoreAsciiCase(rpIMap->GetName()))
{
return &rIMap;
return rpIMap.get();
}
}
}
......
......@@ -255,7 +255,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn,
pMarquee( 0 ),
pField( 0 ),
pImageMap( 0 ),
pImageMaps( 0 ),
m_pImageMaps(nullptr),
pFootEndNoteImpl( 0 ),
nScriptStartLineNr( 0 ),
nBaseFontStMin( 0 ),
......@@ -459,7 +459,7 @@ SwHTMLParser::~SwHTMLParser()
DeleteFootEndNoteImpl();
OSL_ENSURE( !pTable, "Es existiert noch eine offene Tabelle" );
delete pImageMaps;
delete m_pImageMaps;
OSL_ENSURE( !pPendStack,
"SwHTMLParser::~SwHTMLParser: Hier sollte es keinen Pending-Stack mehr geben" );
......@@ -1967,9 +1967,9 @@ void SwHTMLParser::NextToken( int nToken )
pImageMap = new ImageMap;
if( ParseMapOptions( pImageMap) )
{
if( !pImageMaps )
pImageMaps = new ImageMaps;
pImageMaps->push_back( pImageMap );
if (!m_pImageMaps)
m_pImageMaps = new ImageMaps;
m_pImageMaps->push_back(std::unique_ptr<ImageMap>(pImageMap));
}
else
{
......
......@@ -31,8 +31,8 @@
#include "calbck.hxx"
#include "htmlvsh.hxx"
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
#include <deque>
class SfxMedium;
......@@ -333,7 +333,7 @@ class HTMLTable;
class SwCSS1Parser;
class SwHTMLNumRuleInfo;
typedef boost::ptr_vector<ImageMap> ImageMaps;
typedef ::std::vector<std::unique_ptr<ImageMap>> ImageMaps;
#define HTML_CNTXT_PROTECT_STACK 0x0001
#define HTML_CNTXT_STRIP_PARA 0x0002
......@@ -402,7 +402,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
SdrObject *pMarquee; // aktuelles Marquee
SwField *pField; // aktuelles Feld
ImageMap *pImageMap; // aktuelle Image-Map
ImageMaps *pImageMaps;// alle gelesenen Image-Maps
ImageMaps *m_pImageMaps; ///< all Image-Maps that have been read
SwHTMLFootEndNote_Impl *pFootEndNoteImpl;
Size aHTMLPageSize; // die Seitengroesse der HTML-Vorlage
......
......@@ -19,7 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
#include <set>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment