[Libreoffice-commits] .: sw/source
Arnaud Versini
aversini at kemper.freedesktop.org
Sun Jun 24 04:56:22 PDT 2012
sw/source/core/doc/doctxm.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 2c1b80254db7b63534c874354bf2673adbac2c43
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sat Jun 23 18:28:23 2012 +0200
Use dynamic_cast instead of PTR_CAST in SwTOXBase
Change-Id: If4a6b593fdf15c6b3f02d86aff7c046523f2eafb
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 60a6e92..037139c 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 );
}
More information about the Libreoffice-commits
mailing list