summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-03-16 11:28:35 +0100
committerMichael Stahl <mst@openoffice.org>2010-03-16 11:28:35 +0100
commitd2568e9a7481f403836224d486efc28edb467a48 (patch)
tree47de589a86e8d35b557c24b5d614b0427449cf6d /sw
parenteda071240e099eab45ebc65e15bab7baa2c0aa1d (diff)
odfmetadata4: #i109599#: remove SwSection::_GetSection()
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/section.hxx14
-rw-r--r--sw/source/core/docnode/section.cxx4
2 files changed, 10 insertions, 8 deletions
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 58ad0d8daafb..34bb75fdc8ef 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -293,7 +293,6 @@ class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt
::com::sun::star::uno::WeakReference<
::com::sun::star::text::XTextSection> m_wXTextSection;
- /* SW_DLLPUBLIC */ SwSection* _GetSection() const;
SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert
protected:
@@ -313,7 +312,7 @@ public:
// erfrage vom Format Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
- SwSection* GetSection() const { return (SwSection*)_GetSection(); }
+ SwSection* GetSection() const;
inline SwSectionFmt* GetParent() const;
inline SwSection* GetParentSection() const;
@@ -328,9 +327,10 @@ public:
// befindet.
BOOL IsInNodesArr() const;
- SwSectionNode* GetSectionNode( BOOL bAlways = FALSE );
- const SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ) const
- { return ((SwSectionFmt*)this)->GetSectionNode( bAlways ); }
+ SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false);
+ const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const
+ { return const_cast<SwSectionFmt *>(this)
+ ->GetSectionNode(bEvenIfInUndo); }
// ist die Section eine gueltige fuers GlobalDocument?
const SwSection* GetGlobalDocSection() const;
@@ -368,7 +368,9 @@ inline SwSection* SwSectionFmt::GetParentSection() const
SwSectionFmt* pParent = GetParent();
SwSection* pRet = 0;
if( pParent )
- pRet = pParent->_GetSection();
+ {
+ pRet = pParent->GetSection();
+ }
return pRet;
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 84eb39b9b5ce..75bb7e23bdba 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -723,7 +723,7 @@ SwSectionFmt::~SwSectionFmt()
}
-SwSectionPtr SwSectionFmt::_GetSection() const
+SwSection * SwSectionFmt::GetSection() const
{
if( GetDepends() )
{
@@ -1161,7 +1161,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
}
-SwSectionNode* SwSectionFmt::GetSectionNode( BOOL bAlways )
+SwSectionNode* SwSectionFmt::GetSectionNode(bool const bAlways)
{
const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() ))