Kaydet (Commit) dab5d58a authored tarafından Matteo Casalin's avatar Matteo Casalin

SwNoteURL: remove Count and GetURLNote, used only internally

Directly access data member and switch from sal_uInt16 to size_t

Change-Id: I8544463dabc099aa94ae0281e636dbf7835c23b4
üst bdf00baf
......@@ -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 );
};
......
......@@ -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(),
......
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