diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-09-03 15:16:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-03 16:32:01 +0200 |
commit | 5ab60e85b1319e8bf0c698bc804bd78f3eb7a8ca (patch) | |
tree | a89d79c844d67bba403dea3cf25f906c67b22614 | |
parent | fdc839390338f2882c1116362c39e197ce27b394 (diff) |
sw: replace boost::ptr_vector with std::vector
Change-Id: I477e7a809b572fd62b276afd44c8b140efb9d653
-rw-r--r-- | sw/source/core/inc/noteurl.hxx | 9 | ||||
-rw-r--r-- | 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 <boost/ptr_container/ptr_vector.hpp> + +#include <rtl/ustring.hxx> + +#include <vector> class ImageMap; class MapMode; @@ -44,7 +47,9 @@ public: class SwNoteURL { - boost::ptr_vector<SwURLNote> aList; +private: + std::vector<SwURLNote> 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 <vcl/outdev.hxx> #include <svtools/imaprect.hxx> #include <svtools/imap.hxx> -#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(), |