summaryrefslogtreecommitdiff
path: root/sw/source/core/edit
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r--sw/source/core/edit/acorrect.cxx66
-rw-r--r--sw/source/core/edit/autofmt.cxx448
-rw-r--r--sw/source/core/edit/edatmisc.cxx12
-rw-r--r--sw/source/core/edit/edattr.cxx112
-rw-r--r--sw/source/core/edit/eddel.cxx34
-rw-r--r--sw/source/core/edit/edfcol.cxx16
-rw-r--r--sw/source/core/edit/edfld.cxx88
-rw-r--r--sw/source/core/edit/edfldexp.cxx16
-rw-r--r--sw/source/core/edit/edfmt.cxx22
-rw-r--r--sw/source/core/edit/edglbldc.cxx70
-rw-r--r--sw/source/core/edit/edglss.cxx52
-rw-r--r--sw/source/core/edit/editsh.cxx120
-rw-r--r--sw/source/core/edit/edlingu.cxx50
-rw-r--r--sw/source/core/edit/ednumber.cxx144
-rw-r--r--sw/source/core/edit/edredln.cxx26
-rw-r--r--sw/source/core/edit/edsect.cxx32
-rw-r--r--sw/source/core/edit/edtab.cxx82
-rw-r--r--sw/source/core/edit/edtox.cxx76
-rw-r--r--sw/source/core/edit/edundo.cxx44
19 files changed, 755 insertions, 755 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index b7e92570df42..9ac7ff7c64cb 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -126,7 +126,7 @@ void SwAutoCorrDoc::DeleteSel( SwPaM& rDelPam )
}
}
-BOOL SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
+sal_Bool SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aSel( rNd, nStt, rNd, nEnd );
@@ -134,11 +134,11 @@ BOOL SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
if( bUndoIdInitialized )
bUndoIdInitialized = true;
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
+sal_Bool SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
{
SwPaM aPam( rCrsr.GetPoint()->nNode.GetNode(), nPos );
rEditSh.GetDoc()->InsertString( aPam, rTxt );
@@ -148,11 +148,11 @@ BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
if( 1 == rTxt.Len() )
rEditSh.StartUndo( nUndoId = UNDO_AUTOCORRECT );
}
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
+sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
{
SwPaM* pPam = &rCrsr;
if( pPam->GetPoint()->nContent.GetIndex() != nPos )
@@ -164,7 +164,7 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
SwTxtNode * const pNd = pPam->GetNode()->GetTxtNode();
if ( !pNd )
{
- return FALSE;
+ return sal_False;
}
// text attributes with dummy characters must not be replaced!
@@ -222,19 +222,19 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
if( pPam != &rCrsr )
delete pPam;
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
+sal_Bool SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& rItem )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
SfxItemPool& rPool = rEditSh.GetDoc()->GetAttrPool();
- USHORT nWhich = rPool.GetWhich( nSlotId, FALSE );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlotId, sal_False );
if( nWhich )
{
rItem.SetWhich( nWhich );
@@ -252,7 +252,7 @@ BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
-BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL )
+sal_Bool SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
@@ -263,17 +263,17 @@ BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String&
rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam, aSet );
if( bUndoIdInitialized )
bUndoIdInitialized = true;
- return TRUE;
+ return sal_True;
}
// returne den Text eines vorherigen Absatzes.
// Dieser darf nicht leer sein!
// Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0
// Das Flag gibt an:
- // TRUE: den, vor der normalen Einfuegeposition (TRUE)
- // FALSE: den, in den das korrigierte Wort eingfuegt wurde.
+ // sal_True: den, vor der normalen Einfuegeposition (sal_True)
+ // sal_False: den, in den das korrigierte Wort eingfuegt wurde.
// (Muss nicht der gleiche Absatz sein!!!!)
-const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos )
+const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
{
const String* pStr = 0;
@@ -298,7 +298,7 @@ const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos )
}
-BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
+sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
SvxAutoCorrect& rACorrect,
const String** ppPara )
{
@@ -310,16 +310,16 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
SwTxtNode* pTxtNd = rCrsr.GetNode()->GetTxtNode();
ASSERT( pTxtNd, "wo ist denn der TextNode?" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nEndPos == rSttPos )
return bRet;
- LanguageType eLang = GetLanguage(nEndPos, FALSE);
+ LanguageType eLang = GetLanguage(nEndPos, sal_False);
if(LANGUAGE_SYSTEM == eLang)
eLang = (LanguageType)GetAppLanguage();
//JP 22.04.99: Bug 63883 - Sonderbehandlung fuer Punkte.
- BOOL bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
+ sal_Bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
'.' == pTxtNd->GetTxt().GetChar( nEndPos );
const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
@@ -338,13 +338,13 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
{
// replace the selection
pDoc->ReplaceRange( aPam, pFnd->GetLong(), false);
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
{
- SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( eLang, FALSE, TRUE ));
- USHORT nPos = aTBlks.GetIndex( pFnd->GetShort() );
+ SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( eLang, sal_False, sal_True ));
+ sal_uInt16 nPos = aTBlks.GetIndex( pFnd->GetShort() );
if( USHRT_MAX != nPos && aTBlks.BeginGetDoc( nPos ) )
{
DeleteSel( aPam );
@@ -387,7 +387,7 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
(*pIdx)++;
pTxtNd = pIdx->GetNode().GetTxtNode();
}
- bRet = TRUE;
+ bRet = sal_True;
}
aTBlks.EndGetDoc();
}
@@ -405,17 +405,17 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
// - FnCptlSttSntnc
// gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
// aufgenommen werden.
-void SwAutoCorrDoc::SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos,
+void SwAutoCorrDoc::SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos,
const String& rExceptWord,
sal_Unicode cChar )
{
- ULONG nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex();
- LanguageType eLang = GetLanguage(nPos, FALSE);
+ sal_uLong nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex();
+ LanguageType eLang = GetLanguage(nPos, sal_False);
rEditSh.GetDoc()->SetAutoCorrExceptWord( new SwAutoCorrExceptWord( nFlag,
nNode, nPos, rExceptWord, cChar, eLang ));
}
-LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, BOOL bPrevPara ) const
+LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara ) const
{
LanguageType eRet = LANGUAGE_SYSTEM;
@@ -449,12 +449,12 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
}
-BOOL SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
+sal_Bool SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !bDeleted && rPos.nNode.GetIndex() == nNode &&
rPos.nContent.GetIndex() == nCntnt )
- bDeleted = bRet = TRUE;
+ bDeleted = bRet = sal_True;
return bRet;
}
@@ -488,8 +488,8 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
{
- const USHORT nSize = pTxtNd->GetpSwpHints()->Count();
- USHORT n;
+ const sal_uInt16 nSize = pTxtNd->GetpSwpHints()->Count();
+ sal_uInt16 n;
xub_StrLen nAttrStart;
const xub_StrLen* pAttrEnd;
@@ -509,13 +509,13 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
{
const SfxPoolItem* pItem;
if( !pDontExpItems || SFX_ITEM_SET != pDontExpItems->
- GetItemState( pHt->Which(), FALSE, &pItem ) ||
+ GetItemState( pHt->Which(), sal_False, &pItem ) ||
*pItem != pHt->GetAttr() )
{
// das Attribut war vorher nicht in dieser Form im Absatz
// gesetzt, also kann es nur durchs einfuegen/kopieren erzeugt
// worden sein. Damit ist es ein Kandiadat fuers DontExpand
- pHt->SetDontExpand( TRUE );
+ pHt->SetDontExpand( sal_True );
}
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 639bab3c10c5..7987106cd349 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -101,7 +101,7 @@ SvxSwAutoFmtFlags* SwEditShell::pAutoFmtFlags = 0;
// Anzahl von Num-/Bullet-Absatzvorlagen. MAXLEVEL wird demnaechst auf
// x erhoeht, die Anzahl Vorlagen aber nicht (Ueberbleibsel aus <= 4.0)
-const USHORT cnNumBullColls = 4;
+const sal_uInt16 cnNumBullColls = 4;
class SwAutoFormat
{
@@ -115,12 +115,12 @@ class SwAutoFormat
SwTxtNode* pAktTxtNd; // der akt. TextNode
SwTxtFrm* pAktTxtFrm; // Frame vom akt. TextNode
CharClass* pCharClass; // Character classification
- ULONG nEndNdIdx; // fuer die Prozent-Anzeige
+ sal_uLong nEndNdIdx; // fuer die Prozent-Anzeige
LanguageType eCharClassLang;
- USHORT nLastHeadLvl, nLastCalcHeadLvl;
- USHORT nLastEnumLvl, nLastCalcEnumLvl;
- USHORT nRedlAutoFmtSeqId;
+ sal_uInt16 nLastHeadLvl, nLastCalcHeadLvl;
+ sal_uInt16 nLastEnumLvl, nLastCalcEnumLvl;
+ sal_uInt16 nRedlAutoFmtSeqId;
enum
{
@@ -150,11 +150,11 @@ class SwAutoFormat
IS_ENDE
} eStat;
- BOOL bEnde : 1;
- BOOL bEmptyLine : 1;
- BOOL bMoreLines : 1;
+ sal_Bool bEnde : 1;
+ sal_Bool bEmptyLine : 1;
+ sal_Bool bMoreLines : 1;
- static BOOL m_bAskForCancelUndoWhileBufferOverflow;
+ static sal_Bool m_bAskForCancelUndoWhileBufferOverflow;
static short m_nActionWhileAutoformatUndoBufferOverflow;
@@ -171,25 +171,25 @@ class SwAutoFormat
}
- BOOL IsSpace( const sal_Unicode c ) const
- { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? TRUE : FALSE; }
+ sal_Bool IsSpace( const sal_Unicode c ) const
+ { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? sal_True : sal_False; }
- void SetColl( USHORT nId, BOOL bHdLineOrText = FALSE );
+ void SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText = sal_False );
String GoNextPara();
- BOOL HasObjects( const SwNode& rNd );
+ sal_Bool HasObjects( const SwNode& rNd );
// TxtNode Methoden
const SwTxtNode* GetNextNode() const;
- BOOL IsEmptyLine( const SwTxtNode& rNd ) const
+ sal_Bool IsEmptyLine( const SwTxtNode& rNd ) const
{ return 0 == rNd.GetTxt().Len() ||
rNd.GetTxt().Len() == GetLeadingBlanks( rNd.GetTxt() ); }
- BOOL IsOneLine( const SwTxtNode& ) const;
- BOOL IsFastFullLine( const SwTxtNode& ) const;
- BOOL IsNoAlphaLine( const SwTxtNode&) const;
- BOOL IsEnumericChar( const SwTxtNode&) const;
- BOOL IsBlanksInString( const SwTxtNode&) const;
- USHORT CalcLevel( const SwTxtNode&, USHORT *pDigitLvl = 0 ) const;
+ sal_Bool IsOneLine( const SwTxtNode& ) const;
+ sal_Bool IsFastFullLine( const SwTxtNode& ) const;
+ sal_Bool IsNoAlphaLine( const SwTxtNode&) const;
+ sal_Bool IsEnumericChar( const SwTxtNode&) const;
+ sal_Bool IsBlanksInString( const SwTxtNode&) const;
+ sal_uInt16 CalcLevel( const SwTxtNode&, sal_uInt16 *pDigitLvl = 0 ) const;
xub_StrLen GetBigIndent( xub_StrLen& rAktSpacePos ) const;
String& DelLeadingBlanks( String& rStr ) const;
@@ -197,8 +197,8 @@ class SwAutoFormat
xub_StrLen GetLeadingBlanks( const String& rStr ) const;
xub_StrLen GetTrailingBlanks( const String& rStr ) const;
- BOOL IsFirstCharCapital( const SwTxtNode& rNd ) const;
- USHORT GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
+ sal_Bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
+ sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
String* pPreFix = 0, String* pPostFix = 0,
String* pNumTypes = 0 ) const;
// hole den FORMATIERTEN TextFrame
@@ -207,26 +207,26 @@ class SwAutoFormat
void BuildIndent();
void BuildText();
void BuildTextIndent();
- void BuildEnum( USHORT nLvl, USHORT nDigitLevel );
+ void BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel );
void BuildNegIndent( SwTwips nSpaces );
- void BuildHeadLine( USHORT nLvl );
+ void BuildHeadLine( sal_uInt16 nLvl );
- BOOL HasSelBlanks( SwPaM& rPam ) const;
- BOOL HasBreakAttr( const SwTxtNode& ) const;
+ sal_Bool HasSelBlanks( SwPaM& rPam ) const;
+ sal_Bool HasBreakAttr( const SwTxtNode& ) const;
void DeleteSel( SwPaM& rPam );
- BOOL DeleteAktNxtPara( const String& rNxtPara );
+ sal_Bool DeleteAktNxtPara( const String& rNxtPara );
// loesche im Node Anfang oder/und Ende
- void DeleteAktPara( BOOL bStart = TRUE, BOOL nEnd = TRUE );
- void DelEmptyLine( BOOL bTstNextPara = TRUE );
+ void DeleteAktPara( sal_Bool bStart = sal_True, sal_Bool nEnd = sal_True );
+ void DelEmptyLine( sal_Bool bTstNextPara = sal_True );
// loesche bei mehrzeiligen Absaetzen die "linken" und/oder
// "rechten" Raender
- void DelMoreLinesBlanks( BOOL bWithLineBreaks = FALSE );
+ void DelMoreLinesBlanks( sal_Bool bWithLineBreaks = sal_False );
// loesche den vorherigen Absatz
void DelPrevPara();
// dann lasse doch mal das AutoCorrect auf den akt. TextNode los
void AutoCorrect( xub_StrLen nSttPos = 0 );
- BOOL CanJoin( const SwTxtNode* pTxtNd ) const
+ sal_Bool CanJoin( const SwTxtNode* pTxtNd ) const
{
return !bEnde && pTxtNd &&
!IsEmptyLine( *pTxtNd ) &&
@@ -238,16 +238,16 @@ class SwAutoFormat
}
// ist ein Punkt am Ende ??
- BOOL IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
+ sal_Bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
- BOOL DoUnderline();
- BOOL DoTable();
+ sal_Bool DoUnderline();
+ sal_Bool DoTable();
- void _SetRedlineTxt( USHORT nId );
- BOOL SetRedlineTxt( USHORT nId )
- { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return TRUE; }
- BOOL ClearRedlineTxt()
- { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return TRUE; }
+ void _SetRedlineTxt( sal_uInt16 nId );
+ sal_Bool SetRedlineTxt( sal_uInt16 nId )
+ { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return sal_True; }
+ sal_Bool ClearRedlineTxt()
+ { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return sal_True; }
public:
SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
@@ -257,7 +257,7 @@ public:
}
};
-BOOL SwAutoFormat::m_bAskForCancelUndoWhileBufferOverflow = TRUE;
+sal_Bool SwAutoFormat::m_bAskForCancelUndoWhileBufferOverflow = sal_True;
short SwAutoFormat::m_nActionWhileAutoformatUndoBufferOverflow = RET_YES;
const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
@@ -291,10 +291,10 @@ void SwAutoFormat::_GetCharClass( LanguageType eLang )
eCharClassLang = eLang;
}
-void SwAutoFormat::_SetRedlineTxt( USHORT nActionId )
+void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
{
String sTxt;
- USHORT nSeqNo = 0;
+ sal_uInt16 nSeqNo = 0;
if( STR_AUTOFMTREDL_END > nActionId )
{
sTxt = *ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ];
@@ -334,14 +334,14 @@ String SwAutoFormat::GoNextPara()
//has to be checed twice before and after incrementation
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
aNdIdx++;
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
else
@@ -353,7 +353,7 @@ String SwAutoFormat::GoNextPara()
// EndNode : Ende erreicht, beenden
if( pNewNd->IsEndNode() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
else if( pNewNd->IsTableNode() )
@@ -375,20 +375,20 @@ String SwAutoFormat::GoNextPara()
return pAktTxtNd->GetTxt();
}
-BOOL SwAutoFormat::HasObjects( const SwNode& rNd )
+sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
{
// haengt irgend etwas absatzgebundenes am Absatz?
// z.B. Rahmen, DrawObjecte, ..
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwFmtAnchor& rAnchor = rFmts[ n ]->GetAnchor();
if ((FLY_AT_PAGE != rAnchor.GetAnchorId()) &&
rAnchor.GetCntntAnchor() &&
&rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -403,16 +403,16 @@ const SwTxtNode* SwAutoFormat::GetNextNode() const
}
-BOOL SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const
{
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
return aFInfo.IsOneLine();
}
-BOOL SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
{
- BOOL bRet = aFlags.bRightMargin;
+ sal_Bool bRet = aFlags.bRightMargin;
if( bRet )
{
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
@@ -422,24 +422,24 @@ BOOL SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
}
-BOOL SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
String sTmp( rTxt );
xub_StrLen nBlnks = GetLeadingBlanks( sTmp );
xub_StrLen nLen = rTxt.Len() - nBlnks;
if( !nLen )
- return FALSE;
+ return sal_False;
// -, +, * getrennt durch Blank ??
if( 2 < nLen && IsSpace( rTxt.GetChar( nBlnks + 1 ) ) )
{
if( StrChr( pBulletChar, rTxt.GetChar( nBlnks ) ) )
- return TRUE;
+ return sal_True;
// sollte an der Position ein Symbolfont existieren ?
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
if( aFInfo.IsBullet( nBlnks ))
- return TRUE;
+ return sal_True;
}
// 1.) / 1. / 1.1.1 / (1). / (1) / ....
@@ -447,7 +447,7 @@ BOOL SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
}
-BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
{
// suche im String mehr als 5 Blanks/Tabs
String sTmp( rNd.GetTxt() );
@@ -463,7 +463,7 @@ BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
while( *pTmp && IsSpace( *++pTmp ))
;
if( 5 <= pTmp - pStt )
- return TRUE;
+ return sal_True;
}
else
++pTmp;
@@ -471,13 +471,13 @@ BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
else
++pTmp;
}
- return FALSE;
+ return sal_False;
}
-USHORT SwAutoFormat::CalcLevel( const SwTxtNode& rNd, USHORT *pDigitLvl ) const
+sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ) const
{
- USHORT nLvl = 0, nBlnk = 0;
+ sal_uInt16 nLvl = 0, nBlnk = 0;
const String& rTxt = rNd.GetTxt();
if( pDigitLvl )
*pDigitLvl = USHRT_MAX;
@@ -534,11 +534,11 @@ xub_StrLen SwAutoFormat::GetBigIndent( xub_StrLen& rAktSpacePos ) const
}
-BOOL SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
{
const String& rStr = rNd.GetTxt();
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
// oder besser: ueber die Anzahl von Alpha/Num- und !AN-Zeichen
// bestimmen.
xub_StrLen nANChar = 0, nBlnk = 0;
@@ -550,18 +550,18 @@ BOOL SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
else if( rCC.isLetterNumeric( rStr, n ))
++nANChar;
- // sind zu 75% keine Alpha-Nummerische-Zeichen, dann TRUE
- ULONG nLen = rStr.Len() - nBlnk;
- nLen = ( nLen * 3 ) / 4; // long overflow, if the strlen > USHORT
+ // sind zu 75% keine Alpha-Nummerische-Zeichen, dann sal_True
+ sal_uLong nLen = rStr.Len() - nBlnk;
+ nLen = ( nLen * 3 ) / 4; // long overflow, if the strlen > sal_uInt16
return xub_StrLen(nLen) < (rStr.Len() - nANChar - nBlnk);
}
-BOOL SwAutoFormat::DoUnderline()
+sal_Bool SwAutoFormat::DoUnderline()
{
if( !aFlags.bSetBorder )
- return FALSE;
+ return sal_False;
const sal_Unicode* pStr = pAktTxtNd->GetTxt().GetBuffer();
int eState = 0;
@@ -581,12 +581,12 @@ BOOL SwAutoFormat::DoUnderline()
case '~': eTmp = 5; break;
case '#': eTmp = 6; break;
default:
- return FALSE;
+ return sal_False;
}
if( 0 == eState )
eState = eTmp;
else if( eState != eTmp )
- return FALSE;
+ return sal_False;
++nCnt;
}
++pStr;
@@ -595,7 +595,7 @@ BOOL SwAutoFormat::DoUnderline()
if( 2 < nCnt )
{
// dann unterstreiche mal den vorherigen Absatz, wenn es diesen gibt!
- DelEmptyLine( FALSE );
+ DelEmptyLine( sal_False );
aDelPam.SetMark();
aDelPam.GetMark()->nContent = 0;
//JP 19.03.96: kein Underline sondern eine Umrandung setzen!
@@ -635,7 +635,7 @@ BOOL SwAutoFormat::DoUnderline()
RES_PARATR_CONNECT_BORDER, RES_PARATR_CONNECT_BORDER,
RES_BOX, RES_BOX,
0);
- aSet.Put( SwParaConnectBorderItem( FALSE ) );
+ aSet.Put( SwParaConnectBorderItem( sal_False ) );
SvxBoxItem aBox( RES_BOX );
aBox.SetLine( &aLine, BOX_LINE_BOTTOM );
aBox.SetDistance( 42 ); // ~0,75 mm
@@ -648,11 +648,11 @@ BOOL SwAutoFormat::DoUnderline()
}
-BOOL SwAutoFormat::DoTable()
+sal_Bool SwAutoFormat::DoTable()
{
if( !aFlags.bCreateTable || !aFlags.bAFmtByInput ||
pAktTxtNd->FindTableNode() )
- return FALSE;
+ return sal_False;
const String& rTmp = pAktTxtNd->GetTxt();
xub_StrLen nSttPlus = GetLeadingBlanks( rTmp );
@@ -662,7 +662,7 @@ BOOL SwAutoFormat::DoTable()
if( 2 > nEndPlus - nSttPlus ||
( '+' != ( cChar = rTmp.GetChar( nSttPlus )) && '|' != cChar ) ||
( '+' != ( cChar = rTmp.GetChar( nEndPlus - 1)) && '|' != cChar ))
- return FALSE;
+ return sal_False;
SwTxtFrmInfo aInfo( pAktTxtFrm );
@@ -683,11 +683,11 @@ BOOL SwAutoFormat::DoTable()
case '+':
case '|':
- aPosArr.Insert( static_cast<USHORT>(aInfo.GetCharPos(n)), aPosArr.Count() );
+ aPosArr.Insert( static_cast<sal_uInt16>(aInfo.GetCharPos(n)), aPosArr.Count() );
break;
default:
- return FALSE;
+ return sal_False;
}
if( ++n == nEndPlus )
break;
@@ -698,7 +698,7 @@ BOOL SwAutoFormat::DoTable()
if( 1 < aPosArr.Count() )
{
// Ausrichtung vom Textnode besorgen:
- USHORT nColCnt = aPosArr.Count() - 1;
+ sal_uInt16 nColCnt = aPosArr.Count() - 1;
SwTwips nSttPos = aPosArr[ 0 ];
sal_Int16 eHori;
switch( pAktTxtNd->GetSwAttrSet().GetAdjust().GetAdjust() )
@@ -712,7 +712,7 @@ BOOL SwAutoFormat::DoTable()
eHori = text::HoriOrientation::NONE;
// dann muss als letztes noch die akt. FrameBreite
// ins Array
- aPosArr.Insert( static_cast<USHORT>(pAktTxtFrm->Frm().Width()), aPosArr.Count() );
+ aPosArr.Insert( static_cast<sal_uInt16>(pAktTxtFrm->Frm().Width()), aPosArr.Count() );
}
else
eHori = text::HoriOrientation::LEFT;
@@ -782,7 +782,7 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const
}
-BOOL SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
for( xub_StrLen n = 0, nEnd = rTxt.Len(); n < nEnd; ++n )
@@ -795,11 +795,11 @@ BOOL SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
0 != ( i18n::KCharacterType::UPPER &
nCharType );
}
- return FALSE;
+ return sal_False;
}
-USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
+sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
String* pPreFix, String* pPostFix, String* pNumTypes ) const
{
// Teste auf 1.) / 1. / 1.1.1 / (1). / (1) / ....
@@ -807,11 +807,11 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
xub_StrLen nPos = rPos;
int eScan = NONE;
- USHORT nStart = 0;
- BYTE nDigitLvl = 0, nDigitCnt = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt8 nDigitLvl = 0, nDigitCnt = 0;
//count number of parenthesis to assure a sensible order is found
- USHORT nOpeningParentheses = 0;
- USHORT nClosingParentheses = 0;
+ sal_uInt16 nOpeningParentheses = 0;
+ sal_uInt16 nClosingParentheses = 0;
CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().GetLanguage().GetLanguage() );
@@ -851,7 +851,7 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
}
else if( rCC.isAlpha( rTxt, nPos ) )
{
- BOOL bIsUpper =
+ sal_Bool bIsUpper =
0 != ( i18n::KCharacterType::UPPER &
rCC.getCharacterType( rTxt, nPos ));
sal_Unicode cLow = rCC.toLower( rTxt, nPos, 1 ).GetChar(0), cNumTyp;
@@ -930,8 +930,8 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
else
{
// roemische Zahlen: checke ob das gueltige Zeichen sind
- USHORT nVal;
- BOOL bError = FALSE;
+ sal_uInt16 nVal;
+ sal_Bool bError = sal_False;
switch( cLow )
{
case 'm': nVal = 1000; goto CHECK_ROMAN_1;
@@ -950,43 +950,43 @@ CHECK_ROMAN_1:
if( nMod5 == ((3 * nVal) + n10 ) ||
nMod5 == ((4 * nVal) + n10 ) ||
nLast == n10 )
- nStart = static_cast<USHORT>(nStart + (n10 * 8));
+ nStart = static_cast<sal_uInt16>(nStart + (n10 * 8));
else if( nMod5 == 0 ||
nMod5 == (1 * nVal) ||
nMod5 == (2 * nVal) )
nStart = nStart + nVal;
else
- bError = TRUE;
+ bError = sal_True;
}
break;
CHECK_ROMAN_5:
{
if( ( nStart / nVal ) & 1 )
- bError = TRUE;
+ bError = sal_True;
else
{
int nMod = nStart % nVal;
int n10 = nVal / 5;
if( n10 == nMod )
- nStart = static_cast<USHORT>(nStart + (3 * n10));
+ nStart = static_cast<sal_uInt16>(nStart + (3 * n10));
else if( 0 == nMod )
nStart = nStart + nVal;
else
- bError = TRUE;
+ bError = sal_True;
}
}
break;
case 'i':
if( nStart % 5 >= 3 )
- bError = TRUE;
+ bError = sal_True;
else
nStart += 1;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if( bError )
@@ -1041,7 +1041,7 @@ CHECK_ROMAN_5:
}
-void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
+void SwAutoFormat::SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText )
{
aDelPam.DeleteMark();
aDelPam.GetPoint()->nNode = aNdIdx;
@@ -1064,7 +1064,7 @@ void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
// sonst nur den Blocksatz
SvxAdjustItem* pAdj;
if( SFX_ITEM_SET == aSet.GetItemState( RES_PARATR_ADJUST,
- FALSE, (const SfxPoolItem**)&pAdj ))
+ sal_False, (const SfxPoolItem**)&pAdj ))
{
SvxAdjust eAdj = pAdj->GetAdjust();
if( bHdLineOrText ? (SVX_ADJUST_RIGHT != eAdj &&
@@ -1078,7 +1078,7 @@ void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
}
-BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
+sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
{
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
@@ -1101,38 +1101,38 @@ BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
// ( ' ' == ( cCh = pTxtNd->GetTxt()[ nBlnkPos ] ) || '\t' == cCh ))
pPos->nContent++;
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
+sal_Bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
{
const SfxItemSet* pSet = rTxtNd.GetpSwAttrSet();
if( !pSet )
- return FALSE;
+ return sal_False;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem )
&& SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- return TRUE;
+ return sal_True;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pItem )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem )
&& ((SwFmtPageDesc*)pItem)->GetPageDesc()
&& nsUseOnPage::PD_NONE != ((SwFmtPageDesc*)pItem)->GetPageDesc()->GetUseOn() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// ist ein Punkt am Ende ??
-BOOL SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
+sal_Bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
{
const String& rStr = rTxtNd.GetTxt();
xub_StrLen n = rStr.Len();
if( !n )
- return TRUE;
+ return sal_True;
while( --n && IsSpace( rStr.GetChar( n ) ) )
;
@@ -1141,7 +1141,7 @@ BOOL SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
// loesche im Node Anfang oder/und Ende
-void SwAutoFormat::DeleteAktPara( BOOL bStart, BOOL bEnd )
+void SwAutoFormat::DeleteAktPara( sal_Bool bStart, sal_Bool bEnd )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesAtSttEnd
@@ -1200,7 +1200,7 @@ void SwAutoFormat::DeleteSel( SwPaM& rDelPam )
pEditShell->DeleteSel( rDelPam );
}
-BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
+sal_Bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
{
// Loesche Blanks am Ende vom akt. und am Anfang vom naechsten
aDelPam.DeleteMark();
@@ -1223,7 +1223,7 @@ BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
- BOOL bHasBlnks = HasSelBlanks( aDelPam );
+ sal_Bool bHasBlnks = HasSelBlanks( aDelPam );
if( *aDelPam.GetPoint() != *aDelPam.GetMark() )
DeleteSel( aDelPam );
@@ -1233,7 +1233,7 @@ BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
}
-void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
+void SwAutoFormat::DelEmptyLine( sal_Bool bTstNextPara )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_EMPTY_PARA );
// Loesche Blanks den leeren Absatz
@@ -1243,7 +1243,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
aDelPam.SetMark();
aDelPam.GetMark()->nNode--;
- SwTxtNode* pTNd = aDelPam.GetNode( FALSE )->GetTxtNode();
+ SwTxtNode* pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
// erstmal den vorherigen Textnode benutzen.
aDelPam.GetMark()->nContent.Assign( pTNd, pTNd->GetTxt().Len() );
@@ -1252,7 +1252,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
// dann versuche den naechsten (am Anfang vom Dok, Tabellen-Zellen,
// Rahmen, ...
aDelPam.GetMark()->nNode += 2;
- pTNd = aDelPam.GetNode( FALSE )->GetTxtNode();
+ pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
{
aDelPam.GetMark()->nContent.Assign( pTNd, 0 );
@@ -1273,7 +1273,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
}
-void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
+void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesBetweenLines
@@ -1292,7 +1292,7 @@ void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
pNxt = (SwPaM*)aDelPam.GetNext();
if( pNxt->HasMark() && *pNxt->GetPoint() != *pNxt->GetMark() )
{
- BOOL bHasBlnks = HasSelBlanks( *pNxt );
+ sal_Bool bHasBlnks = HasSelBlanks( *pNxt );
DeleteSel( *pNxt );
if( !bHasBlnks )
{
@@ -1303,7 +1303,7 @@ void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
if( pNxt == &aDelPam )
break;
delete pNxt;
- } while( TRUE );
+ } while( sal_True );
aDelPam.DeleteMark();
}
@@ -1335,9 +1335,9 @@ void SwAutoFormat::BuildIndent()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_INDENT );
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
@@ -1364,7 +1364,7 @@ void SwAutoFormat::BuildIndent()
!CalcLevel( *pNxtNd ) );
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
@@ -1373,16 +1373,16 @@ void SwAutoFormat::BuildTextIndent()
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT);
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
if( aFlags.bAFmtByInput )
- pAktTxtNd->SetAutoFmtLvl( (BYTE)CalcLevel( *pAktTxtNd ) );
+ pAktTxtNd->SetAutoFmtLvl( (sal_uInt8)CalcLevel( *pAktTxtNd ) );
SetColl( RES_POOLCOLL_TEXT_MOVE );
if( !bBreak )
@@ -1403,7 +1403,7 @@ void SwAutoFormat::BuildTextIndent()
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
@@ -1413,14 +1413,14 @@ void SwAutoFormat::BuildText()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT );
// lese alle nachfolgenden Absaetze die zu diesem Text
// ohne Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
DelMoreLinesBlanks();
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( RES_POOLCOLL_TEXT, TRUE );
+ SetColl( RES_POOLCOLL_TEXT, sal_True );
if( !bBreak )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_MORELINES );
@@ -1442,16 +1442,16 @@ void SwAutoFormat::BuildText()
break;
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
-void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
+void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_NUMBULET );
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
// als erstes den akt. Einzug bestimmen und die Framebreite bestimmen
SwTwips nFrmWidth = pAktTxtFrm->Prt().Width();;
@@ -1474,9 +1474,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
IsSentenceAtEnd( *pAktTxtNd );
sal_Bool bRTL = pEditShell->IsInRightToLeftText();
// SetColl( RES_POOLCOLL_NUM_LEVEL1 + ( nLvl * 4 ) );
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
- BOOL bChgBullet = FALSE, bChgEnum = FALSE;
+ sal_Bool bChgBullet = sal_False, bChgEnum = sal_False;
xub_StrLen nAutoCorrPos = 0;
// falls die Numerierung gesetzt werden, die akt. besorgen
@@ -1506,7 +1506,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
{
SwCharFmt* pCFmt = pDoc->GetCharFmtFromPool(
RES_POOLCHR_BUL_LEVEL );
- bChgBullet = TRUE;
+ bChgBullet = sal_True;
// wurde das Format schon mal angepasst?
if( !aRule.GetNumFmt( nLvl ) )
{
@@ -1532,11 +1532,11 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
// <--
}
- USHORT nAbsPos = lBullIndent;
- USHORT nSpaceSteps = nLvl
- ? USHORT(nLeftTxtPos / nLvl)
+ sal_uInt16 nAbsPos = lBullIndent;
+ sal_uInt16 nSpaceSteps = nLvl
+ ? sal_uInt16(nLeftTxtPos / nLvl)
: lBullIndent;
- for( BYTE n = 0; n < MAXLEVEL; ++n, nAbsPos = nAbsPos + nSpaceSteps )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n, nAbsPos = nAbsPos + nSpaceSteps )
{
SwNumFmt aFmt( aRule.Get( n ) );
aFmt.SetBulletFont( pBullFnt );
@@ -1553,7 +1553,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( n == nLvl &&
nFrmWidth < ( nSpaceSteps * MAXLEVEL ) )
- nSpaceSteps = static_cast<USHORT>(( nFrmWidth - nLeftTxtPos ) /
+ nSpaceSteps = static_cast<sal_uInt16>(( nFrmWidth - nLeftTxtPos ) /
( MAXLEVEL - nLvl ));
}
}
@@ -1561,8 +1561,8 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
else
{
- bChgBullet = TRUE;
- SetColl( static_cast<USHORT>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
+ bChgBullet = sal_True;
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
}
}
else
@@ -1577,13 +1577,13 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( USHRT_MAX != ( nDigitLevel = GetDigitLevel( *pAktTxtNd, nTxtStt,
&aPreFix, &aPostFix, &aNumTypes )) )
{
- bChgEnum = TRUE;
+ bChgEnum = sal_True;
// Ebene 0 und Einrueckung dann wird die Ebene durch den linken
// Einzug und der default NumEinrueckung bestimmt.
if( !nDigitLevel && nLeftTxtPos )
- nLvl = Min( USHORT( nLeftTxtPos / lNumIndent ),
- USHORT( MAXLEVEL - 1 ) );
+ nLvl = Min( sal_uInt16( nLeftTxtPos / lNumIndent ),
+ sal_uInt16( MAXLEVEL - 1 ) );
else
nLvl = nDigitLevel;
}
@@ -1597,7 +1597,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( !nDigitLevel )
{
SwNumFmt aFmt( aRule.Get( nLvl ) );
- aFmt.SetStart( static_cast<USHORT>(aPreFix.GetToken( 1,
+ aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.GetToken( 1,
(sal_Unicode)1 ).ToInt32()));
aFmt.SetPrefix( aPreFix.GetToken( 0, (sal_Unicode)1 ));
aFmt.SetSuffix( aPostFix.GetToken( 0, (sal_Unicode)1 ));
@@ -1615,13 +1615,13 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
else
{
- USHORT nSpaceSteps = nLvl ? USHORT(nLeftTxtPos / nLvl) : 0;
- BYTE n;
+ sal_uInt16 nSpaceSteps = nLvl ? sal_uInt16(nLeftTxtPos / nLvl) : 0;
+ sal_uInt8 n;
for( n = 0; n <= nLvl; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
- aFmt.SetStart( static_cast<USHORT>(aPreFix.GetToken( n+1,
+ aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.GetToken( n+1,
(sal_Unicode)1 ).ToInt32() ));
if( !n )
aFmt.SetPrefix( aPreFix.GetToken( n, (sal_Unicode)1 ));
@@ -1630,7 +1630,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( n < aNumTypes.Len() )
aFmt.SetNumberingType((aNumTypes.GetChar( n ) - '0'));
- aFmt.SetAbsLSpace( USHORT( nSpaceSteps * n )
+ aFmt.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
if( !aFmt.GetCharFmt() )
@@ -1642,16 +1642,16 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
// passt alles vollstaendig in den Frame?
- BOOL bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
+ sal_Bool bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
for( ; n < MAXLEVEL; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
aFmt.SetIncludeUpperLevels( MAXLEVEL );
if( bDefStep )
- aFmt.SetAbsLSpace( USHORT( (nLeftTxtPos +
- SwNumRule::GetNumIndent(static_cast<BYTE>(n-nLvl)))));
+ aFmt.SetAbsLSpace( sal_uInt16( (nLeftTxtPos +
+ SwNumRule::GetNumIndent(static_cast<sal_uInt8>(n-nLvl)))));
else
- aFmt.SetAbsLSpace( USHORT( nSpaceSteps * n )
+ aFmt.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
aRule.Set( n, aFmt );
}
@@ -1659,9 +1659,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
}
else if( !aFlags.bAFmtByInput )
- SetColl( static_cast<USHORT>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
else
- bChgEnum = FALSE;
+ bChgEnum = sal_False;
}
if( bChgEnum || bChgBullet )
@@ -1675,11 +1675,11 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
{
aDelPam.SetMark();
aDelPam.GetMark()->nNode++;
- aDelPam.GetNode(FALSE)->GetTxtNode()->SetAttrListLevel( nLvl );
+ aDelPam.GetNode(sal_False)->GetTxtNode()->SetAttrListLevel( nLvl );
}
pAktTxtNd->SetAttrListLevel(nLvl);
- pAktTxtNd->SetNumLSpace( TRUE );
+ pAktTxtNd->SetNumLSpace( sal_True );
// --> OD 2008-03-17 #refactorlists#
// start new list
@@ -1758,7 +1758,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if(!pNxtNd || pCurrNode == pNxtNd)
break;
}
- DeleteAktPara( FALSE, TRUE );
+ DeleteAktPara( sal_False, sal_True );
AutoCorrect( nAutoCorrPos );
}
@@ -1771,28 +1771,28 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
// Einrueckung in der 2.Zeile)
// lese alle nachfolgenden Absaetze die zu dieser Aufzaehlung gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
xub_StrLen nSpacePos, nTxtPos = GetBigIndent( nSpacePos );
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
( !nTxtPos && IsBlanksInString( *pAktTxtNd )) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( static_cast<USHORT>( nTxtPos
+ SetColl( static_cast<sal_uInt16>( nTxtPos
? RES_POOLCOLL_CONFRONTATION
: RES_POOLCOLL_TEXT_NEGIDENT ) );
if( nTxtPos )
{
const String& rStr = pAktTxtNd->GetTxt();
- BOOL bInsTab = TRUE;
+ sal_Bool bInsTab = sal_True;
if( '\t' == rStr.GetChar( nSpacePos+1 )) // ein Tab, das belassen wir
{
--nSpacePos;
- bInsTab = FALSE;
+ bInsTab = sal_False;
}
xub_StrLen nSpaceStt = nSpacePos;
@@ -1803,7 +1803,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
if( bInsTab && '\t' == rStr.GetChar( nSpaceStt ) ) // ein Tab, das belassen wir
{
++nSpaceStt;
- bInsTab = FALSE;
+ bInsTab = sal_False;
}
@@ -1846,12 +1846,12 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
-void SwAutoFormat::BuildHeadLine( USHORT nLvl )
+void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
{
if( aFlags.bWithRedlining )
{
@@ -1863,14 +1863,14 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl )
pDoc->SetAutoFmtRedlineComment( &sTxt );
}
- SetColl( static_cast<USHORT>(RES_POOLCOLL_HEADLINE1 + nLvl ), TRUE );
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + nLvl ), sal_True );
if( aFlags.bAFmtByInput )
{
SwTxtFmtColl& rNxtColl = pAktTxtNd->GetTxtColl()->GetNextTxtFmtColl();
DelPrevPara();
- DeleteAktPara( TRUE, FALSE );
+ DeleteAktPara( sal_True, sal_False );
DeleteAktNxtPara( aEmptyStr );
aDelPam.DeleteMark();
@@ -1880,7 +1880,7 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl )
}
else
{
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
}
@@ -1906,7 +1906,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos >= pTxt->Len() )
return;
- BOOL bGetLanguage = aFlags.bChgOrdinalNumber ||
+ sal_Bool bGetLanguage = aFlags.bChgOrdinalNumber ||
aFlags.bChgToEnEmDash || aFlags.bSetINetAttr ||
aFlags.bCptlSttWrd || aFlags.bCptlSttSntnc ||
aFlags.bAddNonBrkSpace;
@@ -1921,7 +1921,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
SwTxtFrmInfo aFInfo( 0 );
xub_StrLen nSttPos, nLastBlank = nPos;
- BOOL bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
+ sal_Bool bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
sal_Unicode cChar = 0;
CharClass& rAppCC = GetAppCharClass();
@@ -1944,17 +1944,17 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
aDelPam.GetPoint()->nContent = nPos;
- BOOL bSetHardBlank = FALSE;
+ sal_Bool bSetHardBlank = sal_False;
String sReplace( pATst->GetQuote( aACorrDoc,
- nPos, cChar, TRUE ));
+ nPos, cChar, sal_True ));
aDelPam.SetMark();
aDelPam.GetPoint()->nContent = nPos+1;
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 1 ))
{
sReplace.Erase( 1 );
- bSetHardBlank = TRUE;
+ bSetHardBlank = sal_True;
}
pDoc->ReplaceRange( aDelPam, sReplace, false );
@@ -1977,7 +1977,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
}
}
- int bCallACorr = FALSE;
+ int bCallACorr = sal_False;
int bBreak = 0;
if( nPos && IsSpace( pTxt->GetChar( nPos-1 )))
nLastBlank = nPos;
@@ -1995,15 +1995,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( !aFInfo.IsBullet( nPos ))
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
- BOOL bSetHardBlank = FALSE;
+ sal_Bool bSetHardBlank = sal_False;
aDelPam.GetPoint()->nContent = nPos;
String sReplace( pATst->GetQuote( aACorrDoc,
- nPos, cChar, FALSE ));
+ nPos, cChar, sal_False ));
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 0 ))
{
sReplace.Erase( 0, 1 );
- bSetHardBlank = TRUE;
+ bSetHardBlank = sal_True;
}
aDelPam.SetMark();
@@ -2088,7 +2088,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
case '!':
case '?':
if( aFlags.bCptlSttSntnc )
- bFirstSent = TRUE;
+ bFirstSent = sal_True;
//alle Wortrenner loesen die Autokorrektur aus!
// break;
default:
@@ -2107,15 +2107,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos == nSttPos )
{
if( ++nPos == pTxt->Len() )
- bCallACorr = TRUE;
+ bCallACorr = sal_True;
}
else
- bCallACorr = TRUE;
+ bCallACorr = sal_True;
if( bCallACorr )
{
- bCallACorr = FALSE;
+ bCallACorr = sal_False;
aDelPam.GetPoint()->nContent = nPos;
SetRedlineTxt( STR_AUTOFMTREDL_USE_REPLACE );
if( aFlags.bAutoCorrect &&
@@ -2168,12 +2168,12 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( aFlags.bCptlSttSntnc && bFirst )
{
SetRedlineTxt( STR_AUTOFMTREDL_CPTL_STT_SENT );
- pATst->FnCptlSttSntnc( aACorrDoc, *pTxt, TRUE, nSttPos, nPos, eLang);
- bFirst = FALSE;
+ pATst->FnCptlSttSntnc( aACorrDoc, *pTxt, sal_True, nSttPos, nPos, eLang);
+ bFirst = sal_False;
}
bFirst = bFirstSent;
- bFirstSent = FALSE;
+ bFirstSent = sal_False;
if( aFlags.bWithRedlining )
{
@@ -2206,14 +2206,14 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
"Kein Bereich angegeben" );
if( aFlags.bSetNumRule && !aFlags.bAFmtByInput )
- aFlags.bSetNumRule = FALSE;
+ aFlags.bSetNumRule = sal_False;
- BOOL bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
+ sal_Bool bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
const SwTxtNode* pNxtNd = 0;
- BOOL bNxtEmpty = FALSE;
- BOOL bNxtAlpha = FALSE;
- USHORT nNxtLevel = 0;
+ sal_Bool bNxtEmpty = sal_False;
+ sal_Bool bNxtAlpha = sal_False;
+ sal_uInt16 nNxtLevel = 0;
// setze den Bereich zum Autoformatieren
if( pSttNd )
@@ -2230,9 +2230,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsNoAlphaLine( *pNxtNd );
}
else
- bEmptyLine = TRUE; // am Dokument Anfang
+ bEmptyLine = sal_True; // am Dokument Anfang
- bEnde = FALSE;
+ bEnde = sal_False;
// setze die Werte fuer die Prozent-Anzeige
nEndNdIdx = aEndNdIdx.GetIndex();
@@ -2245,7 +2245,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
RedlineMode_t eRedlMode = pDoc->GetRedlineMode(), eOldMode = eRedlMode;
if( aFlags.bWithRedlining )
{
- pDoc->SetAutoFmtRedline( TRUE );
+ pDoc->SetAutoFmtRedline( sal_True );
eRedlMode = (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT);
}
else
@@ -2257,12 +2257,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// wenn mehrere Zeilen, dann erstmal nicht mit
// dem nachfolgenden Absatz zusammenfassen.
- bMoreLines = FALSE;
+ bMoreLines = sal_False;
nLastCalcHeadLvl = nLastCalcEnumLvl = 0;
nLastHeadLvl = nLastEnumLvl = USHRT_MAX;
- USHORT nLevel = 0;
- USHORT nDigitLvl = 0;
+ sal_uInt16 nLevel = 0;
+ sal_uInt16 nDigitLvl = 0;
// defaulten
SwTxtFrmInfo aFInfo( 0 );
@@ -2284,7 +2284,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
Window* pParent = pEditShell?pEditShell->GetWin():NULL;
WarningBox aWarning( pParent,SW_RES(MSG_DISABLE_UNDO_QUESTION));
aWarning.SetDefaultCheckBoxText();
- USHORT nDefaultButton = nResult==RET_YES?BUTTONID_YES:(nResult==RET_NO?BUTTONID_NO:BUTTONID_CANCEL);
+ sal_uInt16 nDefaultButton = nResult==RET_YES?BUTTONID_YES:(nResult==RET_NO?BUTTONID_NO:BUTTONID_CANCEL);
aWarning.SetFocusButton(nDefaultButton);
nResult = aWarning.Execute();
m_bAskForCancelUndoWhileBufferOverflow = !aWarning.GetCheckBoxState();
@@ -2330,8 +2330,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
if( aFlags.bDelEmptyNode && !HasObjects( *pAktTxtNd ) )
{
- bEmptyLine = TRUE;
- ULONG nOldCnt = pDoc->GetNodes().Count();
+ bEmptyLine = sal_True;
+ sal_uLong nOldCnt = pDoc->GetNodes().Count();
DelEmptyLine();
// wurde wiklich ein Node geloescht ?
if( nOldCnt != pDoc->GetNodes().Count() )
@@ -2351,7 +2351,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
//JP 30.09.96: das DoTable() verlaesst sich auf das
// Pop und Move - Crsr nach dem AutoFormat!
- pEdShell->Pop( FALSE );
+ pEdShell->Pop( sal_False );
*pEdShell->GetCrsr() = aDelPam;
pEdShell->Push();
@@ -2364,8 +2364,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// geloescht werden!
if( !DoUnderline() && bReplaceStyles )
{
- SetColl( RES_POOLCOLL_STANDARD, TRUE );
- bEmptyLine = TRUE;
+ SetColl( RES_POOLCOLL_STANDARD, sal_True );
+ bEmptyLine = sal_True;
}
eStat = READ_NEXT_PARA;
}
@@ -2378,12 +2378,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( pAktTxtNd->GetNumRule() )
{
// in Numerierung nichts machen, zum naechsten
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( FALSE );
+ DelMoreLinesBlanks( sal_False );
break;
}
@@ -2392,7 +2392,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- USHORT nPoolId = pAktTxtNd->GetTxtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = pAktTxtNd->GetTxtColl()->GetPoolFmtId();
if( IsPoolUserFmt( nPoolId )
? !aFlags.bChgUserColl
: ( RES_POOLCOLL_STANDARD != nPoolId &&
@@ -2411,7 +2411,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
short nSz;
SvxLRSpaceItem* pLRSpace;
if( SFX_ITEM_SET == pAktTxtNd->GetSwAttrSet().
- GetItemState( RES_LR_SPACE, TRUE,
+ GetItemState( RES_LR_SPACE, sal_True,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
0 != pLRSpace->GetTxtLeft() ) )
@@ -2431,7 +2431,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// nie zusammenfassen, so belassen
// (Opt. vielleicht als Ausnahmen nur Einzug)
- bMoreLines = TRUE;
+ bMoreLines = sal_True;
if( bReplaceStyles )
{
@@ -2458,9 +2458,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
nNxtLevel = CalcLevel( *pNxtNd );
if( !bEmptyLine && HasBreakAttr( *pAktTxtNd ) )
- bEmptyLine = TRUE;
+ bEmptyLine = sal_True;
if( !bNxtEmpty && HasBreakAttr( *pNxtNd ) )
- bNxtEmpty = TRUE;
+ bNxtEmpty = sal_True;
// fuer z.B. selbst definierte Einzuege oder
// rechts/zentierte Ausrichtung
@@ -2469,8 +2469,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
}
else
{
- bNxtEmpty = FALSE; // TRUE;
- bNxtAlpha = FALSE;
+ bNxtEmpty = sal_False; // sal_True;
+ bNxtAlpha = sal_False;
nNxtLevel = 0;
}
eStat = !bMoreLines ? IS_ONE_LINE : TST_ENUMERIC;
@@ -2487,7 +2487,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( !DelLeadingBlanks( sClrStr ).Len() )
{
- bEmptyLine = TRUE;
+ bEmptyLine = sal_True;
eStat = READ_NEXT_PARA;
break; // naechsten Absatz lesen
}
@@ -2497,7 +2497,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsBlanksInString( *pAktTxtNd ) )
break;
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
String sEndClrStr( sClrStr );
xub_StrLen nLen = DelTrailingBlanks( sEndClrStr ).Len();
@@ -2566,7 +2566,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
case TST_ENUMERIC:
{
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
if( IsEnumericChar( *pAktTxtNd ))
{
if( nLevel >= MAXLEVEL )
@@ -2663,12 +2663,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( FALSE );
+ DelMoreLinesBlanks( sal_False );
// behandel die harte Attributierung
if( pAktTxtNd->HasSwAttrSet() )
@@ -2677,7 +2677,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
SvxLRSpaceItem* pLRSpace;
if( bReplaceStyles &&
SFX_ITEM_SET == pAktTxtNd->GetSwAttrSet().
- GetItemState( RES_LR_SPACE, FALSE,
+ GetItemState( RES_LR_SPACE, sal_False,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
0 != pLRSpace->GetTxtLeft() ) )
@@ -2699,13 +2699,13 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
break;
case IS_ENDE:
- bEnde = TRUE;
+ bEnde = sal_True;
break;
}
}
if( aFlags.bWithRedlining )
- pDoc->SetAutoFmtRedline( FALSE );
+ pDoc->SetAutoFmtRedline( sal_False );
pDoc->SetRedlineMode( eOldMode );
// restore undo (in case it has been changed)
@@ -2729,7 +2729,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFmtFlags* pAFlags )
{
aAFFlags = *pAFlags;
if( !aAFFlags.bAFmtByInput )
- pWait = new SwWait( *GetDoc()->GetDocShell(), TRUE );
+ pWait = new SwWait( *GetDoc()->GetDocShell(), sal_True );
}
SwPaM* pCrsr = GetCrsr();
@@ -2765,13 +2765,13 @@ void SwEditShell::AutoFmtBySplitNode()
StartAllAction();
StartUndo( UNDO_AUTOFORMAT );
- BOOL bRange = FALSE;
+ sal_Bool bRange = sal_False;
pCrsr->SetMark();
SwIndex* pCntnt = &pCrsr->GetMark()->nContent;
if( pCntnt->GetIndex() )
{
*pCntnt = 0;
- bRange = TRUE;
+ bRange = sal_True;
}
else
{
@@ -2782,7 +2782,7 @@ void SwEditShell::AutoFmtBySplitNode()
{
pCntnt->Assign( pTxtNd, 0 );
pCrsr->GetMark()->nNode = aNdIdx;
- bRange = TRUE;
+ bRange = sal_True;
}
}
@@ -2797,7 +2797,7 @@ void SwEditShell::AutoFmtBySplitNode()
//JP 30.09.96: das DoTable() verlaesst sich auf das PopCrsr
// und MoveCrsr!
- Pop( FALSE );
+ Pop( sal_False );
pCrsr = GetCrsr();
}
pCrsr->DeleteMark();
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 6fda3a164c32..80bc442b8960 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -47,7 +47,7 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bUndoGroup = GetCrsr()->GetNext() != GetCrsr();
+ sal_Bool bUndoGroup = GetCrsr()->GetNext() != GetCrsr();
if( bUndoGroup )
GetDoc()->StartUndo(UNDO_RESETATTR, NULL);
@@ -118,21 +118,21 @@ void SwEditShell::SetDefault( const SfxItemSet& rSet )
// Erfrage das Default Attribut in diesem Dokument.
-const SfxPoolItem& SwEditShell::GetDefault( USHORT nFmtHint ) const
+const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
{
return GetDoc()->GetDefault( nFmtHint );
}
-void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
+void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn
{
- BOOL bIsTblMode = IsTableMode();
+ sal_Bool bIsTblMode = IsTableMode();
GetDoc()->StartUndo(UNDO_INSATTR, NULL);
FOREACHPAM_START(this)
@@ -155,14 +155,14 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
}
-void SwEditShell::SetAttr( const SfxItemSet& rSet, USHORT nFlags )
+void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn
{
- BOOL bIsTblMode = IsTableMode();
+ sal_Bool bIsTblMode = IsTableMode();
GetDoc()->StartUndo(UNDO_INSATTR, NULL);
FOREACHPAM_START(this)
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index f1f288f99d06..95b053aac213 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -64,21 +64,21 @@
// wenn Selektion groesser Max Nodes oder mehr als Max Selektionen
// => keine Attribute
-const USHORT& getMaxLookup()
+const sal_uInt16& getMaxLookup()
{
- static const USHORT nMaxLookup = 1000;
+ static const sal_uInt16 nMaxLookup = 1000;
return nMaxLookup;
}
// --> OD 2008-01-16 #newlistlevelattrs#
-BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
+sal_Bool SwEditShell::GetCurAttr( SfxItemSet& rSet,
const bool bMergeIndentValuesOfNumRule ) const
// <--
{
if( GetCrsrCnt() > getMaxLookup() )
{
rSet.InvalidateAllItems();
- return FALSE;
+ return sal_False;
}
SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() );
@@ -100,7 +100,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
if (pNumRule)
{
const String & aCharFmtName =
- pNumRule->Get(static_cast<USHORT>(pTxtNd->GetActualListLevel())).GetCharFmtName();
+ pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel())).GetCharFmtName();
SwCharFmt * pCharFmt =
GetDoc()->FindCharFmtByName(aCharFmtName);
@@ -112,14 +112,14 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
continue;
}
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
xub_StrLen nSttCnt = PCURCRSR->GetMark()->nContent.GetIndex(),
nEndCnt = PCURCRSR->GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (xub_StrLen)nTmp;
}
@@ -127,12 +127,12 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
{
rSet.ClearItem();
rSet.InvalidateAllItems();
- return FALSE;
+ return sal_False;
}
// beim 1.Node traegt der Node die Werte in den GetSet ein (Initial)
// alle weiteren Nodes werden zum GetSet zu gemergt
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwNode* pNd = GetDoc()->GetNodes()[ n ];
switch( pNd->GetNodeType() )
@@ -144,7 +144,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
: ((SwTxtNode*)pNd)->GetTxt().Len();
// --> OD 2008-01-16 #newlistlevelattrs#
((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd,
- FALSE, TRUE,
+ sal_False, sal_True,
bMergeIndentValuesOfNumRule );
// <--
}
@@ -171,7 +171,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
FOREACHPAM_END()
- return TRUE;
+ return sal_True;
}
SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
@@ -183,14 +183,14 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
FOREACHPAM_START(this)
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
xub_StrLen nSttCnt = PCURCRSR->GetMark()->nContent.GetIndex(),
nEndCnt = PCURCRSR->GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (xub_StrLen)nTmp;
}
@@ -200,7 +200,7 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
break;
}
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwNode* pNd = GetDoc()->GetNodes()[ n ];
if( pNd->IsTxtNode() )
@@ -218,13 +218,13 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
-BOOL SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
+sal_Bool SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
{
// der Cursor muss auf dem akt. Fussnoten-Anker stehen:
SwPaM* pCrsr = GetCrsr();
SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
if( !pTxtNd )
- return FALSE;
+ return sal_False;
SwTxtAttr *const pFtn = pTxtNd->GetTxtAttrForCharAt(
pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
@@ -258,11 +258,11 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
-/*USHORT SwEditShell::GetFtnCnt( BOOL bEndNotes = FALSE ) const
+/*sal_uInt16 SwEditShell::GetFtnCnt( sal_Bool bEndNotes = sal_False ) const
{
const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
- USHORT nCnt = 0;
- for ( USHORT i = 0; i < rIdxs.Count(); ++i )
+ sal_uInt16 nCnt = 0;
+ for ( sal_uInt16 i = 0; i < rIdxs.Count(); ++i )
{
const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
if ( bEndNotes == rFtn.IsEndNote() )
@@ -275,23 +275,23 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
bool SwEditShell::HasFtns( bool bEndNotes ) const
{
const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
- for ( USHORT i = 0; i < rIdxs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rIdxs.Count(); ++i )
{
const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
if ( bEndNotes == rFtn.IsEndNote() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// gebe Liste aller Fussnoten und deren Anfangstexte
-USHORT SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
+sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
{
if( rList.Count() )
rList.Remove( 0, rList.Count() );
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pTxtFtn;
for( n = 0; n < nFtnCnt; ++n )
{
@@ -329,28 +329,28 @@ USHORT SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen)
-BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
+sal_Bool SwEditShell::IsMoveLeftMargin( sal_Bool bRight, sal_Bool bModulus ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const SvxTabStopItem& rTabItem = (SvxTabStopItem&)GetDoc()->
GetDefault( RES_PARATR_TABSTOP );
- USHORT nDefDist = static_cast<USHORT>(rTabItem.Count() ? rTabItem[0].GetTabPos() : 1134);
+ sal_uInt16 nDefDist = static_cast<sal_uInt16>(rTabItem.Count() ? rTabItem[0].GetTabPos() : 1134);
if( !nDefDist )
- return FALSE;
+ return sal_False;
FOREACHPAM_START(this)
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
if( nSttNd > nEndNd )
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
}
SwCntntNode* pCNd;
- for( ULONG n = nSttNd; bRet && n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; bRet && n <= nEndNd; ++n )
if( 0 != ( pCNd = GetDoc()->GetNodes()[ n ]->GetTxtNode() ))
{
const SvxLRSpaceItem& rLS = (SvxLRSpaceItem&)
@@ -363,13 +363,13 @@ BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
SwFrm* pFrm = pCNd->GetFrm();
if ( pFrm )
{
- const USHORT nFrmWidth = static_cast<USHORT>( pFrm->IsVertical() ?
+ const sal_uInt16 nFrmWidth = static_cast<sal_uInt16>( pFrm->IsVertical() ?
pFrm->Frm().Height() :
pFrm->Frm().Width() );
bRet = nFrmWidth > ( nNext + MM50 );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -380,7 +380,7 @@ BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
return bRet;
}
-void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
+void SwEditShell::MoveLeftMargin( sal_Bool bRight, sal_Bool bModulus )
{
StartAllAction();
StartUndo( UNDO_START );
@@ -390,7 +390,7 @@ void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
{
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->MoveLeftMargin( aRangeArr.SetPam( n, aPam ),
bRight, bModulus );
}
@@ -402,9 +402,9 @@ void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
}
-inline USHORT lcl_SetScriptFlags( USHORT nType )
+inline sal_uInt16 lcl_SetScriptFlags( sal_uInt16 nType )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch( nType )
{
case ::com::sun::star::i18n::ScriptType::LATIN: nRet = SCRIPTTYPE_LATIN; break;
@@ -415,17 +415,17 @@ inline USHORT lcl_SetScriptFlags( USHORT nType )
return nRet;
}
-BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
- USHORT &rScrpt, BOOL bInSelection, BOOL bNum )
+sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
+ sal_uInt16 &rScrpt, sal_Bool bInSelection, sal_Bool bNum )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const String& rTxt = rTNd.GetTxt();
String sExp;
// consider numbering
if ( bNum )
{
- bRet = FALSE;
+ bRet = sal_False;
// --> OD 2008-03-19 #refactorlists#
if ( rTNd.IsInList() )
@@ -433,7 +433,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
ASSERT( rTNd.GetNumRule(),
"<lcl_IsNoEndTxtAttrAtPos(..)> - no list style found at text node. Serious defect -> please inform OD." );
const SwNumRule* pNumRule = rTNd.GetNumRule();
- const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<USHORT>(rTNd.GetActualListLevel()) );
+ const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
if( SVX_NUM_BITMAP != rNumFmt.GetNumberingType() )
{
if ( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
@@ -450,7 +450,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwTxtAttr* const pAttr = rTNd.GetTxtAttrForCharAt( nPos );
if (pAttr)
{
- bRet = TRUE; // all other than fields can be
+ bRet = sal_True; // all other than fields can be
// defined as weak-script ?
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
@@ -469,7 +469,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
xub_StrLen n;
if( bInSelection )
{
- USHORT nScript;
+ sal_uInt16 nScript;
for( n = 0; n < nEnd; n = (xub_StrLen)
pBreakIt->GetBreakIter()->endOfScript( sExp, n, nScript ))
{
@@ -487,9 +487,9 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
// returns the scripttpye of the selection
-USHORT SwEditShell::GetScriptType() const
+sal_uInt16 SwEditShell::GetScriptType() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
//if( pBreakIt->GetBreakIter().is() )
{
FOREACHPAM_START(this)
@@ -516,7 +516,7 @@ USHORT SwEditShell::GetScriptType() const
nPos = aIdx.GetIndex();
}
- USHORT nScript;
+ sal_uInt16 nScript;
if ( pTNd->GetTxt().Len() )
{
@@ -525,15 +525,15 @@ USHORT SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType( pTNd->GetTxt(), nPos );
}
else
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
- if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, FALSE, FALSE ))
+ if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, sal_False, sal_False ))
nRet |= lcl_SetScriptFlags( nScript );
}
}
else if ( pBreakIt->GetBreakIter().is() )
{
- ULONG nEndIdx = pEnd->nNode.GetIndex();
+ sal_uLong nEndIdx = pEnd->nNode.GetIndex();
SwNodeIndex aIdx( pStt->nNode );
for( ; aIdx.GetIndex() <= nEndIdx; aIdx++ )
if( aIdx.GetNode().IsTxtNode() )
@@ -555,7 +555,7 @@ USHORT SwEditShell::GetScriptType() const
if( nEndPos > rTxt.Len() )
nEndPos = rTxt.Len();
- USHORT nScript;
+ sal_uInt16 nScript;
while( nChg < nEndPos )
{
nScript = pScriptInfo ?
@@ -563,7 +563,7 @@ USHORT SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType(
rTxt, nChg );
- if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, TRUE,
+ if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, sal_True,
0 == nChg && rTxt.Len() == nEndPos ) )
nRet |= lcl_SetScriptFlags( nScript );
@@ -600,12 +600,12 @@ USHORT SwEditShell::GetScriptType() const
}
-USHORT SwEditShell::GetCurLang() const
+sal_uInt16 SwEditShell::GetCurLang() const
{
const SwPaM* pCrsr = GetCrsr();
const SwPosition& rPos = *pCrsr->GetPoint();
const SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
- USHORT nLang;
+ sal_uInt16 nLang;
if( pTNd )
{
//JP 24.9.2001: if exist no selection, then get the language before
@@ -620,14 +620,14 @@ USHORT SwEditShell::GetCurLang() const
return nLang;
}
-USHORT SwEditShell::GetScalingOfSelectedText() const
+sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
{
const SwPaM* pCrsr = GetCrsr();
const SwPosition* pStt = pCrsr->Start();
const SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode();
ASSERT( pTNd, "no textnode available" );
- USHORT nScaleWidth;
+ sal_uInt16 nScaleWidth;
if( pTNd )
{
xub_StrLen nStt = pStt->nContent.GetIndex(), nEnd;
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index a996ed802a42..16de81fc64bd 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -49,7 +49,7 @@
* Loeschen
************************************************************/
-void SwEditShell::DeleteSel( SwPaM& rPam, BOOL* pUndo )
+void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo )
{
// nur bei Selektion
if( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark())
@@ -63,13 +63,13 @@ void SwEditShell::DeleteSel( SwPaM& rPam, BOOL* pUndo )
// selektierten Boxen suchen in den Inhalt loeschen
if( rPam.GetNode()->FindTableNode() &&
rPam.GetNode()->StartOfSectionNode() !=
- rPam.GetNode(FALSE)->StartOfSectionNode() )
+ rPam.GetNode(sal_False)->StartOfSectionNode() )
{
// in Tabellen das Undo gruppieren
if( pUndo && !*pUndo )
{
GetDoc()->StartUndo( UNDO_START, NULL );
- *pUndo = TRUE;
+ *pUndo = sal_True;
}
SwPaM aDelPam( *rPam.Start() );
const SwPosition* pEndSelPos = rPam.End();
@@ -123,7 +123,7 @@ long SwEditShell::Delete()
{
StartAllAction();
- BOOL bUndo = GetCrsr()->GetNext() != GetCrsr();
+ sal_Bool bUndo = GetCrsr()->GetNext() != GetCrsr();
if( bUndo ) // mehr als eine Selection ?
{
SwRewriter aRewriter;
@@ -159,7 +159,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
{
SwPosition * pPos = 0;
boost::shared_ptr<SwPosition> pInsertPos;
- USHORT nMove = 0;
+ sal_uInt16 nMove = 0;
FOREACHPAM_START(this)
if( !pPos )
@@ -180,7 +180,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
if( nMove )
{
SwCursor aCrsr( *pPos, 0, false);
- if( aCrsr.UpDown( FALSE, nMove, 0, 0 ) )
+ if( aCrsr.UpDown( sal_False, nMove, 0, 0 ) )
{
pInsertPos.reset( new SwPosition( *aCrsr.GetPoint() ) );
aInsertList.push_back( pInsertPos );
@@ -194,14 +194,14 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Check if a selection would be copied into itself
if( pDestShell->GetDoc() == GetDoc() &&
*PCURCRSR->Start() <= *pTmp && *pTmp < *PCURCRSR->End() )
- return FALSE;
+ return sal_False;
FOREACHPAM_END()
}
pDestShell->StartAllAction();
SwPosition *pPos = 0;
- BOOL bRet = FALSE;
- BOOL bFirstMove = TRUE;
+ sal_Bool bRet = sal_False;
+ sal_Bool bFirstMove = sal_True;
SwNodeIndex aSttNdIdx( pDestShell->GetDoc()->GetNodes() );
xub_StrLen nSttCntIdx = 0;
// For block selection this list is filled with the insert positions
@@ -243,7 +243,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Anfangs-Position vom neuen Bereich merken
aSttNdIdx = pPos->nNode.GetIndex()-1;
nSttCntIdx = pPos->nContent.GetIndex();
- bFirstMove = FALSE;
+ bFirstMove = sal_False;
}
const bool bSuccess( GetDoc()->CopyRange( *PCURCRSR, *pPos, false ) );
@@ -253,7 +253,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
SwPaM aInsertPaM(*pPos, SwPosition(aSttNdIdx));
pDestShell->GetDoc()->MakeUniqueNumRules(aInsertPaM);
- bRet = TRUE;
+ bRet = sal_True;
FOREACHPAM_END()
@@ -281,8 +281,8 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
ASSERT( pCmp->GetPoint()->nContent.GetIdxReg()
== pCmp->GetCntntNode(), "Point im falschen Node" );
ASSERT( pCmp->GetMark()->nContent.GetIdxReg()
- == pCmp->GetCntntNode(FALSE), "Mark im falschen Node" );
- BOOL bTst = *pCmp->GetPoint() == *pCmp->GetMark();
+ == pCmp->GetCntntNode(sal_False), "Mark im falschen Node" );
+ sal_Bool bTst = *pCmp->GetPoint() == *pCmp->GetMark();
(void) bTst;
} while( pDestShell->GetCrsr() != ( pCmp = (SwPaM*)pCmp->GetNext() ) );
}
@@ -304,11 +304,11 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// ein ( nicht \& )
// z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
// --> "xx\t<Tab>..zzz..&"
-BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
+sal_Bool SwEditShell::Replace( const String& rNewStr, sal_Bool bRegExpRplc )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !HasReadonlySel() )
{
StartAllAction();
@@ -332,9 +332,9 @@ BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
// Special-Methode fuer JOE's- Wizzards
-BOOL SwEditShell::DelFullPara()
+sal_Bool SwEditShell::DelFullPara()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
SwPaM* pCrsr = GetCrsr();
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index c3dc53f1ba26..2f491e0babf6 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -56,13 +56,13 @@ SwTxtFmtColl& SwEditShell::GetDfltTxtFmtColl() const
}
-USHORT SwEditShell::GetTxtFmtCollCount() const
+sal_uInt16 SwEditShell::GetTxtFmtCollCount() const
{
return GetDoc()->GetTxtFmtColls()->Count();
}
-SwTxtFmtColl& SwEditShell::GetTxtFmtColl( USHORT nFmtColl) const
+SwTxtFmtColl& SwEditShell::GetTxtFmtColl( sal_uInt16 nFmtColl) const
{
return *((*(GetDoc()->GetTxtFmtColls()))[nFmtColl]);
}
@@ -101,14 +101,14 @@ SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName,
pParent = &GetTxtFmtColl(0);
if ( (pColl=GetDoc()->MakeTxtFmtColl(rFmtCollName, pParent)) == 0 )
{
- ASSERT( FALSE, "MakeTxtFmtColl failed" )
+ ASSERT( sal_False, "MakeTxtFmtColl failed" )
}
return pColl;
}
-void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
+void SwEditShell::FillByEx(SwTxtFmtColl* pColl, sal_Bool bReset)
{
if( bReset )
{
@@ -130,10 +130,10 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
// AutoNumRules NICHT in die Vorlagen uebernehmen
const SfxPoolItem* pItem;
const SwNumRule* pRule = 0;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,FALSE ) ||
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False ) ||
+ SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,sal_False ) ||
( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ sal_False, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() )
)
@@ -143,7 +143,7 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
aSet.ClearItem( RES_PAGEDESC );
if( pRule || (SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ sal_False, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() ))
aSet.ClearItem( RES_PARATR_NUMRULE );
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index aa84aa480121..a0e99e7a57e5 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -52,10 +52,10 @@
wenn 0 alle zaehlen
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
+sal_uInt16 SwEditShell::GetFldTypeCount(sal_uInt16 nResId, sal_Bool bUsed ) const
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
if(nResId == USHRT_MAX)
{
@@ -63,8 +63,8 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
return nSize;
else
{
- USHORT nUsed = 0;
- for ( USHORT i = 0; i < nSize; i++ )
+ sal_uInt16 nUsed = 0;
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
nUsed++;
@@ -74,8 +74,8 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
}
// Alle Typen mit gleicher ResId
- USHORT nIdx = 0;
- for(USHORT i = 0; i < nSize; ++i)
+ sal_uInt16 nIdx = 0;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{ // Gleiche ResId -> Index erhoehen
SwFieldType& rFldType = *((*pFldTypes)[i]);
if(rFldType.Which() == nResId)
@@ -88,10 +88,10 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
Beschreibung: Feldtypen zu einer ResId finden
wenn 0 alle finden
--------------------------------------------------------------------*/
-SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) const
+SwFieldType* SwEditShell::GetFldType(sal_uInt16 nFld, sal_uInt16 nResId, sal_Bool bUsed ) const
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
if(nResId == USHRT_MAX && nFld < nSize)
{
@@ -99,7 +99,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
return (*pFldTypes)[nFld];
else
{
- USHORT i, nUsed = 0;
+ sal_uInt16 i, nUsed = 0;
for ( i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
@@ -113,8 +113,8 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
}
}
- USHORT nIdx = 0;
- for(USHORT i = 0; i < nSize; ++i)
+ sal_uInt16 nIdx = 0;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{ // Gleiche ResId -> Index erhoehen
SwFieldType* pFldType = (*pFldTypes)[i];
if(pFldType->Which() == nResId)
@@ -133,7 +133,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
/*--------------------------------------------------------------------
Beschreibung: Den ersten Typen mit ResId und Namen finden
--------------------------------------------------------------------*/
-SwFieldType* SwEditShell::GetFldType(USHORT nResId, const String& rName) const
+SwFieldType* SwEditShell::GetFldType(sal_uInt16 nResId, const String& rName) const
{
return GetDoc()->GetFldType( nResId, rName, false );
}
@@ -141,7 +141,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nResId, const String& rName) const
/*--------------------------------------------------------------------
Beschreibung: Feldtypen loeschen
--------------------------------------------------------------------*/
-void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
+void SwEditShell::RemoveFldType(sal_uInt16 nFld, sal_uInt16 nResId)
{
if( USHRT_MAX == nResId )
{
@@ -150,9 +150,9 @@ void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
}
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
- USHORT nIdx = 0;
- for( USHORT i = 0; i < nSize; ++i )
+ const sal_uInt16 nSize = pFldTypes->Count();
+ sal_uInt16 nIdx = 0;
+ for( sal_uInt16 i = 0; i < nSize; ++i )
// Gleiche ResId -> Index erhoehen
if( (*pFldTypes)[i]->Which() == nResId &&
nIdx++ == nFld )
@@ -165,15 +165,15 @@ void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
/*--------------------------------------------------------------------
Beschreibung: FieldType ueber Name loeschen
--------------------------------------------------------------------*/
-void SwEditShell::RemoveFldType(USHORT nResId, const String& rStr)
+void SwEditShell::RemoveFldType(sal_uInt16 nResId, const String& rStr)
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
const CharClass& rCC = GetAppCharClass();
String aTmp( rCC.lower( rStr ));
- for(USHORT i = 0; i < nSize; ++i)
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
// Gleiche ResId -> Index erhoehen
SwFieldType* pFldType = (*pFldTypes)[i];
@@ -200,7 +200,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
Push();
SwPaM* pPaM = GetCrsr();
- BOOL bDDEFld = RES_DDEFLD == pType->Which();
+ sal_Bool bDDEFld = RES_DDEFLD == pType->Which();
// Modify-Object gefunden, trage alle Felder ins Array ein
SwClientIter aIter( *pType );
SwClient * pLast = aIter.GoStart();
@@ -240,7 +240,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
} while( 0 != ( pLast = aIter++ ));
- Pop( FALSE );
+ Pop( sal_False );
EndAllAction();
EndUndo( UNDO_DELETE );
}
@@ -366,7 +366,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Cursor-Position.
SwMsgPoolItem* pMsgHnt = 0;
SwRefMarkFldUpdate aRefMkHt( GetOut() );
- USHORT nFldWhich = rFld.GetTyp()->Which();
+ sal_uInt16 nFldWhich = rFld.GetTyp()->Which();
if( RES_GETREFFLD == nFldWhich )
pMsgHnt = &aRefMkHt;
@@ -387,14 +387,14 @@ void SwEditShell::UpdateFlds( SwField &rFld )
pTxtFld = lcl_FindInputFld( GetDoc(), rFld);
if (pTxtFld != 0)
- GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, TRUE); // #111840#
+ GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, sal_True); // #111840#
}
- // bOkay (statt return wg. EndAllAction) wird FALSE,
+ // bOkay (statt return wg. EndAllAction) wird sal_False,
// 1) wenn nur ein Pam mehr als ein Feld enthaelt oder
// 2) bei gemischten Feldtypen
- BOOL bOkay = TRUE;
- BOOL bTblSelBreak = FALSE;
+ sal_Bool bOkay = sal_True;
+ sal_Bool bTblSelBreak = sal_False;
SwMsgPoolItem aHint( RES_TXTATR_FIELD ); // Such-Hint
FOREACHPAM_START(this) // fuer jeden PaM
@@ -417,11 +417,11 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Suche nach SwTxtFld ...
while( bOkay
&& pCurStt->nContent != pCurEnd->nContent
- && aPam.Find( aHint, FALSE, fnMoveForward, &aCurPam ) )
+ && aPam.Find( aHint, sal_False, fnMoveForward, &aCurPam ) )
{
// wenn nur ein Pam mehr als ein Feld enthaelt ...
if( aPam.Start()->nContent != pCurStt->nContent )
- bOkay = FALSE;
+ bOkay = sal_False;
if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
{
@@ -431,10 +431,10 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// bei gemischten Feldtypen
if( pCurFld->GetTyp()->Which() !=
rFld.GetTyp()->Which() )
- bOkay = FALSE;
+ bOkay = sal_False;
bTblSelBreak = GetDoc()->UpdateFld(pTxtFld, rFld,
- pMsgHnt, FALSE); // #111840#
+ pMsgHnt, sal_False); // #111840#
}
// Der Suchbereich wird um den gefundenen Bereich
// verkuerzt.
@@ -485,7 +485,7 @@ void SwEditShell::ChangeDBFields( const SvStringsDtor& rOldNames,
/*--------------------------------------------------------------------
Beschreibung: Alle Expression-Felder erneuern
--------------------------------------------------------------------*/
-void SwEditShell::UpdateExpFlds(BOOL bCloseDB)
+void SwEditShell::UpdateExpFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -524,30 +524,30 @@ void SwEditShell::SetFldUpdateFlags( SwFldUpdateFlags eFlags )
getIDocumentSettingAccess()->setFieldUpdateFlags( eFlags );
}
-SwFldUpdateFlags SwEditShell::GetFldUpdateFlags(BOOL bDocSettings) const
+SwFldUpdateFlags SwEditShell::GetFldUpdateFlags(sal_Bool bDocSettings) const
{
return getIDocumentSettingAccess()->getFieldUpdateFlags( !bDocSettings );
}
-void SwEditShell::SetFixFields( BOOL bOnlyTimeDate,
+void SwEditShell::SetFixFields( sal_Bool bOnlyTimeDate,
const DateTime* pNewDateTime )
{
SET_CURR_SHELL( this );
- BOOL bUnLockView = !IsViewLocked();
- LockView( TRUE );
+ sal_Bool bUnLockView = !IsViewLocked();
+ LockView( sal_True );
StartAllAction();
GetDoc()->SetFixFields( bOnlyTimeDate, pNewDateTime );
EndAllAction();
if( bUnLockView )
- LockView( FALSE );
+ LockView( sal_False );
}
-void SwEditShell::SetLabelDoc( BOOL bFlag )
+void SwEditShell::SetLabelDoc( sal_Bool bFlag )
{
GetDoc()->set(IDocumentSettingAccess::LABEL_DOCUMENT, bFlag );
}
-BOOL SwEditShell::IsLabelDoc() const
+sal_Bool SwEditShell::IsLabelDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::LABEL_DOCUMENT);
}
@@ -561,14 +561,14 @@ void SwEditShell::ChangeAuthorityData(const SwAuthEntry* pNewData)
/* -----------------------------03.08.2001 12:04------------------------------
---------------------------------------------------------------------------*/
-BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
+sal_Bool SwEditShell::IsAnyDatabaseFieldInDoc()const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
- for(USHORT i = 0; i < nSize; ++i)
+ const sal_uInt16 nSize = pFldTypes->Count();
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -583,7 +583,7 @@ BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
while(pFld)
{
if(pFld->IsFldInDoc())
- return TRUE;
+ return sal_True;
pFld = (SwFmtFld*)aIter.Next();
}
}
@@ -591,5 +591,5 @@ BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
}
}
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx
index 1bc78a5a7482..6359c982507e 100644
--- a/sw/source/core/edit/edfldexp.cxx
+++ b/sw/source/core/edit/edfldexp.cxx
@@ -49,21 +49,21 @@ using ::rtl::OUString;
/* -----------------28.11.2002 17:53-----------------
*
* --------------------------------------------------*/
-BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
+sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
if( !xMgr.is() )
- return FALSE;
+ return sal_False;
uno::Reference<uno::XInterface> xInstance = xMgr->createInstance( OUString::createFromAscii( "com.sun.star.sdb.DatabaseContext" ));
uno::Reference<container::XNameAccess> xDBContext(xInstance, uno::UNO_QUERY) ;
if(!xDBContext.is())
- return FALSE;
- for(USHORT i = 0; i < nSize; ++i)
+ return sal_False;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -85,7 +85,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
catch(uno::Exception const &)
{
rUsedDataSource = rData.sDataSource;
- return FALSE;
+ return sal_False;
}
}
pFld = (SwFmtFld*)aIter.Next();
@@ -95,7 +95,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
}
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index a23f6ae784ae..225a1df48c74 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -48,13 +48,13 @@
// OPT: inline
-USHORT SwEditShell::GetCharFmtCount() const
+sal_uInt16 SwEditShell::GetCharFmtCount() const
{
return GetDoc()->GetCharFmts()->Count();
}
-SwCharFmt& SwEditShell::GetCharFmt(USHORT nFmt) const
+SwCharFmt& SwEditShell::GetCharFmt(sal_uInt16 nFmt) const
{
return *((*(GetDoc()->GetCharFmts()))[nFmt]);
}
@@ -67,14 +67,14 @@ SwCharFmt* SwEditShell::GetCurCharFmt() const
RES_TXTATR_CHARFMT );
const SfxPoolItem* pItem;
if( GetCurAttr( aSet ) && SFX_ITEM_SET ==
- aSet.GetItemState( RES_TXTATR_CHARFMT, FALSE, &pItem ) )
+ aSet.GetItemState( RES_TXTATR_CHARFMT, sal_False, &pItem ) )
pFmt = ((SwFmtCharFmt*)pItem)->GetCharFmt();
return pFmt;
}
-void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
+void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
{
if ( bReset )
{
@@ -128,12 +128,12 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
}
// Frm
-USHORT SwEditShell::GetTblFrmFmtCount(BOOL bUsed) const
+sal_uInt16 SwEditShell::GetTblFrmFmtCount(sal_Bool bUsed) const
{
return GetDoc()->GetTblFrmFmtCount(bUsed);
}
-SwFrmFmt& SwEditShell::GetTblFrmFmt(USHORT nFmt, BOOL bUsed ) const
+SwFrmFmt& SwEditShell::GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const
{
return GetDoc()->GetTblFrmFmt(nFmt, bUsed );
}
@@ -157,31 +157,31 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& rName,
// inlines im Product
-SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT nId )
+SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId )
{
return GetDoc()->GetTxtCollFromPool( nId );
}
// return das geforderte automatische Format - Basis-Klasse !
-SwFmt* SwEditShell::GetFmtFromPool( USHORT nId )
+SwFmt* SwEditShell::GetFmtFromPool( sal_uInt16 nId )
{
return GetDoc()->GetFmtFromPool( nId );
}
-SwPageDesc* SwEditShell::GetPageDescFromPool( USHORT nId )
+SwPageDesc* SwEditShell::GetPageDescFromPool( sal_uInt16 nId )
{
return GetDoc()->GetPageDescFromPool( nId );
}
-BOOL SwEditShell::IsUsed( const SwModify& rModify ) const
+sal_Bool SwEditShell::IsUsed( const SwModify& rModify ) const
{
return pDoc->IsUsed( rModify );
}
-const SwFlyFrmFmt* SwEditShell::FindFlyByName( const String& rName, BYTE nNdTyp ) const
+const SwFlyFrmFmt* SwEditShell::FindFlyByName( const String& rName, sal_uInt8 nNdTyp ) const
{
return pDoc->FindFlyByName(rName, nNdTyp);
}
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 6f884f244326..b39fa2724f73 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -43,12 +43,12 @@
SV_IMPL_OP_PTRARR_SORT( SwGlblDocContents, SwGlblDocContentPtr )
-BOOL SwEditShell::IsGlobalDoc() const
+sal_Bool SwEditShell::IsGlobalDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
}
-void SwEditShell::SetGlblDocSaveLinks( BOOL bFlag )
+void SwEditShell::SetGlblDocSaveLinks( sal_Bool bFlag )
{
getIDocumentSettingAccess()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bFlag);
if( !GetDoc()->IsModified() ) // Bug 57028
@@ -56,12 +56,12 @@ void SwEditShell::SetGlblDocSaveLinks( BOOL bFlag )
GetDoc()->SetModified();
}
-BOOL SwEditShell::IsGlblDocSaveLinks() const
+sal_Bool SwEditShell::IsGlblDocSaveLinks() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
}
-USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
+sal_uInt16 SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
{
if( rArr.Count() )
rArr.DeleteAndDestroy( 0, rArr.Count() );
@@ -72,7 +72,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// dann alle gelinkten Bereiche auf der obersten Ebene
SwDoc* pMyDoc = GetDoc();
const SwSectionFmts& rSectFmts = pMyDoc->GetSections();
- USHORT n;
+ sal_uInt16 n;
for( n = rSectFmts.Count(); n; )
{
@@ -99,7 +99,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// und als letztes die Dummies (sonstiger Text) einfuegen
SwNode* pNd;
- ULONG nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
+ sal_uLong nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
for( n = 0; n < rArr.Count(); ++n )
{
const SwGlblDocContent& rNew = *rArr[ n ];
@@ -125,7 +125,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// sollte man das Ende auch noch setzen??
if( rArr.Count() )
{
- ULONG nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
+ sal_uLong nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
for( ; nSttIdx < nNdEnd; ++nSttIdx )
if( ( pNd = pMyDoc->GetNodes()[ nSttIdx ])->IsCntntNode()
|| pNd->IsSectionNode() || pNd->IsTableNode() )
@@ -145,11 +145,11 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
return rArr.Count();
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwSectionData & rNew)
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -161,14 +161,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();
- BOOL bEndUndo = FALSE;
+ sal_Bool bEndUndo = sal_False;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = pMyDoc->GetNodes()[ rPos.nNode ]->GetTxtNode();
if( pTxtNd )
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = TRUE;
+ bEndUndo = sal_True;
pMyDoc->StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
@@ -181,14 +181,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
pMyDoc->EndUndo( UNDO_END, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
const SwTOXBase& rTOX )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -200,7 +200,7 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();
- BOOL bEndUndo = FALSE;
+ sal_Bool bEndUndo = sal_False;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd && pTxtNd->GetTxt().Len() && rPos.nNode.GetIndex() + 1 !=
@@ -208,7 +208,7 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = TRUE;
+ bEndUndo = sal_True;
pMyDoc->StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
@@ -220,13 +220,13 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
pMyDoc->EndUndo( UNDO_END, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -242,14 +242,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
SwDoc* pMyDoc = GetDoc();
pMyDoc->AppendTxtNode( rPos );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nDelPos )
+sal_Bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nDelPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -263,7 +263,7 @@ BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
SwDoc* pMyDoc = GetDoc();
const SwGlblDocContent& rDelPos = *rArr[ nDelPos ];
- ULONG nDelIdx = rDelPos.GetDocPos();
+ sal_uLong nDelIdx = rDelPos.GetDocPos();
if( 1 == rArr.Count() )
{
// ein Node muss aber da bleiben!
@@ -293,32 +293,32 @@ BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
case GLBLDOC_TOXBASE:
{
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)rDelPos.GetTOX();
- pMyDoc->DeleteTOX( *pTOX, TRUE );
+ pMyDoc->DeleteTOX( *pTOX, sal_True );
}
break;
case GLBLDOC_SECTION:
{
SwSectionFmt* pSectFmt = (SwSectionFmt*)rDelPos.GetSection()->GetFmt();
- pMyDoc->DelSectionFmt( pSectFmt, TRUE );
+ pMyDoc->DelSectionFmt( pSectFmt, sal_True );
}
break;
}
EndUndo( UNDO_END );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nFromPos, USHORT nToPos,
- USHORT nInsPos )
+sal_Bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nFromPos, sal_uInt16 nToPos,
+ sal_uInt16 nInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ||
nFromPos >= rArr.Count() || nToPos > rArr.Count() ||
nInsPos > rArr.Count() || nFromPos >= nToPos ||
( nFromPos <= nInsPos && nInsPos <= nToPos ) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -349,10 +349,10 @@ BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
return bRet;
}
-BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
+sal_Bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SttCrsrMove();
@@ -372,10 +372,10 @@ BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
rCrsrPos.nContent.Assign( pCNd, 0 );
EndCrsrMove();
- return TRUE;
+ return sal_True;
}
-SwGlblDocContent::SwGlblDocContent( ULONG nPos )
+SwGlblDocContent::SwGlblDocContent( sal_uLong nPos )
{
eType = GLBLDOC_UNKNOWN;
PTR.pTOX = 0;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 50709990f0ff..56996558b306 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -64,8 +64,8 @@ void SwEditShell::InsertGlossary( SwTextBlocks& rGlossary, const String& rStr )
******************************************************************************/
-USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, const String& rShortName,
- BOOL bSaveRelFile, const String* pOnlyTxt )
+sal_uInt16 SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, const String& rShortName,
+ sal_Bool bSaveRelFile, const String* pOnlyTxt )
{
SwDoc* pGDoc = rBlks.GetDoc();
@@ -77,7 +77,7 @@ USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, cons
}
rBlks.SetBaseURL( sBase );
- USHORT nRet;
+ sal_uInt16 nRet;
if( pOnlyTxt )
nRet = rBlks.PutText( rShortName, rName, *pOnlyTxt );
@@ -92,17 +92,17 @@ USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, cons
nRet = rBlks.PutDoc();
}
else
- nRet = (USHORT) -1;
+ nRet = (sal_uInt16) -1;
}
return nRet;
}
-USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
+sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
const String& rName,
const String& rShortName,
- BOOL bSaveRelFile,
- BOOL bOnlyTxt )
+ sal_Bool bSaveRelFile,
+ sal_Bool bOnlyTxt )
{
StartAllAction();
@@ -116,7 +116,7 @@ USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
}
rBlock.SetBaseURL( sBase );
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( bOnlyTxt )
{
@@ -179,7 +179,7 @@ USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
******************************************************************************/
-BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
+sal_Bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
{
ASSERT( pInsDoc, "kein Ins.Dokument" );
@@ -196,7 +196,7 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
(*pSttNd)--;
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SET_CURR_SHELL( this );
pInsDoc->LockExpFlds();
@@ -215,22 +215,22 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
->GetSttNd()->FindTableNode() ))
{
// teste ob der TabellenName kopiert werden kann
- BOOL bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().Count();
+ sal_Bool bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().Count();
if( bCpyTblNm )
{
const String& rTblName = pTblNd->GetTable().GetFrmFmt()->GetName();
const SwFrmFmts& rTblFmts = *pInsDoc->GetTblFrmFmts();
- for( USHORT n = rTblFmts.Count(); n; )
+ for( sal_uInt16 n = rTblFmts.Count(); n; )
if( rTblFmts[ --n ]->GetName() == rTblName )
{
- bCpyTblNm = FALSE;
+ bCpyTblNm = sal_False;
break;
}
}
- bRet = pInsDoc->InsCopyOfTbl( aPos, aBoxes, 0, bCpyTblNm, FALSE );
+ bRet = pInsDoc->InsCopyOfTbl( aPos, aBoxes, 0, bCpyTblNm, sal_False );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
@@ -276,13 +276,13 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
/*------------------------------------------------------------------------
Beschreibung: Text innerhalb der Selektion erfragen
- Returnwert: liefert FALSE, wenn der selektierte Bereich
+ Returnwert: liefert sal_False, wenn der selektierte Bereich
zu gross ist, um in den Stringpuffer kopiert zu werden.
------------------------------------------------------------------------*/
-BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
+sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetCrsr(); // ggfs. alle Cursor erzeugen lassen
if( IsSelOnePara() )
{
@@ -304,7 +304,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
RTL_CONSTASCII_STRINGPARAM( "\015\012" ));
#endif
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if( IsSelection() )
{
@@ -320,18 +320,18 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
// Selektierte Bereiche in ein ASCII Dokument schreiben
SwWriter aWriter( aStream, *this);
- xWrt->SetShowProgress( FALSE );
+ xWrt->SetShowProgress( sal_False );
switch( nHndlParaBrk )
{
case GETSELTXT_PARABRK_TO_BLANK:
- xWrt->bASCII_ParaAsBlanc = TRUE;
- xWrt->bASCII_NoLastLineEnd = TRUE;
+ xWrt->bASCII_ParaAsBlanc = sal_True;
+ xWrt->bASCII_NoLastLineEnd = sal_True;
break;
case GETSELTXT_PARABRK_TO_ONLYCR:
- xWrt->bASCII_ParaAsCR = TRUE;
- xWrt->bASCII_NoLastLineEnd = TRUE;
+ xWrt->bASCII_ParaAsCR = sal_True;
+ xWrt->bASCII_NoLastLineEnd = sal_True;
break;
}
@@ -339,7 +339,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
SwAsciiOptions aAsciiOpt( xWrt->GetAsciiOptions() );
aAsciiOpt.SetCharSet( RTL_TEXTENCODING_UCS2 );
xWrt->SetAsciiOptions( aAsciiOpt );
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
long lLen;
if( !IsError( aWriter.Write( xWrt ) ) &&
@@ -364,7 +364,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7a143a2d29d9..1698e4eb45bd 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -78,7 +78,7 @@ SV_IMPL_PTRARR(SwGetINetAttrs, SwGetINetAttr*)
******************************************************************************/
-void SwEditShell::Insert( sal_Unicode c, BOOL bOnlyCurrCrsr )
+void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr )
{
StartAllAction();
FOREACHPAM_START(this)
@@ -128,7 +128,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
// calculate cursor bidi level
SwCursor* pTmpCrsr = _GetCrsr();
- const BOOL bDoNotSetBidiLevel = ! pTmpCrsr ||
+ const sal_Bool bDoNotSetBidiLevel = ! pTmpCrsr ||
( 0 != dynamic_cast<SwUnoCrsr*>(pTmpCrsr) );
if ( ! bDoNotSetBidiLevel )
@@ -145,7 +145,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
SwScriptInfo* pSI = SwScriptInfo::GetScriptInfo( ((SwTxtNode&)rNode),
sal_True );
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
if ( ! pSI )
{
// seems to be an empty paragraph.
@@ -169,7 +169,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
}
}
- SetInFrontOfLabel( FALSE ); // #i27615#
+ SetInFrontOfLabel( sal_False ); // #i27615#
EndAllAction();
}
@@ -186,7 +186,7 @@ void SwEditShell::Overwrite(const String &rStr)
FOREACHPAM_START(this)
if( !GetDoc()->Overwrite(*PCURCRSR, rStr ) )
{
- ASSERT( FALSE, "Doc->Overwrite(Str) failed." )
+ ASSERT( sal_False, "Doc->Overwrite(Str) failed." )
}
SaveTblBoxCntnt( PCURCRSR->GetPoint() );
FOREACHPAM_END()
@@ -198,7 +198,7 @@ void SwEditShell::Overwrite(const String &rStr)
* long SwEditShell::SplitNode()
******************************************************************************/
-long SwEditShell::SplitNode( BOOL bAutoFormat, BOOL bCheckTableStart )
+long SwEditShell::SplitNode( sal_Bool bAutoFormat, sal_Bool bCheckTableStart )
{
StartAllAction();
GetDoc()->StartUndo(UNDO_EMPTY, NULL);
@@ -265,7 +265,7 @@ SwGrfNode * SwEditShell::_GetGrfNode() const
******************************************************************************/
// --> OD 2005-02-09 #119353# - robust
-const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
+const Graphic* SwEditShell::GetGraphic( sal_Bool bWait ) const
{
SwGrfNode* pGrfNode = _GetGrfNode();
// --> OD 2005-02-09 #119353# - robust
@@ -274,7 +274,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
{
pGrf = &(pGrfNode->GetGrf());
// --> OD 2007-03-01 #i73788#
- // no load of linked graphic, if its not needed now (bWait = FALSE).
+ // no load of linked graphic, if its not needed now (bWait = sal_False).
if ( bWait )
{
if( pGrf->IsSwapOut() ||
@@ -304,7 +304,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
// <--
}
-BOOL SwEditShell::IsGrfSwapOut( BOOL bOnlyLinked ) const
+sal_Bool SwEditShell::IsGrfSwapOut( sal_Bool bOnlyLinked ) const
{
SwGrfNode *pGrfNode = _GetGrfNode();
return pGrfNode &&
@@ -323,10 +323,10 @@ const GraphicObject* SwEditShell::GetGraphicObj() const
// <--
}
-USHORT SwEditShell::GetGraphicType() const
+sal_uInt16 SwEditShell::GetGraphicType() const
{
SwGrfNode *pGrfNode = _GetGrfNode();
- return static_cast<USHORT>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE);
+ return static_cast<sal_uInt16>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE);
}
/******************************************************************************
@@ -335,7 +335,7 @@ USHORT SwEditShell::GetGraphicType() const
* oder auf die gleiche Graphic zeigt)
******************************************************************************/
-BOOL SwEditShell::GetGrfSize(Size& rSz) const
+sal_Bool SwEditShell::GetGrfSize(Size& rSz) const
{
SwNoTxtNode* pNoTxtNd;
SwPaM* pCurrentCrsr = GetCrsr();
@@ -344,9 +344,9 @@ BOOL SwEditShell::GetGrfSize(Size& rSz) const
&& 0 != ( pNoTxtNd = pCurrentCrsr->GetNode()->GetNoTxtNode() ) )
{
rSz = pNoTxtNd->GetTwipSize();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -436,7 +436,7 @@ void SwEditShell::ClearAutomaticContour()
if( pNd->HasAutomaticContour() )
{
StartAllAction();
- pNd->SetContour( NULL, FALSE );
+ pNd->SetContour( NULL, sal_False );
SwFlyFrm *pFly = (SwFlyFrm*)pNd->GetFrm()->GetUpper();
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
pFly->GetFmt()->SwModify::Modify( (SwFmtSurround*)&rSur,
@@ -469,7 +469,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const
}
-BOOL SwEditShell::HasOLEObj( const String &rName ) const
+sal_Bool SwEditShell::HasOLEObj( const String &rName ) const
{
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
@@ -480,11 +480,11 @@ BOOL SwEditShell::HasOLEObj( const String &rName ) const
if( rNd.IsOLENode() &&
rName == ((SwOLENode&)rNd).GetChartTblName() &&
((SwOLENode&)rNd).GetFrm() )
- return TRUE;
+ return sal_True;
aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
}
- return FALSE;
+ return sal_False;
}
@@ -544,7 +544,7 @@ const SwFmtRefMark* SwEditShell::GetRefMark( const String& rName ) const
}
// returne die Namen aller im Doc gesetzten Referenzen
-USHORT SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
+sal_uInt16 SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
{
return GetDoc()->GetRefMarks( pStrings );
}
@@ -554,7 +554,7 @@ USHORT SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
******************************************************************************/
-String SwEditShell::GetDropTxt( const USHORT nChars ) const
+String SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const
{
/**
* pb: made changes for #i74939#
@@ -568,7 +568,7 @@ String SwEditShell::GetDropTxt( const USHORT nChars ) const
{
// if a multi selection exists, search for the first line
// -> it is the cursor with the lowest index
- ULONG nIndex = pCrsr->GetMark()->nNode.GetIndex();
+ sal_uLong nIndex = pCrsr->GetMark()->nNode.GetIndex();
bool bPrev = true;
SwPaM* pLast = pCrsr;
SwPaM* pTemp = pCrsr;
@@ -579,7 +579,7 @@ String SwEditShell::GetDropTxt( const USHORT nChars ) const
if ( bPrev )
{
pTemp = pPrev2;
- ULONG nTemp = pPrev2->GetMark()->nNode.GetIndex();
+ sal_uLong nTemp = pPrev2->GetMark()->nNode.GetIndex();
if ( nTemp < nIndex )
{
nIndex = nTemp;
@@ -612,7 +612,7 @@ void SwEditShell::ReplaceDropTxt( const String &rStr )
SwPaM aPam( rNd, rStr.Len(), rNd, 0 );
if( !GetDoc()->Overwrite( aPam, rStr ) )
{
- ASSERT( FALSE, "Doc->Overwrite(Str) failed." );
+ ASSERT( sal_False, "Doc->Overwrite(Str) failed." );
}
EndAllAction();
@@ -646,7 +646,7 @@ String SwEditShell::Calculate()
rCC.toLower( aStr );
sal_Unicode ch;
- BOOL bValidFlds = FALSE;
+ sal_Bool bValidFlds = sal_False;
xub_StrLen nPos = 0;
while( nPos < aStr.Len() )
@@ -674,7 +674,7 @@ String SwEditShell::Calculate()
GetDoc()->FldsToCalc( aCalc,
pStart->nNode.GetIndex(),
pStart->nContent.GetIndex() );
- bValidFlds = TRUE;
+ bValidFlds = sal_True;
}
(( aFormel += '(' ) +=
aCalc.GetStrResult( aCalc.VarLook( sVar )
@@ -724,9 +724,9 @@ Graphic SwEditShell::GetIMapGraphic() const
GRAPHIC_DEFAULT == rGrf.GetType() ) )
{
#ifdef DBG_UTIL
- ASSERT( ((SwGrfNode*)pNd)->SwapIn( TRUE ) || !TRUE, "Grafik konnte nicht geladen werden" );
+ ASSERT( ((SwGrfNode*)pNd)->SwapIn( sal_True ) || !sal_True, "Grafik konnte nicht geladen werden" );
#else
- ((SwGrfNode*)pNd)->SwapIn( TRUE );
+ ((SwGrfNode*)pNd)->SwapIn( sal_True );
#endif
}
aRet = rGrf;
@@ -746,14 +746,14 @@ Graphic SwEditShell::GetIMapGraphic() const
}
-BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL bKeepSelection )
+sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, sal_Bool bKeepSelection )
{
// URL und Hinweistext (direkt oder via Selektion) notwendig
if( !rFmt.GetValue().Len() || ( !rStr.Len() && !HasSelection() ) )
- return FALSE;
+ return sal_False;
StartAllAction();
GetDoc()->StartUndo( UNDO_UI_INSERT_URLTXT, NULL);
- BOOL bInsTxt = TRUE;
+ sal_Bool bInsTxt = sal_True;
if( rStr.Len() )
{
@@ -761,33 +761,33 @@ BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL
if( pCrsr->HasMark() && *pCrsr->GetPoint() != *pCrsr->GetMark() )
{
// Selection vorhanden, MehrfachSelektion?
- BOOL bDelTxt = TRUE;
+ sal_Bool bDelTxt = sal_True;
if( pCrsr->GetNext() == pCrsr )
{
// einfach Selection -> Text ueberpruefen
String sTxt( GetSelTxt() );
sTxt.EraseTrailingChars();
if( sTxt == rStr )
- bDelTxt = bInsTxt = FALSE;
+ bDelTxt = bInsTxt = sal_False;
}
else if( rFmt.GetValue() == rStr ) // Name und URL gleich?
- bDelTxt = bInsTxt = FALSE;
+ bDelTxt = bInsTxt = sal_False;
if( bDelTxt )
Delete();
}
else if( pCrsr->GetNext() != pCrsr && rFmt.GetValue() == rStr )
- bInsTxt = FALSE;
+ bInsTxt = sal_False;
if( bInsTxt )
{
Insert2( rStr );
SetMark();
- ExtendSelection( FALSE, rStr.Len() );
+ ExtendSelection( sal_False, rStr.Len() );
}
}
else
- bInsTxt = FALSE;
+ bInsTxt = sal_False;
SetAttr( rFmt );
if (bInsTxt && !IsCrsrPtAtEnd())
@@ -798,18 +798,18 @@ BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL
DontExpandFmt();
GetDoc()->EndUndo( UNDO_UI_INSERT_URLTXT, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-USHORT SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
+sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
{
if( rArr.Count() )
rArr.DeleteAndDestroy( 0, rArr.Count() );
const SwTxtNode* pTxtNd;
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
- for( USHORT n = pFmts->Count(); 1 < n; )
+ for( sal_uInt16 n = pFmts->Count(); 1 < n; )
{
SwClientIter aIter( *(*pFmts)[ --n ] );
@@ -838,9 +838,9 @@ USHORT SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
// ist der Cursor in eine INetAttribut, dann wird das komplett
// geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
-BOOL SwEditShell::DelINetAttrWithText()
+sal_Bool SwEditShell::DelINetAttrWithText()
{
- BOOL bRet = SelectTxtAttr( RES_TXTATR_INETFMT, FALSE );
+ sal_Bool bRet = SelectTxtAttr( RES_TXTATR_INETFMT, sal_False );
if( bRet )
DeleteSel( *GetCrsr() );
return bRet;
@@ -848,12 +848,12 @@ BOOL SwEditShell::DelINetAttrWithText()
// setzen an den Textzeichenattributen das DontExpand-Flag
-BOOL SwEditShell::DontExpandFmt()
+sal_Bool SwEditShell::DontExpandFmt()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() && GetDoc()->DontExpandFmt( *GetCrsr()->GetPoint() ))
{
- bRet = TRUE;
+ bRet = sal_True;
CallChgLnk();
}
return bRet;
@@ -864,17 +864,17 @@ SvNumberFormatter* SwEditShell::GetNumberFormatter()
return GetDoc()->GetNumberFormatter();
}
-BOOL SwEditShell::RemoveInvisibleContent()
+sal_Bool SwEditShell::RemoveInvisibleContent()
{
StartAllAction();
- BOOL bRet = GetDoc()->RemoveInvisibleContent();
+ sal_Bool bRet = GetDoc()->RemoveInvisibleContent();
EndAllAction();
return bRet;
}
-BOOL SwEditShell::ConvertFieldsToText()
+sal_Bool SwEditShell::ConvertFieldsToText()
{
StartAllAction();
- BOOL bRet = GetDoc()->ConvertFieldsToText();
+ sal_Bool bRet = GetDoc()->ConvertFieldsToText();
EndAllAction();
return bRet;
}
@@ -891,8 +891,8 @@ void SwEditShell::SetNumberingRestart()
else
MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); //extra content
SwPosition* pSttPos = pCrsr->Start(), *pEndPos = pCrsr->End();
- ULONG nCurrNd = pSttPos->nNode.GetIndex();
- ULONG nEndNd = pEndPos->nNode.GetIndex();
+ sal_uLong nCurrNd = pSttPos->nNode.GetIndex();
+ sal_uLong nEndNd = pEndPos->nNode.GetIndex();
if( nCurrNd <= nEndNd )
{
SwCntntFrm* pCntFrm;
@@ -922,7 +922,7 @@ void SwEditShell::SetNumberingRestart()
pTxtNd->IsCountedInList() &&
!pTxtNd->IsListRestart() &&
pTxtNd->GetNum()->GetNumber() ==
- pNumRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) ).GetStart() )
+ pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) ).GetStart() )
{
//now set a the start value as attribute
SwPosition aCurrentNode(*pNd);
@@ -949,20 +949,20 @@ void SwEditShell::SetNumberingRestart()
}
- Pop(FALSE);
+ Pop(sal_False);
EndAllAction();
}
-USHORT SwEditShell::GetLineCount( BOOL bActPos )
+sal_uInt16 SwEditShell::GetLineCount( sal_Bool bActPos )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
CalcLayout();
SwPaM* pPam = GetCrsr();
SwNodeIndex& rPtIdx = pPam->GetPoint()->nNode;
SwNodeIndex aStart( rPtIdx );
SwCntntNode* pCNd;
SwCntntFrm *pCntFrm = 0;
- ULONG nTmpPos;
+ sal_uLong nTmpPos;
if( !bActPos )
aStart = 0;
@@ -981,7 +981,7 @@ USHORT SwEditShell::GetLineCount( BOOL bActPos )
pTmp = pCNd->FindFootnoteStartNode();
else
{ // Footer/Header
- const USHORT nTyp = FRM_HEADER | FRM_FOOTER;
+ const sal_uInt16 nTyp = FRM_HEADER | FRM_FOOTER;
SwFrm* pFrm = pCntFrm;
while( pFrm && !(pFrm->GetType() & nTyp) )
pFrm = pFrm->GetUpper();
@@ -998,7 +998,7 @@ USHORT SwEditShell::GetLineCount( BOOL bActPos )
}
while( 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection(
- &aStart, TRUE, FALSE )) && ( !bActPos || aStart <= rPtIdx ) )
+ &aStart, sal_True, sal_False )) && ( !bActPos || aStart <= rPtIdx ) )
{
if( 0 != ( pCntFrm = pCNd->GetFrm() ) && pCntFrm->IsTxtFrm() )
{
@@ -1068,12 +1068,12 @@ void SwEditShell::SetLineNumberInfo(const SwLineNumberInfo& rInfo)
EndAllAction();
}
-USHORT SwEditShell::GetLinkUpdMode(BOOL bDocSettings) const
+sal_uInt16 SwEditShell::GetLinkUpdMode(sal_Bool bDocSettings) const
{
return getIDocumentSettingAccess()->getLinkUpdateMode( !bDocSettings );
}
-void SwEditShell::SetLinkUpdMode( USHORT nMode )
+void SwEditShell::SetLinkUpdMode( sal_uInt16 nMode )
{
getIDocumentSettingAccess()->setLinkUpdateMode( nMode );
}
@@ -1089,7 +1089,7 @@ SwExtTextInput* SwEditShell::CreateExtTextInput(LanguageType eInputLanguage)
return pRet;
}
-String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, BOOL bInsText )
+String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, sal_Bool bInsText )
{
if( !pDel )
{
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index c9ab4a591383..8f0ca257b77a 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -125,8 +125,8 @@ public:
// the content positions of each portion need to be saved
struct SpellContentPosition
{
- USHORT nLeft;
- USHORT nRight;
+ sal_uInt16 nLeft;
+ sal_uInt16 nRight;
};
typedef std::vector<SpellContentPosition> SpellContentPositions;
class SwSpellIter : public SwLinguIter
@@ -717,7 +717,7 @@ bool SwEditShell::HasLastSentenceGotGrammarChecked() const
* SwEditShell::HasConvIter
*************************************************************************/
-BOOL SwEditShell::HasConvIter() const
+sal_Bool SwEditShell::HasConvIter() const
{
return 0 != pConvIter;
}
@@ -726,7 +726,7 @@ BOOL SwEditShell::HasConvIter() const
* SwEditShell::HasHyphIter
*************************************************************************/
-BOOL SwEditShell::HasHyphIter() const
+sal_Bool SwEditShell::HasHyphIter() const
{
return 0 != pHyphIter;
}
@@ -738,7 +738,7 @@ BOOL SwEditShell::HasHyphIter() const
void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd )
{
SwPaM *pCrsr = GetCrsr();
- MakeFindRange( static_cast<USHORT>(eStart), static_cast<USHORT>(eEnd), pCrsr );
+ MakeFindRange( static_cast<sal_uInt16>(eStart), static_cast<sal_uInt16>(eEnd), pCrsr );
if( *pCrsr->GetPoint() > *pCrsr->GetMark() )
pCrsr->Exchange();
}
@@ -1053,7 +1053,7 @@ uno::Reference< XSpellAlternatives >
Sequence< PropertyValue > aPropVals(1);
PropertyValue &rVal = aPropVals.getArray()[0];
rVal.Name = C2U( UPN_MAX_NUMBER_OF_SUGGESTIONS );
- rVal.Value <<= (INT16) 7;
+ rVal.Value <<= (sal_Int16) 7;
xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals );
}
@@ -1067,7 +1067,7 @@ uno::Reference< XSpellAlternatives >
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
// make sure the selection build later from the
// data below does not include footnotes and other
@@ -1098,16 +1098,16 @@ uno::Reference< XSpellAlternatives >
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
@@ -1207,7 +1207,7 @@ bool SwEditShell::GetGrammarCorrection(
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
#if OSL_DEBUG_LEVEL > 1
// pNode->GetGrammarCheck()->Invalidate( 0, STRING_LEN );
@@ -1242,16 +1242,16 @@ bool SwEditShell::GetGrammarCorrection(
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
@@ -1378,8 +1378,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
pCrsr->SetMark();
pCrsr->GetPoint()->nContent = aCurrentOldPosition->nLeft;
pCrsr->GetMark()->nContent = aCurrentOldPosition->nRight;
- USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
@@ -1427,8 +1427,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
while(aCurrentNewPortion != rNewPortions.end())
{
//set the language attribute
- USHORT nScriptType = GetScriptType();
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = GetScriptType();
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
@@ -1451,7 +1451,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// restore cursor to the end of the sentence
// (will work also if the sentence length has changed,
// since cursors get updated automatically!)
- Pop( FALSE );
+ Pop( sal_False );
// collapse cursor to the end of the modified sentence
*pCrsr->Start() = *pCrsr->End();
@@ -1482,7 +1482,7 @@ SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh)
const SwPosition* pStartPos = pCrsr->Start();
const SwTxtNode* pTxtNode = pCrsr->GetNode()->GetTxtNode();
- USHORT nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
+ sal_uInt16 nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
const xub_StrLen nStartIndex = pStartPos->nContent.GetIndex();
for ( ; nAct < pDoc->GetRedlineTbl().Count(); nAct++ )
{
@@ -1624,7 +1624,7 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
//the cursor has to be collapsed on the left to go to the start of the sentence - if sentence ends inside of the error
pCrsr->DeleteMark();
pCrsr->SetMark();
- BOOL bStartSent = 0 != pMySh->GoStartSentence();
+ sal_Bool bStartSent = 0 != pMySh->GoStartSentence();
SpellContentPositions aDeletedRedlines = lcl_CollectDeletedRedlines(pMySh);
if(bStartSent)
{
@@ -1763,8 +1763,8 @@ void SwSpellIter::ToSentenceStart()
-----------------------------------------------------------------------*/
LanguageType lcl_GetLanguage(SwEditShell& rSh)
{
- USHORT nScriptType = rSh.GetScriptType();
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = rSh.GetScriptType();
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
@@ -1881,9 +1881,9 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
{
const SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrForCharAt(
pCrsr->GetMark()->nContent.GetIndex() );
- const USHORT nWhich = pTxtAttr
+ const sal_uInt16 nWhich = pTxtAttr
? pTxtAttr->Which()
- : static_cast<USHORT>(RES_TXTATR_END);
+ : static_cast<sal_uInt16>(RES_TXTATR_END);
switch (nWhich)
{
case RES_TXTATR_FIELD:
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index ea1088f36f69..c680173d2d72 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -56,7 +56,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
if( aRg.nEnd < aRg.nStart )
{ aRg.nStart = aRg.nEnd; aRg.nEnd = rIdx1.GetIndex(); }
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const SwPamRange* pTmp;
if( Count() && Seek_Entry( aRg, &nPos )) // suche Insert Position
{
@@ -70,9 +70,9 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
return; // ende, weil schon alle zusammengefasst waren
}
- BOOL bEnde;
+ sal_Bool bEnde;
do {
- bEnde = TRUE;
+ bEnde = sal_True;
// mit dem Vorgaenger zusammenfassen ??
if( nPos > 0 )
@@ -81,7 +81,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
|| pTmp->nEnd+1 == aRg.nStart )
{
aRg.nStart = pTmp->nStart;
- bEnde = FALSE;
+ bEnde = sal_False;
Remove( --nPos, 1 ); // zusammenfassen
}
// SSelection im Bereich ??
@@ -95,7 +95,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
pTmp->nStart == aRg.nEnd+1 )
{
aRg.nEnd = pTmp->nEnd;
- bEnde = FALSE;
+ bEnde = sal_False;
Remove( nPos, 1 ); // zusammenfassen
}
@@ -110,7 +110,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
-SwPaM& SwPamRanges::SetPam( USHORT nArrPos, SwPaM& rPam )
+SwPaM& SwPamRanges::SetPam( sal_uInt16 nArrPos, SwPaM& rPam )
{
ASSERT_ID( nArrPos < Count(), ERR_VAR_IDX );
const SwPamRange& rTmp = *(GetData() + nArrPos );
@@ -145,9 +145,9 @@ const SwNumRule* SwEditShell::GetOutlineNumRule() const
// Absaetze ohne Numerierung, aber mit Einzuegen
-BOOL SwEditShell::NoNum()
+sal_Bool SwEditShell::NoNum()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
StartAllAction();
SwPaM* pCrsr = GetCrsr();
@@ -156,7 +156,7 @@ BOOL SwEditShell::NoNum()
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam ));
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -169,9 +169,9 @@ BOOL SwEditShell::NoNum()
// Loeschen, Splitten der Aufzaehlungsliste
// -> #i29560#
-BOOL SwEditShell::HasNumber() const
+sal_Bool SwEditShell::HasNumber() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode * pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -186,7 +186,7 @@ BOOL SwEditShell::HasNumber() const
pTxtNd->GetNumRule() == GetDoc()->GetOutlineNumRule() &&
!pTxtNd->IsCountedInList() )
{
- bResult = FALSE;
+ bResult = sal_False;
}
// <--
}
@@ -194,9 +194,9 @@ BOOL SwEditShell::HasNumber() const
return bResult;
}
-BOOL SwEditShell::HasBullet() const
+sal_Bool SwEditShell::HasBullet() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode * pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -220,7 +220,7 @@ void SwEditShell::DelNumRules()
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) );
}
@@ -235,7 +235,7 @@ void SwEditShell::DelNumRules()
// --> OD 2005-10-24 #126346# - cursor can not be anymore in
// front of a label, because numbering/bullet is deleted.
- SetInFrontOfLabel( FALSE );
+ SetInFrontOfLabel( sal_False );
// <--
GetDoc()->SetModified();
@@ -245,11 +245,11 @@ void SwEditShell::DelNumRules()
// Hoch-/Runterstufen
-BOOL SwEditShell::NumUpDown( BOOL bDown )
+sal_Bool SwEditShell::NumUpDown( sal_Bool bDown )
{
StartAllAction();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr ) // keine Mehrfachselektion ?
bRet = GetDoc()->NumUpDown( *pCrsr, bDown );
@@ -258,7 +258,7 @@ BOOL SwEditShell::NumUpDown( BOOL bDown )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown );
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -275,9 +275,9 @@ BOOL SwEditShell::NumUpDown( BOOL bDown )
return bRet;
}
// -> #i23726#
-BOOL SwEditShell::IsFirstOfNumRule() const
+sal_Bool SwEditShell::IsFirstOfNumRule() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPaM * pCrsr = GetCrsr();
if (pCrsr->GetNext() == pCrsr)
@@ -288,9 +288,9 @@ BOOL SwEditShell::IsFirstOfNumRule() const
return bResult;
}
-BOOL SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const
+sal_Bool SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPosition aPos(*rPaM.GetPoint());
bResult = GetDoc()->IsFirstOfNumRule(aPos);
@@ -346,7 +346,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
// nLevel = nReferenceLevel;
SwNumRule aRule(*pCurNumRule);
-// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, FALSE);
+// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, sal_False);
if ( IsFirstOfNumRule() )
{
aRule.SetIndentOfFirstListLevelAndChangeOthers( nIndent );
@@ -354,7 +354,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
else if ( pTxtNode->GetActualListLevel() >= 0 )
{
aRule.SetIndent( nIndent,
- static_cast<USHORT>(pTxtNode->GetActualListLevel()) );
+ static_cast<sal_uInt16>(pTxtNode->GetActualListLevel()) );
}
// <--
@@ -370,7 +370,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
}
// <- #i23725#
-BOOL SwEditShell::MoveParagraph( long nOffset )
+sal_Bool SwEditShell::MoveParagraph( long nOffset )
{
StartAllAction();
@@ -382,7 +382,7 @@ BOOL SwEditShell::MoveParagraph( long nOffset )
pCrsr->DeleteMark();
}
- BOOL bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset );
+ sal_Bool bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset );
GetDoc()->SetModified();
EndAllAction();
@@ -409,11 +409,11 @@ void SwEditShell::GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower
aCrsr.SetMark();
if( pCrsr->HasMark() )
*aCrsr.GetPoint() = *pCrsr->End();
- GetDoc()->GotoNextNum( *aCrsr.GetPoint(), FALSE,
+ GetDoc()->GotoNextNum( *aCrsr.GetPoint(), sal_False,
&rUpper, &rLower );
}
-BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
+sal_Bool SwEditShell::MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft )
{
StartAllAction();
@@ -425,9 +425,9 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
if( pCrsr->HasMark() )
*aCrsr.GetPoint() = *pCrsr->End();
- BOOL bRet = FALSE;
- BYTE nUpperLevel, nLowerLevel;
- if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), FALSE,
+ sal_Bool bRet = sal_False;
+ sal_uInt8 nUpperLevel, nLowerLevel;
+ if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), sal_False,
&nUpperLevel, &nLowerLevel ))
{
if( bUpperLower )
@@ -439,12 +439,12 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
if( bUpperLeft ) // verschiebe nach oben
{
SwPosition aPos( *aCrsr.GetMark() );
- if( GetDoc()->GotoPrevNum( aPos, FALSE ) )
+ if( GetDoc()->GotoPrevNum( aPos, sal_False ) )
nOffset = aPos.nNode.GetIndex() -
aCrsr.GetMark()->nNode.GetIndex();
else
{
- ULONG nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
+ sal_uLong nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
while( nIdx && (
( pNd = GetDoc()->GetNodes()[ nIdx ])->IsSectionNode() ||
( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode())))
@@ -455,11 +455,11 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
}
else // verschiebe nach unten
{
- const SwNumRule* pOrig = aCrsr.GetNode(FALSE)->GetTxtNode()->GetNumRule();
+ const SwNumRule* pOrig = aCrsr.GetNode(sal_False)->GetTxtNode()->GetNumRule();
if( aCrsr.GetNode()->IsTxtNode() &&
pOrig == aCrsr.GetNode()->GetTxtNode()->GetNumRule() )
{
- ULONG nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
+ sal_uLong nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
while (nIdx < GetDoc()->GetNodes().Count()-1)
{
@@ -507,11 +507,11 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
return bRet;
}
-BOOL SwEditShell::OutlineUpDown( short nOffset )
+sal_Bool SwEditShell::OutlineUpDown( short nOffset )
{
StartAllAction();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr ) // keine Mehrfachselektion ?
bRet = GetDoc()->OutlineUpDown( *pCrsr, nOffset );
@@ -520,7 +520,7 @@ BOOL SwEditShell::OutlineUpDown( short nOffset )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->OutlineUpDown(
aRangeArr.SetPam( n, aPam ), nOffset );
GetDoc()->EndUndo( UNDO_END, NULL );
@@ -531,25 +531,25 @@ BOOL SwEditShell::OutlineUpDown( short nOffset )
}
-BOOL SwEditShell::MoveOutlinePara( short nOffset )
+sal_Bool SwEditShell::MoveOutlinePara( short nOffset )
{
StartAllAction();
- BOOL bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset );
+ sal_Bool bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset );
EndAllAction();
return bRet;
}
// Outlines and SubOutline are ReadOnly?
-BOOL SwEditShell::IsProtectedOutlinePara() const
+sal_Bool SwEditShell::IsProtectedOutlinePara() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwNode& rNd = GetCrsr()->Start()->nNode.GetNode();
if( rNd.IsTxtNode() )
{
const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds();
SwNodePtr pNd = (SwNodePtr)&rNd;
- BOOL bFirst = TRUE;
- USHORT nPos;
+ sal_Bool bFirst = sal_True;
+ sal_uInt16 nPos;
int nLvl(0);
if( !rOutlNd.Seek_Entry( pNd, &nPos ) && nPos )
--nPos;
@@ -559,7 +559,7 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
SwNodePtr pTmpNd = rOutlNd[ nPos ];
// --> OD 2008-04-02 #refactorlists#
-// BYTE nTmpLvl = GetRealLevel( pTmpNd->GetTxtNode()->
+// sal_uInt8 nTmpLvl = GetRealLevel( pTmpNd->GetTxtNode()->
// GetTxtColl()->GetOutlineLevel() );
// int nTmpLvl = pTmpNd->GetTxtNode()->GetOutlineLevel();//#outline level,zhaojianwei
int nTmpLvl = pTmpNd->GetTxtNode()->GetAttrOutlineLevel();
@@ -570,14 +570,14 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
if( bFirst )
{
nLvl = nTmpLvl;
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( nLvl >= nTmpLvl )
break;
if( pTmpNd->IsProtect() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -598,7 +598,7 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
* 2) outline must not be within table
* 3) if bCopy is set, outline must not be write protected
*/
-BOOL lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, USHORT nIdx, bool bCopy )
+sal_Bool lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, sal_uInt16 nIdx, bool bCopy )
{
const SwNodes& rNds = pDoc->GetNodes();
const SwNode* pNd = rNds.GetOutLineNds()[ nIdx ];
@@ -607,20 +607,20 @@ BOOL lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, USHORT nIdx, bool bCopy )
( bCopy || !pNd->IsProtect() ); // 3) write
}
-BOOL SwEditShell::IsOutlineMovable( USHORT nIdx ) const
+sal_Bool SwEditShell::IsOutlineMovable( sal_uInt16 nIdx ) const
{
return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, false );
}
-BOOL SwEditShell::IsOutlineCopyable( USHORT nIdx ) const
+sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
{
return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, true );
}
-BOOL SwEditShell::NumOrNoNum( BOOL bNumOn, BOOL bChkStart ) // #115901#
+sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart ) // #115901#
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
( !bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()) )
@@ -633,10 +633,10 @@ BOOL SwEditShell::NumOrNoNum( BOOL bNumOn, BOOL bChkStart ) // #115901#
return bRet;
}
-BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const
+sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
{
// ein Backspace im Absatz ohne Nummer wird zum Delete
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPaM* pCrsr = GetCrsr();
if (pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
@@ -654,11 +654,11 @@ BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const
}
// --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
-BYTE SwEditShell::GetNumLevel() const
+sal_uInt8 SwEditShell::GetNumLevel() const
{
// gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
- //BYTE nLevel = NO_NUMBERING; //#outline level,zhaojianwei
- BYTE nLevel = MAXLEVEL; //end,zhaojianwei
+ //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
+ sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
SwPaM* pCrsr = GetCrsr();
const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
@@ -676,7 +676,7 @@ BYTE SwEditShell::GetNumLevel() const
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
{
- nLevel = static_cast<BYTE>( nListLevelOfTxtNode );
+ nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
}
// <--
}
@@ -704,7 +704,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
aRangeArr.SetPam( n, aPam );
// --> OD 2008-02-08 #newlistlevelattrs#
@@ -734,7 +734,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
EndAllAction();
}
-String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
+String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, sal_Bool bAutoNum ) const
{
return GetDoc()->GetUniqueNumRuleName( pChkStr, bAutoNum );
}
@@ -746,15 +746,15 @@ void SwEditShell::ChgNumRuleFmts( const SwNumRule& rRule )
EndAllAction();
}
-BOOL SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNewRule )
+sal_Bool SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNewRule )
{
StartAllAction();
- BOOL bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule );
+ sal_Bool bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule );
EndAllAction();
return bRet;
}
-void SwEditShell::SetNumRuleStart( BOOL bFlag )
+void SwEditShell::SetNumRuleStart( sal_Bool bFlag )
{
StartAllAction();
@@ -764,7 +764,7 @@ void SwEditShell::SetNumRuleStart( BOOL bFlag )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag );
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -774,16 +774,16 @@ void SwEditShell::SetNumRuleStart( BOOL bFlag )
EndAllAction();
}
-BOOL SwEditShell::IsNumRuleStart() const
+sal_Bool SwEditShell::IsNumRuleStart() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
if( pTxtNd )
- bResult = pTxtNd->IsListRestart() ? TRUE : FALSE;
+ bResult = pTxtNd->IsListRestart() ? sal_True : sal_False;
return bResult;
}
-void SwEditShell::SetNodeNumStart( USHORT nStt )
+void SwEditShell::SetNodeNumStart( sal_uInt16 nStt )
{
StartAllAction();
@@ -793,7 +793,7 @@ void SwEditShell::SetNodeNumStart( USHORT nStt )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt );
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -803,7 +803,7 @@ void SwEditShell::SetNodeNumStart( USHORT nStt )
EndAllAction();
}
-USHORT SwEditShell::GetNodeNumStart() const
+sal_uInt16 SwEditShell::GetNodeNumStart() const
{
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
// --> OD 2008-02-28 #refactorlists#
@@ -812,7 +812,7 @@ USHORT SwEditShell::GetNodeNumStart() const
// return USHRT_MAX, if no list restart value is found.
if ( pTxtNd && pTxtNd->HasAttrListRestartValue() )
{
- return static_cast<USHORT>(pTxtNd->GetAttrListRestartValue());
+ return static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
}
return USHRT_MAX;
// <--
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index b78dfb761ebe..0dd6b9b3ec79 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -39,12 +39,12 @@
#include "frmtool.hxx"
-USHORT SwEditShell::GetRedlineMode() const
+sal_uInt16 SwEditShell::GetRedlineMode() const
{
return GetDoc()->GetRedlineMode();
}
-void SwEditShell::SetRedlineMode( USHORT eMode )
+void SwEditShell::SetRedlineMode( sal_uInt16 eMode )
{
if( eMode != GetDoc()->GetRedlineMode() )
{
@@ -55,17 +55,17 @@ void SwEditShell::SetRedlineMode( USHORT eMode )
}
}
-BOOL SwEditShell::IsRedlineOn() const
+sal_Bool SwEditShell::IsRedlineOn() const
{
return GetDoc()->IsRedlineOn();
}
-USHORT SwEditShell::GetRedlineCount() const
+sal_uInt16 SwEditShell::GetRedlineCount() const
{
return GetDoc()->GetRedlineTbl().Count();
}
-const SwRedline& SwEditShell::GetRedline( USHORT nPos ) const
+const SwRedline& SwEditShell::GetRedline( sal_uInt16 nPos ) const
{
return *GetDoc()->GetRedlineTbl()[ nPos ];
}
@@ -82,22 +82,22 @@ void lcl_InvalidateAll( ViewShell* pSh )
} while ( pSh != pStop );
}
-BOOL SwEditShell::AcceptRedline( USHORT nPos )
+sal_Bool SwEditShell::AcceptRedline( sal_uInt16 nPos )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bRet = GetDoc()->AcceptRedline( nPos, true );
+ sal_Bool bRet = GetDoc()->AcceptRedline( nPos, true );
if( !nPos && !::IsExtraData( GetDoc() ) )
lcl_InvalidateAll( this );
EndAllAction();
return bRet;
}
-BOOL SwEditShell::RejectRedline( USHORT nPos )
+sal_Bool SwEditShell::RejectRedline( sal_uInt16 nPos )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bRet = GetDoc()->RejectRedline( nPos, true );
+ sal_Bool bRet = GetDoc()->RejectRedline( nPos, true );
if( !nPos && !::IsExtraData( GetDoc() ) )
lcl_InvalidateAll( this );
EndAllAction();
@@ -105,9 +105,9 @@ BOOL SwEditShell::RejectRedline( USHORT nPos )
}
// Kommentar am Redline setzen
-BOOL SwEditShell::SetRedlineComment( const String& rS )
+sal_Bool SwEditShell::SetRedlineComment( const String& rS )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
FOREACHPAM_START(this)
bRet = bRet || GetDoc()->SetRedlineComment( *PCURCRSR, rS );
FOREACHPAM_END()
@@ -136,11 +136,11 @@ void SwEditShell::UpdateRedlineAttr()
// suche das Redline zu diesem Data und returne die Pos im Array
// USHRT_MAX wird returnt, falls nicht vorhanden
-USHORT SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
+sal_uInt16 SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
{
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
- for( USHORT i = 0, nCnt = rTbl.Count(); i < nCnt; ++i )
+ for( sal_uInt16 i = 0, nCnt = rTbl.Count(); i < nCnt; ++i )
if( &rTbl[ i ]->GetRedlineData() == &rData )
return i;
return USHRT_MAX;
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index a936002df9a2..f66d828c25ba 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -67,17 +67,17 @@ SwEditShell::InsertSection(
}
-BOOL SwEditShell::IsInsRegionAvailable() const
+sal_Bool SwEditShell::IsInsRegionAvailable() const
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr )
- return FALSE;
+ return sal_False;
if( pCrsr->HasMark() )
return 0 != GetDoc()->IsInsRegionAvailable( *pCrsr );
- return TRUE;
+ return sal_True;
}
@@ -95,7 +95,7 @@ const SwSection* SwEditShell::GetCurrSection() const
* Bereich innerhalb der Fussnote sein.
* --------------------------------------------------*/
-const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt ) const
+const SwSection* SwEditShell::GetAnySection( sal_Bool bOutOfTab, const Point* pPt ) const
{
SwFrm *pFrm;
if ( pPt )
@@ -107,7 +107,7 @@ const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt )
pFrm = pNd->GetFrm( pPt );
}
else
- pFrm = GetCurrFrm( FALSE );
+ pFrm = GetCurrFrm( sal_False );
if( bOutOfTab && pFrm )
pFrm = pFrm->FindTabFrm();
@@ -125,17 +125,17 @@ const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt )
return NULL;
}
-USHORT SwEditShell::GetSectionFmtCount() const
+sal_uInt16 SwEditShell::GetSectionFmtCount() const
{
return GetDoc()->GetSections().Count();
}
-BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bChkTOX ) const
+sal_Bool SwEditShell::IsAnySectionInDoc( sal_Bool bChkReadOnly, sal_Bool bChkHidden, sal_Bool bChkTOX ) const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- USHORT nCnt = rFmts.Count();
- USHORT n;
+ sal_uInt16 nCnt = rFmts.Count();
+ sal_uInt16 n;
for( n = 0; n < nCnt; ++n )
{
@@ -156,19 +156,19 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC
return n != nCnt;
}
-USHORT SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
+sal_uInt16 SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
{
SwSectionFmt* pFmt = (SwSectionFmt*)&rFmt;
return GetDoc()->GetSections().GetPos( pFmt );
}
-const SwSectionFmt& SwEditShell::GetSectionFmt( USHORT nFmt ) const
+const SwSectionFmt& SwEditShell::GetSectionFmt( sal_uInt16 nFmt ) const
{
return *GetDoc()->GetSections()[ nFmt ];
}
-void SwEditShell::DelSectionFmt( USHORT nFmt )
+void SwEditShell::DelSectionFmt( sal_uInt16 nFmt )
{
StartAllAction();
GetDoc()->DelSectionFmt( GetDoc()->GetSections()[ nFmt ] );
@@ -251,7 +251,7 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
const SfxItemSet& rSet )
{
StartAllAction();
- if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, FALSE))
+ if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, sal_False))
{
SfxItemSet aSet(rSet);
aSet.ClearItem(RES_CNTNT);
@@ -268,9 +268,9 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
// search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count
-USHORT SwEditShell::GetFullSelectedSectionCount() const
+sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
FOREACHPAM_START(this)
const SwPosition* pStt = PCURCRSR->Start(),
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 76a37e4e8627..3fb7da8e1198 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -67,14 +67,14 @@ using namespace ::com::sun::star::uno;
extern void ClearFEShellTabCols();
const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj,
const SwTableAutoFmt* pTAFmt )
{
StartAllAction();
SwPosition* pPos = GetCrsr()->GetPoint();
- BOOL bEndUndo = 0 != pPos->nContent.GetIndex();
+ sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
@@ -87,7 +87,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
const SwTable *pTable = GetDoc()->InsertTable( rInsTblOpts, *pPos,
nRows, nCols,
eAdj, pTAFmt,
- 0, TRUE );
+ 0, sal_True );
if( bEndUndo )
EndUndo( UNDO_END );
@@ -95,13 +95,13 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
return *pTable;
}
-BOOL SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
+sal_Bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
sal_Unicode cCh,
sal_Int16 eAdj,
const SwTableAutoFmt* pTAFmt )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- BOOL bRet = FALSE;
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
+ sal_Bool bRet = sal_False;
StartAllAction();
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() )
@@ -112,10 +112,10 @@ BOOL SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
return bRet;
}
-BOOL SwEditShell::TableToText( sal_Unicode cCh )
+sal_Bool SwEditShell::TableToText( sal_Unicode cCh )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- BOOL bRet = FALSE;
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
+ sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
const SwTableNode* pTblNd =
GetDoc()->IsIdxInTbl( pCrsr->GetPoint()->nNode );
@@ -156,23 +156,23 @@ BOOL SwEditShell::TableToText( sal_Unicode cCh )
return bRet;
}
-BOOL SwEditShell::IsTextToTableAvailable() const
+sal_Bool SwEditShell::IsTextToTableAvailable() const
{
- BOOL bOnlyText = FALSE;
+ sal_Bool bOnlyText = sal_False;
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() && *PCURCRSR->GetPoint() != *PCURCRSR->GetMark() )
{
- bOnlyText = TRUE;
+ bOnlyText = sal_True;
// pruefe ob in der Selection eine Tabelle liegt
- ULONG nStt = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nStt = PCURCRSR->GetMark()->nNode.GetIndex(),
nEnd = PCURCRSR->GetPoint()->nNode.GetIndex();
- if( nStt > nEnd ) { ULONG n = nStt; nStt = nEnd; nEnd = n; }
+ if( nStt > nEnd ) { sal_uLong n = nStt; nStt = nEnd; nEnd = n; }
for( ; nStt <= nEnd; ++nStt )
if( !GetDoc()->GetNodes()[ nStt ]->IsTxtNode() )
{
- bOnlyText = FALSE;
+ bOnlyText = sal_False;
break;
}
@@ -186,14 +186,14 @@ BOOL SwEditShell::IsTextToTableAvailable() const
void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTblOpts,
SwDDEFieldType* pDDEType,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj )
{
SwPosition* pPos = GetCrsr()->GetPoint();
StartAllAction();
- BOOL bEndUndo = 0 != pPos->nContent.GetIndex();
+ sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
@@ -264,7 +264,7 @@ void SwEditShell::SetTblChgMode( TblChgMode eMode )
}
}
-BOOL SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
+sal_Bool SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
{
SwSelBoxes aBoxes;
if( IsTableMode() )
@@ -281,10 +281,10 @@ BOOL SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.Insert( pBox );
}
- } while( FALSE );
+ } while( sal_False );
}
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
{
const SwTableBox* pSelBox = aBoxes[ n ];
const SwTableBoxFmt* pTblFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
@@ -323,7 +323,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.Insert( pBox );
}
- } while( FALSE );
+ } while( sal_False );
}
// beim setzen einer Formel keine Ueberpruefung mehr vornehmen!
@@ -332,16 +332,16 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
StartAllAction();
GetDoc()->StartUndo( UNDO_START, NULL );
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
GetDoc()->SetTblBoxFormulaAttrs( *aBoxes[ n ], rSet );
GetDoc()->EndUndo( UNDO_END, NULL );
EndAllAction();
}
-BOOL SwEditShell::IsTableBoxTextFormat() const
+sal_Bool SwEditShell::IsTableBoxTextFormat() const
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
SwTableBox *pBox = 0;
{
@@ -354,25 +354,25 @@ BOOL SwEditShell::IsTableBoxTextFormat() const
}
if( !pBox )
- return FALSE;
+ return sal_False;
sal_uInt32 nFmt;
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState(
- RES_BOXATR_FORMAT, TRUE, &pItem ))
+ RES_BOXATR_FORMAT, sal_True, &pItem ))
{
nFmt = ((SwTblBoxNumFormat*)pItem)->GetValue();
return GetDoc()->GetNumberFormatter()->IsTextFormat( nFmt ) ||
NUMBERFORMAT_TEXT == nFmt;
}
- ULONG nNd = pBox->IsValidNumTxtNd();
+ sal_uLong nNd = pBox->IsValidNumTxtNd();
if( ULONG_MAX == nNd )
- return TRUE;
+ return sal_True;
const String& rTxt = GetDoc()->GetNodes()[ nNd ]->GetTxtNode()->GetTxt();
if( !rTxt.Len() )
- return FALSE;
+ return sal_False;
double fVal;
return !GetDoc()->GetNumberFormatter()->IsNumberFormat( rTxt, nFmt, fVal );
@@ -393,23 +393,23 @@ String SwEditShell::GetTableBoxText() const
pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
}
- ULONG nNd;
+ sal_uLong nNd;
if( pBox && ULONG_MAX != ( nNd = pBox->IsValidNumTxtNd() ) )
sRet = GetDoc()->GetNodes()[ nNd ]->GetTxtNode()->GetTxt();
}
return sRet;
}
-BOOL SwEditShell::SplitTable( USHORT eMode )
+sal_Bool SwEditShell::SplitTable( sal_uInt16 eMode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM *pCrsr = GetCrsr();
if( pCrsr->GetNode()->FindTableNode() )
{
StartAllAction();
GetDoc()->StartUndo(UNDO_EMPTY, NULL);
- bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, TRUE );
+ bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, sal_True );
GetDoc()->EndUndo(UNDO_EMPTY, NULL);
ClearFEShellTabCols();
@@ -418,9 +418,9 @@ BOOL SwEditShell::SplitTable( USHORT eMode )
return bRet;
}
-BOOL SwEditShell::MergeTable( BOOL bWithPrev, USHORT nMode )
+sal_Bool SwEditShell::MergeTable( sal_Bool bWithPrev, sal_uInt16 nMode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM *pCrsr = GetCrsr();
if( pCrsr->GetNode()->FindTableNode() )
{
@@ -436,14 +436,14 @@ BOOL SwEditShell::MergeTable( BOOL bWithPrev, USHORT nMode )
return bRet;
}
-BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
+sal_Bool SwEditShell::CanMergeTable( sal_Bool bWithPrev, sal_Bool* pChkNxtPrv ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwPaM *pCrsr = GetCrsr();
const SwTableNode* pTblNd = pCrsr->GetNode()->FindTableNode();
if( pTblNd && !pTblNd->GetTable().ISA( SwDDETable ))
{
- BOOL bNew = pTblNd->GetTable().IsNewModel();
+ sal_Bool bNew = pTblNd->GetTable().IsNewModel();
const SwNodes& rNds = GetDoc()->GetNodes();
if( pChkNxtPrv )
{
@@ -453,13 +453,13 @@ BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
// --> FME 2004-09-17 #117418# Consider table in table case
pChkNd->EndOfSectionIndex() == pTblNd->GetIndex() - 1 )
// <--
- *pChkNxtPrv = TRUE, bRet = TRUE; // mit Prev ist moeglich
+ *pChkNxtPrv = sal_True, bRet = sal_True; // mit Prev ist moeglich
else
{
pChkNd = rNds[ pTblNd->EndOfSectionIndex() + 1 ]->GetTableNode();
if( pChkNd && !pChkNd->GetTable().ISA( SwDDETable ) &&
bNew == pChkNd->GetTable().IsNewModel() )
- *pChkNxtPrv = FALSE, bRet = TRUE; // mit Next ist moeglich
+ *pChkNxtPrv = sal_False, bRet = sal_True; // mit Next ist moeglich
}
}
else
@@ -485,7 +485,7 @@ BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
}
// setze das InsertDB als Tabelle Undo auf:
-void SwEditShell::AppendUndoForInsertFromDB( BOOL bIsTable )
+void SwEditShell::AppendUndoForInsertFromDB( sal_Bool bIsTable )
{
GetDoc()->AppendUndoForInsertFromDB( *GetCrsr(), bIsTable );
}
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index b1188588fe4d..882b5b5b7bb0 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -73,7 +73,7 @@ using namespace ::com::sun::star::util;
void SwEditShell::Insert(const SwTOXMark& rMark)
{
- BOOL bInsAtPos = rMark.IsAlternativeText();
+ sal_Bool bInsAtPos = rMark.IsAlternativeText();
StartAllAction();
FOREACHPAM_START(this)
@@ -111,7 +111,7 @@ void SwEditShell::DeleteTOXMark( SwTOXMark* pMark )
Beschreibung: Alle Verzeichnismarkierungen am SPoint zusammensuchen
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
+sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
{
return GetDoc()->GetCurTOXMark( *GetCrsr()->Start(), rMarks );
}
@@ -119,7 +119,7 @@ USHORT SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
/* -----------------01.09.99 16:05-------------------
--------------------------------------------------*/
-BOOL SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
+sal_Bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
{
ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
@@ -128,7 +128,7 @@ BOOL SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
/* -----------------18.10.99 15:53-------------------
--------------------------------------------------*/
-void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
+void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly)
{
ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
@@ -143,7 +143,7 @@ void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
/* -----------------02.09.99 07:47-------------------
--------------------------------------------------*/
-const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
+const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
return GetDoc()->GetDefaultTOXBase( eTyp, bCreate );
}
@@ -170,7 +170,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// Einfuegen des Verzeichnisses
const SwTOXBaseSection* pTOX = pDoc->InsertTableOf(
- *GetCrsr()->GetPoint(), rTOX, pSet, TRUE );
+ *GetCrsr()->GetPoint(), rTOX, pSet, sal_True );
ASSERT(pTOX, "Kein aktuelles Verzeichnis");
// Formatierung anstossen
@@ -191,9 +191,9 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
Beschreibung: Verzeichnisinhalt erneuern
--------------------------------------------------------------------*/
-BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
+sal_Bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ASSERT( rTOX.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOX;
@@ -204,7 +204,7 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
SwDoc* pMyDoc = GetDoc();
SwDocShell* pDocSh = pMyDoc->GetDocShell();
- BOOL bInIndex = pTOX == GetCurTOX();
+ sal_Bool bInIndex = pTOX == GetCurTOX();
SET_CURR_SHELL( this );
StartAllAction();
@@ -244,7 +244,7 @@ const SwTOXBase* SwEditShell::GetCurTOX() const
return GetDoc()->GetCurTOX( *GetCrsr()->GetPoint() );
}
-BOOL SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
+sal_Bool SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
{
return GetDoc()->DeleteTOX( (SwTOXBase&)rTOXBase, bDelNodes );
}
@@ -253,7 +253,7 @@ BOOL SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
Beschreibung: Typen der Verzeichnisse verwalten
--------------------------------------------------------------------*/
-const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, USHORT nId) const
+const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
{
return pDoc->GetTOXType(eTyp, nId);
}
@@ -262,17 +262,17 @@ const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, USHORT nId) const
Beschreibung: Schluessel fuer Stichwortverzeichnisse verwalten
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
+sal_uInt16 SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
{
return GetDoc()->GetTOIKeys( eTyp, rArr );
}
-USHORT SwEditShell::GetTOXCount() const
+sal_uInt16 SwEditShell::GetTOXCount() const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- USHORT nRet = 0;
- for( USHORT n = rFmts.Count(); n; )
+ sal_uInt16 nRet = 0;
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
@@ -283,10 +283,10 @@ USHORT SwEditShell::GetTOXCount() const
}
-const SwTOXBase* SwEditShell::GetTOX( USHORT nPos ) const
+const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = 0, nCnt = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0, nCnt = 0; n < rFmts.Count(); ++n )
{
const SwSection* pSect = rFmts[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
@@ -302,13 +302,13 @@ const SwTOXBase* SwEditShell::GetTOX( USHORT nPos ) const
// nach einlesen einer Datei alle Verzeichnisse updaten
-void SwEditShell::SetUpdateTOX( BOOL bFlag )
+void SwEditShell::SetUpdateTOX( sal_Bool bFlag )
{
GetDoc()->SetUpdateTOX( bFlag );
}
-BOOL SwEditShell::IsUpdateTOX() const
+sal_Bool SwEditShell::IsUpdateTOX() const
{
return GetDoc()->IsUpdateTOX();
}
@@ -333,8 +333,8 @@ void SwEditShell::SetTOIAutoMarkURL(const String& rSet)
void SwEditShell::ApplyAutoMark()
{
StartAllAction();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo(sal_False);
//1. remove all automatic generated index entries if AutoMarkURL has a
// length and the file exists
//2. load file
@@ -356,7 +356,7 @@ void SwEditShell::ApplyAutoMark()
}
//2.
- SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ, TRUE );
+ SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ, sal_True );
SvStream& rStrm = *aMedium.GetInStream();
const String sZero('0');
Push();
@@ -367,16 +367,16 @@ void SwEditShell::ApplyAutoMark()
//
//SearchAlgorithms eSrchType = SearchAlgorithms_ABSOLUTE;
//OUString aSrchStr = rText;
- BOOL bCaseSensitive = TRUE;
- BOOL bWordOnly = FALSE;
- BOOL bSrchInSel = FALSE;
- BOOL bLEV_Relaxed = TRUE;
- INT32 nLEV_Other = 2; // -> changedChars;
- INT32 nLEV_Longer = 3; //! -> deletedChars;
- INT32 nLEV_Shorter = 1; //! -> insertedChars;
- INT32 nTransliterationFlags = 0;
+ sal_Bool bCaseSensitive = sal_True;
+ sal_Bool bWordOnly = sal_False;
+ sal_Bool bSrchInSel = sal_False;
+ sal_Bool bLEV_Relaxed = sal_True;
+ sal_Int32 nLEV_Other = 2; // -> changedChars;
+ sal_Int32 nLEV_Longer = 3; //! -> deletedChars;
+ sal_Int32 nLEV_Shorter = 1; //! -> insertedChars;
+ sal_Int32 nTransliterationFlags = 0;
//
- INT32 nSrchFlags = 0;
+ sal_Int32 nSrchFlags = 0;
if (!bCaseSensitive)
{
nSrchFlags |= SearchFlags::ALL_IGNORE_CASE;
@@ -445,13 +445,13 @@ void SwEditShell::ApplyAutoMark()
aSearchOpt.searchString = sToSelect;
KillPams();
- BOOL bCancel;
+ sal_Bool bCancel;
// todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
- ULONG nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
+ sal_Bool bSearchInNotes = sal_False;
+ sal_uLong nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
(FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY),
- FALSE );
+ sal_False );
if(nRet)
{
@@ -464,8 +464,8 @@ void SwEditShell::ApplyAutoMark()
}
if(sAlternative.Len())
pTmpMark->SetAlternativeText(sAlternative);
- pTmpMark->SetMainEntry(FALSE);
- pTmpMark->SetAutoGenerated(TRUE);
+ pTmpMark->SetMainEntry(sal_False);
+ pTmpMark->SetAutoGenerated(sal_True);
//4.
SwEditShell::Insert(*pTmpMark);
}
@@ -473,7 +473,7 @@ void SwEditShell::ApplyAutoMark()
}
}
KillPams();
- Pop(FALSE);
+ Pop(sal_False);
}
DoUndo(bDoesUndo);
EndAllAction();
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index a27b09f5d4ff..aa4d6c43f6a9 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -48,15 +48,15 @@ void lcl_SelectSdrMarkList( SwEditShell* pShell,
const SdrMarkList* pSdrMarkList );
-BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
+sal_Bool SwEditShell::Undo( SwUndoId nUndoId, sal_uInt16 nCnt )
{
SET_CURR_SHELL( this );
// #105332# current undo state was not saved
- BOOL bRet = FALSE;
- BOOL bSaveDoesUndo = GetDoc()->DoesUndo();
+ sal_Bool bRet = sal_False;
+ sal_Bool bSaveDoesUndo = GetDoc()->DoesUndo();
- GetDoc()->DoUndo( FALSE );
+ GetDoc()->DoUndo( sal_False );
StartAllAction();
{
// eigentlich muesste ja nur der aktuelle Cursor berarbeitet
@@ -70,7 +70,7 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
// JP 02.04.98: Cursor merken - beim Auto-Format/-Korrektur
// soll dieser wieder an die Position
SwUndoId nLastUndoId = GetDoc()->GetUndoIds(NULL, NULL);
- BOOL bRestoreCrsr = 1 == nCnt && ( UNDO_AUTOFORMAT == nLastUndoId ||
+ sal_Bool bRestoreCrsr = 1 == nCnt && ( UNDO_AUTOFORMAT == nLastUndoId ||
UNDO_AUTOCORRECT == nLastUndoId );
Push();
@@ -98,7 +98,7 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
CreateCrsr();
aUndoIter.pAktPam = GetCrsr();
}
- } while( TRUE );
+ } while( sal_True );
}
Pop( !bRestoreCrsr );
@@ -114,9 +114,9 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
{
Point aPt;
SwFlyFrm* pFly = ((SwFlyFrmFmt*)aUndoIter.pSelFmt)->GetFrm(
- &aPt, FALSE );
+ &aPt, sal_False );
if( pFly )
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
+ ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True );
}
}
else if( aUndoIter.pMarkList )
@@ -134,21 +134,21 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
}
EndAllAction();
- // #105332# undo state was not restored but set to FALSE everytime
+ // #105332# undo state was not restored but set to sal_False everytime
GetDoc()->DoUndo( bSaveDoesUndo );
return bRet;
}
-USHORT SwEditShell::Redo( USHORT nCnt )
+sal_uInt16 SwEditShell::Redo( sal_uInt16 nCnt )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// #105332# undo state was not saved
- BOOL bSaveDoesUndo = GetDoc()->DoesUndo();
+ sal_Bool bSaveDoesUndo = GetDoc()->DoesUndo();
- GetDoc()->DoUndo( FALSE );
+ GetDoc()->DoUndo( sal_False );
StartAllAction();
{
@@ -183,7 +183,7 @@ USHORT SwEditShell::Redo( USHORT nCnt )
CreateCrsr();
aUndoIter.pAktPam = GetCrsr();
}
- } while( TRUE );
+ } while( sal_True );
}
if( aUndoIter.IsUpdateAttr() )
@@ -200,9 +200,9 @@ USHORT SwEditShell::Redo( USHORT nCnt )
{
Point aPt;
SwFlyFrm* pFly = ((SwFlyFrmFmt*)aUndoIter.pSelFmt)->GetFrm(
- &aPt, FALSE );
+ &aPt, sal_False );
if( pFly )
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
+ ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True );
}
}
else if( aUndoIter.pMarkList )
@@ -221,17 +221,17 @@ USHORT SwEditShell::Redo( USHORT nCnt )
EndAllAction();
- // #105332# undo state was not restored but set FALSE everytime
+ // #105332# undo state was not restored but set sal_False everytime
GetDoc()->DoUndo( bSaveDoesUndo );
return bRet;
}
-USHORT SwEditShell::Repeat( USHORT nCount )
+sal_uInt16 SwEditShell::Repeat( sal_uInt16 nCount )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
StartAllAction();
SwUndoIter aUndoIter( GetCrsr(), UNDO_EMPTY );
@@ -243,13 +243,13 @@ USHORT SwEditShell::Repeat( USHORT nCount )
// abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
-USHORT SwEditShell::GetUndoActionCount()
+sal_uInt16 SwEditShell::GetUndoActionCount()
{
return SwDoc::GetUndoActionCount();
}
-void SwEditShell::SetUndoActionCount( USHORT nNew )
+void SwEditShell::SetUndoActionCount( sal_uInt16 nNew )
{
SwDoc::SetUndoActionCount( nNew );
}
@@ -266,7 +266,7 @@ void lcl_SelectSdrMarkList( SwEditShell* pShell,
if( pShell->ISA( SwFEShell ) )
{
SwFEShell* pFEShell = static_cast<SwFEShell*>( pShell );
- for( USHORT i = 0; i < pSdrMarkList->GetMarkCount(); ++i )
+ for( sal_uInt16 i = 0; i < pSdrMarkList->GetMarkCount(); ++i )
pFEShell->SelectObj( Point(),
(i==0) ? 0 : SW_ADD_SELECT,
pSdrMarkList->GetMark( i )->GetMarkedSdrObj() );