summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/inc/cntfrm.hxx12
-rw-r--r--sw/source/core/inc/frmtool.hxx5
2 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx
index 579b8fe63cf5..74b9f4d7fcb1 100644
--- a/sw/source/core/inc/cntfrm.hxx
+++ b/sw/source/core/inc/cntfrm.hxx
@@ -110,7 +110,7 @@ public:
inline SwCntntFrm* SwCntntFrm::GetNextCntntFrm() const
{
if ( GetNext() && GetNext()->IsCntntFrm() )
- return (SwCntntFrm*)GetNext();
+ return const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetNext()));
else
return (SwCntntFrm*)ImplGetNextCntntFrm( true );
}
@@ -118,7 +118,7 @@ inline SwCntntFrm* SwCntntFrm::GetNextCntntFrm() const
inline SwCntntFrm* SwCntntFrm::GetPrevCntntFrm() const
{
if ( GetPrev() && GetPrev()->IsCntntFrm() )
- return (SwCntntFrm*)GetPrev();
+ return const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetPrev()));
else
return (SwCntntFrm*)ImplGetNextCntntFrm( false );
}
@@ -134,20 +134,20 @@ inline const SwCntntNode *SwCntntFrm::GetNode() const
inline const SwCntntFrm *SwCntntFrm::GetFollow() const
{
- return (const SwCntntFrm*)SwFlowFrm::GetFollow();
+ return static_cast<const SwCntntFrm*>(SwFlowFrm::GetFollow());
}
inline SwCntntFrm *SwCntntFrm::GetFollow()
{
- return (SwCntntFrm*)SwFlowFrm::GetFollow();
+ return static_cast<SwCntntFrm*>(SwFlowFrm::GetFollow());
}
inline const SwCntntFrm *SwCntntFrm::GetPrecede() const
{
- return (const SwCntntFrm*)SwFlowFrm::GetPrecede();
+ return static_cast<const SwCntntFrm*>(SwFlowFrm::GetPrecede());
}
inline SwCntntFrm *SwCntntFrm::GetPrecede()
{
- return (SwCntntFrm*)SwFlowFrm::GetPrecede();
+ return static_cast<SwCntntFrm*>(SwFlowFrm::GetPrecede());
}
#endif
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 8003042244f5..04b70539b57d 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -26,6 +26,7 @@
#include "swcache.hxx"
#include <editeng/lrspitem.hxx>
#include <swfont.hxx>
+#include <flyfrm.hxx>
class SwPageFrm;
class SwFlyFrm;
@@ -200,7 +201,7 @@ class SwLayNotify : public SwFrmNotify
{
bool bLowersComplete;
- SwLayoutFrm *GetLay() { return (SwLayoutFrm*)pFrm; }
+ SwLayoutFrm *GetLay() { return static_cast<SwLayoutFrm*>(pFrm); }
public:
SwLayNotify( SwLayoutFrm *pLayFrm );
@@ -214,7 +215,7 @@ class SwFlyNotify : public SwLayNotify
{
SwPageFrm *pOldPage;
const SwRect aFrmAndSpace;
- SwFlyFrm *GetFly() { return (SwFlyFrm*)pFrm; }
+ SwFlyFrm *GetFly() { return static_cast<SwFlyFrm*>(pFrm); }
public:
SwFlyNotify( SwFlyFrm *pFlyFrm );