diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-09-23 17:42:33 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-09-23 18:27:57 +0200 |
commit | 6cb1cb26d8b512fa91bed8eb070fb68b6c839dff (patch) | |
tree | e43a45fc79c648427171545c07b889e524ecea81 /sw | |
parent | ensure m_pOwnerRow is NULL (diff) | |
download | core-6cb1cb26d8b512fa91bed8eb070fb68b6c839dff.tar.gz core-6cb1cb26d8b512fa91bed8eb070fb68b6c839dff.zip |
make SwCntntNode* and SwNode* have the same value
For debugging purposes, mainly. Fix also some casts that worked only
with SwModify being the first base (there seems to be no real
requirement for it being first).
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/node.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/cntfrm.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/inc/txtfrm.hxx | 5 |
4 files changed, 9 insertions, 7 deletions
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index bf136a9e57fb..5860f25a9712 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -364,7 +364,7 @@ private: // -------------------- // SwCntntNode // -------------------- -class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexReg +class SW_DLLPUBLIC SwCntntNode: public SwNode, public SwModify, public SwIndexReg { //FEATURE::CONDCOLL diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index b1bb09667f4f..0f76a22eced5 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -993,8 +993,8 @@ SwEndNode::SwEndNode( SwNodes& rNds, sal_uLong nPos, SwStartNode& rSttNd ) SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType, SwFmtColl *pColl ) - : SwModify( pColl ), // CrsrsShell, FrameFmt, - SwNode( rWhere, nNdType ), + : SwNode( rWhere, nNdType ), + SwModify( pColl ), // CrsrsShell, FrameFmt, pCondColl( 0 ), mbSetModifyAtAttr( false ) { diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index 848ac82efa09..d4d9b34252c5 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -30,6 +30,7 @@ #include "frame.hxx" #include "flowfrm.hxx" #include "cshtyp.hxx" +#include "node.hxx" class SwLayoutFrm; class SwCntntNode; @@ -133,11 +134,11 @@ inline SwCntntFrm* SwCntntFrm::GetPrevCntntFrm() const inline SwCntntNode *SwCntntFrm::GetNode() { - return (SwCntntNode*)GetDep(); + return static_cast< SwCntntNode* >( GetDep()); } inline const SwCntntNode *SwCntntFrm::GetNode() const { - return (SwCntntNode*)GetDep(); + return static_cast< const SwCntntNode* >( GetDep()); } inline const SwCntntFrm *SwCntntFrm::GetFollow() const diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 1d388e6587d9..bb7fc866f3c2 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -31,6 +31,7 @@ #include <tools/mempool.hxx> #include <tools/string.hxx> #include "cntfrm.hxx" +#include "ndtxt.hxx" #define STRSIZE(x) (sizeof(x)-1) @@ -333,9 +334,9 @@ public: // Liefert den zu bearbeitenden Textausschnitt zurueck (inline, s.u.) const String& GetTxt() const; inline SwTxtNode *GetTxtNode() - { return (SwTxtNode*)SwCntntFrm::GetNode(); } + { return static_cast< SwTxtNode* >( SwCntntFrm::GetNode()); } inline const SwTxtNode *GetTxtNode() const - { return (SwTxtNode*)SwCntntFrm::GetNode(); } + { return static_cast< const SwTxtNode* >( SwCntntFrm::GetNode()); } SwTxtFrm(SwTxtNode * const, SwFrm* ); virtual ~SwTxtFrm(); |