summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdopath.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:31:47 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:38 +0100
commit5429049e3b8fd12e84aca83be7ca19e52920f672 (patch)
tree3b473be72f20a82357bd3f8ee7aa558b6b517e99 /svx/source/svdraw/svdopath.cxx
parent0d05f417c3a7dcde89f5e15b29f39ce2db65b543 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Ic90647cc4da716b54b00520b683cee027a664c22
Diffstat (limited to 'svx/source/svdraw/svdopath.cxx')
-rw-r--r--svx/source/svdraw/svdopath.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index a02fed98cdb7..efd6a03fb692 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -590,13 +590,13 @@ bool ImpPathForDragAndCreate::beginPathDrag( SdrDragStat& rDrag ) const
bMultiPointDrag = false;
}
- ((ImpPathForDragAndCreate*)this)->mpSdrPathDragData = new ImpSdrPathDragData(mrSdrPathObject,*pHdl,bMultiPointDrag,rDrag);
+ const_cast<ImpPathForDragAndCreate*>(this)->mpSdrPathDragData = new ImpSdrPathDragData(mrSdrPathObject,*pHdl,bMultiPointDrag,rDrag);
if(!mpSdrPathDragData || !mpSdrPathDragData->bValid)
{
OSL_FAIL("ImpPathForDragAndCreate::BegDrag(): ImpSdrPathDragData is invalid.");
delete mpSdrPathDragData;
- ((ImpPathForDragAndCreate*)this)->mpSdrPathDragData = 0;
+ const_cast<ImpPathForDragAndCreate*>(this)->mpSdrPathDragData = 0;
return false;
}
@@ -2158,7 +2158,7 @@ bool SdrPathObj::hasSpecialDrag() const
bool SdrPathObj::beginSpecialDrag(SdrDragStat& rDrag) const
{
- ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this));
+ ImpPathForDragAndCreate aDragAndCreate(*const_cast<SdrPathObj*>(this));
return aDragAndCreate.beginPathDrag(rDrag);
}
@@ -2202,7 +2202,7 @@ OUString SdrPathObj::getSpecialDragComment(const SdrDragStat& rDrag) const
}
else
{
- ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this));
+ ImpPathForDragAndCreate aDragAndCreate(*const_cast<SdrPathObj*>(this));
bool bDidWork(aDragAndCreate.beginPathDrag((SdrDragStat&)rDrag));
if(bDidWork)
@@ -2217,7 +2217,7 @@ OUString SdrPathObj::getSpecialDragComment(const SdrDragStat& rDrag) const
basegfx::B2DPolyPolygon SdrPathObj::getSpecialDragPoly(const SdrDragStat& rDrag) const
{
basegfx::B2DPolyPolygon aRetval;
- ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this));
+ ImpPathForDragAndCreate aDragAndCreate(*const_cast<SdrPathObj*>(this));
bool bDidWork(aDragAndCreate.beginPathDrag((SdrDragStat&)rDrag));
if(bDidWork)
@@ -2839,7 +2839,7 @@ ImpPathForDragAndCreate& SdrPathObj::impGetDAC() const
{
if(!mpDAC)
{
- ((SdrPathObj*)this)->mpDAC = new ImpPathForDragAndCreate(*((SdrPathObj*)this));
+ const_cast<SdrPathObj*>(this)->mpDAC = new ImpPathForDragAndCreate(*const_cast<SdrPathObj*>(this));
}
return *mpDAC;
@@ -2850,7 +2850,7 @@ void SdrPathObj::impDeleteDAC() const
if(mpDAC)
{
delete mpDAC;
- ((SdrPathObj*)this)->mpDAC = 0L;
+ const_cast<SdrPathObj*>(this)->mpDAC = 0L;
}
}