summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/edtox.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-18 12:55:42 +0200
committerNoel Grandin <noel@peralex.com>2014-11-19 13:19:37 +0200
commiteb41a2ba205c6ac88e959f39bf0c45d2ee674150 (patch)
tree853b998ba60030224ca20a06d15ee22ffcf7d091 /sw/source/core/edit/edtox.cxx
parent137886bb081c4d0e12677f2d8de96a9bf4ddad16 (diff)
loplugin: cstylecast
Change-Id: I322c6f9cd106a0ac3ad5c67dd0d49660b608e079
Diffstat (limited to 'sw/source/core/edit/edtox.cxx')
-rw-r--r--sw/source/core/edit/edtox.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 18e24f8e98d4..7504cce86063 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -98,14 +98,14 @@ sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
{
OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
- const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
+ const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase);
return rTOXSect.IsProtect();
}
void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, bool bReadonly)
{
OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
- const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
+ const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase);
((SwTOXBase&)rTOXBase).SetProtected(bReadonly);
OSL_ENSURE( rTOXSect.SwSection::GetType() == TOX_CONTENT_SECTION, "not a TOXContentSection" );
@@ -159,7 +159,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
bool bRet = false;
OSL_ENSURE( rTOX.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
- SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOX;
+ SwTOXBaseSection* pTOX = const_cast<SwTOXBaseSection*>(static_cast<const SwTOXBaseSection*>(&rTOX));
OSL_ENSURE(pTOX, "no current listing");
if( pTOX && 0 != pTOX->GetFmt()->GetSectionNode() )
{
@@ -246,7 +246,7 @@ const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const
nCnt++ == nPos )
{
OSL_ENSURE( pSect->ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
- return (SwTOXBaseSection*)pSect;
+ return static_cast<const SwTOXBaseSection*>(pSect);
}
}
return 0;