diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-10-30 18:45:21 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-10-30 19:51:08 +0100 |
commit | 87f15b9450be1078b7d0bf070475acff087c15dc (patch) | |
tree | 67b8546030b046ea45bc28cc61a8a56f9812ad0b /sw/source/filter/html | |
parent | a2c8358c99d465b8396931fb0bddec0a013031af (diff) |
sw: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I95ce84f7e82dc03233878de4324f2cb5c282a8aa
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 1 |
4 files changed, 13 insertions, 14 deletions
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index b30d5718bd15..6fc01a929eb9 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -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(); } } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 061ce303c77b..2d4c762d7fef 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -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 { diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 17cbadf39a51..f58831248e63 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -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 diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index cb77d85a1c5d..10e28dff555c 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -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> |