[Libreoffice-commits] core.git: 2 commits - include/svx svx/inc svx/source xmlsecurity/source
Noel Grandin
noel at peralex.com
Wed Oct 15 04:57:55 PDT 2014
include/svx/sdr/contact/viewcontactofpageobj.hxx | 6
include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx | 6
include/svx/sdr/contact/viewcontactofsdrrectobj.hxx | 11
include/svx/sdr/contact/viewcontactoftextobj.hxx | 11
include/svx/svdomedia.hxx | 4
svx/inc/sdr/contact/viewcontactofgraphic.hxx | 10
svx/inc/sdr/contact/viewcontactofgroup.hxx | 11
svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx | 11
svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx | 11
svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx | 11
svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx | 11
svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx | 11
svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx | 6
svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx | 11
svx/inc/sdr/contact/viewcontactofunocontrol.hxx | 6
svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx | 1
svx/source/items/customshapeitem.cxx | 2
svx/source/items/drawitem.cxx | 12
svx/source/items/e3ditem.cxx | 2
svx/source/items/grfitem.cxx | 11
svx/source/sdr/attribute/sdrformtextattribute.cxx | 42 +-
svx/source/sdr/contact/objectcontactofpageview.cxx | 2
svx/source/sdr/contact/viewcontactofgraphic.cxx | 20 -
svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | 12
svx/source/sdr/contact/viewcontactofsdrcircobj.cxx | 4
svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx | 20 -
svx/source/sdr/contact/viewcontactofsdrobj.cxx | 6
svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx | 2
svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 2
svx/source/sdr/contact/viewcontactofvirtobj.cxx | 10
svx/source/sdr/contact/viewobjectcontactofgraphic.cxx | 7
svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx | 2
svx/source/sdr/overlay/overlaymanager.cxx | 4
svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 2
svx/source/sdr/primitive2d/sdrattributecreator.cxx | 151 +++++-----
svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx | 4
svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx | 2
svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 12
svx/source/svdraw/svdomedia.cxx | 2
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 4
xmlsecurity/source/framework/encryptionengine.cxx | 2
xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 6
xmlsecurity/source/framework/signatureengine.cxx | 4
xmlsecurity/source/xmlsec/nss/secerror.cxx | 4
52 files changed, 237 insertions(+), 270 deletions(-)
New commits:
commit 0ece187f92f9f87ae69b957c498cad8dcce56232
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 15 13:53:53 2014 +0200
loplugin: cstylecast
Change-Id: I0ccdd2ce18336afea67a3f296b26b2de50f14808
diff --git a/include/svx/sdr/contact/viewcontactofpageobj.hxx b/include/svx/sdr/contact/viewcontactofpageobj.hxx
index 60fc63d..a495f09 100644
--- a/include/svx/sdr/contact/viewcontactofpageobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofpageobj.hxx
@@ -22,11 +22,11 @@
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
#include <svx/svxdllapi.h>
+#include <svx/svdopage.hxx>
// predeclarations
-class SdrPageObj;
class SdrPage;
@@ -53,9 +53,9 @@ namespace sdr
virtual void ActionChanged() SAL_OVERRIDE;
// access to SdrObject
- SdrPageObj& GetPageObj() const
+ const SdrPageObj& GetPageObj() const
{
- return (SdrPageObj&)GetSdrObject();
+ return static_cast<const SdrPageObj&>(GetSdrObject());
}
};
} // end of namespace contact
diff --git a/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
index 67e5294..223eff4 100644
--- a/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
@@ -22,12 +22,12 @@
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
#include <svx/svxdllapi.h>
+#include <svx/svdomedia.hxx>
#include <tools/gen.hxx>
// predeclarations
-class SdrMediaObj;
namespace avmedia { class MediaItem; }
@@ -49,9 +49,9 @@ namespace sdr
public:
// access to SdrMediaObj
- SdrMediaObj& GetSdrMediaObj() const
+ const SdrMediaObj& GetSdrMediaObj() const
{
- return (SdrMediaObj&)GetSdrObject();
+ return static_cast<const SdrMediaObj&>(GetSdrObject());
}
Size getPreferredSize() const;
diff --git a/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx b/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
index 88ddf46..9bad53a 100644
--- a/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofsdrrectobj.hxx
@@ -21,12 +21,7 @@
#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX
#include <svx/sdr/contact/viewcontactoftextobj.hxx>
-
-
-// predeclarations
-
-class SdrRectObj;
-
+#include <svx/svdorect.hxx>
namespace sdr
@@ -37,9 +32,9 @@ namespace sdr
{
protected:
// internal access to SdrRectObj
- SdrRectObj& GetRectObj() const
+ const SdrRectObj& GetRectObj() const
{
- return (SdrRectObj&)GetSdrObject();
+ return static_cast<const SdrRectObj&>(GetSdrObject());
}
public:
diff --git a/include/svx/sdr/contact/viewcontactoftextobj.hxx b/include/svx/sdr/contact/viewcontactoftextobj.hxx
index 3fa4639..fb07c4c 100644
--- a/include/svx/sdr/contact/viewcontactoftextobj.hxx
+++ b/include/svx/sdr/contact/viewcontactoftextobj.hxx
@@ -21,12 +21,7 @@
#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
-
-
-// predeclarations
-
-class SdrTextObj;
-
+#include <svx/svdotext.hxx>
namespace sdr
@@ -37,9 +32,9 @@ namespace sdr
{
protected:
// internal access to SdrTextObj
- SdrTextObj& GetTextObj() const
+ const SdrTextObj& GetTextObj() const
{
- return (SdrTextObj&)GetSdrObject();
+ return static_cast<const SdrTextObj&>(GetSdrObject());
}
public:
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
index 224f117..a828d11 100644
--- a/include/svx/svdomedia.hxx
+++ b/include/svx/svdomedia.hxx
@@ -68,8 +68,8 @@ public:
Size getPreferredSize() const;
- ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
- getSnapshot();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
+ getSnapshot() const;
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>
GetInputStream();
void SetInputStream(css::uno::Reference<css::io::XInputStream> const&);
diff --git a/svx/inc/sdr/contact/viewcontactofgraphic.hxx b/svx/inc/sdr/contact/viewcontactofgraphic.hxx
index eb4ab59..5655206 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 6eaa25a..b21b31a 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 32640f9..df6ea2f 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 49212a3..a95e929 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 b5ee009..b687acb 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 4be39aa..2e505e3 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 fbfcd43..af8cb3b 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 66db6d6..fba70b2 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 ba44fde..c9d03d2 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 9227f76..254b903 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 be90d48..a78ba0f 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
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index f926636..751f13f 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -244,7 +244,7 @@ bool SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) const
{
bool bRet = SfxPoolItem::operator==( rCmp );
if ( bRet )
- bRet = ((SdrCustomShapeGeometryItem&)rCmp).aPropSeq == aPropSeq;
+ bRet = static_cast<const SdrCustomShapeGeometryItem&>(rCmp).aPropSeq == aPropSeq;
return bRet;
}
diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx
index 89710db..d21a57b 100644
--- a/svx/source/items/drawitem.cxx
+++ b/svx/source/items/drawitem.cxx
@@ -63,7 +63,7 @@ bool SvxColorListItem::GetPresentation
bool SvxColorListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( SvxColorListItem& ) rItem).pColorList == pColorList;
+ return static_cast<const SvxColorListItem&>(rItem).pColorList == pColorList;
}
SfxPoolItem* SvxColorListItem::Clone( SfxItemPool * ) const
@@ -127,7 +127,7 @@ bool SvxGradientListItem::GetPresentation
bool SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( SvxGradientListItem& ) rItem).pGradientList == pGradientList;
+ return static_cast<const SvxGradientListItem&>(rItem).pGradientList == pGradientList;
}
@@ -175,7 +175,7 @@ bool SvxHatchListItem::GetPresentation
bool SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( SvxHatchListItem& ) rItem).pHatchList == pHatchList;
+ return static_cast<const SvxHatchListItem&>(rItem).pHatchList == pHatchList;
}
@@ -217,7 +217,7 @@ bool SvxBitmapListItem::GetPresentation
bool SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( SvxBitmapListItem& ) rItem).pBitmapList == pBitmapList;
+ return static_cast<const SvxBitmapListItem&>(rItem).pBitmapList == pBitmapList;
}
SfxPoolItem* SvxBitmapListItem::Clone( SfxItemPool * ) const
@@ -259,7 +259,7 @@ bool SvxDashListItem::GetPresentation
bool SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( SvxDashListItem& ) rItem).pDashList == pDashList;
+ return static_cast<const SvxDashListItem&>(rItem).pDashList == pDashList;
}
SfxPoolItem* SvxDashListItem::Clone( SfxItemPool * ) const
@@ -300,7 +300,7 @@ bool SvxLineEndListItem::GetPresentation
bool SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ( ( SvxLineEndListItem& ) rItem).pLineEndList == pLineEndList;
+ return static_cast<const SvxLineEndListItem&>(rItem).pLineEndList == pLineEndList;
}
SfxPoolItem* SvxLineEndListItem::Clone( SfxItemPool * ) const
diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx
index 8dd3500..fd6635a 100644
--- a/svx/source/items/e3ditem.cxx
+++ b/svx/source/items/e3ditem.cxx
@@ -58,7 +58,7 @@ SvxB3DVectorItem::SvxB3DVectorItem( const SvxB3DVectorItem& rItem ) :
bool SvxB3DVectorItem::operator==( const SfxPoolItem &rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
- return ((SvxB3DVectorItem&)rItem).aVal == aVal;
+ return static_cast<const SvxB3DVectorItem&>(rItem).aVal == aVal;
}
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx
index f06abd1..44ef7f8f 100644
--- a/svx/source/items/grfitem.cxx
+++ b/svx/source/items/grfitem.cxx
@@ -43,10 +43,11 @@ SvxGrfCrop::~SvxGrfCrop()
bool SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "not equal attributes" );
- return nLeft == ((const SvxGrfCrop&)rAttr).GetLeft() &&
- nRight == ((const SvxGrfCrop&)rAttr).GetRight() &&
- nTop == ((const SvxGrfCrop&)rAttr).GetTop() &&
- nBottom == ((const SvxGrfCrop&)rAttr).GetBottom();
+ const SvxGrfCrop& rCrop = static_cast<const SvxGrfCrop&>(rAttr);
+ return nLeft == rCrop.GetLeft() &&
+ nRight == rCrop.GetRight() &&
+ nTop == rCrop.GetTop() &&
+ nBottom == rCrop.GetBottom();
}
SfxPoolItem* SvxGrfCrop::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
@@ -57,7 +58,7 @@ SfxPoolItem* SvxGrfCrop::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
if( GRFCROP_VERSION_SWDEFAULT == nVersion )
top = -top, bottom = -bottom, left = -left, right = -right;
- SvxGrfCrop* pNew = (SvxGrfCrop*)Clone();
+ SvxGrfCrop* pNew = static_cast<SvxGrfCrop*>(Clone());
pNew->SetLeft( left );
pNew->SetRight( right );
pNew->SetTop( top );
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index 7fd8fe9..319c893 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -83,11 +83,11 @@ namespace
if(bShadow)
{
- nRetval = (sal_uInt8)((((SdrPercentItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
+ nRetval = (sal_uInt8)(((static_cast<const SdrPercentItem&>(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
}
else
{
- nRetval = (sal_uInt8)((((XLineTransparenceItem&)(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue() * 255) / 100);
+ nRetval = (sal_uInt8)(((static_cast<const XLineTransparenceItem&>(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue() * 255) / 100);
}
return nRetval;
@@ -99,18 +99,18 @@ namespace
if(bShadow)
{
- const Color aShadowColor(((XColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
+ const Color aShadowColor((static_cast<const XColorItem&>(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
aColorAttribute = aShadowColor.getBColor();
}
else
{
- const Color aLineColor(((XLineColorItem&)(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
+ const Color aLineColor((static_cast<const XLineColorItem&>(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
aColorAttribute = aLineColor.getBColor();
}
- const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
- const com::sun::star::drawing::LineJoint eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
- const com::sun::star::drawing::LineCap eLineCap = ((const XLineCapItem&)(rSet.Get(XATTR_LINECAP))).GetValue();
+ const sal_uInt32 nLineWidth = (static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ const com::sun::star::drawing::LineJoint eLineJoint = (static_cast<const XLineJointItem&>(rSet.Get(XATTR_LINEJOINT))).GetValue();
+ const com::sun::star::drawing::LineCap eLineCap = (static_cast<const XLineCapItem&>(rSet.Get(XATTR_LINECAP))).GetValue();
return drawinglayer::attribute::LineAttribute(
aColorAttribute,
@@ -121,17 +121,17 @@ namespace
drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
{
- const XLineStyle eLineStyle = ((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+ const XLineStyle eLineStyle = (static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE))).GetValue();
double fFullDotDashLen(0.0);
::std::vector< double > aDotDashArray;
if(XLINE_DASH == eLineStyle)
{
- const XDash& rDash = ((const XLineDashItem&)(rSet.Get(XATTR_LINEDASH))).GetDashValue();
+ const XDash& rDash = (static_cast<const XLineDashItem&>(rSet.Get(XATTR_LINEDASH))).GetDashValue();
if(rDash.GetDots() || rDash.GetDashes())
{
- const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ const sal_uInt32 nLineWidth = (static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH))).GetValue();
fFullDotDashLen = rDash.CreateDotDashArray(aDotDashArray, (double)nLineWidth);
}
}
@@ -174,19 +174,19 @@ namespace drawinglayer
explicit ImpSdrFormTextAttribute(const SfxItemSet& rSet)
: mnRefCount(0),
- mnFormTextDistance(((const XFormTextDistanceItem&)rSet.Get(XATTR_FORMTXTDISTANCE)).GetValue()),
- mnFormTextStart(((const XFormTextStartItem&)rSet.Get(XATTR_FORMTXTSTART)).GetValue()),
- mnFormTextShdwXVal(((const XFormTextShadowXValItem&)rSet.Get(XATTR_FORMTXTSHDWXVAL)).GetValue()),
- mnFormTextShdwYVal(((const XFormTextShadowYValItem&)rSet.Get(XATTR_FORMTXTSHDWYVAL)).GetValue()),
- mnFormTextShdwTransp(((const XFormTextShadowTranspItem&)rSet.Get(XATTR_FORMTXTSHDWTRANSP)).GetValue()),
- meFormTextStyle(((const XFormTextStyleItem&)rSet.Get(XATTR_FORMTXTSTYLE)).GetValue()),
- meFormTextAdjust(((const XFormTextAdjustItem&)rSet.Get(XATTR_FORMTXTADJUST)).GetValue()),
- meFormTextShadow(((const XFormTextShadowItem&)rSet.Get(XATTR_FORMTXTSHADOW)).GetValue()),
- maFormTextShdwColor(((const XFormTextShadowColorItem&)rSet.Get(XATTR_FORMTXTSHDWCOLOR)).GetColorValue()),
+ mnFormTextDistance(static_cast<const XFormTextDistanceItem&>(rSet.Get(XATTR_FORMTXTDISTANCE)).GetValue()),
+ mnFormTextStart(static_cast<const XFormTextStartItem&>(rSet.Get(XATTR_FORMTXTSTART)).GetValue()),
+ mnFormTextShdwXVal(static_cast<const XFormTextShadowXValItem&>(rSet.Get(XATTR_FORMTXTSHDWXVAL)).GetValue()),
+ mnFormTextShdwYVal(static_cast<const XFormTextShadowYValItem&>(rSet.Get(XATTR_FORMTXTSHDWYVAL)).GetValue()),
+ mnFormTextShdwTransp(static_cast<const XFormTextShadowTranspItem&>(rSet.Get(XATTR_FORMTXTSHDWTRANSP)).GetValue()),
+ meFormTextStyle(static_cast<const XFormTextStyleItem&>(rSet.Get(XATTR_FORMTXTSTYLE)).GetValue()),
+ meFormTextAdjust(static_cast<const XFormTextAdjustItem&>(rSet.Get(XATTR_FORMTXTADJUST)).GetValue()),
+ meFormTextShadow(static_cast<const XFormTextShadowItem&>(rSet.Get(XATTR_FORMTXTSHADOW)).GetValue()),
+ maFormTextShdwColor(static_cast<const XFormTextShadowColorItem&>(rSet.Get(XATTR_FORMTXTSHDWCOLOR)).GetColorValue()),
maOutline(),
maShadowOutline(),
- mbFormTextMirror(((const XFormTextMirrorItem&)rSet.Get(XATTR_FORMTXTMIRROR)).GetValue()),
- mbFormTextOutline(((const XFormTextOutlineItem&)rSet.Get(XATTR_FORMTXTOUTLINE)).GetValue())
+ mbFormTextMirror(static_cast<const XFormTextMirrorItem&>(rSet.Get(XATTR_FORMTXTMIRROR)).GetValue()),
+ mbFormTextOutline(static_cast<const XFormTextOutlineItem&>(rSet.Get(XATTR_FORMTXTOUTLINE)).GetValue())
{
if(getFormTextOutline())
{
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index c9d9366..6fd3674 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -325,7 +325,7 @@ namespace sdr
if(pActiveGroupList->ISA(SdrPage))
{
// It's a Page itself
- return &(((SdrPage*)pActiveGroupList)->GetViewContact());
+ return &(static_cast<SdrPage*>(pActiveGroupList)->GetViewContact());
}
else if(pActiveGroupList->GetOwnerObj())
{
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 2b62285..3585472 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -300,17 +300,17 @@ namespace sdr
// create and fill GraphicAttr
GraphicAttr aLocalGrafInfo;
- const sal_uInt16 nTrans(((SdrGrafTransparenceItem&)rItemSet.Get(SDRATTR_GRAFTRANSPARENCE)).GetValue());
- const SdrGrafCropItem& rCrop((const SdrGrafCropItem&)rItemSet.Get(SDRATTR_GRAFCROP));
- aLocalGrafInfo.SetLuminance(((SdrGrafLuminanceItem&)rItemSet.Get(SDRATTR_GRAFLUMINANCE)).GetValue());
- aLocalGrafInfo.SetContrast(((SdrGrafContrastItem&)rItemSet.Get(SDRATTR_GRAFCONTRAST)).GetValue());
- aLocalGrafInfo.SetChannelR(((SdrGrafRedItem&)rItemSet.Get(SDRATTR_GRAFRED)).GetValue());
- aLocalGrafInfo.SetChannelG(((SdrGrafGreenItem&)rItemSet.Get(SDRATTR_GRAFGREEN)).GetValue());
- aLocalGrafInfo.SetChannelB(((SdrGrafBlueItem&)rItemSet.Get(SDRATTR_GRAFBLUE)).GetValue());
- aLocalGrafInfo.SetGamma(((SdrGrafGamma100Item&)rItemSet.Get(SDRATTR_GRAFGAMMA)).GetValue() * 0.01);
+ const sal_uInt16 nTrans(static_cast<const SdrGrafTransparenceItem&>(rItemSet.Get(SDRATTR_GRAFTRANSPARENCE)).GetValue());
+ const SdrGrafCropItem& rCrop(static_cast<const SdrGrafCropItem&>(rItemSet.Get(SDRATTR_GRAFCROP)));
+ aLocalGrafInfo.SetLuminance(static_cast<const SdrGrafLuminanceItem&>(rItemSet.Get(SDRATTR_GRAFLUMINANCE)).GetValue());
+ aLocalGrafInfo.SetContrast(static_cast<const SdrGrafContrastItem&>(rItemSet.Get(SDRATTR_GRAFCONTRAST)).GetValue());
+ aLocalGrafInfo.SetChannelR(static_cast<const SdrGrafRedItem&>(rItemSet.Get(SDRATTR_GRAFRED)).GetValue());
+ aLocalGrafInfo.SetChannelG(static_cast<const SdrGrafGreenItem&>(rItemSet.Get(SDRATTR_GRAFGREEN)).GetValue());
+ aLocalGrafInfo.SetChannelB(static_cast<const SdrGrafBlueItem&>(rItemSet.Get(SDRATTR_GRAFBLUE)).GetValue());
+ aLocalGrafInfo.SetGamma(static_cast<const SdrGrafGamma100Item&>(rItemSet.Get(SDRATTR_GRAFGAMMA)).GetValue() * 0.01);
aLocalGrafInfo.SetTransparency((sal_uInt8)::basegfx::fround(std::min(nTrans, (sal_uInt16)100) * 2.55));
- aLocalGrafInfo.SetInvert(((SdrGrafInvertItem&)rItemSet.Get(SDRATTR_GRAFINVERT)).GetValue());
- aLocalGrafInfo.SetDrawMode(((SdrGrafModeItem&)rItemSet.Get(SDRATTR_GRAFMODE)).GetValue());
+ aLocalGrafInfo.SetInvert(static_cast<const SdrGrafInvertItem&>(rItemSet.Get(SDRATTR_GRAFINVERT)).GetValue());
+ aLocalGrafInfo.SetDrawMode(static_cast<const SdrGrafModeItem&>(rItemSet.Get(SDRATTR_GRAFMODE)).GetValue());
aLocalGrafInfo.SetCrop(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom());
// we have content if graphic is not completely transparent
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 3f013d95..c144514 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -108,10 +108,10 @@ namespace sdr
{
// for SC, the caption object may have a specialized shadow. The usual object shadow is off
// and a specialized shadow gets created here (see old paint)
- const XColorItem& rShadColItem = (XColorItem&)(rItemSet.Get(SDRATTR_SHADOWCOLOR));
- const sal_uInt16 nShadowTransparence(((SdrPercentItem&)(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
+ const XColorItem& rShadColItem = static_cast<const XColorItem&>(rItemSet.Get(SDRATTR_SHADOWCOLOR));
+ const sal_uInt16 nShadowTransparence((static_cast<const SdrPercentItem&>(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
const Color aShadowColor(rShadColItem.GetColorValue());
- const drawing::FillStyle eShadowStyle = ((XFillStyleItem&)(rItemSet.Get(XATTR_FILLSTYLE))).GetValue();
+ const drawing::FillStyle eShadowStyle = (static_cast<const XFillStyleItem&>(rItemSet.Get(XATTR_FILLSTYLE))).GetValue();
// Create own ItemSet and modify as needed
// Always hide lines for special calc shadow
@@ -121,7 +121,7 @@ namespace sdr
if(drawing::FillStyle_HATCH == eShadowStyle)
{
// #41666# Hatch color is set hard to shadow color
- XHatch aHatch = ((XFillHatchItem&)(rItemSet.Get(XATTR_FILLHATCH))).GetHatchValue();
+ XHatch aHatch = (static_cast<const XFillHatchItem&>(rItemSet.Get(XATTR_FILLHATCH))).GetHatchValue();
aHatch.SetColor(aShadowColor);
aSet.Put(XFillHatchItem(OUString(),aHatch));
}
@@ -145,8 +145,8 @@ namespace sdr
if(!aFill.isDefault() && 1.0 != aFill.getTransparence())
{
// add shadow offset to object matrix
- const sal_uInt32 nXDist(((SdrMetricItem&)(rItemSet.Get(SDRATTR_SHADOWXDIST))).GetValue());
- const sal_uInt32 nYDist(((SdrMetricItem&)(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue());
+ const sal_uInt32 nXDist((static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWXDIST))).GetValue());
+ const sal_uInt32 nYDist((static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue());
if(nXDist || nYDist)
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
index 79a849c..bd07bec 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
@@ -86,8 +86,8 @@ namespace sdr
}
else
{
- const sal_Int32 nNewStart(((SdrCircStartAngleItem&)rItemSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue());
- const sal_Int32 nNewEnd(((SdrCircEndAngleItem&)rItemSet.Get(SDRATTR_CIRCENDANGLE)).GetValue());
+ const sal_Int32 nNewStart(static_cast<const SdrCircStartAngleItem&>(rItemSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue());
+ const sal_Int32 nNewEnd(static_cast<const SdrCircEndAngleItem&>(rItemSet.Get(SDRATTR_CIRCENDANGLE)).GetValue());
const double fStart(((36000 - nNewEnd) % 36000) * F_PI18000);
const double fEnd(((36000 - nNewStart) % 36000) * F_PI18000);
const bool bCloseSegment(OBJ_CARC != nIdentifier);
diff --git a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
index 462d32f..ed1dc0c 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
@@ -55,18 +55,18 @@ namespace sdr
// take properties which are the model data.
const ::basegfx::B2DPoint aStart(GetMeasureObj().GetPoint(0).X(), GetMeasureObj().GetPoint(0).Y());
const ::basegfx::B2DPoint aEnd(GetMeasureObj().GetPoint(1).X(), GetMeasureObj().GetPoint(1).Y());
- const double fDistance(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASURELINEDIST)).GetValue());
- const double fUpperDistance(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue());
- const double fLowerDistance(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINEDIST)).GetValue());
- const double fLeftDelta(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINE1LEN)).GetValue());
- const double fRightDelta(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINE2LEN)).GetValue());
- const bool bBelow(((SdrMeasureBelowRefEdgeItem&)rItemSet.Get(SDRATTR_MEASUREBELOWREFEDGE)).GetValue());
- const bool bTextRotation(((SdrMeasureTextRota90Item&)rItemSet.Get(SDRATTR_MEASURETEXTROTA90)).GetValue());
- const bool bTextAutoAngle(((SdrMeasureTextAutoAngleItem&)rItemSet.Get(SDRATTR_MEASURETEXTAUTOANGLE)).GetValue());
+ const double fDistance(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASURELINEDIST)).GetValue());
+ const double fUpperDistance(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue());
+ const double fLowerDistance(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINEDIST)).GetValue());
+ const double fLeftDelta(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINE1LEN)).GetValue());
+ const double fRightDelta(static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_MEASUREHELPLINE2LEN)).GetValue());
+ const bool bBelow(static_cast<const SdrMeasureBelowRefEdgeItem&>(rItemSet.Get(SDRATTR_MEASUREBELOWREFEDGE)).GetValue());
+ const bool bTextRotation(static_cast<const SdrMeasureTextRota90Item&>(rItemSet.Get(SDRATTR_MEASURETEXTROTA90)).GetValue());
+ const bool bTextAutoAngle(static_cast<const SdrMeasureTextAutoAngleItem&>(rItemSet.Get(SDRATTR_MEASURETEXTAUTOANGLE)).GetValue());
drawinglayer::primitive2d::MeasureTextPosition aMTPHor(drawinglayer::primitive2d::MEASURETEXTPOSITION_AUTOMATIC);
drawinglayer::primitive2d::MeasureTextPosition aMTPVer(drawinglayer::primitive2d::MEASURETEXTPOSITION_AUTOMATIC);
- switch(((SdrMeasureTextHPosItem&)rItemSet.Get(SDRATTR_MEASURETEXTHPOS)).GetValue())
+ switch(static_cast<const SdrMeasureTextHPosItem&>(rItemSet.Get(SDRATTR_MEASURETEXTHPOS)).GetValue())
{
case SDRMEASURE_TEXTLEFTOUTSIDE :
{
@@ -89,7 +89,7 @@ namespace sdr
}
}
- switch(((SdrMeasureTextVPosItem&)rItemSet.Get(SDRATTR_MEASURETEXTVPOS)).GetValue())
+ switch(static_cast<const SdrMeasureTextVPosItem&>(rItemSet.Get(SDRATTR_MEASURETEXTVPOS)).GetValue())
{
case SDRMEASURE_ABOVE :
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
index 946ffac..3da45e7 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
@@ -58,7 +58,7 @@ namespace sdr
// init AnimationKind
if(GetSdrObject().ISA(SdrTextObj))
{
- SdrTextObj& rTextObj = (SdrTextObj&)GetSdrObject();
+ SdrTextObj& rTextObj = static_cast<SdrTextObj&>(GetSdrObject());
meRememberedAnimationKind = rTextObj.GetTextAniKind();
}
}
@@ -97,7 +97,7 @@ namespace sdr
if(pObjList->ISA(SdrPage))
{
// Is a page
- pRetval = &(((SdrPage*)pObjList)->GetViewContact());
+ pRetval = &(static_cast<SdrPage*>(pObjList)->GetViewContact());
}
else
{
@@ -118,7 +118,7 @@ namespace sdr
// look for own changes
if(GetSdrObject().ISA(SdrTextObj))
{
- SdrTextObj& rTextObj = (SdrTextObj&)GetSdrObject();
+ SdrTextObj& rTextObj = static_cast<SdrTextObj&>(GetSdrObject());
if(rTextObj.GetTextAniKind() != meRememberedAnimationKind)
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index bf6a31e..9ec7ccf 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -216,7 +216,7 @@ namespace sdr
}
// check if SdrTextWordWrapItem is set
- bWordWrap = ((SdrOnOffItem&)(GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue();
+ bWordWrap = (static_cast<const SdrOnOffItem&>(GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue();
}
// create primitive
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index ceabecd..673abb4 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -71,7 +71,7 @@ namespace sdr
aObjectRange.getMinX(), aObjectRange.getMinY()));
// calculate corner radius
- sal_uInt32 nCornerRadius(((SdrMetricItem&)(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue());
+ sal_uInt32 nCornerRadius((static_cast<const SdrMetricItem&>(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue());
double fCornerRadiusX;
double fCornerRadiusY;
drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY);
diff --git a/svx/source/sdr/contact/viewcontactofvirtobj.cxx b/svx/source/sdr/contact/viewcontactofvirtobj.cxx
index a43c641..e75a2dc 100644
--- a/svx/source/sdr/contact/viewcontactofvirtobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofvirtobj.cxx
@@ -31,11 +31,6 @@ namespace sdr
{
namespace contact
{
- SdrVirtObj& ViewContactOfVirtObj::GetVirtObj() const
- {
- return (SdrVirtObj&)mrObject;
- }
-
ViewContactOfVirtObj::ViewContactOfVirtObj(SdrVirtObj& rObj)
: ViewContactOfSdrObj(rObj)
{
@@ -45,6 +40,11 @@ namespace sdr
{
}
+ SdrVirtObj& ViewContactOfVirtObj::GetVirtObj() const
+ {
+ return static_cast<SdrVirtObj&>(mrObject);
+ }
+
// Access to possible sub-hierarchy
sal_uInt32 ViewContactOfVirtObj::GetObjectCount() const
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 5649d32..a445b75 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -230,9 +230,14 @@ namespace sdr
}
}
+ const SdrGrafObj& ViewObjectContactOfGraphic::getSdrGrafObj() const
+ {
+ return static_cast<const ViewContactOfGraphic& >(GetViewContact()).GetGrafObject();
+ }
+
SdrGrafObj& ViewObjectContactOfGraphic::getSdrGrafObj()
{
- return static_cast< ViewContactOfGraphic& >(GetViewContact()).GetGrafObject();
+ return static_cast<ViewContactOfGraphic& >(GetViewContact()).GetGrafObject();
}
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGraphic::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index 3ac4ca1..d61bc3e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -101,7 +101,7 @@ namespace sdr
{
if(OBJ_OLE2 == rObject.GetObjIdentifier())
{
- if(((SdrOle2Obj&)rObject).IsChart())
+ if(static_cast<const SdrOle2Obj&>(rObject).IsChart())
{
// chart
if(bHideChart)
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index ec754ba..1d8e778 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -315,7 +315,7 @@ namespace sdr
(sal_Int32)ceil(rRange.getMaxY() + fDiscreteOne));
// simply invalidate
- ((vcl::Window&)getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
+ static_cast<vcl::Window&>(getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
}
else
{
@@ -326,7 +326,7 @@ namespace sdr
(sal_Int32)ceil(rRange.getMaxX()), (sal_Int32)ceil(rRange.getMaxY()));
// simply invalidate
- ((vcl::Window&)getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
+ static_cast<vcl::Window&>(getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
}
}
}
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 46bd77b..175e12e 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -193,7 +193,7 @@ namespace sdr
// but always the exact redraw area
if(OUTDEV_WINDOW == rSource.GetOutDevType())
{
- vcl::Window& rWindow = (vcl::Window&)rSource;
+ vcl::Window& rWindow = static_cast<vcl::Window&>(rSource);
vcl::Region aPaintRegionPixel = rWindow.LogicToPixel(rWindow.GetPaintRegion());
aRegion.Intersect(aPaintRegionPixel);
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 637e540..06ade19 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -218,11 +218,11 @@ namespace drawinglayer
{
attribute::SdrLineAttribute createNewSdrLineAttribute(const SfxItemSet& rSet)
{
- const XLineStyle eStyle(((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue());
+ const XLineStyle eStyle(static_cast<const XLineStyleItem&>(rSet.Get(XATTR_LINESTYLE)).GetValue());
if(XLINE_NONE != eStyle)
{
- sal_uInt16 nTransparence(((const XLineTransparenceItem&)(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue());
+ sal_uInt16 nTransparence(static_cast<const XLineTransparenceItem&>(rSet.Get(XATTR_LINETRANSPARENCE)).GetValue());
if(nTransparence > 100)
{
@@ -231,16 +231,16 @@ namespace drawinglayer
if(100 != nTransparence)
{
- const sal_uInt32 nWidth(((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue());
- const Color aColor(((const XLineColorItem&)(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
- const com::sun::star::drawing::LineJoint eJoint(((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue());
- const com::sun::star::drawing::LineCap eCap(((const XLineCapItem&)(rSet.Get(XATTR_LINECAP))).GetValue());
+ const sal_uInt32 nWidth(static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue());
+ const Color aColor(static_cast<const XLineColorItem&>(rSet.Get(XATTR_LINECOLOR)).GetColorValue());
+ const com::sun::star::drawing::LineJoint eJoint(static_cast<const XLineJointItem&>(rSet.Get(XATTR_LINEJOINT)).GetValue());
+ const com::sun::star::drawing::LineCap eCap(static_cast<const XLineCapItem&>(rSet.Get(XATTR_LINECAP)).GetValue());
::std::vector< double > aDotDashArray;
double fFullDotDashLen(0.0);
if(XLINE_DASH == eStyle)
{
- const XDash& rDash = ((const XLineDashItem&)(rSet.Get(XATTR_LINEDASH))).GetDashValue();
+ const XDash& rDash = static_cast<const XLineDashItem&>(rSet.Get(XATTR_LINEDASH)).GetDashValue();
if(rDash.GetDots() || rDash.GetDashes())
{
@@ -266,8 +266,8 @@ namespace drawinglayer
const SfxItemSet& rSet,
double fWidth)
{
- const sal_Int32 nTempStartWidth(((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue());
- const sal_Int32 nTempEndWidth(((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue());
+ const sal_Int32 nTempStartWidth(static_cast<const XLineStartWidthItem&>(rSet.Get(XATTR_LINESTARTWIDTH)).GetValue());
+ const sal_Int32 nTempEndWidth(static_cast<const XLineEndWidthItem&>(rSet.Get(XATTR_LINEENDWIDTH)).GetValue());
basegfx::B2DPolyPolygon aStartPolyPolygon;
basegfx::B2DPolyPolygon aEndPolyPolygon;
double fStartWidth(0.0);
@@ -290,12 +290,12 @@ namespace drawinglayer
if(0.0 != fStartWidth)
{
- aStartPolyPolygon = basegfx::B2DPolyPolygon(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetLineStartValue());
+ aStartPolyPolygon = basegfx::B2DPolyPolygon(static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue());
if(aStartPolyPolygon.count() && aStartPolyPolygon.getB2DPolygon(0L).count())
{
bStartActive = true;
- bStartCentered = ((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+ bStartCentered = static_cast<const XLineStartCenterItem&>(rSet.Get(XATTR_LINESTARTCENTER)).GetValue();
}
}
}
@@ -313,12 +313,12 @@ namespace drawinglayer
if(0.0 != fEndWidth)
{
- aEndPolyPolygon = basegfx::B2DPolyPolygon(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetLineEndValue());
+ aEndPolyPolygon = basegfx::B2DPolyPolygon(static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue());
if(aEndPolyPolygon.count() && aEndPolyPolygon.getB2DPolygon(0L).count())
{
bEndActive = true;
- bEndCentered = ((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+ bEndCentered = static_cast<const XLineEndCenterItem&>(rSet.Get(XATTR_LINEENDCENTER)).GetValue();
}
}
}
@@ -335,11 +335,11 @@ namespace drawinglayer
attribute::SdrShadowAttribute createNewSdrShadowAttribute(const SfxItemSet& rSet)
{
- const bool bShadow(((SdrOnOffItem&)rSet.Get(SDRATTR_SHADOW)).GetValue());
+ const bool bShadow(static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_SHADOW)).GetValue());
if(bShadow)
{
- sal_uInt16 nTransparence(((SdrPercentItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue());
+ sal_uInt16 nTransparence(static_cast<const SdrPercentItem&>(rSet.Get(SDRATTR_SHADOWTRANSPARENCE)).GetValue());
if(nTransparence > 100)
{
@@ -348,7 +348,7 @@ namespace drawinglayer
if(nTransparence)
{
- sal_uInt16 nFillTransparence(((const XFillTransparenceItem&)(rSet.Get(XATTR_FILLTRANSPARENCE))).GetValue());
+ sal_uInt16 nFillTransparence(static_cast<const XFillTransparenceItem&>(rSet.Get(XATTR_FILLTRANSPARENCE)).GetValue());
if(nFillTransparence > 100)
{
@@ -368,9 +368,9 @@ namespace drawinglayer
if(100 != nTransparence)
{
const basegfx::B2DVector aOffset(
- (double)((SdrMetricItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue(),
- (double)((SdrMetricItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue());
- const Color aColor(((XColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
+ (double)static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_SHADOWXDIST)).GetValue(),
+ (double)static_cast<const SdrMetricItem&>(rSet.Get(SDRATTR_SHADOWYDIST)).GetValue());
+ const Color aColor(static_cast<const XColorItem&>(rSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue());
return attribute::SdrShadowAttribute(aOffset, (double)nTransparence * 0.01, aColor.getBColor());
}
@@ -381,9 +381,9 @@ namespace drawinglayer
attribute::SdrFillAttribute createNewSdrFillAttribute(const SfxItemSet& rSet)
{
- const drawing::FillStyle eStyle(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue());
+ const drawing::FillStyle eStyle(static_cast<const XFillStyleItem&>(rSet.Get(XATTR_FILLSTYLE)).GetValue());
- sal_uInt16 nTransparence(((const XFillTransparenceItem&)(rSet.Get(XATTR_FILLTRANSPARENCE))).GetValue());
+ sal_uInt16 nTransparence(static_cast<const XFillTransparenceItem&>(rSet.Get(XATTR_FILLTRANSPARENCE)).GetValue());
if(nTransparence > 100)
{
@@ -398,9 +398,9 @@ namespace drawinglayer
const SfxPoolItem* pGradientItem;
if(SfxItemState::SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem)
- && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled())
+ && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled())
{
- const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue();
+ const XGradient& rGradient = static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->GetGradientValue();
const sal_uInt8 nStartLuminance(rGradient.GetStartColor().GetLuminance());
const sal_uInt8 nEndLuminance(rGradient.GetEndColor().GetLuminance());
const bool bCompletelyTransparent(0xff == nStartLuminance && 0xff == nEndLuminance);
@@ -414,7 +414,7 @@ namespace drawinglayer
if(100 != nTransparence)
{
- const Color aColor(((const XFillColorItem&)(rSet.Get(XATTR_FILLCOLOR))).GetColorValue());
+ const Color aColor(static_cast<const XFillColorItem&>(rSet.Get(XATTR_FILLCOLOR)).GetColorValue());
attribute::FillGradientAttribute aGradient;
attribute::FillHatchAttribute aHatch;
attribute::SdrFillGraphicAttribute aFillGraphic;
@@ -430,7 +430,7 @@ namespace drawinglayer
}
case drawing::FillStyle_GRADIENT :
{
- XGradient aXGradient(((XFillGradientItem&)(rSet.Get(XATTR_FILLGRADIENT))).GetGradientValue());
+ XGradient aXGradient(static_cast<const XFillGradientItem&>(rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue());
const Color aStartColor(aXGradient.GetStartColor());
const sal_uInt16 nStartIntens(aXGradient.GetStartIntens());
@@ -460,13 +460,13 @@ namespace drawinglayer
(double)aXGradient.GetAngle() * F_PI1800,
aStart,
aEnd,
- ((const XGradientStepCountItem&)rSet.Get(XATTR_GRADIENTSTEPCOUNT)).GetValue());
+ static_cast<const XGradientStepCountItem&>(rSet.Get(XATTR_GRADIENTSTEPCOUNT)).GetValue());
break;
}
case drawing::FillStyle_HATCH :
{
- const XHatch& rHatch(((XFillHatchItem&)(rSet.Get(XATTR_FILLHATCH))).GetHatchValue());
+ const XHatch& rHatch(static_cast<const XFillHatchItem&>(rSet.Get(XATTR_FILLHATCH)).GetHatchValue());
const Color aColorB(rHatch.GetColor());
aHatch = attribute::FillHatchAttribute(
@@ -475,7 +475,7 @@ namespace drawinglayer
(double)rHatch.GetAngle() * F_PI1800,
aColorB.getBColor(),
3, // same default as VCL, a minimum of three discrete units (pixels) offset
- ((const XFillBackgroundItem&)(rSet.Get(XATTR_FILLBACKGROUND))).GetValue());
+ static_cast<const XFillBackgroundItem&>(rSet.Get(XATTR_FILLBACKGROUND)).GetValue());
break;
}
@@ -565,21 +565,21 @@ namespace drawinglayer
return attribute::SdrTextAttribute(
rText,
aOutlinerParaObject,
- ((const XFormTextStyleItem&)rSet.Get(XATTR_FORMTXTSTYLE)).GetValue(),
+ static_cast<const XFormTextStyleItem&>(rSet.Get(XATTR_FORMTXTSTYLE)).GetValue(),
pLeft ? *pLeft : rTextObj.GetTextLeftDistance(),
pUpper ? *pUpper : rTextObj.GetTextUpperDistance(),
pRight ? *pRight : rTextObj.GetTextRightDistance(),
pLower ? *pLower : rTextObj.GetTextLowerDistance(),
rTextObj.GetTextHorizontalAdjust(rSet),
rTextObj.GetTextVerticalAdjust(rSet),
- ((const SdrOnOffItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
+ static_cast<const SdrOnOffItem&>(rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
rTextObj.IsFitToSize(),
rTextObj.IsAutoFit(),
- ((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
+ static_cast<const XFormTextHideFormItem&>(rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
SDRTEXTANI_BLINK == eAniKind,
SDRTEXTANI_SCROLL == eAniKind || SDRTEXTANI_ALTERNATE == eAniKind || SDRTEXTANI_SLIDE == eAniKind,
bInEditMode,
- ((const SdrTextFixedCellHeightItem&)rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue(),
+ static_cast<const SdrTextFixedCellHeightItem&>(rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue(),
bWrongSpell);
}
@@ -591,10 +591,10 @@ namespace drawinglayer
const SfxPoolItem* pGradientItem;
if(SfxItemState::SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem)
- && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled())
+ && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled())
{
// test if float transparence is completely transparent
- const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue();
+ const XGradient& rGradient = static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->GetGradientValue();
const sal_uInt8 nStartLuminance(rGradient.GetStartColor().GetLuminance());
const sal_uInt8 nEndLuminance(rGradient.GetEndColor().GetLuminance());
const bool bCompletelyTransparent(0xff == nStartLuminance && 0xff == nEndLuminance);
@@ -626,7 +626,7 @@ namespace drawinglayer
attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute(const SfxItemSet& rSet)
{
- Graphic aGraphic(((const XFillBitmapItem&)(rSet.Get(XATTR_FILLBITMAP))).GetGraphicObject().GetGraphic());
+ Graphic aGraphic(static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic());
if(!(GRAPHIC_BITMAP == aGraphic.GetType() || GRAPHIC_GDIMETAFILE == aGraphic.GetType()))
{
@@ -685,14 +685,14 @@ namespace drawinglayer
// get size
const basegfx::B2DVector aSize(
- (double)((const SfxMetricItem&)(rSet.Get(XATTR_FILLBMP_SIZEX))).GetValue(),
- (double)((const SfxMetricItem&)(rSet.Get(XATTR_FILLBMP_SIZEY))).GetValue());
+ (double) static_cast<const SfxMetricItem&>(rSet.Get(XATTR_FILLBMP_SIZEX)).GetValue(),
+ (double) static_cast<const SfxMetricItem&>(rSet.Get(XATTR_FILLBMP_SIZEY)).GetValue());
const basegfx::B2DVector aOffset(
- (double)((const SfxUInt16Item&) (rSet.Get(XATTR_FILLBMP_TILEOFFSETX))).GetValue(),
- (double)((const SfxUInt16Item&) (rSet.Get(XATTR_FILLBMP_TILEOFFSETY))).GetValue());
+ (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_TILEOFFSETX)).GetValue(),
+ (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_TILEOFFSETY)).GetValue());
const basegfx::B2DVector aOffsetPosition(
- (double)((const SfxUInt16Item&) (rSet.Get(XATTR_FILLBMP_POSOFFSETX))).GetValue(),
- (double)((const SfxUInt16Item&) (rSet.Get(XATTR_FILLBMP_POSOFFSETY))).GetValue());
+ (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_POSOFFSETX)).GetValue(),
+ (double) static_cast<const SfxUInt16Item&>(rSet.Get(XATTR_FILLBMP_POSOFFSETY)).GetValue());
return attribute::SdrFillGraphicAttribute(
aGraphic,
@@ -700,10 +700,11 @@ namespace drawinglayer
aSize,
aOffset,
aOffsetPosition,
- RectPointToB2DVector((RECT_POINT)((const SfxEnumItem&)(rSet.Get(XATTR_FILLBMP_POS))).GetValue()),
- ((const SfxBoolItem&) (rSet.Get(XATTR_FILLBMP_TILE))).GetValue(),
- ((const SfxBoolItem&) (rSet.Get(XATTR_FILLBMP_STRETCH))).GetValue(),
- ((const SfxBoolItem&) (rSet.Get(XATTR_FILLBMP_SIZELOG))).GetValue());
+ RectPointToB2DVector(
+ (RECT_POINT)static_cast<const SfxEnumItem&>(rSet.Get(XATTR_FILLBMP_POS)).GetValue()),
+ static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_TILE)).GetValue(),
+ static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_STRETCH)).GetValue(),
+ static_cast<const SfxBoolItem&>(rSet.Get(XATTR_FILLBMP_SIZELOG)).GetValue());
}
attribute::SdrShadowTextAttribute createNewSdrShadowTextAttribute(
@@ -880,7 +881,7 @@ namespace drawinglayer
{
// get perspective
::com::sun::star::drawing::ProjectionMode aProjectionMode(::com::sun::star::drawing::ProjectionMode_PARALLEL);
- const sal_uInt16 nProjectionValue(((const Svx3DPerspectiveItem&)rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue());
+ const sal_uInt16 nProjectionValue(static_cast<const Svx3DPerspectiveItem&>(rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue());
if(1L == nProjectionValue)
{
@@ -888,14 +889,14 @@ namespace drawinglayer
}
// get distance
- const double fDistance(((const SfxUInt32Item&)rSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue());
+ const double fDistance(static_cast<const SfxUInt32Item&>(rSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue());
// get shadow slant
- const double fShadowSlant(F_PI180 * ((const SfxUInt16Item&)rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue());
+ const double fShadowSlant(F_PI180 * static_cast<const SfxUInt16Item&>(rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue());
// get shade mode
::com::sun::star::drawing::ShadeMode aShadeMode(::com::sun::star::drawing::ShadeMode_FLAT);
- const sal_uInt16 nShadeValue(((const Svx3DShadeModeItem&)rSet.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue());
+ const sal_uInt16 nShadeValue(static_cast<const Svx3DShadeModeItem&>(rSet.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue());
if(1L == nShadeValue)
{
@@ -911,7 +912,7 @@ namespace drawinglayer
}
// get two sided lighting
- const bool bTwoSidedLighting(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue());
+ const bool bTwoSidedLighting(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue());
return attribute::SdrSceneAttribute(fDistance, fShadowSlant, aProjectionMode, aShadeMode, bTwoSidedLighting);
}
@@ -921,64 +922,64 @@ namespace drawinglayer
// extract lights from given SfxItemSet (from scene)
::std::vector< attribute::Sdr3DLightAttribute > aLightVector;
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, true));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
- if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue())
+ if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue())
{
- const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
+ const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
// get ambient color
- const Color aAmbientValue(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue());
+ const Color aAmbientValue(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue());
const basegfx::BColor aAmbientLight(aAmbientValue.getBColor());
return attribute::SdrLightingAttribute(aAmbientLight, aLightVector);
diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
index 33c3f37..56eeb30 100644
--- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
@@ -151,7 +151,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrCaptionPrimitive2D& rCompare = (SdrCaptionPrimitive2D&)rPrimitive;
+ const SdrCaptionPrimitive2D& rCompare = static_cast<const SdrCaptionPrimitive2D&>(rPrimitive);
return (getCornerRadiusX() == rCompare.getCornerRadiusX()
&& getCornerRadiusY() == rCompare.getCornerRadiusY()
diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
index b2d5c77..89e390e 100644
--- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
@@ -95,7 +95,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrConnectorPrimitive2D& rCompare = (SdrConnectorPrimitive2D&)rPrimitive;
+ const SdrConnectorPrimitive2D& rCompare = static_cast<const SdrConnectorPrimitive2D&>(rPrimitive);
return (getUnitPolygon() == rCompare.getUnitPolygon()
&& getSdrLSTAttribute() == rCompare.getSdrLSTAttribute());
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index d387520..0cda30b 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -98,7 +98,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrCustomShapePrimitive2D& rCompare = (SdrCustomShapePrimitive2D&)rPrimitive;
+ const SdrCustomShapePrimitive2D& rCompare = static_cast<const SdrCustomShapePrimitive2D&>(rPrimitive);
return (getSdrSTAttribute() == rCompare.getSdrSTAttribute()
&& getSubPrimitives() == rCompare.getSubPrimitives()
diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index 19223a0..7838393 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -127,7 +127,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrEllipsePrimitive2D& rCompare = (SdrEllipsePrimitive2D&)rPrimitive;
+ const SdrEllipsePrimitive2D& rCompare = static_cast<const SdrEllipsePrimitive2D&>(rPrimitive);
return (getTransform() == rCompare.getTransform()
&& getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute());
@@ -253,7 +253,7 @@ namespace drawinglayer
{
if(SdrEllipsePrimitive2D::operator==(rPrimitive))
{
- const SdrEllipseSegmentPrimitive2D& rCompare = (SdrEllipseSegmentPrimitive2D&)rPrimitive;
+ const SdrEllipseSegmentPrimitive2D& rCompare = static_cast<const SdrEllipseSegmentPrimitive2D&>(rPrimitive);
if( mfStartAngle == rCompare.mfStartAngle
&& mfEndAngle == rCompare.mfEndAngle
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index f5bce28..7345867 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -148,7 +148,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrGrafPrimitive2D& rCompare = (SdrGrafPrimitive2D&)rPrimitive;
+ const SdrGrafPrimitive2D& rCompare = static_cast<const SdrGrafPrimitive2D&>(rPrimitive);
return (getTransform() == rCompare.getTransform()
&& getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index 1c0040b..146bb62 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -473,7 +473,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrMeasurePrimitive2D& rCompare = (SdrMeasurePrimitive2D&)rPrimitive;
+ const SdrMeasurePrimitive2D& rCompare = static_cast<const SdrMeasurePrimitive2D&>(rPrimitive);
return (getStart() == rCompare.getStart()
&& getEnd() == rCompare.getEnd()
diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
index acc3349..20b0140 100644
--- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
@@ -49,7 +49,7 @@ namespace drawinglayer
{
if(BasePrimitive2D::operator==(rPrimitive))
{
- const SdrOle2Primitive2D& rCompare = (SdrOle2Primitive2D&)rPrimitive;
+ const SdrOle2Primitive2D& rCompare = static_cast<const SdrOle2Primitive2D&>(rPrimitive);
// #i108636# The standard operator== on two UNO sequences did not work as i
// would have expected; it just checks the .is() states and the data type
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index 68a313e..2a75b4b 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -151,7 +151,7 @@ namespace drawinglayer
{
if( BufferedDecompositionPrimitive2D::operator==(rPrimitive) )
{
- const SdrOleContentPrimitive2D& rCompare = (SdrOleContentPrimitive2D&)rPrimitive;
+ const SdrOleContentPrimitive2D& rCompare = static_cast<const SdrOleContentPrimitive2D&>(rPrimitive);
const bool bBothNot(!mpSdrOle2Obj.is() && !rCompare.mpSdrOle2Obj.is());
const bool bBothAndEqual(mpSdrOle2Obj.is() && rCompare.mpSdrOle2Obj.is()
&& mpSdrOle2Obj.get() == rCompare.mpSdrOle2Obj.get());
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index 512098e..8e5d2cf 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -122,7 +122,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrPathPrimitive2D& rCompare = (SdrPathPrimitive2D&)rPrimitive;
+ const SdrPathPrimitive2D& rCompare = static_cast<const SdrPathPrimitive2D&>(rPrimitive);
return (getUnitPolyPolygon() == rCompare.getUnitPolyPolygon()
&& getTransform() == rCompare.getTransform()
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 0822d7c..2e0187b 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -135,7 +135,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrRectanglePrimitive2D& rCompare = (SdrRectanglePrimitive2D&)rPrimitive;
+ const SdrRectanglePrimitive2D& rCompare = static_cast<const SdrRectanglePrimitive2D&>(rPrimitive);
return (getCornerRadiusX() == rCompare.getCornerRadiusX()
&& getCornerRadiusY() == rCompare.getCornerRadiusY()
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index 158a0d0..ec40017 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -129,7 +129,7 @@ namespace drawinglayer
{
if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
- const SdrTextPrimitive2D& rCompare = (SdrTextPrimitive2D&)rPrimitive;
+ const SdrTextPrimitive2D& rCompare = static_cast<const SdrTextPrimitive2D&>(rPrimitive);
return (
@@ -274,7 +274,7 @@ namespace drawinglayer
{
if(SdrTextPrimitive2D::operator==(rPrimitive))
{
- const SdrContourTextPrimitive2D& rCompare = (SdrContourTextPrimitive2D&)rPrimitive;
+ const SdrContourTextPrimitive2D& rCompare = static_cast<const SdrContourTextPrimitive2D&>(rPrimitive);
return (getUnitPolyPolygon() == rCompare.getUnitPolyPolygon()
&& getObjectTransform() == rCompare.getObjectTransform());
@@ -327,7 +327,7 @@ namespace drawinglayer
{
if(SdrTextPrimitive2D::operator==(rPrimitive))
{
- const SdrPathTextPrimitive2D& rCompare = (SdrPathTextPrimitive2D&)rPrimitive;
+ const SdrPathTextPrimitive2D& rCompare = static_cast<const SdrPathTextPrimitive2D&>(rPrimitive);
return (getPathPolyPolygon() == rCompare.getPathPolyPolygon()
&& getSdrFormTextAttribute() == rCompare.getSdrFormTextAttribute());
@@ -395,7 +395,7 @@ namespace drawinglayer
{
if(SdrTextPrimitive2D::operator==(rPrimitive))
{
- const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive;
+ const SdrBlockTextPrimitive2D& rCompare = static_cast<const SdrBlockTextPrimitive2D&>(rPrimitive);
return (getTextRangeTransform() == rCompare.getTextRangeTransform()
&& getSdrTextHorzAdjust() == rCompare.getSdrTextHorzAdjust()
@@ -460,7 +460,7 @@ namespace drawinglayer
{
if(SdrTextPrimitive2D::operator==(rPrimitive))
{
- const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive;
+ const SdrBlockTextPrimitive2D& rCompare = static_cast<const SdrBlockTextPrimitive2D&>(rPrimitive);
return (getTextRangeTransform() == rCompare.getTextRangeTransform()
&& getWordWrap() == rCompare.getWordWrap());
@@ -509,7 +509,7 @@ namespace drawinglayer
{
if(SdrTextPrimitive2D::operator==(rPrimitive))
{
- const SdrStretchTextPrimitive2D& rCompare = (SdrStretchTextPrimitive2D&)rPrimitive;
+ const SdrStretchTextPrimitive2D& rCompare = static_cast<const SdrStretchTextPrimitive2D&>(rPrimitive);
return (getTextRangeTransform() == rCompare.getTextRangeTransform()
&& isFixedCellHeight() == rCompare.isFixedCellHeight());
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 4655ec9..a9027d7 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -175,7 +175,7 @@ SdrMediaObj& SdrMediaObj::operator=(const SdrMediaObj& rObj)
return *this;
}
-uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot()
+const uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot() const
{
if( !m_pImpl->m_xCachedSnapshot.is() )
{
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 6897091..0c93c9c 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -302,8 +302,8 @@ sal_Int32 DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry
IntlWrapper aIntlWrapper( Application::GetSettings().GetLanguageTag() );
const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator();
- nCompare = pCollator->compareString( ((SvLBoxString*)pLeftItem)->GetText(),
- ((SvLBoxString*)pRightItem)->GetText());
+ nCompare = pCollator->compareString( static_cast<SvLBoxString*>(pLeftItem)->GetText(),
+ static_cast<SvLBoxString*>(pRightItem)->GetText());
if (nCompare == 0)
nCompare = -1;
commit fb7b1f45f9593db2d040dfaa06db0ea60f5308ba
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 15 13:52:39 2014 +0200
loplugin: cstylecast
Change-Id: I96a0d5d7ec3363076b0165f3c540c51ef01b58f3
diff --git a/xmlsecurity/source/framework/encryptionengine.cxx b/xmlsecurity/source/framework/encryptionengine.cxx
index 589176e..6b74377 100644
--- a/xmlsecurity/source/framework/encryptionengine.cxx
+++ b/xmlsecurity/source/framework/encryptionengine.cxx
@@ -162,7 +162,7 @@ void EncryptionEngine::clearUp( ) const
xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
m_nIdOfTemplateEC,
- (const Reference < cssxc::sax::XReferenceResolvedListener >)((SecurityEngine *)this));
+ static_cast<const Reference < cssxc::sax::XReferenceResolvedListener > >((SecurityEngine *)this));
m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC);
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 240f9ec..45c89d9 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -720,7 +720,7 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer()
* it is a EC
*/
{
- ElementCollector* pElementCollector = (ElementCollector*)pElementMark;
+ ElementCollector* pElementCollector = static_cast<ElementCollector*>(pElementMark);
cssxc::sax::ElementMarkPriority nPriority = pElementCollector->getPriority();
/*
@@ -1093,7 +1093,7 @@ sal_Int32 SAL_CALL SAXEventKeeperImpl::cloneElementCollector(
{
sal_Int32 nId = -1;
- ElementCollector* pElementCollector = (ElementCollector*)findElementMarkBuffer(referenceId);
+ ElementCollector* pElementCollector = static_cast<ElementCollector*>(findElementMarkBuffer(referenceId));
if (pElementCollector != NULL)
{
nId = m_nNextElementMarkId;
@@ -1137,7 +1137,7 @@ void SAL_CALL SAXEventKeeperImpl::addReferenceResolvedListener(
const cssu::Reference< cssxc::sax::XReferenceResolvedListener >& listener )
throw (cssu::RuntimeException, std::exception)
{
- ElementCollector* pElementCollector = (ElementCollector*)findElementMarkBuffer(referenceId);
+ ElementCollector* pElementCollector = static_cast<ElementCollector*>(findElementMarkBuffer(referenceId));
if (pElementCollector != NULL)
{
pElementCollector->setReferenceResolvedListener(listener);
diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx
index 708e536..655b317 100644
--- a/xmlsecurity/source/framework/signatureengine.cxx
+++ b/xmlsecurity/source/framework/signatureengine.cxx
@@ -176,7 +176,7 @@ void SignatureEngine::clearUp( ) const
xReferenceResolvedBroadcaster( m_xSAXEventKeeper, cssu::UNO_QUERY );
xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
m_nIdOfTemplateEC,
- (const cssu::Reference < cssxc::sax::XReferenceResolvedListener >)((SecurityEngine *)this));
+ static_cast<const cssu::Reference < cssxc::sax::XReferenceResolvedListener > >((SecurityEngine *)this));
m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC);
@@ -186,7 +186,7 @@ void SignatureEngine::clearUp( ) const
{
xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
*ii,
- (const cssu::Reference < cssxc::sax::XReferenceResolvedListener >)((SecurityEngine *)this));
+ static_cast<const cssu::Reference < cssxc::sax::XReferenceResolvedListener > >((SecurityEngine *)this));
m_xSAXEventKeeper->removeElementCollector(*ii);
}
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.cxx b/xmlsecurity/source/xmlsec/nss/secerror.cxx
index 3129f45..2d140f0 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.cxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.cxx
@@ -88,7 +88,7 @@ printChainFailure(CERTVerifyLog *log)
switch (node->error)
{
case SEC_ERROR_INADEQUATE_KEY_USAGE:
- errorFlags = (sal_uIntPtr)node->arg;
+ errorFlags = reinterpret_cast<unsigned long>(node->arg);
switch (errorFlags)
{
case KU_DIGITAL_SIGNATURE:
@@ -106,7 +106,7 @@ printChainFailure(CERTVerifyLog *log)
}
break;
case SEC_ERROR_INADEQUATE_CERT_TYPE:
- errorFlags = (sal_uIntPtr)node->arg;
+ errorFlags = reinterpret_cast<unsigned long>(node->arg);
switch (errorFlags)
{
case NS_CERT_TYPE_SSL_CLIENT:
More information about the Libreoffice-commits
mailing list