summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/imap.hxx2
-rw-r--r--svx/source/sdr/misc/ImageMapInfo.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx3
-rw-r--r--vcl/source/treelist/imap.cxx2
4 files changed, 4 insertions, 5 deletions
diff --git a/include/vcl/imap.hxx b/include/vcl/imap.hxx
index 6245d2928802..8a34ad1bf7d1 100644
--- a/include/vcl/imap.hxx
+++ b/include/vcl/imap.hxx
@@ -95,7 +95,7 @@ public:
IMapObject* GetHitIMapObject( const Size& rOriginalSize,
const Size& rDisplaySize,
const Point& rRelHitPoint,
- sal_uLong nFlags = 0 );
+ sal_uLong nFlags = 0 ) const;
// returns the total amount of IMap objects
size_t GetIMapObjectCount() const { return maList.size(); }
diff --git a/svx/source/sdr/misc/ImageMapInfo.cxx b/svx/source/sdr/misc/ImageMapInfo.cxx
index 1d5600810f09..ac141d253d8b 100644
--- a/svx/source/sdr/misc/ImageMapInfo.cxx
+++ b/svx/source/sdr/misc/ImageMapInfo.cxx
@@ -57,7 +57,7 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* pObj, const Point& rW
const MapMode aMap100(MapUnit::Map100thMM);
Size aGraphSize;
Point aRelPoint(rWinPoint);
- ImageMap& rImageMap = const_cast<ImageMap&>(pIMapInfo->GetImageMap());
+ const ImageMap& rImageMap = pIMapInfo->GetImageMap();
tools::Rectangle aRect = pObj->GetLogicRect();
if (pCmpWnd)
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 596ae8d93fe4..c6b975827737 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3591,8 +3591,7 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
nFlags = IMAP_MIRROR_HORZ;
}
- return const_cast<ImageMap*>(rURL.GetMap())->GetHitIMapObject( aOrigSz,
- aActSz, aPos, nFlags );
+ return rURL.GetMap()->GetHitIMapObject( aOrigSz, aActSz, aPos, nFlags );
}
return nullptr;
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 5c3b5b0b252a..ba29af020261 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -771,7 +771,7 @@ void ImageMap::InsertIMapObject( std::unique_ptr<IMapObject> pNewObject )
IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
const Size& rDisplaySize,
const Point& rRelHitPoint,
- sal_uLong nFlags )
+ sal_uLong nFlags ) const
{
Point aRelPoint( rTotalSize.Width() * rRelHitPoint.X() / rDisplaySize.Width(),
rTotalSize.Height() * rRelHitPoint.Y() / rDisplaySize.Height() );