diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2012-06-23 18:28:23 +0200 |
---|---|---|
committer | Arnaud Versini <arnaud.versini@gmail.com> | 2012-06-24 13:03:06 +0200 |
commit | 2c1b80254db7b63534c874354bf2673adbac2c43 (patch) | |
tree | d0b1f837375d29b3f544fda7ab6b6bb27dd840b3 | |
parent | 750a9c408f9a2bd1454f567ca1fcbb6381be1570 (diff) |
Use dynamic_cast instead of PTR_CAST in SwTOXBase
Change-Id: If4a6b593fdf15c6b3f02d86aff7c046523f2eafb
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 60a6e92c0e45..037139cc8864 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -2307,7 +2307,7 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin sal_Bool SwTOXBase::IsTOXBaseInReadonly() const { - const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this); + const SwTOXBaseSection *pSect = dynamic_cast<const SwTOXBaseSection*>(this); sal_Bool bRet = sal_False; const SwSectionNode* pSectNode; if(pSect && pSect->GetFmt() && @@ -2325,7 +2325,7 @@ sal_Bool SwTOXBase::IsTOXBaseInReadonly() const const SfxItemSet* SwTOXBase::GetAttrSet() const { - const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this); + const SwTOXBaseSection *pSect = dynamic_cast<const SwTOXBaseSection*>(this); if(pSect && pSect->GetFmt()) return &pSect->GetFmt()->GetAttrSet(); return 0; @@ -2333,7 +2333,7 @@ const SfxItemSet* SwTOXBase::GetAttrSet() const void SwTOXBase::SetAttrSet( const SfxItemSet& rSet ) { - SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this); + const SwTOXBaseSection *pSect = dynamic_cast<const SwTOXBaseSection*>(this); if( pSect && pSect->GetFmt() ) pSect->GetFmt()->SetFmtAttr( rSet ); } @@ -2344,7 +2344,7 @@ sal_Bool SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const { case RES_CONTENT_VISIBLE: { - SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this); + const SwTOXBaseSection *pSect = dynamic_cast<const SwTOXBaseSection*>(this); if( pSect && pSect->GetFmt() ) pSect->GetFmt()->GetInfo( rInfo ); } |