summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewdraw.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-24 10:40:18 +0200
committerNoel Grandin <noel@peralex.com>2014-11-25 10:09:53 +0200
commit9409b2eb454118eab93542d4dfb464b723b219e2 (patch)
treeb143ccfb63af30b3e47637e096d03261f2586065 /sw/source/uibase/uiview/viewdraw.cxx
parent88aaa3496161339d504876a2e84dc03e4d6191d9 (diff)
loplugin: cstylecast
Change-Id: I030208a86a60609b0379c00957538677fac15ccf
Diffstat (limited to 'sw/source/uibase/uiview/viewdraw.cxx')
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 4e2bfe22d0c5..0d3661e80ed2 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -151,7 +151,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
//determine the size of the object
if(pObj->IsGroupObject())
{
- const Rectangle& rBoundRect = ((SdrObjGroup*)pObj)->GetCurrentBoundRect();
+ const Rectangle& rBoundRect = static_cast<SdrObjGroup*>(pObj)->GetCurrentBoundRect();
aStartPos.X() -= rBoundRect.GetWidth()/2;
aStartPos.Y() -= rBoundRect.GetHeight()/2;
}
@@ -490,7 +490,7 @@ bool SwView::EnterDrawTextMode(const Point& aDocPos)
// To allow SwDrawVirtObj text objects to be activated, allow their type, too.
( pObj->ISA( SdrTextObj ) ||
( pObj->ISA(SwDrawVirtObj) &&
- ((SwDrawVirtObj*)pObj)->GetReferencedObj().ISA(SdrTextObj) ) ) &&
+ static_cast<SwDrawVirtObj*>(pObj)->GetReferencedObj().ISA(SdrTextObj) ) ) &&
!m_pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
{
@@ -564,12 +564,12 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
if(pObj->ISA(SwDrawVirtObj))
{
SwDrawVirtObj* pVirtObj = (SwDrawVirtObj*)pObj;
- pToBeActivated = &((SdrObject&)pVirtObj->GetReferencedObj());
+ pToBeActivated = &const_cast<SdrObject&>(pVirtObj->GetReferencedObj());
aNewTextEditOffset = pVirtObj->GetOffset();
}
// set in each case, thus it will be correct for all objects
- ((SdrTextObj*)pToBeActivated)->SetTextEditOffset(aNewTextEditOffset);
+ static_cast<SdrTextObj*>(pToBeActivated)->SetTextEditOffset(aNewTextEditOffset);
bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, 0, false, false, false ));