summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/dbfld.hxx2
-rw-r--r--sw/inc/dcontact.hxx4
-rw-r--r--sw/inc/doc.hxx6
-rw-r--r--sw/inc/docufld.hxx2
-rw-r--r--sw/inc/editsh.hxx3
-rw-r--r--sw/inc/expfld.hxx2
-rw-r--r--sw/inc/fchrfmt.hxx4
-rw-r--r--sw/inc/fldbas.hxx4
-rw-r--r--sw/inc/fmtclbl.hxx2
-rw-r--r--sw/inc/fmtcntnt.hxx2
-rw-r--r--sw/inc/fmteiro.hxx2
-rw-r--r--sw/inc/fmtfollowtextflow.hxx2
-rw-r--r--sw/inc/fmtfordr.hxx2
-rw-r--r--sw/inc/fmtfsize.hxx2
-rw-r--r--sw/inc/fmtftntx.hxx4
-rw-r--r--sw/inc/fmtline.hxx2
-rw-r--r--sw/inc/fmtlsplt.hxx2
-rw-r--r--sw/inc/fmtmeta.hxx4
-rw-r--r--sw/inc/fmtornt.hxx4
-rw-r--r--sw/inc/fmtpdsc.hxx2
-rw-r--r--sw/inc/fmtrowsplt.hxx2
-rw-r--r--sw/inc/fmtsrnd.hxx2
-rw-r--r--sw/inc/fmturl.hxx2
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx2
-rw-r--r--sw/inc/grfatr.hxx24
-rw-r--r--sw/inc/hfspacingitem.hxx2
-rw-r--r--sw/inc/ndnotxt.hxx6
-rw-r--r--sw/inc/ndole.hxx4
-rw-r--r--sw/inc/numrule.hxx4
-rw-r--r--sw/inc/tgrditem.hxx4
-rw-r--r--sw/inc/txatbase.hxx40
31 files changed, 76 insertions, 73 deletions
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index d9d92f0494a5..28b78b4fda33 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -106,7 +106,7 @@ public:
void SetFieldCode(const OUString& rStr) { sFieldCode = rStr; }
/// DBName
- inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
+ inline const SwDBData& GetDBData() const { return static_cast<SwDBFieldType*>(GetTyp())->GetDBData(); }
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const SAL_OVERRIDE;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) SAL_OVERRIDE;
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index f141f77c6597..474d334962cd 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -115,9 +115,9 @@ public:
virtual SdrObject *GetMaster() = 0;
virtual void SetMaster( SdrObject* _pNewMaster ) = 0;
- SwFrmFmt *GetFmt(){ return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt *GetFmt() { return static_cast<SwFrmFmt*>(GetRegisteredIn()); }
const SwFrmFmt *GetFmt() const
- { return (const SwFrmFmt*)GetRegisteredIn(); }
+ { return static_cast<const SwFrmFmt*>(GetRegisteredIn()); }
bool IsInDTOR() const { return mbInDTOR;}
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 31a538c02544..ba3f5d618c1a 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -43,6 +43,8 @@
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <tox.hxx>
+#include <frmfmt.hxx>
+#include <charfmt.hxx>
#include <boost/unordered_map.hpp>
@@ -826,7 +828,7 @@ public:
bool bBroadcast = false, bool bAuto = true);
void DelFrmFmt( SwFrmFmt *pFmt, bool bBroadcast = false );
SwFrmFmt* FindFrmFmtByName( const OUString& rName ) const
- { return (SwFrmFmt*)FindFmtByName( (SwFmtsBase&)*mpFrmFmtTbl, rName ); }
+ { return static_cast<SwFrmFmt*>(FindFmtByName( (SwFmtsBase&)*mpFrmFmtTbl, rName )); }
SwCharFmt *MakeCharFmt(const OUString &rFmtName, SwCharFmt *pDerivedFrom,
bool bBroadcast = false,
@@ -834,7 +836,7 @@ public:
void DelCharFmt(sal_uInt16 nFmt, bool bBroadcast = false);
void DelCharFmt(SwCharFmt* pFmt, bool bBroadcast = false);
SwCharFmt* FindCharFmtByName( const OUString& rName ) const
- { return (SwCharFmt*)FindFmtByName( (SwFmtsBase&)*mpCharFmtTbl, rName ); }
+ { return static_cast<SwCharFmt*>(FindFmtByName( (SwFmtsBase&)*mpCharFmtTbl, rName )); }
// Formatcollections (styles)
// TXT
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index a70c885f63dd..0f44505f672a 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -658,7 +658,7 @@ public:
virtual void SetPar2(const OUString& rStr) SAL_OVERRIDE;
SwCharFmt* GetCharFmt() const
- { return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
+ { return static_cast<SwJumpEditFieldType*>(GetTyp())->GetCharFmt(); }
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const SAL_OVERRIDE;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) SAL_OVERRIDE;
};
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index aef99cae0ea9..8221ff46ab99 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -34,6 +34,7 @@
#include <IMark.hxx>
#include <tox.hxx>
#include <frmfmt.hxx>
+#include <charfmt.hxx>
#include <vector>
#include <set>
@@ -360,7 +361,7 @@ public:
SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
{ return static_cast<SwFrmFmt*>(SwEditShell::GetFmtFromPool( nId )); }
SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
- { return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
+ { return static_cast<SwCharFmt*>(SwEditShell::GetFmtFromPool( nId )); }
void Insert2(SwField&, const bool bForceExpandHints = false);
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index ac04f540eff4..5a3222313d16 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -278,7 +278,7 @@ inline bool SwSetExpField::GetInputFlag() const
{ return bInput; }
inline bool SwSetExpField::IsSequenceFld() const
- { return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
+ { return 0 != (nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(GetTyp())->GetType()); }
class SwInputFieldType : public SwFieldType
{
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index 4e70c617d986..40c259b7675e 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -22,8 +22,8 @@
#include <svl/poolitem.hxx>
#include <calbck.hxx>
#include <format.hxx>
+#include <charfmt.hxx>
-class SwCharFmt;
class SwTxtCharFmt;
class IntlWrapper;
@@ -66,7 +66,7 @@ public:
virtual bool GetInfo( SfxPoolItem& rInfo ) const SAL_OVERRIDE;
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
- SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+ SwCharFmt* GetCharFmt() const { return const_cast<SwCharFmt*>(static_cast<const SwCharFmt*>(GetRegisteredIn())); }
};
#endif
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index f6893e8ed700..57780e9671e4 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -414,13 +414,13 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* ) SAL_OVERRIDE;
virtual void SetLanguage(sal_uInt16 nLng) SAL_OVERRIDE;
- inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
+ inline SwDoc* GetDoc() const { return const_cast<SwValueFieldType*>(static_cast<const SwValueFieldType*>(GetTyp()))->GetDoc(); }
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
inline OUString ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const
- { return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); }
+ { return static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(rVal, nFmt, nLng); }
static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt);
};
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index a5243630b181..f6eb91e64bac 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -36,7 +36,7 @@ public:
};
inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(bool bInP) const
- { return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
+ { return static_cast<const SwFmtNoBalancedColumns&>(Get( RES_COLUMNBALANCE, bInP )); }
inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(bool bInP) const
{ return aSet.GetBalancedColumns( bInP ); }
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index c56011c744b6..c4efe4f7989c 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -47,7 +47,7 @@ public:
};
inline const SwFmtCntnt &SwAttrSet::GetCntnt(bool bInP) const
- { return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
+ { return static_cast<const SwFmtCntnt&>(Get( RES_CNTNT,bInP)); }
inline const SwFmtCntnt &SwFmt::GetCntnt(bool bInP) const
{ return aSet.GetCntnt(bInP); }
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index f7f4b25d0fba..4be9b7a86af2 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -42,7 +42,7 @@ public:
};
inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(bool bInP) const
- { return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
+ { return static_cast<const SwFmtEditInReadonly&>(Get( RES_EDIT_IN_READONLY,bInP)); }
inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(bool bInP) const
{ return aSet.GetEditInReadonly(bInP); }
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 47913c8a246e..a0dcf6e55e26 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -44,7 +44,7 @@ public:
};
inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(bool bInP) const
- { return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
+ { return static_cast<const SwFmtFollowTextFlow&>(Get( RES_FOLLOW_TEXT_FLOW, bInP )); }
inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(bool bInP) const
{ return aSet.GetFollowTextFlow( bInP ); }
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index a29d3c06ded8..8c79327d9b88 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -53,7 +53,7 @@ inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
}
inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(bool bInP) const
- { return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
+ { return static_cast<const SwFmtFillOrder&>(Get( RES_FILL_ORDER,bInP)); }
inline const SwFmtFillOrder &SwFmt::GetFillOrder(bool bInP) const
{ return aSet.GetFillOrder(bInP); }
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index e80bd43680af..6bb75daa1073 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -100,7 +100,7 @@ public:
};
inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(bool bInP) const
- { return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
+ { return static_cast<const SwFmtFrmSize&>(Get( RES_FRM_SIZE,bInP)); }
inline const SwFmtFrmSize &SwFmt::GetFrmSize(bool bInP) const
{ return aSet.GetFrmSize(bInP); }
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index 04016b338e3c..f2590d139597 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -107,9 +107,9 @@ public:
};
inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(bool bInP) const
- { return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
+ { return static_cast<const SwFmtFtnAtTxtEnd&>(Get( RES_FTN_AT_TXTEND, bInP)); }
inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(bool bInP) const
- { return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
+ { return static_cast<const SwFmtEndAtTxtEnd&>(Get( RES_END_AT_TXTEND, bInP)); }
inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(bool bInP) const
{ return aSet.GetFtnAtTxtEnd(bInP); }
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index 9b1a795b1f58..cd5d85e3d605 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -56,7 +56,7 @@ public:
};
inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(bool bInP) const
- { return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
+ { return static_cast<const SwFmtLineNumber&>(Get( RES_LINENUMBER,bInP)); }
#endif
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index c16c72afce5f..3abe26f429b9 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -41,7 +41,7 @@ public:
};
inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(bool bInP) const
- { return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
+ { return static_cast<const SwFmtLayoutSplit&>(Get( RES_LAYOUT_SPLIT,bInP)); }
inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(bool bInP) const
{ return aSet.GetLayoutSplit(bInP); }
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 0bcf9cebca20..d79a5808b16e 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -77,8 +77,10 @@ namespace com { namespace sun { namespace star {
class SwTxtMeta;
class SwXMeta;
class SwXMetaField;
+class SwTxtNode;
namespace sw {
class Meta;
+ class MetaFieldManager;
}
class SwFmtMeta
@@ -118,8 +120,6 @@ public:
namespace sw {
-class MetaFieldManager;
-
class Meta
: public ::sfx2::Metadatable
, public SwModify
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index b267d8f08160..17b08e8b12eb 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -116,9 +116,9 @@ inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy
}
inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(bool bInP) const
- { return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
+ { return static_cast<const SwFmtVertOrient&>(Get( RES_VERT_ORIENT,bInP)); }
inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(bool bInP) const
- { return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
+ { return static_cast<const SwFmtHoriOrient&>(Get( RES_HORI_ORIENT,bInP)); }
inline const SwFmtVertOrient &SwFmt::GetVertOrient(bool bInP) const
{ return aSet.GetVertOrient(bInP); }
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 9b7f9a508129..f095978a28bd 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -83,7 +83,7 @@ public:
};
inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(bool bInP) const
- { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
+ { return static_cast<const SwFmtPageDesc&>(Get( RES_PAGEDESC,bInP)); }
inline const SwFmtPageDesc &SwFmt::GetPageDesc(bool bInP) const
{ return aSet.GetPageDesc(bInP); }
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index f5fa372b28cc..c9905276d1c7 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -41,7 +41,7 @@ public:
};
inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(bool bInP) const
- { return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); }
+ { return static_cast<const SwFmtRowSplit&>(Get( RES_ROW_SPLIT,bInP)); }
inline const SwFmtRowSplit &SwFmt::GetRowSplit(bool bInP) const
{ return aSet.GetRowSplit(bInP); }
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index 4b27127141b1..123717f7bdfe 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -70,7 +70,7 @@ inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
}
inline const SwFmtSurround &SwAttrSet::GetSurround(bool bInP) const
- { return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
+ { return static_cast<const SwFmtSurround&>(Get( RES_SURROUND,bInP)); }
inline const SwFmtSurround &SwFmt::GetSurround(bool bInP) const
{ return aSet.GetSurround(bInP); }
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index 3f12aba99e83..55a09ac0dc23 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -74,7 +74,7 @@ public:
};
inline const SwFmtURL &SwAttrSet::GetURL(bool bInP) const
- { return (const SwFmtURL&)Get( RES_URL,bInP); }
+ { return static_cast<const SwFmtURL&>(Get( RES_URL,bInP)); }
inline const SwFmtURL &SwFmt::GetURL(bool bInP) const
{ return aSet.GetURL(bInP); }
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index de88d4b4453a..046f09d6a4f5 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -59,7 +59,7 @@ public:
};
inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(bool bInP) const
- { return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
+ { return static_cast<const SwFmtWrapInfluenceOnObjPos&>(Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP)); }
inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(bool bInP) const
{ return aSet.GetWrapInfluenceOnObjPos(bInP); }
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index cbd745a96172..8ae55092cfa4 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -290,29 +290,29 @@ public:
// Implementation of graphics attributes methods of SwAttr
inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(bool bInP) const
- { return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
+ { return static_cast<const SwMirrorGrf&>(Get( RES_GRFATR_MIRRORGRF,bInP)); }
inline const SwCropGrf &SwAttrSet::GetCropGrf(bool bInP) const
- { return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
+ { return static_cast<const SwCropGrf&>(Get( RES_GRFATR_CROPGRF,bInP)); }
inline const SwRotationGrf &SwAttrSet::GetRotationGrf(bool bInP) const
- { return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
+ { return static_cast<const SwRotationGrf&>(Get( RES_GRFATR_ROTATION,bInP)); }
inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(bool bInP) const
- { return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
+ { return static_cast<const SwLuminanceGrf&>(Get( RES_GRFATR_LUMINANCE,bInP)); }
inline const SwContrastGrf &SwAttrSet::GetContrastGrf(bool bInP) const
- { return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
+ { return static_cast<const SwContrastGrf&>(Get( RES_GRFATR_CONTRAST,bInP)); }
inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(bool bInP) const
- { return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
+ { return static_cast<const SwChannelRGrf&>(Get( RES_GRFATR_CHANNELR,bInP)); }
inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(bool bInP) const
- { return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
+ { return static_cast<const SwChannelGGrf&>(Get( RES_GRFATR_CHANNELG,bInP)); }
inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(bool bInP) const
- { return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
+ { return static_cast<const SwChannelBGrf&>(Get( RES_GRFATR_CHANNELB,bInP)); }
inline const SwGammaGrf &SwAttrSet::GetGammaGrf(bool bInP) const
- { return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
+ { return static_cast<const SwGammaGrf&>(Get( RES_GRFATR_GAMMA,bInP)); }
inline const SwInvertGrf &SwAttrSet::GetInvertGrf(bool bInP) const
- { return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
+ { return static_cast<const SwInvertGrf&>(Get( RES_GRFATR_INVERT,bInP)); }
inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(bool bInP) const
- { return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
+ { return static_cast<const SwTransparencyGrf&>(Get( RES_GRFATR_TRANSPARENCY,bInP)); }
inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(bool bInP) const
- { return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
+ { return static_cast<const SwDrawModeGrf&>(Get( RES_GRFATR_DRAWMODE,bInP)); }
// Implementation of graphics attributes methods of SwFmt
inline const SwMirrorGrf &SwFmt::GetMirrorGrf(bool bInP) const
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index c53f83374c0c..94547d3ce8d8 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -41,7 +41,7 @@ public:
};
inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(bool bInP) const
- { return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
+ { return static_cast<const SwHeaderAndFooterEatSpacingItem&>(Get( RES_HEADER_FOOTER_EAT_SPACING,bInP)); }
inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(bool bInP) const
{ return aSet.GetHeaderAndFooterEatSpacing(bInP); }
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index 875c75f0e1f0..26dfa94de0f1 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -53,7 +53,7 @@ public:
virtual SwCntntFrm *MakeFrm( SwFrm* ) SAL_OVERRIDE;
- inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
+ inline SwGrfFmtColl *GetGrfColl() const { return const_cast<SwGrfFmtColl*>(static_cast<const SwGrfFmtColl*>(GetRegisteredIn())); }
virtual Size GetTwipSize() const = 0;
@@ -93,11 +93,11 @@ public:
// Inline methods from Node.hxx - we know TxtNode only here!!
inline SwNoTxtNode *SwNode::GetNoTxtNode()
{
- return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
+ return ND_NOTXTNODE & nNodeType ? static_cast<SwNoTxtNode*>(this) : 0;
}
inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
{
- return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
+ return ND_NOTXTNODE & nNodeType ? static_cast<const SwNoTxtNode*>(this) : 0;
}
#endif // INCLUDED_SW_INC_NDNOTXT_HXX
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 65189eecb5cb..6cd24fcbb581 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -142,12 +142,12 @@ public:
/// Inline methods from Node.hxx
inline SwOLENode *SwNode::GetOLENode()
{
- return ND_OLENODE == nNodeType ? (SwOLENode*)this : 0;
+ return ND_OLENODE == nNodeType ? static_cast<SwOLENode*>(this) : 0;
}
inline const SwOLENode *SwNode::GetOLENode() const
{
- return ND_OLENODE == nNodeType ? (const SwOLENode*)this : 0;
+ return ND_OLENODE == nNodeType ? static_cast<const SwOLENode*>(this) : 0;
}
#endif // _ INCLUDED_SW_INC_NDOLE_HXX
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index ff2322c360c6..2dc755e6c5e5 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -31,6 +31,7 @@
#include <SwNumberTreeTypes.hxx>
#include <ndarr.hxx>
#include <vector>
+#include <charfmt.hxx>
class SwTxtFmtColl;
class IDocumentListsAccess;
@@ -39,7 +40,6 @@ namespace vcl { class Font; }
class SvxBrushItem;
class SfxGrabBagItem;
class SvxNumRule;
-class SwCharFmt;
class SwDoc;
class SwFmtVertOrient;
class SwTxtNode;
@@ -73,7 +73,7 @@ public:
bool operator==( const SwNumFmt& ) const;
bool operator!=( const SwNumFmt& r ) const { return !(*this == r); }
- SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+ SwCharFmt* GetCharFmt() const { return const_cast<SwCharFmt*>(static_cast<const SwCharFmt*>(GetRegisteredIn())); }
void SetCharFmt( SwCharFmt* );
virtual void SetCharFmtName(const OUString& rSet);
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index b110d386e2e4..2972d3546740 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -107,9 +107,9 @@ public:
};
inline const SwTextGridItem &SwAttrSet::GetTextGrid(bool bInP) const
- { return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); }
+ { return static_cast<const SwTextGridItem&>(Get( RES_TEXTGRID, bInP )); }
inline const SwTextGridItem &SwFmt::GetTextGrid(bool bInP) const
- { return (const SwTextGridItem&)aSet.Get( RES_TEXTGRID, bInP ); }
+ { return static_cast<const SwTextGridItem&>(aSet.Get( RES_TEXTGRID, bInP )); }
#endif
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 830d097128c4..8ac157297abc 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -22,21 +22,21 @@
#include <tools/solar.h>
#include <svl/poolitem.hxx>
#include <hintids.hxx>
+#include <fmtautofmt.hxx>
+#include <fmtinfmt.hxx>
+#include <fmtrfmrk.hxx>
+#include <fmtruby.hxx>
+#include <fmtfld.hxx>
+#include <fmtflcnt.hxx>
+#include <fmtftn.hxx>
+#include <fmtmeta.hxx>
+#include <fchrfmt.hxx>
+#include <tox.hxx>
#include <boost/utility.hpp>
class SfxItemPool;
class SvXMLAttrContainerItem;
-class SwFmtRuby;
-class SwFmtCharFmt;
-class SwFmtAutoFmt;
-class SwFmtINetFmt;
-class SwFmtFld;
-class SwFmtFtn;
-class SwFmtFlyCnt;
-class SwTOXMark;
-class SwFmtRefMark;
-class SwFmtMeta;
class SwTxtAttr : private boost::noncopyable
{
@@ -175,13 +175,13 @@ inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT );
- return (const SwFmtCharFmt&)(*m_pAttr);
+ return static_cast<const SwFmtCharFmt&>(*m_pAttr);
}
inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT );
- return (const SwFmtAutoFmt&)(*m_pAttr);
+ return static_cast<const SwFmtAutoFmt&>(*m_pAttr);
}
inline const SwFmtFld& SwTxtAttr::GetFmtFld() const
@@ -190,50 +190,50 @@ inline const SwFmtFld& SwTxtAttr::GetFmtFld() const
&& ( m_pAttr->Which() == RES_TXTATR_FIELD
|| m_pAttr->Which() == RES_TXTATR_ANNOTATION
|| m_pAttr->Which() == RES_TXTATR_INPUTFIELD ));
- return (const SwFmtFld&)(*m_pAttr);
+ return static_cast<const SwFmtFld&>(*m_pAttr);
}
inline const SwFmtFtn& SwTxtAttr::GetFtn() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN );
- return (const SwFmtFtn&)(*m_pAttr);
+ return static_cast<const SwFmtFtn&>(*m_pAttr);
}
inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT );
- return (const SwFmtFlyCnt&)(*m_pAttr);
+ return static_cast<const SwFmtFlyCnt&>(*m_pAttr);
}
inline const SwTOXMark& SwTxtAttr::GetTOXMark() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK );
- return (const SwTOXMark&)(*m_pAttr);
+ return static_cast<const SwTOXMark&>(*m_pAttr);
}
inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK );
- return (const SwFmtRefMark&)(*m_pAttr);
+ return static_cast<const SwFmtRefMark&>(*m_pAttr);
}
inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT );
- return (const SwFmtINetFmt&)(*m_pAttr);
+ return static_cast<const SwFmtINetFmt&>(*m_pAttr);
}
inline const SwFmtRuby& SwTxtAttr::GetRuby() const
{
assert( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY );
- return (const SwFmtRuby&)(*m_pAttr);
+ return static_cast<const SwFmtRuby&>(*m_pAttr);
}
inline const SwFmtMeta& SwTxtAttr::GetMeta() const
{
assert( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
m_pAttr->Which() == RES_TXTATR_METAFIELD) );
- return (const SwFmtMeta&)(*m_pAttr);
+ return static_cast<const SwFmtMeta&>(*m_pAttr);
}
// these should be static_casts but with virtual inheritance it's not possible