diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-31 13:19:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-31 13:19:36 +0100 |
commit | 8cc80e117c9ef11d04075ff081a8b9f5ee47af66 (patch) | |
tree | bf38e59bf64c6b808ddc9dcf73896459cbb8c50b /sw | |
parent | 8e3ef76ccf9477289db86f503a48232c524f48ad (diff) |
rename screwy operator++ to advance
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 58 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 30 |
6 files changed, 41 insertions, 55 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index ec8d8b3b0c3d..b81c5f2a14de 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -720,7 +720,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, } } - (*pPlcxMan)++; + pPlcxMan->advance(); nNext = pPlcxMan->Where(); if( (nNext != nStart) && !bONLYnPicLocFc ) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 4cc63233aa07..53cac2e9a6e7 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3331,7 +3331,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine) do { if( bDoPlcxManPlusPLus ) - (*pPlcxMan)++; + pPlcxMan->advance(); nNext = pPlcxMan->Where(); if (mpPostProcessAttrsInfo && diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index cd278c5889d1..93c7a5a25de1 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2086,7 +2086,7 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula, break; } } - (*pPlcxMan)++; + pPlcxMan->advance(); nStart = pPlcxMan->Where(); } sal_uLong nOffset = nPicLocFc; diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 8b6bf6615359..bc47bc8b661b 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1698,7 +1698,7 @@ void WW8FlyPara::ReadFull(sal_uInt8 nOrigSp29, SwWW8ImplReader* pIo) if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ? break; // Nein - (*pPap)++; // Naechste Zeile + pPap->advance(); // Naechste Zeile // In APO ? //sprmPPc diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 3e2e74c33506..12aab49f1578 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -970,9 +970,8 @@ bool WW8PLCFx_PCDAttrs::SeekPos(WW8_CP ) return true; } -WW8PLCFx& WW8PLCFx_PCDAttrs::operator ++( int ) +void WW8PLCFx_PCDAttrs::advance() { - return *this; } WW8_CP WW8PLCFx_PCDAttrs::Where() @@ -1191,14 +1190,11 @@ long WW8PLCFx_PCD::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) return pPcdI->GetIdx(); } -WW8PLCFx& WW8PLCFx_PCD::operator ++( int ) +void WW8PLCFx_PCD::advance() { + OSL_ENSURE(pPcdI , "pPcdI fehlt"); if (pPcdI) - (*pPcdI)++; - else { - OSL_ENSURE( !this, "pPcdI fehlt"); - } - return *this; + pPcdI->advance(); } WW8_FC WW8PLCFx_PCD::AktPieceStartCp2Fc( WW8_CP nCp ) @@ -1388,7 +1384,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const sal_uLong nOldPos = pPieceIter->GetIdx(); for (pPieceIter->SetIdx(0); - pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++) + pPieceIter->GetIdx() < pPieceIter->GetIMax(); pPieceIter->advance()) { WW8_CP nCpStart, nCpEnd; void* pData; @@ -3073,19 +3069,17 @@ sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int return pPos; } -WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int ) +void WW8PLCFx_Fc_FKP::advance() { if( !pFkp ) { if( !NewFkp() ) - return *this; + return; } - (*pFkp)++; + pFkp->advance(); if( pFkp->Where() == WW8_FC_MAX ) NewFkp(); - - return *this; } sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const @@ -3368,10 +3362,10 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p) FKP fc */ - (*pPieceIter)++; + pPieceIter->advance(); for (;pPieceIter->GetIdx() < pPieceIter->GetIMax(); - (*pPieceIter)++) + pPieceIter->advance()) { if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) ) { @@ -3434,17 +3428,17 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p) } } -WW8PLCFx& WW8PLCFx_Cp_FKP::operator ++( int ) +void WW8PLCFx_Cp_FKP::advance() { - WW8PLCFx_Fc_FKP::operator ++( 0 ); + WW8PLCFx_Fc_FKP::advance(); // !pPcd: Notbremse if ( !bComplex || !pPcd ) - return *this; + return; if( GetPCDIdx() >= GetPCDIMax() ) // End of PLCF { nAttrStart = nAttrEnd = WW8_CP_MAX; - return *this; + return; } sal_Int32 nFkpLen; // Fkp-Eintrag @@ -3453,7 +3447,6 @@ WW8PLCFx& WW8PLCFx_Cp_FKP::operator ++( int ) pPcd->AktPieceFc2Cp( nAttrStart, nAttrEnd, &rSBase ); bLineEnd = (ePLCF == PAP); - return *this; } //----------------------------------------- @@ -3548,11 +3541,10 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p) } } -WW8PLCFx& WW8PLCFx_SEPX::operator ++( int ) +void WW8PLCFx_SEPX::advance() { if (pPLCF) pPLCF->advance(); - return *this; } const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const @@ -3721,14 +3713,13 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p) p->nSprmsLen -= p->nCp2OrIdx; } -WW8PLCFx& WW8PLCFx_SubDoc::operator ++( int ) +void WW8PLCFx_SubDoc::advance() { if (pRef && pTxt) { pRef->advance(); pTxt->advance(); } - return *this; } //----------------------------------------- @@ -3874,10 +3865,9 @@ void WW8PLCFx_FLD::GetSprms(WW8PLCFxDesc* p) p->nCp2OrIdx = pPLCF->GetIdx(); } -WW8PLCFx& WW8PLCFx_FLD::operator ++( int ) +void WW8PLCFx_FLD::advance() { pPLCF->advance(); - return *this; } bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF) @@ -4134,7 +4124,7 @@ long WW8PLCFx_Book::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) // vor- und zurueckspringen, wobei ein weiterer Index oder ein Bitfeld // oder etwas aehnliches zum Merken der bereits abgearbeiteten Bookmarks // noetig wird. -WW8PLCFx& WW8PLCFx_Book::operator ++( int ) +void WW8PLCFx_Book::advance() { if( pBook[0] && pBook[1] && nIMax ) { @@ -4149,7 +4139,6 @@ WW8PLCFx& WW8PLCFx_Book::operator ++( int ) else nIsEnd = ( nIsEnd ) ? 0 : 1; } - return *this; } long WW8PLCFx_Book::GetLen() const @@ -4881,8 +4870,8 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart) } else { - (*p->pPLCFx)++; // next Group of Sprms - p->pMemPos = 0; // !!! + p->pPLCFx->advance(); // next Group of Sprms + p->pMemPos = 0; // !!! p->nSprmsLen = 0; GetNewSprms( *p ); } @@ -4919,7 +4908,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart) reapply them to a new chp or pap range. */ if (pTemp->GetClipStart() == -1) - (*p->pPLCFx)++; + p->pPLCFx->advance(); p->pMemPos = 0; p->nSprmsLen = 0; GetNewSprms( aD[nIdx+1] ); @@ -4940,14 +4929,14 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart) } else { // NoSprm ohne Ende - (*p->pPLCFx)++; + p->pPLCFx->advance(); p->pMemPos = 0; // MemPos ungueltig p->nSprmsLen = 0; GetNewNoSprms( *p ); } } -WW8PLCFMan& WW8PLCFMan::operator ++(int) +void WW8PLCFMan::advance() { bool bStart; sal_uInt16 nIdx = WhereIdx(&bStart); @@ -4962,7 +4951,6 @@ WW8PLCFMan& WW8PLCFMan::operator ++(int) else // NoSprm AdvNoSprm( nIdx, bStart ); } - return *this; } // Rueckgabe true fuer Anfang eines Attributes oder Fehler, diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index a24f23a7b682..0a67f0592a47 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -354,11 +354,10 @@ public: bool SeekPos(long nPos); sal_Int32 Where() const; bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const; - WW8PLCFpcd_Iter& operator ++( int ) + void advance() { if( nIdx < rPLCF.nIMax ) - nIdx++; - return *this; + ++nIdx; } }; @@ -395,7 +394,7 @@ public: virtual WW8_FC Where() = 0; virtual void GetSprms( WW8PLCFxDesc* p ); virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen ); - virtual WW8PLCFx& operator ++( int ) = 0; + virtual void advance() = 0; virtual sal_uInt16 GetIstd() const { return 0xffff; } virtual void Save( WW8PLCFxSave1& rSave ) const; virtual void Restore( const WW8PLCFxSave1& rSave ); @@ -427,7 +426,7 @@ public: virtual bool SeekPos(WW8_CP nCpPos); virtual WW8_FC Where(); virtual void GetSprms( WW8PLCFxDesc* p ); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); WW8PLCFpcd_Iter* GetIter() const { return pPcdI; } }; @@ -452,7 +451,7 @@ public: virtual bool SeekPos(WW8_CP nCpPos); virtual WW8_FC Where(); virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen ); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); WW8_CP AktPieceStartFc2Cp( WW8_FC nStartPos ); WW8_FC AktPieceStartCp2Fc( WW8_CP nCp ); void AktPieceFc2Cp(WW8_CP& rStartPos, WW8_CP& rEndPos, @@ -524,11 +523,10 @@ public: { return (mnIdx < mnIMax) ? maEntries[mnIdx].mnFC : WW8_FC_MAX; } - WW8Fkp& operator ++( int ) + void advance() { if (mnIdx < mnIMax) - mnIdx++; - return *this; + ++mnIdx; } sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const; sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; } @@ -586,7 +584,7 @@ public: virtual bool SeekPos(WW8_FC nFcPos); virtual WW8_FC Where(); sal_uInt8* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); virtual sal_uInt16 GetIstd() const; void GetPCDSprms( WW8PLCFxDesc& rDesc ); const sal_uInt8* HasSprm( sal_uInt16 nId ); @@ -621,7 +619,7 @@ public: virtual bool SeekPos(WW8_CP nCpPos); virtual WW8_CP Where(); virtual void GetSprms( WW8PLCFxDesc* p ); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); virtual void Save( WW8PLCFxSave1& rSave ) const; virtual void Restore( const WW8PLCFxSave1& rSave ); }; @@ -650,7 +648,7 @@ public: virtual bool SeekPos(WW8_CP nCpPos); virtual WW8_FC Where(); virtual void GetSprms( WW8PLCFxDesc* p ); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); const sal_uInt8* HasSprm( sal_uInt16 nId ) const; const sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const; const sal_uInt8* HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms, @@ -687,7 +685,7 @@ public: //liefert Angabe, wo Kopf und Fusszeilen-Text zu finden ist bool Get(long& rStart, void*& rpValue) const; virtual void GetSprms(WW8PLCFxDesc* p); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); long Count() const { return ( pRef ) ? pRef->GetIMax() : 0; } }; @@ -708,7 +706,7 @@ public: virtual bool SeekPos(WW8_CP nCpPos); virtual WW8_FC Where(); virtual void GetSprms(WW8PLCFxDesc* p); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); bool StartPosIsFieldStart(); bool EndPosIsFieldEnd(); bool GetPara(long nIdx, WW8FieldDesc& rF); @@ -741,7 +739,7 @@ public: virtual bool SeekPos(WW8_CP nCpPos); virtual WW8_FC Where(); virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ); - virtual WW8PLCFx& operator ++( int ); + virtual void advance(); const String* GetName() const; WW8_CP GetStartPos() const { return ( nIsEnd ) ? WW8_CP_MAX : pBook[0]->Where(); } @@ -873,7 +871,7 @@ public: WW8_CP Where() const; bool Get(WW8PLCFManResult* pResult) const; - WW8PLCFMan& operator ++( int ); + void advance(); sal_uInt16 GetColl() const; // index of actual Style WW8PLCFx_FLD* GetFld() const; WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; } |