summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/ndsect.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:31:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:38 +0100
commit6f3c52bb37f52f57fea6479f1da6c1828fbd85fe (patch)
treed8e6db66db4c28335a62fbec4a282541ae083a85 /sw/source/core/docnode/ndsect.cxx
parent5429049e3b8fd12e84aca83be7ca19e52920f672 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
Diffstat (limited to 'sw/source/core/docnode/ndsect.cxx')
-rw-r--r--sw/source/core/docnode/ndsect.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 7ff805252cb1..7eee0d6cc2ba 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -203,8 +203,8 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if( rRange.HasMark() )
{
- SwPosition *pSttPos = (SwPosition*)rRange.Start(),
- *pEndPos = (SwPosition*)rRange.End();
+ SwPosition *pSttPos = const_cast<SwPosition*>(rRange.Start()),
+ *pEndPos = const_cast<SwPosition*>(rRange.End());
if( pPrvNd && 3 == nRegionRet )
{
OSL_ENSURE( pPrvNd, "The SectionNode is missing" );
@@ -502,7 +502,7 @@ SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) const
{
const SwSectionNode* pSectNd = rPos.nNode.GetNode().FindSectionNode();
if( pSectNd )
- return (SwSection*)&pSectNd->GetSection();
+ return const_cast<SwSection*>(&pSectNd->GetSection());
return 0;
}