diff options
Diffstat (limited to 'sw/source/core/crsr/crstrvl.cxx')
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 339 |
1 files changed, 191 insertions, 148 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 045405247c90..3270ca0a0e7e 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -37,6 +37,7 @@ #include <svx/svdobj.hxx> #include <crsrsh.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <pagefrm.hxx> #include <cntfrm.hxx> #include <rootfrm.hxx> @@ -79,9 +80,9 @@ using namespace ::com::sun::star; // zum naechsten/vorhergehenden Punkt auf gleicher Ebene -BOOL SwCrsrShell::GotoNextNum() +sal_Bool SwCrsrShell::GotoNextNum() { - BOOL bRet = GetDoc()->GotoNextNum( *pCurCrsr->GetPoint() ); + sal_Bool bRet = GetDoc()->GotoNextNum( *pCurCrsr->GetPoint() ); if( bRet ) { SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, @@ -119,9 +120,9 @@ BOOL SwCrsrShell::GotoNextNum() } -BOOL SwCrsrShell::GotoPrevNum() +sal_Bool SwCrsrShell::GotoPrevNum() { - BOOL bRet = GetDoc()->GotoPrevNum( *pCurCrsr->GetPoint() ); + sal_Bool bRet = GetDoc()->GotoPrevNum( *pCurCrsr->GetPoint() ); if( bRet ) { SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, @@ -160,7 +161,7 @@ BOOL SwCrsrShell::GotoPrevNum() // springe aus dem Content zum Header -BOOL SwCrsrShell::GotoHeaderTxt() +sal_Bool SwCrsrShell::GotoHeaderTxt() { const SwFrm* pFrm = GetCurrFrm()->FindPageFrm(); while( pFrm && !pFrm->IsHeaderFrm() ) @@ -189,7 +190,7 @@ BOOL SwCrsrShell::GotoHeaderTxt() // springe aus dem Content zum Footer -BOOL SwCrsrShell::GotoFooterTxt() +sal_Bool SwCrsrShell::GotoFooterTxt() { const SwPageFrm* pFrm = GetCurrFrm()->FindPageFrm(); if( pFrm ) @@ -225,9 +226,9 @@ BOOL SwCrsrShell::GotoFooterTxt() return 0 != pFrm; } -BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader ) +sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, sal_Bool bInHeader ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwDoc *pMyDoc = GetDoc(); SET_CURR_SHELL( this ); @@ -237,7 +238,7 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader ) // dann den akt. nehmen const SwPageFrm* pPage = GetCurrFrm()->FindPageFrm(); if( pPage ) - for( USHORT i = 0; i < pMyDoc->GetPageDescCnt(); ++i ) + for( sal_uInt16 i = 0; i < pMyDoc->GetPageDescCnt(); ++i ) if( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc)->GetPageDesc( i ) ) { @@ -276,7 +277,11 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader ) const SwFrm* pFrm; Point aPt( pCurCrsr->GetPtPos() ); +<<<<<<< local if( pCNd && 0 != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, FALSE ) )) +======= + if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt, 0, sal_False ) )) +>>>>>>> other { // dann kann der Cursor ja auch hinein gesetzt werden SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen @@ -300,13 +305,13 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader ) // springe zum naechsten Verzeichnis -BOOL SwCrsrShell::GotoNextTOXBase( const String* pName ) +sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const SwSectionFmts& rFmts = GetDoc()->GetSections(); SwCntntNode* pFnd = 0; - for( USHORT n = rFmts.Count(); n; ) + for( sal_uInt16 n = rFmts.Count(); n; ) { const SwSection* pSect = rFmts[ --n ]->GetSection(); const SwSectionNode* pSectNd; @@ -350,13 +355,13 @@ BOOL SwCrsrShell::GotoNextTOXBase( const String* pName ) // springe zum vorherigen Verzeichnis -BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName ) +sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const SwSectionFmts& rFmts = GetDoc()->GetSections(); SwCntntNode* pFnd = 0; - for( USHORT n = rFmts.Count(); n; ) + for( sal_uInt16 n = rFmts.Count(); n; ) { const SwSection* pSect = rFmts[ --n ]->GetSection(); const SwSectionNode* pSectNd; @@ -400,12 +405,12 @@ BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName ) // springe zum Verzeichnis vom TOXMark -BOOL SwCrsrShell::GotoTOXMarkBase() +sal_Bool SwCrsrShell::GotoTOXMarkBase() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwTOXMarks aMarks; - USHORT nCnt = GetDoc()->GetCurTOXMark( *pCurCrsr->GetPoint(), aMarks ); + sal_uInt16 nCnt = GetDoc()->GetCurTOXMark( *pCurCrsr->GetPoint(), aMarks ); if( nCnt ) { // dann nehme den 1. und hole den Verzeichnis-Typ. @@ -451,12 +456,12 @@ BOOL SwCrsrShell::GotoTOXMarkBase() // springe zur naechsten (vorherigen) Tabellenformel // optional auch nur zu kaputten Formeln springen -BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) +sal_Bool SwCrsrShell::GotoNxtPrvTblFormula( sal_Bool bNext, sal_Bool bOnlyErrors ) { if( IsTableMode() ) - return FALSE; + return sal_False; - BOOL bFnd = FALSE; + sal_Bool bFnd = sal_False; SwPosition& rPos = *pCurCrsr->GetPoint(); Point aPt; @@ -478,8 +483,13 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) if( rPos.nNode < GetDoc()->GetNodes().GetEndOfExtras() ) // auch beim Einsammeln wird nur der erste Frame benutzt! +<<<<<<< local aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aPt, &rPos, FALSE ) ); +======= + aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->GetFrm( + &aPt, &rPos, sal_False ) ); +>>>>>>> other { const SfxPoolItem* pItem; @@ -498,7 +508,11 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) const SwCntntFrm* pCFrm; SwNodeIndex aIdx( *pTBox->GetSttNd() ); const SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); +<<<<<<< local if( pCNd && 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, FALSE ) ) && +======= + if( pCNd && 0 != ( pCFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ) && +>>>>>>> other (IsReadOnlyAvailable() || !pCFrm->IsProtected() )) { _SetGetExpFld aCmp( *pTBox ); @@ -508,7 +522,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) : ( aCmp < aCurGEF && aFndGEF < aCmp )) { aFndGEF = aCmp; - bFnd = TRUE; + bFnd = sal_True; } } } @@ -532,12 +546,12 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) } // springe zum naechsten (vorherigen) Verzeichniseintrag -BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext ) +sal_Bool SwCrsrShell::GotoNxtPrvTOXMark( sal_Bool bNext ) { if( IsTableMode() ) - return FALSE; + return sal_False; - BOOL bFnd = FALSE; + sal_Bool bFnd = sal_False; SwPosition& rPos = *pCurCrsr->GetPoint(); Point aPt; @@ -549,7 +563,11 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext ) if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() ) // auch beim Einsammeln wird nur der erste Frame benutzt! aCurGEF.SetBodyPos( *rPos.nNode.GetNode(). +<<<<<<< local GetCntntNode()->getLayoutFrm( GetLayout(), &aPt, &rPos, FALSE ) ); +======= + GetCntntNode()->GetFrm( &aPt, &rPos, sal_False ) ); +>>>>>>> other { const SfxPoolItem* pItem; @@ -563,7 +581,11 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext ) RES_TXTATR_TOXMARK, n ) ) && 0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) && ( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() && +<<<<<<< local 0 != ( pCFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt, 0, FALSE )) && +======= + 0 != ( pCFrm = pTxtNd->GetFrm( &aPt, 0, sal_False )) && +>>>>>>> other ( IsReadOnlyAvailable() || !pCFrm->IsProtected() )) { SwNodeIndex aNdIndex( *pTxtNd ); // UNIX benoetigt dieses Obj. @@ -574,7 +596,7 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext ) : ( aCmp < aCurGEF && aFndGEF < aCmp )) { aFndGEF = aCmp; - bFnd = TRUE; + bFnd = sal_True; } } } @@ -624,16 +646,23 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart, // springe zum naechsten / vorherigen FeldTypen void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType, - USHORT nSubType, BOOL bInReadOnly, - BOOL bChkInpFlag = FALSE ) + sal_uInt16 nSubType, sal_Bool bInReadOnly, + sal_Bool bChkInpFlag = sal_False ) { // es muss immer der 1. Frame gesucht werden Point aPt; SwTxtFld* pTxtFld; +<<<<<<< local SwIterator<SwFmtFld,SwFieldType> aIter(rFldType); BOOL bSubType = nSubType != USHRT_MAX; for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() ) if( 0 != ( pTxtFld = pFmtFld->GetTxtFld() ) && +======= + SwClientIter aIter( (SwFieldType&)rFldType ); + sal_Bool bSubType = nSubType != USHRT_MAX; + for( SwClient* pLast = aIter.First( TYPE( SwFmtFld )); pLast; pLast = aIter.Next() ) + if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) && +>>>>>>> other ( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFld().GetFld()) ->GetInputFlag() ) && (!bSubType || (pFmtFld->GetFld()->GetSubType() @@ -641,7 +670,11 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType, { SwCntntFrm* pCFrm; const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode(); +<<<<<<< local if( 0 != ( pCFrm = rTxtNode.getLayoutFrm( rTxtNode.GetDoc()->GetCurrentLayout(), &aPt, 0, FALSE )) && +======= + if( 0 != ( pCFrm = rTxtNode.GetFrm( &aPt, 0, sal_False )) && +>>>>>>> other ( bInReadOnly || !pCFrm->IsProtected() )) { _SetGetExpFld* pNew = new _SetGetExpFld( @@ -653,8 +686,8 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType, } -BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, - USHORT nSubType, USHORT nResType ) +sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext, + sal_uInt16 nSubType, sal_uInt16 nResType ) { // sortierte Liste aller Felder _SetGetExpFlds aSrtLst( 64 ); @@ -662,7 +695,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, if (pFldType) { if( RES_INPUTFLD != pFldType->Which() && !pFldType->GetDepends() ) - return FALSE; + return sal_False; // Modify-Object gefunden, trage alle Felder ins Array ein ::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType, IsReadOnlyAvailable() ); @@ -671,22 +704,22 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, { // es gibt noch versteckte InputFelder in den SetExp. Feldern const SwFldTypes& rFldTypes = *pDoc->GetFldTypes(); - const USHORT nSize = rFldTypes.Count(); + const sal_uInt16 nSize = rFldTypes.Count(); // Alle Typen abklappern - for( USHORT i=0; i < nSize; ++i ) + for( sal_uInt16 i=0; i < nSize; ++i ) if( RES_SETEXPFLD == ( pFldType = rFldTypes[ i ] )->Which() ) ::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType, - IsReadOnlyAvailable(), TRUE ); + IsReadOnlyAvailable(), sal_True ); } } else { const SwFldTypes& rFldTypes = *pDoc->GetFldTypes(); - const USHORT nSize = rFldTypes.Count(); + const sal_uInt16 nSize = rFldTypes.Count(); // Alle Typen abklappern - for( USHORT i=0; i < nSize; ++i ) + for( sal_uInt16 i=0; i < nSize; ++i ) if( nResType == ( pFldType = rFldTypes[ i ] )->Which() ) ::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType, IsReadOnlyAvailable() ); @@ -694,9 +727,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, // keine Felder gefunden? if( !aSrtLst.Count() ) - return FALSE; + return sal_False; - USHORT nPos; + sal_uInt16 nPos; SwCursor* pCrsr = getShellCrsr( true ); { // JP 19.08.98: es muss immer ueber das Feld gesucht werden, damit @@ -711,7 +744,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, SwTxtFld * pTxtFld = static_cast<SwTxtFld *>( pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(), RES_TXTATR_FIELD)); - BOOL bDelFld = 0 == pTxtFld; + sal_Bool bDelFld = 0 == pTxtFld; if( bDelFld ) { SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField( @@ -726,10 +759,14 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, { // auch beim Einsammeln wird nur der erste Frame benutzt! Point aPt; +<<<<<<< local aSrch.SetBodyPos( *pTNd->getLayoutFrm( GetLayout(), &aPt, &rPos, FALSE ) ); +======= + aSrch.SetBodyPos( *pTNd->GetFrm( &aPt, &rPos, sal_False ) ); +>>>>>>> other } - BOOL bFound = aSrtLst.Seek_Entry( &aSrch, &nPos ); + sal_Bool bFound = aSrtLst.Seek_Entry( &aSrch, &nPos ); if( bDelFld ) { delete (SwFmtFld*)&pTxtFld->GetAttr(); @@ -741,13 +778,13 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, if( bNext ) { if( ++nPos >= aSrtLst.Count() ) - return FALSE; // schon am Ende + return sal_False; // schon am Ende } else if( !nPos-- ) - return FALSE; // weiter nach vorne geht nicht + return sal_False; // weiter nach vorne geht nicht } else if( bNext ? nPos >= aSrtLst.Count() : !nPos--) - return FALSE; + return sal_False; } const _SetGetExpFld& rFnd = **( aSrtLst.GetData() + nPos ); @@ -757,7 +794,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, SwCrsrSaveState aSaveState( *pCrsr ); rFnd.GetPosOfContent( *pCrsr->GetPoint() ); - BOOL bRet = !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | + sal_Bool bRet = !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ); if( bRet ) UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); @@ -765,9 +802,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext, } -BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld ) +sal_Bool SwCrsrShell::GotoFld( const SwFmtFld& rFld ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rFld.GetTxtFld() ) { SET_CURR_SHELL( this ); @@ -788,7 +825,7 @@ BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld ) } -void SwCrsrShell::GotoOutline( USHORT nIdx ) +void SwCrsrShell::GotoOutline( sal_uInt16 nIdx ) { SwCursor* pCrsr = getShellCrsr( true ); @@ -806,7 +843,7 @@ void SwCrsrShell::GotoOutline( USHORT nIdx ) } -BOOL SwCrsrShell::GotoOutline( const String& rName ) +sal_Bool SwCrsrShell::GotoOutline( const String& rName ) { SwCursor* pCrsr = getShellCrsr( true ); @@ -814,29 +851,29 @@ BOOL SwCrsrShell::GotoOutline( const String& rName ) SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen SwCrsrSaveState aSaveState( *pCrsr ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pDoc->GotoOutline( *pCrsr->GetPoint(), rName ) && !pCrsr->IsSelOvr() ) { UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); - bRet = TRUE; + bRet = sal_True; } return bRet; } -BOOL SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num. +sal_Bool SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num. { SwCursor* pCrsr = getShellCrsr( true ); const SwNodes& rNds = GetDoc()->GetNodes(); SwNode* pNd = pCrsr->GetNode(); - USHORT nPos; + sal_uInt16 nPos; if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos )) ++nPos; if( nPos == rNds.GetOutLineNds().Count() ) - return FALSE; + return sal_False; pNd = rNds.GetOutLineNds()[ nPos ]; @@ -846,30 +883,30 @@ BOOL SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num. pCrsr->GetPoint()->nNode = *pNd; pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)pNd, 0 ); - BOOL bRet = !pCrsr->IsSelOvr(); + sal_Bool bRet = !pCrsr->IsSelOvr(); if( bRet ) UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); return bRet; } -BOOL SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num. +sal_Bool SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num. { SwCursor* pCrsr = getShellCrsr( true ); const SwNodes& rNds = GetDoc()->GetNodes(); SwNode* pNd = pCrsr->GetNode(); - USHORT nPos; + sal_uInt16 nPos; rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( nPos ) { --nPos; // davor pNd = rNds.GetOutLineNds()[ nPos ]; if( pNd->GetIndex() > pCrsr->GetPoint()->nNode.GetIndex() ) - return FALSE; + return sal_False; SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen @@ -887,13 +924,13 @@ BOOL SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num. // suche die "Outline-Position" vom vorherigen Outline-Node mit dem // Level. -USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel ) +sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel ) { SwPaM* pCrsr = getShellCrsr( true ); const SwNodes& rNds = GetDoc()->GetNodes(); SwNode* pNd = pCrsr->GetNode(); - USHORT nPos; + sal_uInt16 nPos; if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos )) nPos++; // steht auf der Position, fuers while zum Naechsten @@ -910,13 +947,13 @@ USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel ) } -BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos, - BOOL bWithChilds ) +sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, + sal_Bool bWithChilds ) { const SwNodes& rNds = GetDoc()->GetNodes(); const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds(); if( !rOutlNds.Count() ) // wie jetzt ??? - return FALSE; + return sal_False; SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen @@ -924,7 +961,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos, if( nSttPos > nEndPos ) // sollte jemand das vertauscht haben? { ASSERT( !this, "Start- > Ende-Position im Array" ); - USHORT nTmp = nSttPos; + sal_uInt16 nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp; } @@ -934,12 +971,12 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos, if( bWithChilds ) { - //BYTE nLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei + //sal_uInt8 nLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end.zhaojianwei for( ++nEndPos; nEndPos < rOutlNds.Count(); ++nEndPos ) { pEndNd = rOutlNds[ nEndPos ]; - //BYTE nNxtLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei + //sal_uInt8 nNxtLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei if( nNxtLevel <= nLevel ) break; // EndPos steht jetzt auf dem naechsten @@ -964,7 +1001,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos, pCurCrsr->Move( fnMoveBackward, fnGoNode ); // ans Ende vom Vorgaenger // und schon ist alles selektiert - BOOL bRet = !pCurCrsr->IsSelOvr(); + sal_Bool bRet = !pCurCrsr->IsSelOvr(); if( bRet ) UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); return bRet; @@ -972,14 +1009,14 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos, // springe zu dieser Refmark -BOOL SwCrsrShell::GotoRefMark( const String& rRefMark, USHORT nSubType, - USHORT nSeqNo ) +sal_Bool SwCrsrShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType, + sal_uInt16 nSeqNo ) { SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen SwCrsrSaveState aSaveState( *pCurCrsr ); - USHORT nPos; + sal_uInt16 nPos; SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( GetDoc(), rRefMark, nSubType, nSeqNo, &nPos ); if( pTxtNd && pTxtNd->GetNodes().IsDocNodes() ) @@ -990,26 +1027,26 @@ BOOL SwCrsrShell::GotoRefMark( const String& rRefMark, USHORT nSubType, if( !pCurCrsr->IsSelOvr() ) { UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -BOOL SwCrsrShell::IsPageAtPos( const Point &rPt ) const +sal_Bool SwCrsrShell::IsPageAtPos( const Point &rPt ) const { if( GetLayout() ) return 0 != GetLayout()->GetPageAtPos( rPt ); - return FALSE; + return sal_False; } -BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, +sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt, SwContentAtPos& rCntntAtPos, - BOOL bSetCrsr, + sal_Bool bSetCrsr, SwRect* pFldRect ) { SET_CURR_SHELL( this ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( !IsTableMode() ) { @@ -1020,16 +1057,16 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, SwCntntFrm *pFrm(0); SwTxtAttr* pTxtAttr; SwCrsrMoveState aTmpState; - aTmpState.bFieldInfo = TRUE; + aTmpState.bFieldInfo = sal_True; aTmpState.bExactOnly = !( SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos ); - aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) ? TRUE : FALSE; + aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) ? sal_True : sal_False; aTmpState.bSetInReadOnly = IsReadOnlyAvailable(); SwSpecialPos aSpecialPos; aTmpState.pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos ) ? &aSpecialPos : 0; - const BOOL bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ); + const sal_Bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState ); pTxtNd = aPos.nNode.GetNode().GetTxtNode(); const SwNodes& rNds = GetDoc()->GetNodes(); @@ -1041,14 +1078,14 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, { rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_OUTLINE; rCntntAtPos.sStr = pONd->GetExpandTxt( 0, STRING_LEN, true ); - bRet = TRUE; + bRet = sal_True; } } // --> FME 2005-05-13 #i43742# New function: SW_CONTENT_CHECK else if ( SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos && bCrsrFoundExact ) { - bRet = TRUE; + bRet = sal_True; } // <-- // #i23726# @@ -1076,17 +1113,17 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, if ( pSmartTagList && pSmartTagList->InWrongWord( nCurrent, nLen ) && !pTxtNd->IsSymbol(nBegin) ) { - const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin ); + const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin ); const SwWrongList* pSubList = pSmartTagList->SubList( nIndex ); if ( pSubList ) { nCurrent = aTmpState.pSpecialPos->nCharOfst; if ( pSubList->InWrongWord( nCurrent, nLen ) ) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; + bRet = sal_True; if( bRet && bSetCrsr ) { @@ -1096,7 +1133,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, *pCurCrsr->GetPoint() = aPos; if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) - bRet = FALSE; + bRet = sal_False; else UpdateCrsr(); } @@ -1105,7 +1142,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, // rCntntAtPos.sStr = pTxtNd->GetExpandTxt( // *pTxtAttr->GetStart(), // *pTxtAttr->GetEnd() - *pTxtAttr->GetStart(), -// FALSE ); +// sal_False ); // rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr(); rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG; @@ -1167,7 +1204,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, rCntntAtPos.aFnd.pFld = pFld; rCntntAtPos.pFndTxtAttr = pTxtAttr; rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FIELD; - bRet = TRUE; + bRet = sal_True; } } @@ -1178,7 +1215,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, if( bCrsrFoundExact && pTxtNd && pFldBookmark) { rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL; rCntntAtPos.aFnd.pFldmark = pFldBookmark; - bRet=TRUE; + bRet=sal_True; } } @@ -1187,12 +1224,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, if( aTmpState.bFtnNoInfo ) { // stehe ueber dem Zeichen der Fussnote (??) - bRet = TRUE; + bRet = sal_True; if( bSetCrsr ) { *pCurCrsr->GetPoint() = aPos; if( !GotoFtnAnchor() ) - bRet = FALSE; + bRet = sal_False; } if( bRet ) rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FTN; @@ -1200,7 +1237,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, else if ( 0 != ( pTxtAttr = pTxtNd->GetTxtAttrForCharAt( aPos.nContent.GetIndex(), RES_TXTATR_FTN )) ) { - bRet = TRUE; + bRet = sal_True; if( bSetCrsr ) { SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, @@ -1208,19 +1245,19 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, pCurCrsr->GetPoint()->nNode = *((SwTxtFtn*)pTxtAttr)->GetStartNode(); SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection( &pCurCrsr->GetPoint()->nNode, - TRUE, !IsReadOnlyAvailable() ); + sal_True, !IsReadOnlyAvailable() ); if( pCNd ) { pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 ); if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE )) - bRet = FALSE; + bRet = sal_False; else UpdateCrsr(); } else - bRet = FALSE; + bRet = sal_False; } if( bRet ) @@ -1265,7 +1302,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, if( pTxtAttr ) { - bRet = TRUE; + bRet = sal_True; if( bSetCrsr ) { SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, @@ -1274,7 +1311,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, *pCurCrsr->GetPoint() = aPos; if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ) ) - bRet = FALSE; + bRet = sal_False; else UpdateCrsr(); } @@ -1311,7 +1348,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, // nur INetAttrs mit URLs "erkennen" if( pTxtAttr && pTxtAttr->GetINetFmt().GetValue().Len() ) { - bRet = TRUE; + bRet = sal_True; if( bSetCrsr ) { SwCrsrSaveState aSaveState( *pCurCrsr ); @@ -1320,7 +1357,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, *pCurCrsr->GetPoint() = aPos; if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) - bRet = FALSE; + bRet = sal_False; else UpdateCrsr(); } @@ -1348,7 +1385,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, rCntntAtPos.aFnd.pRedl = pRedl; rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE; rCntntAtPos.pFndTxtAttr = 0; - bRet = TRUE; + bRet = sal_True; if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) ) pFrm->GetCharRect( *pFldRect, aPos, &aTmpState ); @@ -1372,12 +1409,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, pSttNd->GetIndex() )) && #ifdef DBG_UTIL ( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( - RES_BOXATR_FORMULA, FALSE, &pItem ) || + RES_BOXATR_FORMULA, sal_False, &pItem ) || SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( - RES_BOXATR_VALUE, FALSE, &pItem )) + RES_BOXATR_VALUE, sal_False, &pItem )) #else SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState( - RES_BOXATR_FORMULA, FALSE, &pItem ) + RES_BOXATR_FORMULA, sal_False, &pItem ) #endif ) { @@ -1411,7 +1448,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, #endif ((SwTblBoxFormula*)pItem)->PtrToBoxNm( &pTblNd->GetTable() ); - bRet = TRUE; + bRet = sal_True; if( bSetCrsr ) { SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, @@ -1419,7 +1456,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, *pCurCrsr->GetPoint() = aPos; if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) ) - bRet = FALSE; + bRet = sal_False; else UpdateCrsr(); } @@ -1446,7 +1483,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, POOLATTR_END - 1 ); if( pTxtNd->GetpSwpHints() ) { - for( USHORT i = 0; i < pTxtNd->GetSwpHints().Count(); ++i ) + for( sal_uInt16 i = 0; i < pTxtNd->GetSwpHints().Count(); ++i ) { const SwTxtAttr* pHt = pTxtNd->GetSwpHints()[i]; xub_StrLen nAttrStart = *pHt->GetStart(); @@ -1495,7 +1532,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, String sAttrs; SfxItemIter aIter( aSet ); const SfxPoolItem* pItem = aIter.FirstItem(); - while( TRUE ) + while( sal_True ) { if( !IsInvalidItem( pItem )) { @@ -1521,7 +1558,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt, += sAttrs; } } - bRet = TRUE; + bRet = sal_True; rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_CURR_ATTRS; } #endif @@ -1562,7 +1599,7 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const // <-- // befindet sich der Node in einem geschuetzten Bereich? -BOOL SwContentAtPos::IsInProtectSect() const +sal_Bool SwContentAtPos::IsInProtectSect() const { const SwTxtNode* pNd = 0; if( pFndTxtAttr ) @@ -1589,7 +1626,11 @@ BOOL SwContentAtPos::IsInProtectSect() const const SwCntntFrm* pFrm; return pNd && ( pNd->IsInProtectSect() || +<<<<<<< local ( 0 != ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), 0,0,FALSE)) && +======= + ( 0 != ( pFrm = pNd->GetFrm(0,0,sal_False)) && +>>>>>>> other pFrm->IsProtected() )); } bool SwContentAtPos::IsInRTLText()const @@ -1626,11 +1667,11 @@ bool SwContentAtPos::IsInRTLText()const return bRet; } -BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand, +sal_Bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pTxtAttr ) { SET_CURR_SHELL( this ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( !IsTableMode() ) { @@ -1659,7 +1700,7 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand, if( !pCurCrsr->IsSelOvr() ) { UpdateCrsr(); - bRet = TRUE; + bRet = sal_True; } } } @@ -1667,9 +1708,9 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand, } -BOOL SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr ) +sal_Bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rAttr.GetpTxtNode() ) { SwCursor* pCrsr = getShellCrsr( true ); @@ -1694,14 +1735,15 @@ const SwFmtINetFmt* SwCrsrShell::FindINetAttr( const String& rName ) const return pDoc->FindINetAttr( rName ); } -BOOL SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, +sal_Bool SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, SwRect& rRect, sal_Int16& rOrient ) { SET_CURR_SHELL( this ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; - if( !IsTableMode() && !HasSelection() && GetDoc()->DoesUndo() ) + if (!IsTableMode() && !HasSelection() + && GetDoc()->GetIDocumentUndoRedo().DoesUndo()) { Point aPt( rPt ); SwPosition aPos( *pCurCrsr->GetPoint() ); @@ -1715,18 +1757,19 @@ BOOL SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, // Start-Position im geschuetzten Bereich? rRect = aFPos.aCrsr; rOrient = aFPos.eOrient; - bRet = TRUE; + bRet = sal_True; } } return bRet; } -BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) +sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) { SET_CURR_SHELL( this ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; - if( !IsTableMode() && !HasSelection() && GetDoc()->DoesUndo() ) + if (!IsTableMode() && !HasSelection() + && GetDoc()->GetIDocumentUndoRedo().DoesUndo()) { Point aPt( rPt ); SwPosition aPos( *pCurCrsr->GetPoint() ); @@ -1750,7 +1793,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) pCNd && pCNd->Len() ) nUndoId = UNDO_EMPTY; - GetDoc()->StartUndo( nUndoId, NULL ); + GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, NULL ); SwTxtFmtColl* pNextFmt = 0; SwTxtNode* pTNd = pCNd->GetTxtNode(); @@ -1771,7 +1814,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) aPos.nNode = *pSectNd->EndOfSectionNode(); } - for( USHORT n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n ) + for( sal_uInt16 n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n ) { GetDoc()->AppendTxtNode( aPos ); if( !n && pNextFmt ) @@ -1856,10 +1899,10 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) break; } - GetDoc()->EndUndo( nUndoId, NULL ); + GetDoc()->GetIDocumentUndoRedo().EndUndo( nUndoId, NULL ); EndAction(); - bRet = TRUE; + bRet = sal_True; } } return bRet; @@ -1901,7 +1944,7 @@ const SwRedline* SwCrsrShell::SelPrevRedline() return pFnd; } -const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect ) +const SwRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect ) { const SwRedline* pFnd = 0; SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen @@ -1916,7 +1959,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect ) SwNodeIndex* pIdx = &pCurCrsr->GetPoint()->nNode; if( !pIdx->GetNode().IsCntntNode() && 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx, - TRUE, IsReadOnlyAvailable() )) ) + sal_True, IsReadOnlyAvailable() )) ) { if( *pIdx <= pFnd->End()->nNode ) pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 ); @@ -1939,7 +1982,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect ) pIdx = &pCurCrsr->GetPoint()->nNode; if( !pIdx->GetNode().IsCntntNode() && 0 != ( pCNd = GetDoc()->GetNodes().GoPrevSection( pIdx, - TRUE, IsReadOnlyAvailable() )) ) + sal_True, IsReadOnlyAvailable() )) ) { if( *pIdx >= pCurCrsr->GetMark()->nNode ) pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); @@ -1969,7 +2012,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect ) return pFnd; } -const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) +const SwRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect ) { const SwRedline* pFnd = 0; if( !IsTableMode() ) @@ -1978,15 +2021,15 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl(); const SwRedline* pTmp = rTbl[ nArrPos ]; - USHORT nSeqNo = pTmp->GetSeqNo(); + sal_uInt16 nSeqNo = pTmp->GetSeqNo(); if( nSeqNo && bSelect ) { - BOOL bCheck = FALSE; + sal_Bool bCheck = sal_False; int nLoopCnt = 2; - USHORT nArrSavPos = nArrPos; + sal_uInt16 nArrSavPos = nArrPos; do { - pTmp = _GotoRedline( nArrPos, TRUE ); + pTmp = _GotoRedline( nArrPos, sal_True ); if( !pFnd ) pFnd = pTmp; @@ -2005,7 +2048,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) const SwPosition *pNStt = pNextPam->Start(), *pNEnd = pNextPam->End(); - BOOL bDel = TRUE; + sal_Bool bDel = sal_True; switch( ::ComparePosition( *pCStt, *pCEnd, *pNStt, *pNEnd )) { @@ -2040,7 +2083,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) break; default: - bDel = FALSE; + bDel = sal_False; } if( bDel ) @@ -2054,7 +2097,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) } } - USHORT nFndPos = 2 == nLoopCnt + sal_uInt16 nFndPos = 2 == nLoopCnt ? rTbl.FindNextOfSeqNo( nArrPos ) : rTbl.FindPrevOfSeqNo( nArrPos ); if( USHRT_MAX != nFndPos || @@ -2065,7 +2108,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) { // neuen Cursor erzeugen CreateCrsr(); - bCheck = TRUE; + bCheck = sal_True; } nArrPos = nFndPos; } @@ -2081,12 +2124,12 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) } -BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext ) +sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext ) { SwNodes& rNds = GetDoc()->GetNodes(); const SwNode* pBodyEndNd = &rNds.GetEndOfContent(); const SwNode* pBodySttNd = pBodyEndNd->StartOfSectionNode(); - ULONG nBodySttNdIdx = pBodySttNd->GetIndex(); + sal_uLong nBodySttNdIdx = pBodySttNd->GetIndex(); Point aPt; _SetGetExpFld aCmpPos( SwPosition( bNext ? *pBodyEndNd : *pBodySttNd ) ); @@ -2103,7 +2146,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext ) { const SwTxtNode* pTxtNd; const SwCharFmts* pFmts = GetDoc()->GetCharFmts(); - for( USHORT n = pFmts->Count(); 1 < n; ) + for( sal_uInt16 n = pFmts->Count(); 1 < n; ) { SwIterator<SwTxtINetFmt,SwCharFmt> aIter(*(*pFmts)[--n]); @@ -2138,13 +2181,13 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext ) // then check all the Flys with a URL or imapge map { const SwSpzFrmFmts* pFmts = GetDoc()->GetSpzFrmFmts(); - for( USHORT n = 0, nEnd = pFmts->Count(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = pFmts->Count(); n < nEnd; ++n ) { SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)(*pFmts)[ n ]; const SwFmtURL& rURLItem = pFmt->GetURL(); if( rURLItem.GetMap() || rURLItem.GetURL().Len() ) { - SwFlyFrm* pFly = pFmt->GetFrm( &aPt, FALSE ); + SwFlyFrm* pFly = pFmt->GetFrm( &aPt, sal_False ); SwPosition aTmpPos( *pBodySttNd ); if( pFly && GetBodyTxtNode( *GetDoc(), aTmpPos, *pFly->GetLower() ) ) @@ -2161,7 +2204,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext ) } // found any URL ? - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const SwTxtINetFmt* pFndAttr = aCmpPos.GetINetFmt(); const SwFlyFrmFmt* pFndFmt = aCmpPos.GetFlyFmt(); if( pFndAttr || pFndFmt ) @@ -2183,7 +2226,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext ) { UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE| SwCrsrShell::READONLY ); - bRet = TRUE; + bRet = sal_True; } } // find a draw object ? @@ -2192,16 +2235,16 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext ) const SdrObject* pSObj = pFndFmt->FindSdrObject(); ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() ); MakeSelVisible(); - bRet = TRUE; + bRet = sal_True; } else // then is it a fly { - SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, FALSE ); + SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, sal_False ); if( pFly ) { - ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE ); + ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True ); MakeSelVisible(); - bRet = TRUE; + bRet = sal_True; } } } |