diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-15 13:53:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-15 13:57:08 +0200 |
commit | 0ece187f92f9f87ae69b957c498cad8dcce56232 (patch) | |
tree | 1173470f1c2c5d965891f32ff7bff09ec9d778aa /svx/inc/sdr/contact | |
parent | fb7b1f45f9593db2d040dfaa06db0ea60f5308ba (diff) |
loplugin: cstylecast
Change-Id: I0ccdd2ce18336afea67a3f296b26b2de50f14808
Diffstat (limited to 'svx/inc/sdr/contact')
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofgraphic.hxx | 10 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofgroup.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx | 6 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx | 11 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewcontactofunocontrol.hxx | 6 | ||||
-rw-r--r-- | svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx | 1 |
11 files changed, 35 insertions, 65 deletions
diff --git a/svx/inc/sdr/contact/viewcontactofgraphic.hxx b/svx/inc/sdr/contact/viewcontactofgraphic.hxx index eb4ab59f73b4..5655206a73cd 100644 --- a/svx/inc/sdr/contact/viewcontactofgraphic.hxx +++ b/svx/inc/sdr/contact/viewcontactofgraphic.hxx @@ -22,11 +22,11 @@ #include <sal/types.h> #include <svx/sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdograf.hxx> // predeclarations -class SdrGrafObj; namespace drawinglayer { namespace attribute { class SdrLineFillShadowTextAttribute; }} class GraphicAttr; @@ -54,9 +54,13 @@ namespace sdr public: // access to SdrObject - SdrGrafObj& GetGrafObject() const + const SdrGrafObj& GetGrafObject() const { - return ((SdrGrafObj&)GetSdrObject()); + return static_cast<const SdrGrafObj&>(GetSdrObject()); + } + SdrGrafObj& GetGrafObject() + { + return static_cast<SdrGrafObj&>(GetSdrObject()); } // basic constructor, destructor diff --git a/svx/inc/sdr/contact/viewcontactofgroup.hxx b/svx/inc/sdr/contact/viewcontactofgroup.hxx index 6eaa25a0f1ef..b21b31ac8cca 100644 --- a/svx/inc/sdr/contact/viewcontactofgroup.hxx +++ b/svx/inc/sdr/contact/viewcontactofgroup.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGROUP_HXX #include <svx/sdr/contact/viewcontactofsdrobj.hxx> - - -// predeclarations - -class SdrObjGroup; - +#include <svx/svdogrp.hxx> namespace sdr @@ -42,9 +37,9 @@ namespace sdr virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE; // internal access to SdrObject - SdrObjGroup& GetSdrObjGroup() const + const SdrObjGroup& GetSdrObjGroup() const { - return (SdrObjGroup&)GetSdrObject(); + return static_cast<const SdrObjGroup&>(GetSdrObject()); } public: diff --git a/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx index 32640f9349af..df6ea2fa78d4 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX #include <svx/sdr/contact/viewcontactofsdrrectobj.hxx> - - -// predeclarations - -class SdrCaptionObj; - +#include <svx/svdocapt.hxx> namespace sdr @@ -37,9 +32,9 @@ namespace sdr { protected: // internal access to SdrCaptionObj - SdrCaptionObj& GetCaptionObj() const + const SdrCaptionObj& GetCaptionObj() const { - return (SdrCaptionObj&)GetSdrObject(); + return static_cast<const SdrCaptionObj&>(GetSdrObject()); } public: diff --git a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx index 49212a35d35b..a95e9294a4c9 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX #include <svx/sdr/contact/viewcontactofsdrrectobj.hxx> - - -// predeclarations - -class SdrCircObj; - +#include <svx/svdocirc.hxx> namespace sdr @@ -37,9 +32,9 @@ namespace sdr { protected: // internal access to SdrCircObj - SdrCircObj& GetCircObj() const + const SdrCircObj& GetCircObj() const { - return (SdrCircObj&)GetSdrObject(); + return static_cast<const SdrCircObj&>(GetSdrObject()); } public: diff --git a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx index b5ee009708bb..b687acbb8235 100644 --- a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX #include <svx/sdr/contact/viewcontactoftextobj.hxx> - - -// predeclarations - -class SdrEdgeObj; - +#include <svx/svdoedge.hxx> namespace sdr @@ -37,9 +32,9 @@ namespace sdr { protected: // internal access to SdrEdgeObj - SdrEdgeObj& GetEdgeObj() const + const SdrEdgeObj& GetEdgeObj() const { - return (SdrEdgeObj&)GetSdrObject(); + return static_cast<const SdrEdgeObj&>(GetSdrObject()); } public: diff --git a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx index 4be39aab2774..2e505e36ec0f 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX #include <svx/sdr/contact/viewcontactoftextobj.hxx> - - -// predeclarations - -class SdrMeasureObj; - +#include <svx/svdomeas.hxx> namespace sdr @@ -37,9 +32,9 @@ namespace sdr { protected: // internal access to SdrMeasureObj - SdrMeasureObj& GetMeasureObj() const + const SdrMeasureObj& GetMeasureObj() const { - return (SdrMeasureObj&)GetSdrObject(); + return static_cast<const SdrMeasureObj&>(GetSdrObject()); } public: diff --git a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx index fbfcd43d32ff..af8cb3b01840 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX #include <svx/sdr/contact/viewcontactoftextobj.hxx> - - -// predeclarations - -class SdrObjCustomShape; - +#include <svx/svdoashp.hxx> namespace sdr @@ -37,9 +32,9 @@ namespace sdr { protected: // internal access to SdrObjCustomShape - SdrObjCustomShape& GetCustomShapeObj() const + const SdrObjCustomShape& GetCustomShapeObj() const { - return (SdrObjCustomShape&)GetSdrObject(); + return static_cast<const SdrObjCustomShape&>(GetSdrObject()); } // #i101684# internal tooling diff --git a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx index 66db6d6b628a..fba70b22523e 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx @@ -21,12 +21,12 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX #include <svx/sdr/contact/viewcontactofsdrrectobj.hxx> +#include <svx/svdoole2.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> // predeclarations -class SdrOle2Obj; class Graphic; @@ -48,9 +48,9 @@ namespace sdr public: // access to SdrOle2Obj - SdrOle2Obj& GetOle2Obj() const + const SdrOle2Obj& GetOle2Obj() const { - return (SdrOle2Obj&)GetSdrObject(); + return static_cast<const SdrOle2Obj&>(GetSdrObject()); } /// helper to create transformation from SdrObject diff --git a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx index ba44fde710ef..c9d03d285913 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx @@ -21,12 +21,7 @@ #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX #include <svx/sdr/contact/viewcontactoftextobj.hxx> - - -// predeclarations - -class SdrPathObj; - +#include <svx/svdopath.hxx> namespace sdr @@ -37,9 +32,9 @@ namespace sdr { protected: // internal access to SdrPathObj - SdrPathObj& GetPathObj() const + const SdrPathObj& GetPathObj() const { - return (SdrPathObj&)GetSdrObject(); + return static_cast<const SdrPathObj&>(GetSdrObject()); } public: diff --git a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx index 9227f764faff..254b9033ed09 100644 --- a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx +++ b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx @@ -22,13 +22,13 @@ #include <com/sun/star/uno/Reference.hxx> #include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx> +#include <svx/svdouno.hxx> #include <svx/svxdllapi.h> #include <memory> class OutputDevice; namespace vcl { class Window; } -class SdrUnoObj; namespace com { namespace sun { namespace star { namespace awt { class XControl; @@ -51,9 +51,9 @@ namespace sdr { namespace contact { public: // access to SdrObject - SdrUnoObj& GetSdrUnoObj() const + const SdrUnoObj& GetSdrUnoObj() const { - return ((SdrUnoObj&)GetSdrObject()); + return static_cast<const SdrUnoObj&>(GetSdrObject()); } explicit ViewContactOfUnoControl( SdrUnoObj& _rUnoObject ); diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx index be90d488168d..a78ba0fc7957 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx @@ -54,6 +54,7 @@ namespace sdr void forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent); protected: + const SdrGrafObj& getSdrGrafObj() const; SdrGrafObj& getSdrGrafObj(); // This method is responsible for creating the graphical visualisation data |