summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/ndsect.cxx
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2015-03-19 13:13:02 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-03-20 09:50:33 +0000
commit2db08b9ed6427bfa2c7d611b1a7294cb77c6e9b9 (patch)
tree8a51f57d22a9860ffeb7fc3e91a5be6bfea8d796 /sw/source/core/docnode/ndsect.cxx
parenta7b611e8fb62d6e93844e5e7b9f1f00adb4afeea (diff)
tdf#89756 Switched postfix to prefix operator++/--
Replaced postfix to prefix operator++/-- to improving performance Change-Id: Iaee7b22dbe21441b82612ae3a3e336cf56eb280f Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/14903 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/docnode/ndsect.cxx')
-rw-r--r--sw/source/core/docnode/ndsect.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 1a639d791e5c..7ff805252cb1 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -210,7 +210,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
OSL_ENSURE( pPrvNd, "The SectionNode is missing" );
SwNodeIndex aStt( pSttPos->nNode ), aEnd( pEndPos->nNode, +1 );
while( pPrvNd != aStt.GetNode().StartOfSectionNode() )
- aStt--;
+ --aStt;
while( pPrvNd != aEnd.GetNode().StartOfSectionNode() )
++aEnd;
@@ -271,15 +271,15 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SwTxtNode* pTNd;
if( pEndPos->nNode.GetIndex() == pSttPos->nNode.GetIndex() )
{
- pSttPos->nNode--;
- pEndPos->nNode--;
+ --pSttPos->nNode;
+ --pEndPos->nNode;
pTNd = pSttPos->nNode.GetNode().GetTxtNode();
pSttPos->nContent.Assign( pTNd, nCntnt );
}
else
{
// Set to the end of the previous
- pEndPos->nNode--;
+ --pEndPos->nNode;
pTNd = pEndPos->nNode.GetNode().GetTxtNode();
}
nCntnt = (pTNd) ? pTNd->GetTxt().getLength() : 0;
@@ -416,7 +416,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
!( aIdx.GetIndex() < nCmp &&
nCmp < pPrvNd->EndOfSectionIndex() ) )
{
- aIdx--;
+ --aIdx;
}
if( !pPrvNd )
pPrvNd = pNd->IsStartNode() ? static_cast<const SwStartNode*>(pNd)
@@ -462,7 +462,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
nRet = 2;
if( ppSttNd )
{
- aIdx--;
+ --aIdx;
*ppSttNd = &aIdx.GetNode();
}
}
@@ -480,7 +480,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
if( aIdx.GetNode().IsSectionNode() )
{
do {
- aIdx--;
+ --aIdx;
} while( aIdx.GetNode().IsSectionNode() );
if( !aIdx.GetNode().IsSectionNode() )
{
@@ -802,7 +802,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
if (!lcl_IsTOXSection(rSectionData))
{
do {
- aInsPos--;
+ --aInsPos;
} while( aInsPos.GetNode().IsSectionNode() );
++aInsPos;
}