summaryrefslogtreecommitdiff
path: root/sw/source/core/fields
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
commit7f33ed417b2e29e5470724ea76967f64699a2662 (patch)
treeabfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw/source/core/fields
parent80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff)
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/core/fields')
-rw-r--r--sw/source/core/fields/authfld.cxx96
-rw-r--r--sw/source/core/fields/cellfml.cxx92
-rw-r--r--sw/source/core/fields/chpfld.cxx18
-rw-r--r--sw/source/core/fields/dbfld.cxx112
-rw-r--r--sw/source/core/fields/ddefld.cxx40
-rw-r--r--sw/source/core/fields/ddetbl.cxx18
-rw-r--r--sw/source/core/fields/docufld.cxx84
-rw-r--r--sw/source/core/fields/expfld.cxx138
-rw-r--r--sw/source/core/fields/fldbas.cxx88
-rw-r--r--sw/source/core/fields/flddat.cxx24
-rw-r--r--sw/source/core/fields/flddropdown.cxx8
-rw-r--r--sw/source/core/fields/fldlst.cxx28
-rw-r--r--sw/source/core/fields/macrofld.cxx24
-rw-r--r--sw/source/core/fields/reffld.cxx86
-rw-r--r--sw/source/core/fields/scrptfld.cxx10
-rw-r--r--sw/source/core/fields/tblcalc.cxx18
-rw-r--r--sw/source/core/fields/usrfld.cxx14
17 files changed, 449 insertions, 449 deletions
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 630f8dc18e34..8242d2325015 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -83,16 +83,16 @@ SV_IMPL_PTRARR( SortKeyArr, TOXSortKeyPtr )
SwAuthEntry::SwAuthEntry(const SwAuthEntry& rCopy)
: nRefCount(0)
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
aAuthFields[i] = rCopy.aAuthFields[i];
}
// --------------------------------------------------------
-BOOL SwAuthEntry::operator==(const SwAuthEntry& rComp)
+sal_Bool SwAuthEntry::operator==(const SwAuthEntry& rComp)
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
if(aAuthFields[i] != rComp.aAuthFields[i])
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// --------------------------------------------------------
@@ -107,8 +107,8 @@ SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
m_pSortKeyArr(new SortKeyArr(3, 3)),
m_cPrefix('['),
m_cSuffix(']'),
- m_bIsSequence(FALSE),
- m_bSortByDocument(TRUE),
+ m_bIsSequence(sal_False),
+ m_bSortByDocument(sal_True),
m_eLanguage((LanguageType)::GetAppLanguage())
{
}
@@ -125,7 +125,7 @@ SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
m_eLanguage(rFType.m_eLanguage),
m_sSortAlgorithm(rFType.m_sSortAlgorithm)
{
- for(USHORT i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
+ for(sal_uInt16 i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
m_pSortKeyArr->Insert((*rFType.m_pSortKeyArr)[i], i);
}
@@ -153,16 +153,16 @@ SwFieldType* SwAuthorityFieldType::Copy() const
void SwAuthorityFieldType::RemoveField(long nHandle)
{
#ifdef DBG_UTIL
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = sal_False;
#endif
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nRet = (long)(void*)pTemp;
if(nRet == nHandle)
{
#ifdef DBG_UTIL
- bRemoved = TRUE;
+ bRemoved = sal_True;
#endif
pTemp->RemoveRef();
if(!pTemp->GetRefCount())
@@ -185,11 +185,11 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
{
long nRet = 0;
SwAuthEntry* pEntry = new SwAuthEntry;
- for( USHORT i = 0; i < AUTH_FIELD_END; ++i )
+ for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
pEntry->SetAuthorField( (ToxAuthorityField)i,
rFieldContents.GetToken( i, TOX_STYLE_DELIMITER ));
- for(USHORT j = 0; j < m_pDataArr->Count() && pEntry; j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count() && pEntry; j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if(*pTemp == *pEntry)
@@ -213,16 +213,16 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
/* -----------------17.09.99 14:18-------------------
--------------------------------------------------*/
-BOOL SwAuthorityFieldType::AddField(long nHandle)
+sal_Bool SwAuthorityFieldType::AddField(long nHandle)
{
- BOOL bRet = FALSE;
- for( USHORT j = 0; j < m_pDataArr->Count(); j++ )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); j++ )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nTmp = (long)(void*)pTemp;
if( nTmp == nHandle )
{
- bRet = TRUE;
+ bRet = sal_True;
pTemp->AddRef();
//re-generate positions of the fields
DelSequenceArray();
@@ -238,7 +238,7 @@ BOOL SwAuthorityFieldType::AddField(long nHandle)
const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
{
const SwAuthEntry* pRet = 0;
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
const SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nTmp = (long)(void*)pTemp;
@@ -257,7 +257,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
void SwAuthorityFieldType::GetAllEntryIdentifiers(
SvStringsDtor& rToFill )const
{
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
rToFill.Insert( new String( pTemp->GetAuthorField(
@@ -271,7 +271,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
const String& rIdentifier)const
{
const SwAuthEntry* pRet = 0;
- for( USHORT j = 0; j < m_pDataArr->Count(); ++j )
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); ++j )
{
const SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if( rIdentifier == pTemp->GetAuthorField( AUTH_FIELD_IDENTIFIER ))
@@ -288,13 +288,13 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
{
bool bChanged = false;
- for( USHORT j = 0; j < m_pDataArr->Count(); ++j )
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); ++j )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if(pTemp->GetAuthorField(AUTH_FIELD_IDENTIFIER) ==
pNewEntry->GetAuthorField(AUTH_FIELD_IDENTIFIER))
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
pTemp->SetAuthorField((ToxAuthorityField) i,
pNewEntry->GetAuthorField((ToxAuthorityField)i));
bChanged = true;
@@ -307,9 +307,9 @@ bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
Description: appends a new entry (if new) and returns the array position
-----------------------------------------------------------------------*/
-USHORT SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
+sal_uInt16 SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( nRet = 0; nRet < m_pDataArr->Count(); ++nRet )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject( nRet );
@@ -330,7 +330,7 @@ USHORT SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
/*-- 11.10.99 08:49:24---------------------------------------------------
-----------------------------------------------------------------------*/
-long SwAuthorityFieldType::GetHandle(USHORT nPos)
+long SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
{
long nRet = 0;
if( nPos < m_pDataArr->Count() )
@@ -343,7 +343,7 @@ long SwAuthorityFieldType::GetHandle(USHORT nPos)
/* -----------------19.10.99 13:46-------------------
--------------------------------------------------*/
-USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
+sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
{
//find the field in a sorted array of handles,
#ifdef DBG_UTIL
@@ -417,7 +417,7 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
}
}
- for(USHORT i = 0; i < aSortArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aSortArr.Count(); i++)
{
const SwTOXSortTabBase& rBase = *aSortArr[i];
SwFmtFld& rFmtFld = ((SwTOXAuthority&)rBase).GetFldFmt();
@@ -427,8 +427,8 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
aSortArr.DeleteAndDestroy(0, aSortArr.Count());
}
//find nHandle
- USHORT nRet = 0;
- for(USHORT i = 0; i < m_pSequArr->Count(); i++)
+ sal_uInt16 nRet = 0;
+ for(sal_uInt16 i = 0; i < m_pSequArr->Count(); i++)
{
if((*m_pSequArr)[i] == nHandle)
{
@@ -442,7 +442,7 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
/* -----------------------------15.11.00 17:33--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const
+sal_Bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -494,14 +494,14 @@ BOOL SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------------------15.11.00 17:33--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwAuthorityFieldType::PutValue( const Any& rAny, USHORT nWhichId )
+sal_Bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = TRUE;
+ sal_Bool bRet = sal_True;
String sTmp;
switch( nWhichId )
{
@@ -554,7 +554,7 @@ BOOL SwAuthorityFieldType::PutValue( const Any& rAny, USHORT nWhichId )
if(nVal >= 0 && nVal < AUTH_FIELD_END)
pSortKey->eField = (ToxAuthorityField) nVal;
else
- bRet = FALSE;
+ bRet = sal_False;
}
else if(pValue[j].Name.equalsAsciiL(SW_PROP_NAME(UNO_NAME_IS_SORT_ASCENDING)))
{
@@ -583,14 +583,14 @@ void SwAuthorityFieldType::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
/* -----------------20.10.99 13:38-------------------
--------------------------------------------------*/
-USHORT SwAuthorityFieldType::GetSortKeyCount() const
+sal_uInt16 SwAuthorityFieldType::GetSortKeyCount() const
{
return m_pSortKeyArr->Count();
}
/* -----------------20.10.99 13:38-------------------
--------------------------------------------------*/
-const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(USHORT nIdx) const
+const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(sal_uInt16 nIdx) const
{
SwTOXSortKey* pRet = 0;
if(m_pSortKeyArr->Count() > nIdx)
@@ -601,11 +601,11 @@ const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(USHORT nIdx) const
/* -----------------20.10.99 13:38-------------------
--------------------------------------------------*/
-void SwAuthorityFieldType::SetSortKeys(USHORT nKeyCount, SwTOXSortKey aKeys[])
+void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[])
{
m_pSortKeyArr->DeleteAndDestroy(0, m_pSortKeyArr->Count());
- USHORT nArrIdx = 0;
- for(USHORT i = 0; i < nKeyCount; i++)
+ sal_uInt16 nArrIdx = 0;
+ for(sal_uInt16 i = 0; i < nKeyCount; i++)
if(aKeys[i].eField < AUTH_FIELD_END)
m_pSortKeyArr->Insert(new SwTOXSortKey(aKeys[i]), nArrIdx++);
}
@@ -742,13 +742,13 @@ const char* aFieldNames[] =
/* -----------------------------16.11.00 12:27--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwAuthorityField::QueryValue( Any& rAny, USHORT /*nWhichId*/ ) const
+sal_Bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
{
if(!GetTyp())
- return FALSE;
+ return sal_False;
const SwAuthEntry* pAuthEntry = ((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle);
if(!pAuthEntry)
- return FALSE;
+ return sal_False;
Sequence <PropertyValue> aRet(AUTH_FIELD_END);
PropertyValue* pValues = aRet.getArray();
for(sal_Int16 i = 0; i < AUTH_FIELD_END; i++)
@@ -761,7 +761,7 @@ BOOL SwAuthorityField::QueryValue( Any& rAny, USHORT /*nWhichId*/ ) const
pValues[i].Value <<= OUString(rField);
}
rAny <<= aRet;
- return FALSE;
+ return sal_False;
}
/* -----------------------------15.11.00 17:33--------------------------------
@@ -774,14 +774,14 @@ sal_Int16 lcl_Find(const OUString& rFieldName)
return -1;
}
//----------------------------------------------------------------------------
-BOOL SwAuthorityField::PutValue( const Any& rAny, USHORT /*nWhichId*/ )
+sal_Bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
{
if(!GetTyp() || !((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle))
- return FALSE;
+ return sal_False;
Sequence <PropertyValue> aParam;
if(!(rAny >>= aParam))
- return FALSE;
+ return sal_False;
String sToSet;
sToSet.Fill(AUTH_FIELD_ISBN, TOX_STYLE_DELIMITER);
@@ -807,7 +807,7 @@ BOOL SwAuthorityField::PutValue( const Any& rAny, USHORT /*nWhichId*/ )
((SwAuthorityFieldType*)GetTyp())->RemoveField(m_nHandle);
m_nHandle = ((SwAuthorityFieldType*)GetTyp())->AddField(sToSet);
- return FALSE;
+ return sal_False;
}
/* -----------------11.10.99 09:43-------------------
@@ -820,7 +820,7 @@ SwFieldType* SwAuthorityField::ChgTyp( SwFieldType* pFldTyp )
{
const SwAuthEntry* pEntry = pSrcTyp->GetEntryByHandle( m_nHandle );
- USHORT nHdlPos = pDstTyp->AppendField( *pEntry );
+ sal_uInt16 nHdlPos = pDstTyp->AppendField( *pEntry );
pSrcTyp->RemoveField( m_nHandle );
m_nHandle = pDstTyp->GetHandle( nHdlPos );
pDstTyp->AddField( m_nHandle );
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 36b981b90752..422285dee10f 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -54,13 +54,13 @@
const sal_Unicode cRelTrenner = ',';
const sal_Unicode cRelKennung = ''; // CTRL-R
-const USHORT cMAXSTACKSIZE = 50;
+const sal_uInt16 cMAXSTACKSIZE = 50;
const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox );
long lcl_GetLongBoxNum( String& rStr );
const SwTableBox* lcl_RelToBox( const SwTable&, const SwTableBox*, const String& );
String lcl_BoxNmToRel( const SwTable&, const SwTableNode&,
- const String& , const String& , BOOL );
+ const String& , const String& , sal_Bool );
/*************************************************************************
@@ -110,7 +110,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem ) )
+ RES_BOXATR_FORMULA, sal_False, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
if( !((SwTblBoxFormula*)pItem)->IsValid() )
@@ -137,7 +137,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
break;
}
else if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_VALUE, FALSE, &pItem ) )
+ RES_BOXATR_VALUE, sal_False, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
nRet = ((SwTblBoxValue*)pItem)->GetValue();
@@ -235,7 +235,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
}
// ?? sonst ist das ein Fehler
- } while( FALSE );
+ } while( sal_False );
if( !rCalcPara.IsStackOverFlow() )
{
@@ -266,15 +266,15 @@ SwTblCalcPara::~SwTblCalcPara()
delete pBoxStk;
}
-BOOL SwTblCalcPara::CalcWithStackOverflow()
+sal_Bool SwTblCalcPara::CalcWithStackOverflow()
{
// falls ein StackUeberlauf erkannt wurde, sollte mit
// der letzten Box noch mal aufgesetzt werden. Irgend
// ein Weg sollte dann
- USHORT nSaveMaxSize = nMaxSize;
+ sal_uInt16 nSaveMaxSize = nMaxSize;
nMaxSize = cMAXSTACKSIZE - 5;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SwTableBoxes aStackOverFlows;
do {
SwTableBox* pBox = (SwTableBox*)pLastTblBox;
@@ -291,7 +291,7 @@ BOOL SwTblCalcPara::CalcWithStackOverflow()
// falls Rekursionen erkannt wurden
nStackCnt = 0;
rCalc.SetCalcError( CALC_NOERR );
- pBoxStk->Remove( USHORT(0), pBoxStk->Count() );
+ pBoxStk->Remove( sal_uInt16(0), pBoxStk->Count() );
while( !rCalc.IsCalcError() && nCnt )
{
@@ -311,7 +311,7 @@ SwTableFormula::SwTableFormula( const String& rFormel )
: sFormel( rFormel )
{
eNmType = EXTRNL_NAME;
- bValidValue = FALSE;
+ bValidValue = sal_False;
}
SwTableFormula::~SwTableFormula()
@@ -353,7 +353,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += '(';
bool bDelim = false;
- for( USHORT n = 0; n < aBoxes.Count() &&
+ for( sal_uInt16 n = 0; n < aBoxes.Count() &&
!pCalcPara->rCalc.IsCalcError(); ++n )
{
const SwTableBox* pTblBox = aBoxes[n];
@@ -363,7 +363,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += cListDelim;
bDelim = true;
rNewStr += pCalcPara->rCalc.GetStrResult(
- pTblBox->GetValue( *pCalcPara ), FALSE );
+ pTblBox->GetValue( *pCalcPara ), sal_False );
}
}
rNewStr += ')';
@@ -375,7 +375,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
if ( pSttBox->getRowSpan() >= 1 )
{
rNewStr += pCalcPara->rCalc.GetStrResult(
- pSttBox->GetValue( *pCalcPara ), FALSE );
+ pSttBox->GetValue( *pCalcPara ), sal_False );
}
}
else
@@ -611,7 +611,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
void* pPara ) const
{
String aStr;
- USHORT nFml = 0, nStt = 0, nEnd = 0, nTrenner;
+ sal_uInt16 nFml = 0, nStt = 0, nEnd = 0, nTrenner;
do {
// falls der Formel ein Name vorangestellt ist, diese Tabelle
@@ -691,7 +691,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
}
nFml = nEnd+1;
- } while( TRUE );
+ } while( sal_True );
return aStr;
}
@@ -699,7 +699,7 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const String& rNm ) const
{
const SwFrmFmts& rTblFmts = *rDoc.GetTblFrmFmts();
const SwTable* pTmpTbl, *pRet = 0;
- for( USHORT nFmtCnt = rTblFmts.Count(); nFmtCnt; )
+ for( sal_uInt16 nFmtCnt = rTblFmts.Count(); nFmtCnt; )
{
SwFrmFmt* pFmt = rTblFmts[ --nFmtCnt ];
// falls wir von Sw3Writer gerufen werden, dann ist dem
@@ -729,7 +729,7 @@ const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
// oder besser ueber die Box den Frame suchen
SwClientIter aIter( *pBox->GetFrmFmt() );
- ULONG nMinPos = ULONG_MAX;
+ sal_uLong nMinPos = ULONG_MAX;
const SwFrm* pFnd = 0;
for( SwFrm* pF = (SwFrm*)aIter.First( TYPE( SwCellFrm )); pF;
pF = (SwFrm*)aIter.Next() )
@@ -742,12 +742,12 @@ const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
SwCntntNode* pCNd = aIdx.GetNodes().GoNext( &aIdx );
ASSERT( pCNd, "Box hat keinen TextNode" );
Point aPt; // den im Layout 1. Frame returnen - Tab.Kopfzeile !!
- return pCNd->GetFrm( &aPt, NULL, FALSE );
+ return pCNd->GetFrm( &aPt, NULL, sal_False );
}
long lcl_GetLongBoxNum( String& rStr )
{
- USHORT nPos;
+ sal_uInt16 nPos;
long nRet;
if( STRING_NOTFOUND == ( nPos = rStr.Search( cRelTrenner ) ))
{
@@ -790,8 +790,8 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
pBox = pLine->GetUpper();
pLine = pBox->GetUpper();
}
- USHORT nSttBox = pLine->GetTabBoxes().GetPos( pBox );
- USHORT nSttLine = rTbl.GetTabLines().GetPos( pLine );
+ sal_uInt16 nSttBox = pLine->GetTabBoxes().GetPos( pBox );
+ sal_uInt16 nSttLine = rTbl.GetTabLines().GetPos( pLine );
long nBoxOffset = lcl_GetLongBoxNum( sGetName ) + nSttBox;
long nLineOffset = lcl_GetLongBoxNum( sGetName ) + nSttLine;
@@ -803,13 +803,13 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
if( nLineOffset >= long(pLines->Count()) )
return 0;
- pLine = (*pLines)[ USHORT(nLineOffset) ];
+ pLine = (*pLines)[ sal_uInt16(nLineOffset) ];
// dann suche die Box
pBoxes = &pLine->GetTabBoxes();
if( nBoxOffset >= long(pBoxes->Count()) )
return 0;
- pBox = (*pBoxes)[ USHORT(nBoxOffset) ];
+ pBox = (*pBoxes)[ sal_uInt16(nBoxOffset) ];
while( sGetName.Len() )
{
@@ -850,7 +850,7 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
const String& rRefBoxNm, const String& rGetStr,
- BOOL bExtrnlNm )
+ sal_Bool bExtrnlNm )
{
String sCpy( rRefBoxNm );
String sTmp( rGetStr );
@@ -867,8 +867,8 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
// die externe Darstellung bei:
if( &rTbl == &rTblNd.GetTable() )
{
- long nBox = SwTable::_GetBoxNum( sTmp, TRUE );
- nBox -= SwTable::_GetBoxNum( sCpy, TRUE );
+ long nBox = SwTable::_GetBoxNum( sTmp, sal_True );
+ nBox -= SwTable::_GetBoxNum( sCpy, sal_True );
long nLine = SwTable::_GetBoxNum( sTmp );
nLine -= SwTable::_GetBoxNum( sCpy );
@@ -892,11 +892,11 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
return sTmp;
}
-USHORT SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
+sal_uInt16 SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
BoxNmToPtr( &rTbl );
ScanString( &SwTableFormula::_GetFmlBoxes, rTbl, &rBoxes );
@@ -980,7 +980,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
break;
// dann mal die Tabellenkoepfe raus:
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
pLine = rBoxes[n]->GetUpper();
while( pLine->GetUpper() )
@@ -989,7 +989,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
if( pTbl->IsHeadline( *pLine ) )
rBoxes.Remove( n--, 1 );
}
- } while( FALSE );
+ } while( sal_False );
}
}
@@ -997,7 +997,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, String& ,
String& rFirstBox, String* pLastBox, void* pPara ) const
{
- BOOL* pBValid = (BOOL*)pPara;
+ sal_Bool* pBValid = (sal_Bool*)pPara;
if( *pBValid ) // einmal falsch, immer falsch
{
SwTableBox* pSttBox = 0, *pEndBox = 0;
@@ -1038,13 +1038,13 @@ void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, String& ,
if( ( pLastBox &&
( !pEndBox || !rTbl.GetTabSortBoxes().Seek_Entry( pEndBox ) ) ) ||
( !pSttBox || !rTbl.GetTabSortBoxes().Seek_Entry( pSttBox ) ) )
- *pBValid = FALSE;
+ *pBValid = sal_False;
}
}
-BOOL SwTableFormula::HasValidBoxes() const
+sal_Bool SwTableFormula::HasValidBoxes() const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const SwNode* pNd = GetNodeOfFormula();
if( pNd && 0 != ( pNd = pNd->FindTableNode() ) )
ScanString( &SwTableFormula::_HasValidBoxes,
@@ -1053,9 +1053,9 @@ BOOL SwTableFormula::HasValidBoxes() const
}
-USHORT SwTableFormula::GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox )
+sal_uInt16 SwTableFormula::GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( pBox )
{
const SwTableLine* pLn = pBox->GetUpper();
@@ -1079,8 +1079,8 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
String* pTblNmBox = pLastBox ? pLastBox : &rFirstBox;
- USHORT nLastBoxLen = pTblNmBox->Len();
- USHORT nTrenner = pTblNmBox->Search( '.' );
+ sal_uInt16 nLastBoxLen = pTblNmBox->Len();
+ sal_uInt16 nTrenner = pTblNmBox->Search( '.' );
if( STRING_NOTFOUND != nTrenner &&
// falls im Namen schon die Punkte enthalten sind,
// treten diese immer paarig auf!!! (A1.1.1 !!)
@@ -1101,13 +1101,13 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
if( rTblUpd.pTbl != &rTbl ) // es ist nicht die akt.
(rNewStr += rTblUpd.pTbl->GetFrmFmt()->GetName() )
+= '.'; // den neuen Tabellen Namen setzen
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
}
else if( pFnd != rTblUpd.pTbl ||
( rTblUpd.pTbl != &rTbl && &rTbl != rTblUpd.DATA.pDelTbl))
(rNewStr += sTblNm ) += '.'; // den Tabellen Namen behalten
else
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
}
else
(rNewStr += sTblNm ) += '.'; // den Tabellen Namen behalten
@@ -1152,12 +1152,12 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
if( TBL_SPLITTBL == rTblUpd.eFlags )
{
// wo liegen die Boxen, in der "alten" oder in der neuen Tabelle?
- BOOL bInNewTbl = FALSE;
+ sal_Bool bInNewTbl = sal_False;
if( pLastBox )
{
// das ist die "erste" Box in der Selektion. Die bestimmt ob die
// Formel in der alten oder neuen Tabelle steht.
- USHORT nEndLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pEndBox ),
+ sal_uInt16 nEndLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pEndBox ),
nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
if( USHRT_MAX != nSttLnPos && USHRT_MAX != nEndLnPos &&
@@ -1172,7 +1172,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
// das ist aufjedenfall eine ungueltige Formel, also fuers
// Undo auf Modified setzen
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
if( pEndBox )
bInNewTbl = USHRT_MAX != nEndLnPos &&
rTblUpd.nSplitLine <= nEndLnPos &&
@@ -1181,7 +1181,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
}
else
{
- USHORT nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
+ sal_uInt16 nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
// dann landet das Teil in der neuen Tabelle?
bInNewTbl = USHRT_MAX != nSttLnPos &&
rTblUpd.nSplitLine <= nSttLnPos &&
@@ -1193,7 +1193,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
if( !bInNewTbl )
{
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
( rNewStr += rTblUpd.pTbl->GetFrmFmt()->GetName() ) += '.';
}
else if( sTblNm.Len() )
@@ -1201,7 +1201,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
}
else if( bInNewTbl )
{
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
( rNewStr += *rTblUpd.DATA.pNewTblNm ) += '.';
}
else if( sTblNm.Len() )
diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx
index bfc14af1a7aa..837ae47d9174 100644
--- a/sw/source/core/fields/chpfld.cxx
+++ b/sw/source/core/fields/chpfld.cxx
@@ -152,17 +152,17 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
do {
if( pONd && pONd->GetTxtColl() )
{
- BYTE nPrevLvl = nLevel;
+ sal_uInt8 nPrevLvl = nLevel;
// --> OD 2008-04-02 #refactorlists#
// nLevel = GetRealLevel( pONd->GetTxtColl()->
// GetOutlineLevel() );
//ASSERT( pONd->GetOutlineLevel() >= 0 && pONd->GetOutlineLevel() < MAXLEVEL, //#outline level,zhaojianwei
// "<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- //nLevel = static_cast<BYTE>(pONd->GetOutlineLevel());
+ //nLevel = static_cast<sal_uInt8>(pONd->GetOutlineLevel());
ASSERT( pONd->GetAttrOutlineLevel() >= 0 && pONd->GetAttrOutlineLevel() <= MAXLEVEL,
"<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- nLevel = static_cast<BYTE>(pONd->GetAttrOutlineLevel()); //<-end,zhaojianwei
+ nLevel = static_cast<sal_uInt8>(pONd->GetAttrOutlineLevel()); //<-end,zhaojianwei
// <--
if( nPrevLvl < nLevel )
@@ -197,7 +197,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
SwNumRule* pRule( pTxtNd->GetNumRule() );
if ( pTxtNd->IsCountedInList() && pRule )
{
- const SwNumFmt& rNFmt = pRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) );
+ const SwNumFmt& rNFmt = pRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
sPost = rNFmt.GetSuffix();
sPre = rNFmt.GetPrefix();
}
@@ -229,7 +229,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
/*-----------------05.03.98 16:19-------------------
--------------------------------------------------*/
-BOOL SwChapterField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -265,9 +265,9 @@ BOOL SwChapterField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 16:19-------------------
--------------------------------------------------*/
-BOOL SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_BYTE1:
@@ -277,7 +277,7 @@ BOOL SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
if(nTmp >= 0 && nTmp < MAXLEVEL)
nLevel = nTmp;
else
- bRet = FALSE;
+ bRet = sal_False;
break;
}
@@ -303,7 +303,7 @@ BOOL SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index ec3f5200ba67..a78c2a57d44a 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -62,7 +62,7 @@ String lcl_DBTrennConv(const String& aContent)
{
String sTmp(aContent);
sal_Unicode* pStr = sTmp.GetBufferAccess();
- for( USHORT i = sTmp.Len(); i; --i, ++pStr )
+ for( sal_uInt16 i = sTmp.Len(); i; --i, ++pStr )
if( DB_DELIM == *pStr )
*pStr = '.';
return sTmp;
@@ -113,7 +113,7 @@ void SwDBFieldType::ReleaseRef()
if (--nRefCnt <= 0)
{
- USHORT nPos = GetDoc()->GetFldTypes()->GetPos(this);
+ sal_uInt16 nPos = GetDoc()->GetFldTypes()->GetPos(this);
if (nPos != USHRT_MAX)
{
@@ -126,7 +126,7 @@ void SwDBFieldType::ReleaseRef()
/* -----------------24.02.99 14:51-------------------
*
* --------------------------------------------------*/
-BOOL SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -145,12 +145,12 @@ BOOL SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------24.02.99 14:51-------------------
*
* --------------------------------------------------*/
-BOOL SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -190,18 +190,18 @@ BOOL SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: SwDBField
--------------------------------------------------------------------*/
-SwDBField::SwDBField(SwDBFieldType* pTyp, ULONG nFmt)
+SwDBField::SwDBField(SwDBFieldType* pTyp, sal_uLong nFmt)
: SwValueField(pTyp, nFmt),
nSubType(0),
- bIsInBodyTxt(TRUE),
- bValidValue(FALSE),
- bInitialized(FALSE)
+ bIsInBodyTxt(sal_True),
+ bValidValue(sal_False),
+ bInitialized(sal_False)
{
if (GetTyp())
((SwDBFieldType*)GetTyp())->AddRef();
@@ -297,7 +297,7 @@ String SwDBField::GetFieldName() const
//------------------------------------------------------------------------------
-void SwDBField::ChgValue( double d, BOOL bVal )
+void SwDBField::ChgValue( double d, sal_Bool bVal )
{
bValidValue = bVal;
SetValue(d);
@@ -329,7 +329,7 @@ void SwDBField::Evaluate()
SwNewDBMgr* pMgr = GetDoc()->GetNewDBMgr();
// erstmal loeschen
- bValidValue = FALSE;
+ bValidValue = sal_False;
double nValue = DBL_MAX;
const SwDBData& aTmpData = GetDBData();
@@ -358,7 +358,7 @@ void SwDBField::Evaluate()
if (*pDocFormatter->GetNullDate() != aStandard)
nValue += (aStandard - *pDocFormatter->GetNullDate());
}
- bValidValue = TRUE;
+ bValidValue = sal_True;
SetValue(nValue);
aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(nValue, GetFormat(), GetLanguage());
}
@@ -373,15 +373,15 @@ void SwDBField::Evaluate()
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
if (nFmt && nFmt != SAL_MAX_UINT32 && !pFormatter->IsTextFormat(nFmt))
- bValidValue = TRUE; // Wegen Bug #60339 nicht mehr bei allen Strings
+ bValidValue = sal_True; // Wegen Bug #60339 nicht mehr bei allen Strings
}
else
{
- // Bei Strings TRUE wenn Laenge > 0 sonst FALSE
+ // Bei Strings sal_True wenn Laenge > 0 sonst sal_False
SetValue(aContent.Len() ? 1 : 0);
}
}
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
/*--------------------------------------------------------------------
@@ -397,7 +397,7 @@ const String& SwDBField::GetPar1() const
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwDBField::GetSubType() const
+sal_uInt16 SwDBField::GetSubType() const
{
return nSubType;
}
@@ -406,7 +406,7 @@ USHORT SwDBField::GetSubType() const
Beschreibung:
--------------------------------------------------------------------*/
-void SwDBField::SetSubType(USHORT nType)
+void SwDBField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -414,13 +414,13 @@ void SwDBField::SetSubType(USHORT nType)
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
{
- BOOL bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT);
+ sal_Bool bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT);
rAny.setValue(&bTemp, ::getBooleanCppuType());
}
break;
@@ -442,13 +442,13 @@ BOOL SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -460,10 +460,10 @@ BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_BOOL2:
{
- USHORT nSubTyp = GetSubType();
+ sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
- return FALSE;
+ return sal_False;
if(bVisible)
nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -504,14 +504,14 @@ BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
--------------------------------------------------------------------*/
-SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt) :
+SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt) :
SwField(pTyp, nFmt),
aDBData(rDBData),
nSubType(0)
@@ -554,7 +554,7 @@ String SwDBNameInfField::GetFieldName() const
/*-----------------06.03.98 16:55-------------------
--------------------------------------------------*/
-BOOL SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -576,12 +576,12 @@ BOOL SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 16:55-------------------
--------------------------------------------------*/
-BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -596,10 +596,10 @@ BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_BOOL2:
{
- USHORT nSubTyp = GetSubType();
+ sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
- return FALSE;
+ return sal_False;
if(bVisible)
nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -610,19 +610,19 @@ BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------4/10/2003 15:03------------------
--------------------------------------------------*/
-USHORT SwDBNameInfField::GetSubType() const
+sal_uInt16 SwDBNameInfField::GetSubType() const
{
return nSubType;
}
/* -----------------4/10/2003 15:03------------------
--------------------------------------------------*/
-void SwDBNameInfField::SetSubType(USHORT nType)
+void SwDBNameInfField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -651,7 +651,7 @@ SwDBNextSetField::SwDBNextSetField(SwDBNextSetFieldType* pTyp,
const String& rCond,
const String& ,
const SwDBData& rDBData) :
- SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(TRUE)
+ SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(sal_True)
{}
//------------------------------------------------------------------------------
@@ -699,9 +699,9 @@ void SwDBNextSetField::SetPar1(const String& rStr)
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -715,9 +715,9 @@ BOOL SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNextSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -772,7 +772,7 @@ SwDBNumSetField::SwDBNumSetField(SwDBNumSetFieldType* pTyp,
SwDBNameInfField(pTyp, rDBData),
aCond(rCond),
aPar2(rDBNum),
- bCondValid(TRUE)
+ bCondValid(sal_True)
{}
//------------------------------------------------------------------------------
@@ -801,7 +801,7 @@ void SwDBNumSetField::Evaluate(SwDoc* pDoc)
if( bCondValid && pMgr && pMgr->IsInMerge() &&
pMgr->IsDataSourceOpen(aTmpData.sDataSource, aTmpData.sCommand, sal_True))
{ // Bedingug OK -> aktuellen Set einstellen
- pMgr->ToRecordId(Max((USHORT)aPar2.ToInt32(), USHORT(1))-1);
+ pMgr->ToRecordId(Max((sal_uInt16)aPar2.ToInt32(), sal_uInt16(1))-1);
}
}
@@ -835,9 +835,9 @@ void SwDBNumSetField::SetPar2(const String& rStr)
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -854,9 +854,9 @@ BOOL SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNumSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNumSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -886,7 +886,7 @@ SwDBNameFieldType::SwDBNameFieldType(SwDoc* pDocument)
}
//------------------------------------------------------------------------------
-String SwDBNameFieldType::Expand(ULONG ) const
+String SwDBNameFieldType::Expand(sal_uLong ) const
{
const SwDBData aData = pDoc->GetDBData();
String sRet(aData.sDataSource);
@@ -908,7 +908,7 @@ SwFieldType* SwDBNameFieldType::Copy() const
Beschreibung: Name der angedockten DB
--------------------------------------------------------------------*/
-SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt)
+SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt)
: SwDBNameInfField(pTyp, rDBData, nFmt)
{}
@@ -936,14 +936,14 @@ SwField* SwDBNameField::Copy() const
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
return SwDBNameInfField::QueryValue(rAny, nWhichId );
}
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
return SwDBNameInfField::PutValue(rAny, nWhichId );
}
@@ -972,7 +972,7 @@ SwFieldType* SwDBSetNumberFieldType::Copy() const
SwDBSetNumberField::SwDBSetNumberField(SwDBSetNumberFieldType* pTyp,
const SwDBData& rDBData,
- ULONG nFmt)
+ sal_uLong nFmt)
: SwDBNameInfField(pTyp, rDBData, nFmt), nNumber(0)
{}
@@ -983,7 +983,7 @@ String SwDBSetNumberField::Expand() const
if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0)
return aEmptyStr;
else
- return FormatNumber((USHORT)nNumber, GetFormat());
+ return FormatNumber((sal_uInt16)nNumber, GetFormat());
//return(nNumber == 0 ? aEmptyStr : FormatNumber(nNumber, GetFormat()));
}
@@ -1015,9 +1015,9 @@ SwField* SwDBSetNumberField::Copy() const
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_USHORT1:
@@ -1034,16 +1034,16 @@ BOOL SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBSetNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_USHORT1:
{
sal_Int16 nSet = 0;
rAny >>= nSet;
- if(nSet < (INT16) SVX_NUMBER_NONE )
+ if(nSet < (sal_Int16) SVX_NUMBER_NONE )
SetFormat(nSet);
else {
//exception(wrong_value)
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index c9811352b062..643efc626eb7 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -58,7 +58,7 @@ class SwIntrnlRefLink : public SwBaseLink
{
SwDDEFieldType& rFldType;
public:
- SwIntrnlRefLink( SwDDEFieldType& rType, USHORT nUpdateType, USHORT nFmt )
+ SwIntrnlRefLink( SwDDEFieldType& rType, sal_uInt16 nUpdateType, sal_uInt16 nFmt )
: SwBaseLink( nUpdateType, nFmt ),
rFldType( rType )
{}
@@ -68,7 +68,7 @@ public:
const uno::Any & rValue );
virtual const SwNode* GetAnchor() const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
};
@@ -95,7 +95,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
if( n && 0x0d == sStr.GetChar( n-1 ) )
--n;
- BOOL bDel = n != sStr.Len();
+ sal_Bool bDel = n != sStr.Len();
if( bDel )
sStr.Erase( n );
@@ -121,7 +121,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
// dann suchen wir uns mal alle Felder. Wird kein gueltiges
// gefunden, dann Disconnecten wir uns!
SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL );
- int bCallModify = FALSE;
+ int bCallModify = sal_False;
rFldType.LockModify();
SwClientIter aIter( rFldType );
@@ -140,7 +140,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
pSh->StartAction();
}
pLast->Modify( 0, &aUpdateDDE );
- bCallModify = TRUE;
+ bCallModify = sal_True;
}
} while( 0 != ( pLast = aIter++ ));
@@ -208,7 +208,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor() const
return pNd;
}
-BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
+sal_Bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
xub_StrLen nStt, xub_StrLen nEnd ) const
{
// hier sollte irgend ein Anchor aus dem normalen Nodes-Array reichen
@@ -227,7 +227,7 @@ BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
if( pTblNd->GetNodes().IsDocNodes() &&
nSttNd < pTblNd->EndOfSectionIndex() &&
nEndNd > pTblNd->GetIndex() )
- return TRUE;
+ return sal_True;
}
else if( ((SwFmtFld*)pLast)->GetTxtFld() )
{
@@ -235,24 +235,24 @@ BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
const SwTxtNode* pNd = pTFld->GetpTxtNode();
if( pNd && pNds == &pNd->GetNodes() )
{
- ULONG nNdPos = pNd->GetIndex();
+ sal_uLong nNdPos = pNd->GetIndex();
if( nSttNd <= nNdPos && nNdPos <= nEndNd &&
( nNdPos != nSttNd || *pTFld->GetStart() >= nStt ) &&
( nNdPos != nEndNd || *pTFld->GetStart() < nEnd ))
- return TRUE;
+ return sal_True;
}
}
} while( 0 != ( pLast = aIter++ ));
- return FALSE;
+ return sal_False;
}
SwDDEFieldType::SwDDEFieldType(const String& rName,
- const String& rCmd, USHORT nUpdateType )
+ const String& rCmd, sal_uInt16 nUpdateType )
: SwFieldType( RES_DDEFLD ),
aName( rName ), pDoc( 0 ), nRefCnt( 0 )
{
- bCRLFFlag = bDeleted = FALSE;
+ bCRLFFlag = bDeleted = sal_False;
refLink = new SwIntrnlRefLink( *this, nUpdateType, FORMAT_STRING );
SetCmd( rCmd );
}
@@ -331,9 +331,9 @@ void SwDDEFieldType::_RefCntChgd()
/* -----------------------------28.08.00 16:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+sal_Bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
- BYTE nPart = 0;
+ sal_uInt8 nPart = 0;
switch( nWhichId )
{
case FIELD_PROP_PAR2: nPart = 3; break;
@@ -341,7 +341,7 @@ BOOL SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
case FIELD_PROP_SUBTYPE: nPart = 1; break;
case FIELD_PROP_BOOL1:
{
- sal_Bool bSet = GetType() == sfx2::LINKUPDATE_ALWAYS ? TRUE : FALSE;
+ sal_Bool bSet = GetType() == sfx2::LINKUPDATE_ALWAYS ? sal_True : sal_False;
rVal.setValue(&bSet, ::getBooleanCppuType());
}
break;
@@ -353,21 +353,21 @@ BOOL SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
}
if( nPart )
rVal <<= OUString(GetCmd().GetToken(nPart-1, sfx2::cTokenSeperator));
- return TRUE;
+ return sal_True;
}
/* -----------------------------28.08.00 16:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDDEFieldType::PutValue( const uno::Any& rVal, USHORT nWhichId )
+sal_Bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
- BYTE nPart = 0;
+ sal_uInt8 nPart = 0;
switch( nWhichId )
{
case FIELD_PROP_PAR2: nPart = 3; break;
case FIELD_PROP_PAR4: nPart = 2; break;
case FIELD_PROP_SUBTYPE: nPart = 1; break;
case FIELD_PROP_BOOL1:
- SetType( static_cast<USHORT>(*(sal_Bool*)rVal.getValue() ?
+ SetType( static_cast<sal_uInt16>(*(sal_Bool*)rVal.getValue() ?
sfx2::LINKUPDATE_ALWAYS :
sfx2::LINKUPDATE_ONCALL ) );
break;
@@ -389,7 +389,7 @@ BOOL SwDDEFieldType::PutValue( const uno::Any& rVal, USHORT nWhichId )
sCmd.SetToken( nPart-1, sfx2::cTokenSeperator, ::GetString( rVal, sTmp ) );
SetCmd( sCmd );
}
- return TRUE;
+ return sal_True;
}
/* ---------------------------------------------------------------------------
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index c10a8b18c5cb..05d8f4ff50a3 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -46,13 +46,13 @@ TYPEINIT1( SwDDETable, SwTable );
// Constructor movet alle Lines/Boxen aus der SwTable zu sich.
// Die SwTable ist danach Leer und muss geloescht werden.
SwDDETable::SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
- BOOL bUpdate )
+ sal_Bool bUpdate )
: SwTable( rTable ), aDepend( this, pDDEType )
{
// Kopiere/move die Daten der Tabelle
aSortCntBoxes.Insert( &rTable.GetTabSortBoxes(), 0,
rTable.GetTabSortBoxes().Count() ); // move die Inh. Boxen
- rTable.GetTabSortBoxes().Remove( (USHORT)0, rTable.GetTabSortBoxes().Count() );
+ rTable.GetTabSortBoxes().Remove( (sal_uInt16)0, rTable.GetTabSortBoxes().Count() );
aLines.Insert( &rTable.GetTabLines(),0 ); // move die Lines
rTable.GetTabLines().Remove( 0, rTable.GetTabLines().Count() );
@@ -116,11 +116,11 @@ void SwDDETable::ChangeContent()
String aExpand = pDDEType->GetExpansion();
aExpand.EraseAllChars( '\r' );
- for( USHORT n = 0; n < aLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLines.Count(); ++n )
{
String aLine = aExpand.GetToken( n, '\n' );
SwTableLine* pLine = aLines[ n ];
- for( USHORT i = 0; i < pLine->GetTabBoxes().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().Count(); ++i )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ i ];
ASSERT( pBox->GetSttIdx(), "keine InhaltsBox" );
@@ -149,7 +149,7 @@ SwDDEFieldType* SwDDETable::GetDDEFldType()
return (SwDDEFieldType*)aDepend.GetRegisteredIn();
}
-BOOL SwDDETable::NoDDETable()
+sal_Bool SwDDETable::NoDDETable()
{
// suche den TabellenNode
ASSERT( GetFrmFmt(), "Kein FrameFormat" );
@@ -157,11 +157,11 @@ BOOL SwDDETable::NoDDETable()
// Stehen wir im richtigen NodesArray (Wegen UNDO)
if( !aLines.Count() )
- return FALSE;
+ return sal_False;
ASSERT( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
SwNode* pNd = (SwNode*)GetTabSortBoxes()[0]->GetSttNd();
if( !pNd->GetNodes().IsDocNodes() )
- return FALSE;
+ return sal_False;
SwTableNode* pTblNd = pNd->FindTableNode();
ASSERT( pTblNd, "wo steht denn die Tabelle ?");
@@ -171,7 +171,7 @@ BOOL SwDDETable::NoDDETable()
// Kopiere/move die Daten der Tabelle
pNewTbl->GetTabSortBoxes().Insert( &GetTabSortBoxes(), 0,
GetTabSortBoxes().Count() ); // move die Inh. Boxen
- GetTabSortBoxes().Remove( (USHORT)0, GetTabSortBoxes().Count() );
+ GetTabSortBoxes().Remove( (sal_uInt16)0, GetTabSortBoxes().Count() );
pNewTbl->GetTabLines().Insert( &GetTabLines(),0 ); // move die Lines
GetTabLines().Remove( 0, GetTabLines().Count() );
@@ -181,7 +181,7 @@ BOOL SwDDETable::NoDDETable()
pTblNd->SetNewTable( pNewTbl ); // setze die Tabelle
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index f6b727987cd3..9f0e252a6421 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -252,7 +252,7 @@ sal_uInt16 SwPageNumberField::GetSubType() const
/*-----------------05.03.98 10:25-------------------
--------------------------------------------------*/
-BOOL SwPageNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -285,9 +285,9 @@ BOOL SwPageNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 10:25-------------------
--------------------------------------------------*/
-BOOL SwPageNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
sal_Int16 nSet = 0;
switch( nWhichId )
{
@@ -319,7 +319,7 @@ BOOL SwPageNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
nSubType = PG_NEXT;
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case FIELD_PROP_PAR1:
@@ -340,7 +340,7 @@ SwAuthorFieldType::SwAuthorFieldType()
{
}
-String SwAuthorFieldType::Expand(ULONG nFmt) const
+String SwAuthorFieldType::Expand(sal_uLong nFmt) const
{
String sRet;
SvtUserOptions& rOpt = SW_MOD()->GetUserOptions();
@@ -386,7 +386,7 @@ SwField* SwAuthorField::Copy() const
/*-----------------05.03.98 11:15-------------------
--------------------------------------------------*/
-BOOL SwAuthorField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
sal_Bool bVal;
switch( nWhichId )
@@ -413,7 +413,7 @@ BOOL SwAuthorField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 11:15-------------------
--------------------------------------------------*/
-BOOL SwAuthorField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -448,7 +448,7 @@ SwFileNameFieldType::SwFileNameFieldType(SwDoc *pDocument)
pDoc = pDocument;
}
-String SwFileNameFieldType::Expand(ULONG nFmt) const
+String SwFileNameFieldType::Expand(sal_uLong nFmt) const
{
String aRet;
const SwDocShell* pDShell = pDoc->GetDocShell();
@@ -532,7 +532,7 @@ SwField* SwFileNameField::Copy() const
/*-----------------05.03.98 08:59-------------------
--------------------------------------------------*/
-BOOL SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -558,7 +558,7 @@ BOOL SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
case FIELD_PROP_BOOL2:
{
- BOOL bVal = IsFixed();
+ sal_Bool bVal = IsFixed();
rAny.setValue(&bVal, ::getBooleanCppuType());
}
break;
@@ -574,7 +574,7 @@ BOOL SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 09:01-------------------
--------------------------------------------------*/
-BOOL SwFileNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -585,7 +585,7 @@ BOOL SwFileNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
// here only a int16
sal_Int32 nType = 0;
rAny >>= nType;
- BOOL bFixed = IsFixed();
+ sal_Bool bFixed = IsFixed();
switch( nType )
{
case text::FilenameDisplayFormat::PATH:
@@ -631,7 +631,7 @@ SwTemplNameFieldType::SwTemplNameFieldType(SwDoc *pDocument)
pDoc = pDocument;
}
-String SwTemplNameFieldType::Expand(ULONG nFmt) const
+String SwTemplNameFieldType::Expand(sal_uLong nFmt) const
{
ASSERT( nFmt < FF_END, "Expand: kein guelt. Fmt!" );
@@ -708,7 +708,7 @@ SwField* SwTemplNameField::Copy() const
/*-----------------05.03.98 08:59-------------------
--------------------------------------------------*/
-BOOL SwTemplNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -736,7 +736,7 @@ BOOL SwTemplNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 09:01-------------------
--------------------------------------------------*/
-BOOL SwTemplNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -863,7 +863,7 @@ void SwDocStatField::ChangeExpansion( const SwFrm* pFrm )
/*-----------------05.03.98 11:38-------------------
--------------------------------------------------*/
-BOOL SwDocStatField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -878,9 +878,9 @@ BOOL SwDocStatField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 11:38-------------------
--------------------------------------------------*/
-BOOL SwDocStatField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch ( nWhichId )
{
case FIELD_PROP_USHORT2:
@@ -892,7 +892,7 @@ BOOL SwDocStatField::PutValue( const uno::Any& rAny, USHORT nWhichId )
nSet != SVX_NUM_BITMAP)
{
SetFormat(nSet);
- bRet = TRUE;
+ bRet = sal_True;
}
}
break;
@@ -921,7 +921,7 @@ SwFieldType* SwDocInfoFieldType::Copy() const
return pTyp;
}
-void lcl_GetLocalDataWrapper( ULONG nLang,
+void lcl_GetLocalDataWrapper( sal_uLong nLang,
const LocaleDataWrapper **ppAppLocalData,
const LocaleDataWrapper **ppLocalData )
{
@@ -1261,7 +1261,7 @@ void SwDocInfoField::SetLanguage(sal_uInt16 nLng)
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDocInfoField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1311,7 +1311,7 @@ BOOL SwDocInfoField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDocInfoField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDocInfoField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nValue = 0;
switch( nWhichId )
@@ -1606,7 +1606,7 @@ sal_uInt16 SwHiddenTxtField::GetSubType() const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwHiddenTxtField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwHiddenTxtField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
const String* pOut = 0;
switch( nWhichId )
@@ -1639,7 +1639,7 @@ BOOL SwHiddenTxtField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwHiddenTxtField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwHiddenTxtField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1660,7 +1660,7 @@ BOOL SwHiddenTxtField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_PAR4:
::GetString( rAny, aContent);
- bValid = TRUE;
+ bValid = sal_True;
break;
default:
DBG_ERROR("illegal property");
@@ -1746,7 +1746,7 @@ SwField* SwHiddenParaField::Copy() const
/*-----------------05.03.98 13:25-------------------
--------------------------------------------------*/
-BOOL SwHiddenParaField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -1768,7 +1768,7 @@ BOOL SwHiddenParaField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 13:25-------------------
--------------------------------------------------*/
-BOOL SwHiddenParaField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -1911,7 +1911,7 @@ sal_uInt32 SwPostItField::GetNumberOfParagraphs() const
/*-----------------05.03.98 13:42-------------------
--------------------------------------------------*/
-BOOL SwPostItField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1975,7 +1975,7 @@ BOOL SwPostItField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 13:42-------------------
--------------------------------------------------*/
-BOOL SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2006,7 +2006,7 @@ BOOL SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
util::DateTime aDateTimeValue;
if(!(rAny >>= aDateTimeValue))
- return FALSE;
+ return sal_False;
aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
aDateTime.SetSec(aDateTimeValue.Seconds);
aDateTime.SetMin(aDateTimeValue.Minutes);
@@ -2119,7 +2119,7 @@ void SwExtUserField::SetSubType(sal_uInt16 nSub)
/*-----------------05.03.98 14:14-------------------
--------------------------------------------------*/
-BOOL SwExtUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2147,7 +2147,7 @@ BOOL SwExtUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 14:14-------------------
--------------------------------------------------*/
-BOOL SwExtUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2239,7 +2239,7 @@ void SwRefPageSetField::SetPar2(const String& rStr)
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2257,7 +2257,7 @@ BOOL SwRefPageSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2510,7 +2510,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageGetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2528,7 +2528,7 @@ BOOL SwRefPageGetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageGetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2646,7 +2646,7 @@ void SwJumpEditField::SetPar2(const String& rStr)
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2680,7 +2680,7 @@ BOOL SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwJumpEditField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2758,8 +2758,8 @@ void SwCombinedCharField::SetPar1(const String& rStr)
sCharacters = rStr.Copy( 0, MAX_COMBINED_CHARACTERS );
}
-BOOL SwCombinedCharField::QueryValue( uno::Any& rAny,
- USHORT nWhichId ) const
+sal_Bool SwCombinedCharField::QueryValue( uno::Any& rAny,
+ sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2772,8 +2772,8 @@ BOOL SwCombinedCharField::QueryValue( uno::Any& rAny,
return sal_True;
}
-BOOL SwCombinedCharField::PutValue( const uno::Any& rAny,
- USHORT nWhichId )
+sal_Bool SwCombinedCharField::PutValue( const uno::Any& rAny,
+ sal_uInt16 nWhichId )
{
switch( nWhichId )
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e55c8598cf90..190d894d66f2 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -71,7 +71,7 @@ using ::rtl::OUString;
SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* )
//-----------------------------------------------------------------------------
-sal_Int16 lcl_SubTypeToAPI(USHORT nSubType)
+sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
{
sal_Int16 nRet = 0;
switch(nSubType)
@@ -104,7 +104,7 @@ sal_Int32 lcl_APIToSubType(const uno::Any& rAny)
//-----------------------------------------------------------------------------
-void ReplacePoint( String& rTmpName, BOOL bWithCommandType )
+void ReplacePoint( String& rTmpName, sal_Bool bWithCommandType )
{
// replace first and last (if bWithCommandType: last two) dot Ersten und letzten Punkt ersetzen, da in Tabellennamen Punkte erlaubt sind
// since table names may contain dots
@@ -248,7 +248,7 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
{
Point aPt( pLayout->Frm().Pos() );
aPt.Y()++; // aus dem Header raus
- pCntFrm = pPgFrm->GetCntntPos( aPt, FALSE, TRUE, FALSE );
+ pCntFrm = pPgFrm->GetCntntPos( aPt, sal_False, sal_True, sal_False );
pTxtNode = GetFirstTxtNode( rDoc, rPos, pCntFrm, aPt );
}
}
@@ -288,9 +288,9 @@ void SwGetExpFieldType::Modify( SfxPoolItem*, SfxPoolItem* pNew )
--------------------------------------------------------------------*/
SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const String& rFormel,
- USHORT nSub, ULONG nFmt)
+ sal_uInt16 nSub, sal_uLong nFmt)
: SwFormulaField( pTyp, nFmt, 0.0 ),
- bIsInBodyTxt( TRUE ),
+ bIsInBodyTxt( sal_True ),
nSubType(nSub),
bLateInitialization( false )
{
@@ -308,7 +308,7 @@ String SwGetExpField::Expand() const
String SwGetExpField::GetFieldName() const
{
String aStr( SwFieldType::GetTypeStr(
- static_cast<USHORT>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0)
+ static_cast<sal_uInt16>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0)
? TYP_FORMELFLD
: TYP_GETFLD ) ));
aStr += ' ';
@@ -369,7 +369,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld )
if(GetSubType() & nsSwGetSetExpType::GSE_STRING)
{
SwHash** ppHashTbl;
- USHORT nSize;
+ sal_uInt16 nSize;
rDoc.FldsToExpand( ppHashTbl, nSize, aEndFld );
LookString( ppHashTbl, nSize, GetFormula(), sExpand );
::DeleteHashTable( ppHashTbl, nSize ); // HashTabelle loeschen
@@ -399,17 +399,17 @@ void SwGetExpField::SetPar2(const String& rStr)
SetFormula(rStr);
}
-USHORT SwGetExpField::GetSubType() const
+sal_uInt16 SwGetExpField::GetSubType() const
{
return nSubType;
}
-void SwGetExpField::SetSubType(USHORT nType)
+void SwGetExpField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-void SwGetExpField::SetLanguage(USHORT nLng)
+void SwGetExpField::SetLanguage(sal_uInt16 nLng)
{
if (nSubType & nsSwExtendedSubType::SUB_CMD)
SwField::SetLanguage(nLng);
@@ -420,7 +420,7 @@ void SwGetExpField::SetLanguage(USHORT nLng)
/*-----------------07.03.98 16:08-------------------
--------------------------------------------------*/
-BOOL SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -444,7 +444,7 @@ BOOL SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -454,12 +454,12 @@ BOOL SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------07.03.98 16:08-------------------
--------------------------------------------------*/
-BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
String sTmp;
@@ -474,7 +474,7 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_USHORT1:
rAny >>= nTmp;
- nSubType = static_cast<USHORT>(nTmp);
+ nSubType = static_cast<sal_uInt16>(nTmp);
break;
case FIELD_PROP_PAR1:
SetFormula( ::GetString( rAny, sTmp ));
@@ -482,7 +482,7 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case FIELD_PROP_SUBTYPE:
nTmp = lcl_APIToSubType(rAny);
if( nTmp >=0 )
- SetSubType( static_cast<USHORT>((GetSubType() & 0xff00) | nTmp));
+ SetSubType( static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp));
break;
case FIELD_PROP_BOOL2:
if(*(sal_Bool*) rAny.getValue())
@@ -496,23 +496,23 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------JP: 17.06.93 -------------------
Set-Expression-Type
--------------------------------------------------*/
-SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, USHORT nTyp )
+SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, sal_uInt16 nTyp )
: SwValueFieldType( pDc, RES_SETEXPFLD ),
sName( rName ),
pOutlChgNd( 0 ),
sDelim( String::CreateFromAscii( "." ) ),
nType(nTyp), nLevel( UCHAR_MAX ),
- bDeleted( FALSE )
+ bDeleted( sal_False )
{
if( ( nsSwGetSetExpType::GSE_SEQ | nsSwGetSetExpType::GSE_STRING ) & nType )
- EnableFormat(FALSE); // Numberformatter nicht einsetzen
+ EnableFormat(sal_False); // Numberformatter nicht einsetzen
}
SwFieldType* SwSetExpFieldType::Copy() const
@@ -535,7 +535,7 @@ void SwSetExpFieldType::Modify( SfxPoolItem*, SfxPoolItem* )
return; // nicht weiter expandieren
}
-void SwSetExpFieldType::SetSeqFormat(ULONG nFmt)
+void SwSetExpFieldType::SetSeqFormat(sal_uLong nFmt)
{
SwClientIter aIter(*this);
for( SwFmtFld* pFld = (SwFmtFld*)aIter.First( TYPE(SwFmtFld) );
@@ -543,7 +543,7 @@ void SwSetExpFieldType::SetSeqFormat(ULONG nFmt)
pFld->GetFld()->ChangeFormat( nFmt );
}
-ULONG SwSetExpFieldType::GetSeqFormat()
+sal_uLong SwSetExpFieldType::GetSeqFormat()
{
if( !GetDepends() )
return SVX_NUM_ARABIC;
@@ -552,15 +552,15 @@ ULONG SwSetExpFieldType::GetSeqFormat()
return pFld->GetFormat();
}
-USHORT SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
+sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
{
if( !GetDepends() || !(nsSwGetSetExpType::GSE_SEQ & nType) )
return USHRT_MAX;
-extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
+extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
SvUShorts aArr( 64 );
- USHORT n;
+ sal_uInt16 n;
// dann testmal, ob die Nummer schon vergeben ist oder ob eine neue
// bestimmt werden muss.
@@ -575,7 +575,7 @@ extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
// teste erstmal ob die Nummer schon vorhanden ist:
- USHORT nNum = rFld.GetSeqNumber();
+ sal_uInt16 nNum = rFld.GetSeqNumber();
if( USHRT_MAX != nNum )
{
for( n = 0; n < aArr.Count(); ++n )
@@ -597,7 +597,7 @@ extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
return n;
}
-USHORT SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
+sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
{
if( rList.Count() )
rList.Remove( 0, rList.Count() );
@@ -635,7 +635,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
const SwNodeNum & aNum = *(pTxtNd->GetNum());
// nur die Nummer besorgen, ohne Pre-/Post-fixstrings
- String sNumber( pRule->MakeNumString(aNum, FALSE ));
+ String sNumber( pRule->MakeNumString(aNum, sal_False ));
if( sNumber.Len() )
rFld.ChgExpStr( ( sNumber += sDelim ) += rFld.GetExpStr() );
@@ -652,7 +652,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
/* -----------------24.03.99 09:44-------------------
*
* --------------------------------------------------*/
-BOOL SwSetExpFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -674,10 +674,10 @@ BOOL SwSetExpFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
-BOOL SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -685,7 +685,7 @@ BOOL SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
sal_Int32 nSet = lcl_APIToSubType(rAny);
if(nSet >=0)
- SetType(static_cast<USHORT>(nSet));
+ SetType(static_cast<sal_uInt16>(nSet));
}
break;
case FIELD_PROP_PAR2:
@@ -711,10 +711,10 @@ BOOL SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
-BOOL SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
+sal_Bool SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
{
sal_Unicode* p = pNew->sDlgEntry.GetBufferAccess();
while( *p )
@@ -724,16 +724,16 @@ BOOL SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
++p;
}
- USHORT nPos;
- BOOL bRet = SeekEntry( *pNew, &nPos );
+ sal_uInt16 nPos;
+ sal_Bool bRet = SeekEntry( *pNew, &nPos );
if( !bRet )
C40_INSERT( _SeqFldLstElem, pNew, nPos );
return bRet;
}
-BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
+sal_Bool SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, sal_uInt16* pP )
{
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
CollatorWrapper & rCaseColl = ::GetAppCaseCollator(),
@@ -745,7 +745,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
const String& rTmp2 = rNew.sDlgEntry;
xub_StrLen nFndPos2 = 0;
String sNum2( rTmp2.GetToken( 0, ' ', nFndPos2 ));
- BOOL bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
+ sal_Bool bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.ToInt32() : 0;
nO--;
@@ -774,7 +774,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
if( 0 == nCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( 0 < nCmp )
nU = nM + 1;
@@ -785,7 +785,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -793,13 +793,13 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
--------------------------------------------------------------------*/
SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const String& rFormel,
- ULONG nFmt)
+ sal_uLong nFmt)
: SwFormulaField( pTyp, nFmt, 0.0 ), nSeqNo( USHRT_MAX ),
nSubType(0)
{
SetFormula(rFormel);
// SubType ignorieren !!!
- bInput = FALSE;
+ bInput = sal_False;
if( IsSequenceFld() )
{
SwValueField::SetValue(1.0);
@@ -842,7 +842,7 @@ String SwSetExpField::GetFieldName() const
? TYP_SETINPFLD
: TYP_SETFLD );
- String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nStrType) ) );
+ String aStr( SwFieldType::GetTypeStr( static_cast<sal_uInt16>(nStrType) ) );
aStr += ' ';
aStr += GetTyp()->GetName();
@@ -871,7 +871,7 @@ SwField* SwSetExpField::Copy() const
return pTmp;
}
-void SwSetExpField::SetSubType(USHORT nSub)
+void SwSetExpField::SetSubType(sal_uInt16 nSub)
{
((SwSetExpFieldType*)GetTyp())->SetType(nSub & 0xff);
nSubType = nSub & 0xff00;
@@ -879,7 +879,7 @@ void SwSetExpField::SetSubType(USHORT nSub)
DBG_ASSERT( (nSub & 0xff) != 3, "SubType ist illegal!" );
}
-USHORT SwSetExpField::GetSubType() const
+sal_uInt16 SwSetExpField::GetSubType() const
{
return ((SwSetExpFieldType*)GetTyp())->GetType() | nSubType;
}
@@ -889,7 +889,7 @@ void SwSetExpField::SetValue( const double& rAny )
SwValueField::SetValue(rAny);
if( IsSequenceFld() )
- sExpand = FormatNumber( (USHORT)GetValue(), GetFormat() );
+ sExpand = FormatNumber( (sal_uInt16)GetValue(), GetFormat() );
else
sExpand = ((SwValueFieldType*)GetTyp())->ExpandValue( rAny,
GetFormat(), GetLanguage());
@@ -917,9 +917,9 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
if(sNodeText.Len())
{
//now check if sNodeText starts with a non-alphanumeric character plus a blank
- USHORT nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
+ sal_uInt16 nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
- static USHORT nIds[] =
+ static sal_uInt16 nIds[] =
{
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
RES_CHRATR_FONT, RES_CHRATR_FONT,
@@ -939,7 +939,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
GetWhichOfScript( RES_CHRATR_LANGUAGE, nSrcpt )) ).GetLanguage();
CharClass aCC( SvxCreateLocale( eLang ));
sal_Unicode c0 = sNodeText.GetChar(0);
- BOOL bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
+ sal_Bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
if( !bIsAlphaNum ||
(c0 == ' ' || c0 == '\t'))
{
@@ -966,7 +966,7 @@ const String& SwSetExpField::GetPar1() const
String SwSetExpField::GetPar2() const
{
- USHORT nType = ((SwSetExpFieldType*)GetTyp())->GetType();
+ sal_uInt16 nType = ((SwSetExpFieldType*)GetTyp())->GetType();
if (nType & nsSwGetSetExpType::GSE_STRING)
return GetFormula();
@@ -975,7 +975,7 @@ String SwSetExpField::GetPar2() const
void SwSetExpField::SetPar2(const String& rStr)
{
- USHORT nType = ((SwSetExpFieldType*)GetTyp())->GetType();
+ sal_uInt16 nType = ((SwSetExpFieldType*)GetTyp())->GetType();
if( !(nType & nsSwGetSetExpType::GSE_SEQ) || rStr.Len() )
{
@@ -1006,7 +1006,7 @@ SwFieldType* SwInputFieldType::Copy() const
--------------------------------------------------------------------*/
SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent,
- const String& rPrompt, USHORT nSub, ULONG nFmt) :
+ const String& rPrompt, sal_uInt16 nSub, sal_uLong nFmt) :
SwField(pTyp, nFmt), aContent(rContent), aPText(rPrompt), nSubType(nSub)
{
}
@@ -1055,7 +1055,7 @@ String SwInputField::Expand() const
/*-----------------06.03.98 11:12-------------------
--------------------------------------------------*/
-BOOL SwInputField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1074,12 +1074,12 @@ BOOL SwInputField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 11:12-------------------
--------------------------------------------------*/
-BOOL SwInputField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1098,7 +1098,7 @@ BOOL SwInputField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Bedingung setzen
@@ -1148,24 +1148,24 @@ String SwInputField::GetToolTip() const
return aToolTip;
}
-BOOL SwInputField::isFormField() const
+sal_Bool SwInputField::isFormField() const
{
return aHelp.Len() > 0 || aToolTip.Len() > 0;
}
-USHORT SwInputField::GetSubType() const
+sal_uInt16 SwInputField::GetSubType() const
{
return nSubType;
}
-void SwInputField::SetSubType(USHORT nSub)
+void SwInputField::SetSubType(sal_uInt16 nSub)
{
nSubType = nSub;
}
/*-----------------05.03.98 17:22-------------------
--------------------------------------------------*/
-BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1192,7 +1192,7 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
//I18N - if the formula contains only "TypeName+1"
//and it's one of the initially created sequence fields
//then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), TRUE);
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
rAny <<= OUString( sMyFormula );
}
break;
@@ -1211,13 +1211,13 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL3:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = GetInputFlag();
+ sal_Bool bTmp = GetInputFlag();
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1227,12 +1227,12 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------05.03.98 17:22-------------------
--------------------------------------------------*/
-BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp32 = 0;
sal_Int16 nTmp16 = 0;
@@ -1275,7 +1275,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
//I18N - if the formula contains only "TypeName+1"
//and it's one of the initially created sequence fields
//then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, FALSE);
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
SetFormula( sMyFormula );
}
break;
@@ -1289,7 +1289,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case FIELD_PROP_SUBTYPE:
nTmp32 = lcl_APIToSubType(rAny);
if(nTmp32 >= 0)
- SetSubType(static_cast<USHORT>((GetSubType() & 0xff00) | nTmp32));
+ SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
break;
case FIELD_PROP_PAR3:
::GetString( rAny, aPText );
@@ -1309,7 +1309,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 6ffe675c760a..47c6a0e4be12 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -57,7 +57,7 @@
using namespace ::com::sun::star;
using namespace nsSwDocInfoSubType;
-USHORT lcl_GetLanguageOfFormat( USHORT nLng, ULONG nFmt,
+sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
const SvNumberFormatter& rFormatter )
{
if( nLng == LANGUAGE_NONE ) // wegen Bug #60010
@@ -85,7 +85,7 @@ SvStringsDtor* SwFieldType::pFldNames = 0;
DBG_NAME(SwFieldType)
- USHORT __FAR_DATA aTypeTab[] = {
+ sal_uInt16 __FAR_DATA aTypeTab[] = {
/* RES_DBFLD */ TYP_DBFLD,
/* RES_USERFLD */ TYP_USERFLD,
/* RES_FILENAMEFLD */ TYP_FILENAMEFLD,
@@ -131,7 +131,7 @@ DBG_NAME(SwFieldType)
-const String& SwFieldType::GetTypeStr(USHORT nTypeId)
+const String& SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
{
if( !pFldNames )
_GetFldName();
@@ -148,7 +148,7 @@ const String& SwFieldType::GetTypeStr(USHORT nTypeId)
jedes Dokument einmalig ist.
--------------------------------------------------*/
-SwFieldType::SwFieldType( USHORT nWhichId )
+SwFieldType::SwFieldType( sal_uInt16 nWhichId )
: SwModify(0),
nWhich( nWhichId )
{
@@ -169,13 +169,13 @@ const String& SwFieldType::GetName() const
return aEmptyStr;
}
-BOOL SwFieldType::QueryValue( uno::Any&, USHORT ) const
+sal_Bool SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const
{
- return FALSE;
+ return sal_False;
}
-BOOL SwFieldType::PutValue( const uno::Any& , USHORT )
+sal_Bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -184,9 +184,9 @@ BOOL SwFieldType::PutValue( const uno::Any& , USHORT )
Felder sind n-mal vorhanden, Feldtypen nur einmal
--------------------------------------------------------------------*/
-SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, USHORT nLng) :
+SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, sal_uInt16 nLng) :
nLang(nLng),
- bIsAutomaticLanguage(TRUE),
+ bIsAutomaticLanguage(sal_True),
nFormat(nFmt)
{
ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
@@ -202,7 +202,7 @@ SwField::~SwField()
--------------------------------------------------------------------*/
#ifdef DBG_UTIL
-USHORT SwField::Which() const
+sal_uInt16 SwField::Which() const
{
ASSERT(pType, "Kein Typ vorhanden");
return pType->Which();
@@ -213,20 +213,20 @@ USHORT SwField::Which() const
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwField::GetTypeId() const
+sal_uInt16 SwField::GetTypeId() const
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch( pType->Which() )
{
case RES_DATETIMEFLD:
if (GetSubType() & FIXEDFLD)
- nRet = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_FIXDATEFLD : TYP_FIXTIMEFLD);
+ nRet = static_cast<sal_uInt16>(GetSubType() & DATEFLD ? TYP_FIXDATEFLD : TYP_FIXTIMEFLD);
else
- nRet = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
+ nRet = static_cast<sal_uInt16>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
break;
case RES_GETEXPFLD:
- nRet = static_cast<USHORT>(nsSwGetSetExpType::GSE_FORMULA & GetSubType() ? TYP_FORMELFLD : TYP_GETFLD);
+ nRet = static_cast<sal_uInt16>(nsSwGetSetExpType::GSE_FORMULA & GetSubType() ? TYP_FORMELFLD : TYP_GETFLD);
break;
case RES_HIDDENTXTFLD:
@@ -265,10 +265,10 @@ USHORT SwField::GetTypeId() const
String SwField::GetFieldName() const
{
- USHORT nTypeId = GetTypeId();
+ sal_uInt16 nTypeId = GetTypeId();
if (RES_DATETIMEFLD == GetTyp()->Which())
{
- nTypeId = static_cast<USHORT>(
+ nTypeId = static_cast<sal_uInt16>(
((GetSubType() & DATEFLD) != 0) ? TYP_DATEFLD : TYP_TIMEFLD);
}
String sRet = SwFieldType::GetTypeStr( nTypeId );
@@ -305,39 +305,39 @@ void SwField::SetPar1(const String& )
void SwField::SetPar2(const String& )
{}
-USHORT SwField::GetSubType() const
+sal_uInt16 SwField::GetSubType() const
{
// ASSERT(0, "Sorry Not implemented");
return 0;
}
-void SwField::SetSubType(USHORT )
+void SwField::SetSubType(sal_uInt16 )
{
// ASSERT(0, "Sorry Not implemented");
}
-BOOL SwField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+sal_Bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL4:
{
- BOOL bFixed = !bIsAutomaticLanguage;
+ sal_Bool bFixed = !bIsAutomaticLanguage;
rVal.setValue(&bFixed, ::getCppuBooleanType());
}
break;
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
-BOOL SwField::PutValue( const uno::Any& rVal, USHORT nWhichId )
+sal_Bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
case FIELD_PROP_BOOL4:
{
- BOOL bFixed = FALSE;
+ sal_Bool bFixed = sal_False;
if(rVal >>= bFixed)
bIsAutomaticLanguage = !bFixed;
}
@@ -345,7 +345,7 @@ BOOL SwField::PutValue( const uno::Any& rVal, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
@@ -366,9 +366,9 @@ SwFieldType* SwField::ChgTyp( SwFieldType* pNewType )
}
// hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
-BOOL SwField::HasClickHdl() const
+sal_Bool SwField::HasClickHdl() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( pType->Which() )
{
case RES_INTERNETFLD:
@@ -377,7 +377,7 @@ BOOL SwField::HasClickHdl() const
case RES_MACROFLD:
case RES_INPUTFLD:
case RES_DROPDOWN :
- bRet = TRUE;
+ bRet = sal_True;
break;
case RES_SETEXPFLD:
@@ -387,7 +387,7 @@ BOOL SwField::HasClickHdl() const
return bRet;
}
-void SwField::SetLanguage(USHORT nLng)
+void SwField::SetLanguage(sal_uInt16 nLng)
{
nLang = nLng;
}
@@ -397,14 +397,14 @@ void SwField::ChangeFormat(sal_uInt32 n)
nFormat = n;
}
-BOOL SwField::IsFixed() const
+sal_Bool SwField::IsFixed() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( pType->Which() )
{
case RES_FIXDATEFLD:
case RES_FIXTIMEFLD:
- bRet = TRUE;
+ bRet = sal_True;
break;
case RES_DATETIMEFLD:
@@ -449,7 +449,7 @@ SwField * SwField::CopyField() const
Beschreibung: Numerierung expandieren
--------------------------------------------------------------------*/
-String FormatNumber(USHORT nNum, sal_uInt32 nFormat)
+String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat)
{
if(SVX_NUM_PAGEDESC == nFormat)
return String::CreateFromInt32( nNum );
@@ -465,10 +465,10 @@ String FormatNumber(USHORT nNum, sal_uInt32 nFormat)
Beschreibung: CTOR SwValueFieldType
--------------------------------------------------------------------*/
-SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId )
+SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId )
: SwFieldType(nWhichId),
pDoc(pDocPtr),
- bUseFormat(TRUE)
+ bUseFormat(sal_True)
{
}
@@ -484,7 +484,7 @@ SwValueFieldType::SwValueFieldType( const SwValueFieldType& rTyp )
--------------------------------------------------------------------*/
String SwValueFieldType::ExpandValue( const double& rVal,
- sal_uInt32 nFmt, USHORT nLng) const
+ sal_uInt32 nFmt, sal_uInt16 nLng) const
{
if (rVal >= DBL_MAX) // FehlerString fuer Calculator
return ViewShell::GetShellRes()->aCalc_Error;
@@ -494,7 +494,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
Color* pCol = 0;
// wegen Bug #60010
- USHORT nFmtLng = ::lcl_GetLanguageOfFormat( nLng, nFmt, *pFormatter );
+ sal_uInt16 nFmtLng = ::lcl_GetLanguageOfFormat( nLng, nFmt, *pFormatter );
if( nFmt < SV_COUNTRY_LANGUAGE_OFFSET && LANGUAGE_SYSTEM != nFmtLng )
{
@@ -553,7 +553,7 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
--------------------------------------------------------------------*/
void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
- USHORT nLng ) const
+ sal_uInt16 nLng ) const
{
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -571,7 +571,7 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
--------------------------------------------------------------------*/
SwValueField::SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt,
- USHORT nLng, const double fVal )
+ sal_uInt16 nLng, const double fVal )
: SwField(pFldType, nFmt, nLng),
fValue(fVal)
{
@@ -616,7 +616,7 @@ SwFieldType* SwValueField::ChgTyp( SwFieldType* pNewType )
sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt)
{
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
- USHORT nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
+ sal_uInt16 nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
if (pEntry && nLng != pEntry->GetLanguage())
{
@@ -647,7 +647,7 @@ sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt
Beschreibung: Sprache im Format anpassen
--------------------------------------------------------------------*/
-void SwValueField::SetLanguage( USHORT nLng )
+void SwValueField::SetLanguage( sal_uInt16 nLng )
{
if( IsAutomaticLanguage() &&
((SwValueFieldType *)GetTyp())->UseFormat() &&
@@ -655,7 +655,7 @@ void SwValueField::SetLanguage( USHORT nLng )
{
// wegen Bug #60010
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
- USHORT nFmtLng = ::lcl_GetLanguageOfFormat( nLng, GetFormat(),
+ sal_uInt16 nFmtLng = ::lcl_GetLanguageOfFormat( nLng, GetFormat(),
*pFormatter );
if( (GetFormat() >= SV_COUNTRY_LANGUAGE_OFFSET ||
@@ -735,7 +735,7 @@ void SwFormulaField::SetFormula(const String& rStr)
{
sFormula = rStr;
- ULONG nFmt(GetFormat());
+ sal_uLong nFmt(GetFormat());
if( nFmt && SAL_MAX_UINT32 != nFmt )
{
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index f932a1110820..253477f118e0 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -60,7 +60,7 @@ SwFieldType* SwDateTimeFieldType::Copy() const
Beschreibung: Datum/Zeit-Feld
--------------------------------------------------------------------*/
-SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, USHORT nSub, ULONG nFmt, USHORT nLng)
+SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub, sal_uLong nFmt, sal_uInt16 nLng)
: SwValueField(pInitType, nFmt, nLng, 0.0),
nSubType(nSub),
nOffset(0)
@@ -123,7 +123,7 @@ SwField* SwDateTimeField::Copy() const
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwDateTimeField::GetSubType() const
+sal_uInt16 SwDateTimeField::GetSubType() const
{
return nSubType;
}
@@ -132,7 +132,7 @@ USHORT SwDateTimeField::GetSubType() const
Beschreibung:
--------------------------------------------------------------------*/
-void SwDateTimeField::SetSubType(USHORT nType)
+void SwDateTimeField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -196,7 +196,7 @@ double SwDateTimeField::GetValue() const
Beschreibung:
--------------------------------------------------------------------*/
-Date SwDateTimeField::GetDate(BOOL bUseOffset) const
+Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
{
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
Date* pNullDate = pFormatter->GetNullDate();
@@ -215,7 +215,7 @@ Date SwDateTimeField::GetDate(BOOL bUseOffset) const
Beschreibung:
--------------------------------------------------------------------*/
-Time SwDateTimeField::GetTime(BOOL bUseOffset) const
+Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
{
double fDummy;
double fFract = modf(GetValue(), &fDummy);
@@ -229,19 +229,19 @@ Time SwDateTimeField::GetTime(BOOL bUseOffset) const
/*-----------------04.03.98 11:05-------------------
--------------------------------------------------*/
-BOOL SwDateTimeField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+sal_Bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = IsFixed();
+ sal_Bool bTmp = IsFixed();
rVal.setValue(&bTmp, ::getCppuBooleanType());
}
break;
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = IsDate();
+ sal_Bool bTmp = IsDate();
rVal.setValue(&bTmp, ::getCppuBooleanType());
}
break;
@@ -269,12 +269,12 @@ BOOL SwDateTimeField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
default:
return SwField::QueryValue(rVal, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------04.03.98 11:05-------------------
--------------------------------------------------*/
-BOOL SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
+sal_Bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
switch( nWhichId )
@@ -301,7 +301,7 @@ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
{
util::DateTime aDateTimeValue;
if(!(rVal >>= aDateTimeValue))
- return FALSE;
+ return sal_False;
DateTime aDateTime;
aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
aDateTime.SetSec(aDateTimeValue.Seconds);
@@ -316,6 +316,6 @@ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
default:
return SwField::PutValue(rVal, nWhichId);
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx
index 15b35c7999de..44e625edfccb 100644
--- a/sw/source/core/fields/flddropdown.cxx
+++ b/sw/source/core/fields/flddropdown.cxx
@@ -172,7 +172,7 @@ const String & SwDropDownField::GetToolTip() const
return aToolTip;
}
-BOOL SwDropDownField::SetSelectedItem(const String & rItem)
+sal_Bool SwDropDownField::SetSelectedItem(const String & rItem)
{
vector<String>::const_iterator aIt =
std::find(aValues.begin(), aValues.end(), rItem);
@@ -200,7 +200,7 @@ void SwDropDownField::SetToolTip(const String & rToolTip)
aToolTip = rToolTip;
}
-BOOL SwDropDownField::QueryValue(::uno::Any &rVal, USHORT nWhich) const
+sal_Bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const
{
nWhich &= ~CONVERT_TWIPS;
switch( nWhich )
@@ -228,8 +228,8 @@ BOOL SwDropDownField::QueryValue(::uno::Any &rVal, USHORT nWhich) const
return sal_True;
}
-BOOL SwDropDownField::PutValue(const uno::Any &rVal,
- USHORT nWhich)
+sal_Bool SwDropDownField::PutValue(const uno::Any &rVal,
+ sal_uInt16 nWhich)
{
switch( nWhich )
{
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index abf688cbbf5f..2777dc82e9b4 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -45,21 +45,21 @@
Beschreibung: Sortieren der Input-Eintraege
--------------------------------------------------------------------*/
-SwInputFieldList::SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst )
+SwInputFieldList::SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst )
: pSh(pShell)
{
// Hier die Liste aller Eingabefelder sortiert erstellen
pSrtLst = new _SetGetExpFlds();
const SwFldTypes& rFldTypes = *pSh->GetDoc()->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for(USHORT i=0; i < nSize; ++i)
+ for(sal_uInt16 i=0; i < nSize; ++i)
{
SwFieldType* pFldType = (SwFieldType*)rFldTypes[ i ];
- USHORT nType = pFldType->Which();
+ sal_uInt16 nType = pFldType->Which();
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType || RES_DROPDOWN == nType )
{
@@ -105,13 +105,13 @@ SwInputFieldList::~SwInputFieldList()
Beschreibung: Felder aus der Liste in sortierter Reihenfolge
--------------------------------------------------------------------*/
-USHORT SwInputFieldList::Count() const
+sal_uInt16 SwInputFieldList::Count() const
{
return pSrtLst->Count();
}
-SwField* SwInputFieldList::GetField(USHORT nId)
+SwField* SwInputFieldList::GetField(sal_uInt16 nId)
{
const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetFld();
ASSERT( pTxtFld, "kein TextFld" );
@@ -130,14 +130,14 @@ void SwInputFieldList::PushCrsr()
void SwInputFieldList::PopCrsr()
{
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
}
/*--------------------------------------------------------------------
Beschreibung: Position eines Feldes ansteuern
--------------------------------------------------------------------*/
-void SwInputFieldList::GotoFieldPos(USHORT nId)
+void SwInputFieldList::GotoFieldPos(sal_uInt16 nId)
{
pSh->StartAllAction();
(*pSrtLst)[ nId ]->GetPosOfContent( *pSh->GetCrsr()->GetPoint() );
@@ -147,17 +147,17 @@ void SwInputFieldList::GotoFieldPos(USHORT nId)
// vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
// damit sie geupdatet werden koennen. Returnt die Anzahl.
// (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
-USHORT SwInputFieldList::BuildSortLst()
+sal_uInt16 SwInputFieldList::BuildSortLst()
{
const SwFldTypes& rFldTypes = *pSh->GetDoc()->GetFldTypes();
- USHORT nSize = rFldTypes.Count();
+ sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
SwFieldType* pFldType = (SwFieldType*)rFldTypes[ i ];
- USHORT nType = pFldType->Which();
+ sal_uInt16 nType = pFldType->Which();
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType )
{
@@ -178,7 +178,7 @@ USHORT SwInputFieldList::BuildSortLst()
VoidPtr pTmp = (VoidPtr)pTxtFld;
// nicht in der TempListe vorhanden, also in die SortListe
// aufnehemen
- USHORT nFndPos = aTmpLst.GetPos( pTmp );
+ sal_uInt16 nFndPos = aTmpLst.GetPos( pTmp );
if( USHRT_MAX == nFndPos )
{
SwNodeIndex aIdx( rTxtNode );
@@ -207,7 +207,7 @@ void SwInputFieldList::RemoveUnselectedFlds()
FOREACHPAM_START(pSh)
{
- for (USHORT i = 0; i < Count();)
+ for (sal_uInt16 i = 0; i < Count();)
{
_SetGetExpFld* pFld = (*pSrtLst)[i];
SwPosition aPos(*PCURCRSR->GetPoint());
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index f77bcf1fd457..17926457ea3f 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -63,7 +63,7 @@ SwFieldType* SwMacroFieldType::Copy() const
SwMacroField::SwMacroField(SwMacroFieldType* pInitType,
const String& rLibAndName, const String& rTxt) :
- SwField(pInitType), aMacro(rLibAndName), aText(rTxt), bIsScriptURL(FALSE)
+ SwField(pInitType), aMacro(rLibAndName), aText(rTxt), bIsScriptURL(sal_False)
{
bIsScriptURL = isScriptURL(aMacro);
}
@@ -96,9 +96,9 @@ String SwMacroField::GetLibName() const
if (aMacro.Len())
{
- USHORT nPos = aMacro.Len();
+ sal_uInt16 nPos = aMacro.Len();
- for (USHORT i = 0; i < 3 && nPos > 0; i++)
+ for (sal_uInt16 i = 0; i < 3 && nPos > 0; i++)
while (aMacro.GetChar(--nPos) != '.' && nPos > 0) ;
return aMacro.Copy(0, nPos );
@@ -118,9 +118,9 @@ String SwMacroField::GetMacroName() const
}
else
{
- USHORT nPos = aMacro.Len();
+ sal_uInt16 nPos = aMacro.Len();
- for (USHORT i = 0; i < 3 && nPos > 0; i++)
+ for (sal_uInt16 i = 0; i < 3 && nPos > 0; i++)
while (aMacro.GetChar(--nPos) != '.' && nPos > 0) ;
return aMacro.Copy( ++nPos );
@@ -175,7 +175,7 @@ String SwMacroField::GetPar2() const
/*-----------------05.03.98 13:38-------------------
--------------------------------------------------*/
-BOOL SwMacroField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -194,12 +194,12 @@ BOOL SwMacroField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------05.03.98 13:38-------------------
--------------------------------------------------*/
-BOOL SwMacroField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -221,7 +221,7 @@ BOOL SwMacroField::PutValue( const uno::Any& rAny, USHORT nWhichId )
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
// create an internally used macro name from the library and macro name parts
@@ -237,7 +237,7 @@ void SwMacroField::CreateMacroString(
rMacro += rMacroName;
}
-BOOL SwMacroField::isScriptURL( const String& str )
+sal_Bool SwMacroField::isScriptURL( const String& str )
{
uno::Reference< lang::XMultiServiceFactory > xSMgr =
::comphelper::getProcessServiceFactory();
@@ -254,8 +254,8 @@ BOOL SwMacroField::isScriptURL( const String& str )
if ( xUrl.is() )
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 1af598eb4e46..ef64ce19420c 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::lang;
using ::rtl::OUString;
-extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
+extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
{
@@ -102,11 +102,11 @@ void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
}
-BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
- const SwTxtNode& rBehindNd, USHORT nSttPos )
+sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos,
+ const SwTxtNode& rBehindNd, sal_uInt16 nSttPos )
{
- const SwTxtFrm *pMyFrm = (SwTxtFrm*)rMyNd.GetFrm(0,0,FALSE),
- *pFrm = (SwTxtFrm*)rBehindNd.GetFrm(0,0,FALSE);
+ const SwTxtFrm *pMyFrm = (SwTxtFrm*)rMyNd.GetFrm(0,0,sal_False),
+ *pFrm = (SwTxtFrm*)rBehindNd.GetFrm(0,0,sal_False);
while( pFrm && !pFrm->IsInside( nSttPos ) )
pFrm = (SwTxtFrm*)pFrm->GetFollow();
@@ -114,15 +114,15 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
pMyFrm = (SwTxtFrm*)pMyFrm->GetFollow();
if( !pFrm || !pMyFrm || pFrm == pMyFrm )
- return FALSE;
+ return sal_False;
SvPtrarr aRefArr( 10, 10 ), aArr( 10, 10 );
::lcl_GetLayTree( pFrm, aRefArr );
::lcl_GetLayTree( pMyFrm, aArr );
- USHORT nRefCnt = aRefArr.Count() - 1, nCnt = aArr.Count() - 1;
- BOOL bVert = FALSE;
- BOOL bR2L = FALSE;
+ sal_uInt16 nRefCnt = aRefArr.Count() - 1, nCnt = aArr.Count() - 1;
+ sal_Bool bVert = sal_False;
+ sal_Bool bR2L = sal_False;
// solange bis ein Frame ungleich ist ?
while( nRefCnt && nCnt && aRefArr[ nRefCnt ] == aArr[ nCnt ] )
@@ -146,7 +146,7 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
const SwFrm* pFldFrm = (const SwFrm*)aArr[ nCnt ];
// unterschiedliche Frames, dann ueberpruefe deren Y-/X-Position
- BOOL bRefIsLower = FALSE;
+ sal_Bool bRefIsLower = sal_False;
if( ( FRM_COLUMN | FRM_CELL ) & pFldFrm->GetType() ||
( FRM_COLUMN | FRM_CELL ) & pRefFrm->GetType() )
{
@@ -211,8 +211,8 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
SwGetRefField::SwGetRefField( SwGetRefFieldType* pFldType,
- const String& rSetRef, USHORT nSubTyp,
- USHORT nSeqenceNo, ULONG nFmt )
+ const String& rSetRef, sal_uInt16 nSubTyp,
+ sal_uInt16 nSeqenceNo, sal_uLong nFmt )
: SwField( pFldType, nFmt ),
sSetRefName( rSetRef ),
nSubType( nSubTyp ),
@@ -229,12 +229,12 @@ String SwGetRefField::GetDescription() const
return SW_RES(STR_REFERENCE);
}
-USHORT SwGetRefField::GetSubType() const
+sal_uInt16 SwGetRefField::GetSubType() const
{
return nSubType;
}
-void SwGetRefField::SetSubType( USHORT n )
+void SwGetRefField::SetSubType( sal_uInt16 n )
{
nSubType = n;
}
@@ -255,7 +255,7 @@ bool SwGetRefField::IsRefToNumItemCrossRefBookmark() const
const SwTxtNode* SwGetRefField::GetReferencedTxtNode() const
{
SwDoc* pDoc = dynamic_cast<SwGetRefFieldType*>(GetTyp())->GetDoc();
- USHORT nDummy = USHRT_MAX;
+ sal_uInt16 nDummy = USHRT_MAX;
return SwGetRefFieldType::FindAnchor( pDoc, sSetRefName, nSubType, nSeqNo, &nDummy );
}
// <--
@@ -288,8 +288,8 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
sTxt.Erase();
SwDoc* pDoc = ((SwGetRefFieldType*)GetTyp())->GetDoc();
- USHORT nStt = USHRT_MAX;
- USHORT nEnd = USHRT_MAX;
+ sal_uInt16 nStt = USHRT_MAX;
+ sal_uInt16 nEnd = USHRT_MAX;
SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName,
nSubType, nSeqNo, &nStt, &nEnd );
if ( !pTxtNd )
@@ -356,7 +356,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_ENDNOTE:
{
// die Nummer oder den NumString besorgen
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pFtnIdx;
for( n = 0; n < nFtnCnt; ++n )
if( nSeqNo == (pFtnIdx = pDoc->GetFtnIdxs()[ n ])->GetSeqRefNo() )
@@ -392,14 +392,14 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_PAGE:
case REF_PAGE_PGDESC:
{
- const SwTxtFrm* pFrm = (SwTxtFrm*)pTxtNd->GetFrm(0,0,FALSE),
+ const SwTxtFrm* pFrm = (SwTxtFrm*)pTxtNd->GetFrm(0,0,sal_False),
*pSave = pFrm;
while( pFrm && !pFrm->IsInside( nStt ) )
pFrm = (SwTxtFrm*)pFrm->GetFollow();
if( pFrm || 0 != ( pFrm = pSave ))
{
- USHORT nPageNo = pFrm->GetVirtPageNum();
+ sal_uInt16 nPageNo = pFrm->GetVirtPageNum();
const SwPageFrm *pPage;
if( REF_PAGE_PGDESC == GetFormat() &&
0 != ( pPage = pFrm->FindPageFrm() ) &&
@@ -420,7 +420,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
SwChapterFieldType aFldTyp;
SwChapterField aFld( &aFldTyp, 0 );
aFld.SetLevel( MAXLEVEL - 1 );
- aFld.ChangeExpansion( pFrm, pTxtNd, TRUE );
+ aFld.ChangeExpansion( pFrm, pTxtNd, sal_True );
sTxt = aFld.GetNumber();
}
}
@@ -580,7 +580,7 @@ String SwGetRefField::GetPar2() const
/*-----------------06.03.98 13:34-------------------
--------------------------------------------------*/
-BOOL SwGetRefField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -649,12 +649,12 @@ BOOL SwGetRefField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 13:34-------------------
--------------------------------------------------*/
-BOOL SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -678,7 +678,7 @@ BOOL SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case ReferenceFieldPart::NUMBER_NO_CONTEXT: nPart = REF_NUMBER_NO_CONTEXT; break;
case ReferenceFieldPart::NUMBER_FULL_CONTEXT: nPart = REF_NUMBER_FULL_CONTEXT; break;
// <--
- default: return FALSE;
+ default: return sal_False;
}
SetFormat(nPart);
}
@@ -726,7 +726,7 @@ BOOL SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------------------11.01.2002 12:50------------------------------
@@ -741,7 +741,7 @@ void SwGetRefField::ConvertProgrammaticToUIName()
if(!pDoc->GetFldType(RES_SETEXPFLD, rPar1, false))
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- USHORT nResId = USHRT_MAX;
+ sal_uInt16 nResId = USHRT_MAX;
switch( nPoolId )
{
case RES_POOLCOLL_LABEL_ABB:
@@ -809,8 +809,8 @@ void SwGetRefFieldType::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
- USHORT nSubType, USHORT nSeqNo,
- USHORT* pStt, USHORT* pEnd )
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo,
+ sal_uInt16* pStt, sal_uInt16* pEnd )
{
ASSERT( pStt, "warum wird keine StartPos abgefragt?" );
@@ -894,7 +894,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
case REF_FOOTNOTE:
case REF_ENDNOTE:
{
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pFtnIdx;
for( n = 0; n < nFtnCnt; ++n )
if( nSeqNo == (pFtnIdx = pDoc->GetFtnIdxs()[ n ])->GetSeqRefNo() )
@@ -924,24 +924,24 @@ struct _RefIdsMap
String aName;
SvUShortsSort aIds, aDstIds, aIdsMap;
SvUShorts aMap;
- BOOL bInit;
+ sal_Bool bInit;
_RefIdsMap( const String& rName )
: aName( rName ), aIds( 16, 16 ), aIdsMap( 16, 16 ), aMap( 16, 16 ),
- bInit( FALSE )
+ bInit( sal_False )
{}
void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
- BOOL bField = TRUE );
+ sal_Bool bField = sal_True );
- BOOL IsInit() const { return bInit; }
+ sal_Bool IsInit() const { return bInit; }
};
SV_DECL_PTRARR_DEL( _RefIdsMaps, _RefIdsMap*, 5, 5 )
SV_IMPL_PTRARR( _RefIdsMaps, _RefIdsMap* )
void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
- BOOL bField )
+ sal_Bool bField )
{
if( !bInit )
@@ -973,19 +973,19 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
}
else
{
- USHORT n;
+ sal_uInt16 n;
for( n = rDestDoc.GetFtnIdxs().Count(); n; )
aIds.Insert( rDestDoc.GetFtnIdxs()[ --n ]->GetSeqRefNo() );
for( n = rDoc.GetFtnIdxs().Count(); n; )
aDstIds.Insert( rDoc.GetFtnIdxs()[ --n ]->GetSeqRefNo() );
}
- bInit = TRUE;
+ bInit = sal_True;
}
// dann teste mal, ob die Nummer schon vergeben ist
// oder ob eine neue bestimmt werden muss.
- USHORT nPos, nSeqNo = rFld.GetSeqNo();
+ sal_uInt16 nPos, nSeqNo = rFld.GetSeqNo();
if( aIds.Seek_Entry( nSeqNo ) && aDstIds.Seek_Entry( nSeqNo ))
{
// ist schon vergeben, also muss eine neue
@@ -994,7 +994,7 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
rFld.SetSeqNo( aMap[ nPos ] );
else
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aIds.Count(); ++n )
if( n != aIds[ n ] )
@@ -1024,7 +1024,7 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
else
{
SwTxtFtn* pFtnIdx;
- for( USHORT i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i )
+ for( sal_uInt16 i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i )
if( nSeqNo == (pFtnIdx = rDoc.GetFtnIdxs()[ i ])->GetSeqRefNo() )
{
pFtnIdx->SetSeqNo( n );
@@ -1063,7 +1063,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
case REF_SEQUENCEFLD:
{
_RefIdsMap* pMap = 0;
- for( USHORT n = aFldMap.Count(); n; )
+ for( sal_uInt16 n = aFldMap.Count(); n; )
if( aFldMap[ --n ]->aName == rRefFld.GetSetRefName() )
{
pMap = aFldMap[ n ];
@@ -1075,13 +1075,13 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
aFldMap.C40_INSERT( _RefIdsMap, pMap, aFldMap.Count() );
}
- pMap->Check( *pDoc, rDestDoc, rRefFld, TRUE );
+ pMap->Check( *pDoc, rDestDoc, rRefFld, sal_True );
}
break;
case REF_FOOTNOTE:
case REF_ENDNOTE:
- aFntMap.Check( *pDoc, rDestDoc, rRefFld, FALSE );
+ aFntMap.Check( *pDoc, rDestDoc, rRefFld, sal_False );
break;
}
}
diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx
index f9d8258edcec..22c6ba695a05 100644
--- a/sw/source/core/fields/scrptfld.cxx
+++ b/sw/source/core/fields/scrptfld.cxx
@@ -60,7 +60,7 @@ SwFieldType* SwScriptFieldType::Copy() const
SwScriptField::SwScriptField( SwScriptFieldType* pInitType,
const String& rType, const String& rCode,
- BOOL bURL )
+ sal_Bool bURL )
: SwField( pInitType ), sType( rType ), sCode( rCode ), bCodeURL( bURL )
{
}
@@ -111,7 +111,7 @@ String SwScriptField::GetPar2() const
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwScriptField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -127,12 +127,12 @@ BOOL SwScriptField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwScriptField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -148,6 +148,6 @@ BOOL SwScriptField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index abaacf8abc9e..5d6500ec3646 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -71,7 +71,7 @@ void SwTblField::CalcField( SwTblCalcPara& rCalcPara )
SwTblField::SwTblField( SwTblFieldType* pInitType, const String& rFormel,
- USHORT nType, ULONG nFmt )
+ sal_uInt16 nType, sal_uLong nFmt )
: SwValueField( pInitType, nFmt ), SwTableFormula( rFormel ),
sExpand( '0' ), nSubType(nType)
{
@@ -153,12 +153,12 @@ String SwTblField::Expand() const
return aStr;
}
-USHORT SwTblField::GetSubType() const
+sal_uInt16 SwTblField::GetSubType() const
{
return nSubType;
}
-void SwTblField::SetSubType(USHORT nType)
+void SwTblField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -190,14 +190,14 @@ void SwTblField::SetPar2(const String& rStr)
/*-----------------04.03.98 10:33-------------------
--------------------------------------------------*/
-BOOL SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch ( nWhichId )
{
case FIELD_PROP_PAR2:
{
- USHORT nOldSubType = nSubType;
+ sal_uInt16 nOldSubType = nSubType;
SwTblField* pThis = (SwTblField*)this;
pThis->nSubType |= nsSwExtendedSubType::SUB_CMD;
rAny <<= rtl::OUString( Expand() );
@@ -206,7 +206,7 @@ BOOL SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bFormula = 0 != (nsSwExtendedSubType::SUB_CMD & nSubType);
+ sal_Bool bFormula = 0 != (nsSwExtendedSubType::SUB_CMD & nSubType);
rAny.setValue(&bFormula, ::getBooleanCppuType());
}
break;
@@ -224,9 +224,9 @@ BOOL SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------04.03.98 10:33-------------------
--------------------------------------------------*/
-BOOL SwTblField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwTblField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
String sTmp;
switch ( nWhichId )
{
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index ccb10ca03ee1..bbc8719fd2f6 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -129,19 +129,19 @@ void SwUserField::SetSubType(sal_uInt16 nSub)
/*-----------------09.03.98 08:04-------------------
--------------------------------------------------*/
-BOOL SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ sal_Bool bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -156,7 +156,7 @@ BOOL SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------09.03.98 08:04-------------------
--------------------------------------------------*/
-sal_Bool SwUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -309,7 +309,7 @@ void SwUserFieldType::SetContent( const String& rStr, sal_uInt32 nFmt )
/*-----------------04.03.98 17:05-------------------
--------------------------------------------------*/
-BOOL SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -321,7 +321,7 @@ BOOL SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
+ sal_Bool bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
rAny.setValue(&bExpression, ::getBooleanCppuType());
}
break;
@@ -333,7 +333,7 @@ BOOL SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------04.03.98 17:05-------------------
--------------------------------------------------*/
-BOOL SwUserFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{