diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-18 15:10:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-23 17:27:47 +0200 |
commit | 23e1fc277d5651babce17bb74408ef6505f101d2 (patch) | |
tree | edf64a973766400f870095f4ecd25784bfea6ba5 /svx | |
parent | 7f895dfbf5fb084d747e52db678d75e3273cd825 (diff) |
loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery
to maintain constness.
There is now a FIXME in sd/../docshell.cxx because I needed
to use a dynamic_cast there to work around the games it appears
to be playing with OLE in-place activation.
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx
Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 693268de30df..81ad4d8bd0d7 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -614,7 +614,7 @@ bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) const basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, bool bCombine) const { basegfx::B2DPolyPolygon aRetval; - SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj); + const SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj); if(bCombine && pPath && !pObj->GetOutlinerParaObject()) { diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index a106396c04e9..007c97350afa 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -587,7 +587,7 @@ bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, Color*& rpTxtColor, Color*& rpFldColor, OUString& rRet) const { const SvxFieldData* pField=rField.GetField(); - SdrMeasureField* pMeasureField=PTR_CAST(SdrMeasureField,pField); + const SdrMeasureField* pMeasureField=PTR_CAST(SdrMeasureField,pField); if (pMeasureField!=NULL) { rRet = TakeRepresentation(pMeasureField->GetMeasureFieldKind()); if (rpFldColor!=NULL) { diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index efd8d1663eef..966ca3402057 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -154,7 +154,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) if (nCloneErrCnt==0) { for (size_t no=0; no<nAnz; ++no) { const SdrObject* pSrcOb=rSrcList.GetObj(no); - SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pSrcOb); + const SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pSrcOb); if (pSrcEdge!=NULL) { SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(true); SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(false); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 764aafa5ad4e..63d28d9a3535 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2479,7 +2479,7 @@ SvxSimpleUndoRedoController::~SvxSimpleUndoRedoController() void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { - SfxStringItem* pItem = PTR_CAST( SfxStringItem, pState ); + const SfxStringItem* pItem = PTR_CAST( SfxStringItem, pState ); ToolBox& rBox = GetToolBox(); if ( pItem && eState != SfxItemState::DISABLED ) { |