diff options
Diffstat (limited to 'sw/source/core/undo')
-rw-r--r-- | sw/source/core/undo/SwUndoField.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/undo/SwUndoFmt.cxx | 90 | ||||
-rw-r--r-- | sw/source/core/undo/SwUndoPageDesc.cxx | 56 | ||||
-rw-r--r-- | sw/source/core/undo/docundo.cxx | 112 | ||||
-rw-r--r-- | sw/source/core/undo/rolbck.cxx | 126 | ||||
-rw-r--r-- | sw/source/core/undo/unattr.cxx | 60 | ||||
-rw-r--r-- | sw/source/core/undo/undel.cxx | 130 | ||||
-rw-r--r-- | sw/source/core/undo/undobj.cxx | 136 | ||||
-rw-r--r-- | sw/source/core/undo/undobj1.cxx | 38 | ||||
-rw-r--r-- | sw/source/core/undo/undraw.cxx | 56 | ||||
-rw-r--r-- | sw/source/core/undo/unfmco.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/unins.cxx | 84 | ||||
-rw-r--r-- | sw/source/core/undo/unmove.cxx | 26 | ||||
-rw-r--r-- | sw/source/core/undo/unnum.cxx | 48 | ||||
-rw-r--r-- | sw/source/core/undo/unovwr.cxx | 60 | ||||
-rw-r--r-- | sw/source/core/undo/unredln.cxx | 62 | ||||
-rw-r--r-- | sw/source/core/undo/unsect.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/undo/unsort.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/undo/unspnd.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 358 | ||||
-rw-r--r-- | sw/source/core/undo/untblk.cxx | 34 |
21 files changed, 772 insertions, 772 deletions
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index 8a3c6c507c93..52ee35815997 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -65,7 +65,7 @@ SwPosition SwUndoField::GetPosition() SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & rOldField, const SwField & rNewField, - SwMsgPoolItem * _pHnt, BOOL _bUpdate, SwUndoId _nId) + SwMsgPoolItem * _pHnt, sal_Bool _bUpdate, SwUndoId _nId) : SwUndoField(rPos,_nId) , pOldField(rOldField.CopyField()) , pNewField(rNewField.CopyField()) @@ -90,9 +90,9 @@ void SwUndoFieldFromDoc::Undo( SwUndoIter& ) if (pField) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); pDoc->UpdateFld(pTxtFld, *pOldField, pHnt, bUpdate); pDoc->DoUndo(bUndo); } @@ -105,9 +105,9 @@ void SwUndoFieldFromDoc::Redo( SwUndoIter& ) if (pField) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); pDoc->UpdateFld(pTxtFld, *pNewField, pHnt, bUpdate); SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFld(); @@ -124,7 +124,7 @@ void SwUndoFieldFromDoc::Repeat(SwUndoIter & rIt) SwUndoFieldFromAPI::SwUndoFieldFromAPI(const SwPosition & rPos, const Any & rOldVal, const Any & rNewVal, - USHORT _nWhich) + sal_uInt16 _nWhich) : SwUndoField(rPos), aOldVal(rOldVal), aNewVal(rNewVal), nWhich(_nWhich) { } diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index f3b2fe4d1a25..dffdf3cc8b02 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -44,7 +44,7 @@ SwUndoFmtCreate::SwUndoFmtCreate (SwUndoId nUndoId, SwFmt * _pNew, SwFmt * _pDerivedFrom, SwDoc * _pDoc) : SwUndo(nUndoId), pNew(_pNew), - pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(FALSE) + pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(sal_False) { if (_pDerivedFrom) sDerivedFrom = _pDerivedFrom->GetName(); @@ -70,9 +70,9 @@ void SwUndoFmtCreate::Undo(SwUndoIter &) nId = pNew->GetPoolFmtId() & COLL_GET_RANGE_BITS; bAuto = pNew->IsAuto(); - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); Delete(); pDoc->DoUndo(bDoesUndo); } @@ -81,9 +81,9 @@ void SwUndoFmtCreate::Undo(SwUndoIter &) void SwUndoFmtCreate::Redo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); SwFmt * pDerivedFrom = Find(sDerivedFrom); SwFmt * pFmt = Create(pDerivedFrom); @@ -132,9 +132,9 @@ SwUndoFmtDelete::~SwUndoFmtDelete() void SwUndoFmtDelete::Undo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); SwFmt * pDerivedFrom = Find(sDerivedFrom); @@ -159,9 +159,9 @@ void SwUndoFmtDelete::Redo(SwUndoIter &) if (pOld) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); Delete(pOld); pDoc->DoUndo(bDoesUndo); } @@ -196,10 +196,10 @@ void SwUndoRenameFmt::Undo(SwUndoIter &) if (pFmt) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->RenameFmt(*pFmt, sOldName, TRUE); + pDoc->DoUndo(sal_False); + pDoc->RenameFmt(*pFmt, sOldName, sal_True); pDoc->DoUndo(bDoesUndo); } } @@ -210,10 +210,10 @@ void SwUndoRenameFmt::Redo(SwUndoIter &) if (pFmt) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->RenameFmt(*pFmt, sNewName, TRUE); + pDoc->DoUndo(sal_False); + pDoc->RenameFmt(*pFmt, sNewName, sal_True); pDoc->DoUndo(bDoesUndo); } } @@ -237,12 +237,12 @@ SwUndoTxtFmtCollCreate::SwUndoTxtFmtCollCreate SwFmt * SwUndoTxtFmtCollCreate::Create(SwFmt * pDerivedFrom) { - return pDoc->MakeTxtFmtColl(sNewName, (SwTxtFmtColl *)pDerivedFrom, TRUE); + return pDoc->MakeTxtFmtColl(sNewName, (SwTxtFmtColl *)pDerivedFrom, sal_True); } void SwUndoTxtFmtCollCreate::Delete() { - pDoc->DelTxtFmtColl((SwTxtFmtColl *) pNew, TRUE); + pDoc->DelTxtFmtColl((SwTxtFmtColl *) pNew, sal_True); } SwFmt * SwUndoTxtFmtCollCreate::Find(const String & rName) const @@ -258,12 +258,12 @@ SwUndoTxtFmtCollDelete::SwUndoTxtFmtCollDelete(SwTxtFmtColl * _pOld, SwFmt * SwUndoTxtFmtCollDelete::Create(SwFmt * pDerivedFrom) { - return pDoc->MakeTxtFmtColl(sOldName, (SwTxtFmtColl *) pDerivedFrom, TRUE); + return pDoc->MakeTxtFmtColl(sOldName, (SwTxtFmtColl *) pDerivedFrom, sal_True); } void SwUndoTxtFmtCollDelete::Delete(SwFmt * pOld) { - pDoc->DelTxtFmtColl((SwTxtFmtColl *) pOld, TRUE); + pDoc->DelTxtFmtColl((SwTxtFmtColl *) pOld, sal_True); } SwFmt * SwUndoTxtFmtCollDelete::Find(const String & rName) const @@ -292,12 +292,12 @@ SwUndoCharFmtCreate::SwUndoCharFmtCreate(SwCharFmt * pNewFmt, SwFmt * SwUndoCharFmtCreate::Create(SwFmt * pDerivedFrom) { - return pDoc->MakeCharFmt(sNewName, (SwCharFmt *) pDerivedFrom, TRUE); + return pDoc->MakeCharFmt(sNewName, (SwCharFmt *) pDerivedFrom, sal_True); } void SwUndoCharFmtCreate::Delete() { - pDoc->DelCharFmt((SwCharFmt *) pNew, TRUE); + pDoc->DelCharFmt((SwCharFmt *) pNew, sal_True); } SwFmt * SwUndoCharFmtCreate::Find(const String & rName) const @@ -312,12 +312,12 @@ SwUndoCharFmtDelete::SwUndoCharFmtDelete(SwCharFmt * pOld, SwDoc * pDocument) SwFmt * SwUndoCharFmtDelete::Create(SwFmt * pDerivedFrom) { - return pDoc->MakeCharFmt(sOldName, (SwCharFmt *) pDerivedFrom, TRUE); + return pDoc->MakeCharFmt(sOldName, (SwCharFmt *) pDerivedFrom, sal_True); } void SwUndoCharFmtDelete::Delete(SwFmt * pFmt) { - pDoc->DelCharFmt((SwCharFmt *) pFmt, TRUE); + pDoc->DelCharFmt((SwCharFmt *) pFmt, sal_True); } SwFmt * SwUndoCharFmtDelete::Find(const String & rName) const @@ -347,12 +347,12 @@ SwUndoFrmFmtCreate::SwUndoFrmFmtCreate(SwFrmFmt * pNewFmt, SwFmt * SwUndoFrmFmtCreate::Create(SwFmt * pDerivedFrom) { - return pDoc->MakeFrmFmt(sNewName, (SwFrmFmt *) pDerivedFrom, TRUE, bAuto); + return pDoc->MakeFrmFmt(sNewName, (SwFrmFmt *) pDerivedFrom, sal_True, bAuto); } void SwUndoFrmFmtCreate::Delete() { - pDoc->DelFrmFmt((SwFrmFmt *) pNew, TRUE); + pDoc->DelFrmFmt((SwFrmFmt *) pNew, sal_True); } SwFmt * SwUndoFrmFmtCreate::Find(const String & rName) const @@ -367,12 +367,12 @@ SwUndoFrmFmtDelete::SwUndoFrmFmtDelete(SwFrmFmt * pOld, SwDoc * pDocument) SwFmt * SwUndoFrmFmtDelete::Create(SwFmt * pDerivedFrom) { - return pDoc->MakeFrmFmt(sOldName, (SwFrmFmt *) pDerivedFrom, TRUE); + return pDoc->MakeFrmFmt(sOldName, (SwFrmFmt *) pDerivedFrom, sal_True); } void SwUndoFrmFmtDelete::Delete(SwFmt * pFmt) { - pDoc->DelFrmFmt((SwFrmFmt *) pFmt, TRUE); + pDoc->DelFrmFmt((SwFrmFmt *) pFmt, sal_True); } SwFmt * SwUndoFrmFmtDelete::Find(const String & rName) const @@ -401,9 +401,9 @@ SwUndoNumruleCreate::SwUndoNumruleCreate(const SwNumRule * _pNew, void SwUndoNumruleCreate::Undo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); if (! bInitialized) { @@ -411,16 +411,16 @@ void SwUndoNumruleCreate::Undo(SwUndoIter &) bInitialized = true; } - pDoc->DelNumRule(aNew.GetName(), TRUE); + pDoc->DelNumRule(aNew.GetName(), sal_True); pDoc->DoUndo(bDoesUndo); } void SwUndoNumruleCreate::Redo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->MakeNumRule(aNew.GetName(), &aNew, TRUE); + pDoc->DoUndo(sal_False); + pDoc->MakeNumRule(aNew.GetName(), &aNew, sal_True); pDoc->DoUndo(bDoesUndo); } @@ -447,19 +447,19 @@ SwUndoNumruleDelete::SwUndoNumruleDelete(const SwNumRule & rRule, void SwUndoNumruleDelete::Undo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->MakeNumRule(aOld.GetName(), &aOld, TRUE); + pDoc->DoUndo(sal_False); + pDoc->MakeNumRule(aOld.GetName(), &aOld, sal_True); pDoc->DoUndo(bDoesUndo); } void SwUndoNumruleDelete::Redo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->DelNumRule(aOld.GetName(), TRUE); + pDoc->DoUndo(sal_False); + pDoc->DelNumRule(aOld.GetName(), sal_True); pDoc->DoUndo(bDoesUndo); } @@ -482,19 +482,19 @@ SwUndoNumruleRename::SwUndoNumruleRename(const String & _aOldName, void SwUndoNumruleRename::Undo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->RenameNumRule(aNewName, aOldName, TRUE); + pDoc->DoUndo(sal_False); + pDoc->RenameNumRule(aNewName, aOldName, sal_True); pDoc->DoUndo(bDoesUndo); } void SwUndoNumruleRename::Redo(SwUndoIter &) { - BOOL bDoesUndo = pDoc->DoesUndo(); + sal_Bool bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->RenameNumRule(aOldName, aNewName, TRUE); + pDoc->DoUndo(sal_False); + pDoc->RenameNumRule(aOldName, aNewName, sal_True); pDoc->DoUndo(bDoesUndo); } diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index 9a395375eabe..0360b246f342 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -48,10 +48,10 @@ // Pure debug help function to have a quick look at the header/footer attributes. void DebugHeaderFooterContent( const SwPageDesc& rPageDesc ) { - ULONG nHeaderMaster = ULONG_MAX; - ULONG nHeaderLeft = ULONG_MAX; - ULONG nFooterMaster = ULONG_MAX; - ULONG nFooterLeft = ULONG_MAX; + sal_uLong nHeaderMaster = ULONG_MAX; + sal_uLong nHeaderLeft = ULONG_MAX; + sal_uLong nFooterMaster = ULONG_MAX; + sal_uLong nFooterLeft = ULONG_MAX; int nHeaderCount = 0; int nLeftHeaderCount = 0; int nFooterCount = 0; @@ -235,7 +235,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes // Let the destination page descrition point to the source node position, // from now on this descriptor is responsible for the content nodes! const SfxPoolItem* pItem; - rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ); + rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ); SfxPoolItem *pNewItem = pItem->Clone(); SwFrmFmt* pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt(); #ifdef DEBUG @@ -249,7 +249,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes // Let the source page description point to zero node position, // it loses the responsible and can be destroyed without removing the content nodes. - rSource.GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ); + rSource.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ); pNewItem = pItem->Clone(); pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt(); pNewFmt->SetFmtAttr( SwFmtCntnt() ); @@ -259,7 +259,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes { // Same procedure for unshared header.. const SwFmtHeader& rSourceLeftHead = rSource.GetLeft().GetHeader(); - rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ); + rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ); pNewItem = pItem->Clone(); pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt(); #ifdef DEBUG @@ -270,7 +270,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes #endif pNewFmt->SetFmtAttr( rSourceLeftHead.GetHeaderFmt()->GetCntnt() ); delete pNewItem; - rSource.GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ); + rSource.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ); pNewItem = pItem->Clone(); pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt(); pNewFmt->SetFmtAttr( SwFmtCntnt() ); @@ -283,7 +283,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes if( rDestFoot.IsActive() ) { const SfxPoolItem* pItem; - rDest.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ); + rDest.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ); SfxPoolItem *pNewItem = pItem->Clone(); SwFrmFmt *pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt(); pNewFmt->SetFmtAttr( rSourceFoot.GetFooterFmt()->GetCntnt() ); @@ -295,7 +295,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes const SwFmtCntnt& rFooterDestCntnt = rDestFoot.GetFooterFmt()->GetCntnt(); (void)rFooterDestCntnt; #endif - rSource.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ); + rSource.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ); pNewItem = pItem->Clone(); pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt(); pNewFmt->SetFmtAttr( SwFmtCntnt() ); @@ -311,12 +311,12 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes (void)rFooterSourceCntnt2; (void)rFooterDestCntnt2; #endif - rDest.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ); + rDest.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ); pNewItem = pItem->Clone(); pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt(); pNewFmt->SetFmtAttr( rSourceLeftFoot.GetFooterFmt()->GetCntnt() ); delete pNewItem; - rSource.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ); + rSource.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ); pNewItem = pItem->Clone(); pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt(); pNewFmt->SetFmtAttr( SwFmtCntnt() ); @@ -327,9 +327,9 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes void SwUndoPageDesc::Undo(SwUndoIter &) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); // Move (header/footer)content node responsibility from new page descriptor to old one again. if( bExchange ) @@ -340,9 +340,9 @@ void SwUndoPageDesc::Undo(SwUndoIter &) void SwUndoPageDesc::Redo(SwUndoIter &) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); // Move (header/footer)content node responsibility from old page descriptor to new one again. if( bExchange ) @@ -381,9 +381,9 @@ SwUndoPageDescCreate::~SwUndoPageDescCreate() void SwUndoPageDescCreate::Undo(SwUndoIter &) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); // -> #116530# if (pDesc) @@ -393,19 +393,19 @@ void SwUndoPageDescCreate::Undo(SwUndoIter &) } // <- #116530# - pDoc->DelPageDesc(aNew.GetName(), TRUE); + pDoc->DelPageDesc(aNew.GetName(), sal_True); pDoc->DoUndo(bUndo); } void SwUndoPageDescCreate::Redo(SwUndoIter &) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); SwPageDesc aPageDesc = aNew; - pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, FALSE, TRUE); // #116530# + pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, sal_False, sal_True); // #116530# pDoc->DoUndo(bUndo); } @@ -441,21 +441,21 @@ SwUndoPageDescDelete::~SwUndoPageDescDelete() void SwUndoPageDescDelete::Undo(SwUndoIter &) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); + pDoc->DoUndo(sal_False); SwPageDesc aPageDesc = aOld; - pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, FALSE, TRUE); // #116530# + pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, sal_False, sal_True); // #116530# pDoc->DoUndo(bUndo); } void SwUndoPageDescDelete::Redo(SwUndoIter &) { - BOOL bUndo = pDoc->DoesUndo(); + sal_Bool bUndo = pDoc->DoesUndo(); - pDoc->DoUndo(FALSE); - pDoc->DelPageDesc(aOld.GetName(), TRUE); // #116530# + pDoc->DoUndo(sal_False); + pDoc->DelPageDesc(aOld.GetName(), sal_True); // #116530# pDoc->DoUndo(bUndo); } diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 85adbd1c7138..71b4f0926e7c 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star; -USHORT SwDoc::nUndoActions = UNDO_ACTION_COUNT; // anzahl von Undo-Action +sal_uInt16 SwDoc::nUndoActions = UNDO_ACTION_COUNT; // anzahl von Undo-Action // the undo array should never grow beyond this limit: #define UNDO_ACTION_LIMIT (USHRT_MAX - 1000) @@ -60,11 +60,11 @@ SV_IMPL_PTRARR( SwUndoIds, SwUndoIdAndNamePtr ) class UndoArrStatus : public WorkWindow { - USHORT nUndo, nUndoNds; + sal_uInt16 nUndo, nUndoNds; virtual void Paint( const Rectangle& ); public: UndoArrStatus(); - void Set( USHORT, USHORT ); + void Set( sal_uInt16, sal_uInt16 ); }; static UndoArrStatus* pUndoMsgWin = 0; @@ -78,7 +78,7 @@ UndoArrStatus::UndoArrStatus() } -void UndoArrStatus::Set( USHORT n1, USHORT n2 ) +void UndoArrStatus::Set( sal_uInt16 n1, sal_uInt16 n2 ) { nUndo = n1; nUndoNds = n2; Invalidate(); @@ -197,14 +197,14 @@ void SwDoc::AppendUndo( SwUndo* pUndo ) // - AttrHistory Grenze: USHRT_MAX - 1000 // (defined in UNDO_ACTION_LIMIT at the top of this file) - USHORT nEnde = UNDO_ACTION_LIMIT; + sal_uInt16 nEnde = UNDO_ACTION_LIMIT; // nur zum Testen der neuen DOC-Member #ifdef DBG_UTIL { SwUndoId nId = UNDO_EMPTY; - USHORT nUndosCnt = 0, nSttEndCnt = 0; - for( USHORT nCnt = 0; nCnt < nUndoPos; ++nCnt ) + sal_uInt16 nUndosCnt = 0, nSttEndCnt = 0; + for( sal_uInt16 nCnt = 0; nCnt < nUndoPos; ++nCnt ) { if( UNDO_START == ( nId = (*pUndos)[ nCnt ]->GetId()) ) ++nSttEndCnt; @@ -225,7 +225,7 @@ void SwDoc::AppendUndo( SwUndo* pUndo ) DelUndoObj( nUndoCnt - SwDoc::nUndoActions ); else { - USHORT nUndosCnt = nUndoCnt; + sal_uInt16 nUndosCnt = nUndoCnt; // immer 1/10 loeschen bis der "Ausloeser" behoben ist while( aUndoNodes.Count() && nEnde < aUndoNodes.Count() ) DelUndoObj( nUndosCnt / 10 ); @@ -242,7 +242,7 @@ void SwDoc::ClearRedo() { // setze UndoCnt auf den neuen Wert SwUndo* pUndo; - for( USHORT nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt ) + for( sal_uInt16 nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt ) // Klammerung ueberspringen if( UNDO_END == (pUndo = (*pUndos)[ --nCnt ])->GetId() ) nCnt = nCnt - ((SwUndoEnd*)pUndo)->GetSttOffset(); @@ -259,11 +259,11 @@ void SwDoc::DelAllUndoObj() { ClearRedo(); - DoUndo( FALSE ); + DoUndo( sal_False ); // Offene Undo-Klammerungen erhalten !! SwUndo* pUndo; - USHORT nSize = pUndos->Count(); + sal_uInt16 nSize = pUndos->Count(); while( nSize ) if( UNDO_START != ( pUndo = (*pUndos)[ --nSize ] )->GetId() || ((SwUndoStart*)pUndo)->GetEndOffset() ) @@ -279,26 +279,26 @@ void SwDoc::DelAllUndoObj() nUndoCnt = nUndoSttEnd = nUndoPos = 0; */ nUndoSavePos = USHRT_MAX; - DoUndo( TRUE ); + DoUndo( sal_True ); } // loescht alle UndoObjecte vom Anfang bis zum angegebenen Ende -BOOL SwDoc::DelUndoObj( USHORT nEnde ) +sal_Bool SwDoc::DelUndoObj( sal_uInt16 nEnde ) { if( !nEnde ) // sollte mal 0 uebergeben werden, { if( !pUndos->Count() ) - return FALSE; + return sal_False; ++nEnde; // dann korrigiere es auf 1 } - DoUndo( FALSE ); + DoUndo( sal_False ); // pruefe erstmal, wo das Ende steht SwUndoId nId = UNDO_EMPTY; - USHORT nSttEndCnt = 0; - USHORT nCnt; + sal_uInt16 nSttEndCnt = 0; + sal_uInt16 nCnt; for( nCnt = 0; nEnde && nCnt < nUndoPos; ++nCnt ) { @@ -324,8 +324,8 @@ BOOL SwDoc::DelUndoObj( USHORT nEnde ) pUndos->DeleteAndDestroy( --nSttEndCnt, 1 ); nUndoPos = pUndos->Count(); - DoUndo( TRUE ); - return TRUE; + DoUndo( sal_True ); + return sal_True; } /**************** UNDO ******************/ @@ -345,7 +345,7 @@ SwUndoNoModifiedPosition SwDoc::getUndoNoModifiedPosition() const bool SwDoc::HasUndoId(SwUndoId eId) const { - USHORT nSize = nUndoPos; + sal_uInt16 nSize = nUndoPos; SwUndo * pUndo; while( nSize-- ) if( ( pUndo = (*pUndos)[nSize])->GetId() == eId || @@ -354,10 +354,10 @@ bool SwDoc::HasUndoId(SwUndoId eId) const || ( UNDO_END == pUndo->GetId() && ((SwUndoEnd*)pUndo)->GetUserId() == eId ) ) { - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } @@ -365,13 +365,13 @@ bool SwDoc::Undo( SwUndoIter& rUndoIter ) { if ( (rUndoIter.GetId()!=0) && (!HasUndoId(rUndoIter.GetId())) ) { - rUndoIter.bWeiter = FALSE; - return FALSE; + rUndoIter.bWeiter = sal_False; + return sal_False; } if( !nUndoPos ) { - rUndoIter.bWeiter = FALSE; - return FALSE; + rUndoIter.bWeiter = sal_False; + return sal_False; } SwUndo *pUndo = (*pUndos)[ --nUndoPos ]; @@ -408,7 +408,7 @@ bool SwDoc::Undo( SwUndoIter& rUndoIter ) if( UNDO_REPLACE == nAktId && ((SwUndoReplace*)pUndo)->nAktPos ) { ++nUndoPos; - return TRUE; + return sal_True; } // Objekt aus History entfernen und zerstoeren @@ -427,7 +427,7 @@ bool SwDoc::Undo( SwUndoIter& rUndoIter ) if( nUndoSavePos == nUndoPos ) ResetModified(); - return TRUE; + return sal_True; } @@ -456,7 +456,7 @@ SwUndoId SwDoc::StartUndo( SwUndoId eUndoId, const SwRewriter * pRewriter ) SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter) { - USHORT nSize = nUndoPos; + sal_uInt16 nSize = nUndoPos; if( !mbUndo || !nSize-- ) return UNDO_EMPTY; @@ -477,7 +477,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter) if( nUndoPos != pUndos->Count() ) { // setze UndoCnt auf den neuen Wert - for( USHORT nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt ) + for( sal_uInt16 nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt ) // Klammerung ueberspringen if( UNDO_END == (pUndo = (*pUndos)[ --nCnt ])->GetId() ) nCnt = nCnt - ((SwUndoEnd*)pUndo)->GetSttOffset(); @@ -505,7 +505,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter) nUndoCnt = 0; // setze UndoCnt auf den neuen Wert SwUndo* pTmpUndo; - for( USHORT nCnt = 0; nCnt < pUndos->Count(); ++nCnt, ++nUndoCnt ) + for( sal_uInt16 nCnt = 0; nCnt < pUndos->Count(); ++nCnt, ++nUndoCnt ) // Klammerung ueberspringen if( UNDO_START == (pTmpUndo = (*pUndos)[ nCnt ])->GetId() ) nCnt = nCnt + ((SwUndoStart*)pTmpUndo)->GetEndOffset(); @@ -530,8 +530,8 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter) DelUndoObj( nUndoCnt - SwDoc::nUndoActions ); else { - USHORT nEnde = USHRT_MAX - 1000; - USHORT nUndosCnt = nUndoCnt; + sal_uInt16 nEnde = USHRT_MAX - 1000; + sal_uInt16 nUndosCnt = nUndoCnt; // immer 1/10 loeschen bis der "Ausloeser" behoben ist while( aUndoNodes.Count() && nEnde < aUndoNodes.Count() ) DelUndoObj( nUndosCnt / 10 ); @@ -550,7 +550,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter) // nur zum Testen der Start/End-Verpointerung vom Start/End Undo #ifdef DBG_UTIL { - USHORT nEndCnt = 1, nCnt = pUndos->Count(); + sal_uInt16 nEndCnt = 1, nCnt = pUndos->Count(); SwUndoId nTmpId = UNDO_EMPTY; while( nCnt ) { @@ -684,7 +684,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos ) do { nTmpPos--; - pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ]; + pTmpUndo = rUndos[ static_cast<sal_uInt16>(nTmpPos) ]; if (pTmpUndo->GetEffectiveId() > UNDO_END) nSubstitute = nTmpPos; @@ -693,7 +693,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos ) if (nSubstitute >= 0) { - SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ]; + SwUndo * pSubUndo = rUndos[ static_cast<sal_uInt16>(nSubstitute) ]; nId = pSubUndo->GetEffectiveId(); sStr = pSubUndo->GetComment(); } @@ -728,7 +728,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos ) do { nTmpPos--; - pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ]; + pTmpUndo = rUndos[ static_cast<sal_uInt16>(nTmpPos) ]; if (pTmpUndo->GetEffectiveId() > UNDO_END) nSubstitute = nTmpPos; @@ -737,7 +737,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos ) if (nSubstitute >= 0) { - SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ]; + SwUndo * pSubUndo = rUndos[ static_cast<sal_uInt16>(nSubstitute) ]; nId = pSubUndo->GetEffectiveId(); sStr = pSubUndo->GetComment(); } @@ -764,7 +764,7 @@ SwUndoId SwDoc::GetUndoIds( String* pStr, SwUndoIds *pUndoIds) const while (nTmpPos >= 0) { - SwUndo * pUndo = (*pUndos)[ static_cast<USHORT>(nTmpPos) ]; + SwUndo * pUndo = (*pUndos)[ static_cast<sal_uInt16>(nTmpPos) ]; SwUndoIdAndName * pIdAndName = lcl_GetUndoIdAndName( *pUndos, static_cast<sal_uInt16>(nTmpPos) ); @@ -808,13 +808,13 @@ bool SwDoc::Redo( SwUndoIter& rUndoIter ) { if( rUndoIter.GetId() && !HasUndoId( rUndoIter.GetId() ) ) { - rUndoIter.bWeiter = FALSE; - return FALSE; + rUndoIter.bWeiter = sal_False; + return sal_False; } if( nUndoPos == pUndos->Count() ) { - rUndoIter.bWeiter = FALSE; - return FALSE; + rUndoIter.bWeiter = sal_False; + return sal_False; } SwUndo *pUndo = (*pUndos)[ nUndoPos++ ]; @@ -840,11 +840,11 @@ bool SwDoc::Redo( SwUndoIter& rUndoIter ) USHRT_MAX != ((SwUndoReplace*)pUndo)->nAktPos ) { --nUndoPos; - return TRUE; + return sal_True; } if( rUndoIter.bWeiter && nUndoPos >= pUndos->Count() ) - rUndoIter.bWeiter = FALSE; + rUndoIter.bWeiter = sal_False; // ist die History leer und wurde nicht wegen Speichermangel // verworfen, so kann das Dokument als unveraendert gelten @@ -852,7 +852,7 @@ bool SwDoc::Redo( SwUndoIter& rUndoIter ) ResetModified(); else SetModified(); - return TRUE; + return sal_True; } @@ -916,14 +916,14 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt ) { if( rUndoIter.GetId() && !HasUndoId( rUndoIter.GetId() ) ) { - rUndoIter.bWeiter = FALSE; - return FALSE; + rUndoIter.bWeiter = sal_False; + return sal_False; } - USHORT nSize = nUndoPos; + sal_uInt16 nSize = nUndoPos; if( !nSize ) { - rUndoIter.bWeiter = FALSE; - return FALSE; + rUndoIter.bWeiter = sal_False; + return sal_False; } // dann suche jetzt ueber die End/Start-Gruppen die gueltige Repeat-Aktion @@ -931,8 +931,8 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt ) if( UNDO_END == pUndo->GetId() ) nSize = nSize - ((SwUndoEnd*)pUndo)->GetSttOffset(); - USHORT nEndCnt = nUndoPos; - BOOL bOneUndo = nSize + 1 == nUndoPos; + sal_uInt16 nEndCnt = nUndoPos; + sal_Bool bOneUndo = nSize + 1 == nUndoPos; SwPaM* pTmpCrsr = rUndoIter.pAktPam; SwUndoId nId = UNDO_EMPTY; @@ -950,10 +950,10 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt ) StartUndo( nId, NULL ); } do { // dann durchlaufe mal den gesamten Ring - for( USHORT nRptCnt = nRepeatCnt; nRptCnt > 0; --nRptCnt ) + for( sal_uInt16 nRptCnt = nRepeatCnt; nRptCnt > 0; --nRptCnt ) { rUndoIter.pLastUndoObj = 0; - for( USHORT nCnt = nSize; nCnt < nEndCnt; ++nCnt ) + for( sal_uInt16 nCnt = nSize; nCnt < nEndCnt; ++nCnt ) (*pUndos)[ nCnt ]->Repeat( rUndoIter ); // Repeat ausfuehren } } while( pTmpCrsr != @@ -961,7 +961,7 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt ) if( pTmpCrsr != pTmpCrsr->GetNext() || !bOneUndo ) EndUndo( nId, NULL ); - return TRUE; + return sal_True; } // liefert die Id der letzten Repeatfaehigen Aktion zurueck oder 0 diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index d9a0cc8514a4..f289e70883b6 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -77,7 +77,7 @@ String SwHistoryHint::GetDescription() const } -SwHistorySetFmt::SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNd ) +SwHistorySetFmt::SwHistorySetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNd ) : SwHistoryHint( HSTRY_SETFMTHNT ) , m_pAttr( pFmtHt->Clone() ) , m_nNodeIndex( nNd ) @@ -121,7 +121,7 @@ String SwHistorySetFmt::GetDescription() const { String aResult ; - USHORT nWhich = m_pAttr->Which(); + sal_uInt16 nWhich = m_pAttr->Which(); switch (nWhich) { case RES_BREAK: @@ -188,7 +188,7 @@ SwHistorySetFmt::~SwHistorySetFmt() // --> OD 2008-02-27 #refactorlists# - removed <rDoc> -SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, ULONG nNodeIdx) +SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx) // <-- : SwHistoryHint( HSTRY_RESETFMTHNT ) , m_nNodeIndex( nNodeIdx ) @@ -212,7 +212,7 @@ void SwHistoryResetFmt::SetInDoc( SwDoc* pDoc, bool ) } -SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNodePos ) +SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETTXTHNT ) , m_nNodeIndex( nNodePos ) , m_nStart( *pTxtHt->GetStart() ) @@ -224,7 +224,7 @@ SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNodePos ) // ein bisschen kompliziert, aber ist Ok so: erst vom default // eine Kopie und dann die Werte aus dem Text Attribut zuweisen - USHORT nWhich = pTxtHt->Which(); + sal_uInt16 nWhich = pTxtHt->Which(); if ( RES_TXTATR_CHARFMT == nWhich ) { m_pAttr.reset( new SwFmtCharFmt( pTxtHt->GetCharFmt().GetCharFmt() ) ); @@ -266,7 +266,7 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool ) } -SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNodePos ) +SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETTXTFLDHNT ) , m_pFldType( 0 ) , m_pFld( new SwFmtFld( *pTxtFld->GetFld().GetFld() ) ) @@ -328,7 +328,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc* pDoc, bool ) -SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNodePos ) +SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETREFMARKHNT ) , m_RefName( pTxtHt->GetRefMark().GetRefName() ) , m_nNodeIndex( nNodePos ) @@ -357,7 +357,7 @@ void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool ) } -SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNodePos ) +SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETTOXMARKHNT ) , m_TOXMark( pTxtHt->GetTOXMark() ) , m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() ) @@ -378,9 +378,9 @@ void SwHistorySetTOXMark::SetInDoc( SwDoc* pDoc, bool ) return; // search for respective TOX type - USHORT nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes ); + sal_uInt16 nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes ); SwTOXType* pToxType = 0; - for ( USHORT n = 0; n < nCnt; ++n ) + for ( sal_uInt16 n = 0; n < nCnt; ++n ) { pToxType = const_cast<SwTOXType*>(pDoc->GetTOXType( m_eTOXTypes, n )); if ( pToxType->GetTypeName() == m_TOXName ) @@ -415,8 +415,8 @@ int SwHistorySetTOXMark::IsEqual( const SwTOXMark& rCmp ) const } -SwHistoryResetTxt::SwHistoryResetTxt( USHORT nWhich, - xub_StrLen nAttrStart, xub_StrLen nAttrEnd, ULONG nNodePos ) +SwHistoryResetTxt::SwHistoryResetTxt( sal_uInt16 nWhich, + xub_StrLen nAttrStart, xub_StrLen nAttrEnd, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_RESETTXTHNT ) , m_nNodeIndex( nNodePos ), m_nStart( nAttrStart ), m_nEnd( nAttrEnd ) , m_nAttr( nWhich ) @@ -435,7 +435,7 @@ void SwHistoryResetTxt::SetInDoc( SwDoc* pDoc, bool ) } -SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNodePos ) +SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNodePos ) : SwHistoryHint( HSTRY_SETFTNHNT ) , m_pUndo( new SwUndoSaveSection ) , m_FootnoteNumber( pTxtFtn->GetFtn().GetNumStr() ) @@ -454,7 +454,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNodePos ) //Pointer auf StartNode der FtnSection merken und erstmal den Pointer im //Attribut zuruecksetzen -> Damit werden automatisch die Frms vernichtet. SwNodeIndex aSttIdx( *pTxtFtn->GetStartNode() ); - pTxtFtn->SetStartNode( 0, FALSE ); + pTxtFtn->SetStartNode( 0, sal_False ); m_pUndo->SaveSection( pDoc, aSttIdx ); m_nNodeIndex = pSaveNd->GetIndex(); @@ -529,8 +529,8 @@ void SwHistorySetFootnote::SetInDoc( SwDoc* pDoc, bool ) } -SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, ULONG nNd, - BYTE nNodeWhich ) +SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, sal_uLong nNd, + sal_uInt8 nNodeWhich ) : SwHistoryHint( HSTRY_CHGFMTCOLL ) , m_pColl( pFmtColl ) , m_nNodeIndex( nNd ) @@ -569,7 +569,7 @@ SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt ) , m_pUndo( new SwUndoDelLayFmt( pFlyFmt ) ) { ASSERT( pFlyFmt, "SwHistoryTxtFlyCnt: no Format" ); - m_pUndo->ChgShowSel( FALSE ); + m_pUndo->ChgShowSel( sal_False ); } @@ -718,7 +718,7 @@ const ::rtl::OUString& SwHistoryBookmark::GetName() const SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet, - ULONG nNodePos, const SvUShortsSort& rSetArr ) + sal_uLong nNodePos, const SvUShortsSort& rSetArr ) : SwHistoryHint( HSTRY_SETATTRSET ) , m_OldSet( rSet ) , m_ResetArray( 0, 4 ) @@ -788,13 +788,13 @@ SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet, break; pItem = aIter.NextItem(); pOrigItem = aOrigIter.NextItem(); - } while( TRUE ); + } while( sal_True ); } void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool ) { - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); SwNode * pNode = pDoc->GetNodes()[ m_nNodeIndex ]; if ( pNode->IsCntntNode() ) @@ -823,17 +823,17 @@ void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool ) SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet, - ULONG nNodePos, xub_StrLen nAttrStt, xub_StrLen nAttrEnd ) + sal_uLong nNodePos, xub_StrLen nAttrStt, xub_StrLen nAttrEnd ) : SwHistoryHint( HSTRY_RESETATTRSET ) , m_nNodeIndex( nNodePos ), m_nStart( nAttrStt ), m_nEnd( nAttrEnd ) - , m_Array( (BYTE)rSet.Count() ) + , m_Array( (sal_uInt8)rSet.Count() ) { SfxItemIter aIter( rSet ); bool bAutoStyle = false; - while( TRUE ) + while( sal_True ) { - const USHORT nWhich = aIter.GetCurItem()->Which(); + const sal_uInt16 nWhich = aIter.GetCurItem()->Which(); #ifndef PRODUCT switch (nWhich) @@ -879,19 +879,19 @@ SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet, void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool ) { - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); SwCntntNode * pCntntNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetCntntNode(); ASSERT( pCntntNd, "SwHistoryResetAttrSet: no CntntNode" ); if (pCntntNd) { - const USHORT* pArr = m_Array.GetData(); + const sal_uInt16* pArr = m_Array.GetData(); if ( USHRT_MAX == m_nEnd && USHRT_MAX == m_nStart ) { // no area: use ContentNode - for ( USHORT n = m_Array.Count(); n; --n, ++pArr ) + for ( sal_uInt16 n = m_Array.Count(); n; --n, ++pArr ) { pCntntNd->ResetAttr( *pArr ); } @@ -899,7 +899,7 @@ void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool ) else { // area: use TextNode - for ( USHORT n = m_Array.Count(); n; --n, ++pArr ) + for ( sal_uInt16 n = m_Array.Count(); n; --n, ++pArr ) { static_cast<SwTxtNode*>(pCntntNd)-> DeleteAttributes( *pArr, m_nStart, m_nEnd ); @@ -927,10 +927,10 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt ) void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool ) { - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); - USHORT nPos = pDoc->GetSpzFrmFmts()->GetPos( &m_rFmt ); + sal_uInt16 nPos = pDoc->GetSpzFrmFmts()->GetPos( &m_rFmt ); if ( USHRT_MAX != nPos ) // Format does still exist { SwFmtAnchor aTmp( m_rFmt.GetAnchor() ); @@ -949,7 +949,7 @@ void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool ) aTmp.SetAnchor( &aPos ); // so the Layout does not get confused - if ( !pCNd || !pCNd->GetFrm( 0, 0, FALSE ) ) + if ( !pCNd || !pCNd->GetFrm( 0, 0, sal_False ) ) { m_rFmt.DelFrms(); } @@ -1026,8 +1026,8 @@ void SwHistoryChangeCharFmt::SetInDoc(SwDoc * pDoc, bool ) /* */ -SwHistory::SwHistory( USHORT nInitSz, USHORT nGrowSz ) - : m_SwpHstry( (BYTE)nInitSz, (BYTE)nGrowSz ) +SwHistory::SwHistory( sal_uInt16 nInitSz, sal_uInt16 nGrowSz ) + : m_SwpHstry( (sal_uInt8)nInitSz, (sal_uInt8)nGrowSz ) , m_nEndDiff( 0 ) {} @@ -1050,12 +1050,12 @@ SwHistory::~SwHistory() // --> OD 2008-02-27 #refactorlists# - removed <rDoc> void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue, - ULONG nNodeIdx ) + sal_uLong nNodeIdx ) // <-- { ASSERT( !m_nEndDiff, "History was not deleted after REDO" ); - USHORT nWhich = pNewValue->Which(); + sal_uInt16 nWhich = pNewValue->Which(); if( (nWhich >= POOLATTR_END) || (nWhich == RES_TXTATR_FIELD) ) return; @@ -1073,12 +1073,12 @@ void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue, } -void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr ) +void SwHistory::Add( SwTxtAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr ) { ASSERT( !m_nEndDiff, "History was not deleted after REDO" ); SwHistoryHint * pHt; - USHORT nAttrWhich = pHint->Which(); + sal_uInt16 nAttrWhich = pHint->Which(); if( !bNewAttr ) { @@ -1118,7 +1118,7 @@ void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr ) } -void SwHistory::Add( SwFmtColl* pColl, ULONG nNodeIdx, BYTE nWhichNd ) +void SwHistory::Add( SwFmtColl* pColl, sal_uLong nNodeIdx, sal_uInt8 nWhichNd ) { ASSERT( !m_nEndDiff, "History was not deleted after REDO" ); @@ -1143,19 +1143,19 @@ void SwHistory::Add( SwFrmFmt& rFmt ) m_SwpHstry.Insert( pHt, Count() ); } -void SwHistory::Add( SwFlyFrmFmt& rFmt, USHORT& rSetPos ) +void SwHistory::Add( SwFlyFrmFmt& rFmt, sal_uInt16& rSetPos ) { ASSERT( !m_nEndDiff, "History was not deleted after REDO" ); SwHistoryHint * pHint; - const USHORT nWh = rFmt.Which(); + const sal_uInt16 nWh = rFmt.Which(); if( RES_FLYFRMFMT == nWh || RES_DRAWFRMFMT == nWh ) { pHint = new SwHistoryTxtFlyCnt( &rFmt ); m_SwpHstry.Insert( pHint, Count() ); const SwFmtChain* pChainItem; - if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, FALSE, + if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, sal_False, (const SfxPoolItem**)&pChainItem )) { if( pChainItem->GetNext() || pChainItem->GetPrev() ) @@ -1196,7 +1196,7 @@ void SwHistory::Add(const SfxItemSet & rSet, const SwCharFmt & rFmt) /************************************************************************* |* -|* BOOL SwHistory::Rollback() +|* sal_Bool SwHistory::Rollback() |* |* Beschreibung Dokument 1.0 |* Ersterstellung JP 18.02.91 @@ -1205,13 +1205,13 @@ void SwHistory::Add(const SfxItemSet & rSet, const SwCharFmt & rFmt) *************************************************************************/ -bool SwHistory::Rollback( SwDoc* pDoc, USHORT nStart ) +bool SwHistory::Rollback( SwDoc* pDoc, sal_uInt16 nStart ) { if ( !Count() ) return false; SwHistoryHint * pHHt; - USHORT i; + sal_uInt16 i; for ( i = Count(); i > nStart ; ) { pHHt = m_SwpHstry[ --i ]; @@ -1225,9 +1225,9 @@ bool SwHistory::Rollback( SwDoc* pDoc, USHORT nStart ) -bool SwHistory::TmpRollback( SwDoc* pDoc, USHORT nStart, bool bToFirst ) +bool SwHistory::TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool bToFirst ) { - USHORT nEnd = Count() - m_nEndDiff; + sal_uInt16 nEnd = Count() - m_nEndDiff; if ( !Count() || !nEnd || nStart >= nEnd ) return false; @@ -1252,9 +1252,9 @@ bool SwHistory::TmpRollback( SwDoc* pDoc, USHORT nStart, bool bToFirst ) } -void SwHistory::Delete( USHORT nStart ) +void SwHistory::Delete( sal_uInt16 nStart ) { - for ( USHORT n = Count(); n > nStart; ) + for ( sal_uInt16 n = Count(); n > nStart; ) { m_SwpHstry.DeleteAndDestroy( --n, 1 ); } @@ -1262,16 +1262,16 @@ void SwHistory::Delete( USHORT nStart ) } -USHORT SwHistory::SetTmpEnd( USHORT nNewTmpEnd ) +sal_uInt16 SwHistory::SetTmpEnd( sal_uInt16 nNewTmpEnd ) { ASSERT( nNewTmpEnd <= Count(), "SwHistory::SetTmpEnd: out of bounds" ); - USHORT nOld = Count() - m_nEndDiff; + sal_uInt16 nOld = Count() - m_nEndDiff; m_nEndDiff = Count() - nNewTmpEnd; // for every SwHistoryFlyCnt, call the Redo of its UndoObject. // this saves the formats of the flys! - for ( USHORT n = nOld; n < nNewTmpEnd; n++ ) + for ( sal_uInt16 n = nOld; n < nNewTmpEnd; n++ ) { if ( HSTRY_FLYCNT == (*this)[ n ]->Which() ) { @@ -1283,7 +1283,7 @@ USHORT SwHistory::SetTmpEnd( USHORT nNewTmpEnd ) return nOld; } -void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx ) +void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx ) { if( rSet.Count() ) { @@ -1297,11 +1297,11 @@ void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx ) if( aIter.IsAtEnd() ) break; aIter.NextItem(); - } while( TRUE ); + } while( sal_True ); } } -void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx, +void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx, xub_StrLen nStart, xub_StrLen nEnd, bool bFields ) { if( !pHts ) @@ -1311,7 +1311,7 @@ void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx, SwTxtAttr* pHt; xub_StrLen nAttrStt; const xub_StrLen * pEndIdx; - for( USHORT n = 0; n < pHts->Count(); n++ ) + for( sal_uInt16 n = 0; n < pHts->Count(); n++ ) { // BP: nAttrStt muss auch bei !pEndIdx gesetzt werden pHt = pHts->GetTextHint(n); @@ -1322,17 +1322,17 @@ void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx, break; // Flys und Ftn nie kopieren !! - BOOL bNextAttr = FALSE; + sal_Bool bNextAttr = sal_False; switch( pHt->Which() ) { case RES_TXTATR_FIELD: // keine Felder, .. kopieren ?? if( !bFields ) - bNextAttr = TRUE; + bNextAttr = sal_True; break; case RES_TXTATR_FLYCNT: case RES_TXTATR_FTN: - bNextAttr = TRUE; + bNextAttr = sal_True; break; } @@ -1516,8 +1516,8 @@ void SwRegHistory::_MakeSetWhichIds() if( pSet && pSet->Count() ) { SfxItemIter aIter( *pSet ); - USHORT nW = aIter.FirstItem()->Which(); - while( TRUE ) + sal_uInt16 nW = aIter.FirstItem()->Which(); + while( sal_True ) { m_WhichIdSet.Insert( nW ); if( aIter.IsAtEnd() ) diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index e3b54c59b142..8dd7e629aad3 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -142,7 +142,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt, bool bSaveDrawPt ) : SwUndo( UNDO_INSFMTATTR ) , m_pFmt( &rChgFmt ) - , m_pOldSet( m_pFmt->GetAttrSet().Clone( FALSE ) ) + , m_pOldSet( m_pFmt->GetAttrSet().Clone( sal_False ) ) , m_nNodeIndex( 0 ) , m_nFmtWhich( rChgFmt.Which() ) , m_bSaveDrawPt( bSaveDrawPt ) @@ -154,7 +154,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt, void SwUndoFmtAttr::Init() { // treat change of anchor specially - if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, FALSE )) + if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, sal_False )) { SaveFlyAnchor( m_bSaveDrawPt ); } @@ -206,7 +206,7 @@ void SwUndoFmtAttr::Undo( SwUndoIter& rUndoIter) // restored, all other attributes are also restored. // Thus, keep track of its restoration bool bAnchorAttrRestored( false ); - if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, FALSE )) + if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, sal_False )) { bAnchorAttrRestored = RestoreFlyAnchor( rUndoIter ); if ( bAnchorAttrRestored ) @@ -249,7 +249,7 @@ bool SwUndoFmtAttr::IsFmtInDoc( SwDoc* pDoc ) { // search for the Format in the Document; if it does not exist any more, // the attribute is not restored! - USHORT nPos = USHRT_MAX; + sal_uInt16 nPos = USHRT_MAX; switch ( m_nFmtWhich ) { case RES_TXTFMTCOLL: @@ -451,7 +451,7 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt ) */ } const SwFmtAnchor& rAnchor = - static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) ); + static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) ); if( !rAnchor.GetCntntAnchor() ) return; @@ -482,7 +482,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter ) SwDoc* pDoc = &rIter.GetDoc(); SwFlyFrmFmt* pFrmFmt = static_cast<SwFlyFrmFmt*>(m_pFmt); const SwFmtAnchor& rAnchor = - static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) ); + static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) ); SwFmtAnchor aNewAnchor( rAnchor.GetAnchorId() ); if (FLY_AT_PAGE != rAnchor.GetAnchorId()) @@ -633,14 +633,14 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter ) // --> OD 2008-02-12 #newlistlevelattrs# SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat, - const USHORT nWhichId ) + const sal_uInt16 nWhichId ) : SwUndo( UNDO_RESETATTR ) , m_pChangedFormat( &rChangedFormat ) , m_nWhichId( nWhichId ) , m_pOldItem( 0 ) { const SfxPoolItem* pItem = 0; - if (rChangedFormat.GetItemState( nWhichId, FALSE, &pItem ) == SFX_ITEM_SET) + if (rChangedFormat.GetItemState( nWhichId, sal_False, &pItem ) == SFX_ITEM_SET) { m_pOldItem.reset( pItem->Clone() ); } @@ -669,14 +669,14 @@ void SwUndoFmtResetAttr::Redo( SwUndoIter& ) // ----------------------------------------------------- -SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, USHORT nFmtId ) +SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, sal_uInt16 nFmtId ) : SwUndo( UNDO_RESETATTR ), SwUndRng( rRange ) , m_pHistory( new SwHistory ) , m_nFormatId( nFmtId ) { } -SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, USHORT nFmtId ) +SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFmtId ) : SwUndo( UNDO_RESETATTR ) , m_pHistory( new SwHistory ) , m_nFormatId( nFmtId ) @@ -703,7 +703,7 @@ void SwUndoResetAttr::Undo( SwUndoIter& rUndoIter ) if( pTNd ) { SwIndex aIdx( pTNd, nSttCntnt ); - pTNd->DontExpandFmt( aIdx, FALSE ); + pTNd->DontExpandFmt( aIdx, sal_False ); } } @@ -725,10 +725,10 @@ void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().RstTxtAttrs( *rUndoIter.pAktPam ); break; case RES_TXTFMTCOLL: - rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, FALSE, pIdArr ); + rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_False, pIdArr ); break; case RES_CONDTXTFMTCOLL: - rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, TRUE, pIdArr ); + rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_True, pIdArr ); break; case RES_TXTATR_TOXMARK: @@ -739,7 +739,7 @@ void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter ) SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetCntntNode(), nSttCntnt )); - USHORT nCnt = rDoc.GetCurTOXMark( aPos, aArr ); + sal_uInt16 nCnt = rDoc.GetCurTOXMark( aPos, aArr ); if( nCnt ) { if( 1 < nCnt ) @@ -790,10 +790,10 @@ void SwUndoResetAttr::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().RstTxtAttrs( *rUndoIter.pAktPam ); break; case RES_TXTFMTCOLL: - rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, FALSE, pIdArr ); + rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_False, pIdArr ); break; case RES_CONDTXTFMTCOLL: - rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, TRUE, pIdArr ); + rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_True, pIdArr ); break; } rUndoIter.pLastUndoObj = this; @@ -841,7 +841,7 @@ SwUndoAttr::~SwUndoAttr() { } -void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, BOOL bIsCntnt ) +void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, sal_Bool bIsCntnt ) { SwDoc* pDoc = rPam.GetDoc(); if ( pDoc->IsRedlineOn() ) @@ -944,7 +944,7 @@ void SwUndoAttr::Repeat( SwUndoIter& rUndoIter ) // RefMarks are not repeat capable - if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, FALSE ) ) + if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, sal_False ) ) { rUndoIter.GetDoc().InsertItemSet( *rUndoIter.pAktPam, m_AttrSet, m_nInsertFlags ); @@ -1002,15 +1002,15 @@ void SwUndoAttr::Redo( SwUndoIter& rUndoIter ) void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) { - if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, FALSE )) + if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, sal_False )) return ; SwHistoryHint* pHstHnt; SwNodes& rNds = rDoc.GetNodes(); - for ( USHORT n = 0; n < m_pHistory->Count(); ++n ) + for ( sal_uInt16 n = 0; n < m_pHistory->Count(); ++n ) { xub_StrLen nCntnt = 0; - ULONG nNode = 0; + sal_uLong nNode = 0; pHstHnt = (*m_pHistory)[ n ]; switch ( pHstHnt->Which() ) { @@ -1034,7 +1034,7 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) if ( STRING_MAXLEN != nCntnt ) { const SvUShorts& rArr = pHistoryHint->GetArr(); - for ( USHORT i = rArr.Count(); i; ) + for ( sal_uInt16 i = rArr.Count(); i; ) { if ( RES_TXTATR_FTN == rArr[ --i ] ) { @@ -1077,7 +1077,7 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet ) , m_pTabStop( 0 ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, sal_False, &pItem ) ) { // store separately, because it may change! m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) ); @@ -1128,7 +1128,7 @@ void SwUndoDefaultAttr::Redo( SwUndoIter& rUndoIter) // ----------------------------------------------------- SwUndoMoveLeftMargin::SwUndoMoveLeftMargin( - const SwPaM& rPam, BOOL bFlag, BOOL bMod ) + const SwPaM& rPam, sal_Bool bFlag, sal_Bool bMod ) : SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN ) , SwUndRng( rPam ) , m_pHistory( new SwHistory ) @@ -1143,8 +1143,8 @@ SwUndoMoveLeftMargin::~SwUndoMoveLeftMargin() void SwUndoMoveLeftMargin::Undo( SwUndoIter& rIter ) { SwDoc* pDoc = &rIter.GetDoc(); - BOOL bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); // restore old values m_pHistory->TmpRollback( pDoc, 0 ); @@ -1174,7 +1174,7 @@ void SwUndoMoveLeftMargin::Repeat( SwUndoIter& rIter ) SwUndoChangeFootNote::SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt, - USHORT nNum, bool bIsEndNote ) + sal_uInt16 nNum, bool bIsEndNote ) : SwUndo( UNDO_CHGFTN ), SwUndRng( rRange ) , m_pHistory( new SwHistory() ) , m_Text( rTxt ) @@ -1192,8 +1192,8 @@ void SwUndoChangeFootNote::Undo( SwUndoIter& rIter ) SwDoc& rDoc = rIter.GetDoc(); SetPaM( rIter ); - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); m_pHistory->TmpRollback( &rDoc, 0 ); m_pHistory->SetTmpEnd( m_pHistory->Count() ); @@ -1294,7 +1294,7 @@ void SwUndoDontExpandFmt::Undo( SwUndoIter& rIter ) SwPosition& rPos = *pPam->GetPoint(); rPos.nNode = m_nNodeIndex; rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(), m_nContentIndex); - pDoc->DontExpandFmt( rPos, FALSE ); + pDoc->DontExpandFmt( rPos, sal_False ); } diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index ef39a4e18950..9c7b5c76e17c 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -68,13 +68,13 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); } if the anchor frame has be moved via _MoveNodes(..) and DelFrms(..) */ -void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, ULONG nMovedIndex ) +void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, sal_uLong nMovedIndex ) { if( rSpzArr.Count() ) { SwFlyFrmFmt* pFmt; const SwFmtAnchor* pAnchor; - for( USHORT n = 0; n < rSpzArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < rSpzArr.Count(); ++n ) { pFmt = (SwFlyFrmFmt*)rSpzArr[n]; pAnchor = &pFmt->GetAnchor(); @@ -110,12 +110,12 @@ section and the end paragraph not. Then we have to move the paragraph into this record this in nSectDiff. */ -SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) +SwUndoDelete::SwUndoDelete( SwPaM& rPam, sal_Bool bFullPara, sal_Bool bCalledByTblCpy ) : SwUndo(UNDO_DELETE), SwUndRng( rPam ), pMvStt( 0 ), pSttStr(0), pEndStr(0), pRedlData(0), pRedlSaveData(0), nNode(0), nNdDiff(0), nSectDiff(0), nReplaceDummy(0), nSetPos(0), - bGroup( FALSE ), bBackSp( FALSE ), bJoinNext( FALSE ), bTblDelLastNd( FALSE ), - bDelFullPara( bFullPara ), bResetPgDesc( FALSE ), bResetPgBrk( FALSE ), + bGroup( sal_False ), bBackSp( sal_False ), bJoinNext( sal_False ), bTblDelLastNd( sal_False ), + bDelFullPara( bFullPara ), bResetPgDesc( sal_False ), bResetPgBrk( sal_False ), bFromTableCopy( bCalledByTblCpy ) { bDelFullPara = bFullPara; // This is set e.g. if an empty paragraph before a table is deleted @@ -147,8 +147,8 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint(), DelCntntType(nsDelCntntType::DELCNT_ALL | nsDelCntntType::DELCNT_CHKNOCNTNT) ); - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); _DelBookmarks(pStt->nNode, pEnd->nNode); pDoc->DoUndo( bDoesUndo ); } @@ -172,8 +172,8 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) : pEnd->nNode.GetNode().GetTxtNode(); } - BOOL bMoveNds = *pStt == *pEnd // noch ein Bereich vorhanden ?? - ? FALSE + sal_Bool bMoveNds = *pStt == *pEnd // noch ein Bereich vorhanden ?? + ? sal_False : ( SaveCntnt( pStt, pEnd, pSttTxtNd, pEndTxtNd ) || bFromTableCopy ); if( pSttTxtNd && pEndTxtNd && pSttTxtNd != pEndTxtNd ) @@ -193,11 +193,11 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) { SwRegHistory aRegHist( *pEndTxtNd, pHistory ); if( SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState( - RES_BREAK, FALSE ) ) + RES_BREAK, sal_False ) ) pEndTxtNd->ResetAttr( RES_BREAK ); if( pEndTxtNd->HasSwAttrSet() && SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState( - RES_PAGEDESC, FALSE ) ) + RES_PAGEDESC, sal_False ) ) pEndTxtNd->ResetAttr( RES_PAGEDESC ); } } @@ -253,10 +253,10 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) ++nReplaceDummy; SwNodeRange aMvRg( *pEndTxtNd, 0, *pEndTxtNd, 1 ); SwPosition aSplitPos( *pEndTxtNd ); - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); pDoc->SplitNode( aSplitPos, false ); - rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, TRUE ); + rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, sal_True ); pDoc->DoUndo( bDoesUndo ); aRg.aEnd--; } @@ -279,10 +279,10 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) { SwNodeRange aMvRg( *pSttTxtNd, 0, *pSttTxtNd, 1 ); SwPosition aSplitPos( *pSttTxtNd ); - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); pDoc->SplitNode( aSplitPos, false ); - rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, TRUE ); + rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, sal_True ); pDoc->DoUndo( bDoesUndo ); aRg.aStart--; } @@ -319,12 +319,12 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) if( bJoinNext ) { SwNodeRange aMvRg( *pEndTxtNd, 0, *pEndTxtNd, 1 ); - rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, TRUE ); + rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, sal_True ); } else { SwNodeRange aMvRg( *pSttTxtNd, 0, *pSttTxtNd, 1 ); - rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, TRUE ); + rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, sal_True ); } } } @@ -357,14 +357,14 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) DELETEZ( pHistory ); } -BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, +sal_Bool SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd ) { - ULONG nNdIdx = pStt->nNode.GetIndex(); + sal_uLong nNdIdx = pStt->nNode.GetIndex(); // 1 - kopiere den Anfang in den Start-String if( pSttTxtNd ) { - BOOL bOneNode = nSttNode == nEndNode; + sal_Bool bOneNode = nSttNode == nEndNode; xub_StrLen nLen = bOneNode ? nEndCntnt - nSttCntnt : pSttTxtNd->GetTxt().Len() - nSttCntnt; SwRegHistory aRHst( *pSttTxtNd, pHistory ); @@ -397,7 +397,7 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, } if( bOneNode ) - return FALSE; // keine Nodes mehr verschieben + return sal_False; // keine Nodes mehr verschieben } @@ -435,21 +435,21 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, // sind es nur zwei Nodes, dann ist schon alles erledigt. if( ( pSttTxtNd || pEndTxtNd ) && nSttNode + 1 == nEndNode ) - return FALSE; // keine Nodes mehr verschieben + return sal_False; // keine Nodes mehr verschieben - return TRUE; // verschiebe die dazwischen liegenden Nodes + return sal_True; // verschiebe die dazwischen liegenden Nodes } -BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam ) +sal_Bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam ) { // ist das Undo groesser als 1 Node ? (sprich: Start und EndString) - if( pSttStr ? !pSttStr->Len() || pEndStr : TRUE ) - return FALSE; + if( pSttStr ? !pSttStr->Len() || pEndStr : sal_True ) + return sal_False; // es kann nur das Loeschen von einzelnen char's zusammengefasst werden if( nSttNode != nEndNode || ( !bGroup && nSttCntnt+1 != nEndCntnt )) - return FALSE; + return sal_False; const SwPosition *pStt = rDelPam.Start(), *pEnd = rDelPam.GetPoint() == pStt @@ -459,26 +459,26 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam ) if( pStt->nNode != pEnd->nNode || pStt->nContent.GetIndex()+1 != pEnd->nContent.GetIndex() || pEnd->nNode != nSttNode ) - return FALSE; + return sal_False; // untercheide zwischen BackSpace und Delete. Es muss dann das // Undo-Array unterschiedlich aufgebaut werden !! if( pEnd->nContent == nSttCntnt ) { - if( bGroup && !bBackSp ) return FALSE; - bBackSp = TRUE; + if( bGroup && !bBackSp ) return sal_False; + bBackSp = sal_True; } else if( pStt->nContent == nSttCntnt ) { - if( bGroup && bBackSp ) return FALSE; - bBackSp = FALSE; + if( bGroup && bBackSp ) return sal_False; + bBackSp = sal_False; } else - return FALSE; + return sal_False; // sind die beiden Nodes (Nodes-/Undo-Array) ueberhaupt TextNodes? SwTxtNode * pDelTxtNd = pStt->nNode.GetNode().GetTxtNode(); - if( !pDelTxtNd ) return FALSE; + if( !pDelTxtNd ) return sal_False; xub_StrLen nUChrPos = bBackSp ? 0 : pSttStr->Len()-1; sal_Unicode cDelChar = pDelTxtNd->GetTxt().GetChar( pStt->nContent.GetIndex() ); @@ -486,19 +486,19 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam ) if( ( CH_TXTATR_BREAKWORD == cDelChar || CH_TXTATR_INWORD == cDelChar ) || rCC.isLetterNumeric( String( cDelChar ), 0 ) != rCC.isLetterNumeric( *pSttStr, nUChrPos ) ) - return FALSE; + return sal_False; { SwRedlineSaveDatas* pTmpSav = new SwRedlineSaveDatas; - if( !FillSaveData( rDelPam, *pTmpSav, FALSE )) + if( !FillSaveData( rDelPam, *pTmpSav, sal_False )) delete pTmpSav, pTmpSav = 0; - BOOL bOk = ( !pRedlSaveData && !pTmpSav ) || + sal_Bool bOk = ( !pRedlSaveData && !pTmpSav ) || ( pRedlSaveData && pTmpSav && SwUndo::CanRedlineGroup( *pRedlSaveData, *pTmpSav, bBackSp )); delete pTmpSav; if( !bOk ) - return FALSE; + return sal_False; pDoc->DeleteRedline( rDelPam, false, USHRT_MAX ); } @@ -515,8 +515,8 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam ) pSttStr->Insert( cDelChar, nUChrPos ); pDelTxtNd->EraseText( pStt->nContent, 1 ); - bGroup = TRUE; - return TRUE; + bGroup = sal_True; + return sal_True; } @@ -541,7 +541,7 @@ static SwRewriter lcl_RewriterFromHistory(SwHistory & rHistory) bool bDone = false; - for ( USHORT n = 0; n < rHistory.Count(); n++) + for ( sal_uInt16 n = 0; n < rHistory.Count(); n++) { String aDescr = rHistory[n]->GetDescription(); @@ -623,14 +623,14 @@ SwRewriter SwUndoDelete::GetRewriter() const } // Every object, anchored "AtCntnt" will be reanchored at rPos -void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos, ULONG nOldIdx ) +void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos, sal_uLong nOldIdx ) { if( rSpzArr.Count() ) { SwFlyFrmFmt* pFmt; const SwFmtAnchor* pAnchor; const SwPosition* pAPos; - for( USHORT n = 0; n < rSpzArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < rSpzArr.Count(); ++n ) { pFmt = (SwFlyFrmFmt*)rSpzArr[n]; pAnchor = &pFmt->GetAnchor(); @@ -651,10 +651,10 @@ void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) { SwDoc* pDoc = &rUndoIter.GetDoc(); - BOOL bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); - ULONG nCalcStt = nSttNode - nNdDiff; + sal_uLong nCalcStt = nSttNode - nNdDiff; if( nSectDiff && bBackSp ) nCalcStt += nSectDiff; @@ -687,7 +687,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) pInsNd = 0; // Node nicht loeschen !! SwNodes* pUNds = (SwNodes*)pDoc->GetUndoNds(); - BOOL bNodeMove = 0 != nNode; + sal_Bool bNodeMove = 0 != nNode; if( pEndStr ) { @@ -702,7 +702,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) if( pSttStr && !bFromTableCopy ) { - ULONG nOldIdx = aPos.nNode.GetIndex(); + sal_uLong nOldIdx = aPos.nNode.GetIndex(); pDoc->SplitNode( aPos, false ); // After the split all objects are anchored at the first paragraph, // but the pHistory of the fly frame formats relies on anchoring at @@ -726,7 +726,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) { if( nSttCntnt < pNd->GetTxt().Len() ) { - ULONG nOldIdx = aPos.nNode.GetIndex(); + sal_uLong nOldIdx = aPos.nNode.GetIndex(); pDoc->SplitNode( aPos, false ); if( bBackSp ) lcl_ReAnchorAtCntntFlyFrames( *pDoc->GetSpzFrmFmts(), aPos, nOldIdx ); @@ -738,7 +738,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) SwNode* pMovedNode = NULL; if( nSectDiff ) { - ULONG nMoveIndex = aPos.nNode.GetIndex(); + sal_uLong nMoveIndex = aPos.nNode.GetIndex(); int nDiff = 0; if( bJoinNext ) { @@ -755,7 +755,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) aPos.nNode--; if( !bJoinNext ) pMovedNode = &aPos.nNode.GetNode(); - pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, TRUE ); + pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, sal_True ); aPos.nNode++; } @@ -767,7 +767,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) if( nReplaceDummy ) { - ULONG nMoveIndex; + sal_uLong nMoveIndex; if( bJoinNext ) { nMoveIndex = nEndNode - nNdDiff; @@ -781,7 +781,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) SwNodeIndex aMvIdx( pDoc->GetNodes(), nMoveIndex ); SwNodeRange aRg( aPos.nNode, 0, aPos.nNode, 1 ); pMovedNode = &aPos.nNode.GetNode(); - pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, TRUE ); + pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, sal_True ); pDoc->GetNodes().Delete( aMvIdx, 1 ); } } @@ -838,8 +838,8 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) if( bResetPgDesc || bResetPgBrk ) { - USHORT nStt = static_cast<USHORT>( bResetPgDesc ? RES_PAGEDESC : RES_BREAK ); - USHORT nEnd = static_cast<USHORT>( bResetPgBrk ? RES_BREAK : RES_PAGEDESC ); + sal_uInt16 nStt = static_cast<sal_uInt16>( bResetPgDesc ? RES_PAGEDESC : RES_BREAK ); + sal_uInt16 nEnd = static_cast<sal_uInt16>( bResetPgBrk ? RES_BREAK : RES_PAGEDESC ); SwNode* pNode = pDoc->GetNodes()[ nEndNode + 1 ]; if( pNode->IsCntntNode() ) @@ -855,12 +855,12 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) SetSaveData( *pDoc, *pRedlSaveData ); pDoc->DoUndo( bUndo ); // Undo wieder einschalten - SetPaM( rUndoIter, TRUE ); + SetPaM( rUndoIter, sal_True ); } void SwUndoDelete::Redo( SwUndoIter& rUndoIter ) { - rUndoIter.SetUpdateAttr( TRUE ); + rUndoIter.SetUpdateAttr( sal_True ); SwPaM& rPam = *rUndoIter.pAktPam; SwDoc& rDoc = *rPam.GetDoc(); @@ -869,7 +869,7 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter ) if( pRedlSaveData ) { - bool bSuccess = FillSaveData(rPam, *pRedlSaveData, TRUE); + bool bSuccess = FillSaveData(rPam, *pRedlSaveData, sal_True); OSL_ENSURE(bSuccess, "SwUndoDelete::Redo: used to have redline data, but now none?"); if (!bSuccess) @@ -881,7 +881,7 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter ) if( !bDelFullPara ) { SwUndRng aTmpRng( rPam ); - RemoveIdxFromRange( rPam, FALSE ); + RemoveIdxFromRange( rPam, sal_False ); aTmpRng.SetPaM( rPam ); if( !bJoinNext ) // Dann Selektion von unten nach oben @@ -947,11 +947,11 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter ) const SfxPoolItem *pItem; if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, - FALSE, &pItem ) ) + sal_False, &pItem ) ) pNextNd->SetAttr( *pItem ); if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, - FALSE, &pItem ) ) + sal_False, &pItem ) ) pNextNd->SetAttr( *pItem ); } pTblNd->DelFrms(); @@ -988,8 +988,8 @@ void SwUndoDelete::Repeat( SwUndoIter& rUndoIter ) SwPaM& rPam = *rUndoIter.pAktPam; SwDoc& rDoc = *rPam.GetDoc(); - BOOL bGroupUndo = rDoc.DoesGroupUndo(); - rDoc.DoGroupUndo( FALSE ); + sal_Bool bGroupUndo = rDoc.DoesGroupUndo(); + rDoc.DoGroupUndo( sal_False ); if( !rPam.HasMark() ) { rPam.SetMark(); diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 1a71a705b2fb..6d637ad00315 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -59,14 +59,14 @@ class SwRedlineSaveData : public SwUndRng, public SwRedlineData, public: SwRedlineSaveData( SwComparePosition eCmpPos, const SwPosition& rSttPos, const SwPosition& rEndPos, - SwRedline& rRedl, BOOL bCopyNext ); + SwRedline& rRedl, sal_Bool bCopyNext ); ~SwRedlineSaveData(); void RedlineToDoc( SwPaM& rPam ); SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); } #ifdef DBG_UTIL - USHORT nRedlineCount; + sal_uInt16 nRedlineCount; #endif }; @@ -76,8 +76,8 @@ SV_IMPL_PTRARR( SwRedlineSaveDatas, SwRedlineSaveDataPtr ) SwUndoIter::SwUndoIter( SwPaM* pPam, SwUndoId nId ) { nUndoId = nId; - bWeiter = nId ? TRUE : FALSE; - bUpdateAttr = FALSE; + bWeiter = nId ? sal_True : sal_False; + bUpdateAttr = sal_False; pAktPam = pPam; nEndCnt = 0; pSelFmt = 0; @@ -87,7 +87,7 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); } //------------------------------------------------------------ -// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu +// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu // einem PaM zusammensetzen SwUndRng::SwUndRng() @@ -119,7 +119,7 @@ void SwUndRng::SetValues( const SwPaM& rPam ) nSttCntnt = pStt->nContent.GetIndex(); } -void SwUndRng::SetPaM( SwPaM & rPam, BOOL bCorrToCntnt ) const +void SwUndRng::SetPaM( SwPaM & rPam, sal_Bool bCorrToCntnt ) const { rPam.DeleteMark(); rPam.GetPoint()->nNode = nSttNode; @@ -147,7 +147,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, BOOL bCorrToCntnt ) const rPam.GetPoint()->nContent.Assign( 0, 0 ); } -void SwUndRng::SetPaM( SwUndoIter& rIter, BOOL bCorrToCntnt ) const +void SwUndRng::SetPaM( SwUndoIter& rIter, sal_Bool bCorrToCntnt ) const { if( rIter.pAktPam ) SetPaM( *rIter.pAktPam, bCorrToCntnt ); @@ -156,17 +156,17 @@ void SwUndRng::SetPaM( SwUndoIter& rIter, BOOL bCorrToCntnt ) const //------------------------------------------------------------ -void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, ULONG nSttIdx, - ULONG* pEndIdx ) +void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, sal_uLong nSttIdx, + sal_uLong* pEndIdx ) { SwNodeIndex aIdx( rDoc.GetNodes(), nSttIdx ); SwNodeIndex aEndIdx( rDoc.GetNodes(), pEndIdx ? *pEndIdx : aIdx.GetNode().EndOfSectionIndex() ); SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() ); - rDoc.CorrAbs( aIdx, aEndIdx, aPos, TRUE ); + rDoc.CorrAbs( aIdx, aEndIdx, aPos, sal_True ); } -void SwUndo::RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext ) +void SwUndo::RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext ) { const SwPosition* pEnd = rPam.End(); if( bMoveNext ) @@ -187,13 +187,13 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext ) } } - rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), TRUE ); + rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), sal_True ); } else - rPam.GetDoc()->CorrAbs( rPam, *pEnd, TRUE ); + rPam.GetDoc()->CorrAbs( rPam, *pEnd, sal_True ); } -void SwUndo::RemoveIdxRel( ULONG nIdx, const SwPosition& rPos ) +void SwUndo::RemoveIdxRel( sal_uLong nIdx, const SwPosition& rPos ) { // nur die Crsr verschieben; die Bookmarks/TOXMarks/.. werden vom // entsp. JoinNext/JoinPrev erledigt! @@ -286,11 +286,11 @@ SwUndoSaveCntnt::~SwUndoSaveCntnt() // aufgerufen. Dann soll die gesamte Section verschoben werden. void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx, - SwIndex* pCntIdx, ULONG* pEndNdIdx, xub_StrLen* pEndCntIdx ) + SwIndex* pCntIdx, sal_uLong* pEndNdIdx, xub_StrLen* pEndCntIdx ) { SwDoc& rDoc = *rPaM.GetDoc(); - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); SwNoTxtNode* pCpyNd = rPaM.GetNode()->GetNoTxtNode(); @@ -314,14 +314,14 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx, else aPos.nNode.GetNode().GetCntntNode()->MakeEndIndex( &aPos.nContent ); - // als USHORT merken; die Indizies verschieben sich !! - ULONG nTmpMvNode = aPos.nNode.GetIndex(); + // als sal_uInt16 merken; die Indizies verschieben sich !! + sal_uLong nTmpMvNode = aPos.nNode.GetIndex(); xub_StrLen nTmpMvCntnt = aPos.nContent.GetIndex(); if( pCpyNd || pEndNdIdx ) { SwNodeRange aRg( pStt->nNode, 0, pEnd->nNode, 1 ); - rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, FALSE ); + rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, sal_False ); aPos.nContent = 0; aPos.nNode--; } @@ -375,17 +375,17 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx, rDoc.DoUndo( bUndo ); } -void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, +void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, xub_StrLen nCntIdx, SwPosition& rInsPos, - ULONG* pEndNdIdx, xub_StrLen* pEndCntIdx ) + sal_uLong* pEndNdIdx, xub_StrLen* pEndCntIdx ) { // jetzt kommt das wiederherstellen SwNodes& rNds = (SwNodes&)*rDoc.GetUndoNds(); if( nNodeIdx == rNds.GetEndOfPostIts().GetIndex() ) return; // nichts gespeichert - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); SwPaM aPaM( rInsPos ); if( pEndNdIdx ) // dann hole aus diesem den Bereich @@ -438,7 +438,7 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, } else { - ASSERT( FALSE, "was ist es denn nun?" ); + ASSERT( sal_False, "was ist es denn nun?" ); } rDoc.DoUndo( bUndo ); @@ -449,21 +449,21 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, // Point liegt dann vor dem manipuliertem Bereich !!) // Das Flag gibt an, ob noch vorm Point Inhalt steht. -BOOL SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam ) +sal_Bool SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam ) { rPam.SetMark(); if( rPam.Move( fnMoveBackward )) - return TRUE; + return sal_True; // gibt es nach vorne keinen Inhalt mehr, so setze den Point einfach // auf die vorherige Position (Node und Content, damit der Content // abgemeldet wird !!) rPam.GetPoint()->nNode--; rPam.GetPoint()->nContent.Assign( 0, 0 ); - return FALSE; + return sal_False; } -void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, BOOL bMvBkwrd ) +void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, sal_Bool bMvBkwrd ) { // gab es noch Inhalt vor der Position ? if( bMvBkwrd ) @@ -501,8 +501,8 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, SwDoc* pDoc = rMark.nNode.GetNode().GetDoc(); - BOOL bDoesUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bDoesUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); // 1. Fussnoten if( nsDelCntntType::DELCNT_FTN & nDelCntntType ) @@ -511,7 +511,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, if( rFtnArr.Count() ) { const SwNode* pFtnNd; - USHORT nPos; + sal_uInt16 nPos; rFtnArr.SeekEntry( pStt->nNode, &nPos ); SwTxtFtn* pSrch; @@ -574,14 +574,14 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, // 2. Flys if( nsDelCntntType::DELCNT_FLY & nDelCntntType ) { - USHORT nChainInsPos = pHistory ? pHistory->Count() : 0; + sal_uInt16 nChainInsPos = pHistory ? pHistory->Count() : 0; const SwSpzFrmFmts& rSpzArr = *pDoc->GetSpzFrmFmts(); if( rSpzArr.Count() ) { - const BOOL bDelFwrd = rMark.nNode.GetIndex() <= rPoint.nNode.GetIndex(); + const sal_Bool bDelFwrd = rMark.nNode.GetIndex() <= rPoint.nNode.GetIndex(); SwFlyFrmFmt* pFmt; const SwFmtAnchor* pAnchor; - USHORT n = rSpzArr.Count(); + sal_uInt16 n = rSpzArr.Count(); const SwPosition* pAPos; while( n && rSpzArr.Count() ) @@ -714,7 +714,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark, if( pMarkAccess->getMarksCount() ) { - for( USHORT n = 0; n < pMarkAccess->getMarksCount(); ++n ) + for( sal_uInt16 n = 0; n < pMarkAccess->getMarksCount(); ++n ) { // --> OD 2007-10-17 #i81002# bool bSavePos = false; @@ -853,7 +853,7 @@ void SwUndoSaveSection::SaveSection( SwDoc* , const SwNodeRange& rRange ) DelCntntIndex( *aPam.GetMark(), *aPam.GetPoint() ); pRedlSaveData = new SwRedlineSaveDatas; - if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, TRUE, TRUE )) + if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, sal_True, sal_True )) delete pRedlSaveData, pRedlSaveData = 0; nStartPos = rRange.aStart.GetIndex(); @@ -861,22 +861,22 @@ void SwUndoSaveSection::SaveSection( SwDoc* , const SwNodeRange& rRange ) aPam.GetPoint()->nNode--; aPam.GetMark()->nNode++; - SwCntntNode* pCNd = aPam.GetCntntNode( FALSE ); + SwCntntNode* pCNd = aPam.GetCntntNode( sal_False ); if( pCNd ) aPam.GetMark()->nContent.Assign( pCNd, 0 ); - if( 0 != ( pCNd = aPam.GetCntntNode( TRUE )) ) + if( 0 != ( pCNd = aPam.GetCntntNode( sal_True )) ) aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); // Positionen als SwIndex merken, damit im DTOR dieser Bereich // entfernt werden kann !! - ULONG nEnd; + sal_uLong nEnd; pMvStt = new SwNodeIndex( rRange.aStart ); MoveToUndoNds( aPam, pMvStt, 0, &nEnd, 0 ); nMvLen = nEnd - pMvStt->GetIndex() + 1; } void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, - USHORT nSectType ) + sal_uInt16 nSectType ) { if( ULONG_MAX != nStartPos ) // gab es ueberhaupt Inhalt ? { @@ -901,7 +901,7 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos if( ULONG_MAX != nStartPos ) // gab es ueberhaupt Inhalt ? { SwPosition aInsPos( rInsPos ); - ULONG nEnd = pMvStt->GetIndex() + nMvLen - 1; + sal_uLong nEnd = pMvStt->GetIndex() + nMvLen - 1; MoveFromUndoNds( *pDoc, pMvStt->GetIndex(), 0, aInsPos, &nEnd, 0 ); // Indizies wieder zerstoren, Inhalt ist aus dem UndoNodes-Array @@ -927,19 +927,19 @@ void SwUndoStart::Undo( SwUndoIter& rUndoIter ) { if( !( --rUndoIter.nEndCnt ) && rUndoIter.bWeiter && ( rUndoIter.GetId() ? ( rUndoIter.GetId() == nUserId || - ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : TRUE )) - rUndoIter.bWeiter = FALSE; + ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : sal_True )) + rUndoIter.bWeiter = sal_False; } void SwUndoStart::Redo( SwUndoIter& rUndoIter ) { - rUndoIter.bWeiter = TRUE; + rUndoIter.bWeiter = sal_True; ++rUndoIter.nEndCnt; } void SwUndoStart::Repeat( SwUndoIter& rUndoIter ) { - rUndoIter.bWeiter = FALSE; + rUndoIter.bWeiter = sal_False; } String SwUndoStart::GetComment() const @@ -986,7 +986,7 @@ SwUndoEnd::SwUndoEnd( SwUndoId nInitId ) void SwUndoEnd::Undo( SwUndoIter& rUndoIter ) { if( rUndoIter.GetId() == GetId() || !rUndoIter.GetId() ) - rUndoIter.bWeiter = TRUE; + rUndoIter.bWeiter = sal_True; if( rUndoIter.bWeiter ) ++rUndoIter.nEndCnt; } @@ -995,13 +995,13 @@ void SwUndoEnd::Redo( SwUndoIter& rUndoIter ) { if( !( --rUndoIter.nEndCnt ) && rUndoIter.bWeiter && ( rUndoIter.GetId() ? ( rUndoIter.GetId() == nUserId || - ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : TRUE )) - rUndoIter.bWeiter = FALSE; + ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : sal_True )) + rUndoIter.bWeiter = sal_False; } void SwUndoEnd::Repeat( SwUndoIter& rUndoIter ) { - rUndoIter.bWeiter = FALSE; + rUndoIter.bWeiter = sal_False; } String SwUndoEnd::GetComment() const @@ -1045,7 +1045,7 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos, const SwPosition& rSttPos, const SwPosition& rEndPos, SwRedline& rRedl, - BOOL bCopyNext ) + sal_Bool bCopyNext ) : SwUndRng( rRedl ), SwRedlineData( rRedl.GetRedlineData(), bCopyNext ) { @@ -1129,8 +1129,8 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam ) rDoc.SetRedlineMode_intern( eOld ); } -BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData, - BOOL bDelRange, BOOL bCopyNext ) +sal_Bool SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData, + sal_Bool bDelRange, sal_Bool bCopyNext ) { if( rSData.Count() ) rSData.DeleteAndDestroy( 0, rSData.Count() ); @@ -1138,7 +1138,7 @@ BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData, SwRedlineSaveData* pNewData; const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End(); const SwRedlineTbl& rTbl = rRange.GetDoc()->GetRedlineTbl(); - USHORT n = 0; + sal_uInt16 n = 0; rRange.GetDoc()->GetRedline( *pStt, &n ); for( ; n < rTbl.Count(); ++n ) { @@ -1159,7 +1159,7 @@ BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData, return 0 != rSData.Count(); } -BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData ) +sal_Bool SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData ) { if( rSData.Count() ) rSData.DeleteAndDestroy( 0, rSData.Count() ); @@ -1167,7 +1167,7 @@ BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData SwRedlineSaveData* pNewData; const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End(); const SwRedlineTbl& rTbl = rRange.GetDoc()->GetRedlineTbl(); - USHORT n = 0; + sal_uInt16 n = 0; rRange.GetDoc()->GetRedline( *pStt, &n ); for( ; n < rTbl.Count(); ++n ) { @@ -1181,7 +1181,7 @@ BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData POS_COLLIDE_END != eCmpPos && POS_COLLIDE_START != eCmpPos ) { pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, - *pRedl, TRUE ); + *pRedl, sal_True ); rSData.Insert( pNewData, rSData.Count() ); } @@ -1197,7 +1197,7 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData ) rDoc.SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); SwPaM aPam( rDoc.GetNodes().GetEndOfContent() ); - for( USHORT n = rSData.Count(); n; ) + for( sal_uInt16 n = rSData.Count(); n; ) rSData[ --n ]->RedlineToDoc( aPam ); // check redline count against count saved in RedlineSaveData object @@ -1208,23 +1208,23 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData ) rDoc.SetRedlineMode_intern( eOld ); } -BOOL SwUndo::HasHiddenRedlines( const SwRedlineSaveDatas& rSData ) +sal_Bool SwUndo::HasHiddenRedlines( const SwRedlineSaveDatas& rSData ) { - for( USHORT n = rSData.Count(); n; ) + for( sal_uInt16 n = rSData.Count(); n; ) if( rSData[ --n ]->GetMvSttIdx() ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } -BOOL SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr, - const SwRedlineSaveDatas& rCheck, BOOL bCurrIsEnd ) +sal_Bool SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr, + const SwRedlineSaveDatas& rCheck, sal_Bool bCurrIsEnd ) { - BOOL bRet = FALSE; - USHORT n; + sal_Bool bRet = sal_False; + sal_uInt16 n; if( rCurr.Count() == rCheck.Count() ) { - bRet = TRUE; + bRet = sal_True; for( n = 0; n < rCurr.Count(); ++n ) { const SwRedlineSaveData& rSet = *rCurr[ n ]; @@ -1235,7 +1235,7 @@ BOOL SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr, : rSet.nEndCntnt != rGet.nSttCntnt ) || !rGet.CanCombine( rSet ) ) { - bRet = FALSE; + bRet = sal_False; break; } } diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index a0ba635549ac..334c098ec087 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -65,7 +65,7 @@ SwUndoFlyBase::~SwUndoFlyBase() delete pFrmFmt; } -void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm ) +void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, sal_Bool bShowSelFrm ) { SwDoc* pDoc = &rUndoIter.GetDoc(); @@ -92,7 +92,7 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm ) if (FLY_AT_PAGE == nRndId) { - aAnchor.SetPageNum( (USHORT)nNdPgPos ); + aAnchor.SetPageNum( (sal_uInt16)nNdPgPos ); } else { @@ -157,12 +157,12 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm ) case FLY_AT_PAGE: break; } - bDelFmt = FALSE; + bDelFmt = sal_False; } void SwUndoFlyBase::DelFly( SwDoc* pDoc ) { - bDelFmt = TRUE; // im DTOR das Format loeschen + bDelFmt = sal_True; // im DTOR das Format loeschen pFrmFmt->DelFrms(); // Frms vernichten. // alle Uno-Objecte sollten sich jetzt abmelden @@ -194,7 +194,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); const SwPosition* pPos = rAnchor.GetCntntAnchor(); // die Positionen im Nodes-Array haben sich verschoben - nRndId = static_cast<USHORT>(rAnchor.GetAnchorId()); + nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId()); if (FLY_AS_CHAR == nRndId) { nNdPgPos = pPos->nNode.GetIndex(); @@ -236,14 +236,14 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) // ----- Undo-InsertFly ------ -SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx ) +SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx ) : SwUndoFlyBase( pFormat, RES_DRAWFRMFMT == pFormat->Which() ? UNDO_INSDRAWFMT : UNDO_INSLAYFMT ), mnCrsrSaveIndexPara( nNodeIdx ), mnCrsrSaveIndexPos( nCntIdx ) { const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - nRndId = static_cast<USHORT>(rAnchor.GetAnchorId()); - bDelFmt = FALSE; + nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId()); + bDelFmt = sal_False; switch( nRndId ) { case FLY_AT_PAGE: @@ -262,7 +262,7 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen } break; default: - ASSERT( FALSE, "Was denn fuer ein FlyFrame?" ); + ASSERT( sal_False, "Was denn fuer ein FlyFrame?" ); } } @@ -285,7 +285,7 @@ void SwUndoInsLayFmt::Undo( SwUndoIter& rUndoIter ) SwNodeIndex aEndIdx( rUndoIter.GetDoc().GetNodes(), aIdx.GetNode().EndOfSectionIndex() ); SwIndex aIndex( pNode, mnCrsrSaveIndexPos ); SwPosition aPos( *pNode, aIndex ); - rUndoIter.GetDoc().CorrAbs( aIdx, aEndIdx, aPos, TRUE ); + rUndoIter.GetDoc().CorrAbs( aIdx, aEndIdx, aPos, sal_True ); bRemoveIdx = false; } } @@ -342,7 +342,7 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter ) rUndoIter.pAktPam )); } else { - ASSERT( FALSE, "was fuer ein Anker ist es denn nun?" ); + ASSERT( sal_False, "was fuer ein Anker ist es denn nun?" ); } SwFrmFmt* pFlyFmt = pDoc->CopyLayoutFmt( *pFrmFmt, aAnchor, true, true ); @@ -386,7 +386,7 @@ String SwUndoInsLayFmt::GetComment() const // ----- Undo-DeleteFly ------ SwUndoDelLayFmt::SwUndoDelLayFmt( SwFrmFmt* pFormat ) - : SwUndoFlyBase( pFormat, UNDO_DELLAYFMT ), bShowSelFrm( TRUE ) + : SwUndoFlyBase( pFormat, UNDO_DELLAYFMT ), bShowSelFrm( sal_True ) { SwDoc* pDoc = pFormat->GetDoc(); DelFly( pDoc ); @@ -466,7 +466,7 @@ SwUndoSetFlyFmt::SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt ) rFlyFmt.GetAttrSet().GetRanges() )), nOldNode( 0 ), nNewNode( 0 ), nOldCntnt( 0 ), nNewCntnt( 0 ), - nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( FALSE ) + nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( sal_False ) { } @@ -487,7 +487,7 @@ SwUndoSetFlyFmt::~SwUndoSetFlyFmt() } void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor, - ULONG nNode, xub_StrLen nCntnt ) + sal_uLong nNode, xub_StrLen nCntnt ) { RndStdIds nAnchorTyp = rAnchor.GetAnchorId(); if (FLY_AT_PAGE != nAnchorTyp) @@ -630,7 +630,7 @@ void SwUndoSetFlyFmt::Redo( SwUndoIter& rIter ) } } -void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem ) +void SwUndoSetFlyFmt::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem ) { if( pItem && pItem != GetDfltAttr( nWhich ) ) { @@ -640,10 +640,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem ) // nur den 1. Ankerwechsel vermerken ASSERT( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" ); - bAnchorChgd = TRUE; + bAnchorChgd = sal_True; const SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem; - switch( nOldAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) ) + switch( nOldAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) ) { case FLY_AS_CHAR: case FLY_AT_CHAR: @@ -658,7 +658,7 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem ) } pAnchor = (SwFmtAnchor*)&pFrmFmt->GetAnchor(); - switch( nNewAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) ) + switch( nNewAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) ) { case FLY_AS_CHAR: case FLY_AT_CHAR: @@ -683,7 +683,7 @@ void SwUndoSetFlyFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* ) { if( pOld ) { - USHORT nWhich = pOld->Which(); + sal_uInt16 nWhich = pOld->Which(); if( nWhich < POOLATTR_END ) PutAttr( nWhich, pOld ); diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx index 980496cfd518..38a2baf020db 100644 --- a/sw/source/core/undo/undraw.cxx +++ b/sw/source/core/undo/undraw.cxx @@ -57,7 +57,7 @@ struct SwUndoGroupObjImpl { SwDrawFrmFmt* pFmt; SdrObject* pObj; - ULONG nNodeIdx; + sal_uLong nNodeIdx; // OD 2004-04-15 #i26791# - keeping the anchor and the relative position // of drawing objects no longer needed @@ -71,7 +71,7 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); } IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo ) { #if OSL_DEBUG_LEVEL > 1 - USHORT nId = pUndo->GetId(); + sal_uInt16 nId = pUndo->GetId(); (void)nId; String sComment( pUndo->GetComment() ); #endif @@ -131,7 +131,7 @@ void lcl_SendRemoveToUno( SwFmt& rFmt ) rFmt.Modify( &aMsgHint, &aMsgHint ); } -void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) +void lcl_SaveAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos ) { const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || @@ -169,7 +169,7 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) } } -void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) +void lcl_RestoreAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos ) { const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || @@ -202,8 +202,8 @@ void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos ) } } -SwUndoDrawGroup::SwUndoDrawGroup( USHORT nCnt ) - : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( TRUE ) +SwUndoDrawGroup::SwUndoDrawGroup( sal_uInt16 nCnt ) + : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( sal_True ) { pObjArr = new SwUndoGroupObjImpl[ nSize ]; } @@ -213,7 +213,7 @@ SwUndoDrawGroup::~SwUndoDrawGroup() if( bDelFmt ) { SwUndoGroupObjImpl* pTmp = pObjArr + 1; - for( USHORT n = 1; n < nSize; ++n, ++pTmp ) + for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp ) delete pTmp->pFmt; } else @@ -224,7 +224,7 @@ SwUndoDrawGroup::~SwUndoDrawGroup() void SwUndoDrawGroup::Undo( SwUndoIter& ) { - bDelFmt = FALSE; + bDelFmt = sal_False; // das Group-Object sichern SwDrawFrmFmt* pFmt = pObjArr->pFmt; @@ -246,7 +246,7 @@ void SwUndoDrawGroup::Undo( SwUndoIter& ) SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts(); rFlyFmts.Remove( rFlyFmts.GetPos( pFmt )); - for( USHORT n = 1; n < nSize; ++n ) + for( sal_uInt16 n = 1; n < nSize; ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); @@ -275,14 +275,14 @@ void SwUndoDrawGroup::Undo( SwUndoIter& ) void SwUndoDrawGroup::Redo( SwUndoIter& ) { - bDelFmt = TRUE; + bDelFmt = sal_True; // aus dem Array austragen SwDoc* pDoc = pObjArr->pFmt->GetDoc(); SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts(); SdrObject* pObj; - for( USHORT n = 1; n < nSize; ++n ) + for( sal_uInt16 n = 1; n < nSize; ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); @@ -323,7 +323,7 @@ void SwUndoDrawGroup::Redo( SwUndoIter& ) // <-- } -void SwUndoDrawGroup::AddObj( USHORT nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj ) +void SwUndoDrawGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj ) { SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 ); rSave.pObj = pObj; @@ -348,9 +348,9 @@ void SwUndoDrawGroup::SetGroupFmt( SwDrawFrmFmt* pFmt ) // ------------------------------ SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj ) - : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( FALSE ) + : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( sal_False ) { - nSize = (USHORT)pObj->GetSubList()->GetObjCount() + 1; + nSize = (sal_uInt16)pObj->GetSubList()->GetObjCount() + 1; pObjArr = new SwUndoGroupObjImpl[ nSize ]; SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj); @@ -378,7 +378,7 @@ SwUndoDrawUnGroup::~SwUndoDrawUnGroup() if( bDelFmt ) { SwUndoGroupObjImpl* pTmp = pObjArr + 1; - for( USHORT n = 1; n < nSize; ++n, ++pTmp ) + for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp ) delete pTmp->pFmt; } else @@ -389,13 +389,13 @@ SwUndoDrawUnGroup::~SwUndoDrawUnGroup() void SwUndoDrawUnGroup::Undo( SwUndoIter& rIter ) { - bDelFmt = TRUE; + bDelFmt = sal_True; // aus dem Array austragen SwDoc* pDoc = &rIter.GetDoc(); SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts(); - for( USHORT n = 1; n < nSize; ++n ) + for( sal_uInt16 n = 1; n < nSize; ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); @@ -441,7 +441,7 @@ void SwUndoDrawUnGroup::Undo( SwUndoIter& rIter ) void SwUndoDrawUnGroup::Redo( SwUndoIter& ) { - bDelFmt = FALSE; + bDelFmt = sal_False; // das Group-Object sichern SwDrawFrmFmt* pFmt = pObjArr->pFmt; @@ -462,7 +462,7 @@ void SwUndoDrawUnGroup::Redo( SwUndoIter& ) SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts(); rFlyFmts.Remove( rFlyFmts.GetPos( pFmt )); - for( USHORT n = 1; n < nSize; ++n ) + for( sal_uInt16 n = 1; n < nSize; ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); @@ -491,7 +491,7 @@ void SwUndoDrawUnGroup::Redo( SwUndoIter& ) } } -void SwUndoDrawUnGroup::AddObj( USHORT nPos, SwDrawFrmFmt* pFmt ) +void SwUndoDrawUnGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt ) { SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 ); rSave.pFmt = pFmt; @@ -551,8 +551,8 @@ void SwUndoDrawUnGroupConnectToLayout::AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt, //------------------------------------- -SwUndoDrawDelete::SwUndoDrawDelete( USHORT nCnt ) - : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( TRUE ) +SwUndoDrawDelete::SwUndoDrawDelete( sal_uInt16 nCnt ) + : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( sal_True ) { pObjArr = new SwUndoGroupObjImpl[ nSize ]; pMarkLst = new SdrMarkList(); @@ -563,7 +563,7 @@ SwUndoDrawDelete::~SwUndoDrawDelete() if( bDelFmt ) { SwUndoGroupObjImpl* pTmp = pObjArr; - for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp ) + for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp ) delete pTmp->pFmt; } delete [] pObjArr; @@ -572,9 +572,9 @@ SwUndoDrawDelete::~SwUndoDrawDelete() void SwUndoDrawDelete::Undo( SwUndoIter &rIter ) { - bDelFmt = FALSE; + bDelFmt = sal_False; SwSpzFrmFmts& rFlyFmts = *rIter.GetDoc().GetSpzFrmFmts(); - for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n ) + for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); ::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx ); @@ -601,9 +601,9 @@ void SwUndoDrawDelete::Undo( SwUndoIter &rIter ) void SwUndoDrawDelete::Redo( SwUndoIter &rIter ) { - bDelFmt = TRUE; + bDelFmt = sal_True; SwSpzFrmFmts& rFlyFmts = *rIter.GetDoc().GetSpzFrmFmts(); - for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n ) + for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); SdrObject *pObj = rSave.pObj; @@ -621,7 +621,7 @@ void SwUndoDrawDelete::Redo( SwUndoIter &rIter ) } } -void SwUndoDrawDelete::AddObj( USHORT , SwDrawFrmFmt* pFmt, +void SwUndoDrawDelete::AddObj( sal_uInt16 , SwDrawFrmFmt* pFmt, const SdrMark& rMark ) { SwUndoGroupObjImpl& rSave = *( pObjArr + pMarkLst->GetMarkCount() ); diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx index e67ec2e9d8c2..e761a1a32bd6 100644 --- a/sw/source/core/undo/unfmco.cxx +++ b/sw/source/core/undo/unfmco.cxx @@ -101,7 +101,7 @@ void SwUndoFmtColl::Repeat( SwUndoIter& rUndoIter ) // es kann nur eine TextFmtColl auf einen Bereich angewendet werden, // also erfrage auch nur in dem Array - USHORT nPos = rUndoIter.GetDoc().GetTxtFmtColls()->GetPos( + sal_uInt16 nPos = rUndoIter.GetDoc().GetTxtFmtColls()->GetPos( (SwTxtFmtColl*)pFmtColl ); // ist das Format ueberhaupt noch vorhanden? if( USHRT_MAX != nPos ) diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index dd95d06a34b1..f11a2dc3d76d 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -64,16 +64,16 @@ using namespace ::com::sun::star; class _UnReplaceData : private SwUndoSaveCntnt { String m_sOld, m_sIns; - ULONG m_nSttNd, m_nEndNd, m_nOffset; + sal_uLong m_nSttNd, m_nEndNd, m_nOffset; xub_StrLen m_nSttCnt, m_nEndCnt, m_nSetPos, m_nSelEnd; - BOOL m_bSplitNext : 1; - BOOL m_bRegExp : 1; + sal_Bool m_bSplitNext : 1; + sal_Bool m_bRegExp : 1; // metadata references for paragraph and following para (if m_bSplitNext) ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart; ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd; public: - _UnReplaceData( const SwPaM& rPam, const String& rIns, BOOL bRegExp ); + _UnReplaceData( const SwPaM& rPam, const String& rIns, sal_Bool bRegExp ); ~_UnReplaceData(); void Undo( SwUndoIter& rIter ); @@ -141,10 +141,10 @@ void SwUndoInsert::Init(const SwNodeIndex & rNd) SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, xub_StrLen nCnt, xub_StrLen nL, const IDocumentContentOperations::InsertFlags nInsertFlags, - BOOL bWDelim ) + sal_Bool bWDelim ) : SwUndo(UNDO_TYPING), pPos( 0 ), pTxt( 0 ), pRedlData( 0 ), nNode( rNd.GetIndex() ), nCntnt(nCnt), nLen(nL), - bIsWordDelim( bWDelim ), bIsAppend( FALSE ) + bIsWordDelim( bWDelim ), bIsAppend( sal_False ) , m_nInsertFlags(nInsertFlags) { Init(rNd); @@ -154,7 +154,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, xub_StrLen nCnt, SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) : SwUndo(UNDO_SPLITNODE), pPos( 0 ), pTxt( 0 ), pRedlData( 0 ), nNode( rNd.GetIndex() ), nCntnt(0), nLen(1), - bIsWordDelim( FALSE ), bIsAppend( TRUE ) + bIsWordDelim( sal_False ), bIsAppend( sal_True ) , m_nInsertFlags(IDocumentContentOperations::INS_EMPTYEXPAND) { Init(rNd); @@ -164,7 +164,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) // werden kann. Wenn ja, dann aender die Laenge und die InsPos. // Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt. -BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns ) +sal_Bool SwUndoInsert::CanGrouping( sal_Unicode cIns ) { if( !bIsAppend && bIsWordDelim == !GetAppCharClass().isLetterNumeric( String( cIns )) ) @@ -175,14 +175,14 @@ BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns ) if (pUndoTxt) pUndoTxt->Insert(cIns); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos ) +sal_Bool SwUndoInsert::CanGrouping( const SwPosition& rPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( nNode == rPos.nNode.GetIndex() && nCntnt == rPos.nContent.GetIndex() ) { @@ -191,7 +191,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos ) if( ( ~nsRedlineMode_t::REDLINE_SHOW_MASK & rDoc.GetRedlineMode() ) == ( ~nsRedlineMode_t::REDLINE_SHOW_MASK & GetRedlineMode() ) ) { - bRet = TRUE; + bRet = sal_True; // dann war oder ist noch Redline an: // pruefe, ob an der InsPosition ein anderer Redline @@ -203,7 +203,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos ) SwRedlineData aRData( nsRedlineType_t::REDLINE_INSERT, rDoc.GetRedlineAuthor() ); const SwIndexReg* pIReg = rPos.nContent.GetIdxReg(); SwIndex* pIdx; - for( USHORT i = 0; i < rTbl.Count(); ++i ) + for( sal_uInt16 i = 0; i < rTbl.Count(); ++i ) { SwRedline* pRedl = rTbl[ i ]; if( pIReg == (pIdx = &pRedl->End()->nContent)->GetIdxReg() && @@ -212,7 +212,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos ) if( !pRedl->HasMark() || !pRedlData || *pRedl != *pRedlData || *pRedl != aRData ) { - bRet = FALSE; + bRet = sal_False; break; } } @@ -271,7 +271,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter ) } else { - ULONG nNd = nNode; + sal_uLong nNd = nNode; xub_StrLen nCnt = nCntnt; if( nLen ) { @@ -287,7 +287,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter ) aPaM.GetPoint()->nContent -= nLen; if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) pTmpDoc->DeleteRedline( aPaM, true, USHRT_MAX ); - RemoveIdxFromRange( aPaM, FALSE ); + RemoveIdxFromRange( aPaM, sal_False ); pTxt = new String( pTxtNode->GetTxt().Copy(nCntnt-nLen, nLen) ); pTxtNode->EraseText( aPaM.GetPoint()->nContent, nLen ); } @@ -296,7 +296,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter ) aPaM.Move(fnMoveBackward); if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) pTmpDoc->DeleteRedline( aPaM, true, USHRT_MAX ); - RemoveIdxFromRange( aPaM, FALSE ); + RemoveIdxFromRange( aPaM, sal_False ); } nNd = aPaM.GetPoint()->nNode.GetIndex(); @@ -361,7 +361,7 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter ) if( nLen ) { - BOOL bMvBkwrd = MovePtBackward( *pPam ); + sal_Bool bMvBkwrd = MovePtBackward( *pPam ); if( pTxt ) { @@ -374,7 +374,7 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter ) else { // Inhalt wieder einfuegen. (erst pPos abmelden !!) - ULONG nMvNd = pPos->nNode.GetIndex(); + sal_uLong nMvNd = pPos->nNode.GetIndex(); xub_StrLen nMvCnt = pPos->nContent.GetIndex(); DELETEZ( pPos ); MoveFromUndoNds( *pTmpDoc, nMvNd, nMvCnt, *pPam->GetMark() ); @@ -430,8 +430,8 @@ void SwUndoInsert::Repeat( SwUndoIter& rUndoIter ) else { String aTxt( ((SwTxtNode*)pCNd)->GetTxt() ); - BOOL bGroupUndo = rDoc.DoesGroupUndo(); - rDoc.DoGroupUndo( FALSE ); + sal_Bool bGroupUndo = rDoc.DoesGroupUndo(); + rDoc.DoGroupUndo( sal_False ); rDoc.InsertString( *rUndoIter.pAktPam, aTxt.Copy( nCntnt - nLen, nLen ) ); rDoc.DoGroupUndo( bGroupUndo ); @@ -524,7 +524,7 @@ void SwUndoReplace::Undo( SwUndoIter& rUndoIter ) nAktPos = aArr.Count(); rUndoIter.pLastUndoObj = this; bOldIterFlag = rUndoIter.bWeiter; - rUndoIter.bWeiter = TRUE; + rUndoIter.bWeiter = sal_True; } aArr[ --nAktPos ]->Undo( rUndoIter ); @@ -543,7 +543,7 @@ void SwUndoReplace::Redo( SwUndoIter& rUndoIter ) ASSERT( !nAktPos, "Redo ohne vorheriges Undo??" ); rUndoIter.pLastUndoObj = this; bOldIterFlag = rUndoIter.bWeiter; - rUndoIter.bWeiter = TRUE; + rUndoIter.bWeiter = sal_True; } aArr[ nAktPos ]->Redo( rUndoIter ); @@ -603,7 +603,7 @@ SwRewriter SwUndoReplace::GetRewriter() const } void SwUndoReplace::AddEntry( const SwPaM& rPam, const String& rInsert, - BOOL bRegExp ) + sal_Bool bRegExp ) { _UnReplaceData* pNew = new _UnReplaceData( rPam, rInsert, bRegExp ); aArr.C40_INSERT(_UnReplaceData, pNew, aArr.Count() ); @@ -616,7 +616,7 @@ void SwUndoReplace::SetEntryEnd( const SwPaM& rPam ) } _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns, - BOOL bRgExp ) + sal_Bool bRgExp ) : m_sIns( rIns ), m_nOffset( 0 ) { m_bRegExp = bRgExp; @@ -638,7 +638,7 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns, m_nSetPos = pHistory->Count(); - ULONG nNewPos = pStt->nNode.GetIndex(); + sal_uLong nNewPos = pStt->nNode.GetIndex(); m_nOffset = m_nSttNd - nNewPos; if ( pNd->GetpSwpHints() ) @@ -654,7 +654,7 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns, pHistory->Add( pNd->GetTxtColl(), nNewPos, ND_TEXTNODE ); SwTxtNode* pNext = pEnd->nNode.GetNode().GetTxtNode(); - ULONG nTmp = pNext->GetIndex(); + sal_uLong nTmp = pNext->GetIndex(); pHistory->CopyAttr( pNext->GetpSwpHints(), nTmp, 0, pNext->GetTxt().Len(), true ); if( pNext->HasSwAttrSet() ) @@ -765,8 +765,8 @@ void _UnReplaceData::Undo( SwUndoIter& rIter ) void _UnReplaceData::Redo( SwUndoIter& rIter ) { SwDoc& rDoc = rIter.GetDoc(); - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); SwPaM& rPam = *rIter.pAktPam; rPam.DeleteMark(); @@ -849,18 +849,18 @@ void SwUndoReRead::SetAndSave( SwUndoIter& rIter ) Graphic* pOldGrf = pGrf; String* pOldNm = pNm; String* pOldFltr = pFltr; - USHORT nOldMirr = nMirr; + sal_uInt16 nOldMirr = nMirr; SaveGraphicData( *pGrfNd ); if( pOldNm ) { - pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, TRUE ); + pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, sal_True ); delete pOldNm; delete pOldFltr; } else { - pGrfNd->ReRead( aEmptyStr, aEmptyStr, pOldGrf, 0, TRUE ); + pGrfNd->ReRead( aEmptyStr, aEmptyStr, pOldGrf, 0, sal_True ); delete pOldGrf; } @@ -894,7 +894,7 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd ) } else { - ((SwGrfNode&)rGrfNd).SwapIn( TRUE ); + ((SwGrfNode&)rGrfNd).SwapIn( sal_True ); pGrf = new Graphic( rGrfNd.GetGrf() ); pNm = pFltr = 0; } @@ -907,10 +907,10 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp, const String &rTxt, const String& rSeparator, const String& rNumberSeparator, - const BOOL bBef, - const USHORT nInitId, + const sal_Bool bBef, + const sal_uInt16 nInitId, const String& rCharacterStyle, - const BOOL bCpyBorder ) + const sal_Bool bCpyBorder ) : SwUndo( UNDO_INSERTLABEL ), sText( rTxt ), sSeparator( rSeparator ), @@ -922,7 +922,7 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp, bBefore( bBef ), bCpyBrd( bCpyBorder ) { - bUndoKeep = FALSE; + bUndoKeep = sal_False; OBJECT.pUndoFly = 0; OBJECT.pUndoAttr = 0; } @@ -973,7 +973,7 @@ void SwUndoInsertLabel::Undo( SwUndoIter& rIter ) aPam.GetPoint()->nNode = NODE.nNode; aPam.SetMark(); aPam.GetPoint()->nNode = NODE.nNode + 1; - NODE.pUndoInsNd = new SwUndoDelete( aPam, TRUE ); + NODE.pUndoInsNd = new SwUndoDelete( aPam, sal_True ); } } @@ -1012,7 +1012,7 @@ void SwUndoInsertLabel::Redo( SwUndoIter& rIter ) SwTableNode *pNd = rDoc.GetNodes()[ rDoc.GetNodes()[NODE.nNode-1]->StartOfSectionIndex()]->GetTableNode(); if ( pNd ) - pNd->GetTable().GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem(TRUE, RES_KEEP) ); + pNd->GetTable().GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem(sal_True, RES_KEEP) ); } NODE.pUndoInsNd->Undo( rIter ); delete NODE.pUndoInsNd, NODE.pUndoInsNd = 0; @@ -1024,7 +1024,7 @@ void SwUndoInsertLabel::Repeat( SwUndoIter& rIter ) SwDoc& rDoc = rIter.GetDoc(); const SwPosition& rPos = *rIter.pAktPam->GetPoint(); - ULONG nIdx = 0; + sal_uLong nIdx = 0; SwCntntNode* pCNd = rPos.nNode.GetNode().GetCntntNode(); if( pCNd ) @@ -1090,7 +1090,7 @@ void SwUndoInsertLabel::SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, } } -void SwUndoInsertLabel::SetDrawObj( BYTE nLId ) +void SwUndoInsertLabel::SetDrawObj( sal_uInt8 nLId ) { if( LTYPE_DRAW == eType ) { diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index 4c5fbca4085c..364f75c5a745 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -47,7 +47,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos ) nMvDestCntnt( rMvPos.nContent.GetIndex() ), bMoveRedlines( false ) { - bMoveRange = bJoinNext = bJoinPrev = FALSE; + bMoveRange = bJoinNext = bJoinPrev = sal_False; // StartNode vorm loeschen von Fussnoten besorgen! SwDoc* pDoc = rRange.GetDoc(); @@ -106,8 +106,8 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg, nMvDestNode( rMvPos.GetIndex() ), bMoveRedlines( false ) { - bMoveRange = TRUE; - bJoinNext = bJoinPrev = FALSE; + bMoveRange = sal_True; + bJoinNext = bJoinPrev = sal_False; nSttCntnt = nEndCntnt = nMvDestCntnt = STRING_MAXLEN; @@ -117,7 +117,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg, // DelFtn( rRange ); // wird aus dem CntntBereich in den Sonderbereich verschoben ? - ULONG nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex(); + sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex(); if( nMvDestNode < nCntntStt && rRg.aStart.GetIndex() > nCntntStt ) { // loesche alle Fussnoten. Diese sind dort nicht erwuenscht. @@ -142,7 +142,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg, void SwUndoMove::SetDestRange( const SwPaM& rRange, const SwPosition& rInsPos, - BOOL bJoin, BOOL bCorrPam ) + sal_Bool bJoin, sal_Bool bCorrPam ) { const SwPosition *pStt = rRange.Start(), *pEnd = rRange.GetPoint() == pStt @@ -190,8 +190,8 @@ void SwUndoMove::SetDestRange( const SwNodeIndex& rStt, void SwUndoMove::Undo( SwUndoIter& rUndoIter ) { SwDoc* pDoc = &rUndoIter.GetDoc(); - BOOL bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); // Block, damit aus diesem gesprungen werden kann do { @@ -217,7 +217,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter ) // #i17764# if redlines are to be moved, we may not remove them before // pDoc->Move gets a chance to handle them if( ! bMoveRedlines ) - RemoveIdxFromRange( aPam, FALSE ); + RemoveIdxFromRange( aPam, sal_False ); SwPosition aPos( *pDoc->GetNodes()[ nInsPosNode] ); SwCntntNode* pCNd = aPos.nNode.GetNode().GetCntntNode(); @@ -238,7 +238,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter ) aPam.Exchange(); aPam.DeleteMark(); -// pDoc->ResetAttr( aPam, FALSE ); +// pDoc->ResetAttr( aPam, sal_False ); if( aPam.GetNode()->IsCntntNode() ) aPam.GetNode()->GetCntntNode()->ResetAllAttr(); // der Pam wird jetzt aufgegeben. @@ -266,7 +266,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter ) pTxtNd->JoinNext(); } - } while( FALSE ); + } while( sal_False ); if( pHistory ) { @@ -308,10 +308,10 @@ void SwUndoMove::Redo( SwUndoIter& rUndoIter ) nMvDestCntnt )); DelFtn( aPam ); - RemoveIdxFromRange( aPam, FALSE ); + RemoveIdxFromRange( aPam, sal_False ); aIdx = aPam.Start()->nNode; - BOOL bJoinTxt = aIdx.GetNode().IsTxtNode(); + sal_Bool bJoinTxt = aIdx.GetNode().IsTxtNode(); aIdx--; rDoc.MoveRange( aPam, aMvPos, @@ -341,7 +341,7 @@ void SwUndoMove::DelFtn( const SwPaM& rRange ) { // wird aus dem CntntBereich in den Sonderbereich verschoben ? SwDoc* pDoc = rRange.GetDoc(); - ULONG nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex(); + sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex(); if( nMvDestNode < nCntntStt && rRange.GetPoint()->nNode.GetIndex() >= nCntntStt ) { diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index 8cf782e85b53..f6706bbc4666 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -93,8 +93,8 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter ) if( nSttNode ) SetPaM( rUndoIter ); - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); if( pOldNumRule ) rDoc.ChgNumRuleFmts( *pOldNumRule ); @@ -104,7 +104,7 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter ) SwTxtNode* pNd; if( ULONG_MAX != nSttSet && 0 != ( pNd = rDoc.GetNodes()[ nSttSet ]->GetTxtNode() )) - pNd->SetListRestart( TRUE ); + pNd->SetListRestart( sal_True ); else pNd = 0; @@ -202,7 +202,7 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld ) SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam ) : SwUndo( UNDO_DELNUM ), SwUndRng( rPam ), - aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )) + aNodeIdx( sal_uInt8( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )) { pHistory = new SwHistory; } @@ -219,13 +219,13 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter ) SwDoc& rDoc = rUndoIter.GetDoc(); SetPaM( rUndoIter ); - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); pHistory->TmpRollback( &rDoc, 0 ); pHistory->SetTmpEnd( pHistory->Count() ); - for( USHORT n = 0; n < aNodeIdx.Count(); ++n ) + for( sal_uInt16 n = 0; n < aNodeIdx.Count(); ++n ) { SwTxtNode* pNd = rDoc.GetNodes()[ aNodeIdx[ n ] ]->GetTxtNode(); ASSERT( pNd, "Where is TextNode gone?" ); @@ -253,14 +253,14 @@ void SwUndoDelNum::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().DelNumRules( *rUndoIter.pAktPam ); } -void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL ) +void SwUndoDelNum::AddNode( const SwTxtNode& rNd, sal_Bool ) { if( rNd.GetNumRule() ) { - USHORT nIns = aNodeIdx.Count(); + sal_uInt16 nIns = aNodeIdx.Count(); aNodeIdx.Insert( rNd.GetIndex(), nIns ); - aLevels.insert( aLevels.begin() + nIns, static_cast<BYTE>(rNd.GetActualListLevel()) ); + aLevels.insert( aLevels.begin() + nIns, static_cast<sal_uInt8>(rNd.GetActualListLevel()) ); } } @@ -268,7 +268,7 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL ) /* */ -SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv ) +SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, sal_Bool bIsOutlMv ) : SwUndo( bIsOutlMv ? UNDO_OUTLINE_UD : UNDO_MOVENUM ), SwUndRng( rPam ), nNewStt( 0 ), nOffset( nOff ) @@ -280,7 +280,7 @@ SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv ) void SwUndoMoveNum::Undo( SwUndoIter& rUndoIter ) { - ULONG nTmpStt = nSttNode, nTmpEnd = nEndNode; + sal_uLong nTmpStt = nSttNode, nTmpEnd = nEndNode; if( nEndNode || USHRT_MAX != nEndCntnt ) // Bereich ? { @@ -293,7 +293,7 @@ void SwUndoMoveNum::Undo( SwUndoIter& rUndoIter ) //JP 22.06.95: wird wollen die Bookmarks/Verzeichnisse behalten, oder? // SetPaM( rUndoIter ); -// RemoveIdxFromRange( *rUndoIter.pAktPam, TRUE ); +// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True ); SetPaM( rUndoIter ); rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, -nOffset, @@ -307,7 +307,7 @@ void SwUndoMoveNum::Redo( SwUndoIter& rUndoIter ) { //JP 22.06.95: wird wollen die Bookmarks/Verzeichnisse behalten, oder? // SetPaM( rUndoIter ); -// RemoveIdxFromRange( *rUndoIter.pAktPam, TRUE ); +// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True ); SetPaM( rUndoIter ); rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, @@ -321,7 +321,7 @@ void SwUndoMoveNum::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().MoveOutlinePara( *rUndoIter.pAktPam, 0 < nOffset ? 1 : -1 ); else - rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, FALSE ); + rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, sal_False ); } /* */ @@ -358,8 +358,8 @@ void SwUndoNumUpDown::Repeat( SwUndoIter& rUndoIter ) /* */ // #115901# -SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bOldNum, - BOOL bNewNum) +SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bOldNum, + sal_Bool bNewNum) : SwUndo( UNDO_NUMORNONUM ), nIdx( rIdx.GetIndex() ), mbNewNum(bNewNum), mbOldNum(bOldNum) { @@ -395,25 +395,25 @@ void SwUndoNumOrNoNum::Repeat( SwUndoIter& rUndoIter ) if (mbOldNum && ! mbNewNum) rUndoIter.GetDoc().NumOrNoNum( rUndoIter.pAktPam->GetPoint()->nNode, - FALSE); + sal_False); else if ( ! mbOldNum && mbNewNum ) rUndoIter.GetDoc().NumOrNoNum( rUndoIter.pAktPam->GetPoint()->nNode, - TRUE); + sal_True); } /* */ -SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, BOOL bFlg ) +SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bFlg ) : SwUndo( UNDO_SETNUMRULESTART ), nIdx( rPos.nNode.GetIndex() ), nOldStt( USHRT_MAX ), - nNewStt( USHRT_MAX ), bSetSttValue( FALSE ), bFlag( bFlg ) + nNewStt( USHRT_MAX ), bSetSttValue( sal_False ), bFlag( bFlg ) { } -SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt ) +SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt ) : SwUndo( UNDO_SETNUMRULESTART ), nIdx( rPos.nNode.GetIndex() ), - nOldStt( USHRT_MAX ), nNewStt( nStt ), bSetSttValue( TRUE ) + nOldStt( USHRT_MAX ), nNewStt( nStt ), bSetSttValue( sal_True ) { SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode(); if ( pTxtNd ) @@ -421,7 +421,7 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt ) // --> OD 2008-02-28 #refactorlists# if ( pTxtNd->HasAttrListRestartValue() ) { - nOldStt = static_cast<USHORT>(pTxtNd->GetAttrListRestartValue()); + nOldStt = static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue()); } else { diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 91549c84a57e..f14ac8b756e8 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -68,14 +68,14 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); } SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, sal_Unicode cIns ) : SwUndo(UNDO_OVERWRITE), - pRedlSaveData( 0 ), bGroup( FALSE ) + pRedlSaveData( 0 ), bGroup( sal_False ) { if( !pDoc->IsIgnoreRedline() && pDoc->GetRedlineTbl().Count() ) { SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(), rPos.nNode, rPos.nContent.GetIndex()+1 ); pRedlSaveData = new SwRedlineSaveDatas; - if( !FillSaveData( aPam, *pRedlSaveData, FALSE )) + if( !FillSaveData( aPam, *pRedlSaveData, sal_False )) delete pRedlSaveData, pRedlSaveData = 0; } @@ -85,7 +85,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode(); ASSERT( pTxtNd, "Overwrite nicht im TextNode?" ); - bInsChar = TRUE; + bInsChar = sal_True; xub_StrLen nTxtNdLen = pTxtNd->GetTxt().Len(); if( nSttCntnt < nTxtNdLen ) // kein reines Einfuegen ? { @@ -96,11 +96,11 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, pHistory->CopyAttr( pTxtNd->GetpSwpHints(), nSttNode, 0, nTxtNdLen, false ); rPos.nContent++; - bInsChar = FALSE; + bInsChar = sal_False; } - BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); - pTxtNd->SetIgnoreDontExpand( TRUE ); + sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); + pTxtNd->SetIgnoreDontExpand( sal_True ); pTxtNd->InsertText( cIns, rPos.nContent, IDocumentContentOperations::INS_EMPTYEXPAND ); @@ -121,7 +121,7 @@ SwUndoOverwrite::~SwUndoOverwrite() delete pRedlSaveData; } -BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, +sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, sal_Unicode cIns ) { /// ?? was ist mit nur eingefuegten Charaktern ??? @@ -129,14 +129,14 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, // es kann nur das Loeschen von einzelnen char's zusammengefasst werden if( rPos.nNode != nSttNode || !aInsStr.Len() || ( !bGroup && aInsStr.Len() != 1 )) - return FALSE; + return sal_False; // ist der Node ueberhaupt ein TextNode? SwTxtNode * pDelTxtNd = rPos.nNode.GetNode().GetTxtNode(); if( !pDelTxtNd || ( pDelTxtNd->GetTxt().Len() != rPos.nContent.GetIndex() && rPos.nContent.GetIndex() != ( nSttCntnt + aInsStr.Len() ))) - return FALSE; + return sal_False; CharClass& rCC = GetAppCharClass(); @@ -144,23 +144,23 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, if (( CH_TXTATR_BREAKWORD == cIns || CH_TXTATR_INWORD == cIns ) || rCC.isLetterNumeric( String( cIns ), 0 ) != rCC.isLetterNumeric( aInsStr, aInsStr.Len()-1 ) ) - return FALSE; + return sal_False; { SwRedlineSaveDatas* pTmpSav = new SwRedlineSaveDatas; SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(), rPos.nNode, rPos.nContent.GetIndex()+1 ); - if( !FillSaveData( aPam, *pTmpSav, FALSE )) + if( !FillSaveData( aPam, *pTmpSav, sal_False )) delete pTmpSav, pTmpSav = 0; - BOOL bOk = ( !pRedlSaveData && !pTmpSav ) || + sal_Bool bOk = ( !pRedlSaveData && !pTmpSav ) || ( pRedlSaveData && pTmpSav && SwUndo::CanRedlineGroup( *pRedlSaveData, *pTmpSav, nSttCntnt > rPos.nContent.GetIndex() )); delete pTmpSav; if( !bOk ) - return FALSE; + return sal_False; pDoc->DeleteRedline( aPam, false, USHRT_MAX ); } @@ -175,11 +175,11 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, rPos.nContent++; } else - bInsChar = TRUE; + bInsChar = sal_True; } - BOOL bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand(); - pDelTxtNd->SetIgnoreDontExpand( TRUE ); + sal_Bool bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand(); + pDelTxtNd->SetIgnoreDontExpand( sal_True ); pDelTxtNd->InsertText( cIns, rPos.nContent, IDocumentContentOperations::INS_EMPTYEXPAND ); @@ -192,8 +192,8 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, } pDelTxtNd->SetIgnoreDontExpand( bOldExpFlg ); - bGroup = TRUE; - return TRUE; + bGroup = sal_True; + return sal_True; } @@ -233,8 +233,8 @@ void SwUndoOverwrite::Undo( SwUndoIter& rUndoIter ) String aTmpStr( '1' ); sal_Unicode* pTmpStr = aTmpStr.GetBufferAccess(); - BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); - pTxtNd->SetIgnoreDontExpand( TRUE ); + sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); + pTxtNd->SetIgnoreDontExpand( sal_True ); rIdx++; for( xub_StrLen n = 0; n < aDelStr.Len(); n++ ) @@ -275,8 +275,8 @@ void SwUndoOverwrite::Repeat( SwUndoIter& rUndoIter ) SwDoc& rDoc = *pAktPam->GetDoc(); - BOOL bGroupUndo = rDoc.DoesGroupUndo(); - rDoc.DoGroupUndo( FALSE ); + sal_Bool bGroupUndo = rDoc.DoesGroupUndo(); + rDoc.DoGroupUndo( sal_False ); rDoc.Overwrite( *pAktPam, aInsStr.GetChar( 0 )); rDoc.DoGroupUndo( bGroupUndo ); for( xub_StrLen n = 1; n < aInsStr.Len(); ++n ) @@ -305,8 +305,8 @@ void SwUndoOverwrite::Redo( SwUndoIter& rUndoIter ) } rIdx.Assign( pTxtNd, aDelStr.Len() ? nSttCntnt+1 : nSttCntnt ); - BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); - pTxtNd->SetIgnoreDontExpand( TRUE ); + sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); + pTxtNd->SetIgnoreDontExpand( sal_True ); for( xub_StrLen n = 0; n < aInsStr.Len(); n++ ) { @@ -355,10 +355,10 @@ struct _UndoTransliterate_Data String sText; SwHistory* pHistory; Sequence< sal_Int32 >* pOffsets; - ULONG nNdIdx; + sal_uLong nNdIdx; xub_StrLen nStart, nLen; - _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt ) + _UndoTransliterate_Data( sal_uLong nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt ) : sText( rTxt ), pHistory( 0 ), pOffsets( 0 ), nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen ) {} @@ -383,8 +383,8 @@ SwUndoTransliterate::~SwUndoTransliterate() void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - BOOL bUndo = rDoc.DoesUndo(); - rDoc.DoUndo( FALSE ); + sal_Bool bUndo = rDoc.DoesUndo(); + rDoc.DoUndo( sal_False ); // since the changes were added to the vector from the end of the string/node towards // the start, we need to revert them from the start towards the end now to keep the @@ -394,12 +394,12 @@ void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) aChanges[i]->SetChangeAtNode( rDoc ); rDoc.DoUndo( bUndo ); - SetPaM( rUndoIter, TRUE ); + SetPaM( rUndoIter, sal_True ); } void SwUndoTransliterate::Redo( SwUndoIter& rUndoIter ) { -/* ??? */ rUndoIter.SetUpdateAttr( TRUE ); +/* ??? */ rUndoIter.SetUpdateAttr( sal_True ); SetPaM( *rUndoIter.pAktPam ); Repeat( rUndoIter ); diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 7f76697c80a3..e1364e985ad0 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -41,8 +41,8 @@ #include <docary.hxx> #include <sortopt.hxx> -extern void lcl_JoinText( SwPaM& rPam, BOOL bJoinPrev ); -extern void lcl_GetJoinFlags( SwPaM& rPam, BOOL& rJoinTxt, BOOL& rJoinPrev ); +extern void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev ); +extern void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev ); //------------------------------------------------------------------ @@ -52,7 +52,7 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); } SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange ) : SwUndo( UNDO_REDLINE ), SwUndRng( rRange ), pRedlData( 0 ), pRedlSaveData( 0 ), nUserId( nUsrId ), - bHiddenRedlines( FALSE ) + bHiddenRedlines( sal_False ) { // Redline beachten SwDoc& rDoc = *rRange.GetDoc(); @@ -70,10 +70,10 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange ) SetRedlineMode( rDoc.GetRedlineMode() ); } - ULONG nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex(); + sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex(); pRedlSaveData = new SwRedlineSaveDatas; - if( !FillSaveData( rRange, *pRedlSaveData, FALSE, + if( !FillSaveData( rRange, *pRedlSaveData, sal_False, UNDO_REJECT_REDLINE != nUserId )) delete pRedlSaveData, pRedlSaveData = 0; else @@ -104,7 +104,7 @@ void SwUndoRedline::Undo( SwUndoIter& rIter ) if( pRedlSaveData ) { - ULONG nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex(); + sal_uLong nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex(); SetSaveData( *pDoc, *pRedlSaveData ); if( bHiddenRedlines ) { @@ -114,7 +114,7 @@ void SwUndoRedline::Undo( SwUndoIter& rIter ) nSttNode += nEndExtra; nEndNode += nEndExtra; } - SetPaM( *rIter.pAktPam, TRUE ); + SetPaM( *rIter.pAktPam, sal_True ); } } @@ -128,8 +128,8 @@ void SwUndoRedline::Redo( SwUndoIter& rIter ) SetPaM( *rIter.pAktPam ); if( pRedlSaveData && bHiddenRedlines ) { - ULONG nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex(); - FillSaveData( *rIter.pAktPam, *pRedlSaveData, FALSE, + sal_uLong nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex(); + FillSaveData( *rIter.pAktPam, *pRedlSaveData, sal_False, UNDO_REJECT_REDLINE != nUserId ); nEndExtra -= pDoc->GetNodes().GetEndOfExtras().GetIndex(); @@ -138,7 +138,7 @@ void SwUndoRedline::Redo( SwUndoIter& rIter ) } _Redo( rIter ); - SetPaM( *rIter.pAktPam, TRUE ); + SetPaM( *rIter.pAktPam, sal_True ); pDoc->SetRedlineMode_intern( eOld ); } @@ -158,7 +158,7 @@ void SwUndoRedline::_Redo( SwUndoIter& rIter ) SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId ) : SwUndoRedline( nUsrId = (nUsrId ? nUsrId : UNDO_DELETE), rRange ), - bCanGroup( FALSE ), bIsDelim( FALSE ), bIsBackspace( FALSE ) + bCanGroup( sal_False ), bIsDelim( sal_False ), bIsBackspace( sal_False ) { const SwTxtNode* pTNd; if( UNDO_DELETE == nUserId && @@ -168,7 +168,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId ) sal_Unicode cCh = pTNd->GetTxt().GetChar( nSttCntnt ); if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh ) { - bCanGroup = TRUE; + bCanGroup = sal_True; bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetTxt(), nSttCntnt ); bIsBackspace = nSttCntnt == rRange.GetPoint()->nContent.GetIndex(); @@ -186,12 +186,12 @@ void SwUndoRedlineDelete::_Undo( SwUndoIter& rIter ) void SwUndoRedlineDelete::_Redo( SwUndoIter& rIter ) { if( *rIter.pAktPam->GetPoint() != *rIter.pAktPam->GetMark() ) - rIter.GetDoc().AppendRedline( new SwRedline( *pRedlData, *rIter.pAktPam ), FALSE ); + rIter.GetDoc().AppendRedline( new SwRedline( *pRedlData, *rIter.pAktPam ), sal_False ); } -BOOL SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext ) +sal_Bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( UNDO_DELETE == nUserId && nUserId == rNext.nUserId && bCanGroup == rNext.bCanGroup && bIsDelim == rNext.bIsDelim && @@ -217,7 +217,7 @@ BOOL SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext ) nEndCntnt = rNext.nEndCntnt; else nSttCntnt = rNext.nSttCntnt; - bRet = TRUE; + bRet = sal_True; } } return bRet; @@ -248,7 +248,7 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter ) SwPosition* pEnd = rIter.pAktPam->End(); SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); + sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); if( 0 == ( nsRedlineMode_t::REDLINE_SHOW_DELETE & rDoc.GetRedlineMode()) ) { @@ -256,7 +256,7 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter ) // damit die Nodes wieder uebereinstimmen! // das Geloeschte ist versteckt, also suche das INSERT // Redline Object. Dahinter steht das Geloeschte - USHORT nFnd = rDoc.GetRedlinePos( + sal_uInt16 nFnd = rDoc.GetRedlinePos( *rDoc.GetNodes()[ nSttNode + 1 ], nsRedlineType_t::REDLINE_INSERT ); ASSERT( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(), @@ -301,7 +301,7 @@ void SwUndoRedlineSort::_Redo( SwUndoIter& rIter ) SwPosition* pEnd = pPam->End(); SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); + sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); xub_StrLen nCntStt = pStart->nContent.GetIndex(); rIter.GetDoc().SortText( rPam, *pOpt ); @@ -377,7 +377,7 @@ void SwUndoRejectRedline::Repeat( SwUndoIter& rIter ) /* */ -SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, BOOL bIns ) +SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns ) : SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ), pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns ) { @@ -404,7 +404,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwRedline& rRedl ) } pRedlSaveData = new SwRedlineSaveDatas; - if( !FillSaveData( rRedl, *pRedlSaveData, FALSE, TRUE )) + if( !FillSaveData( rRedl, *pRedlSaveData, sal_False, sal_True )) delete pRedlSaveData, pRedlSaveData = 0; } @@ -434,8 +434,8 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter ) pDoc->SetRedlineMode_intern( eOld ); //per definition Point is end (in SwUndRng!) - SwCntntNode* pCSttNd = pPam->GetCntntNode( FALSE ); - SwCntntNode* pCEndNd = pPam->GetCntntNode( TRUE ); + SwCntntNode* pCSttNd = pPam->GetCntntNode( sal_False ); + SwCntntNode* pCEndNd = pPam->GetCntntNode( sal_True ); // if start- and end-content is zero, then the doc-compare moves // complete nodes into the current doc. And then the selection @@ -444,10 +444,10 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter ) if( !nSttCntnt && !nEndCntnt ) pPam->Exchange(); - BOOL bJoinTxt, bJoinPrev; + sal_Bool bJoinTxt, bJoinPrev; ::lcl_GetJoinFlags( *pPam, bJoinTxt, bJoinPrev ); - pUnDel = new SwUndoDelete( *pPam, FALSE ); + pUnDel = new SwUndoDelete( *pPam, sal_False ); if( bJoinTxt ) ::lcl_JoinText( *pPam, bJoinPrev ); @@ -455,7 +455,7 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter ) if( pCSttNd && !pCEndNd) { // #112139# Do not step behind the end of content. - SwNode * pTmp = pPam->GetNode(TRUE); + SwNode * pTmp = pPam->GetNode(sal_True); if (pTmp) { SwNode * pEnd = pDoc->GetNodes().DocumentSectionEndNode(pTmp); @@ -464,9 +464,9 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter ) { pPam->SetMark(); pPam->GetPoint()->nNode++; - pPam->GetBound( TRUE ).nContent.Assign( 0, 0 ); - pPam->GetBound( FALSE ).nContent.Assign( 0, 0 ); - pUnDel2 = new SwUndoDelete( *pPam, TRUE ); + pPam->GetBound( sal_True ).nContent.Assign( 0, 0 ); + pPam->GetBound( sal_False ).nContent.Assign( 0, 0 ); + pUnDel2 = new SwUndoDelete( *pPam, sal_True ); } } } @@ -481,7 +481,7 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter ) if( pRedlSaveData ) SetSaveData( *pDoc, *pRedlSaveData ); } - SetPaM( rIter, TRUE ); + SetPaM( rIter, sal_True ); } } @@ -537,7 +537,7 @@ void SwUndoCompDoc::Redo( SwUndoIter& rIter ) // pDoc->SetRedlineMode_intern( eOld ); } - SetPaM( rIter, TRUE ); + SetPaM( rIter, sal_True ); } diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 98d0e41d4616..374f6b616e2c 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -58,7 +58,7 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect ) SfxItemSet* pAttr = 0; if( rSect.GetFmt() ) { - USHORT nCnt = 1; + sal_uInt16 nCnt = 1; if( rSect.IsProtect() ) ++nCnt; @@ -240,7 +240,7 @@ void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter ) } -void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode ) +void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode ) { SwNodeIndex aIdx( rDoc.GetNodes(), nNode ); SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode(); @@ -294,8 +294,8 @@ private: ::std::auto_ptr<SwTOXBase> const m_pTOXBase; /// set iff section is TOX ::std::auto_ptr<SfxItemSet> const m_pAttrSet; ::boost::shared_ptr< ::sfx2::MetadatableUndo > const m_pMetadataUndo; - ULONG const m_nStartNode; - ULONG const m_nEndNode; + sal_uLong const m_nStartNode; + sal_uLong const m_nEndNode; public: SwUndoDelSection( @@ -403,7 +403,7 @@ class SwUndoUpdateSection private: ::std::auto_ptr<SwSectionData> m_pSectionData; ::std::auto_ptr<SfxItemSet> m_pAttrSet; - ULONG const m_nStartNode; + sal_uLong const m_nStartNode; bool const m_bOnlyAttrChanged; public: @@ -452,7 +452,7 @@ void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter ) // das Content- und Protect-Item muss bestehen bleiben const SfxPoolItem* pItem; m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT )); - if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, TRUE, &pItem )) + if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, sal_True, &pItem )) { m_pAttrSet->Put( *pItem ); } diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx index 44b73736e458..cb37a75f3464 100644 --- a/sw/source/core/undo/unsort.cxx +++ b/sw/source/core/undo/unsort.cxx @@ -70,8 +70,8 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt) } -SwUndoSort::SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode& rTblNd, - const SwSortOptions& rOpt, BOOL bSaveTable ) +SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTblNd, + const SwSortOptions& rOpt, sal_Bool bSaveTable ) : SwUndo(UNDO_SORT_TBL), pUndoTblAttr( 0 ), pRedlData( 0 ) { nSttNode = nStt; @@ -116,7 +116,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter) const SwTable& rTbl = pTblNd->GetTable(); SwMovedBoxes aMovedList; - for( USHORT i=0; i < aSortList.Count(); i++) + for( sal_uInt16 i=0; i < aSortList.Count(); i++) { const SwTableBox* pSource = rTbl.GetTblBox( *aSortList[i]->SORT_TXT_TBL.TBL.pSource ); @@ -134,7 +134,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter) // Restore table frames: // --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting // does not work if the table is inside a frame and has no prev/next. - const ULONG nIdx = pTblNd->GetIndex(); + const sal_uLong nIdx = pTblNd->GetIndex(); aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 ); // <-- } @@ -146,11 +146,11 @@ void SwUndoSort::Undo( SwUndoIter& rIter) // fuer die sorted Positions einen Index anlegen. // JP 25.11.97: Die IndexList muss aber nach SourcePosition // aufsteigend sortiert aufgebaut werden - SwUndoSortList aIdxList( (BYTE)aSortList.Count() ); - USHORT i; + SwUndoSortList aIdxList( (sal_uInt8)aSortList.Count() ); + sal_uInt16 i; for( i = 0; i < aSortList.Count(); ++i) - for( USHORT ii=0; ii < aSortList.Count(); ++ii ) + for( sal_uInt16 ii=0; ii < aSortList.Count(); ++ii ) if( aSortList[ii]->SORT_TXT_TBL.TXT.nSource == nSttNode + i ) { SwNodeIndex* pIdx = new SwNodeIndex( rDoc.GetNodes(), @@ -168,7 +168,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter) } // Indixes loeschen aIdxList.DeleteAndDestroy(0, aIdxList.Count()); - SetPaM( rIter, TRUE ); + SetPaM( rIter, sal_True ); } } @@ -193,7 +193,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter) const SwTable& rTbl = pTblNd->GetTable(); SwMovedBoxes aMovedList; - for(USHORT i=0; i < aSortList.Count(); ++i) + for(sal_uInt16 i=0; i < aSortList.Count(); ++i) { const SwTableBox* pSource = rTbl.GetTblBox( (const String&) *aSortList[i]->SORT_TXT_TBL.TBL.pSource ); @@ -213,7 +213,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter) // Restore table frames: // --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting // does not work if the table is inside a frame and has no prev/next. - const ULONG nIdx = pTblNd->GetIndex(); + const sal_uLong nIdx = pTblNd->GetIndex(); aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 ); // <-- } @@ -222,8 +222,8 @@ void SwUndoSort::Redo( SwUndoIter& rIter) // Redo bei Text RemoveIdx( *rIter.pAktPam ); - SwUndoSortList aIdxList( (BYTE)aSortList.Count() ); - USHORT i; + SwUndoSortList aIdxList( (sal_uInt8)aSortList.Count() ); + sal_uInt16 i; for( i = 0; i < aSortList.Count(); ++i) { // aktuelle Pos ist die Ausgangslage @@ -241,7 +241,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter) } // Indixes loeschen aIdxList.DeleteAndDestroy(0, aIdxList.Count()); - SetPaM( rIter, TRUE ); + SetPaM( rIter, sal_True ); const SwTxtNode* pTNd = rIter.pAktPam->GetNode()->GetTxtNode(); if( pTNd ) rIter.pAktPam->GetPoint()->nContent = pTNd->GetTxt().Len(); @@ -282,7 +282,7 @@ void SwUndoSort::RemoveIdx( SwPaM& rPam ) if( nLen >= nEndCntnt ) nLen = nEndCntnt; rPam.GetPoint()->nContent.Assign(pCNd, nLen ); - RemoveIdxFromRange( rPam, TRUE ); + RemoveIdxFromRange( rPam, sal_True ); } @@ -293,7 +293,7 @@ void SwUndoSort::Insert( const String& rOrgPos, const String& rNewPos) } -void SwUndoSort::Insert( ULONG nOrgPos, ULONG nNewPos) +void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos) { SwSortUndoElement* pEle = new SwSortUndoElement(nOrgPos, nNewPos); aSortList.C40_INSERT( SwSortUndoElement, pEle, aSortList.Count() ); diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 14aa18ed6e07..b7c12013416a 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -52,10 +52,10 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); } SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, - BOOL bChkTable ) + sal_Bool bChkTable ) : SwUndo( UNDO_SPLITNODE ), pHistory( 0 ), pRedlData( 0 ), nNode( rPos.nNode.GetIndex() ), nCntnt( rPos.nContent.GetIndex() ), - bTblFlag( FALSE ), bChkTblStt( bChkTable ) + bTblFlag( sal_False ), bChkTblStt( bChkTable ) { SwTxtNode* pTxtNd = pDoc->GetNodes()[ rPos.nNode ]->GetTxtNode(); ASSERT( pTxtNd, "nur beim TextNode rufen!" ); @@ -108,11 +108,11 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter ) if( pNdSet ) { const SfxPoolItem *pItem; - if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, FALSE, + if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, sal_False, &pItem ) ) pTableFmt->SetFmtAttr( *pItem ); - if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, FALSE, + if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, sal_False, &pItem ) ) pTableFmt->SetFmtAttr( *pItem ); } @@ -151,7 +151,7 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter ) rPam.SetMark(); rPam.GetPoint()->nContent = pTNd->GetTxt().Len(); - pDoc->RstTxtAttrs( rPam, TRUE ); + pDoc->RstTxtAttrs( rPam, sal_True ); pHistory->TmpRollback( pDoc, 0, false ); } } @@ -176,7 +176,7 @@ void SwUndoSplitNode::Repeat( SwUndoIter& rUndoIter ) void SwUndoSplitNode::Redo( SwUndoIter& rUndoIter ) { SwPaM& rPam = *rUndoIter.pAktPam; - ULONG nOldNode = rPam.GetPoint()->nNode.GetIndex(); + sal_uLong nOldNode = rPam.GetPoint()->nNode.GetIndex(); rPam.GetPoint()->nNode = nNode; SwTxtNode * pTNd = rPam.GetNode()->GetTxtNode(); if( pTNd ) // sollte eigentlich immer ein TextNode sein !! diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 9a654170187a..8cdadaa7dd81 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -98,7 +98,7 @@ SV_DECL_PTRARR_DEL( SwTblToTxtSaves, SwTblToTxtSavePtr, 0, 10 ) struct _UndoTblCpyTbl_Entry { - ULONG nBoxIdx, nOffset; + sal_uLong nBoxIdx, nOffset; SfxItemSet* pBoxNumAttr; SwUndo* pUndo; @@ -123,25 +123,25 @@ class _SaveTable const SwTable* pSwTable; SfxItemSets aSets; SwFrmFmts aFrmFmts; - USHORT nLineCount; - BOOL bModifyBox : 1; - BOOL bSaveFormula : 1; - BOOL bNewModel : 1; + sal_uInt16 nLineCount; + sal_Bool bModifyBox : 1; + sal_Bool bSaveFormula : 1; + sal_Bool bNewModel : 1; public: - _SaveTable( const SwTable& rTbl, USHORT nLnCnt = USHRT_MAX, - BOOL bSaveFml = TRUE ); + _SaveTable( const SwTable& rTbl, sal_uInt16 nLnCnt = USHRT_MAX, + sal_Bool bSaveFml = sal_True ); ~_SaveTable(); - USHORT AddFmt( SwFrmFmt* pFmt, bool bIsLine ); - void NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine, USHORT nFmtPos, + sal_uInt16 AddFmt( SwFrmFmt* pFmt, bool bIsLine ); + void NewFrmFmt( const SwClient* pLnBx, sal_Bool bIsLine, sal_uInt16 nFmtPos, SwFrmFmt* pOldFmt ); - void RestoreAttr( SwTable& rTbl, BOOL bModifyBox = FALSE ); + void RestoreAttr( SwTable& rTbl, sal_Bool bModifyBox = sal_False ); void SaveCntntAttrs( SwDoc* pDoc ); - void CreateNew( SwTable& rTbl, BOOL bCreateFrms = TRUE, - BOOL bRestoreChart = TRUE ); - BOOL IsNewModel() const { return bNewModel; } + void CreateNew( SwTable& rTbl, sal_Bool bCreateFrms = sal_True, + sal_Bool bRestoreChart = sal_True ); + sal_Bool IsNewModel() const { return bNewModel; } }; class _SaveLine @@ -151,7 +151,7 @@ class _SaveLine _SaveLine* pNext; _SaveBox* pBox; - USHORT nItemSet; + sal_uInt16 nItemSet; public: @@ -169,9 +169,9 @@ class _SaveBox friend class _SaveLine; _SaveBox* pNext; - ULONG nSttNode; + sal_uLong nSttNode; long nRowSpan; - USHORT nItemSet; + sal_uInt16 nItemSet; union { SfxItemSets* pCntntAttrs; @@ -188,8 +188,8 @@ public: void CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl ); }; -void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 ); -void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos = 0 ); +void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 ); +void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos = 0 ); #if defined( JP_DEBUG ) && defined(DBG_UTIL) #include "shellio.hxx" @@ -210,15 +210,15 @@ So we need to remember not only the start node position but the end node positio struct SwTblToTxtSave { - ULONG m_nSttNd; - ULONG m_nEndNd; + sal_uLong m_nSttNd; + sal_uLong m_nEndNd; xub_StrLen m_nCntnt; SwHistory* m_pHstry; // metadata references for first and last paragraph in cell ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart; ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd; - SwTblToTxtSave( SwDoc& rDoc, ULONG nNd, ULONG nEndIdx, xub_StrLen nCntnt ); + SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCntnt ); ~SwTblToTxtSave() { delete m_pHstry; } }; @@ -228,7 +228,7 @@ SV_IMPL_PTRARR( SwUndoMoves, SwUndoMovePtr ) SV_IMPL_PTRARR( SwTblToTxtSaves, SwTblToTxtSavePtr ) SV_IMPL_PTRARR( _UndoTblCpyTbl_Entries, _UndoTblCpyTbl_EntryPtr ) -USHORT __FAR_DATA aSave_BoxCntntSet[] = { +sal_uInt16 __FAR_DATA aSave_BoxCntntSet[] = { RES_CHRATR_COLOR, RES_CHRATR_CROSSEDOUT, RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_POSTURE, RES_CHRATR_POSTURE, @@ -238,8 +238,8 @@ USHORT __FAR_DATA aSave_BoxCntntSet[] = { -SwUndoInsTbl::SwUndoInsTbl( const SwPosition& rPos, USHORT nCl, USHORT nRw, - USHORT nAdj, const SwInsertTableOptions& rInsTblOpts, +SwUndoInsTbl::SwUndoInsTbl( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt16 nRw, + sal_uInt16 nAdj, const SwInsertTableOptions& rInsTblOpts, const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr, const String & rName) @@ -296,11 +296,11 @@ void SwUndoInsTbl::Undo( SwUndoIter& rUndoIter ) const SfxPoolItem *pItem; if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, - FALSE, &pItem ) ) + sal_False, &pItem ) ) pNextNd->SetAttr( *pItem ); if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, - FALSE, &pItem ) ) + sal_False, &pItem ) ) pNextNd->SetAttr( *pItem ); } @@ -346,7 +346,7 @@ void SwUndoInsTbl::Redo( SwUndoIter& rUndoIter ) rDoc.GetRedlineTbl().Count() )) { SwPaM aPam( *pTblNode->EndOfSectionNode(), *pTblNode, 1 ); - SwCntntNode* pCNd = aPam.GetCntntNode( FALSE ); + SwCntntNode* pCNd = aPam.GetCntntNode( sal_False ); if( pCNd ) aPam.GetMark()->nContent.Assign( pCNd, 0 ); @@ -384,7 +384,7 @@ SwRewriter SwUndoInsTbl::GetRewriter() const // ----------------------------------------------------- -SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, ULONG nNd, ULONG nEndIdx, xub_StrLen nCnt ) +SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCnt ) : m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nCntnt( nCnt ), m_pHstry( 0 ) { // Attributierung des gejointen Node merken. @@ -427,11 +427,11 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh ) : SwUndo( UNDO_TABLETOTEXT ), sTblNm( rTbl.GetFrmFmt()->GetName() ), pDDEFldType( 0 ), pHistory( 0 ), nSttNd( 0 ), nEndNd( 0 ), - nAdjust( static_cast<USHORT>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ), + nAdjust( static_cast<sal_uInt16>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ), cTrenner( cCh ), nHdlnRpt( rTbl.GetRowsToRepeat() ) { pTblSave = new _SaveTable( rTbl ); - pBoxSaves = new SwTblToTxtSaves( (BYTE)rTbl.GetTabSortBoxes().Count() ); + pBoxSaves = new SwTblToTxtSaves( (sal_uInt8)rTbl.GetTabSortBoxes().Count() ); if( rTbl.IsA( TYPE( SwDDETable ) ) ) pDDEFldType = (SwDDEFieldType*)((SwDDETable&)rTbl).GetDDEFldType()->Copy(); @@ -440,10 +440,10 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh ) pHistory = new SwHistory; const SwTableNode* pTblNd = rTbl.GetTableNode(); - ULONG nTblStt = pTblNd->GetIndex(), nTblEnd = pTblNd->EndOfSectionIndex(); + sal_uLong nTblStt = pTblNd->GetIndex(), nTblEnd = pTblNd->EndOfSectionIndex(); const SwSpzFrmFmts& rFrmFmtTbl = *pTblNd->GetDoc()->GetSpzFrmFmts(); - for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n ) + for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n ) { SwFrmFmt* pFmt = rFrmFmtTbl[ n ]; SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); @@ -505,20 +505,20 @@ void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter ) SwDDEFieldType* pNewType = (SwDDEFieldType*)rDoc.InsertFldType( *pDDEFldType); SwDDETable* pDDETbl = new SwDDETable( pTblNd->GetTable(), pNewType ); - pTblNd->SetNewTable( pDDETbl, FALSE ); // setze die DDE-Tabelle + pTblNd->SetNewTable( pDDETbl, sal_False ); // setze die DDE-Tabelle delete pDDEFldType, pDDEFldType = 0; } if( bCheckNumFmt ) { SwTableSortBoxes& rBxs = pTblNd->GetTable().GetTabSortBoxes(); - for( USHORT nBoxes = rBxs.Count(); nBoxes; ) - rDoc.ChkBoxNumFmt( *rBxs[ --nBoxes ], FALSE ); + for( sal_uInt16 nBoxes = rBxs.Count(); nBoxes; ) + rDoc.ChkBoxNumFmt( *rBxs[ --nBoxes ], sal_False ); } if( pHistory ) { - USHORT nTmpEnd = pHistory->GetTmpEnd(); + sal_uInt16 nTmpEnd = pHistory->GetTmpEnd(); pHistory->TmpRollback( &rDoc, 0 ); pHistory->SetTmpEnd( nTmpEnd ); } @@ -539,7 +539,7 @@ void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter ) } // steht im untbl.cxx und darf nur vom Undoobject gerufen werden -SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd, +SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd, const SwTblToTxtSaves& rSavedData ) { SwNodeIndex aSttIdx( *this, nSttNd ); @@ -554,7 +554,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd, Delete all Frames attached to the nodes in that range. */ SwNode* pNd; { - ULONG n, nTmpEnd = aEndIdx.GetIndex(); + sal_uLong n, nTmpEnd = aEndIdx.GetIndex(); for( n = pTblNd->GetIndex() + 1; n < nTmpEnd; ++n ) { if( ( pNd = (*this)[ n ] )->IsCntntNode() ) @@ -572,7 +572,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd, pTblNd->GetTable().GetTabLines().C40_INSERT( SwTableLine, pLine, 0 ); SvULongs aBkmkArr( 0, 4 ); - for( USHORT n = rSavedData.Count(); n; ) + for( sal_uInt16 n = rSavedData.Count(); n; ) { SwTblToTxtSave* pSave = rSavedData[ --n ]; // if the start node was merged with last from prev. cell, @@ -616,7 +616,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd, if( pSave->m_pHstry ) { - USHORT nTmpEnd = pSave->m_pHstry->GetTmpEnd(); + sal_uInt16 nTmpEnd = pSave->m_pHstry->GetTmpEnd(); pSave->m_pHstry->TmpRollback( GetDoc(), 0 ); pSave->m_pHstry->SetTmpEnd( nTmpEnd ); } @@ -638,7 +638,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd, pSttNd->pStartOfSection = pTblNd; new SwEndNode( aEndIdx, *pSttNd ); - for( ULONG i = aSttIdx.GetIndex(); i < aEndIdx.GetIndex()-1; ++i ) + for( sal_uLong i = aSttIdx.GetIndex(); i < aEndIdx.GetIndex()-1; ++i ) { pNd = (*this)[ i ]; pNd->pStartOfSection = pSttNd; @@ -680,7 +680,7 @@ void SwUndoTblToTxt::Redo( SwUndoIter& rUndoIter ) if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) && 0 == ( pCNd = rDoc.GetNodes().GoPrevious( &aSaveIdx )) ) { - ASSERT( FALSE, "wo steht denn nun der TextNode" ); + ASSERT( sal_False, "wo steht denn nun der TextNode" ); } pPam->GetPoint()->nNode = aSaveIdx; @@ -713,7 +713,7 @@ void SwUndoTblToTxt::SetRange( const SwNodeRange& rRg ) nEndNd = rRg.aEnd.GetIndex(); } -void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_StrLen nCntntIdx ) +void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, xub_StrLen nCntntIdx ) { SwTblToTxtSave* pNew = new SwTblToTxtSave( rDoc, nNdIdx, nEndIdx, nCntntIdx ); pBoxSaves->Insert( pNew, pBoxSaves->Count() ); @@ -723,7 +723,7 @@ void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_St SwUndoTxtToTbl::SwUndoTxtToTbl( const SwPaM& rRg, const SwInsertTableOptions& rInsTblOpts, - sal_Unicode cCh, USHORT nAdj, + sal_Unicode cCh, sal_uInt16 nAdj, const SwTableAutoFmt* pAFmt ) : SwUndo( UNDO_TEXTTOTABLE ), SwUndRng( rRg ), aInsTblOpts( rInsTblOpts ), pDelBoxes( 0 ), pAutoFmt( 0 ), @@ -749,7 +749,7 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - ULONG nTblNd = nSttNode; + sal_uLong nTblNd = nSttNode; if( nSttCntnt ) ++nTblNd; // Node wurde vorher gesplittet SwNodeIndex aIdx( rDoc.GetNodes(), nTblNd ); @@ -769,11 +769,11 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter ) if( pDelBoxes ) { SwTable& rTbl = pTNd->GetTable(); - for( USHORT n = pDelBoxes->Count(); n; ) + for( sal_uInt16 n = pDelBoxes->Count(); n; ) { SwTableBox* pBox = rTbl.GetTblBox( (*pDelBoxes)[ --n ] ); if( pBox ) - ::_DeleteBox( rTbl, pBox, 0, FALSE, FALSE ); + ::_DeleteBox( rTbl, pBox, 0, sal_False, sal_False ); else { ASSERT( !this, "Wo ist die Box geblieben?" ); } @@ -826,7 +826,7 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter ) void SwUndoTxtToTbl::Redo( SwUndoIter& rUndoIter ) { SetPaM( rUndoIter ); - RemoveIdxFromRange( *rUndoIter.pAktPam, FALSE ); + RemoveIdxFromRange( *rUndoIter.pAktPam, sal_False ); SetPaM( rUndoIter ); const SwTable* pTable = rUndoIter.GetDoc().TextToTable( @@ -861,8 +861,8 @@ SwHistory& SwUndoTxtToTbl::GetHistory() // ----------------------------------------------------- -SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, USHORT nOldHdl, - USHORT nNewHdl ) +SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, sal_uInt16 nOldHdl, + sal_uInt16 nNewHdl ) : SwUndo( UNDO_TABLEHEADLINE ), nOldHeadline( nOldHdl ), nNewHeadline( nNewHdl ) @@ -908,11 +908,11 @@ void SwUndoTblHeadline::Repeat( SwUndoIter& rUndoIter ) -_SaveTable::_SaveTable( const SwTable& rTbl, USHORT nLnCnt, BOOL bSaveFml ) +_SaveTable::_SaveTable( const SwTable& rTbl, sal_uInt16 nLnCnt, sal_Bool bSaveFml ) : aTblSet( *rTbl.GetFrmFmt()->GetAttrSet().GetPool(), aTableSetRange ), pSwTable( &rTbl ), nLineCount( nLnCnt ), bSaveFormula( bSaveFml ) { - bModifyBox = FALSE; + bModifyBox = sal_False; bNewModel = rTbl.IsNewModel(); aTblSet.Put( rTbl.GetFrmFmt()->GetAttrSet() ); pLine = new _SaveLine( 0, *rTbl.GetTabLines()[ 0 ], *this ); @@ -920,7 +920,7 @@ _SaveTable::_SaveTable( const SwTable& rTbl, USHORT nLnCnt, BOOL bSaveFml ) _SaveLine* pLn = pLine; if( USHRT_MAX == nLnCnt ) nLnCnt = rTbl.GetTabLines().Count(); - for( USHORT n = 1; n < nLnCnt; ++n ) + for( sal_uInt16 n = 1; n < nLnCnt; ++n ) pLn = new _SaveLine( pLn, *rTbl.GetTabLines()[ n ], *this ); aFrmFmts.Remove( 0, aFrmFmts.Count() ); @@ -934,9 +934,9 @@ _SaveTable::~_SaveTable() } -USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine ) +sal_uInt16 _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine ) { - USHORT nRet = aFrmFmts.GetPos( pFmt ); + sal_uInt16 nRet = aFrmFmts.GetPos( pFmt ); if( USHRT_MAX == nRet ) { // Kopie vom ItemSet anlegen @@ -948,7 +948,7 @@ USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine ) // errechnet werden! //JP 30.07.98: Bug 54295 - Formeln immer im Klartext speichern const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, TRUE, &pItem )) + if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, sal_True, &pItem )) { pSet->ClearItem( RES_BOXATR_VALUE ); if( pSwTable && bSaveFormula ) @@ -967,9 +967,9 @@ USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine ) } -void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox ) +void _SaveTable::RestoreAttr( SwTable& rTbl, sal_Bool bMdfyBox ) { - USHORT n; + sal_uInt16 n; bModifyBox = bMdfyBox; @@ -982,7 +982,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox ) if( pFmt->IsInCache() ) { SwFrm::GetCache().Delete( pFmt ); - pFmt->SetInCache( FALSE ); + pFmt->SetInCache( sal_False ); } // zur Sicherheit alle Tableframes invalidieren @@ -999,7 +999,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox ) for( n = aSets.Count(); n; --n ) aFrmFmts.Insert( pFmt, aFrmFmts.Count() ); - USHORT nLnCnt = nLineCount; + sal_uInt16 nLnCnt = nLineCount; if( USHRT_MAX == nLnCnt ) nLnCnt = rTbl.GetTabLines().Count(); @@ -1016,7 +1016,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox ) } aFrmFmts.Remove( 0, aFrmFmts.Count() ); - bModifyBox = FALSE; + bModifyBox = sal_False; } @@ -1026,10 +1026,10 @@ void _SaveTable::SaveCntntAttrs( SwDoc* pDoc ) } -void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms, - BOOL bRestoreChart ) +void _SaveTable::CreateNew( SwTable& rTbl, sal_Bool bCreateFrms, + sal_Bool bRestoreChart ) { - USHORT n; + sal_uInt16 n; _FndBox aTmpBox( 0, 0 ); //if( bRestoreChart ) @@ -1045,7 +1045,7 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms, if( pFmt->IsInCache() ) { SwFrm::GetCache().Delete( pFmt ); - pFmt->SetInCache( FALSE ); + pFmt->SetInCache( sal_False ); } // SwTableBox muss ein Format haben!! @@ -1060,7 +1060,7 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms, aFrmFmts.Remove( 0, aFrmFmts.Count() ); // die neuen Lines eintragen, die alten loeschen - USHORT nOldLines = nLineCount; + sal_uInt16 nOldLines = nLineCount; if( USHRT_MAX == nLineCount ) nOldLines = rTbl.GetTabLines().Count(); @@ -1076,8 +1076,8 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms, // TL_CHART2: notify chart about boxes to be removed const SwTableBoxes &rBoxes = pOld->GetTabBoxes(); - USHORT nBoxes = rBoxes.Count(); - for (USHORT k = 0; k < nBoxes; ++k) + sal_uInt16 nBoxes = rBoxes.Count(); + for (sal_uInt16 k = 0; k < nBoxes; ++k) { SwTableBox *pBox = rBoxes[k]; if (pPCD) @@ -1095,11 +1095,11 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms, { // remove remaining lines... - for (USHORT k1 = 0; k1 < nOldLines - n; ++k1) + for (sal_uInt16 k1 = 0; k1 < nOldLines - n; ++k1) { const SwTableBoxes &rBoxes = rTbl.GetTabLines()[n + k1]->GetTabBoxes(); - USHORT nBoxes = rBoxes.Count(); - for (USHORT k2 = 0; k2 < nBoxes; ++k2) + sal_uInt16 nBoxes = rBoxes.Count(); + for (sal_uInt16 k2 = 0; k2 < nBoxes; ++k2) { SwTableBox *pBox = rBoxes[k2]; // TL_CHART2: notify chart about boxes to be removed @@ -1123,8 +1123,8 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms, } -void _SaveTable::NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine, - USHORT nFmtPos, SwFrmFmt* pOldFmt ) +void _SaveTable::NewFrmFmt( const SwClient* pLnBx, sal_Bool bIsLine, + sal_uInt16 nFmtPos, SwFrmFmt* pOldFmt ) { SwDoc* pDoc = pOldFmt->GetDoc(); @@ -1151,7 +1151,7 @@ void _SaveTable::NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine, ((SwFrm*)pLast)->ReinitializeFrmSizeAttrFlags(); if ( !bIsLine ) { - ((SwCellFrm*)pLast)->SetDerivedVert( FALSE ); + ((SwCellFrm*)pLast)->SetDerivedVert( sal_False ); ((SwCellFrm*)pLast)->CheckDirChange(); } } @@ -1184,7 +1184,7 @@ _SaveLine::_SaveLine( _SaveLine* pPrev, const SwTableLine& rLine, _SaveTable& rS pBox = new _SaveBox( 0, *rLine.GetTabBoxes()[ 0 ], rSTbl ); _SaveBox* pBx = pBox; - for( USHORT n = 1; n < rLine.GetTabBoxes().Count(); ++n ) + for( sal_uInt16 n = 1; n < rLine.GetTabBoxes().Count(); ++n ) pBx = new _SaveBox( pBx, *rLine.GetTabBoxes()[ n ], rSTbl ); } @@ -1198,10 +1198,10 @@ _SaveLine::~_SaveLine() void _SaveLine::RestoreAttr( SwTableLine& rLine, _SaveTable& rSTbl ) { - rSTbl.NewFrmFmt( &rLine, TRUE, nItemSet, rLine.GetFrmFmt() ); + rSTbl.NewFrmFmt( &rLine, sal_True, nItemSet, rLine.GetFrmFmt() ); _SaveBox* pBx = pBox; - for( USHORT n = 0; n < rLine.GetTabBoxes().Count(); ++n, pBx = pBx->pNext ) + for( sal_uInt16 n = 0; n < rLine.GetTabBoxes().Count(); ++n, pBx = pBx->pNext ) { if( !pBx ) { @@ -1270,7 +1270,7 @@ _SaveBox::_SaveBox( _SaveBox* pPrev, const SwTableBox& rBox, _SaveTable& rSTbl ) Ptrs.pLine = new _SaveLine( 0, *rBox.GetTabLines()[ 0 ], rSTbl ); _SaveLine* pLn = Ptrs.pLine; - for( USHORT n = 1; n < rBox.GetTabLines().Count(); ++n ) + for( sal_uInt16 n = 1; n < rBox.GetTabLines().Count(); ++n ) pLn = new _SaveLine( pLn, *rBox.GetTabLines()[ n ], rSTbl ); } } @@ -1288,7 +1288,7 @@ _SaveBox::~_SaveBox() void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl ) { - rSTbl.NewFrmFmt( &rBox, FALSE, nItemSet, rBox.GetFrmFmt() ); + rSTbl.NewFrmFmt( &rBox, sal_False, nItemSet, rBox.GetFrmFmt() ); if( ULONG_MAX == nSttNode ) // keine EndBox { @@ -1299,7 +1299,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl ) else { _SaveLine* pLn = Ptrs.pLine; - for( USHORT n = 0; n < rBox.GetTabLines().Count(); ++n, pLn = pLn->pNext ) + for( sal_uInt16 n = 0; n < rBox.GetTabLines().Count(); ++n, pLn = pLn->pNext ) { if( !pLn ) { @@ -1316,9 +1316,9 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl ) if( Ptrs.pCntntAttrs ) { SwNodes& rNds = rBox.GetFrmFmt()->GetDoc()->GetNodes(); - USHORT nSet = 0; - ULONG nEnd = rBox.GetSttNd()->EndOfSectionIndex(); - for( ULONG n = nSttNode + 1; n < nEnd; ++n ) + sal_uInt16 nSet = 0; + sal_uLong nEnd = rBox.GetSttNd()->EndOfSectionIndex(); + for( sal_uLong n = nSttNode + 1; n < nEnd; ++n ) { SwCntntNode* pCNd = rNds[ n ]->GetCntntNode(); if( pCNd ) @@ -1326,7 +1326,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl ) SfxItemSet* pSet = (*Ptrs.pCntntAttrs)[ nSet++ ]; if( pSet ) { - USHORT *pRstAttr = aSave_BoxCntntSet; + sal_uInt16 *pRstAttr = aSave_BoxCntntSet; while( *pRstAttr ) { pCNd->ResetAttr( *pRstAttr, *(pRstAttr+1) ); @@ -1356,9 +1356,9 @@ void _SaveBox::SaveCntntAttrs( SwDoc* pDoc ) } else { - ULONG nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex(); - Ptrs.pCntntAttrs = new SfxItemSets( (BYTE)(nEnd - nSttNode - 1 ), 5 ); - for( ULONG n = nSttNode + 1; n < nEnd; ++n ) + sal_uLong nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex(); + Ptrs.pCntntAttrs = new SfxItemSets( (sal_uInt8)(nEnd - nSttNode - 1 ), 5 ); + for( sal_uLong n = nSttNode + 1; n < nEnd; ++n ) { SwCntntNode* pCNd = pDoc->GetNodes()[ n ]->GetCntntNode(); if( pCNd ) @@ -1429,7 +1429,7 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl // UndoObject fuer Attribut Aenderung an der Tabelle -SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols ) +SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols ) : SwUndo( UNDO_TABLE_ATTR ), nSttNode( rTblNd.GetIndex() ) { @@ -1479,7 +1479,7 @@ SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& rAFmt ) : SwUndo( UNDO_TABLE_AUTOFMT ), nSttNode( rTblNd.GetIndex() ), pUndos( 0 ), - bSaveCntntAttr( FALSE ) + bSaveCntntAttr( sal_False ) { pSaveTbl = new _SaveTable( rTblNd.GetTable() ); @@ -1488,7 +1488,7 @@ SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd, // dann auch noch ueber die ContentNodes der EndBoxen und // und alle Absatz-Attribute zusammen sammeln pSaveTbl->SaveCntntAttrs( (SwDoc*)rTblNd.GetDoc() ); - bSaveCntntAttr = TRUE; + bSaveCntntAttr = sal_True; } } @@ -1508,7 +1508,7 @@ void SwUndoTblAutoFmt::SaveBoxCntnt( const SwTableBox& rBox ) } -void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter ) +void SwUndoTblAutoFmt::UndoRedo( sal_Bool bUndo, SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode(); @@ -1521,7 +1521,7 @@ void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter ) pOrig->SaveCntntAttrs( &rDoc ); if( pUndos && bUndo ) - for( USHORT n = pUndos->Count(); n; ) + for( sal_uInt16 n = pUndos->Count(); n; ) pUndos->GetObject( --n )->Undo( rUndoIter ); pSaveTbl->RestoreAttr( pTblNd->GetTable(), !bUndo ); @@ -1531,13 +1531,13 @@ void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter ) void SwUndoTblAutoFmt::Undo( SwUndoIter& rUndoIter ) { - UndoRedo( TRUE, rUndoIter ); + UndoRedo( sal_True, rUndoIter ); } void SwUndoTblAutoFmt::Redo( SwUndoIter& rUndoIter ) { - UndoRedo( FALSE, rUndoIter ); + UndoRedo( sal_False, rUndoIter ); } @@ -1548,9 +1548,9 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction, const SwSelBoxes& rBoxes, const SwTableNode& rTblNd, long nMn, long nMx, - USHORT nCnt, BOOL bFlg, BOOL bSmHght ) + sal_uInt16 nCnt, sal_Bool bFlg, sal_Bool bSmHght ) : SwUndo( nAction ), - aBoxes( rBoxes.Count() < 255 ? (BYTE)rBoxes.Count() : 255, 10 ), + aBoxes( rBoxes.Count() < 255 ? (sal_uInt8)rBoxes.Count() : 255, 10 ), nMin( nMn ), nMax( nMx ), nSttNode( rTblNd.GetIndex() ), nCurrBox( 0 ), nCount( nCnt ), nRelDiff( 0 ), nAbsDiff( 0 ), @@ -1564,7 +1564,7 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction, pSaveTbl = new _SaveTable( rTbl ); // und die Selektion merken - for( USHORT n = 0; n < rBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n ) aBoxes.Insert( rBoxes[n]->GetSttIdx(), n ); } @@ -1573,13 +1573,13 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction, const SwSelBoxes& rBoxes, const SwTableNode& rTblNd ) : SwUndo( nAction ), - aBoxes( rBoxes.Count() < 255 ? (BYTE)rBoxes.Count() : 255, 10 ), + aBoxes( rBoxes.Count() < 255 ? (sal_uInt8)rBoxes.Count() : 255, 10 ), nMin( 0 ), nMax( 0 ), nSttNode( rTblNd.GetIndex() ), nCurrBox( 0 ), nCount( 0 ), nRelDiff( 0 ), nAbsDiff( 0 ), nSetColType( USHRT_MAX ), - bFlag( FALSE ), - bSameHeight( FALSE ) + bFlag( sal_False ), + bSameHeight( sal_False ) { Ptrs.pNewSttNds = 0; @@ -1587,7 +1587,7 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction, pSaveTbl = new _SaveTable( rTbl ); // und die Selektion merken - for( USHORT n = 0; n < rBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n ) aBoxes.Insert( rBoxes[n]->GetSttIdx(), n ); } @@ -1596,7 +1596,7 @@ void SwUndoTblNdsChg::ReNewBoxes( const SwSelBoxes& rBoxes ) if( rBoxes.Count() != aBoxes.Count() ) { aBoxes.Remove( 0, aBoxes.Count() ); - for( USHORT n = 0; n < rBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n ) aBoxes.Insert( rBoxes[n]->GetSttIdx(), n ); } } @@ -1616,11 +1616,11 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, { const SwTable& rTbl = rTblNd.GetTable(); const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes(); - USHORT n; - USHORT i; + sal_uInt16 n; + sal_uInt16 i; ASSERT( ! IsDelBox(), "falsche Action" ); - Ptrs.pNewSttNds = new SvULongs( (BYTE)(rTblBoxes.Count() - rOld.Count()), 5 ); + Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 ); for( n = 0, i = 0; n < rOld.Count(); ++i ) { @@ -1646,7 +1646,7 @@ SwTableLine* lcl_FindTableLine( const SwTable& rTable, rBox.GetUpper()->GetUpper()->GetTabLines() : rTable.GetTabLines(); const SwTableLine* pLine = rBox.GetUpper(); - USHORT nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine ); + sal_uInt16 nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine ); pRet = rTableLines[nLineNo - 1]; return pRet; @@ -1673,12 +1673,12 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes(); ASSERT( ! IsDelBox(), "falsche Action" ); - Ptrs.pNewSttNds = new SvULongs( (BYTE)(rTblBoxes.Count() - rOld.Count()), 5 ); + Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 ); ASSERT( rTbl.IsNewModel() || rOld.Count() + nCount * rBoxes.Count() == rTblBoxes.Count(), "unexpected boxes" ); ASSERT( rOld.Count() <= rTblBoxes.Count(), "more unexpected boxes" ); - for( USHORT n = 0, i = 0; i < rTblBoxes.Count(); ++i ) + for( sal_uInt16 n = 0, i = 0; i < rTblBoxes.Count(); ++i ) { if( ( n < rOld.Count() ) && ( rOld[ n ] == rTblBoxes[ i ] ) ) @@ -1689,7 +1689,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, else { // new box found: insert (obey sort order) - USHORT nInsPos; + sal_uInt16 nInsPos; const SwTableBox* pBox = rTblBoxes[ i ]; InsertSort( *Ptrs.pNewSttNds, pBox->GetSttIdx(), &nInsPos ); @@ -1700,15 +1700,15 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, const SwTableBox* pSourceBox = NULL; const SwTableBox* pCheckBox = NULL; const SwTableLine* pBoxLine = pBox->GetUpper(); - USHORT nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine); - USHORT nLineNo = 0; - for( USHORT j = 0; j < rBoxes.Count(); ++j ) + sal_uInt16 nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine); + sal_uInt16 nLineNo = 0; + for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j ) { pCheckBox = rBoxes[j]; if( pCheckBox->GetUpper()->GetUpper() == pBox->GetUpper()->GetUpper() ) { const SwTableLine* pCheckLine = pCheckBox->GetUpper(); - USHORT nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ). + sal_uInt16 nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ). C40_GETPOS( SwTableLine, pCheckLine ); if( ( !pSourceBox || nCheckLine > nLineNo ) && nCheckLine < nLineDiff ) { @@ -1724,10 +1724,10 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, ASSERT( pSourceBox, "Splitted source box not found!" ); // find out how many nodes the source box used to have // (to help determine bNodesMoved flag below) - USHORT nNdsPos = 0; + sal_uInt16 nNdsPos = 0; while( rBoxes[ nNdsPos ] != pSourceBox ) ++nNdsPos; - ULONG nNodes = rNodeCnts[ nNdsPos ]; + sal_uLong nNodes = rNodeCnts[ nNdsPos ]; // When a new table cell is created, it either gets a new // node, or it gets node(s) from elsewhere. The undo must @@ -1741,7 +1741,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, // The bNodesMoved flag is stored in a seperate array // which mirrors Ptrs.pNewSttNds, i.e. Ptrs.pNewSttNds[i] // and aMvBoxes[i] belong together. - BOOL bNodesMoved = + sal_Bool bNodesMoved = ( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() - pSourceBox->GetSttIdx() ) ) && ( nNodes - 1 > nLineDiff ); @@ -1793,7 +1793,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) SwTableBoxes& rLnBoxes = pCpyBox->GetUpper()->GetTabBoxes(); // die Sections wieder herstellen - for( USHORT n = Ptrs.pDelSects->Count(); n; ) + for( sal_uInt16 n = Ptrs.pDelSects->Count(); n; ) { SwUndoSaveSection* pSave = (*Ptrs.pDelSects)[ --n ]; pSave->RestoreSection( &rDoc, &aIdx, SwTableBoxStartNode ); @@ -1813,10 +1813,10 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) aTmp.Insert( Ptrs.pNewSttNds, 0 ); // von hinten anfangen - for( USHORT n = aTmp.Count(); n; ) + for( sal_uInt16 n = aTmp.Count(); n; ) { // Box aus der Tabellen-Struktur entfernen - ULONG nIdx = aTmp[ --n ]; + sal_uLong nIdx = aTmp[ --n ]; SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx ); ASSERT( pBox, "Wo ist meine TabellenBox geblieben?" ); @@ -1833,8 +1833,8 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) SwNodeIndex aInsPos( *(pLine->GetTabBoxes()[0]->GetSttNd()), 2 ); // alle StartNode Indizies anpassen - USHORT i = n; - ULONG nSttIdx = aInsPos.GetIndex() - 2, + sal_uInt16 i = n; + sal_uLong nSttIdx = aInsPos.GetIndex() - 2, nNdCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex(); while( i && aTmp[ --i ] > nSttIdx ) aTmp[ i ] += nNdCnt; @@ -1842,7 +1842,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) // erst die Box loeschen delete pBox; // dann die Nodes verschieben, - rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, FALSE ); + rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, sal_False ); } else rDoc.DeleteSection( rDoc.GetNodes()[ nIdx ] ); @@ -1852,9 +1852,9 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) else { // Remove nodes from nodes array (backwards!) - for( USHORT n = Ptrs.pNewSttNds->Count(); n; ) + for( sal_uInt16 n = Ptrs.pNewSttNds->Count(); n; ) { - ULONG nIdx = (*Ptrs.pNewSttNds)[ --n ]; + sal_uLong nIdx = (*Ptrs.pNewSttNds)[ --n ]; SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx ); ASSERT( pBox, "Where's my table box?" ); // TL_CHART2: notify chart about box to be removed @@ -1865,7 +1865,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) } } // Remove boxes from table structure - for( USHORT n = 0; n < aDelBoxes.size(); ++n ) + for( sal_uInt16 n = 0; n < aDelBoxes.size(); ++n ) { SwTableBox* pCurrBox = aDelBoxes[n]; SwTableBoxes* pTBoxes = &pCurrBox->GetUpper()->GetTabBoxes(); @@ -1873,7 +1873,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) delete pCurrBox; } - pSaveTbl->CreateNew( pTblNd->GetTable(), TRUE, FALSE ); + pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False ); // TL_CHART2: need to inform chart of probably changed cell names rDoc.UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() ); @@ -1894,7 +1894,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter ) CHECK_TABLE( pTblNd->GetTable() ) SwSelBoxes aSelBoxes; - for( USHORT n = 0; n < aBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n ) { SwTableBox* pBox = pTblNd->GetTable().GetTblBox( aBoxes[ n ] ); aSelBoxes.Insert( pBox ); @@ -1942,7 +1942,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter ) SwTable &rTable = pTblNd->GetTable(); if( nMax > nMin && rTable.IsNewModel() ) rTable.PrepareDeleteCol( nMin, nMax ); - rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, TRUE, TRUE ); + rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, sal_True, sal_True ); } else { @@ -1956,7 +1956,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter ) TblChgMode eOldMode = rTbl.GetTblChgMode(); rTbl.SetTblChgMode( (TblChgMode)nCount ); - rDoc.DoUndo( TRUE ); // wir brauchen die SaveSections! + rDoc.DoUndo( sal_True ); // wir brauchen die SaveSections! SwUndoTblNdsChg* pUndo = 0; switch( nSetColType & 0xff ) @@ -1984,7 +1984,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter ) delete pUndo; } - rDoc.DoUndo( FALSE ); + rDoc.DoUndo( sal_False ); rTbl.SetTblChgMode( eOldMode ); } @@ -2048,7 +2048,7 @@ CHECKTABLE(pTblNd->GetTable()) SwSelBoxes aSelBoxes; SwTxtFmtColl* pColl = rDoc.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ); - USHORT n; + sal_uInt16 n; for( n = 0; n < aBoxes.Count(); ++n ) { @@ -2071,7 +2071,7 @@ CHECKTABLE(pTblNd->GetTable()) for( n = aNewSttNds.Count(); n; ) { // Box aus der Tabellen-Struktur entfernen - ULONG nIdx = aNewSttNds[ --n ]; + sal_uLong nIdx = aNewSttNds[ --n ]; if( !nIdx && n ) { @@ -2084,10 +2084,10 @@ CHECKTABLE(pTblNd->GetTable()) *pBox->GetSttNd()->EndOfSectionNode() ), pColl ); // das war der Trenner, -> die verschobenen herstellen - for( USHORT i = pMoves->Count(); i; ) + for( sal_uInt16 i = pMoves->Count(); i; ) { SwTxtNode* pTxtNd = 0; - USHORT nDelPos = 0; + sal_uInt16 nDelPos = 0; SwUndoMove* pUndo = (*pMoves)[ --i ]; if( !pUndo->IsMoveRange() ) { @@ -2144,7 +2144,7 @@ DUMPDOC( &rDoc, String( "d:\\tmp\\tab_") + String( aNewSttNds.Count() - i ) + SwNodeIndex aTmpIdx( *pBox->GetSttNd() ); rDoc.CorrAbs( SwNodeIndex( aTmpIdx, 1 ), SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ), - SwPosition( aTmpIdx, SwIndex( 0, 0 )), TRUE ); + SwPosition( aTmpIdx, SwIndex( 0, 0 )), sal_True ); } delete pBox; @@ -2155,7 +2155,7 @@ DUMPDOC( &rDoc, "d:\\tmp\\tab_z.db" ) CHECKTABLE(pTblNd->GetTable()) - pSaveTbl->CreateNew( pTblNd->GetTable(), TRUE, FALSE ); + pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False ); // TL_CHART2: need to inform chart of probably changed cell names rDoc.UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() ); @@ -2210,11 +2210,11 @@ void SwUndoTblMerge::MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& r void SwUndoTblMerge::SetSelBoxes( const SwSelBoxes& rBoxes ) { // die Selektion merken - for( USHORT n = 0; n < rBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n ) InsertSort( aBoxes, rBoxes[n]->GetSttIdx() ); // als Trennung fuers einfuegen neuer Boxen nach dem Verschieben! - aNewSttNds.Insert( (ULONG)0, aNewSttNds.Count() ); + aNewSttNds.Insert( (sal_uLong)0, aNewSttNds.Count() ); // The new table model does not delete overlapped cells (by row span), // so the rBoxes array might be empty even some cells have been merged. @@ -2245,7 +2245,7 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox, : SwUndo( UNDO_TBLNUMFMT ), pBoxSet( 0 ), pHistory( 0 ), nFmtIdx( NUMBERFORMAT_TEXT ) { - bNewFmt = bNewFml = bNewValue = FALSE; + bNewFmt = bNewFml = bNewValue = sal_False; nNode = rBox.GetSttIdx(); nNdPos = rBox.IsValidNumTxtNd( 0 == pNewSet ); @@ -2277,21 +2277,21 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox, { const SfxPoolItem* pItem; if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMAT, - FALSE, &pItem )) + sal_False, &pItem )) { - bNewFmt = TRUE; + bNewFmt = sal_True; nNewFmtIdx = ((SwTblBoxNumFormat*)pItem)->GetValue(); } if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMULA, - FALSE, &pItem )) + sal_False, &pItem )) { - bNewFml = TRUE; + bNewFml = sal_True; aNewFml = ((SwTblBoxFormula*)pItem)->GetFormula(); } if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_VALUE, - FALSE, &pItem )) + sal_False, &pItem )) { - bNewValue = TRUE; + bNewValue = sal_True; fNewNum = ((SwTblBoxValue*)pItem)->GetValue(); } } @@ -2353,7 +2353,7 @@ void SwUndoTblNumFmt::Undo( SwUndoIter& rIter ) if( pHistory ) { - USHORT nTmpEnd = pHistory->GetTmpEnd(); + sal_uInt16 nTmpEnd = pHistory->GetTmpEnd(); pHistory->TmpRollback( &rDoc, 0 ); pHistory->SetTmpEnd( nTmpEnd ); } @@ -2534,10 +2534,10 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter ) _DEBUG_REDLINE( &rDoc ) SwTableNode* pTblNd = 0; - for( USHORT n = pArr->Count(); n; ) + for( sal_uInt16 n = pArr->Count(); n; ) { _UndoTblCpyTbl_Entry* pEntry = (*pArr)[ --n ]; - ULONG nSttPos = pEntry->nBoxIdx + pEntry->nOffset; + sal_uLong nSttPos = pEntry->nBoxIdx + pEntry->nOffset; SwStartNode* pSNd = rDoc.GetNodes()[ nSttPos ]->StartOfSectionNode(); if( !pTblNd ) pTblNd = pSNd->FindTableNode(); @@ -2616,7 +2616,7 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter ) else *aPam.GetPoint() = SwPosition( aTmpIdx ); } - pUndo = new SwUndoDelete( aPam, bDeleteCompleteParagraph, TRUE ); + pUndo = new SwUndoDelete( aPam, bDeleteCompleteParagraph, sal_True ); } else { @@ -2673,10 +2673,10 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter ) pInsRowUndo->Redo( rIter ); SwTableNode* pTblNd = 0; - for( USHORT n = 0; n < pArr->Count(); ++n ) + for( sal_uInt16 n = 0; n < pArr->Count(); ++n ) { _UndoTblCpyTbl_Entry* pEntry = (*pArr)[ n ]; - ULONG nSttPos = pEntry->nBoxIdx + pEntry->nOffset; + sal_uLong nSttPos = pEntry->nBoxIdx + pEntry->nOffset; SwStartNode* pSNd = rDoc.GetNodes()[ nSttPos ]->StartOfSectionNode(); if( !pTblNd ) pTblNd = pSNd->FindTableNode(); @@ -2688,7 +2688,7 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter ) // b62341295: Redline for copying tables - Start. rDoc.GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() ); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode()); - SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, TRUE ); + SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, sal_True ); if( pEntry->pUndo ) { pEntry->pUndo->Undo( rIter ); @@ -2743,7 +2743,7 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter ) _DEBUG_REDLINE( &rDoc ) } -void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt ) +void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, sal_Bool bDelCntnt ) { if( pArr->Count() && !bDelCntnt ) return; @@ -2760,7 +2760,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt ) SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() ); if( !pDoc->IsRedlineOn() ) - pEntry->pUndo = new SwUndoDelete( aPam, TRUE ); + pEntry->pUndo = new SwUndoDelete( aPam, sal_True ); } pEntry->pBoxNumAttr = new SfxItemSet( pDoc->GetAttrPool(), @@ -2772,7 +2772,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt ) _DEBUG_REDLINE( pDoc ) } -void SwUndoTblCpyTbl::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt ) +void SwUndoTblCpyTbl::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, sal_Bool bDelCntnt ) { _UndoTblCpyTbl_Entry* pEntry = (*pArr)[ pArr->Count() - 1 ]; @@ -2858,7 +2858,7 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, aCellEnd = SwPosition( SwNodeIndex( *rBox.GetSttNd()->EndOfSectionNode() )); SwPaM aTmpPam( aDeleteStart, aCellEnd ); - pUndo = new SwUndoDelete( aTmpPam, TRUE ); + pUndo = new SwUndoDelete( aTmpPam, sal_True ); } SwPosition aCellStart( SwNodeIndex( *rBox.GetSttNd(), 2 ) ); pTxt = aCellStart.nNode.GetNode().GetTxtNode(); @@ -2875,18 +2875,18 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, } -BOOL SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, - USHORT nCnt ) +sal_Bool SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, + sal_uInt16 nCnt ) { SwTableNode* pTblNd = (SwTableNode*)rTbl.GetTabSortBoxes()[0]-> GetSttNd()->FindTableNode(); SwTableSortBoxes aTmpLst( 0, 5 ); pInsRowUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSROW, rBoxes, *pTblNd, - 0, 0, nCnt, TRUE, FALSE ); + 0, 0, nCnt, sal_True, sal_False ); aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() ); - BOOL bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, TRUE ); + sal_Bool bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, sal_True ); if( bRet ) pInsRowUndo->SaveNewBoxes( *pTblNd, aTmpLst ); else @@ -2894,7 +2894,7 @@ BOOL SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, return bRet; } -BOOL SwUndoTblCpyTbl::IsEmpty() const +sal_Bool SwUndoTblCpyTbl::IsEmpty() const { return !pInsRowUndo && !pArr->Count(); } @@ -2924,16 +2924,16 @@ void SwUndoCpyTbl::Undo( SwUndoIter& rIter ) const SfxPoolItem *pItem; if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC, - FALSE, &pItem ) ) + sal_False, &pItem ) ) pNextNd->SetAttr( *pItem ); if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK, - FALSE, &pItem ) ) + sal_False, &pItem ) ) pNextNd->SetAttr( *pItem ); } SwPaM aPam( *pTNd, *pTNd->EndOfSectionNode(), 0 , 1 ); - pDel = new SwUndoDelete( aPam, TRUE ); + pDel = new SwUndoDelete( aPam, sal_True ); } void SwUndoCpyTbl::Redo( SwUndoIter& rIter ) @@ -2946,7 +2946,7 @@ void SwUndoCpyTbl::Redo( SwUndoIter& rIter ) /* */ SwUndoSplitTbl::SwUndoSplitTbl( const SwTableNode& rTblNd, - SwSaveRowSpan* pRowSp, USHORT eMode, BOOL bNewSize ) + SwSaveRowSpan* pRowSp, sal_uInt16 eMode, sal_Bool bNewSize ) : SwUndo( UNDO_SPLIT_TABLE ), nTblNode( rTblNd.GetIndex() ), nOffset( 0 ), mpSaveRowSpan( pRowSp ), pSavTbl( 0 ), pHistory( 0 ), nMode( eMode ), nFmlEnd( 0 ), bCalcNewSize( bNewSize ) @@ -2958,7 +2958,7 @@ SwUndoSplitTbl::SwUndoSplitTbl( const SwTableNode& rTblNd, // kein break; case HEADLINE_BORDERCOPY: case HEADLINE_BOXATTRCOPY: - pSavTbl = new _SaveTable( rTblNd.GetTable(), 1, FALSE ); + pSavTbl = new _SaveTable( rTblNd.GetTable(), 1, sal_False ); break; } } @@ -3000,7 +3000,7 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter ) case HEADLINE_BOXATTRCOPY: case HEADLINE_BORDERCOPY: { - pSavTbl->CreateNew( rTbl, FALSE ); + pSavTbl->CreateNew( rTbl, sal_False ); pSavTbl->RestoreAttr( rTbl ); } break; @@ -3010,11 +3010,11 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter ) { SwSelBoxes aSelBoxes; SwTableBox* pBox = rTbl.GetTblBox( nTblNode + nOffset + 1 ); - rTbl.SelLineFromBox( pBox, aSelBoxes, TRUE ); + rTbl.SelLineFromBox( pBox, aSelBoxes, sal_True ); _FndBox aTmpBox( 0, 0 ); aTmpBox.SetTableLines( aSelBoxes, rTbl ); aTmpBox.DelFrms( rTbl ); - rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, FALSE, FALSE ); + rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, sal_False, sal_False ); } break; } @@ -3069,7 +3069,7 @@ void SwUndoSplitTbl::SaveFormula( SwHistory& rHistory ) SwUndoMergeTbl::SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd, - BOOL bWithPrv, USHORT nMd ) + sal_Bool bWithPrv, sal_uInt16 nMd ) : SwUndo( UNDO_MERGE_TABLE ), pSavTbl( 0 ), pHistory( 0 ), nMode( nMd ), bWithPrev( bWithPrv ) { @@ -3114,7 +3114,7 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter ) aFndBox.DelFrms( *pTbl ); // ? TL_CHART2: notification or locking of controller required ? - SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx, TRUE, FALSE ); + SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx, sal_True, sal_False ); //Layout updaten aFndBox.MakeFrms( *pTbl ); @@ -3130,7 +3130,7 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter ) pTbl = &pNew->GetTable(); pTbl->GetFrmFmt()->SetName( aName ); -// pSavTbl->CreateNew( *pTbl, FALSE ); +// pSavTbl->CreateNew( *pTbl, sal_False ); pSavTbl->RestoreAttr( *pTbl ); @@ -3195,9 +3195,9 @@ void SwUndoMergeTbl::SaveFormula( SwHistory& rHistory ) /* */ -void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos ) +void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos ) { - USHORT nO = rArr.Count(), nM, nU = 0; + sal_uInt16 nO = rArr.Count(), nM, nU = 0; if( nO > 0 ) { nO--; @@ -3206,7 +3206,7 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos ) nM = nU + ( nO - nU ) / 2; if( *(rArr.GetData() + nM) == nIdx ) { - ASSERT( FALSE, "Index ist schon vorhanden, darf nie sein!" ); + ASSERT( sal_False, "Index ist schon vorhanden, darf nie sein!" ); return; } if( *(rArr.GetData() + nM) < nIdx ) @@ -3222,9 +3222,9 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos ) *pInsPos = nU; } -void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos ) +void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos ) { - USHORT nO = rArr.Count(), nM, nU = 0; + sal_uInt16 nO = rArr.Count(), nM, nU = 0; if( nO > 0 ) { nO--; @@ -3233,7 +3233,7 @@ void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos ) nM = nU + ( nO - nU ) / 2; if( *(rArr.GetData() + nM) == nIdx ) { - ASSERT( FALSE, "Index ist schon vorhanden, darf nie sein!" ); + ASSERT( sal_False, "Index ist schon vorhanden, darf nie sein!" ); return; } if( *(rArr.GetData() + nM) < nIdx ) @@ -3273,7 +3273,7 @@ void CheckTable( const SwTable& rTbl ) { const SwNodes& rNds = rTbl.GetFrmFmt()->GetDoc()->GetNodes(); const SwTableSortBoxes& rSrtArr = pTblNd->GetTable().GetTabSortBoxes(); - for( USHORT n = 0; n < rSrtArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < rSrtArr.Count(); ++n ) { const SwTableBox* pBox = rSrtArr[ n ]; const SwNode* pNd = pBox->GetSttNd(); diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index e9e7ce1e0e02..eb560b2585bc 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -46,7 +46,7 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) : SwUndo( nUndoId ), SwUndRng( rPam ), pTxtFmtColl( 0 ), pLastNdColl(0), pFrmFmts( 0 ), pFlyUndos(0), pRedlData( 0 ), - bSttWasTxtNd( TRUE ), nNdDiff( 0 ), pPos( 0 ), nSetPos( 0 ) + bSttWasTxtNd( sal_True ), nNdDiff( 0 ), pPos( 0 ), nSetPos( 0 ) { pHistory = new SwHistory; SwDoc* pDoc = (SwDoc*)rPam.GetDoc(); @@ -62,8 +62,8 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) if( !nSttCntnt ) // dann werden Flys mitgenommen !! { - USHORT nArrLen = pDoc->GetSpzFrmFmts()->Count(); - for( USHORT n = 0; n < nArrLen; ++n ) + sal_uInt16 nArrLen = pDoc->GetSpzFrmFmts()->Count(); + for( sal_uInt16 n = 0; n < nArrLen; ++n ) { SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n]; SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); @@ -89,8 +89,8 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) // setze den Destination-Bereich nach dem Einlesen. -void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys, - BOOL bSttIsTxtNd ) +void SwUndoInserts::SetInsertRange( const SwPaM& rPam, sal_Bool bScanFlys, + sal_Bool bSttIsTxtNd ) { const SwPosition* pTmpPos = rPam.End(); nEndNode = pTmpPos->nNode.GetIndex(); @@ -108,7 +108,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys, if( !bSttIsTxtNd ) // wird eine Tabellenselektion eingefuegt, { ++nSttNode; // dann stimmt der CopyPam nicht ganz - bSttWasTxtNd = FALSE; + bSttWasTxtNd = sal_False; } } @@ -117,8 +117,8 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys, // dann alle neuen Flys zusammen sammeln !! SwDoc* pDoc = (SwDoc*)rPam.GetDoc(); pFlyUndos = new SwUndos(); - USHORT nFndPos, nArrLen = pDoc->GetSpzFrmFmts()->Count(); - for( USHORT n = 0; n < nArrLen; ++n ) + sal_uInt16 nFndPos, nArrLen = pDoc->GetSpzFrmFmts()->Count(); + for( sal_uInt16 n = 0; n < nArrLen; ++n ) { SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n]; SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); @@ -176,15 +176,15 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter ) SwPaM * pPam = rUndoIter.pAktPam; SwDoc* pDoc = pPam->GetDoc(); SetPaM( rUndoIter ); - BOOL bUndo = pDoc->DoesUndo(); - pDoc->DoUndo( FALSE ); + sal_Bool bUndo = pDoc->DoesUndo(); + pDoc->DoUndo( sal_False ); if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) pDoc->DeleteRedline( *pPam, true, USHRT_MAX ); // sind an Point/Mark 2 unterschiedliche TextNodes, dann muss ein // JoinNext ausgefuehrt werden. - BOOL bJoinNext = nSttNode != nEndNode && + sal_Bool bJoinNext = nSttNode != nEndNode && pPam->GetMark()->nNode.GetNode().GetTxtNode() && pPam->GetPoint()->nNode.GetNode().GetTxtNode(); @@ -199,7 +199,7 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter ) pLastNdColl = pTxtNd->GetTxtColl(); } - RemoveIdxFromRange( *pPam, FALSE ); + RemoveIdxFromRange( *pPam, sal_False ); SetPaM( rUndoIter ); // sind Fussnoten oder CntntFlyFrames im Text ?? @@ -220,8 +220,8 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter ) if( pFlyUndos ) { - ULONG nTmp = pPam->GetPoint()->nNode.GetIndex(); - for( USHORT n = pFlyUndos->Count(); n; ) + sal_uLong nTmp = pPam->GetPoint()->nNode.GetIndex(); + for( sal_uInt16 n = pFlyUndos->Count(); n; ) (*pFlyUndos)[ --n ]->Undo( rUndoIter ); nNdDiff += nTmp - pPam->GetPoint()->nNode.GetIndex(); } @@ -293,10 +293,10 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter ) // alte Anfangs-Position fuers Rollback zurueckholen if( ( nSttNode != nEndNode || nSttCntnt != nEndCntnt ) && pPos ) { - BOOL bMvBkwrd = MovePtBackward( *pPam ); + sal_Bool bMvBkwrd = MovePtBackward( *pPam ); // Inhalt wieder einfuegen. (erst pPos abmelden !!) - ULONG nMvNd = pPos->nNode.GetIndex(); + sal_uLong nMvNd = pPos->nNode.GetIndex(); xub_StrLen nMvCnt = pPos->nContent.GetIndex(); DELETEZ( pPos ); MoveFromUndoNds( *pDoc, nMvNd, nMvCnt, *pPam->GetMark() ); @@ -322,7 +322,7 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter ) } if( pFlyUndos ) - for( USHORT n = pFlyUndos->Count(); n; ) + for( sal_uInt16 n = pFlyUndos->Count(); n; ) (*pFlyUndos)[ --n ]->Redo( rUndoIter ); pHistory->Rollback( pDoc, nSetPos ); |