summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/ndsect.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-12-28 22:06:35 +0100
committerJulien Nabet <serval2412@yahoo.fr>2012-12-28 22:06:35 +0100
commit05cc878bb4567aa15841fe316b1e898ae43fe7a7 (patch)
treed8e0d0845f64941a58c3b8c6d709356bf56149e1 /sw/source/core/docnode/ndsect.cxx
parentb2b400770586d545c3066672557a84f1e2f01b55 (diff)
Some cppcheck cleaning in sw
Change-Id: I3dd51a8ddd0c01c453331934869413d5999a826f
Diffstat (limited to 'sw/source/core/docnode/ndsect.cxx')
-rw-r--r--sw/source/core/docnode/ndsect.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 4b52bfbe0d82..7ea4f7e7aba0 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -241,7 +241,6 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
}
- const SwCntntNode* pCNd;
if( pPrvNd && 1 == nRegionRet )
{
pSttPos->nNode.Assign( *pPrvNd );
@@ -259,7 +258,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
else
{
- pCNd = pEndPos->nNode.GetNode().GetCntntNode();
+ const SwCntntNode* pCNd = pEndPos->nNode.GetNode().GetCntntNode();
if( pCNd && pCNd->Len() != pEndPos->nContent.GetIndex() )
{
xub_StrLen nCntnt = pSttPos->nContent.GetIndex();
@@ -807,10 +806,10 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
}
else
{
- SwNode* pNd;
++aInsPos;
if (!lcl_IsTOXSection(rSectionData))
{
+ SwNode* pNd;
while( aInsPos.GetIndex() < Count() - 1 &&
( pNd = &aInsPos.GetNode())->IsEndNode() &&
pNd->StartOfSectionNode()->IsSectionNode())