diff options
author | Gulsah Kose <gulsah.1004@gmail.com> | 2015-03-19 13:13:02 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-20 09:50:33 +0000 |
commit | 2db08b9ed6427bfa2c7d611b1a7294cb77c6e9b9 (patch) | |
tree | 8a51f57d22a9860ffeb7fc3e91a5be6bfea8d796 /sw | |
parent | a7b611e8fb62d6e93844e5e7b9f1f00adb4afeea (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')
47 files changed, 206 insertions, 206 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 7bf17cbf5dea..862fdb64adca 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -78,7 +78,7 @@ namespace { SwPaM aStartPaM(rStart); io_pDoc->getIDocumentContentOperations().InsertString(aStartPaM, OUString(aStartMark)); - rStart.nContent--; + --rStart.nContent; pField->SetMarkStartPos( rStart ); } @@ -91,7 +91,7 @@ namespace { SwPaM aEndPaM(rEnd); io_pDoc->getIDocumentContentOperations().InsertString(aEndPaM, OUString(aEndMark)); - rEnd.nContent++; + ++rEnd.nContent; } io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL); @@ -112,7 +112,7 @@ namespace if( ch_start == aStartMark ) { SwPaM aStart(rStart, rStart); - aStart.End()->nContent++; + ++aStart.End()->nContent; io_pDoc->getIDocumentContentOperations().DeleteRange(aStart); } @@ -125,7 +125,7 @@ namespace if ( ch_end == aEndMark ) { SwPaM aEnd(rEnd, rEnd); - aEnd.Start()->nContent--; + --aEnd.Start()->nContent; io_pDoc->getIDocumentContentOperations().DeleteRange(aEnd); } diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index ff6475435f9d..b75dbe1c121b 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -237,8 +237,8 @@ bool SwCrsrShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark) // watch Crsr-Moves CrsrStateHelper aCrsrSt(*this); aCrsrSt.SetCrsrToMark(pMark); - aCrsrSt.m_pCrsr->GetPoint()->nContent++; - aCrsrSt.m_pCrsr->GetMark()->nContent--; + ++aCrsrSt.m_pCrsr->GetPoint()->nContent; + --aCrsrSt.m_pCrsr->GetMark()->nContent; if(aCrsrSt.RollbackIfIllegal()) return false; diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 35ec07c6a31f..6f1efcab5ad5 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -736,7 +736,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const // the previous character, to also get the fieldmark, if we're // exactly at the end. SwPosition aPrevChar(*GetPoint()); - aPrevChar.nContent--; + --aPrevChar.nContent; pFieldmark = pMarksAccess->getFieldmarkFor(aPrevChar); if (pFieldmark && pFieldmark->GetMarkEnd() == *GetPoint()) bRet = true; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 80ea9b156016..93e17cfb9c2f 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -672,7 +672,7 @@ SetPrevCrsr: nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ); } // at the beginning of a table, so go to next node - aCellStt--; + --aCellStt; if( ( pNd = &aCellStt.GetNode())->IsStartNode() || HasMark() ) { // if only table in FlyFrame or SSelection then stay on old position @@ -1357,7 +1357,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const const SwPosition rStart = pMark->GetMarkStart(); GetPoint()->nNode = rStart.nNode; GetPoint()->nContent = rStart.nContent; - GetPoint()->nContent++; // Don't select the start delimiter + ++GetPoint()->nContent; // Don't select the start delimiter const SwPosition rEnd = pMark->GetMarkEnd(); @@ -1366,7 +1366,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const SetMark(); GetMark()->nNode = rEnd.nNode; GetMark()->nContent = rEnd.nContent; - GetMark()->nContent--; //Don't select the end delimiter + --GetMark()->nContent; //Don't select the end delimiter } bRet = true; } @@ -1407,7 +1407,7 @@ bool SwCursor::SelectWordWT( SwViewShell* pViewShell, sal_Int16 nWordType, const bool bEndMatch = GetPoint()->nNode == pAnnotationMark->GetMarkEnd().nNode && GetPoint()->nContent.GetIndex() + 1 == pAnnotationMark->GetMarkEnd().nContent.GetIndex(); if (bStartMatch && bEndMatch) - GetPoint()->nContent++; + ++GetPoint()->nContent; } if( !IsSelOvr() ) bRet = true; @@ -1902,7 +1902,7 @@ bool SwCursor::IsAtLeftRightMargin( bool bLeft, bool bAPI ) const { SwPaM aPam( *GetPoint() ); if( !bLeft && aPam.GetPoint()->nContent.GetIndex() ) - aPam.GetPoint()->nContent--; + --aPam.GetPoint()->nContent; bRet = (bLeft ? pFrm->LeftMargin( &aPam ) : pFrm->RightMargin( &aPam, bAPI )) && *aPam.GetPoint() == *GetPoint(); diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 1cb8fe4dc65d..09bf2b519710 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -39,7 +39,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, do { while( aIdx.GetIndex() && 0 == ( pNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode()) ) - aIdx--; + --aIdx; if( pNd ) // is there another section node? { @@ -57,7 +57,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, true, !bInReadOnly ); if( !pCNd ) { - aIdx--; + --aIdx; continue; } rCurCrsr.GetPoint()->nContent.Assign( pCNd, 0 ); diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 4b46c9813f01..d545fd846dd1 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -493,7 +493,7 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl, SwNodeIndex aTmpIdx( aIdx ); while( aTmpIdx.GetIndex() && 0 == ( pInnerTblNd = aTmpIdx.GetNode().StartOfSectionNode()->GetTableNode()) ) - aTmpIdx--; + --aTmpIdx; if( pInnerTblNd == pTblNd ) aIdx.Assign( *pTblNd, - 1 ); @@ -502,7 +502,7 @@ bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl, do { while( aIdx.GetIndex() && 0 == ( pTblNd = aIdx.GetNode().StartOfSectionNode()->GetTableNode()) ) - aIdx--; + --aIdx; if( pTblNd ) // any further table node? { diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 61f207facdb4..44a7f2561b38 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1668,7 +1668,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) // #i65201#: Expand again, see comment above. if( pTmp->GetPoint()->nContent == 0 ) { - pTmp->GetPoint()->nNode++; + ++pTmp->GetPoint()->nNode; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } // #i101009# @@ -1676,7 +1676,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) if (& GetEndOfContent() == & pTmp->GetPoint()->nNode.GetNode()) { - pTmp->GetPoint()->nNode--; + --pTmp->GetPoint()->nNode; SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); pTmp->GetPoint()->nContent.Assign( pContentNode, (pContentNode) ? pContentNode->Len() : 0 ); @@ -1700,7 +1700,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) do { if( pTmp->GetPoint()->nContent == 0 ) { - pTmp->GetPoint()->nNode++; + ++pTmp->GetPoint()->nNode; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } // #i101009# @@ -1708,7 +1708,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) if (& GetEndOfContent() == & pTmp->GetPoint()->nNode.GetNode()) { - pTmp->GetPoint()->nNode--; + --pTmp->GetPoint()->nNode; SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); pTmp->GetPoint()->nContent.Assign( pContentNode, (pContentNode) ? pContentNode->Len() : 0 ); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index a5d913844a9c..8cec8bc11205 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -365,7 +365,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, } if( pEnd->nContent.GetIndex() == pEnd->nNode.GetNode().GetCntntNode()->Len() ) // set up a later, and all CharFmtAttr -> TxtFmtAttr - aTmpEnd++, bAdd = false; + ++aTmpEnd, bAdd = false; else if( pStt->nNode != pEnd->nNode || !pStt->nContent.GetIndex() ) { SwTxtNode* pTNd = aTmpEnd.GetNode().GetTxtNode(); diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 8c017967f98a..f044096e59ad 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -414,9 +414,9 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, aSectData.SetLinkFileName(sFileName); aSectData.SetProtectFlag(true); - aEndIdx--; // in the InsertSection the end is inclusive + --aEndIdx; // in the InsertSection the end is inclusive while( aEndIdx.GetNode().IsStartNode() ) - aEndIdx--; + --aEndIdx; // If any Section ends or starts in the new sectionrange, // they must end or start before or after the range! @@ -431,7 +431,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, bool bMvIdx = aEndIdx == *pSectEnd; DelSectionFmt( pSectNd->GetSection().GetFmt() ); if( bMvIdx ) - aEndIdx--; + --aEndIdx; } else { diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index c2fe4377b0a4..2c85114aae02 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -475,26 +475,26 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset ) // which ends inside the range => The complete section will be moved. // The range will be shrunk if the last position is a start node. // The range will be shrunk if the last node is an end node which starts before the range. - aSttRg--; + --aSttRg; while( aSttRg.GetNode().IsStartNode() ) { pNd = aSttRg.GetNode().EndOfSectionNode(); if( pNd->GetIndex() >= aEndRg.GetIndex() ) break; - aSttRg--; + --aSttRg; } ++aSttRg; - aEndRg--; + --aEndRg; while( aEndRg.GetNode().IsStartNode() ) - aEndRg--; + --aEndRg; while( aEndRg.GetNode().IsEndNode() ) { pNd = aEndRg.GetNode().StartOfSectionNode(); if( pNd->GetIndex() >= aSttRg.GetIndex() ) break; - aEndRg--; + --aEndRg; } ++aEndRg; @@ -522,7 +522,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset ) if( pNd->GetIndex() >= aEndRg.GetIndex() ) break; } - aInsertPos--; + --aInsertPos; --nNewPos; } @@ -537,7 +537,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset ) pNd = aInsertPos.GetNode().StartOfSectionNode(); if( pNd->GetIndex() >= aSttRg.GetIndex() ) break; - aInsertPos--; + --aInsertPos; --nNewPos; } } @@ -1404,7 +1404,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext, // If NO_NUMLEVEL is switched on, we search the preceding Node with Numbering bool bError = false; do { - aIdx--; + --aIdx; if( aIdx.GetNode().IsTxtNode() ) { pNd = aIdx.GetNode().GetTxtNode(); @@ -1435,9 +1435,9 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext, const SwTxtNode* pLast; if( bNext ) - aIdx++, pLast = pNd; + ++aIdx, pLast = pNd; else - aIdx--, pLast = 0; + --aIdx, pLast = 0; while( bNext ? ( aIdx.GetIndex() < aIdx.GetNodes().Count() - 1 ) : aIdx.GetIndex() != 0 ) @@ -1468,7 +1468,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext, if( bNext ) ++aIdx; else - aIdx--; + --aIdx; } if( !bRet && !bOverUpper && pLast ) // do not iterate over higher numbers, but still to the end @@ -1528,7 +1528,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos, if (bForward) ++aIdx; else - aIdx--; + --aIdx; } if (aIdx.GetNode().IsTxtNode()) @@ -1566,7 +1566,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos, if (bForward) ++aIdx; else - aIdx--; + --aIdx; } pNode = &aIdx.GetNode(); @@ -1929,12 +1929,12 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv ) SwPosition* pPos; if( ( pPos = &pTmp->GetBound(true))->nNode == aIdx ) { - pPos->nNode++; + ++pPos->nNode; pPos->nContent.Assign( pPos->nNode.GetNode().GetCntntNode(),0); } if( ( pPos = &pTmp->GetBound(false))->nNode == aIdx ) { - pPos->nNode++; + ++pPos->nNode; pPos->nContent.Assign( pPos->nNode.GetNode().GetCntntNode(),0); } } @@ -1944,7 +1944,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv ) pCNd->JoinNext(); } - rOrigPam.GetPoint()->nNode++; + ++rOrigPam.GetPoint()->nNode; rOrigPam.GetPoint()->nContent.Assign( rOrigPam.GetCntntNode(), 0 ); RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode(); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 0f3d4aa20a3d..dd025344bb8d 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -391,7 +391,7 @@ bool SwRedlineTbl::InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsPos } else if( rCurNd.IsCntntNode() ) pC = rCurNd.GetCntntNode(); - aNewStt.nNode++; + ++aNewStt.nNode; } while( aNewStt.nNode.GetIndex() < pEnd->nNode.GetIndex() ); if( aNewStt.nNode == pEnd->nNode ) @@ -1407,7 +1407,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) if( pCNd ) aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); else - aPam.GetPoint()->nNode++; + ++aPam.GetPoint()->nNode; SwFmtColl* pColl = pCNd && pCNd->Len() && aPam.GetPoint()->nNode != aPam.GetMark()->nNode @@ -1419,7 +1419,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) SwPosition aPos( *GetPoint() ); if( bDelLastPara && *aPam.GetPoint() == *aPam.GetMark() ) { - aPos.nNode--; + --aPos.nNode; pDoc->getIDocumentContentOperations().AppendTxtNode( aPos ); } @@ -1437,7 +1437,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) if( bDelLastPara ) { - GetPoint()->nNode++; + ++GetPoint()->nNode; GetPoint()->nContent.Assign( pCNd = GetCntntNode(), 0 ); bDelLastPara = false; } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 2cdccf6bf966..9654b26510dd 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -366,7 +366,7 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos, SwSectionData headerData( TOX_HEADER_SECTION, sNm ); - SwNodeIndex aStt( *pHeadNd ); aIdx--; + SwNodeIndex aStt( *pHeadNd ); --aIdx; SwSectionFmt* pSectFmt = MakeSectionFmt( 0 ); GetNodes().InsertTextSection( aStt, *pSectFmt, headerData, 0, &aIdx, true, false); @@ -879,7 +879,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, pFirstEmptyNd->SetAttr( aBrkSet ); } } - aEndIdx--; + --aEndIdx; SwPosition aPos( aEndIdx, SwIndex( pFirstEmptyNd, 0 )); pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, true ); @@ -907,7 +907,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, SwSectionData headerData( TOX_HEADER_SECTION, sNm ); - SwNodeIndex aStt( *pHeadNd ); aIdx--; + SwNodeIndex aStt( *pHeadNd ); --aIdx; SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 ); pDoc->GetNodes().InsertTextSection( aStt, *pSectFmt, headerData, 0, &aIdx, true, false); 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; } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 0fc4eaef3804..fd1bc17d0901 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -670,21 +670,21 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, || pEnd->nNode.GetIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 ) { getIDocumentContentOperations().SplitNode( *pEnd, false ); - ((SwNodeIndex&)pEnd->nNode)--; + --((SwNodeIndex&)pEnd->nNode); ((SwIndex&)pEnd->nContent).Assign( pEnd->nNode.GetNode().GetCntntNode(), 0 ); // A Node and at the End? if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() ) - aRg.aStart--; + --aRg.aStart; } else - aRg.aEnd++; + ++aRg.aEnd; } if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() ) { OSL_FAIL( "empty range" ); - aRg.aEnd++; + ++aRg.aEnd; } // We always use Upper to insert the Table @@ -1161,21 +1161,21 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > || pEnd->nNode.GetIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 ) { getIDocumentContentOperations().SplitNode( *pEnd, false ); - ((SwNodeIndex&)pEnd->nNode)--; + --((SwNodeIndex&)pEnd->nNode); ((SwIndex&)pEnd->nContent).Assign( pEnd->nNode.GetNode().GetCntntNode(), 0 ); // A Node and at the End? if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() ) - aRg.aStart--; + --aRg.aStart; } else - aRg.aEnd++; + ++aRg.aEnd; } if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() ) { OSL_FAIL( "empty range" ); - aRg.aEnd++; + ++aRg.aEnd; } // We always use Upper to insert the Table @@ -1439,8 +1439,8 @@ bool SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh ) bool bRet = GetNodes().TableToText( aRg, cCh, pUndo ); if( pUndoRg ) { - pUndoRg->aStart++; - pUndoRg->aEnd--; + ++pUndoRg->aStart; + --pUndoRg->aEnd; pUndo->SetRange( *pUndoRg ); GetIDocumentUndoRedo().AppendUndo(pUndo); delete pUndoRg; @@ -1508,7 +1508,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara ) { // Join the current text node with the last from the previous box if possible sal_uLong nNdIdx = aDelRg.aStart.GetIndex(); - aDelRg.aStart--; + --aDelRg.aStart; if( pDelPara->pLastNd == &aDelRg.aStart.GetNode() ) { // Inserting the separator @@ -1531,13 +1531,13 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara ) } else if( pDelPara->pUndo ) { - aDelRg.aStart++; + ++aDelRg.aStart; pDelPara->pUndo->AddBoxPos( *pDoc, nNdIdx, aDelRg.aEnd.GetIndex() ); } } else if( pDelPara->pUndo ) pDelPara->pUndo->AddBoxPos( *pDoc, aDelRg.aStart.GetIndex(), aDelRg.aEnd.GetIndex() ); - aDelRg.aEnd--; + --aDelRg.aEnd; pDelPara->pLastNd = aDelRg.aEnd.GetNode().GetTxtNode(); // Do not take over the NumberFormatting's adjustment @@ -1634,7 +1634,7 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, } aDelRg.aStart = *pSNd->EndOfSectionNode(); } - aDelRg.aStart++; + ++aDelRg.aStart; } } diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 31d6f5a485b2..578e268c310a 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1227,7 +1227,7 @@ bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const if( pIdx->GetIndex() > 0 ) { if( !IsTxtNode() ) - (*pIdx)--; + --(*pIdx); else { const SwTxtNode& rTNd = *GetTxtNode(); @@ -1258,7 +1258,7 @@ bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const bRet = false; } else if( nPos ) - (*pIdx)--; + --(*pIdx); else bRet = false; } @@ -1765,7 +1765,7 @@ bool SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const while( aIdx.GetIndex() && (( pNd = &aIdx.GetNode())->IsSectionNode() || ( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode() ))) - aIdx--; + --aIdx; if (0 == aIdx.GetIndex()) return false; diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 0e10b9d73a47..849b5df4cbdb 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -111,7 +111,7 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx) } if ( bFound ) break; - aTmp--; + --aTmp; } if( !aTmp.GetIndex() ) diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index bec2c28f4e12..de051b9dfcf7 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -419,17 +419,17 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, while( ND_STARTNODE == (pAktNode = &aRg.aStart.GetNode())->GetNodeType() || ( pAktNode->IsEndNode() && !pAktNode->pStartOfSection->IsSectionNode() ) ) - aRg.aStart++; - aRg.aStart--; + ++aRg.aStart; + --aRg.aStart; // if aEnd-1 points to no ContentNode, search previous one - aRg.aEnd--; + --aRg.aEnd; while( ( (( pAktNode = &aRg.aEnd.GetNode())->GetStartNode() && !pAktNode->IsSectionNode() ) || ( pAktNode->IsEndNode() && ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) ) && aRg.aEnd > aRg.aStart ) - aRg.aEnd--; + --aRg.aEnd; // if in same array, check insertion position if( aRg.aStart >= aRg.aEnd ) @@ -627,13 +627,13 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, else { // JP 18.5.2001 (Bug 70454) creating new section? - aRg.aEnd--; + --aRg.aEnd; break; } - aRg.aEnd--; - aIdx--; + --aRg.aEnd; + --aIdx; } while( false ); } else @@ -661,10 +661,10 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, pSttNd->pStartOfSection = aIdx.GetNode().pStartOfSection; rNodes.InsertNode( pSttNd, aIdx ); rNodes.InsertNode( pAktNode, aIdx ); - aIdx--; + --aIdx; pSttNd->pEndOfSection = static_cast<SwEndNode*>(pAktNode); - aRg.aEnd--; + --aRg.aEnd; nLevel++; // put the index pointing to the StartNode onto the stack aSttNdStack.insert( aSttNdStack.begin() + nLevel, pSttNd ); @@ -695,8 +695,8 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, nInsPos = 0; } new SwDummySectionNode( aIdx ); - aRg.aEnd--; - aIdx--; + --aRg.aEnd; + --aIdx; break; } // no break !! @@ -707,7 +707,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // and only if it's a top level section if( !nInsPos && !nLevel ) { - aRg.aEnd--; + --aRg.aEnd; break; } @@ -719,18 +719,18 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, ND_STARTNODE, static_cast<SwStartNode*>(pAktNode)->GetStartNodeType() ); - aTmpSIdx--; + --aTmpSIdx; SwNodeIndex aTmpEIdx( aOrigInsPos.aEnd ); new SwEndNode( aTmpEIdx, *pTmpStt ); - aTmpEIdx--; + --aTmpEIdx; ++aTmpSIdx; // set correct StartOfSection - aRg.aEnd++; + ++aRg.aEnd; { SwNodeIndex aCntIdx( aRg.aEnd ); - for( sal_uLong n = 0; n < nInsPos; n++, aCntIdx++) + for( sal_uLong n = 0; n < nInsPos; n++, ++aCntIdx) aCntIdx.GetNode().pStartOfSection = pTmpStt; } @@ -741,11 +741,11 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, else { pAktNode->pStartOfSection = pTmpStt; - aTmpEIdx--; + --aTmpEIdx; } - aIdx--; // after the inserted StartNode - aRg.aEnd--; // before StartNode + --aIdx; // after the inserted StartNode + --aRg.aEnd; // before StartNode // copy array. CAUTION: all indices after // "aRg.aEnd+1" will be moved as well! SwNodeIndex aSwIndex( aRg.aEnd, 1 ); @@ -767,7 +767,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // remove pointer from node array RemoveNode( aRg.aEnd.GetIndex(), 1, true ); - aRg.aEnd--; + --aRg.aEnd; SwSectionNode* pSectNd = aSttNdStack[ nLevel ]->GetSectionNode(); if( pSectNd && !--nSectNdCnt ) @@ -787,7 +787,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, pTmpNode->StartOfSectionNode() == pAktNode ) { DelNodes( aRg.aEnd, 2 ); - aRg.aEnd--; + --aRg.aEnd; } } break; @@ -799,7 +799,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, static_cast<SwCntntNode*>(pAktNode)->DelFrms(); pAktNode->pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; - aRg.aEnd--; + --aRg.aEnd; } break; case ND_GRFNODE: @@ -810,7 +810,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, pAktNode->pStartOfSection = aSttNdStack[ nLevel ]; nInsPos++; - aRg.aEnd--; + --aRg.aEnd; } break; @@ -839,13 +839,13 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, SwNode* pTmpNd = &aIdx.GetNode(); if( pTmpNd->IsSectionNode() || pTmpNd->StartOfSectionNode()->IsSectionNode() ) - aIdx--; // skip + --aIdx; // skip } } else { OSL_FAIL( "How can this node be in the node array?" ); } - aRg.aEnd--; + --aRg.aEnd; break; default: @@ -859,7 +859,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, SwNodeIndex aSwIndex( aRg.aEnd, 1 ); ChgNode( aSwIndex, nInsPos, aIdx, bNewFrms ); } - aRg.aEnd++; // again, exclusive end + ++aRg.aEnd; // again, exclusive end // delete all resulting empty start/end node pairs if( ( pAktNode = &aRg.aStart.GetNode())->GetStartNode() && @@ -868,7 +868,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, DelNodes( aRg.aStart, 2 ); // initialize numbering update - aOrigInsPos.aStart++; + ++aOrigInsPos.aStart; // Moved in same node array? Then call update top down! if( this == &rNodes && aRg.aEnd.GetIndex() >= aOrigInsPos.aStart.GetIndex() ) @@ -927,16 +927,16 @@ void SwNodes::SectionDown(SwNodeRange *pRange, SwStartNodeType eSttNdTyp ) // If the end of a range is before or at a StartNode, so delete it, // otherwise empty S/E or E/S nodes would be created. // For other nodes, insert a new end node. - pRange->aEnd--; + --pRange->aEnd; if( pRange->aEnd.GetNode().GetStartNode() ) DelNodes( pRange->aEnd, 1 ); else { - pRange->aEnd++; + ++pRange->aEnd; // insert a new EndNode new SwEndNode( pRange->aEnd, *pRange->aStart.GetNode().GetStartNode() ); } - pRange->aEnd--; + --pRange->aEnd; SectionUpDown( aTmpIdx, pRange->aEnd ); } @@ -1006,7 +1006,7 @@ void SwNodes::SectionUp(SwNodeRange *pRange) new SwStartNode( pRange->aEnd ); /*?? which NodeType ??*/ aTmpIdx = *pRange->aEnd.GetNode().EndOfSectionNode(); - pRange->aEnd--; + --pRange->aEnd; } SectionUpDown( aIdx, aTmpIdx ); @@ -1092,13 +1092,13 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) while( ( pAktNode = &aRg.aEnd.GetNode())->GetStartNode() || ( pAktNode->GetEndNode() && !pAktNode->pStartOfSection->IsTableNode() )) - aRg.aEnd--; + --aRg.aEnd; nCnt = 0; //TODO: check/improve comment // increase start so that we are able to use "<" (using "<=" might cause // problems if aEnd == aStart and aEnd is deleted, so aEnd <= aStart) - aRg.aStart--; + --aRg.aStart; bool bSaveInNodesDel = bInNodesDel; bInNodesDel = true; @@ -1139,7 +1139,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) pNd->pStartOfSection->IsTableNode() ) static_cast<SwTableNode*>(pNd->pStartOfSection)->DelFrms(); - aRg.aEnd--; + --aRg.aEnd; nCnt++; } while( pNd != pChkNd ); @@ -1148,7 +1148,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) { RemoveNode( aRg.aEnd.GetIndex()+1, nCnt, true ); // delete nCnt = 0; - aRg.aEnd--; // before the EndNode + --aRg.aEnd; // before the EndNode nLevel++; } } @@ -1159,7 +1159,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) if( nCnt ) { // now delete array - aRg.aEnd++; + ++aRg.aEnd; RemoveNode( aRg.aEnd.GetIndex(), nCnt, true ); nCnt = 0; } @@ -1174,7 +1174,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) // after deletion, aEnd might point to a EndNode... // delete all empty start/end node pairs SwNode* pTmpNode = aRg.aEnd.GetNode().GetEndNode(); - aRg.aEnd--; + --aRg.aEnd; while( pTmpNode && ( pAktNode = &aRg.aEnd.GetNode())->GetStartNode() && pAktNode->StartOfSectionIndex() ) @@ -1182,7 +1182,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) // remove end and start node DelNodes( aRg.aEnd, 2 ); pTmpNode = aRg.aEnd.GetNode().GetEndNode(); - aRg.aEnd--; + --aRg.aEnd; } } else // "normal" node, so insert into TmpArray @@ -1201,12 +1201,12 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) else if( pAktNode->IsCntntNode() ) static_cast<SwCntntNode*>(pAktNode)->InvalidateNumRule(); - aRg.aEnd--; + --aRg.aEnd; nCnt++; } } - aRg.aEnd++; + ++aRg.aEnd; if( nCnt != 0 ) RemoveNode( aRg.aEnd.GetIndex(), nCnt, true ); // delete the rest @@ -1217,7 +1217,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) // but none of the holy 5. (???) { DelNodes( aRg.aStart, 2 ); // delete start and end node - aRg.aStart--; + --aRg.aStart; } bInNodesDel = bSaveInNodesDel; @@ -1304,7 +1304,7 @@ SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) const SwNodeIndex aTmp( *pIdx, -1 ); SwNode* pNd = 0; while( aTmp.GetIndex() && false == ( pNd = &aTmp.GetNode())->IsCntntNode() ) - aTmp--; + --aTmp; if( !aTmp.GetIndex() ) pNd = 0; @@ -1471,7 +1471,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) if( !pDestNd ) { pDestNd = rNodes.MakeTxtNode( rPos.nNode, pSrcNd->GetTxtColl() ); - rPos.nNode--; + --rPos.nNode; rPos.nContent.Assign( pDestNd, 0 ); bCopyCollFmt = true; } @@ -1519,7 +1519,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) if( rPos.nNode == aEndIdx ) { - aEndIdx--; + --aEndIdx; } bSplitDestNd = true; @@ -1563,7 +1563,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) { if( rPos.nContent.GetIndex() == pDestNd->Len() ) { - rPos.nNode++; + ++rPos.nNode; } else if( rPos.nContent.GetIndex() ) { @@ -1584,7 +1584,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) if ( bCorrEnd ) { - aEndIdx--; + --aEndIdx; } } } @@ -1601,12 +1601,12 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) { if( rPos.nNode < rNodes.GetEndOfContent().GetIndex() ) { - rPos.nNode++; + ++rPos.nNode; } pDestNd = rNodes.MakeTxtNode( rPos.nNode, pEndSrcNd->GetTxtColl() ); - rPos.nNode--; + --rPos.nNode; rPos.nContent.Assign( pDestNd, 0 ); } else @@ -1638,7 +1638,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) } if( !bSplitDestNd ) { - rPos.nNode++; + ++rPos.nNode; rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(), 0 ); } } @@ -1694,10 +1694,10 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, while( ND_STARTNODE == (pAktNode = & aRg.aStart.GetNode())->GetNodeType() || ( pAktNode->IsEndNode() && !pAktNode->pStartOfSection->IsSectionNode() ) ) - aRg.aStart++; + ++aRg.aStart; // if aEnd-1 points to no ContentNode, search previous one - aRg.aEnd--; + --aRg.aEnd; // #i107142#: if aEnd is start node of a special section, do nothing. // Otherwise this could lead to crash: going through all previous // special section nodes and then one before the first. @@ -1708,10 +1708,10 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, ( pAktNode->IsEndNode() && ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) ) { - aRg.aEnd--; + --aRg.aEnd; } } - aRg.aEnd++; + ++aRg.aEnd; // if in same array, check insertion position if( aRg.aStart >= aRg.aEnd ) @@ -1756,9 +1756,9 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, new SwDummySectionNode( aInsPos ); // copy all of the table's nodes into the current cell - for( aRg.aStart++; aRg.aStart.GetIndex() < + for( ++aRg.aStart; aRg.aStart.GetIndex() < pAktNode->EndOfSectionIndex(); - aRg.aStart++ ) + ++aRg.aStart ) { // insert a DummyNode for the box-StartNode? if( bTblInsDummyNode ) @@ -1830,7 +1830,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, SwStartNode* pTmp = new SwStartNode( aInsPos, ND_STARTNODE, static_cast<SwStartNode*>(pAktNode)->GetStartNodeType() ); new SwEndNode( aInsPos, *pTmp ); - aInsPos--; + --aInsPos; nLevel++; } break; @@ -1880,7 +1880,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, default: OSL_FAIL( "Unknown node type" ); } - aRg.aStart++; + ++aRg.aStart; } } @@ -2031,7 +2031,7 @@ SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx, return const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pNd)); } } - aTmp--; + --aTmp; } return 0; } @@ -2072,7 +2072,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, SwNode* pNd; if( pEnd ) { - aIdx--; + --aIdx; pNd = &aIdx.GetNode(); } else diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index cd9eaa98db27..14a2beee10ae 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1228,13 +1228,13 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) pVSh->StartAction(); SwPosition aPos( aIdx, SwIndex( pNewNd, 0 )); - aPos.nNode--; + --aPos.nNode; pDoc->CorrAbs( aIdx, aEndIdx, aPos, true ); pPam = new SwPaM( aPos ); // Delete everything succeeding it - aIdx--; + --aIdx; DelFlyInRange( aIdx, aEndIdx ); _DelBookmarks(aIdx, aEndIdx); ++aIdx; diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index ff480c7da26e..6a032ce5d1ae 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -279,12 +279,12 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const bAtNormalPos) if( bAtNormalPos || !pIdx ) pIdx = new SwNodeIndex( rCrsr.GetPoint()->nNode, -1 ); else - (*pIdx)--; + --(*pIdx); SwTxtNode* pTNd = pIdx->GetNode().GetTxtNode(); while (pTNd && !pTNd->GetTxt().getLength()) { - (*pIdx)--; + --(*pIdx); pTNd = pIdx->GetNode().GetTxtNode(); } if( pTNd && 0 == pTNd->GetAttrOutlineLevel() ) diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index b69d81f2c19e..50972f170aa6 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -300,7 +300,7 @@ OUString SwAutoFormat::GoNextPara() return OUString(); } - m_aNdIdx++; + ++m_aNdIdx; if( m_aNdIdx.GetIndex() >= m_aEndNdIdx.GetIndex() ) { m_bEnd = true; @@ -1000,7 +1000,7 @@ bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode(); if (nBlnkPos && nBlnkPos-- < pTxtNd->GetTxt().getLength() && (' ' == pTxtNd->GetTxt()[nBlnkPos])) - pPos->nContent--; + --pPos->nContent; else { pPos = rPam.GetPoint() == pPos ? rPam.GetMark() : rPam.GetPoint(); @@ -1008,7 +1008,7 @@ bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const pTxtNd = pPos->nNode.GetNode().GetTxtNode(); if (nBlnkPos < pTxtNd->GetTxt().getLength() && (' ' == pTxtNd->GetTxt()[nBlnkPos])) - pPos->nContent++; + ++pPos->nContent; else return false; } @@ -1116,12 +1116,12 @@ bool SwAutoFormat::DeleteCurNxtPara( const OUString& rNxtPara ) GetTrailingBlanks( m_pCurTxtNd->GetTxt() ) ); m_aDelPam.SetMark(); - m_aDelPam.GetPoint()->nNode++; + ++m_aDelPam.GetPoint()->nNode; SwTxtNode* pTNd = m_aDelPam.GetNode().GetTxtNode(); if( !pTNd ) { // then delete only up to end of the paragraph - m_aDelPam.GetPoint()->nNode--; + --m_aDelPam.GetPoint()->nNode; m_aDelPam.GetPoint()->nContent = m_pCurTxtNd->GetTxt().getLength(); } else @@ -1149,7 +1149,7 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara ) m_pCurTxtNd, m_pCurTxtNd->GetTxt().getLength() ); m_aDelPam.SetMark(); - m_aDelPam.GetMark()->nNode--; + --m_aDelPam.GetMark()->nNode; SwTxtNode* pTNd = m_aDelPam.GetNode( false ).GetTxtNode(); if( pTNd ) // first use the previous text node @@ -1221,7 +1221,7 @@ void SwAutoFormat::DelPrevPara() m_aDelPam.GetPoint()->nContent.Assign( m_pCurTxtNd, 0 ); m_aDelPam.SetMark(); - m_aDelPam.GetPoint()->nNode--; + --m_aDelPam.GetPoint()->nNode; SwTxtNode* pTNd = m_aDelPam.GetNode().GetTxtNode(); if( pTNd ) { @@ -1571,7 +1571,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) if( m_aFlags.bAFmtByInput ) { m_aDelPam.SetMark(); - m_aDelPam.GetMark()->nNode++; + ++m_aDelPam.GetMark()->nNode; m_aDelPam.GetNode(false).GetTxtNode()->SetAttrListLevel( nLvl ); } @@ -2097,9 +2097,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, if( pSttNd ) { m_aNdIdx = *pSttNd; - m_aNdIdx--; // for GoNextPara, one paragraph prior to that + --m_aNdIdx; // for GoNextPara, one paragraph prior to that m_aEndNdIdx = *pEndNd; - m_aEndNdIdx++; + ++m_aEndNdIdx; // check the previous TextNode pNxtNd = m_aNdIdx.GetNode().GetTxtNode(); @@ -2167,7 +2167,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, DelEmptyLine(); // Was there really a deletion of a node? if( nOldCnt != m_pDoc->GetNodes().Count() ) - m_aNdIdx--; // do not skip the next paragraph + --m_aNdIdx; // do not skip the next paragraph } m_eStat = READ_NEXT_PARA; } diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 2adece7b60c3..0d973e1c219e 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -330,7 +330,7 @@ void SwEditShell::UpdateFlds( SwField &rFld ) pMsgHnt, false); } // The search area is reduced by the found area: - pCurStt->nContent++; + ++pCurStt->nContent; } } diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index c0da9dd4c078..b0a8678224cf 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -160,7 +160,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, { bEndUndo = true; pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); - rPos.nNode--; + --rPos.nNode; pMyDoc->getIDocumentContentOperations().AppendTxtNode( rPos ); pCrsr->SetMark(); } @@ -202,7 +202,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, { bEndUndo = true; pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); - rPos.nNode--; + --rPos.nNode; pMyDoc->getIDocumentContentOperations().AppendTxtNode( rPos ); } @@ -278,7 +278,7 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr , rPos.nNode = rArr[ nDelPos ]->GetDocPos(); else rPos.nNode = pMyDoc->GetNodes().GetEndOfContent(); - rPos.nNode--; + --rPos.nNode; if( !pMyDoc->getIDocumentContentOperations().DelFullPara( *pCrsr ) ) Delete(); } diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index f67c3dfd16ce..6d80fe37b658 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -171,7 +171,7 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd ) if( pSttNd ) { *pSttNd = aPos.nNode; - (*pSttNd)--; + --(*pSttNd); } bool bRet = false; diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index fc86a601940c..64e418abf407 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -702,7 +702,7 @@ const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const { const SwNodeIndex aEndNode = rCurrentCrsr.End()->nNode; - for ( SwNodeIndex aNode = rCurrentCrsr.Start()->nNode; aNode <= aEndNode; aNode++ ) + for ( SwNodeIndex aNode = rCurrentCrsr.Start()->nNode; aNode <= aEndNode; ++aNode ) { const SwNumRule* pNumRule = GetDoc()->GetNumRuleAtPos( SwPosition( aNode ) ); if ( pNumRule == NULL ) diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 33ed0de23735..cf60418bb1be 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -356,10 +356,10 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) SwNodeIndex aBegin( pCurrentPos->nNode ); if( rCurrentNode.IsCntntNode() && (pCurrentPos->nContent.GetIndex() == 0)) - aBegin--; + --aBegin; while( (aBegin != pInnermostNode->GetIndex()) && aBegin.GetNode().IsStartNode() ) - aBegin--; + --aBegin; bool bStart = ( aBegin == pInnermostNode->GetIndex() ); // we found an end if diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index d747c3c1ce73..c334ee4bd6e8 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -68,7 +68,7 @@ void ConvertNestedTablesToText( const SwTableLines &rTableLines, sal_Unicode { SwNodeIndex nodeIndex( *pTableBox->GetSttNd(), 1 ); SwNodeIndex endNodeIndex( *pTableBox->GetSttNd()->EndOfSectionNode() ); - for( ; nodeIndex < endNodeIndex ; nodeIndex++ ) + for( ; nodeIndex < endNodeIndex ; ++nodeIndex ) { if ( SwTableNode* pTableNode = nodeIndex.GetNode().GetTableNode() ) ConvertTableToText( pTableNode, cCh ); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 69226a020ac6..38513d477fe5 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -98,7 +98,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) pClpDoc->GetNodes().GetEndOfContent().GetIndex() - aSttIdx.GetIndex() ); pTxtNd = pClpDoc->GetNodes().MakeTxtNode( aSttIdx, (SwTxtFmtColl*)pClpDoc->GetDfltTxtFmtColl() ); - aSttIdx--; + --aSttIdx; } // also delete surrounding FlyFrames if any @@ -797,7 +797,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) } { SwNodeIndex aIndexBefore(rInsPos.nNode); - aIndexBefore--; + --aIndexBefore; pClpDoc->getIDocumentContentOperations().CopyRange( rCopy, rInsPos, false ); { ++aIndexBefore; @@ -1047,7 +1047,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { SwNodeIndex aIndexBefore(rInsPos.nNode); - aIndexBefore--; + --aIndexBefore; pClpDoc->getIDocumentContentOperations().CopyRange( aCpyPam, rInsPos, false ); // Note: aCpyPam is invalid now diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index e912ed28d4a9..bdba213d0899 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1307,8 +1307,8 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode ) pAnchor->GetCntntAnchor()->nNode == *this && pAnchor->GetCntntAnchor()->nContent == aIdx ) { - const_cast<SwIndex&>( - pAnchor->GetCntntAnchor()->nContent)--; + --const_cast<SwIndex&>( + pAnchor->GetCntntAnchor()->nContent); } } pFly->SetAnchor( this ); diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 837754ccbc79..458d1a81ca29 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -805,7 +805,7 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext) aPam.GetPoint()->nNode = m_nNodeIndex; aPam.GetPoint()->nContent.Assign( aPam.GetCntntNode(), nSttCntnt ); aPam.SetMark(); - aPam.GetPoint()->nContent++; + ++aPam.GetPoint()->nContent; pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, USHRT_MAX); } else diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 15fe59b90af4..06d513d45d52 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -208,7 +208,7 @@ SwUndoDelete::SwUndoDelete( rPam.Exchange(); if( !pSttTxtNd && !pEndTxtNd ) - rPam.GetPoint()->nNode--; + --rPam.GetPoint()->nNode; rPam.DeleteMark(); // the SPoint is in the selection if( !pEndTxtNd ) @@ -227,7 +227,7 @@ SwUndoDelete::SwUndoDelete( { SwNode* pNode = aRg.aEnd.GetNode().StartOfSectionNode(); if( pNode->GetIndex() >= nSttNode - nNdDiff ) - aRg.aEnd++; // Deletion of a complete table + ++aRg.aEnd; // Deletion of a complete table } SwNode* pTmpNd; // Step 2: Expand selection if necessary @@ -239,11 +239,11 @@ SwUndoDelete::SwUndoDelete( ( (pTmpNd = rDocNds[ aRg.aEnd.GetIndex()+1 ])->IsEndNode() && pTmpNd->StartOfSectionNode()->IsSectionNode() && pTmpNd->StartOfSectionNode()->GetIndex() >= aRg.aStart.GetIndex() ) ) - aRg.aEnd++; + ++aRg.aEnd; nReplaceDummy = aRg.aEnd.GetIndex() + nNdDiff - nEndNode; if( nReplaceDummy ) { // The selection has been expanded, because - aRg.aEnd++; + ++aRg.aEnd; if( pEndTxtNd ) { // The end text node has to leave the (expanded) selection @@ -255,7 +255,7 @@ SwUndoDelete::SwUndoDelete( ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo()); pDoc->getIDocumentContentOperations().SplitNode( aSplitPos, false ); rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, true ); - aRg.aEnd--; + --aRg.aEnd; } else nReplaceDummy = 0; @@ -268,7 +268,7 @@ SwUndoDelete::SwUndoDelete( while( 1 < aRg.aStart.GetIndex() && ( (pTmpNd = rDocNds[ aRg.aStart.GetIndex()-1 ])->IsSectionNode() && pTmpNd->EndOfSectionIndex() < aRg.aEnd.GetIndex() ) ) - aRg.aStart--; + --aRg.aStart; if( pSttTxtNd ) { nReplaceDummy = nSttNode - nNdDiff - aRg.aStart.GetIndex(); @@ -279,7 +279,7 @@ SwUndoDelete::SwUndoDelete( ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo()); pDoc->getIDocumentContentOperations().SplitNode( aSplitPos, false ); rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, true ); - aRg.aStart--; + --aRg.aStart; } } } @@ -289,13 +289,13 @@ SwUndoDelete::SwUndoDelete( if( !pEndTxtNd ) { if( pSttTxtNd ) - aRg.aStart++; + ++aRg.aStart; else if( !bFullPara && !aRg.aEnd.GetNode().IsCntntNode() ) - aRg.aEnd--; + --aRg.aEnd; } } else if (pSttTxtNd && (pEndTxtNd || pSttTxtNd->GetTxt().getLength())) - aRg.aStart++; + ++aRg.aStart; // Step 3: Moving into UndoArray... nNode = rNds.GetEndOfContent().GetIndex(); @@ -760,7 +760,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) { pInsNd = pDoc->GetNodes().MakeTxtNode( aIdx, (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() ); - aIdx--; + --aIdx; aPos.nNode = aIdx; aPos.nContent.Assign( pInsNd->GetCntntNode(), nSttCntnt ); } @@ -823,7 +823,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) lcl_ReAnchorAtCntntFlyFrames( *pDoc->GetSpzFrmFmts(), aPos, nOldIdx ); } else - aPos.nNode++; + ++aPos.nNode; } } SwNode* pMovedNode = NULL; @@ -843,11 +843,11 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) } SwNodeIndex aMvIdx( pDoc->GetNodes(), nMoveIndex ); SwNodeRange aRg( aPos.nNode, 0 - nDiff, aPos.nNode, 1 - nDiff ); - aPos.nNode--; + --aPos.nNode; if( !bJoinNext ) pMovedNode = &aPos.nNode.GetNode(); pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, true ); - aPos.nNode++; + ++aPos.nNode; } if( bNodeMove ) @@ -1063,7 +1063,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext) { // The Pam was incremented by one at Point (== end) to provide space // for UNDO. This now needs to be reverted! - rPam.End()->nNode--; + --rPam.End()->nNode; if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode ) *rPam.GetMark() = *rPam.GetPoint(); rDoc.getIDocumentContentOperations().DelFullPara( rPam ); diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 1743614960f3..5f781c338dfc 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -323,7 +323,7 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx, SwNodeRange aRg( pStt->nNode, 0, pEnd->nNode, 1 ); rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, false ); aPos.nContent = 0; - aPos.nNode--; + --aPos.nNode; } else { @@ -413,7 +413,7 @@ bool SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam ) // If there is no content onwards, set Point simply to the previous position // (Node and Content, so that Content will be detached!) - rPam.GetPoint()->nNode--; + --rPam.GetPoint()->nNode; rPam.GetPoint()->nContent.Assign( 0, 0 ); return false; } @@ -425,7 +425,7 @@ void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, bool bMvBkwrd ) rPam.Move( fnMoveForward ); else { - rPam.GetPoint()->nNode++; + ++rPam.GetPoint()->nNode; SwCntntNode* pCNd = rPam.GetCntntNode(); if( pCNd ) pCNd->MakeStartIndex( &rPam.GetPoint()->nContent ); @@ -829,8 +829,8 @@ void SwUndoSaveSection::SaveSection( nStartPos = rRange.aStart.GetIndex(); - aPam.GetPoint()->nNode--; - aPam.GetMark()->nNode++; + --aPam.GetPoint()->nNode; + ++aPam.GetMark()->nNode; SwCntntNode* pCNd = aPam.GetCntntNode( false ); if( pCNd ) diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index 9ab2aaa6dd7b..b6b09af1d0b7 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -305,7 +305,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext) aIdx = aPam.Start()->nNode; bool bJoinTxt = aIdx.GetNode().IsTxtNode(); - aIdx--; + --aIdx; rDoc.getIDocumentContentOperations().MoveRange( aPam, aMvPos, SwMoveFlags::DEFAULT ); diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index a851f45fb58e..4ae473cf2126 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -70,7 +70,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, SwRegHistory aRHst( *pTxtNd, pHistory ); pHistory->CopyAttr( pTxtNd->GetpSwpHints(), nSttNode, 0, nTxtNdLen, false ); - rPos.nContent++; + ++rPos.nContent; bInsChar = false; } @@ -145,7 +145,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, if (rPos.nContent.GetIndex() < pDelTxtNd->GetTxt().getLength()) { aDelStr += OUString( pDelTxtNd->GetTxt()[rPos.nContent.GetIndex()] ); - rPos.nContent++; + ++rPos.nContent; } else bInsChar = true; @@ -217,7 +217,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext) rIdx += 2; } pTxtNd->SetIgnoreDontExpand( bOldExpFlg ); - rIdx--; + --rIdx; } if( pHistory ) diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index a84227270a7a..02519240d4be 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -433,7 +433,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext) if (&rTmp != pEnd) { pPam->SetMark(); - pPam->GetPoint()->nNode++; + ++pPam->GetPoint()->nNode; pPam->GetBound( true ).nContent.Assign( 0, 0 ); pPam->GetBound( false ).nContent.Assign( 0, 0 ); pUnDel2 = new SwUndoDelete( *pPam, true ); diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 3e983fffbce1..fc9870025196 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -116,7 +116,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext) if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) { rPam.SetMark(); - rPam.GetMark()->nNode++; + ++rPam.GetMark()->nNode; rPam.GetMark()->nContent.Assign( rPam.GetMark()-> nNode.GetNode().GetCntntNode(), 0 ); pDoc->getIDocumentRedlineAccess().DeleteRedline( rPam, true, USHRT_MAX ); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index d2df9ec085f7..5f62146a7731 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1374,7 +1374,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a SwFmtFlyCnt aFmt( pFlyFmt ); pNd->InsertItem(aFmt, aPam.GetPoint()->nContent.GetIndex(), 0 ); - aPam.GetPoint()->nContent--; // InsertItem moved it + --aPam.GetPoint()->nContent; // InsertItem moved it SwFmtAnchor aNewAnchor( dynamic_cast<const SwFmtAnchor&>( aSet.Get(RES_ANCHOR))); diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 20c86e227c5c..ec318c528b7e 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -362,7 +362,7 @@ SwXFootnote::getAnchor() throw (uno::RuntimeException, std::exception) SwPaM aPam( pTxtFtn->GetTxtNode(), pTxtFtn->GetStart() ); SwPosition aMark( *aPam.Start() ); aPam.SetMark(); - aPam.GetMark()->nContent++; + ++aPam.GetMark()->nContent; const uno::Reference< text::XTextRange > xRet = SwXTextRange::CreateXTextRange(*GetDoc(), *aPam.Start(), aPam.End()); return xRet; diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index cd8d6015a9c8..402a3e652c51 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1806,7 +1806,7 @@ throw (uno::RuntimeException, std::exception) aPam.GetPoint()->nContent = *pTxtMark->End(); } else - aPam.GetPoint()->nContent++; + ++aPam.GetPoint()->nContent; m_pImpl->ReplaceTOXMark(*pType, aMark, aPam); } @@ -2058,7 +2058,7 @@ SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException, std::exception) } else { - aPam.GetPoint()->nContent++; + ++aPam.GetPoint()->nContent; } const uno::Reference< frame::XModel > xModel = m_pImpl->m_pDoc->GetDocShell()->GetBaseModel(); @@ -2200,7 +2200,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } else { - aPam.GetPoint()->nContent++; + ++aPam.GetPoint()->nContent; } m_pImpl->ReplaceTOXMark(*pType, aMark, aPam); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 77fd7e957a6e..143e7a050bb9 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -937,7 +937,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException, std::e SwPosition aStartPos(*pStartNode); const SwEndNode* pEnd = pStartNode->EndOfSectionNode(); SwNodeIndex aEndIdx(*pEnd); - aEndIdx--; + --aEndIdx; //the inserting of nodes should only be done if really necessary //to prevent #97924# (removes paragraph attributes when setting the text //e.g. of a table cell @@ -1766,7 +1766,7 @@ SwXText::convertToTextFrame( // In case the frame has a table only, the cursor points to the end of the first cell of the table. SwPaM aPaM(*pFrameCursor->GetPaM()->GetNode().FindSttNodeByType(SwFlyStartNode)->EndOfSectionNode()); // Now we have the end of the frame -- the node before that will be the paragraph we want to remove. - aPaM.GetPoint()->nNode--; + --aPaM.GetPoint()->nNode; m_pImpl->m_pDoc->getIDocumentContentOperations().DelFullPara(aPaM); } } diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index a28ddbab27bf..9c1c164e9588 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -225,7 +225,7 @@ sal_uLong SwASCIIParser::CallParser() { // then set over the insert range the defined attributes *pInsPam->GetMark() = *pPam->GetPoint(); - pInsPam->GetPoint()->nNode++; + ++pInsPam->GetPoint()->nNode; pInsPam->GetPoint()->nContent.Assign( pInsPam->GetCntntNode(), nSttCntnt ); diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 8a6733495aa6..c8482cebc38d 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -464,7 +464,7 @@ static bool IterateNumrulePiece( const SwNodeIndex& rEnd, && ( rTmpEnd.GetNode().IsTxtNode() ) ) // look for valid end + 1 ++rTmpEnd; - rTmpEnd--; // valid end + --rTmpEnd; // valid end return rTmpStart <= rTmpEnd; // valid ? } diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 8d3864316da7..b7438fa34642 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -180,7 +180,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) if( !IsError( nError )) // set the End position already { - aEndPos--; + --aEndPos; pCNd = aEndPos.GetNode().GetCntntNode(); if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &aEndPos ) )) pCNd = pDoc->GetNodes().GoNext( &aEndPos ); @@ -207,7 +207,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) if( pCrsr ) { *pUndoPam->GetMark() = *pPam->GetPoint(); - pUndoPam->GetPoint()->nNode++; + ++pUndoPam->GetPoint()->nNode; SwNode& rNd = pUndoPam->GetNode(); if( rNd.IsCntntNode() ) pUndoPam->GetPoint()->nContent.Assign( diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 98325c8aecdc..fd7149b8feed 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -804,7 +804,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) else if( &rNd == &pDoc->GetNodes().GetEndOfContent() ) break; - pCurPam->GetPoint()->nNode++; // Bewegen + ++pCurPam->GetPoint()->nNode; // Bewegen sal_uInt32 nPos = pCurPam->GetPoint()->nNode.GetIndex(); if( bShowProgress ) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 78bd262f0b11..2068e54b4bf5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3576,7 +3576,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer { // Undo the text direction mangling done by the btLr handler in writerfilter::dmapper::DomainMapperTableManager::sprm() SwPaM aPam(*pTabBox->GetSttNd(), 0); - aPam.GetPoint()->nNode++; + ++aPam.GetPoint()->nNode; if (aPam.GetPoint()->nNode.GetNode().IsTxtNode()) { const SwTxtNode& rTxtNode = static_cast<const SwTxtNode&>(aPam.GetPoint()->nNode.GetNode()); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 864db7fc8cbc..ca6e5e16bb88 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2658,7 +2658,7 @@ void MSWordExportBase::WriteText() if (pNextNode != NULL) pCurPam->GetPoint()->nNode = SwNodeIndex(*pNextNode); else - pCurPam->GetPoint()->nNode++; + ++pCurPam->GetPoint()->nNode; sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex(); ::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() ); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 66a66484803c..1f28f5146824 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -298,7 +298,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() { sChar += OUString(pTxt->GetTxt()[--nPos]); pPaM->SetMark(); - pPaM->GetMark()->nContent--; + --pPaM->GetMark()->nContent; rDoc.getIDocumentContentOperations().DeleteRange( *pPaM ); pPaM->DeleteMark(); SwFmtFtn aFtn(rDesc.meType == MAN_EDN); @@ -351,8 +351,8 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() pPaM->SetMark(); // Strip out tabs we may have inserted on export #i24762# if (rTxt.getLength() > 1 && rTxt[1] == 0x09) - pPaM->GetMark()->nContent++; - pPaM->GetMark()->nContent++; + ++pPaM->GetMark()->nContent; + ++pPaM->GetMark()->nContent; pReffingStck->Delete(*pPaM); rDoc.getIDocumentContentOperations().DeleteRange( *pPaM ); pPaM->DeleteMark(); diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index d2513ec54ad3..052b8370bbb0 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -395,7 +395,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext ) ::std::vector< const ::sw::mark::IMark* > vNavMarks; for( IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getAllMarksBegin(); ppMark != pMarkAccess->getAllMarksEnd(); - ppMark++) + ++ppMark) { if( IDocumentMarkAccess::GetType(**ppMark) == IDocumentMarkAccess::MarkType::NAVIGATOR_REMINDER ) vNavMarks.push_back(ppMark->get()); |