summaryrefslogtreecommitdiff
path: root/svx/source/engine3d
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/engine3d
parent0d05f417c3a7dcde89f5e15b29f39ce2db65b543 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Ic90647cc4da716b54b00520b683cee027a664c22
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r--svx/source/engine3d/scene3d.cxx4
-rw-r--r--svx/source/engine3d/view3d.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index d746f4ecce4c..9805fb54e589 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -273,7 +273,7 @@ sal_uInt32 E3dScene::RemapOrdNum(sal_uInt32 nNewOrdNum) const
if(nObjCount > 1)
{
- ((E3dScene*)this)->mp3DDepthRemapper = new Imp3DDepthRemapper((E3dScene&)(*this));
+ const_cast<E3dScene*>(this)->mp3DDepthRemapper = new Imp3DDepthRemapper((E3dScene&)(*this));
}
}
@@ -399,7 +399,7 @@ E3dScene* E3dScene::GetScene() const
if(GetParentObj())
return GetParentObj()->GetScene();
else
- return (E3dScene*)this;
+ return const_cast<E3dScene*>(this);
}
void E3dScene::removeAllNonSelectedObjects()
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 16150b417904..6de3c9602ca2 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -383,7 +383,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
// scenes as selected objects
SdrMarkList aOldML(GetMarkedObjectList());
SdrMarkList aNewML;
- SdrMarkList& rCurrentMarkList = ((E3dView*)this)->GetMarkedObjectListWriteAccess();
+ SdrMarkList& rCurrentMarkList = const_cast<E3dView*>(this)->GetMarkedObjectListWriteAccess();
rCurrentMarkList = aNewML;
for(size_t nObjs = 0; nObjs < nCount; ++nObjs)
@@ -396,7 +396,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
if(pScene && !IsObjMarked(pScene) && GetSdrPageView())
{
- ((E3dView*)this)->MarkObj(pScene, GetSdrPageView(), false, true);
+ const_cast<E3dView*>(this)->MarkObj(pScene, GetSdrPageView(), false, true);
}
}
}