summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-08-31 20:01:13 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-09-06 12:12:29 +0200
commitdab5d58acc983c6234bcd2975eb0e8678608743e (patch)
tree4fdfb5401f16bcf2defa31a1331a702e454d8929 /sw
parentbdf00bafb4bf6d5cc135c28c78cc740543eca309 (diff)
SwNoteURL: remove Count and GetURLNote, used only internally
Directly access data member and switch from sal_uInt16 to size_t Change-Id: I8544463dabc099aa94ae0281e636dbf7835c23b4
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/noteurl.hxx3
-rw-r--r--sw/source/core/text/noteurl.cxx11
2 files changed, 5 insertions, 9 deletions
diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx
index 08516da98326..d1a853c91dc1 100644
--- a/sw/source/core/inc/noteurl.hxx
+++ b/sw/source/core/inc/noteurl.hxx
@@ -49,11 +49,8 @@ class SwNoteURL
SwURLNoteList aList;
public:
SwNoteURL() {}
- sal_uInt16 Count() const { return aList.size(); }
void InsertURLNote( const OUString& rURL, const OUString& rTarget,
const SwRect& rRect );
- const SwURLNote& GetURLNote( sal_uInt16 nPos ) const
- { return aList[ nPos ]; }
void FillImageMap( ImageMap* pMap, const Point& rPos, const MapMode& rMap );
};
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index b70191d107c0..8057e1d6d09e 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -30,9 +30,8 @@ SwNoteURL *pNoteURL = NULL;
void SwNoteURL::InsertURLNote( const OUString& rURL, const OUString& rTarget,
const SwRect& rRect )
{
- sal_uInt16 i;
- sal_uInt16 nCount = aList.size();
- for( i = 0; i < nCount; i++ )
+ const size_t nCount = aList.size();
+ for( size_t i = 0; i < nCount; ++i )
if( rRect == aList[i].GetRect() )
return;
@@ -44,13 +43,13 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,
const MapMode& rMap )
{
OSL_ENSURE( pMap, "FillImageMap: No ImageMap, no cookies!" );
- sal_uInt16 nCount = Count();
+ const size_t nCount = aList.size();
if( nCount )
{
MapMode aMap( MAP_100TH_MM );
- for( sal_uInt16 i = 0; i < nCount; ++i )
+ for( size_t i = 0; i < nCount; ++i )
{
- const SwURLNote &rNote = GetURLNote( i );
+ const SwURLNote &rNote = aList[i];
SwRect aSwRect( rNote.GetRect() );
aSwRect -= rPos;
Rectangle aRect( OutputDevice::LogicToLogic( aSwRect.SVRect(),