From 5ab60e85b1319e8bf0c698bc804bd78f3eb7a8ca Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 3 Sep 2015 15:16:59 +0200 Subject: sw: replace boost::ptr_vector with std::vector Change-Id: I477e7a809b572fd62b276afd44c8b140efb9d653 --- sw/source/core/inc/noteurl.hxx | 9 +++++++-- sw/source/core/text/noteurl.cxx | 15 +++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx index e6e3492b6423..427802c2713e 100644 --- a/sw/source/core/inc/noteurl.hxx +++ b/sw/source/core/inc/noteurl.hxx @@ -21,7 +21,10 @@ #define INCLUDED_SW_SOURCE_CORE_INC_NOTEURL_HXX #include "swrect.hxx" -#include + +#include + +#include class ImageMap; class MapMode; @@ -44,7 +47,9 @@ public: class SwNoteURL { - boost::ptr_vector aList; +private: + std::vector m_List; + public: SwNoteURL() {} void InsertURLNote( const OUString& rURL, const OUString& rTarget, diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx index 8057e1d6d09e..981a7560bfdc 100644 --- a/sw/source/core/text/noteurl.cxx +++ b/sw/source/core/text/noteurl.cxx @@ -17,39 +17,38 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "noteurl.hxx" + #include "swtypes.hxx" #include #include #include -#include "noteurl.hxx" - // Global variable SwNoteURL *pNoteURL = NULL; void SwNoteURL::InsertURLNote( const OUString& rURL, const OUString& rTarget, const SwRect& rRect ) { - const size_t nCount = aList.size(); + const size_t nCount = m_List.size(); for( size_t i = 0; i < nCount; ++i ) - if( rRect == aList[i].GetRect() ) + if (rRect == m_List[i].GetRect()) return; - SwURLNote *pNew = new SwURLNote( rURL, rTarget, rRect ); - aList.push_back( pNew ); + m_List.push_back(SwURLNote(rURL, rTarget, rRect)); } void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos, const MapMode& rMap ) { OSL_ENSURE( pMap, "FillImageMap: No ImageMap, no cookies!" ); - const size_t nCount = aList.size(); + const size_t nCount = m_List.size(); if( nCount ) { MapMode aMap( MAP_100TH_MM ); for( size_t i = 0; i < nCount; ++i ) { - const SwURLNote &rNote = aList[i]; + const SwURLNote &rNote = m_List[i]; SwRect aSwRect( rNote.GetRect() ); aSwRect -= rPos; Rectangle aRect( OutputDevice::LogicToLogic( aSwRect.SVRect(), -- cgit v1.2.3