summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/attarray.cxx338
-rw-r--r--sc/source/core/data/attrib.cxx200
-rw-r--r--sc/source/core/data/bcaslot.cxx36
-rw-r--r--sc/source/core/data/cell.cxx312
-rw-r--r--sc/source/core/data/cell2.cxx262
-rw-r--r--sc/source/core/data/column.cxx258
-rw-r--r--sc/source/core/data/column2.cxx326
-rw-r--r--sc/source/core/data/column3.cxx164
-rw-r--r--sc/source/core/data/compressedarray.cxx22
-rw-r--r--sc/source/core/data/conditio.cxx280
-rw-r--r--sc/source/core/data/dbdocutl.cxx28
-rwxr-xr-x[-rw-r--r--]sc/source/core/data/dociter.cxx154
-rw-r--r--sc/source/core/data/docpool.cxx212
-rw-r--r--sc/source/core/data/documen2.cxx238
-rw-r--r--sc/source/core/data/documen3.cxx290
-rw-r--r--sc/source/core/data/documen4.cxx170
-rw-r--r--sc/source/core/data/documen5.cxx52
-rw-r--r--sc/source/core/data/documen6.cxx22
-rw-r--r--sc/source/core/data/documen7.cxx62
-rw-r--r--sc/source/core/data/documen8.cxx314
-rw-r--r--sc/source/core/data/documen9.cxx110
-rw-r--r--sc/source/core/data/document.cxx796
-rw-r--r--sc/source/core/data/dpcachetable.cxx4
-rw-r--r--sc/source/core/data/dpdimsave.cxx4
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dpglobal.cxx14
-rw-r--r--sc/source/core/data/dpgroup.cxx54
-rw-r--r--sc/source/core/data/dpobject.cxx254
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dpoutput.cxx188
-rw-r--r--sc/source/core/data/dpsave.cxx148
-rw-r--r--sc/source/core/data/dpsdbtab.cxx10
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dpshttab.cxx26
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dptabdat.cxx30
-rw-r--r--sc/source/core/data/dptablecache.cxx170
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dptabres.cxx414
-rw-r--r--sc/source/core/data/dptabsrc.cxx190
-rw-r--r--sc/source/core/data/drawpage.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx214
-rw-r--r--sc/source/core/data/fillinfo.cxx180
-rw-r--r--sc/source/core/data/global.cxx168
-rw-r--r--sc/source/core/data/global2.cxx98
-rw-r--r--sc/source/core/data/markarr.cxx62
-rw-r--r--sc/source/core/data/markdata.cxx106
-rw-r--r--sc/source/core/data/olinetab.cxx244
-rw-r--r--sc/source/core/data/pagepar.cxx14
-rw-r--r--sc/source/core/data/patattr.cxx286
-rw-r--r--sc/source/core/data/pivot2.cxx4
-rw-r--r--sc/source/core/data/poolhelp.cxx4
-rw-r--r--sc/source/core/data/postit.cxx18
-rw-r--r--sc/source/core/data/scdpoutputimpl.cxx26
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/scdpoutputimpl.hxx10
-rw-r--r--sc/source/core/data/sortparam.cxx68
-rw-r--r--sc/source/core/data/stlpool.cxx44
-rw-r--r--sc/source/core/data/stlsheet.cxx40
-rw-r--r--sc/source/core/data/table1.cxx310
-rw-r--r--sc/source/core/data/table2.cxx522
-rw-r--r--sc/source/core/data/table3.cxx270
-rw-r--r--sc/source/core/data/table4.cxx322
-rw-r--r--sc/source/core/data/table5.cxx76
-rw-r--r--sc/source/core/data/table6.cxx108
-rw-r--r--sc/source/core/data/validat.cxx146
-rw-r--r--sc/source/core/inc/addinlis.hxx2
-rw-r--r--sc/source/core/inc/adiasync.hxx18
-rw-r--r--sc/source/core/inc/bcaslot.hxx30
-rw-r--r--sc/source/core/inc/ddelink.hxx14
-rw-r--r--sc/source/core/inc/interpre.hxx214
-rw-r--r--sc/source/core/inc/jumpmatrix.hxx8
-rw-r--r--sc/source/core/inc/parclass.hxx12
-rw-r--r--sc/source/core/inc/refupdat.hxx4
-rw-r--r--sc/source/core/tool/addincol.cxx130
-rw-r--r--sc/source/core/tool/addinlis.cxx12
-rw-r--r--sc/source/core/tool/address.cxx98
-rw-r--r--sc/source/core/tool/adiasync.cxx22
-rw-r--r--sc/source/core/tool/appoptio.cxx32
-rw-r--r--sc/source/core/tool/autoform.cxx232
-rw-r--r--sc/source/core/tool/callform.cxx108
-rw-r--r--sc/source/core/tool/cellform.cxx12
-rw-r--r--sc/source/core/tool/chartarr.cxx56
-rw-r--r--sc/source/core/tool/charthelper.cxx40
-rw-r--r--sc/source/core/tool/chartlis.cxx94
-rw-r--r--sc/source/core/tool/chartpos.cxx108
-rw-r--r--sc/source/core/tool/chgtrack.cxx554
-rw-r--r--sc/source/core/tool/chgviset.cxx8
-rw-r--r--sc/source/core/tool/collect.cxx106
-rw-r--r--sc/source/core/tool/compiler.cxx444
-rw-r--r--sc/source/core/tool/consoli.cxx78
-rw-r--r--sc/source/core/tool/dbcolect.cxx114
-rw-r--r--sc/source/core/tool/ddelink.cxx28
-rw-r--r--sc/source/core/tool/detdata.cxx24
-rw-r--r--sc/source/core/tool/detfunc.cxx320
-rw-r--r--sc/source/core/tool/docoptio.cxx38
-rw-r--r--sc/source/core/tool/doubleref.cxx28
-rw-r--r--sc/source/core/tool/editutil.cxx168
-rw-r--r--sc/source/core/tool/filtopt.cxx2
-rw-r--r--sc/source/core/tool/hints.cxx10
-rw-r--r--sc/source/core/tool/inputopt.cxx22
-rw-r--r--sc/source/core/tool/interpr1.cxx460
-rw-r--r--sc/source/core/tool/interpr2.cxx276
-rw-r--r--sc/source/core/tool/interpr3.cxx172
-rwxr-xr-xsc/source/core/tool/interpr4.cxx408
-rw-r--r--sc/source/core/tool/interpr5.cxx128
-rw-r--r--sc/source/core/tool/navicfg.cxx6
-rw-r--r--sc/source/core/tool/optutil.cxx2
-rw-r--r--sc/source/core/tool/parclass.cxx20
-rw-r--r--sc/source/core/tool/printopt.cxx8
-rw-r--r--sc/source/core/tool/prnsave.cxx14
-rw-r--r--sc/source/core/tool/progress.cxx32
-rw-r--r--sc/source/core/tool/queryparam.cxx18
-rw-r--r--sc/source/core/tool/rangelst.cxx180
-rw-r--r--sc/source/core/tool/rangenam.cxx136
-rw-r--r--sc/source/core/tool/rangeseq.cxx66
-rw-r--r--sc/source/core/tool/rangeutl.cxx100
-rw-r--r--sc/source/core/tool/rechead.cxx24
-rw-r--r--sc/source/core/tool/refdata.cxx66
-rw-r--r--sc/source/core/tool/reffind.cxx18
-rw-r--r--sc/source/core/tool/refreshtimer.cxx6
-rw-r--r--sc/source/core/tool/reftokenhelper.cxx2
-rw-r--r--sc/source/core/tool/refupdat.cxx178
-rw-r--r--sc/source/core/tool/scmatrix.cxx48
-rw-r--r--sc/source/core/tool/subtotal.cxx18
-rw-r--r--sc/source/core/tool/token.cxx136
-rw-r--r--sc/source/core/tool/unitconv.cxx12
-rw-r--r--sc/source/core/tool/userlist.cxx54
-rw-r--r--sc/source/core/tool/viewopti.cxx18
-rw-r--r--sc/source/core/tool/zforauto.cxx12
124 files changed, 7651 insertions, 7651 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index f3443312bd4e..3c2569cc143f 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -104,7 +104,7 @@ ScAttrArray::~ScAttrArray()
void ScAttrArray::TestData() const
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
if (pData)
{
SCSIZE nPos;
@@ -131,7 +131,7 @@ void ScAttrArray::TestData() const
//------------------------------------------------------------------------
-void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
+void ScAttrArray::Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc )
{
if (pData)
{
@@ -144,7 +144,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
{
// ueberpruefen, ob Attributierung die Textbreite der Zelle aendert
pOldPattern = pData[i].pPattern;
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
pPattern->GetItemSet(), pOldPattern->GetItemSet() ) )
{
@@ -168,7 +168,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
delete[] pData;
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, sal_False);
if (bAlloc)
{
@@ -190,9 +190,9 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
}
-BOOL ScAttrArray::Concat(SCSIZE nPos)
+sal_Bool ScAttrArray::Concat(SCSIZE nPos)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (pData && (nPos < nCount))
{
if (nPos > 0)
@@ -206,7 +206,7 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
pData[nCount - 1].nRow = 0;
nCount--;
nPos--;
- bRet = TRUE;
+ bRet = sal_True;
}
}
if (nPos + 1 < nCount)
@@ -219,7 +219,7 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
pData[nCount - 1].pPattern = NULL;
pData[nCount - 1].nRow = 0;
nCount--;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -228,14 +228,14 @@ BOOL ScAttrArray::Concat(SCSIZE nPos)
//------------------------------------------------------------------------
-BOOL ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
+sal_Bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
{
long nLo = 0;
long nHi = static_cast<long>(nCount) - 1;
long nStartRow = 0;
long nEndRow = 0;
long i = 0;
- BOOL bFound = (nCount == 1);
+ sal_Bool bFound = (nCount == 1);
if (pData)
{
while ( !bFound && nLo <= nHi )
@@ -252,11 +252,11 @@ BOOL ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
if (nStartRow >= (long) nRow)
nHi = --i;
else
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
- bFound = FALSE;
+ bFound = sal_False;
if (bFound)
nIndex=(SCSIZE)i;
@@ -294,13 +294,13 @@ const ScPatternAttr* ScAttrArray::GetPatternRange( SCROW& rStartRow,
//------------------------------------------------------------------------
-void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bPutToPool )
+void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, sal_Bool bPutToPool )
{
SetPatternArea( nRow, nRow, pPattern, bPutToPool );
}
-void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, BOOL bPutToPool )
+void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, sal_Bool bPutToPool )
{
if (ValidRow(nStartRow) && ValidRow(nEndRow))
{
@@ -350,7 +350,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
const SfxItemSet& rNewSet = pPattern->GetItemSet();
const SfxItemSet& rOldSet = pData[nx].pPattern->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
@@ -375,8 +375,8 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
// continue modifying data array
SCSIZE nInsert; // insert position (MAXROWCOUNT := no insert)
- BOOL bCombined = FALSE;
- BOOL bSplit = FALSE;
+ sal_Bool bCombined = sal_False;
+ sal_Bool bSplit = sal_False;
if ( nStartRow > 0 )
{
nInsert = MAXROWCOUNT;
@@ -386,7 +386,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
{ // may be a split or a simple insert or just a shrink,
// row adjustment is done further down
if ( pData[ni].nRow > nEndRow )
- bSplit = TRUE;
+ bSplit = sal_True;
ni++;
nInsert = ni;
}
@@ -397,7 +397,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
{ // combine
pData[ni-1].nRow = nEndRow;
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
}
else
@@ -421,7 +421,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
pData[ni-1].nRow = nStartRow - 1; // shrink
}
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
else if ( ni > 0 && ni == nInsert )
pData[ni-1].nRow = nStartRow - 1; // shrink
@@ -474,7 +474,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
}
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, sal_False);
}
}
// InfoBox(0, String(nCount) + String(" Eintraege") ).Execute();
@@ -519,7 +519,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
{
if (nY1 < nStartRow) nY1=nStartRow;
if (nY2 > nEndRow) nY2=nEndRow;
- SetPatternArea( nY1, nY2, pNewPattern, TRUE );
+ SetPatternArea( nY1, nY2, pNewPattern, sal_True );
Search( nStart, nPos );
}
else
@@ -530,7 +530,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
@@ -555,7 +555,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
while ((nStart <= nEndRow) && (nPos < nCount));
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, sal_False);
}
#ifdef DBG_UTIL
@@ -582,7 +582,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
}
void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -602,11 +602,11 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
const SfxPoolItem* pBoxItem = 0;
- SfxItemState eState = rOldSet.GetItemState( ATTR_BORDER, TRUE, &pBoxItem );
+ SfxItemState eState = rOldSet.GetItemState( ATTR_BORDER, sal_True, &pBoxItem );
const SfxPoolItem* pTLBRItem = 0;
- SfxItemState eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pTLBRItem );
+ SfxItemState eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pTLBRItem );
const SfxPoolItem* pBLTRItem = 0;
- SfxItemState eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pBLTRItem );
+ SfxItemState eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pBLTRItem );
if ( (SFX_ITEM_SET == eState) || (SFX_ITEM_SET == eTLBRState) || (SFX_ITEM_SET == eBLTRState) )
{
@@ -677,7 +677,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
{
if (nY1 < nStartRow) nY1=nStartRow;
if (nY2 > nEndRow) nY2=nEndRow;
- SetPatternArea( nY1, nY2, pNewPattern, TRUE );
+ SetPatternArea( nY1, nY2, pNewPattern, sal_True );
Search( nStart, nPos );
}
else
@@ -733,7 +733,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
do
{
const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
- const ScPatternAttr* pNewPattern = (const ScPatternAttr*) &pCache->ApplyTo( *pOldPattern, TRUE );
+ const ScPatternAttr* pNewPattern = (const ScPatternAttr*) &pCache->ApplyTo( *pOldPattern, sal_True );
ScDocumentPool::CheckRef( *pOldPattern );
ScDocumentPool::CheckRef( *pNewPattern );
if (pNewPattern != pOldPattern)
@@ -756,7 +756,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
@@ -797,7 +797,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
while (nStart <= nEndRow);
if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, FALSE);
+ pDocument->SetStreamValid(nTab, sal_False);
}
#ifdef DBG_UTIL
@@ -810,14 +810,14 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
{
const SfxPoolItem* pNewItem;
const SfxPoolItem* pOldItem;
- for (USHORT nId=ATTR_PATTERN_START; nId<=ATTR_PATTERN_END; nId++)
+ for (sal_uInt16 nId=ATTR_PATTERN_START; nId<=ATTR_PATTERN_END; nId++)
{
// pMergeSet hat keinen Parent
- SfxItemState eOldState = rMergeSet.GetItemState( nId, FALSE, &pOldItem );
+ SfxItemState eOldState = rMergeSet.GetItemState( nId, sal_False, &pOldItem );
if ( eOldState == SFX_ITEM_DEFAULT ) // Default
{
- SfxItemState eNewState = rSource.GetItemState( nId, TRUE, &pNewItem );
+ SfxItemState eNewState = rSource.GetItemState( nId, sal_True, &pNewItem );
if ( eNewState == SFX_ITEM_SET )
{
if ( *pNewItem != rMergeSet.GetPool()->GetDefaultItem(nId) )
@@ -826,7 +826,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
}
else if ( eOldState == SFX_ITEM_SET ) // Item gesetzt
{
- SfxItemState eNewState = rSource.GetItemState( nId, TRUE, &pNewItem );
+ SfxItemState eNewState = rSource.GetItemState( nId, sal_True, &pNewItem );
if ( eNewState == SFX_ITEM_SET )
{
if ( pNewItem != pOldItem ) // beide gepuhlt
@@ -844,7 +844,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
- ScMergePatternState& rState, BOOL bDeep ) const
+ ScMergePatternState& rState, sal_Bool bDeep ) const
{
if (ValidRow(nStartRow) && ValidRow(nEndRow))
{
@@ -866,13 +866,13 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
const SfxItemSet& rThisSet = pPattern->GetItemSet();
if (rState.pItemSet)
{
- // (*ppSet)->MergeValues( rThisSet, FALSE );
+ // (*ppSet)->MergeValues( rThisSet, sal_False );
// geht nicht, weil die Vorlagen nicht beruecksichtigt werden
if (bDeep)
lcl_MergeDeep( *rState.pItemSet, rThisSet );
else
- rState.pItemSet->MergeValues( rThisSet, FALSE );
+ rState.pItemSet->MergeValues( rThisSet, sal_False );
}
else
{
@@ -896,41 +896,41 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
// Umrandung zusammenbauen
-BOOL lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
- BYTE& rModified, const SvxBorderLine*& rpNew )
+sal_Bool lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
+ sal_uInt8& rModified, const SvxBorderLine*& rpNew )
{
if (rModified == SC_LINE_DONTCARE)
- return FALSE; // weiter geht's nicht
+ return sal_False; // weiter geht's nicht
if (rModified == SC_LINE_EMPTY)
{
rModified = SC_LINE_SET;
rpNew = pNewLine;
- return TRUE; // zum ersten mal gesetzt
+ return sal_True; // zum ersten mal gesetzt
}
if (pOldLine == pNewLine)
{
rpNew = pOldLine;
- return FALSE;
+ return sal_False;
}
if (pOldLine && pNewLine)
if (*pOldLine == *pNewLine)
{
rpNew = pOldLine;
- return FALSE;
+ return sal_False;
}
rModified = SC_LINE_DONTCARE;
rpNew = NULL;
- return TRUE; // andere Linie -> dontcare
+ return sal_True; // andere Linie -> dontcare
}
void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags, const ScPatternAttr* pPattern,
- BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom )
+ sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom )
{
// rechten/unteren Rahmen setzen, wenn Zelle bis zum Ende zusammengefasst:
const ScMergeAttr& rMerge = (const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE);
@@ -994,19 +994,19 @@ void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags,
- SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ) const
+ SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ) const
{
const ScPatternAttr* pPattern;
if (nStartRow == nEndRow)
{
pPattern = GetPattern( nStartRow );
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, TRUE, 0 );
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_True, 0 );
}
else
{
pPattern = GetPattern( nStartRow );
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, TRUE,
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_True,
nEndRow-nStartRow );
SCSIZE nStartIndex;
@@ -1016,13 +1016,13 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
for (SCSIZE i=nStartIndex; i<=nEndIndex; i++)
{
pPattern = (ScPatternAttr*) pData[i].pPattern;
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, FALSE,
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_False,
nEndRow - Min( pData[i].nRow, (SCROW)(nEndRow-1) ) );
// nDistBottom hier immer > 0
}
pPattern = GetPattern( nEndRow );
- lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, FALSE, 0 );
+ lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_False, 0 );
}
}
@@ -1033,10 +1033,10 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
// ApplyFrame - auf einen Eintrag im Array
-BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
+sal_Bool ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
const SvxBoxInfoItem* pBoxInfoItem,
SCROW nStartRow, SCROW nEndRow,
- BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom )
+ sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom )
{
DBG_ASSERT( pBoxItem && pBoxInfoItem, "Linienattribute fehlen!" );
@@ -1069,7 +1069,7 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
if (aNewFrame == *pOldFrame)
{
// nothing to do
- return FALSE;
+ return sal_False;
}
else
{
@@ -1078,22 +1078,22 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
/* ScPatternAttr* pNewPattern = (ScPatternAttr*) pPattern->Clone();
pNewPattern->GetItemSet().Put( aNewFrame );
- SetPatternArea( nStartRow, nEndRow, pNewPattern, TRUE );
+ SetPatternArea( nStartRow, nEndRow, pNewPattern, sal_True );
*/
- return TRUE;
+ return sal_True;
}
}
void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight )
+ SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight )
{
if (nStartRow == nEndRow)
- ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, TRUE, 0 );
+ ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, sal_True, 0 );
else
{
ApplyFrame( pLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
- TRUE, nEndRow-nStartRow );
+ sal_True, nEndRow-nStartRow );
if ( nEndRow > nStartRow+1 ) // innerer Teil vorhanden?
{
@@ -1106,8 +1106,8 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
for (SCSIZE i=nStartIndex; i<=nEndIndex;)
{
nTmpEnd = Min( (SCROW)(nEndRow-1), (SCROW)(pData[i].nRow) );
- BOOL bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
- bLeft, nDistRight, FALSE, nEndRow-nTmpEnd );
+ sal_Bool bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
+ bLeft, nDistRight, sal_False, nEndRow-nTmpEnd );
nTmpStart = nTmpEnd+1;
if (bChanged)
{
@@ -1119,7 +1119,7 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
}
}
- ApplyFrame( pLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight, FALSE, 0 );
+ ApplyFrame( pLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight, sal_False, 0 );
}
}
@@ -1130,8 +1130,8 @@ long lcl_LineSize( const SvxBorderLine& rLine )
// doppelte Linie -> halber Abstand + eine Linie (je min. 20)
long nTotal = 0;
- USHORT nWidth = Max( rLine.GetOutWidth(), rLine.GetInWidth() );
- USHORT nDist = rLine.GetDistance();
+ sal_uInt16 nWidth = Max( rLine.GetOutWidth(), rLine.GetInWidth() );
+ sal_uInt16 nDist = rLine.GetDistance();
if (nDist)
{
DBG_ASSERT( rLine.GetOutWidth() && rLine.GetInWidth(),
@@ -1151,14 +1151,14 @@ long lcl_LineSize( const SvxBorderLine& rLine )
}
-BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
- BOOL bLeft, BOOL bRight ) const
+sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+ sal_Bool bLeft, sal_Bool bRight ) const
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
Search( nRow1, nStartIndex );
Search( nRow2, nEndIndex );
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
const SvxBoxItem* pItem = 0;
const SvxBorderLine* pLine = 0;
@@ -1173,7 +1173,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Top() )
rSizes.Top() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
// unten
@@ -1186,7 +1186,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Bottom() )
rSizes.Bottom() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
if ( bLeft || bRight )
@@ -1204,7 +1204,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Left() )
rSizes.Left() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -1218,7 +1218,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
nCmp = lcl_LineSize(*pLine);
if ( nCmp > rSizes.Right() )
rSizes.Right() = nCmp;
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1228,7 +1228,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
// Testen, ob Bereich bestimmtes Attribut enthaelt
-bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
+bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
@@ -1291,7 +1291,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
(const SfxInt32Item*) &pPattern->GetItem( ATTR_ROTATE_VALUE );
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
// (see ScPatternAttr::GetCellOrientation)
- INT32 nAngle = pRotate->GetValue();
+ sal_Int32 nAngle = pRotate->GetValue();
if ( nAngle != 0 && nAngle != 9000 && nAngle != 27000 )
bFound = true;
}
@@ -1344,9 +1344,9 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
// Bereich um evtl. enthaltene Zusammenfassungen erweitern
// und evtl. MergeFlag anpassen (bRefresh)
-BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
+sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL& rPaintCol, SCROW& rPaintRow,
- BOOL bRefresh, BOOL bAttrs )
+ sal_Bool bRefresh, sal_Bool bAttrs )
{
const ScPatternAttr* pPattern;
const ScMergeAttr* pItem;
@@ -1354,7 +1354,7 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCSIZE nEndIndex;
Search( nStartRow, nStartIndex );
Search( nEndRow, nEndIndex );
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (SCSIZE i=nStartIndex; i<=nEndIndex; i++)
{
@@ -1371,7 +1371,7 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
rPaintCol = nMergeEndCol;
if (nMergeEndRow > rPaintRow && nMergeEndRow <= MAXROW)
rPaintRow = nMergeEndRow;
- bFound = TRUE;
+ bFound = sal_True;
if (bAttrs)
{
@@ -1409,9 +1409,9 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
}
-BOOL ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
+sal_Bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
const ScPatternAttr* pPattern;
const ScMergeAttr* pItem;
SCSIZE nIndex;
@@ -1473,12 +1473,12 @@ BOOL ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
void ScAttrArray::DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow)
{
- SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), TRUE );
+ SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), sal_True );
}
void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
- const ScPatternAttr* pWantedPattern, BOOL bDefault )
+ const ScPatternAttr* pWantedPattern, sal_Bool bDefault )
{
const ScPatternAttr* pOldPattern;
const ScMergeFlagAttr* pItem;
@@ -1486,7 +1486,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
- BOOL bFirstUse = TRUE;
+ sal_Bool bFirstUse = sal_True;
Search( nStartRow, nIndex );
nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1509,7 +1509,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
ScPatternAttr* pNewPattern = new ScPatternAttr( *pWantedPattern );
SfxItemSet* pSet = &pNewPattern->GetItemSet();
pSet->Put( *pItem );
- SetPatternArea( nThisRow, nAttrRow, pNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, pNewPattern, sal_True );
delete pNewPattern;
}
else
@@ -1517,7 +1517,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
if ( !bDefault )
{
if (bFirstUse)
- bFirstUse = FALSE;
+ bFirstUse = sal_False;
else
pDocument->GetPool()->Put( *pWantedPattern ); // im Pool ist es schon!
}
@@ -1533,15 +1533,15 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
}
-BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
+sal_Bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
{
const ScPatternAttr* pOldPattern;
- INT16 nOldValue;
+ sal_Int16 nOldValue;
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
Search( nStartRow, nIndex );
nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1557,9 +1557,9 @@ BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue | nFlags ) );
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
- bChanged = TRUE;
+ bChanged = sal_True;
}
++nIndex;
@@ -1570,15 +1570,15 @@ BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
}
-BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
+sal_Bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
{
const ScPatternAttr* pOldPattern;
- INT16 nOldValue;
+ sal_Int16 nOldValue;
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
Search( nStartRow, nIndex );
nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1594,9 +1594,9 @@ BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue & ~nFlags ) );
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
- bChanged = TRUE;
+ bChanged = sal_True;
}
++nIndex;
@@ -1607,7 +1607,7 @@ BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
}
-void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich )
+void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
{
const ScPatternAttr* pOldPattern;
@@ -1629,7 +1629,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhi
nRow = pData[nIndex].nRow;
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
}
@@ -1639,7 +1639,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhi
}
-void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement )
+void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrement )
{
SCSIZE nIndex;
Search( nStartRow, nIndex );
@@ -1652,10 +1652,10 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
const SfxPoolItem* pItem;
- BOOL bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, FALSE, &pItem ) != SFX_ITEM_SET
+ sal_Bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, sal_False, &pItem ) != SFX_ITEM_SET
|| ((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_LEFT );
- USHORT nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue();
- USHORT nNewValue = nOldValue;
+ sal_uInt16 nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue();
+ sal_uInt16 nNewValue = nOldValue;
if ( bIncrement )
{
if ( nNewValue < SC_MAX_INDENT )
@@ -1684,7 +1684,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
if ( bNeedJust )
aNewPattern.GetItemSet().Put(
SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
- SetPatternArea( nThisStart, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisStart, nAttrRow, &aNewPattern, sal_True );
nThisStart = nThisEnd + 1;
Search( nThisStart, nIndex ); // Daten wurden veraendert !!!
@@ -1698,7 +1698,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
}
-SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, BOOL bUp ) const
+SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, sal_Bool bUp ) const
{
long nRet = nRow;
if (VALIDROW(nRow))
@@ -1737,7 +1737,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
if (pData[nPos].pPattern->GetStyleSheet() == pStyleSheet)
{
// for (SCROW nRow = nStart; nRow <= nEnd; nRow++)
-// pUsed[nRow] = TRUE;
+// pUsed[nRow] = sal_True;
rUsedRows.setTrue(nStart, nEnd);
@@ -1767,10 +1767,10 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
}
-BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
- BOOL bGatherAllStyles ) const
+sal_Bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
+ sal_Bool bGatherAllStyles ) const
{
- BOOL bIsUsed = FALSE;
+ sal_Bool bIsUsed = sal_False;
SCSIZE nPos = 0;
while ( nPos < nCount )
@@ -1782,8 +1782,8 @@ BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
if ( pStyle == &rStyle )
{
if ( !bGatherAllStyles )
- return TRUE;
- bIsUsed = TRUE;
+ return sal_True;
+ bIsUsed = sal_True;
}
}
nPos++;
@@ -1793,17 +1793,17 @@ BOOL ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
}
-BOOL ScAttrArray::IsEmpty() const
+sal_Bool ScAttrArray::IsEmpty() const
{
if (nCount == 1)
{
if ( pData[0].pPattern != pDocument->GetDefPattern() )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
@@ -1823,7 +1823,7 @@ BOOL ScAttrArray::IsEmpty() const
//UNUSED2008-05 }
//UNUSED2008-05
//UNUSED2008-05
-//UNUSED2008-05 SCROW ScAttrArray::GetLastEntryPos( BOOL bIncludeBottom ) const
+//UNUSED2008-05 SCROW ScAttrArray::GetLastEntryPos( sal_Bool bIncludeBottom ) const
//UNUSED2008-05 {
//UNUSED2008-05 DBG_ASSERT( nCount, "nCount == 0" );
//UNUSED2008-05
@@ -1842,11 +1842,11 @@ BOOL ScAttrArray::IsEmpty() const
//UNUSED2008-05 }
-BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
+sal_Bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
{
DBG_ASSERT( nCount, "nCount == 0" );
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCSIZE nStart = 0;
// Skip first entry if more than 1 row.
@@ -1863,7 +1863,7 @@ BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
if ( pData[nStart].pPattern->IsVisible() )
{
rFirstRow = nStart ? ( pData[nStart-1].nRow + 1 ) : 0;
- bFound = TRUE;
+ bFound = sal_True;
}
else
++nStart;
@@ -1877,7 +1877,7 @@ BOOL ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
const SCROW SC_VISATTR_STOP = 84;
-BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
+sal_Bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
{
// #i30830# changed behavior:
// ignore all attributes starting with the first run of SC_VISATTR_STOP equal rows
@@ -1886,10 +1886,10 @@ BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
if ( nLastData == MAXROW )
{
rLastRow = MAXROW; // can't look for attributes below MAXROW
- return TRUE;
+ return sal_True;
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
// loop backwards from the end instead of using Search, assuming that
// there usually aren't many attributes below the last cell
@@ -1910,12 +1910,12 @@ BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
SCROW nAttrSize = pData[nEndPos].nRow + 1 - nAttrStartRow;
if ( nAttrSize >= SC_VISATTR_STOP )
{
- bFound = FALSE; // ignore this range and below
+ bFound = sal_False; // ignore this range and below
}
else if ( !bFound && pData[nEndPos].pPattern->IsVisible() )
{
rLastRow = pData[nEndPos].nRow;
- bFound = TRUE;
+ bFound = sal_True;
}
nPos = nStartPos; // look further from the top of the range
@@ -1925,16 +1925,16 @@ BOOL ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
}
-BOOL ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
{
SCSIZE nIndex;
Search( nStartRow, nIndex );
SCROW nThisStart = nStartRow;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while ( nIndex < nCount && nThisStart <= nEndRow && !bFound )
{
if ( pData[nIndex].pPattern->IsVisible() )
- bFound = TRUE;
+ bFound = sal_True;
nThisStart = pData[nIndex].nRow + 1;
++nIndex;
@@ -1944,10 +1944,10 @@ BOOL ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
}
-BOOL ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
+sal_Bool ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
SCROW nStartRow, SCROW nEndRow ) const
{
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCSIZE nThisPos = 0;
SCSIZE nOtherPos = 0;
if ( nStartRow > 0 )
@@ -1981,11 +1981,11 @@ BOOL ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
}
-BOOL ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
{
//! mit IsVisibleEqual zusammenfassen?
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCSIZE nThisPos = 0;
SCSIZE nOtherPos = 0;
if ( nStartRow > 0 )
@@ -2018,12 +2018,12 @@ BOOL ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW
}
-BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
+sal_Bool ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
{
// horizontal zusammengefasste duerfen nicht herausgeschoben werden
// (ob die ganze Zusammenfassung betroffen ist, ist hier nicht zu erkennen)
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if (!IsEmpty())
{
SCSIZE nIndex = 0;
@@ -2035,7 +2035,7 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
if ( ((const ScMergeFlagAttr&)pData[nIndex].pPattern->
GetItem(ATTR_MERGE_FLAG)).IsHorOverlapped() )
{
- bTest = FALSE; // darf nicht herausgeschoben werden
+ bTest = sal_False; // darf nicht herausgeschoben werden
break;
}
if ( pData[nIndex].nRow >= nEndRow ) // Ende des Bereichs
@@ -2046,7 +2046,7 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
}
-BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const
+sal_Bool ScAttrArray::TestInsertRow( SCSIZE nSize ) const
{
// wenn die erste herausgeschobene Zeile vertikal ueberlappt ist,
// wuerde eine kaputte Zusammenfassung uebrigbleiben
@@ -2061,10 +2061,10 @@ BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const
if ( ((const ScMergeFlagAttr&)pData[nFirstLost].pPattern->
GetItem(ATTR_MERGE_FLAG)).IsVerOverlapped() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -2080,7 +2080,7 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
// ein gesetztes ScMergeAttr darf nicht ausgedehnt werden
// (darum hinterher wieder loeschen)
- BOOL bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
+ sal_Bool bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
SCSIZE nRemove = 0;
SCSIZE i;
@@ -2122,7 +2122,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
{
if (pData)
{
- BOOL bFirst=TRUE;
+ sal_Bool bFirst=sal_True;
SCSIZE nStartIndex = 0;
SCSIZE nEndIndex = 0;
SCSIZE i;
@@ -2133,7 +2133,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if (bFirst)
{
nStartIndex = i;
- bFirst = FALSE;
+ bFirst = sal_False;
}
nEndIndex = i;
}
@@ -2216,14 +2216,14 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
ScPatternAttr aNewPattern(*pOldPattern);
SfxItemSet& rSet = aNewPattern.GetItemSet();
- for (USHORT nId = ATTR_PATTERN_START; nId <= ATTR_PATTERN_END; nId++)
+ for (sal_uInt16 nId = ATTR_PATTERN_START; nId <= ATTR_PATTERN_END; nId++)
if (nId != ATTR_MERGE && nId != ATTR_MERGE_FLAG)
rSet.ClearItem(nId);
if ( aNewPattern == *pDefPattern )
- SetPatternArea( nThisRow, nAttrRow, pDefPattern, FALSE );
+ SetPatternArea( nThisRow, nAttrRow, pDefPattern, sal_False );
else
- SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+ SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
}
@@ -2240,11 +2240,11 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
SCROW nStart = nStartRow;
for (SCSIZE i = 0; i < nCount; i++)
{
- if ((pData[i].nRow >= nStartRow) && ((i==0) ? TRUE : pData[i-1].nRow < nEndRow))
+ if ((pData[i].nRow >= nStartRow) && ((i==0) ? sal_True : pData[i-1].nRow < nEndRow))
{
- // Kopieren (bPutToPool=TRUE)
+ // Kopieren (bPutToPool=sal_True)
rAttrArray.SetPatternArea( nStart, Min( (SCROW)pData[i].nRow, (SCROW)nEndRow ),
- pData[i].pPattern, TRUE );
+ pData[i].pPattern, sal_True );
}
nStart = Max( (SCROW)nStart, (SCROW)(pData[i].nRow + 1) );
}
@@ -2255,7 +2255,7 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
// Kopieren zwischen Dokumenten (Clipboard)
void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray,
- INT16 nStripFlags )
+ sal_Int16 nStripFlags )
{
nStartRow -= nDy; // Source
nEndRow -= nDy;
@@ -2265,7 +2265,7 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
ScDocumentPool* pSourceDocPool = pDocument->GetPool();
ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
- BOOL bSamePool = (pSourceDocPool==pDestDocPool);
+ sal_Bool bSamePool = (pSourceDocPool==pDestDocPool);
for (SCSIZE i = 0; (i < nCount) && (nDestStart <= nDestEnd); i++)
{
@@ -2284,7 +2284,7 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
else if ( nStripFlags )
{
ScPatternAttr* pTmpPattern = new ScPatternAttr( *pOldPattern );
- INT16 nNewFlags = 0;
+ sal_Int16 nNewFlags = 0;
if ( nStripFlags != SC_MF_ALL )
nNewFlags = ((const ScMergeFlagAttr&)pTmpPattern->GetItem(ATTR_MERGE_FLAG)).
GetValue() & ~nStripFlags;
@@ -2337,7 +2337,7 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
ScDocumentPool* pSourceDocPool = pDocument->GetPool();
ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
- BOOL bSamePool = (pSourceDocPool==pDestDocPool);
+ sal_Bool bSamePool = (pSourceDocPool==pDestDocPool);
for (SCSIZE i = 0; (i < nCount) && (nDestStart <= nDestEnd); i++)
{
@@ -2352,7 +2352,7 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
pNewPattern = pOldPattern->PutInPool( rAttrArray.pDocument, pDocument );
rAttrArray.SetPatternAreaSafe(nDestStart,
- Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, FALSE);
+ Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, sal_False);
}
// when pasting from clipboard and skipping filtered rows, the adjusted end position
@@ -2363,9 +2363,9 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
- BOOL bUp, ScMarkArray* pMarkArray )
+ sal_Bool bUp, ScMarkArray* pMarkArray )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (pMarkArray)
{
@@ -2387,10 +2387,10 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
nRow = pMarkArray->GetNextMarked( nRow, bUp );
SCROW nStart = nIndex ? pData[nIndex-1].nRow+1 : 0;
if (nRow >= nStart && nRow <= pData[nIndex].nRow)
- bFound = TRUE;
+ bFound = sal_True;
}
else
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
@@ -2425,8 +2425,8 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
}
-BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
- const ScStyleSheet* pSearchStyle, BOOL bUp, ScMarkArray* pMarkArray )
+sal_Bool ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
+ const ScStyleSheet* pSearchStyle, sal_Bool bUp, ScMarkArray* pMarkArray )
{
SCsROW nStartRow = SearchStyle( rRow, pSearchStyle, bUp, pMarkArray );
if (VALIDROW(nStartRow))
@@ -2443,7 +2443,7 @@ BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
rEndRow = 0;
if (pMarkArray)
{
- SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, TRUE );
+ SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, sal_True );
if (nMarkEnd>rEndRow)
rEndRow = nMarkEnd;
}
@@ -2453,16 +2453,16 @@ BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
rEndRow = pData[nIndex].nRow;
if (pMarkArray)
{
- SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, FALSE );
+ SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, sal_False );
if (nMarkEnd<rEndRow)
rEndRow = nMarkEnd;
}
}
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -2480,7 +2480,7 @@ void ScAttrArray::Save( SvStream& /* rStream */ ) const
ScDocumentPool* pDocPool = pDocument->GetPool();
- USHORT nSaveCount = nCount;
+ sal_uInt16 nSaveCount = nCount;
SCROW nSaveMaxRow = pDocument->GetSrcMaxRow();
if ( nSaveMaxRow != MAXROW )
{
@@ -2503,11 +2503,11 @@ void ScAttrArray::Save( SvStream& /* rStream */ ) const
const ScPatternAttr* pPattern = pData[i].pPattern;
pDocPool->StoreSurrogate( rStream, pPattern );
- // FALSE, weil ATTR_CONDITIONAL (noch) nicht in Vorlagen:
- if (pPattern->GetItemSet().GetItemState(ATTR_CONDITIONAL,FALSE,&pItem) == SFX_ITEM_SET)
+ // sal_False, weil ATTR_CONDITIONAL (noch) nicht in Vorlagen:
+ if (pPattern->GetItemSet().GetItemState(ATTR_CONDITIONAL,sal_False,&pItem) == SFX_ITEM_SET)
pDocument->SetConditionalUsed( ((const SfxUInt32Item*)pItem)->GetValue() );
- if (pPattern->GetItemSet().GetItemState(ATTR_VALIDDATA,FALSE,&pItem) == SFX_ITEM_SET)
+ if (pPattern->GetItemSet().GetItemState(ATTR_VALIDDATA,sal_False,&pItem) == SFX_ITEM_SET)
pDocument->SetValidationUsed( ((const SfxUInt32Item*)pItem)->GetValue() );
}
#endif // SC_ROWLIMIT_STREAM_ACCESS
@@ -2522,7 +2522,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ )
ScReadHeader aHdr( rStream );
- USHORT nNewCount;
+ sal_uInt16 nNewCount;
rStream >> nNewCount;
if ( nNewCount > MAXROW+1 ) // wuerde das Array zu gross?
{
@@ -2531,13 +2531,13 @@ void ScAttrArray::Load( SvStream& /* rStream */ )
return;
}
- Reset( pDocument->GetDefPattern(), FALSE ); // loeschen
+ Reset( pDocument->GetDefPattern(), sal_False ); // loeschen
pData = new ScAttrEntry[nNewCount]; // neu anlegen
for (SCSIZE i=0; i<nNewCount; i++)
{
rStream >> pData[i].nRow;
- USHORT nWhich = ATTR_PATTERN;
+ sal_uInt16 nWhich = ATTR_PATTERN;
const ScPatternAttr* pNewPattern = (const ScPatternAttr*)
pDocPool->LoadSurrogate( rStream, nWhich, ATTR_PATTERN );
if (!pNewPattern)
@@ -2575,7 +2575,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ )
//UNUSED2008-05 void ScAttrArray::ConvertFontsAfterLoad()
//UNUSED2008-05 {
//UNUSED2008-05 ScFontToSubsFontConverter_AutoPtr xFontConverter;
-//UNUSED2008-05 const ULONG nFlags = FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS;
+//UNUSED2008-05 const sal_uLong nFlags = FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS;
//UNUSED2008-05 SCSIZE nIndex = 0;
//UNUSED2008-05 SCROW nThisRow = 0;
//UNUSED2008-05
@@ -2583,7 +2583,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ )
//UNUSED2008-05 {
//UNUSED2008-05 const ScPatternAttr* pOldPattern = pData[nIndex].pPattern;
//UNUSED2008-05 const SfxPoolItem* pItem;
-//UNUSED2008-05 if( pOldPattern->GetItemSet().GetItemState( ATTR_FONT, FALSE, &pItem ) == SFX_ITEM_SET )
+//UNUSED2008-05 if( pOldPattern->GetItemSet().GetItemState( ATTR_FONT, sal_False, &pItem ) == SFX_ITEM_SET )
//UNUSED2008-05 {
//UNUSED2008-05 const SvxFontItem* pFontItem = (const SvxFontItem*) pItem;
//UNUSED2008-05 const String& rOldName = pFontItem->GetFamilyName();
@@ -2599,7 +2599,7 @@ void ScAttrArray::Load( SvStream& /* rStream */ )
//UNUSED2008-05 RTL_TEXTENCODING_DONTKNOW, ATTR_FONT );
//UNUSED2008-05 ScPatternAttr aNewPattern( *pOldPattern );
//UNUSED2008-05 aNewPattern.GetItemSet().Put( aNewItem );
-//UNUSED2008-05 SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
+//UNUSED2008-05 SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
//UNUSED2008-05 Search( nThisRow, nIndex ); //! data changed
//UNUSED2008-05 }
//UNUSED2008-05 }
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 301883197fb8..0573e4fda76f 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -74,31 +74,31 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem);
// allgemeine Hilfsfunktionen
//
-BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
+sal_Bool ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
{
// DBG_ASSERT( pThis || pOther, "LineAttr == 0" );
if (!pThis)
- return FALSE;
+ return sal_False;
if (!pOther)
- return TRUE;
+ return sal_True;
- USHORT nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
- USHORT nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
+ sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
+ sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
if (nThisSize > nOtherSize)
- return TRUE;
+ return sal_True;
else if (nThisSize < nOtherSize)
- return FALSE;
+ return sal_False;
else
{
if ( pOther->GetInWidth() && !pThis->GetInWidth() )
- return TRUE;
+ return sal_True;
else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
- return FALSE;
+ return sal_False;
else
{
- return TRUE; //! ???
+ return sal_True; //! ???
}
}
}
@@ -170,10 +170,10 @@ SfxPoolItem* ScMergeAttr::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, USHORT /* nVer */ ) const
+SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) const
{
- INT16 nCol;
- INT16 nRow;
+ sal_Int16 nCol;
+ sal_Int16 nRow;
rStream >> nCol;
rStream >> nRow;
return new ScMergeAttr(static_cast<SCCOL>(nCol),static_cast<SCROW>(nRow));
@@ -190,7 +190,7 @@ ScMergeFlagAttr::ScMergeFlagAttr():
//------------------------------------------------------------------------
-ScMergeFlagAttr::ScMergeFlagAttr(INT16 nFlags):
+ScMergeFlagAttr::ScMergeFlagAttr(sal_Int16 nFlags):
SfxInt16Item(ATTR_MERGE_FLAG, nFlags)
{
}
@@ -205,17 +205,17 @@ ScMergeFlagAttr::~ScMergeFlagAttr()
ScProtectionAttr::ScProtectionAttr():
SfxPoolItem(ATTR_PROTECTION),
- bProtection(TRUE),
- bHideFormula(FALSE),
- bHideCell(FALSE),
- bHidePrint(FALSE)
+ bProtection(sal_True),
+ bHideFormula(sal_False),
+ bHideCell(sal_False),
+ bHidePrint(sal_False)
{
}
//------------------------------------------------------------------------
-ScProtectionAttr::ScProtectionAttr( BOOL bProtect, BOOL bHFormula,
- BOOL bHCell, BOOL bHPrint):
+ScProtectionAttr::ScProtectionAttr( sal_Bool bProtect, sal_Bool bHFormula,
+ sal_Bool bHCell, sal_Bool bHPrint):
SfxPoolItem(ATTR_PROTECTION),
bProtection(bProtect),
bHideFormula(bHFormula),
@@ -241,7 +241,7 @@ ScProtectionAttr::~ScProtectionAttr()
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -266,15 +266,15 @@ BOOL ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
rVal <<= (sal_Bool ) bHidePrint; break;
default:
DBG_ERROR("Wrong MemberID!");
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
sal_Bool bVal = sal_Bool();
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -288,7 +288,7 @@ BOOL ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
bHideFormula = aProtection.IsFormulaHidden;
bHideCell = aProtection.IsHidden;
bHidePrint = aProtection.IsPrintHidden;
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -395,12 +395,12 @@ SfxPoolItem* ScProtectionAttr::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, USHORT /* n */ ) const
+SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) const
{
- BOOL bProtect;
- BOOL bHFormula;
- BOOL bHCell;
- BOOL bHPrint;
+ sal_Bool bProtect;
+ sal_Bool bHFormula;
+ sal_Bool bHCell;
+ sal_Bool bHPrint;
rStream >> bProtect;
rStream >> bHFormula;
@@ -412,34 +412,34 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, USHORT /* n */ ) const
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetProtection( BOOL bProtect)
+sal_Bool ScProtectionAttr::SetProtection( sal_Bool bProtect)
{
bProtection = bProtect;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetHideFormula( BOOL bHFormula)
+sal_Bool ScProtectionAttr::SetHideFormula( sal_Bool bHFormula)
{
bHideFormula = bHFormula;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetHideCell( BOOL bHCell)
+sal_Bool ScProtectionAttr::SetHideCell( sal_Bool bHCell)
{
bHideCell = bHCell;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::SetHidePrint( BOOL bHPrint)
+sal_Bool ScProtectionAttr::SetHidePrint( sal_Bool bHPrint)
{
bHidePrint = bHPrint;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -510,7 +510,7 @@ ScTableListItem::ScTableListItem( const ScTableListItem& rCpy )
{
pTabArr = new SCTAB [nCount];
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
pTabArr[i] = rCpy.pTabArr[i];
}
else
@@ -519,7 +519,7 @@ ScTableListItem::ScTableListItem( const ScTableListItem& rCpy )
// -----------------------------------------------------------------------
-//UNUSED2008-05 ScTableListItem::ScTableListItem( const USHORT nWhichP, const List& rList )
+//UNUSED2008-05 ScTableListItem::ScTableListItem( const sal_uInt16 nWhichP, const List& rList )
//UNUSED2008-05 : SfxPoolItem ( nWhichP ),
//UNUSED2008-05 nCount ( 0 ),
//UNUSED2008-05 pTabArr ( NULL )
@@ -543,7 +543,7 @@ ScTableListItem& ScTableListItem::operator=( const ScTableListItem& rCpy )
if ( rCpy.nCount > 0 )
{
pTabArr = new SCTAB [rCpy.nCount];
- for ( USHORT i=0; i<rCpy.nCount; i++ )
+ for ( sal_uInt16 i=0; i<rCpy.nCount; i++ )
pTabArr[i] = rCpy.pTabArr[i];
}
else
@@ -561,11 +561,11 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
ScTableListItem& rCmp = (ScTableListItem&)rAttr;
- BOOL bEqual = (nCount == rCmp.nCount);
+ sal_Bool bEqual = (nCount == rCmp.nCount);
if ( nCount > 0 )
{
- USHORT i=0;
+ sal_uInt16 i=0;
bEqual = ( pTabArr && rCmp.pTabArr );
@@ -608,7 +608,7 @@ SfxItemPresentation ScTableListItem::GetPresentation
{
rText = '(';
if ( nCount>0 && pTabArr )
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
rText += String::CreateFromInt32( pTabArr[i] );
if ( i<(nCount-1) )
@@ -633,9 +633,9 @@ SfxItemPresentation ScTableListItem::GetPresentation
// -----------------------------------------------------------------------
-//UNUSED2009-05 BOOL ScTableListItem::GetTableList( List& aList ) const
+//UNUSED2009-05 sal_Bool ScTableListItem::GetTableList( List& aList ) const
//UNUSED2009-05 {
-//UNUSED2009-05 for ( USHORT i=0; i<nCount; i++ )
+//UNUSED2009-05 for ( sal_uInt16 i=0; i<nCount; i++ )
//UNUSED2009-05 aList.Insert( new SCTAB( pTabArr[i] ) );
//UNUSED2009-05
//UNUSED2009-05 return ( nCount > 0 );
@@ -645,7 +645,7 @@ SfxItemPresentation ScTableListItem::GetPresentation
//UNUSED2009-05 void ScTableListItem::SetTableList( const List& rList )
//UNUSED2009-05 {
-//UNUSED2009-05 nCount = (USHORT)rList.Count();
+//UNUSED2009-05 nCount = (sal_uInt16)rList.Count();
//UNUSED2009-05
//UNUSED2009-05 delete [] pTabArr;
//UNUSED2009-05
@@ -653,7 +653,7 @@ SfxItemPresentation ScTableListItem::GetPresentation
//UNUSED2009-05 {
//UNUSED2009-05 pTabArr = new SCTAB [nCount];
//UNUSED2009-05
-//UNUSED2009-05 for ( USHORT i=0; i<nCount; i++ )
+//UNUSED2009-05 for ( sal_uInt16 i=0; i<nCount; i++ )
//UNUSED2009-05 pTabArr[i] = *( (SCTAB*)rList.GetObject( i ) );
//UNUSED2009-05 }
//UNUSED2009-05 else
@@ -665,7 +665,7 @@ SfxItemPresentation ScTableListItem::GetPresentation
// ScPageHFItem - Daten der Kopf-/Fusszeilen
// -----------------------------------------------------------------------
-ScPageHFItem::ScPageHFItem( USHORT nWhichP )
+ScPageHFItem::ScPageHFItem( sal_uInt16 nWhichP )
: SfxPoolItem ( nWhichP ),
pLeftArea ( NULL ),
pCenterArea ( NULL ),
@@ -700,18 +700,18 @@ ScPageHFItem::~ScPageHFItem()
//------------------------------------------------------------------------
-BOOL ScPageHFItem::QueryValue( uno::Any& rVal, BYTE /* nMemberId */ ) const
+sal_Bool ScPageHFItem::QueryValue( uno::Any& rVal, sal_uInt8 /* nMemberId */ ) const
{
uno::Reference<sheet::XHeaderFooterContent> xContent =
new ScHeaderFooterContentObj( pLeftArea, pCenterArea, pRightArea );
rVal <<= xContent;
- return TRUE;
+ return sal_True;
}
-BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
+sal_Bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
uno::Reference<sheet::XHeaderFooterContent> xContent;
if ( rVal >>= xContent )
{
@@ -736,7 +736,7 @@ BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
if ( !pLeftArea || !pCenterArea || !pRightArea )
{
// keine Texte auf NULL stehen lassen
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), TRUE );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
if (!pLeftArea)
pLeftArea = aEngine.CreateTextObject();
if (!pCenterArea)
@@ -745,7 +745,7 @@ BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
pRightArea = aEngine.CreateTextObject();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -796,11 +796,11 @@ void lcl_SetSpace( String& rStr, const ESelection& rSel )
rStr.SetChar( rSel.nStartPos, ' ' );
}
-BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
+sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{
- BOOL bChange = FALSE;
- USHORT nParCnt = rEng.GetParagraphCount();
- for (USHORT nPar = 0; nPar<nParCnt; nPar++)
+ sal_Bool bChange = sal_False;
+ sal_uInt16 nParCnt = rEng.GetParagraphCount();
+ for (sal_uInt16 nPar = 0; nPar<nParCnt; nPar++)
{
String aStr = rEng.GetText( nPar );
xub_StrLen nPos;
@@ -809,37 +809,37 @@ BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[1])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD ), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[4])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
while ((nPos = aStr.Search(pCommands[5])) != STRING_NOTFOUND)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = TRUE;
+ lcl_SetSpace(aStr, aSel ); bChange = sal_True;
}
}
return bChange;
@@ -847,7 +847,7 @@ BOOL lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
#define SC_FIELD_COUNT 6
-SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
+SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
{
EditTextObject* pLeft = EditTextObject::Create(rStream);
EditTextObject* pCenter = EditTextObject::Create(rStream);
@@ -863,7 +863,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
// Excel import in 5.1 created broken TextObjects (#67442#) that are
// corrected here to avoid saving wrong files again (#90487#).
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), TRUE );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 )
{
delete pLeft;
@@ -883,7 +883,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
if ( nVer < 1 ) // alte Feldbefehle umsetzen
{
- USHORT i;
+ sal_uInt16 i;
const String& rDel = ScGlobal::GetRscString( STR_HFCMD_DELIMITER );
String aCommands[SC_FIELD_COUNT];
for (i=0; i<SC_FIELD_COUNT; i++)
@@ -897,7 +897,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
for (i=0; i<SC_FIELD_COUNT; i++)
aCommands[i] += rDel;
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), TRUE );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
aEngine.SetText(*pLeft);
if (lcl_ConvertFields(aEngine,aCommands))
{
@@ -934,56 +934,56 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, USHORT nVer ) const
//UNUSED2009-05 class ScFieldChangerEditEngine : public ScEditEngineDefaulter
//UNUSED2009-05 {
//UNUSED2009-05 TypeId aExtFileId;
-//UNUSED2009-05 USHORT nConvPara;
+//UNUSED2009-05 sal_uInt16 nConvPara;
//UNUSED2009-05 xub_StrLen nConvPos;
-//UNUSED2009-05 BOOL bConvert;
+//UNUSED2009-05 sal_Bool bConvert;
//UNUSED2009-05
//UNUSED2009-05 public:
-//UNUSED2009-05 ScFieldChangerEditEngine( SfxItemPool* pEnginePool, BOOL bDeleteEnginePool );
+//UNUSED2009-05 ScFieldChangerEditEngine( SfxItemPool* pEnginePool, sal_Bool bDeleteEnginePool );
//UNUSED2009-05 virtual ~ScFieldChangerEditEngine() {}
//UNUSED2009-05
-//UNUSED2009-05 virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara,
-//UNUSED2009-05 USHORT nPos, Color*& rTxtColor,
+//UNUSED2009-05 virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara,
+//UNUSED2009-05 sal_uInt16 nPos, Color*& rTxtColor,
//UNUSED2009-05 Color*& rFldColor );
//UNUSED2009-05
-//UNUSED2009-05 BOOL ConvertFields();
+//UNUSED2009-05 sal_Bool ConvertFields();
//UNUSED2009-05 };
//UNUSED2009-05
//UNUSED2009-05 ScFieldChangerEditEngine::ScFieldChangerEditEngine( SfxItemPool* pEnginePoolP,
-//UNUSED2009-05 BOOL bDeleteEnginePoolP ) :
+//UNUSED2009-05 sal_Bool bDeleteEnginePoolP ) :
//UNUSED2009-05 ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
//UNUSED2009-05 aExtFileId( TYPE( SvxExtFileField ) ),
//UNUSED2009-05 nConvPara( 0 ),
//UNUSED2009-05 nConvPos( 0 ),
-//UNUSED2009-05 bConvert( FALSE )
+//UNUSED2009-05 bConvert( sal_False )
//UNUSED2009-05 {
//UNUSED2009-05 }
//UNUSED2009-05
//UNUSED2009-05 String ScFieldChangerEditEngine::CalcFieldValue( const SvxFieldItem& rField,
-//UNUSED2009-05 USHORT nPara, USHORT nPos, Color*& /* rTxtColor */, Color*& /* rFldColor */ )
+//UNUSED2009-05 sal_uInt16 nPara, sal_uInt16 nPos, Color*& /* rTxtColor */, Color*& /* rFldColor */ )
//UNUSED2009-05 {
//UNUSED2009-05 const SvxFieldData* pFieldData = rField.GetField();
//UNUSED2009-05 if ( pFieldData && pFieldData->Type() == aExtFileId )
//UNUSED2009-05 {
-//UNUSED2009-05 bConvert = TRUE;
+//UNUSED2009-05 bConvert = sal_True;
//UNUSED2009-05 nConvPara = nPara;
//UNUSED2009-05 nConvPos = nPos;
//UNUSED2009-05 }
//UNUSED2009-05 return EMPTY_STRING;
//UNUSED2009-05 }
//UNUSED2009-05
-//UNUSED2009-05 BOOL ScFieldChangerEditEngine::ConvertFields()
+//UNUSED2009-05 sal_Bool ScFieldChangerEditEngine::ConvertFields()
//UNUSED2009-05 {
-//UNUSED2009-05 BOOL bConverted = FALSE;
+//UNUSED2009-05 sal_Bool bConverted = sal_False;
//UNUSED2009-05 do
//UNUSED2009-05 {
-//UNUSED2009-05 bConvert = FALSE;
+//UNUSED2009-05 bConvert = sal_False;
//UNUSED2009-05 UpdateFields();
//UNUSED2009-05 if ( bConvert )
//UNUSED2009-05 {
//UNUSED2009-05 ESelection aSel( nConvPara, nConvPos, nConvPara, nConvPos+1 );
//UNUSED2009-05 QuickInsertField( SvxFieldItem( SvxFileField(), EE_FEATURE_FIELD), aSel );
-//UNUSED2009-05 bConverted = TRUE;
+//UNUSED2009-05 bConverted = sal_True;
//UNUSED2009-05 }
//UNUSED2009-05 } while ( bConvert );
//UNUSED2009-05 return bConverted;
@@ -1027,15 +1027,15 @@ void ScPageHFItem::SetArea( EditTextObject *pNew, int nArea )
// ScViewObjectModeItem - Darstellungsmodus von ViewObjekten
//-----------------------------------------------------------------------
-ScViewObjectModeItem::ScViewObjectModeItem( USHORT nWhichP )
+ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP )
: SfxEnumItem( nWhichP, VOBJ_MODE_SHOW )
{
}
//------------------------------------------------------------------------
-ScViewObjectModeItem::ScViewObjectModeItem( USHORT nWhichP, ScVObjMode eMode )
- : SfxEnumItem( nWhichP, sal::static_int_cast<USHORT>(eMode) )
+ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP, ScVObjMode eMode )
+ : SfxEnumItem( nWhichP, sal::static_int_cast<sal_uInt16>(eMode) )
{
}
@@ -1100,7 +1100,7 @@ SfxItemPresentation ScViewObjectModeItem::GetPresentation
//------------------------------------------------------------------------
-String ScViewObjectModeItem::GetValueText( USHORT nVal ) const
+String ScViewObjectModeItem::GetValueText( sal_uInt16 nVal ) const
{
DBG_ASSERT( nVal <= VOBJ_MODE_HIDE, "enum overflow!" );
@@ -1109,7 +1109,7 @@ String ScViewObjectModeItem::GetValueText( USHORT nVal ) const
//------------------------------------------------------------------------
-USHORT ScViewObjectModeItem::GetValueCount() const
+sal_uInt16 ScViewObjectModeItem::GetValueCount() const
{
return 2;
}
@@ -1123,7 +1123,7 @@ SfxPoolItem* ScViewObjectModeItem::Clone( SfxItemPool* ) const
//------------------------------------------------------------------------
-USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const
+sal_uInt16 ScViewObjectModeItem::GetVersion( sal_uInt16 /* nFileVersion */ ) const
{
return 1;
}
@@ -1132,7 +1132,7 @@ USHORT ScViewObjectModeItem::GetVersion( USHORT /* nFileVersion */ ) const
SfxPoolItem* ScViewObjectModeItem::Create(
SvStream& rStream,
- USHORT nVersion ) const
+ sal_uInt16 nVersion ) const
{
if ( nVersion == 0 )
{
@@ -1141,11 +1141,11 @@ SfxPoolItem* ScViewObjectModeItem::Create(
}
else
{
- USHORT nVal;
+ sal_uInt16 nVal;
rStream >> nVal;
//#i80528# adapt to new range eventually
- if((USHORT)VOBJ_MODE_HIDE < nVal) nVal = (USHORT)VOBJ_MODE_SHOW;
+ if((sal_uInt16)VOBJ_MODE_HIDE < nVal) nVal = (sal_uInt16)VOBJ_MODE_SHOW;
return new ScViewObjectModeItem( Which(), (ScVObjMode)nVal);
}
@@ -1155,7 +1155,7 @@ SfxPoolItem* ScViewObjectModeItem::Create(
// double
// -----------------------------------------------------------------------
-ScDoubleItem::ScDoubleItem( USHORT nWhichP, double nVal )
+ScDoubleItem::ScDoubleItem( sal_uInt16 nWhichP, double nVal )
: SfxPoolItem ( nWhichP ),
nValue ( nVal )
{
@@ -1195,7 +1195,7 @@ SfxPoolItem* ScDoubleItem::Clone( SfxItemPool* ) const
//------------------------------------------------------------------------
-SfxPoolItem* ScDoubleItem::Create( SvStream& rStream, USHORT /* nVer */ ) const
+SfxPoolItem* ScDoubleItem::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) const
{
double nTmp=0;
rStream >> nTmp;
@@ -1296,23 +1296,23 @@ SfxItemPresentation ScPageScaleToItem::GetPresentation(
return ePres;
}
-BOOL ScPageScaleToItem::QueryValue( uno::Any& rAny, BYTE nMemberId ) const
+sal_Bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nMemberId )
{
case SC_MID_PAGE_SCALETO_WIDTH: rAny <<= mnWidth; break;
case SC_MID_PAGE_SCALETO_HEIGHT: rAny <<= mnHeight; break;
default:
DBG_ERRORFILE( "ScPageScaleToItem::QueryValue - unknown member ID" );
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL ScPageScaleToItem::PutValue( const uno::Any& rAny, BYTE nMemberId )
+sal_Bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( nMemberId )
{
case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 540fb577a79b..90bce11563a0 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -166,7 +166,7 @@ bool ScBroadcastAreaSlot::CheckHardRecalcStateCondition() const
if ( pShell )
pShell->SetError( SCWARN_CORE_HARD_RECALC, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- pDoc->SetAutoCalc( FALSE );
+ pDoc->SetAutoCalc( sal_False );
pDoc->SetHardRecalcState( 2 );
}
return true;
@@ -278,11 +278,11 @@ ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
}
-BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
+sal_Bool ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
{
if (aBroadcastAreaTbl.empty())
- return FALSE;
- BOOL bIsBroadcasted = FALSE;
+ return sal_False;
+ sal_Bool bIsBroadcasted = sal_False;
const ScAddress& rAddress = rHint.GetAddress();
for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin());
aIter != aBroadcastAreaTbl.end(); /* increment in body */ )
@@ -298,7 +298,7 @@ BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea))
{
pArea->GetBroadcaster().Broadcast( rHint);
- bIsBroadcasted = TRUE;
+ bIsBroadcasted = sal_True;
}
}
}
@@ -306,12 +306,12 @@ BOOL ScBroadcastAreaSlot::AreaBroadcast( const ScHint& rHint) const
}
-BOOL ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange,
+sal_Bool ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange,
const ScHint& rHint) const
{
if (aBroadcastAreaTbl.empty())
- return FALSE;
- BOOL bIsBroadcasted = FALSE;
+ return sal_False;
+ sal_Bool bIsBroadcasted = sal_False;
for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin());
aIter != aBroadcastAreaTbl.end(); /* increment in body */ )
{
@@ -326,7 +326,7 @@ BOOL ScBroadcastAreaSlot::AreaBroadcastInRange( const ScRange& rRange,
if (!pBASM->IsInBulkBroadcast() || pBASM->InsertBulkArea( pArea))
{
pArea->GetBroadcaster().Broadcast( rHint);
- bIsBroadcasted = TRUE;
+ bIsBroadcasted = sal_True;
}
}
}
@@ -389,7 +389,7 @@ void ScBroadcastAreaSlot::UpdateRemove( UpdateRefMode eUpdateRefMode,
pArea->DecRef();
if (pBASM->IsInBulkBroadcast())
pBASM->RemoveBulkArea( pArea);
- pArea->SetInUpdateChain( TRUE );
+ pArea->SetInUpdateChain( sal_True );
ScBroadcastArea* pUC = pBASM->GetEOUpdateChain();
if ( pUC )
pUC->SetUpdateChainNext( pArea );
@@ -643,7 +643,7 @@ void ScBroadcastAreaSlotMachine::EndListeningArea( const ScRange& rRange,
}
-BOOL ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const
+sal_Bool ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const
{
const ScAddress& rAddress = rHint.GetAddress();
if ( rAddress == BCA_BRDCST_ALWAYS )
@@ -651,30 +651,30 @@ BOOL ScBroadcastAreaSlotMachine::AreaBroadcast( const ScHint& rHint ) const
if ( pBCAlways )
{
pBCAlways->Broadcast( rHint );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
else
{
TableSlotsMap::const_iterator iTab( aTableSlotsMap.find( rAddress.Tab()));
if (iTab == aTableSlotsMap.end())
- return FALSE;
+ return sal_False;
ScBroadcastAreaSlot* pSlot = (*iTab).second->getAreaSlot(
ComputeSlotOffset( rAddress));
if ( pSlot )
return pSlot->AreaBroadcast( rHint );
else
- return FALSE;
+ return sal_False;
}
}
-BOOL ScBroadcastAreaSlotMachine::AreaBroadcastInRange( const ScRange& rRange,
+sal_Bool ScBroadcastAreaSlotMachine::AreaBroadcastInRange( const ScRange& rRange,
const ScHint& rHint ) const
{
- BOOL bBroadcasted = FALSE;
+ sal_Bool bBroadcasted = sal_False;
SCTAB nEndTab = rRange.aEnd.Tab();
for (TableSlotsMap::const_iterator iTab( aTableSlotsMap.lower_bound( rRange.aStart.Tab()));
iTab != aTableSlotsMap.end() && (*iTab).first <= nEndTab; ++iTab)
@@ -898,7 +898,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
// unchain
pArea->SetUpdateChainNext( NULL );
- pArea->SetInUpdateChain( FALSE );
+ pArea->SetInUpdateChain( sal_False );
// Delete if not inserted to any slot. RemoveBulkArea(pArea) was
// already executed in UpdateRemove().
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index aa492630ab0e..3f7cc4cbfdc9 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -64,16 +64,16 @@ using namespace formula;
// hand, if the value fits all recursions, execution is quicker as no resumes
// are necessary. Could be made a configurable option.
// Allow for a year's calendar (366).
-const USHORT MAXRECURSION = 400;
+const sal_uInt16 MAXRECURSION = 400;
// STATIC DATA -----------------------------------------------------------
#ifdef USE_MEMPOOL
// MemPools auf 4k Boundaries - 64 Bytes ausrichten
-const USHORT nMemPoolValueCell = (0x8000 - 64) / sizeof(ScValueCell);
-const USHORT nMemPoolFormulaCell = (0x8000 - 64) / sizeof(ScFormulaCell);
-const USHORT nMemPoolStringCell = (0x4000 - 64) / sizeof(ScStringCell);
-const USHORT nMemPoolNoteCell = (0x1000 - 64) / sizeof(ScNoteCell);
+const sal_uInt16 nMemPoolValueCell = (0x8000 - 64) / sizeof(ScValueCell);
+const sal_uInt16 nMemPoolFormulaCell = (0x8000 - 64) / sizeof(ScFormulaCell);
+const sal_uInt16 nMemPoolStringCell = (0x4000 - 64) / sizeof(ScStringCell);
+const sal_uInt16 nMemPoolNoteCell = (0x1000 - 64) / sizeof(ScNoteCell);
IMPL_FIXEDMEMPOOL_NEWDEL( ScValueCell, nMemPoolValueCell, nMemPoolValueCell )
IMPL_FIXEDMEMPOOL_NEWDEL( ScFormulaCell, nMemPoolFormulaCell, nMemPoolFormulaCell )
IMPL_FIXEDMEMPOOL_NEWDEL( ScStringCell, nMemPoolStringCell, nMemPoolStringCell )
@@ -86,7 +86,7 @@ ScBaseCell::ScBaseCell( CellType eNewType ) :
mpNote( 0 ),
mpBroadcaster( 0 ),
nTextWidth( TEXTWIDTH_DIRTY ),
- eCellType( sal::static_int_cast<BYTE>(eNewType) ),
+ eCellType( sal::static_int_cast<sal_uInt8>(eNewType) ),
nScriptType( SC_SCRIPTTYPE_UNKNOWN )
{
}
@@ -240,7 +240,7 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc )
&& !((ScFormulaCell*)this)->IsInChangeTrack()
)
{
- pDoc->SetDetectiveDirty(TRUE); // es hat sich was geaendert...
+ pDoc->SetDetectiveDirty(sal_True); // es hat sich was geaendert...
ScFormulaCell* pFormCell = (ScFormulaCell*)this;
ScTokenArray* pArr = pFormCell->GetCode();
@@ -312,7 +312,7 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc )
}
}
}
- pFormCell->SetNeedsListening( FALSE);
+ pFormCell->SetNeedsListening( sal_False);
}
}
@@ -326,7 +326,7 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
&& !((ScFormulaCell*)this)->IsInChangeTrack()
)
{
- pDoc->SetDetectiveDirty(TRUE); // es hat sich was geaendert...
+ pDoc->SetDetectiveDirty(sal_True); // es hat sich was geaendert...
ScFormulaCell* pFormCell = (ScFormulaCell*)this;
if( pFormCell->GetCode()->IsRecalcModeAlways() )
@@ -406,7 +406,7 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
}
-USHORT ScBaseCell::GetErrorCode() const
+sal_uInt16 ScBaseCell::GetErrorCode() const
{
switch ( eCellType )
{
@@ -418,45 +418,45 @@ USHORT ScBaseCell::GetErrorCode() const
}
-BOOL ScBaseCell::HasEmptyData() const
+sal_Bool ScBaseCell::HasEmptyData() const
{
switch ( eCellType )
{
case CELLTYPE_NOTE :
- return TRUE;
+ return sal_True;
case CELLTYPE_FORMULA :
return ((ScFormulaCell*)this)->IsEmpty();
default:
- return FALSE;
+ return sal_False;
}
}
-BOOL ScBaseCell::HasValueData() const
+sal_Bool ScBaseCell::HasValueData() const
{
switch ( eCellType )
{
case CELLTYPE_VALUE :
- return TRUE;
+ return sal_True;
case CELLTYPE_FORMULA :
return ((ScFormulaCell*)this)->IsValue();
default:
- return FALSE;
+ return sal_False;
}
}
-BOOL ScBaseCell::HasStringData() const
+sal_Bool ScBaseCell::HasStringData() const
{
switch ( eCellType )
{
case CELLTYPE_STRING :
case CELLTYPE_EDIT :
- return TRUE;
+ return sal_True;
case CELLTYPE_FORMULA :
return !((ScFormulaCell*)this)->IsValue();
default:
- return FALSE;
+ return sal_False;
}
}
@@ -479,7 +479,7 @@ String ScBaseCell::GetStringData() const
}
// static
-BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
+sal_Bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
{
CellType eType1 = CELLTYPE_NONE;
CellType eType2 = CELLTYPE_NONE;
@@ -500,12 +500,12 @@ BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
eType2 = CELLTYPE_NONE;
}
if ( eType1 != eType2 )
- return FALSE;
+ return sal_False;
switch ( eType1 ) // beide Typen gleich
{
case CELLTYPE_NONE: // beide leer
- return TRUE;
+ return sal_True;
case CELLTYPE_VALUE: // wirklich Value-Zellen
return ( ((const ScValueCell*)pCell1)->GetValue() ==
((const ScValueCell*)pCell2)->GetValue() );
@@ -534,27 +534,27 @@ BOOL ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 )
if (pCode1->GetLen() == pCode2->GetLen()) // nicht-UPN
{
- BOOL bEqual = TRUE;
- USHORT nLen = pCode1->GetLen();
+ sal_Bool bEqual = sal_True;
+ sal_uInt16 nLen = pCode1->GetLen();
FormulaToken** ppToken1 = pCode1->GetArray();
FormulaToken** ppToken2 = pCode2->GetArray();
- for (USHORT i=0; i<nLen; i++)
+ for (sal_uInt16 i=0; i<nLen; i++)
if ( !ppToken1[i]->TextEqual(*(ppToken2[i])) )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if (bEqual)
- return TRUE;
+ return sal_True;
}
- return FALSE; // unterschiedlich lang oder unterschiedliche Tokens
+ return sal_False; // unterschiedlich lang oder unterschiedliche Tokens
}
default:
DBG_ERROR("huch, was fuer Zellen???");
}
- return FALSE;
+ return sal_False;
}
// ============================================================================
@@ -639,15 +639,15 @@ ScFormulaCell::ScFormulaCell() :
nFormatType( NUMBERFORMAT_NUMBER ),
nSeenInIteration(0),
cMatrixFlag ( MM_NONE ),
- bDirty( FALSE ),
- bChanged( FALSE ),
- bRunning( FALSE ),
- bCompile( FALSE ),
- bSubTotal( FALSE ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bDirty( sal_False ),
+ bChanged( sal_False ),
+ bRunning( sal_False ),
+ bCompile( sal_False ),
+ bSubTotal( sal_False ),
+ bIsIterCell( sal_False ),
+ bInChangeTrack( sal_False ),
+ bTableOpDirty( sal_False ),
+ bNeedListening( sal_False ),
aPos(0,0,0)
{
}
@@ -655,7 +655,7 @@ ScFormulaCell::ScFormulaCell() :
ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
const String& rFormula,
const FormulaGrammar::Grammar eGrammar,
- BYTE cMatInd ) :
+ sal_uInt8 cMatInd ) :
ScBaseCell( CELLTYPE_FORMULA ),
eTempGrammar( eGrammar),
pCode( NULL ),
@@ -668,25 +668,25 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
nFormatType( NUMBERFORMAT_NUMBER ),
nSeenInIteration(0),
cMatrixFlag ( cMatInd ),
- bDirty( TRUE ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cMatInd != 0
- bChanged( FALSE ),
- bRunning( FALSE ),
- bCompile( FALSE ),
- bSubTotal( FALSE ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bDirty( sal_True ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cMatInd != 0
+ bChanged( sal_False ),
+ bRunning( sal_False ),
+ bCompile( sal_False ),
+ bSubTotal( sal_False ),
+ bIsIterCell( sal_False ),
+ bInChangeTrack( sal_False ),
+ bTableOpDirty( sal_False ),
+ bNeedListening( sal_False ),
aPos( rPos )
{
- Compile( rFormula, TRUE, eGrammar ); // bNoListening, Insert does that
+ Compile( rFormula, sal_True, eGrammar ); // bNoListening, Insert does that
}
// Wird von den Importfiltern verwendet
ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
const ScTokenArray* pArr,
- const FormulaGrammar::Grammar eGrammar, BYTE cInd ) :
+ const FormulaGrammar::Grammar eGrammar, sal_uInt8 cInd ) :
ScBaseCell( CELLTYPE_FORMULA ),
eTempGrammar( eGrammar),
pCode( pArr ? new ScTokenArray( *pArr ) : new ScTokenArray ),
@@ -700,14 +700,14 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
nSeenInIteration(0),
cMatrixFlag ( cInd ),
bDirty( NULL != pArr ), // -> wg. Benutzung im Fkt.AutoPiloten, war: cInd != 0
- bChanged( FALSE ),
- bRunning( FALSE ),
- bCompile( FALSE ),
- bSubTotal( FALSE ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bChanged( sal_False ),
+ bRunning( sal_False ),
+ bCompile( sal_False ),
+ bSubTotal( sal_False ),
+ bIsIterCell( sal_False ),
+ bInChangeTrack( sal_False ),
+ bTableOpDirty( sal_False ),
+ bNeedListening( sal_False ),
aPos( rPos )
{
// UPN-Array erzeugen
@@ -722,7 +722,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
{
pCode->Reset();
if ( pCode->GetNextOpCodeRPN( ocSubTotal ) )
- bSubTotal = TRUE;
+ bSubTotal = sal_True;
}
}
@@ -742,13 +742,13 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
cMatrixFlag ( rCell.cMatrixFlag ),
bDirty( rCell.bDirty ),
bChanged( rCell.bChanged ),
- bRunning( FALSE ),
+ bRunning( sal_False ),
bCompile( rCell.bCompile ),
bSubTotal( rCell.bSubTotal ),
- bIsIterCell( FALSE ),
- bInChangeTrack( FALSE ),
- bTableOpDirty( FALSE ),
- bNeedListening( FALSE ),
+ bIsIterCell( sal_False ),
+ bInChangeTrack( sal_False ),
+ bTableOpDirty( sal_False ),
+ bNeedListening( sal_False ),
aPos( rPos )
{
pCode = rCell.pCode->Clone();
@@ -762,11 +762,11 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
if ( pCode->GetCodeError() && !pDocument->IsClipboard() && pCode->GetLen() )
{
pCode->SetCodeError( 0 );
- bCompile = TRUE;
+ bCompile = sal_True;
}
//! Compile ColRowNames on URM_MOVE/URM_COPY _after_ UpdateReference
- BOOL bCompileLater = FALSE;
- BOOL bClipMode = rCell.pDocument->IsClipboard();
+ sal_Bool bCompileLater = sal_False;
+ sal_Bool bClipMode = rCell.pDocument->IsClipboard();
if( !bCompile )
{ // Name references with references and ColRowNames
pCode->Reset();
@@ -784,14 +784,14 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
if( pRangeData )
{
if( pRangeData->HasReferences() )
- bCompile = TRUE;
+ bCompile = sal_True;
}
else
- bCompile = TRUE; // invalid reference!
+ bCompile = sal_True; // invalid reference!
}
else if ( t->GetOpCode() == ocColRowName )
{
- bCompile = TRUE; // new lookup needed
+ bCompile = sal_True; // new lookup needed
bCompileLater = bClipMode;
}
}
@@ -808,7 +808,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
{
// bNoListening, not at all if in Clipboard/Undo,
// and not from Clipboard either, instead after Insert(Clone) and UpdateReference.
- CompileTokenArray( TRUE );
+ CompileTokenArray( sal_True );
}
}
@@ -913,11 +913,11 @@ void ScFormulaCell::GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows )
}
}
-void ScFormulaCell::Compile( const String& rFormula, BOOL bNoListening,
+void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening,
const FormulaGrammar::Grammar eGrammar )
{
if ( pDocument->IsClipOrUndo() ) return;
- BOOL bWasInFormulaTree = pDocument->IsInFormulaTree( this );
+ sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
if ( bWasInFormulaTree )
pDocument->RemoveFromFormulaTree( this );
// pCode darf fuer Abfragen noch nicht geloescht, muss aber leer sein
@@ -938,12 +938,12 @@ void ScFormulaCell::Compile( const String& rFormula, BOOL bNoListening,
else
pCode->AddBad( rFormula.GetBuffer() );
}
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray( bNoListening );
}
else
{
- bChanged = TRUE;
+ bChanged = sal_True;
SetTextWidth( TEXTWIDTH_DIRTY );
SetScriptType( SC_SCRIPTTYPE_UNKNOWN );
}
@@ -952,7 +952,7 @@ void ScFormulaCell::Compile( const String& rFormula, BOOL bNoListening,
}
-void ScFormulaCell::CompileTokenArray( BOOL bNoListening )
+void ScFormulaCell::CompileTokenArray( sal_Bool bNoListening )
{
// Not already compiled?
if( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
@@ -960,13 +960,13 @@ void ScFormulaCell::CompileTokenArray( BOOL bNoListening )
else if( bCompile && !pDocument->IsClipOrUndo() && !pCode->GetCodeError() )
{
// RPN length may get changed
- BOOL bWasInFormulaTree = pDocument->IsInFormulaTree( this );
+ sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this );
if ( bWasInFormulaTree )
pDocument->RemoveFromFormulaTree( this );
// Loading from within filter? No listening yet!
if( pDocument->IsInsertingFromOtherDoc() )
- bNoListening = TRUE;
+ bNoListening = sal_True;
if( !bNoListening && pCode->GetCodeLen() )
EndListeningTo( pDocument );
@@ -977,9 +977,9 @@ void ScFormulaCell::CompileTokenArray( BOOL bNoListening )
{
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bChanged = TRUE;
+ bChanged = sal_True;
aResult.SetToken( NULL);
- bCompile = FALSE;
+ bCompile = sal_False;
if ( !bNoListening )
StartListeningTo( pDocument );
}
@@ -1024,14 +1024,14 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
{
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bChanged = TRUE;
- bCompile = FALSE;
+ bChanged = sal_True;
+ bCompile = sal_False;
StartListeningTo( pDocument );
}
}
else
{
- bChanged = TRUE;
+ bChanged = sal_True;
SetTextWidth( TEXTWIDTH_DIRTY );
SetScriptType( SC_SCRIPTTYPE_UNKNOWN );
}
@@ -1039,21 +1039,21 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress )
// Same as in Load: after loading, it must be known if ocMacro is in any formula
// (for macro warning, CompileXML is called at the end of loading XML file)
if ( !pDocument->GetHasMacroFunc() && pCode->HasOpCodeRPN( ocMacro ) )
- pDocument->SetHasMacroFunc( TRUE );
+ pDocument->SetHasMacroFunc( sal_True );
}
void ScFormulaCell::CalcAfterLoad()
{
- BOOL bNewCompiled = FALSE;
+ sal_Bool bNewCompiled = sal_False;
// Falls ein Calc 1.0-Doc eingelesen wird, haben wir ein Ergebnis,
// aber kein TokenArray
if( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), TRUE, eTempGrammar);
+ Compile( aResult.GetHybridFormula(), sal_True, eTempGrammar);
aResult.SetToken( NULL);
- bDirty = TRUE;
- bNewCompiled = TRUE;
+ bDirty = sal_True;
+ bNewCompiled = sal_True;
}
// Das UPN-Array wird nicht erzeugt, wenn ein Calc 3.0-Doc eingelesen
// wurde, da die RangeNames erst jetzt existieren.
@@ -1064,9 +1064,9 @@ void ScFormulaCell::CalcAfterLoad()
bSubTotal = aComp.CompileTokenArray();
nFormatType = aComp.GetNumFormatType();
nFormatIndex = 0;
- bDirty = TRUE;
- bCompile = FALSE;
- bNewCompiled = TRUE;
+ bDirty = sal_True;
+ bCompile = sal_False;
+ bNewCompiled = sal_True;
}
// irgendwie koennen unter os/2 mit rotter FPU-Exception /0 ohne Err503
// gespeichert werden, woraufhin spaeter im NumberFormatter die BLC Lib
@@ -1076,7 +1076,7 @@ void ScFormulaCell::CalcAfterLoad()
{
DBG_ERRORFILE("Formelzelle INFINITY !!! Woher kommt das Dokument?");
aResult.SetResultError( errIllegalFPOperation );
- bDirty = TRUE;
+ bDirty = sal_True;
}
// DoubleRefs bei binaeren Operatoren waren vor v5.0 immer Matrix,
// jetzt nur noch wenn in Matrixformel, sonst implizite Schnittmenge
@@ -1093,12 +1093,12 @@ void ScFormulaCell::CalcAfterLoad()
{
StartListeningTo( pDocument );
if( !pCode->IsRecalcModeNormal() )
- bDirty = TRUE;
+ bDirty = sal_True;
}
if ( pCode->IsRecalcModeAlways() )
{ // zufall(), heute(), jetzt() bleiben immer im FormulaTree, damit sie
// auch bei jedem F9 berechnet werden.
- bDirty = TRUE;
+ bDirty = sal_True;
}
// Noch kein SetDirty weil noch nicht alle Listener bekannt, erst in
// SetDirtyAfterLoad.
@@ -1275,10 +1275,10 @@ void ScFormulaCell::Interpret()
erDEBUGDOT_OUT( pDocument->GetRecursionHelper().GetIteration() ? "magenta" : "");
ScRecursionHelper& rRecursionHelper = pDocument->GetRecursionHelper();
- BOOL bOldRunning = bRunning;
+ sal_Bool bOldRunning = bRunning;
if (rRecursionHelper.GetRecursionCount() > MAXRECURSION)
{
- bRunning = TRUE;
+ bRunning = sal_True;
rRecursionHelper.SetInRecursionReturn( true);
}
else
@@ -1318,13 +1318,13 @@ void ScFormulaCell::Interpret()
aOldStart; ++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = TRUE;
+ pIterCell->bIsIterCell = sal_True;
}
// Mark older cells dirty again, in case they converted
// without accounting for all remaining cells in the circle
// that weren't touched so far, e.g. conditional. Restore
// backuped result.
- USHORT nIteration = rRecursionHelper.GetIteration();
+ sal_uInt16 nIteration = rRecursionHelper.GetIteration();
for (ScFormulaRecursionList::const_iterator aIter(
aOldStart); aIter !=
rRecursionHelper.GetIterationEnd(); ++aIter)
@@ -1338,7 +1338,7 @@ void ScFormulaCell::Interpret()
}
--pIterCell->nSeenInIteration;
}
- pIterCell->bDirty = TRUE;
+ pIterCell->bDirty = sal_True;
}
}
else
@@ -1355,11 +1355,11 @@ void ScFormulaCell::Interpret()
rRecursionHelper.GetIterationEnd(); ++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = TRUE;
+ pIterCell->bIsIterCell = sal_True;
}
}
bIterationFromRecursion = false;
- USHORT nIterMax = pDocument->GetDocOptions().GetIterCount();
+ sal_uInt16 nIterMax = pDocument->GetDocOptions().GetIterCount();
for ( ; rRecursionHelper.GetIteration() <= nIterMax && !rDone;
rRecursionHelper.IncIteration())
{
@@ -1396,7 +1396,7 @@ void ScFormulaCell::Interpret()
++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = FALSE;
+ pIterCell->bIsIterCell = sal_False;
pIterCell->nSeenInIteration = 0;
pIterCell->bRunning = (*aIter).bOldRunning;
}
@@ -1409,16 +1409,16 @@ void ScFormulaCell::Interpret()
++aIter)
{
pIterCell = (*aIter).pCell;
- pIterCell->bIsIterCell = FALSE;
+ pIterCell->bIsIterCell = sal_False;
pIterCell->nSeenInIteration = 0;
pIterCell->bRunning = (*aIter).bOldRunning;
// If one cell didn't converge, all cells of this
// circular dependency don't, no matter whether
// single cells did.
- pIterCell->bDirty = FALSE;
- pIterCell->bTableOpDirty = FALSE;
+ pIterCell->bDirty = sal_False;
+ pIterCell->bTableOpDirty = sal_False;
pIterCell->aResult.SetResultError( errNoConvergence);
- pIterCell->bChanged = TRUE;
+ pIterCell->bChanged = sal_True;
pIterCell->SetTextWidth( TEXTWIDTH_DIRTY);
pIterCell->SetScriptType( SC_SCRIPTTYPE_UNKNOWN);
}
@@ -1533,12 +1533,12 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
pDocument->IncInterpretLevel();
ScInterpreter* p = new ScInterpreter( this, pDocument, aPos, *pCode );
StackCleaner aStackCleaner( pDocument, p);
- USHORT nOldErrCode = aResult.GetResultError();
+ sal_uInt16 nOldErrCode = aResult.GetResultError();
if ( nSeenInIteration == 0 )
{ // Only the first time
- // With bChanged=FALSE, if a newly compiled cell has a result of
+ // With bChanged=sal_False, if a newly compiled cell has a result of
// 0.0, no change is detected and the cell will not be repainted.
- // bChanged = FALSE;
+ // bChanged = sal_False;
aResult.SetResultError( 0 );
}
@@ -1549,8 +1549,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
break;
}
- BOOL bOldRunning = bRunning;
- bRunning = TRUE;
+ sal_Bool bOldRunning = bRunning;
+ bRunning = sal_True;
p->Interpret();
if (pDocument->GetRecursionHelper().IsInReturn() && eTailParam != SCITP_CLOSE_ITERATION_CIRCLE)
{
@@ -1562,17 +1562,17 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// #i102616# For single-sheet saving consider only content changes, not format type,
// because format type isn't set on loading (might be changed later)
- BOOL bContentChanged = FALSE;
+ sal_Bool bContentChanged = sal_False;
// Do not create a HyperLink() cell if the formula results in an error.
if( p->GetError() && pCode->IsHyperLink())
- pCode->SetHyperLink(FALSE);
+ pCode->SetHyperLink(sal_False);
if( p->GetError() && p->GetError() != errCircularReference)
{
- bDirty = FALSE;
- bTableOpDirty = FALSE;
- bChanged = TRUE;
+ bDirty = sal_False;
+ bTableOpDirty = sal_False;
+ bChanged = sal_True;
}
if (eTailParam == SCITP_FROM_ITERATION && IsDirtyOrInTableOpDirty())
{
@@ -1594,8 +1594,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if (nSeenInIteration > 1 ||
pDocument->GetDocOptions().GetIterCount() == 1)
{
- bDirty = FALSE;
- bTableOpDirty = FALSE;
+ bDirty = sal_False;
+ bTableOpDirty = sal_False;
}
}
}
@@ -1603,21 +1603,21 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// New error code?
if( p->GetError() != nOldErrCode )
{
- bChanged = TRUE;
+ bChanged = sal_True;
// bContentChanged only has to be set if the file content would be changed
if ( aResult.GetCellResultType() != svUnknown )
- bContentChanged = TRUE;
+ bContentChanged = sal_True;
}
// Different number format?
if( nFormatType != p->GetRetFormatType() )
{
nFormatType = p->GetRetFormatType();
- bChanged = TRUE;
+ bChanged = sal_True;
}
if( nFormatIndex != p->GetRetFormatIndex() )
{
nFormatIndex = p->GetRetFormatIndex();
- bChanged = TRUE;
+ bChanged = sal_True;
}
// In case of changes just obtain the result, no temporary and
@@ -1670,7 +1670,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// no change, see above
}
else
- bContentChanged = TRUE;
+ bContentChanged = sal_True;
}
aResult.Assign( aNewResult);
@@ -1683,7 +1683,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
&& nFormatType != NUMBERFORMAT_TIME
&& nFormatType != NUMBERFORMAT_DATETIME )
{
- ULONG nFormat = pDocument->GetNumberFormat( aPos );
+ sal_uLong nFormat = pDocument->GetNumberFormat( aPos );
if ( nFormatIndex && (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
nFormat = nFormatIndex;
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
@@ -1694,8 +1694,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
}
if (eTailParam == SCITP_NORMAL)
{
- bDirty = FALSE;
- bTableOpDirty = FALSE;
+ bDirty = sal_False;
+ bTableOpDirty = sal_False;
}
if( aResult.GetMatrix().Is() )
{
@@ -1707,7 +1707,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( aResult.IsValue() && !::rtl::math::isFinite( aResult.GetDouble() ) )
{
// Coded double error may occur via filter import.
- USHORT nErr = GetDoubleErrorValue( aResult.GetDouble());
+ sal_uInt16 nErr = GetDoubleErrorValue( aResult.GetDouble());
aResult.SetResultError( nErr);
bChanged = bContentChanged = true;
}
@@ -1718,9 +1718,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
}
if (bContentChanged && pDocument->IsStreamValid(aPos.Tab()))
{
- // pass bIgnoreLock=TRUE, because even if called from pending row height update,
+ // pass bIgnoreLock=sal_True, because even if called from pending row height update,
// a changed result must still reset the stream flag
- pDocument->SetStreamValid(aPos.Tab(), FALSE, TRUE);
+ pDocument->SetStreamValid(aPos.Tab(), sal_False, sal_True);
}
if ( !pCode->IsRecalcModeAlways() )
pDocument->RemoveFromFormulaTree( this );
@@ -1729,7 +1729,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( pCode->IsRecalcModeForced() )
{
- ULONG nValidation = ((const SfxUInt32Item*) pDocument->GetAttr(
+ sal_uLong nValidation = ((const SfxUInt32Item*) pDocument->GetAttr(
aPos.Col(), aPos.Row(), aPos.Tab(), ATTR_VALIDDATA ))->GetValue();
if ( nValidation )
{
@@ -1747,8 +1747,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
{
// Zelle bei Compiler-Fehlern nicht ewig auf dirty stehenlassen
DBG_ASSERT( pCode->GetCodeError(), "kein UPN-Code und kein Fehler ?!?!" );
- bDirty = FALSE;
- bTableOpDirty = FALSE;
+ bDirty = sal_False;
+ bTableOpDirty = sal_False;
}
}
@@ -1776,7 +1776,7 @@ void ScFormulaCell::GetMatColsRows( SCCOL & nCols, SCROW & nRows ) const
}
-ULONG ScFormulaCell::GetStandardFormat( SvNumberFormatter& rFormatter, ULONG nFormat ) const
+sal_uLong ScFormulaCell::GetStandardFormat( SvNumberFormatter& rFormatter, sal_uLong nFormat ) const
{
if ( nFormatIndex && (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
return nFormatIndex;
@@ -1793,23 +1793,23 @@ void __EXPORT ScFormulaCell::Notify( SvtBroadcaster&, const SfxHint& rHint)
if ( !pDocument->IsInDtorClear() && !pDocument->GetHardRecalcState() )
{
const ScHint* p = PTR_CAST( ScHint, &rHint );
- ULONG nHint = (p ? p->GetId() : 0);
+ sal_uLong nHint = (p ? p->GetId() : 0);
if (nHint & (SC_HINT_DATACHANGED | SC_HINT_DYING | SC_HINT_TABLEOPDIRTY))
{
- BOOL bForceTrack = FALSE;
+ sal_Bool bForceTrack = sal_False;
if ( nHint & SC_HINT_TABLEOPDIRTY )
{
bForceTrack = !bTableOpDirty;
if ( !bTableOpDirty )
{
pDocument->AddTableOpFormulaCell( this );
- bTableOpDirty = TRUE;
+ bTableOpDirty = sal_True;
}
}
else
{
bForceTrack = !bDirty;
- bDirty = TRUE;
+ bDirty = sal_True;
}
// #35962# Don't remove from FormulaTree to put in FormulaTrack to
// put in FormulaTree again and again, only if necessary.
@@ -1832,29 +1832,29 @@ void ScFormulaCell::SetDirty()
if ( !IsInChangeTrack() )
{
if ( pDocument->GetHardRecalcState() )
- bDirty = TRUE;
+ bDirty = sal_True;
else
{
// Mehrfach-FormulaTracking in Load und in CompileAll
// nach CopyScenario und CopyBlockFromClip vermeiden.
- // Wenn unbedingtes FormulaTracking noetig, vor SetDirty bDirty=FALSE
+ // Wenn unbedingtes FormulaTracking noetig, vor SetDirty bDirty=sal_False
// setzen, z.B. in CompileTokenArray
if ( !bDirty || !pDocument->IsInFormulaTree( this ) )
{
- bDirty = TRUE;
+ bDirty = sal_True;
pDocument->AppendToFormulaTrack( this );
pDocument->TrackFormulas();
}
}
if (pDocument->IsStreamValid(aPos.Tab()))
- pDocument->SetStreamValid(aPos.Tab(), FALSE);
+ pDocument->SetStreamValid(aPos.Tab(), sal_False);
}
}
void ScFormulaCell::SetDirtyAfterLoad()
{
- bDirty = TRUE;
+ bDirty = sal_True;
if ( !pDocument->GetHardRecalcState() )
pDocument->PutInFormulaTree( this );
}
@@ -1864,7 +1864,7 @@ void ScFormulaCell::SetTableOpDirty()
if ( !IsInChangeTrack() )
{
if ( pDocument->GetHardRecalcState() )
- bTableOpDirty = TRUE;
+ bTableOpDirty = sal_True;
else
{
if ( !bTableOpDirty || !pDocument->IsInFormulaTree( this ) )
@@ -1872,7 +1872,7 @@ void ScFormulaCell::SetTableOpDirty()
if ( !bTableOpDirty )
{
pDocument->AddTableOpFormulaCell( this );
- bTableOpDirty = TRUE;
+ bTableOpDirty = sal_True;
}
pDocument->AppendToFormulaTrack( this );
pDocument->TrackFormulas( SC_HINT_TABLEOPDIRTY );
@@ -1882,13 +1882,13 @@ void ScFormulaCell::SetTableOpDirty()
}
-BOOL ScFormulaCell::IsDirtyOrInTableOpDirty() const
+sal_Bool ScFormulaCell::IsDirtyOrInTableOpDirty() const
{
return bDirty || (bTableOpDirty && pDocument->IsInInterpreterTableOp());
}
-void ScFormulaCell::SetErrCode( USHORT n )
+void ScFormulaCell::SetErrCode( sal_uInt16 n )
{
/* FIXME: check the numerous places where ScTokenArray::GetCodeError() is
* used whether it is solely for transport of a simple result error and get
@@ -1903,7 +1903,7 @@ void ScFormulaCell::SetErrCode( USHORT n )
void ScFormulaCell::AddRecalcMode( ScRecalcMode nBits )
{
if ( (nBits & RECALCMODE_EMASK) != RECALCMODE_NORMAL )
- bDirty = TRUE;
+ bDirty = sal_True;
if ( nBits & RECALCMODE_ONLOAD_ONCE )
{ // OnLoadOnce nur zum Dirty setzen nach Filter-Import
nBits = (nBits & ~RECALCMODE_EMASK) | RECALCMODE_NORMAL;
@@ -1920,13 +1920,13 @@ void ScFormulaCell::GetURLResult( String& rURL, String& rCellText )
// Cell Text uses the Cell format while the URL uses
// the default format for the type.
- ULONG nCellFormat = pDocument->GetNumberFormat( aPos );
+ sal_uLong nCellFormat = pDocument->GetNumberFormat( aPos );
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
if ( (nCellFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
nCellFormat = GetStandardFormat( *pFormatter,nCellFormat );
- ULONG nURLFormat = ScGlobal::GetStandardFormat( *pFormatter,nCellFormat, NUMBERFORMAT_NUMBER);
+ sal_uLong nURLFormat = ScGlobal::GetStandardFormat( *pFormatter,nCellFormat, NUMBERFORMAT_NUMBER);
if ( IsValue() )
{
@@ -1992,25 +1992,25 @@ ScDetectiveRefIter::ScDetectiveRefIter( ScFormulaCell* pCell )
aPos = pCell->aPos;
}
-BOOL lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
+sal_Bool lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
{
ScSingleRefData& rRef1 = p->GetSingleRef();
if ( rRef1.IsColDeleted() || rRef1.IsRowDeleted() || rRef1.IsTabDeleted()
|| !rRef1.Valid() )
- return TRUE;
+ return sal_True;
if ( p->GetType() == svDoubleRef )
{
ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if ( rRef2.IsColDeleted() || rRef2.IsRowDeleted() || rRef2.IsTabDeleted()
|| !rRef2.Valid() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange )
+sal_Bool ScDetectiveRefIter::GetNextRef( ScRange& rRange )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());
if (p)
@@ -2028,7 +2028,7 @@ BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange )
SingleDoubleRefProvider aProv( *p );
rRange.aStart.Set( aProv.Ref1.nCol, aProv.Ref1.nRow, aProv.Ref1.nTab );
rRange.aEnd.Set( aProv.Ref2.nCol, aProv.Ref2.nRow, aProv.Ref2.nTab );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 1aab26acf3aa..e4631dde2d9a 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -57,7 +57,7 @@ using namespace formula;
// STATIC DATA -----------------------------------------------------------
#ifdef USE_MEMPOOL
-const USHORT nMemPoolEditCell = (0x1000 - 64) / sizeof(ScNoteCell);
+const sal_uInt16 nMemPoolEditCell = (0x1000 - 64) / sizeof(ScNoteCell);
IMPL_FIXEDMEMPOOL_NEWDEL( ScEditCell, nMemPoolEditCell, nMemPoolEditCell )
#endif
@@ -153,9 +153,9 @@ void ScEditCell::SetTextObject( const EditTextObject* pObject,
EditEngine& rEngine = pDoc->GetEditEngine();
if ( pObject->HasOnlineSpellErrors() )
{
- ULONG nControl = rEngine.GetControlWord();
- const ULONG nSpellControl = EE_CNTRL_ONLINESPELLING | EE_CNTRL_ALLOWBIGOBJS;
- BOOL bNewControl = ( (nControl & nSpellControl) != nSpellControl );
+ sal_uLong nControl = rEngine.GetControlWord();
+ const sal_uLong nSpellControl = EE_CNTRL_ONLINESPELLING | EE_CNTRL_ALLOWBIGOBJS;
+ sal_Bool bNewControl = ( (nControl & nSpellControl) != nSpellControl );
if ( bNewControl )
rEngine.SetControlWord( nControl | nSpellControl );
rEngine.SetText( *pObject );
@@ -393,21 +393,21 @@ bool lcl_isReference(const FormulaToken& rToken)
}
-BOOL ScFormulaCell::IsEmpty()
+sal_Bool ScFormulaCell::IsEmpty()
{
if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc())
Interpret();
return aResult.GetCellResultType() == formula::svEmptyCell;
}
-BOOL ScFormulaCell::IsEmptyDisplayedAsString()
+sal_Bool ScFormulaCell::IsEmptyDisplayedAsString()
{
if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc())
Interpret();
return aResult.IsEmptyDisplayedAsString();
}
-BOOL ScFormulaCell::IsValue()
+sal_Bool ScFormulaCell::IsValue()
{
if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc())
Interpret();
@@ -451,20 +451,20 @@ const ScMatrix* ScFormulaCell::GetMatrix()
// Was stored !bDirty but an accompanying matrix cell was bDirty?
// => we need to get the matrix.
if (!bDirty && cMatrixFlag == MM_FORMULA && !aResult.GetMatrix().Is())
- bDirty = TRUE;
+ bDirty = sal_True;
if ( IsDirtyOrInTableOpDirty() )
Interpret();
}
return aResult.GetMatrix();
}
-BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
+sal_Bool ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
{
switch ( cMatrixFlag )
{
case MM_FORMULA :
rPos = aPos;
- return TRUE;
+ return sal_True;
// break;
case MM_REFERENCE :
{
@@ -477,13 +477,13 @@ BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
if ( rRef.Valid() )
{
rPos.Set( rRef.nCol, rRef.nRow, rRef.nTab );
- return TRUE;
+ return sal_True;
}
}
}
break;
}
- return FALSE;
+ return sal_False;
}
@@ -499,7 +499,7 @@ BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
(reserviert: offen: 32)
*/
-USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
+sal_uInt16 ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
{
switch ( cMatrixFlag )
{
@@ -532,7 +532,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
ScBaseCell* pCell;
ScAddress aAdr( aOrg );
aAdr.IncCol();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
do
{
pCell = pDocument->GetCell( aAdr );
@@ -544,11 +544,11 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
aAdr.IncCol();
}
else
- bCont = FALSE;
+ bCont = sal_False;
} while ( bCont );
aAdr = aOrg;
aAdr.IncRow();
- bCont = TRUE;
+ bCont = sal_True;
do
{
pCell = pDocument->GetCell( aAdr );
@@ -560,7 +560,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
aAdr.IncRow();
}
else
- bCont = FALSE;
+ bCont = sal_False;
} while ( bCont );
pFCell->SetMatColsRows( nC, nR );
}
@@ -583,7 +583,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
// here we are, healthy and clean, somewhere in between
SCsCOL dC = aPos.Col() - aOrg.Col();
SCsROW dR = aPos.Row() - aOrg.Row();
- USHORT nEdges = 0;
+ sal_uInt16 nEdges = 0;
if ( dC >= 0 && dR >= 0 && dC < nC && dR < nR )
{
if ( dC == 0 )
@@ -626,28 +626,28 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
}
}
-USHORT ScFormulaCell::GetErrCode()
+sal_uInt16 ScFormulaCell::GetErrCode()
{
if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc())
Interpret();
/* FIXME: If ScTokenArray::SetCodeError() was really only for code errors
* and not also abused for signaling other error conditions we could bail
* out even before attempting to interpret broken code. */
- USHORT nErr = pCode->GetCodeError();
+ sal_uInt16 nErr = pCode->GetCodeError();
if (nErr)
return nErr;
return aResult.GetResultError();
}
-USHORT ScFormulaCell::GetRawError()
+sal_uInt16 ScFormulaCell::GetRawError()
{
- USHORT nErr = pCode->GetCodeError();
+ sal_uInt16 nErr = pCode->GetCodeError();
if (nErr)
return nErr;
return aResult.GetResultError();
}
-BOOL ScFormulaCell::HasOneReference( ScRange& r ) const
+sal_Bool ScFormulaCell::HasOneReference( ScRange& r ) const
{
pCode->Reset();
ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());
@@ -661,10 +661,10 @@ BOOL ScFormulaCell::HasOneReference( ScRange& r ) const
r.aEnd.Set( aProv.Ref2.nCol,
aProv.Ref2.nRow,
aProv.Ref2.nTab );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
bool
@@ -721,7 +721,7 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const
return false;
}
-BOOL ScFormulaCell::HasRelNameReference() const
+sal_Bool ScFormulaCell::HasRelNameReference() const
{
pCode->Reset();
ScToken* t;
@@ -730,12 +730,12 @@ BOOL ScFormulaCell::HasRelNameReference() const
if ( t->GetSingleRef().IsRelName() ||
(t->GetType() == formula::svDoubleRef &&
t->GetDoubleRef().Ref2.IsRelName()) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScFormulaCell::HasColRowName() const
+sal_Bool ScFormulaCell::HasColRowName() const
{
pCode->Reset();
return (pCode->GetNextColRowName() != NULL);
@@ -759,8 +759,8 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pUndoCellPos )
aUndoPos = *pUndoCellPos;
ScAddress aOldPos( aPos );
-// BOOL bPosChanged = FALSE; // ob diese Zelle bewegt wurde
- BOOL bIsInsert = FALSE;
+// sal_Bool bPosChanged = sal_False; // ob diese Zelle bewegt wurde
+ sal_Bool bIsInsert = sal_False;
if (eUpdateRefMode == URM_INSDEL)
{
bIsInsert = (nDx >= 0 && nDy >= 0 && nDz >= 0);
@@ -775,7 +775,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
else if ( nCol > MAXCOL )
nCol = MAXCOL;
aPos.SetCol( nCol );
-// bPosChanged = TRUE;
+// bPosChanged = sal_True;
}
}
if ( nDy && nCol >= nCol1 && nCol <= nCol2 &&
@@ -789,7 +789,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
else if ( nRow > MAXROW )
nRow = MAXROW;
aPos.SetRow( nRow );
-// bPosChanged = TRUE;
+// bPosChanged = sal_True;
}
}
if ( nDz && nCol >= nCol1 && nCol <= nCol2 &&
@@ -804,19 +804,19 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
else if ( nTab > nMaxTab )
nTab = nMaxTab;
aPos.SetTab( nTab );
-// bPosChanged = TRUE;
+// bPosChanged = sal_True;
}
}
}
else if ( r.In( aPos ) )
{
aOldPos.Set( nCol - nDx, nRow - nDy, nTab - nDz );
-// bPosChanged = TRUE;
+// bPosChanged = sal_True;
}
- BOOL bHasRefs = FALSE;
- BOOL bHasColRowNames = FALSE;
- BOOL bOnRefMove = FALSE;
+ sal_Bool bHasRefs = sal_False;
+ sal_Bool bHasColRowNames = sal_False;
+ sal_Bool bOnRefMove = sal_False;
if ( !pDocument->IsClipOrUndo() )
{
pCode->Reset();
@@ -832,10 +832,10 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if( bHasRefs || bOnRefMove )
{
ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL;
- BOOL bValChanged;
+ sal_Bool bValChanged;
ScRangeData* pRangeData;
- BOOL bRangeModified; // any range, not only shared formula
- BOOL bRefSizeChanged;
+ sal_Bool bRangeModified; // any range, not only shared formula
+ sal_Bool bRefSizeChanged;
if ( bHasRefs )
{
ScCompiler aComp(pDocument, aPos, *pCode);
@@ -847,16 +847,16 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
else
{
- bValChanged = FALSE;
+ bValChanged = sal_False;
pRangeData = NULL;
- bRangeModified = FALSE;
- bRefSizeChanged = FALSE;
+ bRangeModified = sal_False;
+ bRefSizeChanged = sal_False;
}
if ( bOnRefMove )
bOnRefMove = (bValChanged || (aPos != aOldPos));
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
- BOOL bColRowNameCompile, bHasRelName, bNewListening, bInDeleteUndo;
+ sal_Bool bColRowNameCompile, bHasRelName, bNewListening, bInDeleteUndo;
if ( bHasRefs )
{
// Upon Insert ColRowNames have to be recompiled in case the
@@ -865,7 +865,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
(eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0));
if ( bColRowNameCompile )
{
- bColRowNameCompile = FALSE;
+ bColRowNameCompile = sal_False;
ScToken* t;
ScRangePairList* pColList = pDocument->GetColNameRanges();
ScRangePairList* pRowList = pDocument->GetRowNameRanges();
@@ -881,12 +881,12 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pR )
{ // definiert
if ( pR->GetRange(1).aStart.Row() == nRow1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
else
{ // on the fly
if ( rRef.nRow + 1 == nRow1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
}
if ( nDx > 0 && rRef.IsRowRel() )
@@ -897,12 +897,12 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( pR )
{ // definiert
if ( pR->GetRange(1).aStart.Col() == nCol1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
else
{ // on the fly
if ( rRef.nCol + 1 == nCol1 )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
}
}
@@ -913,11 +913,11 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
bColRowNameCompile = bCompile; // evtl. aus Copy-ctor
if ( !bColRowNameCompile )
{
- BOOL bMoved = (aPos != aOldPos);
+ sal_Bool bMoved = (aPos != aOldPos);
pCode->Reset();
ScToken* t = static_cast<ScToken*>(pCode->GetNextColRowName());
if ( t && bMoved )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
while ( t && !bColRowNameCompile )
{
ScSingleRefData& rRef = t->GetSingleRef();
@@ -926,7 +926,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
{
ScAddress aAdr( rRef.nCol, rRef.nRow, rRef.nTab );
if ( r.In( aAdr ) )
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
t = static_cast<ScToken*>(pCode->GetNextColRowName());
}
@@ -934,13 +934,13 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
else if ( eUpdateRefMode == URM_COPY && bHasColRowNames && bValChanged )
{
- bColRowNameCompile = TRUE;
+ bColRowNameCompile = sal_True;
}
ScChangeTrack* pChangeTrack = pDocument->GetChangeTrack();
if ( pChangeTrack && pChangeTrack->IsInDeleteUndo() )
- bInDeleteUndo = TRUE;
+ bInDeleteUndo = sal_True;
else
- bInDeleteUndo = FALSE;
+ bInDeleteUndo = sal_False;
// RelNameRefs are always moved
bHasRelName = HasRelNameReference();
// Reference changed and new listening needed?
@@ -960,19 +960,19 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
else
{
bColRowNameCompile = bHasRelName = bNewListening = bInDeleteUndo =
- FALSE;
+ sal_False;
}
- BOOL bNeedDirty;
+ sal_Bool bNeedDirty;
// NeedDirty bei Aenderungen ausser Copy und Move/Insert ohne RelNames
if ( bRangeModified || pRangeData || bColRowNameCompile ||
(bValChanged && eUpdateRefMode != URM_COPY &&
(eUpdateRefMode != URM_MOVE || bHasRelName) &&
(!bIsInsert || bHasRelName || bInDeleteUndo ||
bRefSizeChanged)) || bOnRefMove)
- bNeedDirty = TRUE;
+ bNeedDirty = sal_True;
else
- bNeedDirty = FALSE;
+ bNeedDirty = sal_False;
if (pUndoDoc && (bValChanged || pRangeData || bOnRefMove))
{
// Copy the cell to aUndoPos, which is its current position in the document,
@@ -990,7 +990,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
pUndoDoc->PutCell( aUndoPos, pFCell );
}
}
- bValChanged = FALSE;
+ bValChanged = sal_False;
if ( pRangeData )
{ // Replace shared formula with own formula
pDocument->RemoveFromFormulaTree( this ); // update formula count
@@ -1002,13 +1002,13 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.UpdateSharedFormulaReference( eUpdateRefMode, aOldPos, r,
nDx, nDy, nDz );
- bValChanged = TRUE;
- bNeedDirty = TRUE;
+ bValChanged = sal_True;
+ bNeedDirty = sal_True;
}
if ( ( bCompile = (bCompile || bValChanged || bRangeModified || bColRowNameCompile) ) != 0 )
{
CompileTokenArray( bNewListening ); // kein Listening
- bNeedDirty = TRUE;
+ bNeedDirty = sal_True;
}
if ( !bInDeleteUndo )
{ // In ChangeTrack Delete-Reject listeners are established in
@@ -1021,7 +1021,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
// UpdateReference calls.
// All replaced shared formula listeners have to be
// established after an Insert or Delete. Do nothing here.
- SetNeedsListening( TRUE);
+ SetNeedsListening( sal_True);
}
else
StartListeningTo( pDocument );
@@ -1029,9 +1029,9 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
}
if ( bNeedDirty && (!(eUpdateRefMode == URM_INSDEL && bHasRelName) || pRangeData) )
{ // Referenzen abgeschnitten, ungueltig o.ae.?
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
// kein Interpret in SubMinimalRecalc wegen evtl. falscher Referenzen
- pDocument->SetAutoCalc( FALSE );
+ pDocument->SetAutoCalc( sal_False );
SetDirty();
pDocument->SetAutoCalc( bOldAutoCalc );
}
@@ -1042,7 +1042,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
void ScFormulaCell::UpdateInsertTab(SCTAB nTable)
{
- BOOL bPosChanged = ( aPos.Tab() >= nTable ? TRUE : FALSE );
+ sal_Bool bPosChanged = ( aPos.Tab() >= nTable ? sal_True : sal_False );
pCode->Reset();
if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
{
@@ -1053,21 +1053,21 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable)
ScRangeData* pRangeData;
ScCompiler aComp(pDocument, aPos, *pCode);
aComp.SetGrammar(pDocument->GetGrammar());
- pRangeData = aComp.UpdateInsertTab( nTable, FALSE );
+ pRangeData = aComp.UpdateInsertTab( nTable, sal_False );
if (pRangeData) // Shared Formula gegen echte Formel
{ // austauschen
- BOOL bRefChanged;
+ sal_Bool bRefChanged;
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pRangeData->GetCode() );
ScCompiler aComp2(pDocument, aPos, *pCode);
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
- aComp2.UpdateInsertTab( nTable, FALSE );
+ aComp2.UpdateInsertTab( nTable, sal_False );
// If the shared formula contained a named range/formula containing
// an absolute reference to a sheet, those have to be readjusted.
- aComp2.UpdateDeleteTab( nTable, FALSE, TRUE, bRefChanged );
- bCompile = TRUE;
+ aComp2.UpdateDeleteTab( nTable, sal_False, sal_True, bRefChanged );
+ bCompile = sal_True;
}
// kein StartListeningTo weil pTab[nTab] noch nicht existiert!
}
@@ -1075,10 +1075,10 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable)
aPos.IncTab();
}
-BOOL ScFormulaCell::UpdateDeleteTab(SCTAB nTable, BOOL bIsMove)
+sal_Bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove)
{
- BOOL bRefChanged = FALSE;
- BOOL bPosChanged = ( aPos.Tab() > nTable ? TRUE : FALSE );
+ sal_Bool bRefChanged = sal_False;
+ sal_Bool bPosChanged = ( aPos.Tab() > nTable ? sal_True : sal_False );
pCode->Reset();
if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
{
@@ -1089,7 +1089,7 @@ BOOL ScFormulaCell::UpdateDeleteTab(SCTAB nTable, BOOL bIsMove)
ScRangeData* pRangeData;
ScCompiler aComp(pDocument, aPos, *pCode);
aComp.SetGrammar(pDocument->GetGrammar());
- pRangeData = aComp.UpdateDeleteTab(nTable, bIsMove, FALSE, bRefChanged);
+ pRangeData = aComp.UpdateDeleteTab(nTable, bIsMove, sal_False, bRefChanged);
if (pRangeData) // Shared Formula gegen echte Formel
{ // austauschen
pDocument->RemoveFromFormulaTree( this ); // update formula count
@@ -1099,13 +1099,13 @@ BOOL ScFormulaCell::UpdateDeleteTab(SCTAB nTable, BOOL bIsMove)
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.CompileTokenArray();
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
- aComp2.UpdateDeleteTab( nTable, FALSE, FALSE, bRefChanged );
+ aComp2.UpdateDeleteTab( nTable, sal_False, sal_False, bRefChanged );
// If the shared formula contained a named range/formula containing
// an absolute reference to a sheet, those have to be readjusted.
- aComp2.UpdateInsertTab( nTable,TRUE );
+ aComp2.UpdateInsertTab( nTable,sal_True );
// bRefChanged kann beim letzten UpdateDeleteTab zurueckgesetzt worden sein
- bRefChanged = TRUE;
- bCompile = TRUE;
+ bRefChanged = sal_True;
+ bCompile = sal_True;
}
// kein StartListeningTo weil pTab[nTab] noch nicht korrekt!
}
@@ -1126,7 +1126,7 @@ void ScFormulaCell::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo )
ScRangeData* pRangeData;
ScCompiler aComp(pDocument, aPos, *pCode);
aComp.SetGrammar(pDocument->GetGrammar());
- pRangeData = aComp.UpdateMoveTab( nOldPos, nNewPos, FALSE );
+ pRangeData = aComp.UpdateMoveTab( nOldPos, nNewPos, sal_False );
if (pRangeData) // Shared Formula gegen echte Formel
{ // austauschen
pDocument->RemoveFromFormulaTree( this ); // update formula count
@@ -1136,8 +1136,8 @@ void ScFormulaCell::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo )
aComp2.SetGrammar(pDocument->GetGrammar());
aComp2.CompileTokenArray();
aComp2.MoveRelWrap(pRangeData->GetMaxCol(), pRangeData->GetMaxRow());
- aComp2.UpdateMoveTab( nOldPos, nNewPos, TRUE );
- bCompile = TRUE;
+ aComp2.UpdateMoveTab( nOldPos, nNewPos, sal_True );
+ bCompile = sal_True;
}
// kein StartListeningTo weil pTab[nTab] noch nicht korrekt!
}
@@ -1167,9 +1167,9 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable)
}
}
-BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
+sal_Bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pDocument->IsClipOrUndo() )
{
pCode->Reset();
@@ -1180,7 +1180,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if( !rRef1.IsTabRel() )
{
if( (SCsTAB) nTable != rRef1.nTab )
- bRet = TRUE;
+ bRet = sal_True;
else if (nTable != aPos.Tab())
rRef1.nTab = aPos.Tab();
}
@@ -1190,7 +1190,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if( !rRef2.IsTabRel() )
{
if( (SCsTAB) nTable != rRef2.nTab )
- bRet = TRUE;
+ bRet = sal_True;
else if (nTable != aPos.Tab())
rRef2.nTab = aPos.Tab();
}
@@ -1201,7 +1201,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
return bRet;
}
-void ScFormulaCell::UpdateCompile( BOOL bForceIfNameInUse )
+void ScFormulaCell::UpdateCompile( sal_Bool bForceIfNameInUse )
{
if ( bForceIfNameInUse && !bCompile )
bCompile = pCode->HasNameOrColRowName();
@@ -1214,7 +1214,7 @@ void ScFormulaCell::UpdateCompile( BOOL bForceIfNameInUse )
void ScFormulaCell::TransposeReference()
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
pCode->Reset();
ScToken* t;
while ( ( t = static_cast<ScToken*>(pCode->GetNextReference()) ) != NULL )
@@ -1222,11 +1222,11 @@ void ScFormulaCell::TransposeReference()
ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.IsRowRel() )
{
- BOOL bDouble = (t->GetType() == formula::svDoubleRef);
+ sal_Bool bDouble = (t->GetType() == formula::svDoubleRef);
ScSingleRefData& rRef2 = (bDouble ? t->GetDoubleRef().Ref2 : rRef1);
if ( !bDouble || (rRef2.IsColRel() && rRef2.IsRowRel()) )
{
- INT16 nTemp;
+ sal_Int16 nTemp;
nTemp = rRef1.nRelCol;
rRef1.nRelCol = static_cast<SCCOL>(rRef1.nRelRow);
@@ -1239,13 +1239,13 @@ void ScFormulaCell::TransposeReference()
rRef2.nRelRow = static_cast<SCROW>(nTemp);
}
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
if (bFound)
- bCompile = TRUE;
+ bCompile = sal_True;
}
void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
@@ -1254,7 +1254,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
EndListeningTo( pDocument );
ScAddress aOldPos = aPos;
- BOOL bPosChanged = FALSE; // ob diese Zelle bewegt wurde
+ sal_Bool bPosChanged = sal_False; // ob diese Zelle bewegt wurde
ScRange aDestRange( rDest, ScAddress(
static_cast<SCCOL>(rDest.Col() + rSource.aEnd.Row() - rSource.aStart.Row()),
@@ -1268,11 +1268,11 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
SCsTAB nRelPosZ = aOldPos.Tab();
ScRefUpdate::DoTranspose( nRelPosX, nRelPosY, nRelPosZ, pDocument, aDestRange, rSource.aStart );
aOldPos.Set( nRelPosX, nRelPosY, nRelPosZ );
- bPosChanged = TRUE;
+ bPosChanged = sal_True;
}
ScTokenArray* pOld = pUndoDoc ? pCode->Clone() : NULL;
- BOOL bRefChanged = FALSE;
+ sal_Bool bRefChanged = sal_False;
ScToken* t;
ScRangeData* pShared = NULL;
@@ -1285,7 +1285,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
if (pName)
{
if (pName->IsModified())
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
if (pName->HasType(RT_SHAREDMOD))
pShared = pName;
}
@@ -1293,7 +1293,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
else if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aOldPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1303,7 +1303,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
if ( bMod )
{
t->CalcRelFromAbs( aPos );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
}
}
}
@@ -1313,14 +1313,14 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
{
if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aOldPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1343,7 +1343,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
pUndoDoc->PutCell( aPos.Col(), aPos.Row(), aPos.Tab(), pFCell );
}
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray(); // ruft auch StartListeningTo
SetDirty();
}
@@ -1357,7 +1357,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
{
EndListeningTo( pDocument );
- BOOL bRefChanged = FALSE;
+ sal_Bool bRefChanged = sal_False;
ScToken* t;
ScRangeData* pShared = NULL;
@@ -1370,7 +1370,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if (pName)
{
if (pName->IsModified())
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
if (pName->HasType(RT_SHAREDMOD))
pShared = pName;
}
@@ -1378,7 +1378,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
else if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1388,7 +1388,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if ( bMod )
{
t->CalcRelFromAbs( aPos );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
}
}
}
@@ -1398,14 +1398,14 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
pDocument->RemoveFromFormulaTree( this ); // update formula count
delete pCode;
pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = TRUE;
+ bRefChanged = sal_True;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
{
if( t->GetType() != svIndex )
{
t->CalcAbsIfRel( aPos );
- BOOL bMod;
+ sal_Bool bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
ScComplexRefData& rRef = aMod.Ref();
@@ -1420,7 +1420,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
if (bRefChanged)
{
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray(); // ruft auch StartListeningTo
SetDirty();
}
@@ -1428,39 +1428,39 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
StartListeningTo( pDocument ); // Listener wie vorher
}
-BOOL lcl_IsRangeNameInUse(USHORT nIndex, ScTokenArray* pCode, ScRangeName* pNames)
+sal_Bool lcl_IsRangeNameInUse(sal_uInt16 nIndex, ScTokenArray* pCode, ScRangeName* pNames)
{
for (FormulaToken* p = pCode->First(); p; p = pCode->Next())
{
if (p->GetOpCode() == ocName)
{
if (p->GetIndex() == nIndex)
- return TRUE;
+ return sal_True;
else
{
// RangeData kann Null sein in bestimmten Excel-Dateien (#31168#)
ScRangeData* pSubName = pNames->FindIndex(p->GetIndex());
if (pSubName && lcl_IsRangeNameInUse(nIndex,
pSubName->GetCode(), pNames))
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL ScFormulaCell::IsRangeNameInUse(USHORT nIndex) const
+sal_Bool ScFormulaCell::IsRangeNameInUse(sal_uInt16 nIndex) const
{
return lcl_IsRangeNameInUse( nIndex, pCode, pDocument->GetRangeName() );
}
-void lcl_FindRangeNamesInUse(std::set<USHORT>& rIndexes, ScTokenArray* pCode, ScRangeName* pNames)
+void lcl_FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes, ScTokenArray* pCode, ScRangeName* pNames)
{
for (FormulaToken* p = pCode->First(); p; p = pCode->Next())
{
if (p->GetOpCode() == ocName)
{
- USHORT nTokenIndex = p->GetIndex();
+ sal_uInt16 nTokenIndex = p->GetIndex();
rIndexes.insert( nTokenIndex );
ScRangeData* pSubName = pNames->FindIndex(p->GetIndex());
@@ -1470,7 +1470,7 @@ void lcl_FindRangeNamesInUse(std::set<USHORT>& rIndexes, ScTokenArray* pCode, Sc
}
}
-void ScFormulaCell::FindRangeNamesInUse(std::set<USHORT>& rIndexes) const
+void ScFormulaCell::FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes) const
{
lcl_FindRangeNamesInUse( rIndexes, pCode, pDocument->GetRangeName() );
}
@@ -1487,7 +1487,7 @@ void ScFormulaCell::ReplaceRangeNamesInUse( const ScRangeData::IndexMap& rMap )
if ( nIndex != nNewIndex )
{
p->SetIndex( nNewIndex );
- bCompile = TRUE;
+ bCompile = sal_True;
}
}
}
@@ -1502,7 +1502,7 @@ void ScFormulaCell::CompileDBFormula()
if ( p->GetOpCode() == ocDBArea
|| (p->GetOpCode() == ocName && p->GetIndex() >= SC_START_INDEX_DB_COLL) )
{
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray();
SetDirty();
break;
@@ -1510,14 +1510,14 @@ void ScFormulaCell::CompileDBFormula()
}
}
-void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString )
+void ScFormulaCell::CompileDBFormula( sal_Bool bCreateFormulaString )
{
// zwei Phasen, muessen (!) nacheinander aufgerufen werden:
// 1. FormelString mit alten Namen erzeugen
// 2. FormelString mit neuen Namen kompilieren
if ( bCreateFormulaString )
{
- BOOL bRecompile = FALSE;
+ sal_Bool bRecompile = sal_False;
pCode->Reset();
for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() )
{
@@ -1526,11 +1526,11 @@ void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString )
case ocBad: // DB-Bereich evtl. zugefuegt
case ocColRowName: // #36762# falls Namensgleichheit
case ocDBArea: // DB-Bereich
- bRecompile = TRUE;
+ bRecompile = sal_True;
break;
case ocName:
if ( p->GetIndex() >= SC_START_INDEX_DB_COLL )
- bRecompile = TRUE; // DB-Bereich
+ bRecompile = sal_True; // DB-Bereich
break;
default:
; // nothing
@@ -1555,20 +1555,20 @@ void ScFormulaCell::CompileDBFormula( BOOL bCreateFormulaString )
}
else if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), FALSE, eTempGrammar );
+ Compile( aResult.GetHybridFormula(), sal_False, eTempGrammar );
aResult.SetToken( NULL);
SetDirty();
}
}
-void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString )
+void ScFormulaCell::CompileNameFormula( sal_Bool bCreateFormulaString )
{
// zwei Phasen, muessen (!) nacheinander aufgerufen werden:
// 1. FormelString mit alten RangeNames erzeugen
// 2. FormelString mit neuen RangeNames kompilieren
if ( bCreateFormulaString )
{
- BOOL bRecompile = FALSE;
+ sal_Bool bRecompile = sal_False;
pCode->Reset();
for ( FormulaToken* p = pCode->First(); p && !bRecompile; p = pCode->Next() )
{
@@ -1576,11 +1576,11 @@ void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString )
{
case ocBad: // RangeName evtl. zugefuegt
case ocColRowName: // #36762# falls Namensgleichheit
- bRecompile = TRUE;
+ bRecompile = sal_True;
break;
default:
if ( p->GetType() == svIndex )
- bRecompile = TRUE; // RangeName
+ bRecompile = sal_True; // RangeName
}
}
if ( bRecompile )
@@ -1602,7 +1602,7 @@ void ScFormulaCell::CompileNameFormula( BOOL bCreateFormulaString )
}
else if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() )
{
- Compile( aResult.GetHybridFormula(), FALSE, eTempGrammar );
+ Compile( aResult.GetHybridFormula(), sal_False, eTempGrammar );
aResult.SetToken( NULL);
SetDirty();
}
@@ -1615,7 +1615,7 @@ void ScFormulaCell::CompileColRowNameFormula()
{
if ( p->GetOpCode() == ocColRowName )
{
- bCompile = TRUE;
+ bCompile = sal_True;
CompileTokenArray();
SetDirty();
break;
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index e9fd26ced939..092e93752124 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -58,7 +58,7 @@
// STATIC DATA -----------------------------------------------------------
using namespace formula;
-inline BOOL IsAmbiguousScriptNonZero( BYTE nScript )
+inline sal_Bool IsAmbiguousScriptNonZero( sal_uInt8 nScript )
{
//! move to a header file
return ( nScript != SCRIPTTYPE_LATIN &&
@@ -97,13 +97,13 @@ void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc)
}
-SCsROW ScColumn::GetNextUnprotected( SCROW nRow, BOOL bUp ) const
+SCsROW ScColumn::GetNextUnprotected( SCROW nRow, sal_Bool bUp ) const
{
return pAttrArray->GetNextUnprotected(nRow, bUp);
}
-USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
+sal_uInt16 ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
{
// nix:0, mitte:1, unten:2, links:4, oben:8, rechts:16, offen:32
if ( !pItems )
@@ -126,8 +126,8 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c
else
{
ScAddress aOrg( ScAddress::INITIALIZE_INVALID );
- BOOL bOpen = FALSE;
- USHORT nEdges = 0;
+ sal_Bool bOpen = sal_False;
+ sal_uInt16 nEdges = 0;
SCSIZE nIndex;
Search( nRow1, nIndex );
while ( nIndex < nCount && pItems[nIndex].nRow <= nRow2 )
@@ -140,7 +140,7 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c
if ( nEdges )
{
if ( nEdges & 8 )
- bOpen = TRUE; // obere Kante oeffnet, weitersehen
+ bOpen = sal_True; // obere Kante oeffnet, weitersehen
else if ( !bOpen )
return nEdges | 32; // es gibt was, was nicht geoeffnet wurde
else if ( nEdges & 1 )
@@ -151,7 +151,7 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c
|| ((nMask & 4) && (nEdges & 16) && !(nEdges & 4)) )
return nEdges; // nur linke/rechte Kante
if ( nEdges & 2 )
- bOpen = FALSE; // untere Kante schliesst
+ bOpen = sal_False; // untere Kante schliesst
}
}
nIndex++;
@@ -163,11 +163,11 @@ USHORT ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) c
}
-BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
+sal_Bool ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
{
if ( rMark.IsMultiMarked() )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
ScAddress aOrg( ScAddress::INITIALIZE_INVALID );
ScAddress aCurOrg( ScAddress::INITIALIZE_INVALID );
@@ -175,8 +175,8 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
ScMarkArrayIter aMarkIter( rMark.GetArray()+nCol );
while ( !bFound && aMarkIter.Next( nTop, nBottom ) )
{
- BOOL bOpen = FALSE;
- USHORT nEdges;
+ sal_Bool bOpen = sal_False;
+ sal_uInt16 nEdges;
SCSIZE nIndex;
Search( nTop, nIndex );
while ( !bFound && nIndex < nCount && pItems[nIndex].nRow <= nBottom )
@@ -189,16 +189,16 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
if ( nEdges )
{
if ( nEdges & 8 )
- bOpen = TRUE; // obere Kante oeffnet, weitersehen
+ bOpen = sal_True; // obere Kante oeffnet, weitersehen
else if ( !bOpen )
- return TRUE; // es gibt was, was nicht geoeffnet wurde
+ return sal_True; // es gibt was, was nicht geoeffnet wurde
else if ( nEdges & 1 )
- bFound = TRUE; // mittendrin, alles selektiert?
+ bFound = sal_True; // mittendrin, alles selektiert?
// (4 und nicht 16) oder (16 und nicht 4)
if ( (((nEdges & 4) | 16) ^ ((nEdges & 16) | 4)) )
- bFound = TRUE; // nur linke/rechte Kante, alles selektiert?
+ bFound = sal_True; // nur linke/rechte Kante, alles selektiert?
if ( nEdges & 2 )
- bOpen = FALSE; // untere Kante schliesst
+ bOpen = sal_False; // untere Kante schliesst
if ( bFound )
{ // alles selektiert?
@@ -218,41 +218,41 @@ BOOL ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
aOrg.Col() + nC - 1, aOrg.Row() + nR - 1,
aOrg.Tab() ) );
if ( rMark.IsAllMarked( aRange ) )
- bFound = FALSE;
+ bFound = sal_False;
}
else
- bFound = FALSE; // war schon
+ bFound = sal_False; // war schon
}
}
}
nIndex++;
}
if ( bOpen )
- return TRUE;
+ return sal_True;
}
return bFound;
}
else
- return FALSE;
+ return sal_False;
}
-//UNUSED2009-05 BOOL ScColumn::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
-//UNUSED2009-05 BOOL bLeft, BOOL bRight ) const
+//UNUSED2009-05 sal_Bool ScColumn::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+//UNUSED2009-05 sal_Bool bLeft, sal_Bool bRight ) const
//UNUSED2009-05 {
//UNUSED2009-05 return pAttrArray->HasLines( nRow1, nRow2, rSizes, bLeft, bRight );
//UNUSED2009-05 }
-bool ScColumn::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
+bool ScColumn::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
{
return pAttrArray->HasAttrib( nRow1, nRow2, nMask );
}
-BOOL ScColumn::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
+sal_Bool ScColumn::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCROW nTop;
SCROW nBottom;
@@ -263,7 +263,7 @@ BOOL ScColumn::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
while (aMarkIter.Next( nTop, nBottom ) && !bFound)
{
if (pAttrArray->HasAttrib( nTop, nBottom, nMask ))
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -271,15 +271,15 @@ BOOL ScColumn::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
}
-BOOL ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
+sal_Bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL& rPaintCol, SCROW& rPaintRow,
- BOOL bRefresh, BOOL bAttrs )
+ sal_Bool bRefresh, sal_Bool bAttrs )
{
return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh, bAttrs );
}
-void ScColumn::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, BOOL bDeep ) const
+void ScColumn::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, sal_Bool bDeep ) const
{
SCROW nTop;
SCROW nBottom;
@@ -297,7 +297,7 @@ void ScColumn::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkD
}
-void ScColumn::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, BOOL bDeep ) const
+void ScColumn::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, sal_Bool bDeep ) const
{
pAttrArray->MergePatternArea( nRow1, nRow2, rState, bDeep );
}
@@ -305,14 +305,14 @@ void ScColumn::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW
void ScColumn::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags,
- SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ) const
+ SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ) const
{
pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight );
}
void ScColumn::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight )
+ SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight )
{
pAttrArray->ApplyBlockFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight );
}
@@ -324,7 +324,7 @@ const ScPatternAttr* ScColumn::GetPattern( SCROW nRow ) const
}
-const SfxPoolItem* ScColumn::GetAttr( SCROW nRow, USHORT nWhich ) const
+const SfxPoolItem* ScColumn::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const
{
return &pAttrArray->GetPattern( nRow )->GetItemSet().Get(nWhich);
}
@@ -355,7 +355,7 @@ const ScPatternAttr* ScColumn::GetMostUsedPattern( SCROW nStartRow, SCROW nEndRo
}
-ULONG ScColumn::GetNumberFormat( SCROW nRow ) const
+sal_uLong ScColumn::GetNumberFormat( SCROW nRow ) const
{
return pAttrArray->GetPattern( nRow )->GetNumberFormat( pDocument->GetFormatTable() );
}
@@ -365,7 +365,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData
{
SCROW nTop = 0;
SCROW nBottom = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if ( rMark.IsMultiMarked() )
{
@@ -373,7 +373,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData
while (aMarkIter.Next( nTop, nBottom ))
{
pAttrArray->ApplyCacheArea( nTop, nBottom, pCache );
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -386,7 +386,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData
}
-void ScColumn::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark )
+void ScColumn::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark )
{
SCROW nTop;
SCROW nBottom;
@@ -400,7 +400,7 @@ void ScColumn::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark )
}
-void ScColumn::ClearSelectionItems( const USHORT* pWhich,const ScMarkData& rMark )
+void ScColumn::ClearSelectionItems( const sal_uInt16* pWhich,const ScMarkData& rMark )
{
SCROW nTop;
SCROW nBottom;
@@ -414,7 +414,7 @@ void ScColumn::ClearSelectionItems( const USHORT* pWhich,const ScMarkData& rMark
}
-void ScColumn::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
+void ScColumn::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
SCROW nTop;
SCROW nBottom;
@@ -435,9 +435,9 @@ void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
- // TRUE = alten Eintrag behalten
+ // sal_True = alten Eintrag behalten
- ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, TRUE );
+ ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, sal_True );
ScDocumentPool::CheckRef( *pPattern );
ScDocumentPool::CheckRef( *pNewPattern );
@@ -466,7 +466,7 @@ void ScColumn::ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
SCROW nRow1, nRow2;
const ScPatternAttr* pPattern = pAttrArray->GetPatternRange(
nRow1, nRow2, nRow );
- ULONG nFormat = pPattern->GetNumberFormat( pFormatter );
+ sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter );
short nOldType = pFormatter->GetType( nFormat );
if ( nOldType == nNewType || pFormatter->IsCompatible( nOldType, nNewType ) )
nRow = nRow2;
@@ -488,7 +488,7 @@ void ScColumn::ApplyStyle( SCROW nRow, const ScStyleSheet& rStyle )
if (pNewPattern)
{
pNewPattern->SetStyleSheet((ScStyleSheet*)&rStyle);
- pAttrArray->SetPattern(nRow, pNewPattern, TRUE);
+ pAttrArray->SetPattern(nRow, pNewPattern, sal_True);
delete pNewPattern;
}
}
@@ -515,7 +515,7 @@ void ScColumn::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData&
void ScColumn::ApplySelectionLineStyle( const ScMarkData& rMark,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -538,16 +538,16 @@ const ScStyleSheet* ScColumn::GetStyle( SCROW nRow ) const
}
-const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const
+const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const
{
- rFound = FALSE;
+ rFound = sal_False;
if (!rMark.IsMultiMarked())
{
DBG_ERROR("ScColumn::GetSelectionStyle ohne Selektion");
return NULL;
}
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
const ScStyleSheet* pStyle = NULL;
const ScStyleSheet* pNewStyle;
@@ -564,9 +564,9 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, BOOL&
while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != NULL)
{
pNewStyle = pPattern->GetStyleSheet();
- rFound = TRUE;
+ rFound = sal_True;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = sal_False; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -575,11 +575,11 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, BOOL&
}
-const ScStyleSheet* ScColumn::GetAreaStyle( BOOL& rFound, SCROW nRow1, SCROW nRow2 ) const
+const ScStyleSheet* ScColumn::GetAreaStyle( sal_Bool& rFound, SCROW nRow1, SCROW nRow2 ) const
{
- rFound = FALSE;
+ rFound = sal_False;
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
const ScStyleSheet* pStyle = NULL;
const ScStyleSheet* pNewStyle;
@@ -591,9 +591,9 @@ const ScStyleSheet* ScColumn::GetAreaStyle( BOOL& rFound, SCROW nRow1, SCROW nRo
while (bEqual && ( pPattern = aAttrIter.Next( nRow, nDummy ) ) != NULL)
{
pNewStyle = pPattern->GetStyleSheet();
- rFound = TRUE;
+ rFound = sal_True;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = sal_False; // unterschiedliche
pStyle = pNewStyle;
}
@@ -605,38 +605,38 @@ void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolR
pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset );
}
-BOOL ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const
+sal_Bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const
{
return pAttrArray->IsStyleSheetUsed( rStyle, bGatherAllStyles );
}
-BOOL ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
+sal_Bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
{
return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags );
}
-BOOL ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
+sal_Bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
{
return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags );
}
-void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich )
+void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
{
pAttrArray->ClearItems( nStartRow, nEndRow, pWhich );
}
-void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, BOOL bPutToPool )
+void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, sal_Bool bPutToPool )
{
pAttrArray->SetPattern( nRow, &rPatAttr, bPutToPool );
}
void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
- const ScPatternAttr& rPatAttr, BOOL bPutToPool )
+ const ScPatternAttr& rPatAttr, sal_Bool bPutToPool )
{
pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, bPutToPool );
}
@@ -667,9 +667,9 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
- // TRUE = alten Eintrag behalten
+ // sal_True = alten Eintrag behalten
- ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, TRUE );
+ ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, sal_True );
ScDocumentPool::CheckRef( *pPattern );
ScDocumentPool::CheckRef( *pNewPattern );
@@ -683,12 +683,12 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
#endif
-BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
+sal_Bool ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
{
if ( !pItems || !nCount )
{
nIndex = 0;
- return FALSE;
+ return sal_False;
}
SCROW nMinRow = pItems[0].nRow;
if ( nRow <= nMinRow )
@@ -702,12 +702,12 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
if ( nRow == nMaxRow )
{
nIndex = nCount - 1;
- return TRUE;
+ return sal_True;
}
else
{
nIndex = nCount;
- return FALSE;
+ return sal_False;
}
}
@@ -715,9 +715,9 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
long nLo = nOldLo = 0;
long nHi = nOldHi = Min(static_cast<long>(nCount)-1, static_cast<long>(nRow) );
long i = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
// quite continuous distribution? => interpolating search
- BOOL bInterpol = (static_cast<SCSIZE>(nMaxRow - nMinRow) < nCount * 2);
+ sal_Bool bInterpol = (static_cast<SCSIZE>(nMaxRow - nMinRow) < nCount * 2);
SCROW nR;
while ( !bFound && nLo <= nHi )
@@ -732,7 +732,7 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
if ( i < 0 || static_cast<SCSIZE>(i) >= nCount )
{ // oops ...
i = (nLo+nHi) / 2;
- bInterpol = FALSE;
+ bInterpol = sal_False;
}
}
nR = pItems[i].nRow;
@@ -742,7 +742,7 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
if ( bInterpol )
{
if ( nLo <= nOldLo )
- bInterpol = FALSE;
+ bInterpol = sal_False;
else
nOldLo = nLo;
}
@@ -755,13 +755,13 @@ BOOL ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
if ( bInterpol )
{
if ( nHi >= nOldHi )
- bInterpol = FALSE;
+ bInterpol = sal_False;
else
nOldHi = nHi;
}
}
else
- bFound = TRUE;
+ bFound = sal_True;
}
}
if (bFound)
@@ -931,16 +931,16 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
if (pCode1->GetLen() == pCode2->GetLen()) // nicht-UPN
{
- BOOL bEqual = TRUE;
- USHORT nLen = pCode1->GetLen();
+ sal_Bool bEqual = sal_True;
+ sal_uInt16 nLen = pCode1->GetLen();
FormulaToken** ppToken1 = pCode1->GetArray();
FormulaToken** ppToken2 = pCode2->GetArray();
- for (USHORT i=0; i<nLen; i++)
+ for (sal_uInt16 i=0; i<nLen; i++)
{
if ( !ppToken1[i]->TextEqual(*(ppToken2[i])) ||
ppToken1[i]->Is3DRef() || ppToken2[i]->Is3DRef() )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
}
@@ -1063,11 +1063,11 @@ void ScColumn::SwapCell( SCROW nRow, ScColumn& rCol)
}
-BOOL ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
+sal_Bool ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
{
if (!IsEmpty())
{
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if (pItems)
for (SCSIZE i=0; (i<nCount) && bTest; i++)
bTest = (pItems[i].nRow < nStartRow) || (pItems[i].nRow > nEndRow)
@@ -1083,11 +1083,11 @@ BOOL ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
return bTest;
}
else
- return TRUE;
+ return sal_True;
}
-BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const
+sal_Bool ScColumn::TestInsertRow( SCSIZE nSize ) const
{
// AttrArray only looks for merged cells
@@ -1101,7 +1101,7 @@ BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const
//! rausgeschobene Attribute bei Undo beruecksichtigen
if ( nSize > static_cast<SCSIZE>(MAXROW) )
- return FALSE;
+ return sal_False;
SCSIZE nVis = nCount;
while ( nVis && pItems[nVis-1].pCell->IsBlank() )
@@ -1110,7 +1110,7 @@ BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const
if ( nVis )
return ( pItems[nVis-1].nRow <= MAXROW-nSize );
else
- return TRUE;
+ return sal_True;
#endif
}
@@ -1129,16 +1129,16 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
if ( i >= nCount )
return ;
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
SCSIZE nNewCount = nCount;
- BOOL bCountChanged = FALSE;
+ sal_Bool bCountChanged = sal_False;
ScAddress aAdr( nCol, 0, nTab );
ScHint aHint( SC_HINT_DATACHANGED, aAdr, NULL ); // only areas (ScBaseCell* == NULL)
ScAddress& rAddress = aHint.GetAddress();
// for sparse occupation use single broadcasts, not ranges
- BOOL bSingleBroadcasts = (((pItems[nCount-1].nRow - pItems[i].nRow) /
+ sal_Bool bSingleBroadcasts = (((pItems[nCount-1].nRow - pItems[i].nRow) /
(nCount - i)) > 1);
if ( bSingleBroadcasts )
{
@@ -1163,7 +1163,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
if ( nNewRow > MAXROW && !bCountChanged )
{
nNewCount = i;
- bCountChanged = TRUE;
+ bCountChanged = sal_True;
}
}
}
@@ -1180,7 +1180,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
if ( nNewRow > MAXROW && !bCountChanged )
{
nNewCount = i;
- bCountChanged = TRUE;
+ bCountChanged = sal_True;
aRange.aEnd.SetRow( MAXROW );
}
}
@@ -1222,7 +1222,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
}
-void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions)
+void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions)
{
pAttrArray->CopyArea( nRow1, nRow2, 0, *rColumn.pAttrArray,
bKeepScenarioFlags ? (SC_MF_ALL & ~SC_MF_SCENARIO) : SC_MF_ALL );
@@ -1266,8 +1266,8 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKee
}
-void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked,
- ScColumn& rColumn, const ScMarkData* pMarkData, BOOL bAsLink )
+void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, sal_Bool bMarked,
+ ScColumn& rColumn, const ScMarkData* pMarkData, sal_Bool bAsLink )
{
if (bMarked)
{
@@ -1280,7 +1280,7 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarke
{
if ( nEnd >= nRow1 )
CopyToColumn( Max(nRow1,nStart), Min(nRow2,nEnd),
- nFlags, FALSE, rColumn, pMarkData, bAsLink );
+ nFlags, sal_False, rColumn, pMarkData, bAsLink );
}
}
else
@@ -1302,7 +1302,7 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarke
const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
ScPatternAttr* pNewPattern = new ScPatternAttr( *pPattern );
pNewPattern->SetStyleSheet( (ScStyleSheet*)pStyle );
- rColumn.pAttrArray->SetPattern( nRow, pNewPattern, TRUE );
+ rColumn.pAttrArray->SetPattern( nRow, pNewPattern, sal_True );
delete pNewPattern;
}
}
@@ -1344,16 +1344,16 @@ void ScColumn::CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarke
}
-void ScColumn::UndoToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked,
+void ScColumn::UndoToColumn(SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, sal_Bool bMarked,
ScColumn& rColumn, const ScMarkData* pMarkData )
{
if (nRow1 > 0)
- CopyToColumn( 0, nRow1-1, IDF_FORMULA, FALSE, rColumn );
+ CopyToColumn( 0, nRow1-1, IDF_FORMULA, sal_False, rColumn );
CopyToColumn( nRow1, nRow2, nFlags, bMarked, rColumn, pMarkData ); //! bMarked ????
if (nRow2 < MAXROW)
- CopyToColumn( nRow2+1, MAXROW, IDF_FORMULA, FALSE, rColumn );
+ CopyToColumn( nRow2+1, MAXROW, IDF_FORMULA, sal_False, rColumn );
}
@@ -1377,7 +1377,7 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
}
// Dummy:
- // CopyToColumn( 0,MAXROW, IDF_FORMULA, FALSE, rDestCol, NULL, FALSE );
+ // CopyToColumn( 0,MAXROW, IDF_FORMULA, sal_False, rDestCol, NULL, sal_False );
}
@@ -1394,7 +1394,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
{
DeleteArea( nStart, nEnd, IDF_CONTENTS );
((ScColumn&)rSrcCol).
- CopyToColumn( nStart, nEnd, IDF_CONTENTS, FALSE, *this );
+ CopyToColumn( nStart, nEnd, IDF_CONTENTS, sal_False, *this );
// UpdateUsed nicht noetig, schon in TestCopyScenario passiert
@@ -1425,7 +1425,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
{
rDestCol.DeleteArea( nStart, nEnd, IDF_CONTENTS );
((ScColumn*)this)->
- CopyToColumn( nStart, nEnd, IDF_CONTENTS, FALSE, rDestCol );
+ CopyToColumn( nStart, nEnd, IDF_CONTENTS, sal_False, rDestCol );
// UpdateUsed nicht noetig, schon in TestCopyScenario passiert
@@ -1443,9 +1443,9 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
}
-BOOL ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const
+sal_Bool ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW );
SCROW nStart = 0, nEnd = 0;
const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
@@ -1453,7 +1453,7 @@ BOOL ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const
{
if ( ((ScMergeFlagAttr&)pPattern->GetItem( ATTR_MERGE_FLAG )).IsScenario() )
if ( rDestCol.pAttrArray->HasAttrib( nStart, nEnd, HASATTR_PROTECTED ) )
- bOk = FALSE;
+ bOk = sal_False;
pPattern = aAttrIter.Next( nStart, nEnd );
}
@@ -1474,7 +1474,7 @@ void ScColumn::MarkScenarioIn( ScMarkData& rDestMark ) const
{
aRange.aStart.SetRow( nStart );
aRange.aEnd.SetRow( nEnd );
- rDestMark.SetMultiMarkArea( aRange, TRUE );
+ rDestMark.SetMultiMarkArea( aRange, sal_True );
}
pPattern = aAttrIter.Next( nStart, nEnd );
@@ -1751,7 +1751,7 @@ void ScColumn::UpdateInsertTabAbs(SCTAB nTable)
}
-void ScColumn::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScColumn* pRefUndo )
+void ScColumn::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScColumn* pRefUndo )
{
if (nTab > nTable)
pAttrArray->SetTab(--nTab);
@@ -1767,7 +1767,7 @@ void ScColumn::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScColumn* pRefUndo )
back the formula cell while keeping the original note. */
ScBaseCell* pSave = pRefUndo ? pOld->CloneWithoutNote( *pDocument ) : 0;
- BOOL bChanged = pOld->UpdateDeleteTab(nTable, bIsMove);
+ sal_Bool bChanged = pOld->UpdateDeleteTab(nTable, bIsMove);
if ( nRow != pItems[i].nRow )
Search( nRow, i ); // Listener geloescht/eingefuegt?
@@ -1801,7 +1801,7 @@ void ScColumn::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo )
}
-void ScColumn::UpdateCompile( BOOL bForceIfNameInUse )
+void ScColumn::UpdateCompile( sal_Bool bForceIfNameInUse )
{
if (pItems)
for (SCSIZE i = 0; i < nCount; i++)
@@ -1832,9 +1832,9 @@ void ScColumn::SetTabNo(SCTAB nNewTab)
}
-BOOL ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, USHORT nIndex) const
+sal_Bool ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, sal_uInt16 nIndex) const
{
- BOOL bInUse = FALSE;
+ sal_Bool bInUse = sal_False;
if (pItems)
for (SCSIZE i = 0; !bInUse && (i < nCount); i++)
if ((pItems[i].nRow >= nRow1) &&
@@ -1844,7 +1844,7 @@ BOOL ScColumn::IsRangeNameInUse(SCROW nRow1, SCROW nRow2, USHORT nIndex) const
return bInUse;
}
-void ScColumn::FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set<USHORT>& rIndexes) const
+void ScColumn::FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set<sal_uInt16>& rIndexes) const
{
if (pItems)
for (SCSIZE i = 0; i < nCount; i++)
@@ -1886,8 +1886,8 @@ void ScColumn::SetDirtyVar()
void ScColumn::SetDirty()
{
// wird nur dokumentweit verwendet, kein FormulaTrack
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCSIZE i=0; i<nCount; i++)
{
ScFormulaCell* p = (ScFormulaCell*) pItems[i].pCell;
@@ -1906,8 +1906,8 @@ void ScColumn::SetDirty( const ScRange& rRange )
{ // broadcastet alles innerhalb eines Range, mit FormulaTrack
if ( !pItems || !nCount )
return ;
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
SCROW nRow2 = rRange.aEnd.Row();
ScAddress aPos( nCol, 0, nTab );
ScHint aHint( SC_HINT_DATACHANGED, aPos, NULL );
@@ -1935,8 +1935,8 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange )
{
if ( !pItems || !nCount )
return ;
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // no multiple recalculation
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // no multiple recalculation
SCROW nRow2 = rRange.aEnd.Row();
ScAddress aPos( nCol, 0, nTab );
ScHint aHint( SC_HINT_TABLEOPDIRTY, aPos, NULL );
@@ -1962,8 +1962,8 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange )
void ScColumn::SetDirtyAfterLoad()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCSIZE i=0; i<nCount; i++)
{
ScFormulaCell* p = (ScFormulaCell*) pItems[i].pCell;
@@ -1995,8 +1995,8 @@ void ScColumn::SetDirtyAfterLoad()
void ScColumn::SetRelNameDirty()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCSIZE i=0; i<nCount; i++)
{
ScFormulaCell* p = (ScFormulaCell*) pItems[i].pCell;
@@ -2044,9 +2044,9 @@ void ScColumn::CompileAll()
{
SCROW nRow = pItems[i].nRow;
// fuer unbedingtes kompilieren
- // bCompile=TRUE und pCode->nError=0
+ // bCompile=sal_True und pCode->nError=0
((ScFormulaCell*)pCell)->GetCode()->SetCodeError( 0 );
- ((ScFormulaCell*)pCell)->SetCompile( TRUE );
+ ((ScFormulaCell*)pCell)->SetCompile( sal_True );
((ScFormulaCell*)pCell)->CompileTokenArray();
if ( nRow != pItems[i].nRow )
Search( nRow, i ); // Listener geloescht/eingefuegt?
@@ -2101,14 +2101,14 @@ void ScColumn::ResetChanged( SCROW nStartRow, SCROW nEndRow )
}
-BOOL ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const
+sal_Bool ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const
{
// used in GetOptimalHeight - ambiguous script type counts as edit cell
SCROW nRow = 0;
SCSIZE nIndex;
Search(nStartRow,nIndex);
- while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE )
+ while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : sal_False )
{
ScBaseCell* pCell = pItems[nIndex].pCell;
CellType eCellType = pCell->GetCellType();
@@ -2117,17 +2117,17 @@ BOOL ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const
((eCellType == CELLTYPE_FORMULA) && ((ScFormulaCell*)pCell)->IsMultilineResult()) )
{
rFirst = nRow;
- return TRUE;
+ return sal_True;
}
++nIndex;
}
- return FALSE;
+ return sal_False;
}
SCsROW ScColumn::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
- BOOL bUp, BOOL bInSelection, const ScMarkData& rMark )
+ sal_Bool bUp, sal_Bool bInSelection, const ScMarkData& rMark )
{
if (bInSelection)
{
@@ -2142,8 +2142,8 @@ SCsROW ScColumn::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
}
-BOOL ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle,
- BOOL bUp, BOOL bInSelection, const ScMarkData& rMark )
+sal_Bool ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle,
+ sal_Bool bUp, sal_Bool bInSelection, const ScMarkData& rMark )
{
if (bInSelection)
{
@@ -2151,7 +2151,7 @@ BOOL ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleShe
return pAttrArray->SearchStyleRange( rRow, rEndRow, pSearchStyle, bUp,
(ScMarkArray*) rMark.GetArray()+nCol ); //! const
else
- return FALSE;
+ return sal_False;
}
else
return pAttrArray->SearchStyleRange( rRow, rEndRow, pSearchStyle, bUp, NULL );
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2adf6d926f0f..0cffd3bef163 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -77,7 +77,7 @@
// -----------------------------------------------------------------------
-inline BOOL IsAmbiguousScript( BYTE nScript )
+inline sal_Bool IsAmbiguousScript( sal_uInt8 nScript )
{
//! move to a header file
return ( nScript != SCRIPTTYPE_LATIN &&
@@ -114,9 +114,9 @@ inline BOOL IsAmbiguousScript( BYTE nScript )
//UNUSED2008-05 // (because CELLTYPE_SYMBOLS wasn't written in the file)
//UNUSED2008-05
//UNUSED2008-05 ScFontToSubsFontConverter_AutoPtr xFontConverter;
-//UNUSED2008-05 const ULONG nFontConverterFlags = FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS;
+//UNUSED2008-05 const sal_uLong nFontConverterFlags = FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS;
//UNUSED2008-05
-//UNUSED2008-05 BOOL bListInitialized = FALSE;
+//UNUSED2008-05 sal_Bool bListInitialized = sal_False;
//UNUSED2008-05 ScSymbolStringCellEntry* pCurrentEntry = NULL;
//UNUSED2008-05
//UNUSED2008-05 ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW );
@@ -138,7 +138,7 @@ inline BOOL IsAmbiguousScript( BYTE nScript )
//UNUSED2008-05 if (!bListInitialized)
//UNUSED2008-05 {
//UNUSED2008-05 pCurrentEntry = (ScSymbolStringCellEntry*)rList.First();
-//UNUSED2008-05 bListInitialized = TRUE;
+//UNUSED2008-05 bListInitialized = sal_True;
//UNUSED2008-05 }
//UNUSED2008-05
//UNUSED2008-05 while ( pCurrentEntry && pCurrentEntry->nRow < nRow )
@@ -187,7 +187,7 @@ inline BOOL IsAmbiguousScript( BYTE nScript )
long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bWidth, const ScNeededSizeOptions& rOptions )
+ sal_Bool bWidth, const ScNeededSizeOptions& rOptions )
{
long nValue=0;
SCSIZE nIndex;
@@ -230,7 +230,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
const SfxPoolItem* pCondItem;
SvxCellHorJustify eHorJust;
if (pCondSet &&
- pCondSet->GetItemState(ATTR_HOR_JUSTIFY, TRUE, &pCondItem) == SFX_ITEM_SET)
+ pCondSet->GetItemState(ATTR_HOR_JUSTIFY, sal_True, &pCondItem) == SFX_ITEM_SET)
eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem*)pCondItem)->GetValue();
else
eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)
@@ -239,7 +239,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
if ( eHorJust == SVX_HOR_JUSTIFY_BLOCK )
bBreak = true;
else if ( pCondSet &&
- pCondSet->GetItemState(ATTR_LINEBREAK, TRUE, &pCondItem) == SFX_ITEM_SET)
+ pCondSet->GetItemState(ATTR_LINEBREAK, sal_True, &pCondItem) == SFX_ITEM_SET)
bBreak = ((const SfxBoolItem*)pCondItem)->GetValue();
else
bBreak = ((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue();
@@ -251,7 +251,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
// get other attributes from pattern and conditional formatting
SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet );
- BOOL bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED &&
+ sal_Bool bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED &&
((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN, pCondSet )).GetValue() );
if ( bAsianVertical )
bBreak = false;
@@ -264,14 +264,14 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
if ( eOrient == SVX_ORIENTATION_STANDARD )
{
if (pCondSet &&
- pCondSet->GetItemState(ATTR_ROTATE_VALUE, TRUE, &pCondItem) == SFX_ITEM_SET)
+ pCondSet->GetItemState(ATTR_ROTATE_VALUE, sal_True, &pCondItem) == SFX_ITEM_SET)
nRotate = ((const SfxInt32Item*)pCondItem)->GetValue();
else
nRotate = ((const SfxInt32Item&)pPattern->GetItem(ATTR_ROTATE_VALUE)).GetValue();
if ( nRotate )
{
if (pCondSet &&
- pCondSet->GetItemState(ATTR_ROTATE_MODE, TRUE, &pCondItem) == SFX_ITEM_SET)
+ pCondSet->GetItemState(ATTR_ROTATE_MODE, sal_True, &pCondItem) == SFX_ITEM_SET)
eRotMode = (SvxRotateMode)((const SvxRotateModeItem*)pCondItem)->GetValue();
else
eRotMode = (SvxRotateMode)((const SvxRotateModeItem&)
@@ -287,26 +287,26 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
// ignore orientation/rotation if "repeat" is active
eOrient = SVX_ORIENTATION_STANDARD;
nRotate = 0;
- bAsianVertical = FALSE;
+ bAsianVertical = sal_False;
}
const SvxMarginItem* pMargin;
if (pCondSet &&
- pCondSet->GetItemState(ATTR_MARGIN, TRUE, &pCondItem) == SFX_ITEM_SET)
+ pCondSet->GetItemState(ATTR_MARGIN, sal_True, &pCondItem) == SFX_ITEM_SET)
pMargin = (const SvxMarginItem*) pCondItem;
else
pMargin = (const SvxMarginItem*) &pPattern->GetItem(ATTR_MARGIN);
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if ( eHorJust == SVX_HOR_JUSTIFY_LEFT )
{
if (pCondSet &&
- pCondSet->GetItemState(ATTR_INDENT, TRUE, &pCondItem) == SFX_ITEM_SET)
+ pCondSet->GetItemState(ATTR_INDENT, sal_True, &pCondItem) == SFX_ITEM_SET)
nIndent = ((const SfxUInt16Item*)pCondItem)->GetValue();
else
nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue();
}
- BYTE nScript = pDocument->GetScriptType( nCol, nRow, nTab, pCell );
+ sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pCell );
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
// also call SetFont for edit cells, because bGetFont may be set only once
@@ -320,10 +320,10 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
pDev->SetFont(aFont);
}
- BOOL bAddMargin = TRUE;
+ sal_Bool bAddMargin = sal_True;
CellType eCellType = pCell->GetCellType();
- BOOL bEditEngine = ( eCellType == CELLTYPE_EDIT ||
+ sal_Bool bEditEngine = ( eCellType == CELLTYPE_EDIT ||
eOrient == SVX_ORIENTATION_STACKED ||
IsAmbiguousScript( nScript ) ||
((eCellType == CELLTYPE_FORMULA) && ((ScFormulaCell*)pCell)->IsMultilineResult()) );
@@ -333,10 +333,10 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
String aValStr;
Color* pColor;
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
- ULONG nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet );
+ sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet );
ScCellFormat::GetString( pCell, nFormat, aValStr, &pColor,
*pFormatter,
- TRUE, rOptions.bFormula, ftCheck );
+ sal_True, rOptions.bFormula, ftCheck );
if (aValStr.Len())
{
// SetFont ist nach oben verschoben
@@ -362,7 +362,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
else if ( rOptions.bTotalSize )
{
nWidth = (long) ( pDocument->GetColWidth( nCol,nTab ) * nPPT );
- bAddMargin = FALSE;
+ bAddMargin = sal_False;
// nur nach rechts:
//! unterscheiden nach Ausrichtung oben/unten (nur Text/ganze Hoehe)
if ( pPattern->GetRotateDir( pCondSet ) == SC_ROTDIR_RIGHT )
@@ -411,7 +411,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
* nPPT );
nDocPixel = (nDocPixel * 9) / 10; // zur Sicherheit
if ( aSize.Width() > nDocPixel )
- bEditEngine = TRUE;
+ bEditEngine = sal_True;
}
}
}
@@ -426,7 +426,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
// am Dokument speichern ?
ScFieldEditEngine* pEngine = pDocument->CreateFieldEditEngine();
- pEngine->SetUpdateMode( FALSE );
+ pEngine->SetUpdateMode( sal_False );
MapMode aOld = pDev->GetMapMode();
pDev->SetMapMode( aHMMMode );
pEngine->SetRefDevice( pDev );
@@ -451,7 +451,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
else if (bBreak)
{
double fWidthFactor = nPPTX;
- BOOL bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER );
+ sal_Bool bTextWysiwyg = ( pDev->GetOutDevType() == OUTDEV_PRINTER );
if ( bTextWysiwyg )
{
// #95593# if text is formatted for printer, don't use PixelToLogic,
@@ -494,22 +494,22 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
{
Color* pColor;
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
- ULONG nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet );
+ sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter, pCondSet );
String aString;
ScCellFormat::GetString( pCell, nFormat, aString, &pColor,
*pFormatter,
- TRUE, rOptions.bFormula, ftCheck );
+ sal_True, rOptions.bFormula, ftCheck );
if (aString.Len())
pEngine->SetTextNewDefaults(aString, pSet);
else
pEngine->SetDefaults(pSet);
}
- BOOL bEngineVertical = pEngine->IsVertical();
+ sal_Bool bEngineVertical = pEngine->IsVertical();
pEngine->SetVertical( bAsianVertical );
- pEngine->SetUpdateMode( TRUE );
+ pEngine->SetUpdateMode( sal_True );
- BOOL bEdWidth = bWidth;
+ sal_Bool bEdWidth = bWidth;
if ( eOrient != SVX_ORIENTATION_STANDARD && eOrient != SVX_ORIENTATION_STACKED )
bEdWidth = !bEdWidth;
if ( nRotate )
@@ -527,7 +527,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
else if ( rOptions.bTotalSize )
{
nWidth = (long) ( pDocument->GetColWidth( nCol,nTab ) * nPPT );
- bAddMargin = FALSE;
+ bAddMargin = sal_False;
if ( pPattern->GetRotateDir( pCondSet ) == SC_ROTDIR_RIGHT )
nWidth += (long)( pDocument->GetRowHeight( nRow,nTab ) *
nPPT * nCosAbs / nSinAbs );
@@ -603,7 +603,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
// 20 * nZoom/100
// bedingte Formatierung hier nicht interessant
- INT16 nFlags = ((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue();
+ sal_Int16 nFlags = ((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue();
if (nFlags & SC_MF_AUTO)
nValue += (rZoomX.GetNumerator()*20)/rZoomX.GetDenominator();
}
@@ -612,7 +612,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
}
long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev,
- BOOL bWidth )
+ sal_Bool bWidth )
{
long nValue=0;
if ( nIndex < nCount )
@@ -623,9 +623,9 @@ long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev,
String aValStr;
Color* pColor;
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
- ULONG nFormat = pPattern->GetNumberFormat( pFormatter );
+ sal_uLong nFormat = pPattern->GetNumberFormat( pFormatter );
ScCellFormat::GetString( pCell, nFormat, aValStr, &pColor,
- *pFormatter, TRUE, FALSE, ftCheck );
+ *pFormatter, sal_True, sal_False, ftCheck );
if ( aValStr.Len() )
{
if ( bWidth )
@@ -637,20 +637,20 @@ long ScColumn::GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev,
return nValue;
}
-USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY,
+sal_uInt16 ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bFormula, USHORT nOldWidth,
+ sal_Bool bFormula, sal_uInt16 nOldWidth,
const ScMarkData* pMarkData,
- BOOL bSimpleTextImport )
+ sal_Bool bSimpleTextImport )
{
if (nCount == 0)
return nOldWidth;
- USHORT nWidth = (USHORT) (nOldWidth * nPPTX);
- BOOL bFound = FALSE;
+ sal_uInt16 nWidth = (sal_uInt16) (nOldWidth * nPPTX);
+ sal_Bool bFound = sal_False;
SCSIZE nIndex;
- ScMarkedDataIter aDataIter(this, pMarkData, TRUE);
+ ScMarkedDataIter aDataIter(this, pMarkData, sal_True);
if ( bSimpleTextImport )
{ // alles eins bis auf NumberFormate
const ScPatternAttr* pPattern = GetPattern( 0 );
@@ -664,14 +664,14 @@ USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nP
while (aDataIter.Next( nIndex ))
{
- USHORT nThis = (USHORT) (GetSimpleTextNeededSize( nIndex, pDev,
- TRUE ) + nMargin);
+ sal_uInt16 nThis = (sal_uInt16) (GetSimpleTextNeededSize( nIndex, pDev,
+ sal_True ) + nMargin);
if (nThis)
{
if (nThis>nWidth || !bFound)
{
nWidth = nThis;
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -681,27 +681,27 @@ USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nP
ScNeededSizeOptions aOptions;
aOptions.bFormula = bFormula;
const ScPatternAttr* pOldPattern = NULL;
- BYTE nOldScript = 0;
+ sal_uInt8 nOldScript = 0;
while (aDataIter.Next( nIndex ))
{
SCROW nRow = pItems[nIndex].nRow;
- BYTE nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell );
+ sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell );
if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
const ScPatternAttr* pPattern = GetPattern( nRow );
aOptions.pPattern = pPattern;
aOptions.bGetFont = (pPattern != pOldPattern || nScript != nOldScript);
- USHORT nThis = (USHORT) GetNeededSize( nRow, pDev, nPPTX, nPPTY,
- rZoomX, rZoomY, TRUE, aOptions );
+ sal_uInt16 nThis = (sal_uInt16) GetNeededSize( nRow, pDev, nPPTX, nPPTY,
+ rZoomX, rZoomY, sal_True, aOptions );
pOldPattern = pPattern;
if (nThis)
{
if (nThis>nWidth || !bFound)
{
nWidth = nThis;
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -710,16 +710,16 @@ USHORT ScColumn::GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nP
if (bFound)
{
nWidth += 2;
- USHORT nTwips = (USHORT) (nWidth / nPPTX);
+ sal_uInt16 nTwips = (sal_uInt16) (nWidth / nPPTX);
return nTwips;
}
else
return nOldWidth;
}
-USHORT lcl_GetAttribHeight( const ScPatternAttr& rPattern, USHORT nFontHeightId )
+sal_uInt16 lcl_GetAttribHeight( const ScPatternAttr& rPattern, sal_uInt16 nFontHeightId )
{
- USHORT nHeight = (USHORT) ((const SvxFontHeightItem&) rPattern.GetItem(nFontHeightId)).GetHeight();
+ sal_uInt16 nHeight = (sal_uInt16) ((const SvxFontHeightItem&) rPattern.GetItem(nFontHeightId)).GetHeight();
const SvxMarginItem* pMargin = (const SvxMarginItem*) &rPattern.GetItem(ATTR_MARGIN);
nHeight += nHeight / 5;
// gibt bei 10pt 240
@@ -734,7 +734,7 @@ USHORT lcl_GetAttribHeight( const ScPatternAttr& rPattern, USHORT nFontHeightId
if ( nHeight + 240 > ScGlobal::nDefFontHeight )
{
- nHeight = sal::static_int_cast<USHORT>( nHeight + ScGlobal::nDefFontHeight );
+ nHeight = sal::static_int_cast<sal_uInt16>( nHeight + ScGlobal::nDefFontHeight );
nHeight -= 240;
}
@@ -753,11 +753,11 @@ USHORT lcl_GetAttribHeight( const ScPatternAttr& rPattern, USHORT nFontHeightId
// nMinHeight, nMinStart zur Optimierung: ab nRow >= nMinStart ist mindestens nMinHeight
// (wird nur bei bStdAllowed ausgewertet)
-void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight,
+void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16* pHeight,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bShrink, USHORT nMinHeight, SCROW nMinStart )
+ sal_Bool bShrink, sal_uInt16 nMinHeight, SCROW nMinStart )
{
ScAttrIterator aIter( pAttrArray, nStartRow, nEndRow );
@@ -782,11 +782,11 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
else
{
SCROW nRow = 0;
- BOOL bStdAllowed = (pPattern->GetCellOrientation() == SVX_ORIENTATION_STANDARD);
- BOOL bStdOnly = FALSE;
+ sal_Bool bStdAllowed = (pPattern->GetCellOrientation() == SVX_ORIENTATION_STANDARD);
+ sal_Bool bStdOnly = sal_False;
if (bStdAllowed)
{
- BOOL bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
+ sal_Bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() ==
SVX_HOR_JUSTIFY_BLOCK);
@@ -795,12 +795,12 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
// bedingte Formatierung: Zellen durchgehen
if ( bStdOnly && ((const SfxUInt32Item&)pPattern->
GetItem(ATTR_CONDITIONAL)).GetValue() )
- bStdOnly = FALSE;
+ bStdOnly = sal_False;
// gedrehter Text: Zellen durchgehen
if ( bStdOnly && ((const SfxInt32Item&)pPattern->
GetItem(ATTR_ROTATE_VALUE)).GetValue() )
- bStdOnly = FALSE;
+ bStdOnly = sal_False;
}
if (bStdOnly)
@@ -808,11 +808,11 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
{
if (nEditPos == nStart)
{
- bStdOnly = FALSE;
+ bStdOnly = sal_False;
if (nEnd > nEditPos)
nNextEnd = nEnd;
nEnd = nEditPos; // einzeln ausrechnen
- bStdAllowed = FALSE; // wird auf jeden Fall per Zelle berechnet
+ bStdAllowed = sal_False; // wird auf jeden Fall per Zelle berechnet
}
else
{
@@ -823,11 +823,11 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
if (bStdAllowed)
{
- USHORT nLatHeight = 0;
- USHORT nCjkHeight = 0;
- USHORT nCtlHeight = 0;
- USHORT nDefHeight;
- BYTE nDefScript = ScGlobal::GetDefaultScriptType();
+ sal_uInt16 nLatHeight = 0;
+ sal_uInt16 nCjkHeight = 0;
+ sal_uInt16 nCtlHeight = 0;
+ sal_uInt16 nDefHeight;
+ sal_uInt8 nDefScript = ScGlobal::GetDefaultScriptType();
if ( nDefScript == SCRIPTTYPE_ASIAN )
nDefHeight = nCjkHeight = lcl_GetAttribHeight( *pPattern, ATTR_CJK_FONT_HEIGHT );
else if ( nDefScript == SCRIPTTYPE_COMPLEX )
@@ -854,7 +854,7 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
Search(nStart,nIndex);
while ( nIndex < nCount && (nRow=pItems[nIndex].nRow) <= nEnd )
{
- BYTE nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell );
+ sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pItems[nIndex].pCell );
if ( nScript != nDefScript )
{
if ( nScript == SCRIPTTYPE_ASIAN )
@@ -890,16 +890,16 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
SCSIZE nIndex;
Search(nStart,nIndex);
- while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEnd) : FALSE )
+ while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEnd) : sal_False )
{
// Zellhoehe nur berechnen, wenn sie spaeter auch gebraucht wird (#37928#)
if ( bShrink || !(pDocument->GetRowFlags(nRow, nTab) & CR_MANUALSIZE) )
{
aOptions.pPattern = pPattern;
- USHORT nHeight = (USHORT)
+ sal_uInt16 nHeight = (sal_uInt16)
( GetNeededSize( nRow, pDev, nPPTX, nPPTY,
- rZoomX, rZoomY, FALSE, aOptions ) / nPPTY );
+ rZoomX, rZoomY, sal_False, aOptions ) / nPPTY );
if (nHeight > pHeight[nRow-nStartRow])
pHeight[nRow-nStartRow] = nHeight;
}
@@ -919,9 +919,9 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight
}
}
-BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& rData) const
+sal_Bool ScColumn::GetNextSpellingCell(SCROW& nRow, sal_Bool bInSel, const ScMarkData& rData) const
{
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
CellType eCellType;
SCSIZE nIndex;
if (!bInSel && Search(nRow, nIndex))
@@ -930,17 +930,17 @@ BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& r
if ( (eCellType == CELLTYPE_STRING || eCellType == CELLTYPE_EDIT) &&
!(HasAttrib( nRow, nRow, HASATTR_PROTECTED) &&
pDocument->IsTabProtected(nTab)) )
- return TRUE;
+ return sal_True;
}
while (!bStop)
{
if (bInSel)
{
- nRow = rData.GetNextMarked(nCol, nRow, FALSE);
+ nRow = rData.GetNextMarked(nCol, nRow, sal_False);
if (!ValidRow(nRow))
{
nRow = MAXROW+1;
- bStop = TRUE;
+ bStop = sal_True;
}
else
{
@@ -948,7 +948,7 @@ BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& r
if ( (eCellType == CELLTYPE_STRING || eCellType == CELLTYPE_EDIT) &&
!(HasAttrib( nRow, nRow, HASATTR_PROTECTED) &&
pDocument->IsTabProtected(nTab)) )
- return TRUE;
+ return sal_True;
else
nRow++;
}
@@ -959,17 +959,17 @@ BOOL ScColumn::GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& r
if ( (eCellType == CELLTYPE_STRING || eCellType == CELLTYPE_EDIT) &&
!(HasAttrib( nRow, nRow, HASATTR_PROTECTED) &&
pDocument->IsTabProtected(nTab)) )
- return TRUE;
+ return sal_True;
else
nRow++;
}
else
{
nRow = MAXROW+1;
- bStop = TRUE;
+ bStop = sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// =========================================================================================
@@ -1047,8 +1047,8 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
pEngine->SetKernAsianPunctuation( pDocument->GetAsianKerning() );
}
pEngine->SetText( *pData );
- USHORT nParCount = pEngine->GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = pEngine->GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
pEngine->QuickRemoveCharAttribs( nPar );
const SfxItemSet& rOld = pEngine->GetParaAttribs( nPar );
@@ -1059,16 +1059,16 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
}
}
// URL-Felder in Text wandeln (andere gibt's nicht, darum pType=0)
- pEngine->RemoveFields( TRUE );
+ pEngine->RemoveFields( sal_True );
- BOOL bSpellErrors = pEngine->HasOnlineSpellErrors();
- BOOL bNeedObject = bSpellErrors || nParCount>1; // Errors/Absaetze behalten
+ sal_Bool bSpellErrors = pEngine->HasOnlineSpellErrors();
+ sal_Bool bNeedObject = bSpellErrors || nParCount>1; // Errors/Absaetze behalten
// ScEditAttrTester nicht mehr noetig, Felder sind raus
if ( bNeedObject ) // bleibt Edit-Zelle
{
- ULONG nCtrl = pEngine->GetControlWord();
- ULONG nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
+ sal_uLong nCtrl = pEngine->GetControlWord();
+ sal_uLong nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
if ( ( nCtrl & EE_CNTRL_ALLOWBIGOBJS ) != nWantBig )
pEngine->SetControlWord( (nCtrl & ~EE_CNTRL_ALLOWBIGOBJS) | nWantBig );
EditTextObject* pNewData = pEngine->CreateTextObject();
@@ -1091,14 +1091,14 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
// =========================================================================================
-BOOL ScColumn::TestTabRefAbs(SCTAB nTable)
+sal_Bool ScColumn::TestTabRefAbs(SCTAB nTable)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (pItems)
for (SCSIZE i = 0; i < nCount; i++)
if ( pItems[i].pCell->GetCellType() == CELLTYPE_FORMULA )
if (((ScFormulaCell*)pItems[i].pCell)->TestTabRefAbs(nTable))
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -1116,7 +1116,7 @@ ScColumnIterator::~ScColumnIterator()
{
}
-BOOL ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell )
+sal_Bool ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell )
{
if ( nPos < pColumn->nCount )
{
@@ -1125,13 +1125,13 @@ BOOL ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell )
{
rpCell = pColumn->pItems[nPos].pCell;
++nPos;
- return TRUE;
+ return sal_True;
}
}
rRow = 0;
rpCell = NULL;
- return FALSE;
+ return sal_False;
}
SCSIZE ScColumnIterator::GetIndex() const // Index zur letzen abgefragten Zelle
@@ -1142,10 +1142,10 @@ SCSIZE ScColumnIterator::GetIndex() const // Index zur letzen abgefrag
// -----------------------------------------------------------------------------------------
ScMarkedDataIter::ScMarkedDataIter( const ScColumn* pCol, const ScMarkData* pMarkData,
- BOOL bAllIfNone ) :
+ sal_Bool bAllIfNone ) :
pColumn( pCol ),
pMarkIter( NULL ),
- bNext( TRUE ),
+ bNext( sal_True ),
bAll( bAllIfNone )
{
if (pMarkData && pMarkData->IsMultiMarked())
@@ -1157,9 +1157,9 @@ ScMarkedDataIter::~ScMarkedDataIter()
delete pMarkIter;
}
-BOOL ScMarkedDataIter::Next( SCSIZE& rIndex )
+sal_Bool ScMarkedDataIter::Next( SCSIZE& rIndex )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
do
{
if (bNext)
@@ -1172,28 +1172,28 @@ BOOL ScMarkedDataIter::Next( SCSIZE& rIndex )
nBottom = MAXROW;
}
else
- return FALSE;
+ return sal_False;
}
pColumn->Search( nTop, nPos );
- bNext = FALSE;
- bAll = FALSE; // nur beim ersten Versuch
+ bNext = sal_False;
+ bAll = sal_False; // nur beim ersten Versuch
}
if ( nPos >= pColumn->nCount )
- return FALSE;
+ return sal_False;
if ( pColumn->pItems[nPos].nRow <= nBottom )
- bFound = TRUE;
+ bFound = sal_True;
else
- bNext = TRUE;
+ bNext = sal_True;
}
while (!bFound);
rIndex = nPos++;
- return TRUE;
+ return sal_True;
}
-//UNUSED2009-05 USHORT ScColumn::GetErrorData( SCROW nRow ) const
+//UNUSED2009-05 sal_uInt16 ScColumn::GetErrorData( SCROW nRow ) const
//UNUSED2009-05 {
//UNUSED2009-05 SCSIZE nIndex;
//UNUSED2009-05 if (Search(nRow, nIndex))
@@ -1213,24 +1213,24 @@ BOOL ScMarkedDataIter::Next( SCSIZE& rIndex )
//------------
-BOOL ScColumn::IsEmptyData() const
+sal_Bool ScColumn::IsEmptyData() const
{
return (nCount == 0);
}
-BOOL ScColumn::IsEmptyVisData(BOOL bNotes) const
+sal_Bool ScColumn::IsEmptyVisData(sal_Bool bNotes) const
{
if (!pItems || nCount == 0)
- return TRUE;
+ return sal_True;
else
{
- BOOL bVisData = FALSE;
+ sal_Bool bVisData = sal_False;
SCSIZE i;
for (i=0; i<nCount && !bVisData; i++)
{
ScBaseCell* pCell = pItems[i].pCell;
if ( pCell->GetCellType() != CELLTYPE_NOTE || (bNotes && pCell->HasNote()) )
- bVisData = TRUE;
+ bVisData = sal_True;
}
return !bVisData;
}
@@ -1255,20 +1255,20 @@ SCSIZE ScColumn::VisibleCount( SCROW nStartRow, SCROW nEndRow ) const
return nVisCount;
}
-SCROW ScColumn::GetLastVisDataPos(BOOL bNotes) const
+SCROW ScColumn::GetLastVisDataPos(sal_Bool bNotes) const
{
SCROW nRet = 0;
if (pItems)
{
SCSIZE i;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (i=nCount; i>0 && !bFound; )
{
--i;
ScBaseCell* pCell = pItems[i].pCell;
if ( pCell->GetCellType() != CELLTYPE_NOTE || (bNotes && pCell->HasNote()) )
{
- bFound = TRUE;
+ bFound = sal_True;
nRet = pItems[i].nRow;
}
}
@@ -1276,19 +1276,19 @@ SCROW ScColumn::GetLastVisDataPos(BOOL bNotes) const
return nRet;
}
-SCROW ScColumn::GetFirstVisDataPos(BOOL bNotes) const
+SCROW ScColumn::GetFirstVisDataPos(sal_Bool bNotes) const
{
SCROW nRet = 0;
if (pItems)
{
SCSIZE i;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (i=0; i<nCount && !bFound; i++)
{
ScBaseCell* pCell = pItems[i].pCell;
if ( pCell->GetCellType() != CELLTYPE_NOTE || (bNotes && pCell->HasNote()) )
{
- bFound = TRUE;
+ bFound = sal_True;
nRet = pItems[i].nRow;
}
}
@@ -1296,49 +1296,49 @@ SCROW ScColumn::GetFirstVisDataPos(BOOL bNotes) const
return nRet;
}
-BOOL ScColumn::HasVisibleDataAt(SCROW nRow) const
+sal_Bool ScColumn::HasVisibleDataAt(SCROW nRow) const
{
SCSIZE nIndex;
if (Search(nRow, nIndex))
if (!pItems[nIndex].pCell->IsBlank())
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScColumn::IsEmptyAttr() const
+sal_Bool ScColumn::IsEmptyAttr() const
{
if (pAttrArray)
return pAttrArray->IsEmpty();
else
- return TRUE;
+ return sal_True;
}
-BOOL ScColumn::IsEmpty() const
+sal_Bool ScColumn::IsEmpty() const
{
return (IsEmptyData() && IsEmptyAttr());
}
-BOOL ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes) const
+sal_Bool ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes) const
{
if ( nCount == 0 || !pItems )
- return TRUE;
+ return sal_True;
SCSIZE nIndex;
Search( nStartRow, nIndex );
while ( nIndex < nCount && pItems[nIndex].nRow <= nEndRow )
{
if ( !pItems[nIndex].pCell->IsBlank( bIgnoreNotes ) ) // found a cell
- return FALSE; // not empty
+ return sal_False; // not empty
++nIndex;
}
- return TRUE; // no cell found
+ return sal_True; // no cell found
}
SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const
{
SCSIZE nLines = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCSIZE i;
if (pItems && (nCount > 0))
{
@@ -1394,9 +1394,9 @@ SCROW ScColumn::GetLastDataPos() const
return 0;
}
-BOOL ScColumn::GetPrevDataPos(SCROW& rRow) const
+sal_Bool ScColumn::GetPrevDataPos(SCROW& rRow) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCSIZE i = nCount;
while (!bFound && (i > 0))
{
@@ -1408,13 +1408,13 @@ BOOL ScColumn::GetPrevDataPos(SCROW& rRow) const
return bFound;
}
-BOOL ScColumn::GetNextDataPos(SCROW& rRow) const // greater than rRow
+sal_Bool ScColumn::GetNextDataPos(SCROW& rRow) const // greater than rRow
{
SCSIZE nIndex;
if (Search( rRow, nIndex ))
++nIndex; // next cell
- BOOL bMore = ( nIndex < nCount );
+ sal_Bool bMore = ( nIndex < nCount );
if ( bMore )
rRow = pItems[nIndex].nRow;
return bMore;
@@ -1423,12 +1423,12 @@ BOOL ScColumn::GetNextDataPos(SCROW& rRow) const // greater than rRow
void ScColumn::FindDataAreaPos(SCROW& rRow, long nMovY) const
{
if (!nMovY) return;
- BOOL bForward = (nMovY>0);
+ sal_Bool bForward = (nMovY>0);
SCSIZE nIndex;
- BOOL bThere = Search(rRow, nIndex);
+ sal_Bool bThere = Search(rRow, nIndex);
if (bThere && pItems[nIndex].pCell->IsBlank())
- bThere = FALSE;
+ bThere = sal_False;
if (bThere)
{
@@ -1468,7 +1468,7 @@ void ScColumn::FindDataAreaPos(SCROW& rRow, long nMovY) const
}
if (nLast==rRow)
{
- bThere = FALSE;
+ bThere = sal_False;
nIndex = bForward ? nOldIndex+1 : nOldIndex;
}
else
@@ -1498,7 +1498,7 @@ void ScColumn::FindDataAreaPos(SCROW& rRow, long nMovY) const
}
}
-BOOL ScColumn::HasDataAt(SCROW nRow) const
+sal_Bool ScColumn::HasDataAt(SCROW nRow) const
{
/* SCSIZE nIndex;
return Search( nRow, nIndex );
@@ -1509,13 +1509,13 @@ BOOL ScColumn::HasDataAt(SCROW nRow) const
SCSIZE nIndex;
if (Search(nRow, nIndex))
if (!pItems[nIndex].pCell->IsBlank())
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScColumn::IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScColumn::IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
{
if (pAttrArray && rCol.pAttrArray)
return pAttrArray->IsAllEqual( *rCol.pAttrArray, nStartRow, nEndRow );
@@ -1523,7 +1523,7 @@ BOOL ScColumn::IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEnd
return !pAttrArray && !rCol.pAttrArray;
}
-BOOL ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
{
if (pAttrArray && rCol.pAttrArray)
return pAttrArray->IsVisibleEqual( *rCol.pAttrArray, nStartRow, nEndRow );
@@ -1531,43 +1531,43 @@ BOOL ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW
return !pAttrArray && !rCol.pAttrArray;
}
-BOOL ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const
+sal_Bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const
{
if (pAttrArray)
return pAttrArray->GetFirstVisibleAttr( rFirstRow );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const
+sal_Bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const
{
if (pAttrArray)
{
// row of last cell is needed
- SCROW nLastData = GetLastVisDataPos( TRUE ); // always including notes, 0 if none
+ SCROW nLastData = GetLastVisDataPos( sal_True ); // always including notes, 0 if none
return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData );
}
else
- return FALSE;
+ return sal_False;
}
-BOOL ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
{
if (pAttrArray)
return pAttrArray->HasVisibleAttrIn( nStartRow, nEndRow );
else
- return FALSE;
+ return sal_False;
}
-void ScColumn::FindUsed( SCROW nStartRow, SCROW nEndRow, BOOL* pUsed ) const
+void ScColumn::FindUsed( SCROW nStartRow, SCROW nEndRow, sal_Bool* pUsed ) const
{
SCROW nRow = 0;
SCSIZE nIndex;
Search( nStartRow, nIndex );
- while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE )
+ while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : sal_False )
{
- pUsed[nRow-nStartRow] = TRUE;
+ pUsed[nRow-nStartRow] = sal_True;
++nIndex;
}
}
@@ -1668,7 +1668,7 @@ void ScColumn::CompileDBFormula()
}
}
-void ScColumn::CompileDBFormula( BOOL bCreateFormulaString )
+void ScColumn::CompileDBFormula( sal_Bool bCreateFormulaString )
{
if (pItems)
for (SCSIZE i = 0; i < nCount; i++)
@@ -1679,7 +1679,7 @@ void ScColumn::CompileDBFormula( BOOL bCreateFormulaString )
}
}
-void ScColumn::CompileNameFormula( BOOL bCreateFormulaString )
+void ScColumn::CompileNameFormula( sal_Bool bCreateFormulaString )
{
if (pItems)
for (SCSIZE i = 0; i < nCount; i++)
@@ -1704,13 +1704,13 @@ void ScColumn::CompileColRowNameFormula()
void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell )
{
double nValue = 0.0;
- BOOL bVal = FALSE;
- BOOL bCell = TRUE;
+ sal_Bool bVal = sal_False;
+ sal_Bool bCell = sal_True;
switch (pCell->GetCellType())
{
case CELLTYPE_VALUE:
nValue = ((ScValueCell*)pCell)->GetValue();
- bVal = TRUE;
+ bVal = sal_True;
break;
case CELLTYPE_FORMULA:
{
@@ -1720,19 +1720,19 @@ void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell )
if ( pFC->GetErrCode() )
{
if ( rData.eFunc != SUBTOTAL_FUNC_CNT ) // fuer Anzahl einfach weglassen
- rData.bError = TRUE;
+ rData.bError = sal_True;
}
else if (pFC->IsValue())
{
nValue = pFC->GetValue();
- bVal = TRUE;
+ bVal = sal_True;
}
// sonst Text
}
}
break;
case CELLTYPE_NOTE:
- bCell = FALSE;
+ bCell = sal_False;
break;
// bei Strings nichts
default:
@@ -1751,7 +1751,7 @@ void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell )
{
++rData.nCount;
if (!SubTotal::SafePlus( rData.nVal, nValue ))
- rData.bError = TRUE;
+ rData.bError = sal_True;
}
break;
case SUBTOTAL_FUNC_CNT: // nur Werte
@@ -1784,10 +1784,10 @@ void lcl_UpdateSubTotal( ScFunctionData& rData, ScBaseCell* pCell )
void ScColumn::UpdateSelectionFunction( const ScMarkData& rMark,
ScFunctionData& rData,
ScFlatBoolRowSegments& rHiddenRows,
- BOOL bDoExclude, SCROW nExStartRow, SCROW nExEndRow )
+ sal_Bool bDoExclude, SCROW nExStartRow, SCROW nExEndRow )
{
SCSIZE nIndex;
- ScMarkedDataIter aDataIter(this, &rMark, FALSE);
+ ScMarkedDataIter aDataIter(this, &rMark, sal_False);
while (aDataIter.Next( nIndex ))
{
SCROW nRow = pItems[nIndex].nRow;
@@ -1815,9 +1815,9 @@ void ScColumn::UpdateAreaFunction( ScFunctionData& rData,
}
}
-ULONG ScColumn::GetWeightedCount() const
+sal_uLong ScColumn::GetWeightedCount() const
{
- ULONG nTotal = 0;
+ sal_uLong nTotal = 0;
// Notizen werden nicht gezaehlt
@@ -1846,9 +1846,9 @@ ULONG ScColumn::GetWeightedCount() const
return nTotal;
}
-ULONG ScColumn::GetCodeCount() const
+sal_uLong ScColumn::GetCodeCount() const
{
- ULONG nCodeCount = 0;
+ sal_uLong nCodeCount = 0;
for (SCSIZE i=0; i<nCount; i++)
{
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 65e896c7f2c4..b6884e4f04b9 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -64,18 +64,18 @@ extern const ScFormulaCell* pLastFormulaTreeTop; // in cellform.cxx
using namespace formula;
// STATIC DATA -----------------------------------------------------------
-BOOL ScColumn::bDoubleAlloc = FALSE; // fuer Import: Groesse beim Allozieren verdoppeln
+sal_Bool ScColumn::bDoubleAlloc = sal_False; // fuer Import: Groesse beim Allozieren verdoppeln
void ScColumn::Insert( SCROW nRow, ScBaseCell* pNewCell )
{
- BOOL bIsAppended = FALSE;
+ sal_Bool bIsAppended = sal_False;
if (pItems && nCount>0)
{
if (pItems[nCount-1].nRow < nRow)
{
Append(nRow, pNewCell );
- bIsAppended = TRUE;
+ bIsAppended = sal_True;
}
}
if ( !bIsAppended )
@@ -156,16 +156,16 @@ void ScColumn::Insert( SCROW nRow, ScBaseCell* pNewCell )
}
-void ScColumn::Insert( SCROW nRow, ULONG nNumberFormat, ScBaseCell* pCell )
+void ScColumn::Insert( SCROW nRow, sal_uLong nNumberFormat, ScBaseCell* pCell )
{
Insert(nRow, pCell);
short eOldType = pDocument->GetFormatTable()->
- GetType( (ULONG)
+ GetType( (sal_uLong)
((SfxUInt32Item*)GetAttr( nRow, ATTR_VALUE_FORMAT ))->
GetValue() );
short eNewType = pDocument->GetFormatTable()->GetType(nNumberFormat);
if (!pDocument->GetFormatTable()->IsCompatible(eOldType, eNewType))
- ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT, (UINT32) nNumberFormat) );
+ ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT, (sal_uInt32) nNumberFormat) );
}
@@ -274,10 +274,10 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if ( nFirstIndex >= nCount )
return ;
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
- BOOL bFound=FALSE;
+ sal_Bool bFound=sal_False;
SCROW nEndRow = nStartRow + nSize - 1;
SCSIZE nStartIndex = 0;
SCSIZE nEndIndex = 0;
@@ -288,7 +288,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if (!bFound)
{
nStartIndex = i;
- bFound = TRUE;
+ bFound = sal_True;
}
nEndIndex = i;
@@ -319,7 +319,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
ScHint aHint( SC_HINT_DATACHANGED, aAdr, NULL ); // only areas (ScBaseCell* == NULL)
ScAddress& rAddress = aHint.GetAddress();
// for sparse occupation use single broadcasts, not ranges
- BOOL bSingleBroadcasts = (((pItems[nCount-1].nRow - pItems[i].nRow) /
+ sal_Bool bSingleBroadcasts = (((pItems[nCount-1].nRow - pItems[i].nRow) /
(nCount - i)) > 1);
if ( bSingleBroadcasts )
{
@@ -362,7 +362,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
}
-void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFlag )
+void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDelFlag )
{
/* If caller specifies to not remove the note caption objects, all cells
have to forget the pointers to them. This is used e.g. while undoing a
@@ -431,13 +431,13 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFla
{
case CELLTYPE_VALUE:
{
- USHORT nValFlags = nDelFlag & (IDF_DATETIME|IDF_VALUE);
+ sal_uInt16 nValFlags = nDelFlag & (IDF_DATETIME|IDF_VALUE);
// delete values and dates?
bDelete = nValFlags == (IDF_DATETIME|IDF_VALUE);
// if not, decide according to cell number format
if( !bDelete && (nValFlags != 0) )
{
- ULONG nIndex = (ULONG)((SfxUInt32Item*)GetAttr( pItems[j].nRow, ATTR_VALUE_FORMAT ))->GetValue();
+ sal_uLong nIndex = (sal_uLong)((SfxUInt32Item*)GetAttr( pItems[j].nRow, ATTR_VALUE_FORMAT ))->GetValue();
short nType = pDocument->GetFormatTable()->GetType(nIndex);
bool bIsDate = (nType == NUMBERFORMAT_DATE) || (nType == NUMBERFORMAT_TIME) || (nType == NUMBERFORMAT_DATETIME);
bDelete = nValFlags == (bIsDate ? IDF_DATETIME : IDF_VALUE);
@@ -547,18 +547,18 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFla
}
-void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
+void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nDelFlag)
{
// FreeAll darf hier nicht gerufen werden wegen Broadcastern
// Attribute erst am Ende, damit vorher noch zwischen Zahlen und Datum
// unterschieden werden kann (#47901#)
- USHORT nContMask = IDF_CONTENTS;
+ sal_uInt16 nContMask = IDF_CONTENTS;
// IDF_NOCAPTIONS needs to be passed too, if IDF_NOTE is set
if( nDelFlag & IDF_NOTE )
nContMask |= IDF_NOCAPTIONS;
- USHORT nContFlag = nDelFlag & nContMask;
+ sal_uInt16 nContFlag = nDelFlag & nContMask;
if (pItems && nCount>0 && nContFlag)
{
@@ -566,7 +566,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
DeleteRange( 0, nCount-1, nContFlag );
else
{
- BOOL bFound=FALSE;
+ sal_Bool bFound=sal_False;
SCSIZE nStartIndex = 0;
SCSIZE nEndIndex = 0;
for (SCSIZE i = 0; i < nCount; i++)
@@ -575,7 +575,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
if (!bFound)
{
nStartIndex = i;
- bFound = TRUE;
+ bFound = sal_True;
}
nEndIndex = i;
}
@@ -597,29 +597,29 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag)
ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& rDestPos,
- SCSIZE nIndex, USHORT nFlags ) const
+ SCSIZE nIndex, sal_uInt16 nFlags ) const
{
- USHORT nContFlags = nFlags & IDF_CONTENTS;
+ sal_uInt16 nContFlags = nFlags & IDF_CONTENTS;
if (!nContFlags)
return NULL;
// Testen, ob Zelle kopiert werden soll
// auch bei IDF_CONTENTS komplett, wegen Notes / Broadcastern
- BOOL bMatch = FALSE;
+ sal_Bool bMatch = sal_False;
ScBaseCell* pCell = pItems[nIndex].pCell;
CellType eCellType = pCell->GetCellType();
switch ( eCellType )
{
case CELLTYPE_VALUE:
{
- USHORT nValFlags = nFlags & (IDF_DATETIME|IDF_VALUE);
+ sal_uInt16 nValFlags = nFlags & (IDF_DATETIME|IDF_VALUE);
if ( nValFlags == (IDF_DATETIME|IDF_VALUE) )
- bMatch = TRUE;
+ bMatch = sal_True;
else if ( nValFlags )
{
- ULONG nNumIndex = (ULONG)((SfxUInt32Item*)GetAttr(
+ sal_uLong nNumIndex = (sal_uLong)((SfxUInt32Item*)GetAttr(
pItems[nIndex].nRow, ATTR_VALUE_FORMAT ))->GetValue();
short nTyp = pDocument->GetFormatTable()->GetType(nNumIndex);
if ((nTyp == NUMBERFORMAT_DATE) || (nTyp == NUMBERFORMAT_TIME) || (nTyp == NUMBERFORMAT_DATETIME))
@@ -647,9 +647,9 @@ ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& r
aRef.nRow = pItems[nIndex].nRow;
aRef.nTab = nTab;
aRef.InitFlags(); // -> alles absolut
- aRef.SetFlag3D(TRUE);
+ aRef.SetFlag3D(sal_True);
- //! 3D(FALSE) und TabRel(TRUE), wenn die endgueltige Position auf der selben Tabelle ist?
+ //! 3D(sal_False) und TabRel(sal_True), wenn die endgueltige Position auf der selben Tabelle ist?
//! (bei TransposeClip ist die Zielposition noch nicht bekannt)
aRef.CalcRelFromAbs( rDestPos );
@@ -665,7 +665,7 @@ ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& r
// nRow1, nRow2 = Zielposition
void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
- USHORT nInsFlag, BOOL bAsLink, BOOL bSkipAttrForEmpty,
+ sal_uInt16 nInsFlag, sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty,
ScColumn& rColumn)
{
if ((nInsFlag & IDF_ATTRIB) != 0)
@@ -723,7 +723,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
// nRow wird angepasst
aRef.nTab = rColumn.nTab;
aRef.InitFlags(); // -> alles absolut
- aRef.SetFlag3D(TRUE);
+ aRef.SetFlag3D(sal_True);
for (SCROW nDestRow = nRow1; nDestRow <= nRow2; nDestRow++)
{
@@ -755,12 +755,12 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
// IDF_ADDNOTES must be passed without other content flags than IDF_NOTE
bool bAddNotes = (nInsFlag & (IDF_CONTENTS | IDF_ADDNOTES)) == (IDF_NOTE | IDF_ADDNOTES);
- BOOL bAtEnd = FALSE;
+ sal_Bool bAtEnd = sal_False;
for (SCSIZE i = 0; i < nColCount && !bAtEnd; i++)
{
SCsROW nDestRow = rColumn.pItems[i].nRow + nDy;
if ( nDestRow > (SCsROW) nRow2 )
- bAtEnd = TRUE;
+ bAtEnd = sal_True;
else if ( nDestRow >= (SCsROW) nRow1 )
{
// rows at the beginning may be skipped if filtered rows are left out,
@@ -814,7 +814,7 @@ bool lclCanCloneValue( ScDocument& rDoc, const ScColumn& rCol, SCROW nRow, bool
return bCloneValue;
// check number format of value cell
- ULONG nNumIndex = (ULONG)((SfxUInt32Item*)rCol.GetAttr( nRow, ATTR_VALUE_FORMAT ))->GetValue();
+ sal_uLong nNumIndex = (sal_uLong)((SfxUInt32Item*)rCol.GetAttr( nRow, ATTR_VALUE_FORMAT ))->GetValue();
short nTyp = rDoc.GetFormatTable()->GetType( nNumIndex );
bool bIsDateTime = (nTyp == NUMBERFORMAT_DATE) || (nTyp == NUMBERFORMAT_TIME) || (nTyp == NUMBERFORMAT_DATETIME);
return bIsDateTime ? bCloneDateTime : bCloneValue;
@@ -823,7 +823,7 @@ bool lclCanCloneValue( ScDocument& rDoc, const ScColumn& rCol, SCROW nRow, bool
} // namespace
-ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestDoc, const ScAddress& rDestPos)
+ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, sal_uInt16 nFlags, ScDocument& rDestDoc, const ScAddress& rDestPos)
{
bool bCloneValue = (nFlags & IDF_VALUE) != 0;
bool bCloneDateTime = (nFlags & IDF_DATETIME) != 0;
@@ -863,7 +863,7 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD
// #48491# ins Undo-Dokument immer nur die Original-Zelle kopieren,
// aus Formeln keine Value/String-Zellen erzeugen
ScFormulaCell& rForm = (ScFormulaCell&)rSource;
- USHORT nErr = rForm.GetErrCode();
+ sal_uInt16 nErr = rForm.GetErrCode();
if ( nErr )
{
// error codes are cloned with values
@@ -925,8 +925,8 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD
}
-void ScColumn::MixMarked( const ScMarkData& rMark, USHORT nFunction,
- BOOL bSkipEmpty, ScColumn& rSrcCol )
+void ScColumn::MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, ScColumn& rSrcCol )
{
SCROW nRow1, nRow2;
@@ -941,9 +941,9 @@ void ScColumn::MixMarked( const ScMarkData& rMark, USHORT nFunction,
// Ergebnis in rVal1
-BOOL lcl_DoFunction( double& rVal1, double nVal2, USHORT nFunction )
+sal_Bool lcl_DoFunction( double& rVal1, double nVal2, sal_uInt16 nFunction )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
switch (nFunction)
{
case PASTE_ADD:
@@ -984,7 +984,7 @@ void lcl_AddCode( ScTokenArray& rArr, ScFormulaCell* pCell )
void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
- USHORT nFunction, BOOL bSkipEmpty,
+ sal_uInt16 nFunction, sal_Bool bSkipEmpty,
ScColumn& rSrcCol )
{
SCSIZE nSrcCount = rSrcCol.nCount;
@@ -1010,7 +1010,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
ScBaseCell* pSrc = NULL;
ScBaseCell* pDest = NULL;
ScBaseCell* pNew = NULL;
- BOOL bDelete = FALSE;
+ sal_Bool bDelete = sal_False;
if ( nSrcIndex < nSrcCount && nNextSrc == nRow )
pSrc = rSrcCol.pItems[nSrcIndex].pCell;
@@ -1023,8 +1023,8 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
CellType eSrcType = pSrc ? pSrc->GetCellType() : CELLTYPE_NONE;
CellType eDestType = pDest ? pDest->GetCellType() : CELLTYPE_NONE;
- BOOL bSrcEmpty = ( eSrcType == CELLTYPE_NONE || eSrcType == CELLTYPE_NOTE );
- BOOL bDestEmpty = ( eDestType == CELLTYPE_NONE || eDestType == CELLTYPE_NOTE );
+ sal_Bool bSrcEmpty = ( eSrcType == CELLTYPE_NONE || eSrcType == CELLTYPE_NOTE );
+ sal_Bool bDestEmpty = ( eDestType == CELLTYPE_NONE || eDestType == CELLTYPE_NOTE );
if ( bSkipEmpty && bDestEmpty ) // Originalzelle wiederherstellen
{
@@ -1048,12 +1048,12 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
// leere Zellen werden als Werte behandelt
- BOOL bSrcVal = ( bSrcEmpty || eSrcType == CELLTYPE_VALUE );
- BOOL bDestVal = ( bDestEmpty || eDestType == CELLTYPE_VALUE );
+ sal_Bool bSrcVal = ( bSrcEmpty || eSrcType == CELLTYPE_VALUE );
+ sal_Bool bDestVal = ( bDestEmpty || eDestType == CELLTYPE_VALUE );
- BOOL bSrcText = ( eSrcType == CELLTYPE_STRING ||
+ sal_Bool bSrcText = ( eSrcType == CELLTYPE_STRING ||
eSrcType == CELLTYPE_EDIT );
- BOOL bDestText = ( eDestType == CELLTYPE_STRING ||
+ sal_Bool bDestText = ( eDestType == CELLTYPE_STRING ||
eDestType == CELLTYPE_EDIT );
// sonst bleibt nur Formel...
@@ -1066,7 +1066,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
{
// neuen Wert eintragen, oder Fehler bei Ueberlauf
- BOOL bOk = lcl_DoFunction( nVal1, nVal2, nFunction );
+ sal_Bool bOk = lcl_DoFunction( nVal1, nVal2, nFunction );
if (bOk)
pNew = new ScValueCell( nVal1 );
@@ -1088,7 +1088,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
if (pSrc)
pNew = pSrc->CloneWithoutNote( *pDocument );
else if (pDest)
- bDelete = TRUE;
+ bDelete = sal_True;
}
else
{
@@ -1246,16 +1246,16 @@ void ScColumn::StartListeningInArea( SCROW nRow1, SCROW nRow2 )
}
-// TRUE = Zahlformat gesetzt
-BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
+// sal_True = Zahlformat gesetzt
+sal_Bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
formula::FormulaGrammar::AddressConvention eConv,
SvNumberFormatter* pLangFormatter, bool bDetectNumberFormat )
{
- BOOL bNumFmtSet = FALSE;
+ sal_Bool bNumFmtSet = sal_False;
if (VALIDROW(nRow))
{
ScBaseCell* pNewCell = NULL;
- BOOL bIsLoading = FALSE;
+ sal_Bool bIsLoading = sal_False;
if (rString.Len() > 0)
{
double nVal;
@@ -1298,7 +1298,7 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
pNewCell = new ScStringCell( rString.Copy(1) );
else
{
- BOOL bIsText = FALSE;
+ sal_Bool bIsText = sal_False;
if ( bIsLoading )
{
if ( pItems && nCount )
@@ -1317,7 +1317,7 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
case CELLTYPE_STRING :
((ScStringCell*)pCell)->GetString( aStr );
if ( rString == aStr )
- bIsText = TRUE;
+ bIsText = sal_True;
break;
case CELLTYPE_NOTE : // durch =Formel referenziert
break;
@@ -1364,7 +1364,7 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
// the old one was the default number, date, time or boolean format.
// Exception: If the new format is boolean, always apply it.
- BOOL bOverwrite = FALSE;
+ sal_Bool bOverwrite = sal_False;
const SvNumberformat* pOldFormat = pFormatter->GetEntry( nOldIndex );
if ( pOldFormat )
{
@@ -1375,20 +1375,20 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
if ( nOldIndex == pFormatter->GetStandardFormat(
nOldType, pOldFormat->GetLanguage() ) )
{
- bOverwrite = TRUE; // default of these types can be overwritten
+ bOverwrite = sal_True; // default of these types can be overwritten
}
}
}
if ( !bOverwrite && pFormatter->GetType( nIndex ) == NUMBERFORMAT_LOGICAL )
{
- bOverwrite = TRUE; // overwrite anything if boolean was detected
+ bOverwrite = sal_True; // overwrite anything if boolean was detected
}
if ( bOverwrite )
{
ApplyAttr( nRow, SfxUInt32Item( ATTR_VALUE_FORMAT,
- (UINT32) nIndex) );
- bNumFmtSet = TRUE;
+ (sal_uInt32) nIndex) );
+ bNumFmtSet = sal_True;
}
}
}
@@ -1495,11 +1495,11 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
Search( nStartRow, nIndex );
- while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE )
+ while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : sal_False )
{
ScBaseCell* pCell = pItems[nIndex].pCell;
TypedStrData* pData;
- ULONG nFormat = GetNumberFormat( nRow );
+ sal_uLong nFormat = GetNumberFormat( nRow );
ScCellFormat::GetInputString( pCell, nFormat, aString, *pFormatter );
@@ -1567,13 +1567,13 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
#define DATENT_SEARCH 2000
-BOOL ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, BOOL bLimit)
+sal_Bool ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, sal_Bool bLimit)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCSIZE nThisIndex;
- BOOL bThisUsed = Search( nStartRow, nThisIndex );
+ sal_Bool bThisUsed = Search( nStartRow, nThisIndex );
String aString;
- USHORT nCells = 0;
+ sal_uInt16 nCells = 0;
// Die Beschraenkung auf angrenzende Zellen (ohne Luecken) ist nicht mehr gewollt
// (Featurekommission zur 5.1), stattdessen abwechselnd nach oben und unten suchen,
@@ -1603,7 +1603,7 @@ BOOL ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, B
delete pData; // doppelt
else if ( bLimit && rStrings.GetCount() >= DATENT_MAX )
break; // Maximum erreicht
- bFound = TRUE;
+ bFound = sal_True;
if ( bLimit )
if (++nCells >= DATENT_SEARCH)
@@ -1628,7 +1628,7 @@ BOOL ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, B
delete pData; // doppelt
else if ( bLimit && rStrings.GetCount() >= DATENT_MAX )
break; // Maximum erreicht
- bFound = TRUE;
+ bFound = sal_True;
if ( bLimit )
if (++nCells >= DATENT_SEARCH)
@@ -1687,7 +1687,7 @@ void ScColumn::RemoveProtected( SCROW nStartRow, SCROW nEndRow )
}
-void ScColumn::SetError( SCROW nRow, const USHORT nError)
+void ScColumn::SetError( SCROW nRow, const sal_uInt16 nError)
{
if (VALIDROW(nRow))
{
@@ -1718,7 +1718,7 @@ void ScColumn::GetString( SCROW nRow, String& rString ) const
ScBaseCell* pCell = pItems[nIndex].pCell;
if (pCell->GetCellType() != CELLTYPE_NOTE)
{
- ULONG nFormat = GetNumberFormat( nRow );
+ sal_uLong nFormat = GetNumberFormat( nRow );
ScCellFormat::GetString( pCell, nFormat, rString, &pColor, *(pDocument->GetFormatTable()) );
}
else
@@ -1737,7 +1737,7 @@ void ScColumn::GetInputString( SCROW nRow, String& rString ) const
ScBaseCell* pCell = pItems[nIndex].pCell;
if (pCell->GetCellType() != CELLTYPE_NOTE)
{
- ULONG nFormat = GetNumberFormat( nRow );
+ sal_uLong nFormat = GetNumberFormat( nRow );
ScCellFormat::GetInputString( pCell, nFormat, rString, *(pDocument->GetFormatTable()) );
}
else
@@ -1776,7 +1776,7 @@ double ScColumn::GetValue( SCROW nRow ) const
}
-void ScColumn::GetFormula( SCROW nRow, String& rFormula, BOOL ) const
+void ScColumn::GetFormula( SCROW nRow, String& rFormula, sal_Bool ) const
{
SCSIZE nIndex;
if (Search(nRow, nIndex))
@@ -1801,7 +1801,7 @@ CellType ScColumn::GetCellType( SCROW nRow ) const
}
-USHORT ScColumn::GetErrCode( SCROW nRow ) const
+sal_uInt16 ScColumn::GetErrCode( SCROW nRow ) const
{
SCSIZE nIndex;
if (Search(nRow, nIndex))
@@ -1814,26 +1814,26 @@ USHORT ScColumn::GetErrCode( SCROW nRow ) const
}
-BOOL ScColumn::HasStringData( SCROW nRow ) const
+sal_Bool ScColumn::HasStringData( SCROW nRow ) const
{
SCSIZE nIndex;
if (Search(nRow, nIndex))
return (pItems[nIndex].pCell)->HasStringData();
- return FALSE;
+ return sal_False;
}
-BOOL ScColumn::HasValueData( SCROW nRow ) const
+sal_Bool ScColumn::HasValueData( SCROW nRow ) const
{
SCSIZE nIndex;
if (Search(nRow, nIndex))
return (pItems[nIndex].pCell)->HasValueData();
- return FALSE;
+ return sal_False;
}
-BOOL ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const
{
- // TRUE, wenn String- oder Editzellen im Bereich
+ // sal_True, wenn String- oder Editzellen im Bereich
if ( pItems )
{
@@ -1843,11 +1843,11 @@ BOOL ScColumn::HasStringCells( SCROW nStartRow, SCROW nEndRow ) const
{
CellType eType = pItems[nIndex].pCell->GetCellType();
if ( eType == CELLTYPE_STRING || eType == CELLTYPE_EDIT )
- return TRUE;
+ return sal_True;
++nIndex;
}
}
- return FALSE;
+ return sal_False;
}
@@ -1907,7 +1907,7 @@ sal_Int32 ScColumn::GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, CharSet eCh
if ( pCell->GetCellType() != CELLTYPE_NOTE )
{
Color* pColor;
- ULONG nFormat = (ULONG) ((SfxUInt32Item*) GetAttr(
+ sal_uLong nFormat = (sal_uLong) ((SfxUInt32Item*) GetAttr(
nRow, ATTR_VALUE_FORMAT ))->GetValue();
ScCellFormat::GetString( pCell, nFormat, aString, &pColor,
*pNumFmt );
@@ -1961,7 +1961,7 @@ xub_StrLen ScColumn::GetMaxNumberStringLen(
if ( eType == CELLTYPE_VALUE || (eType == CELLTYPE_FORMULA
&& ((ScFormulaCell*)pCell)->IsValue()) )
{
- ULONG nFormat = (ULONG) ((SfxUInt32Item*) GetAttr(
+ sal_uLong nFormat = (sal_uLong) ((SfxUInt32Item*) GetAttr(
nRow, ATTR_VALUE_FORMAT ))->GetValue();
ScCellFormat::GetInputString( pCell, nFormat, aString, *pNumFmt );
xub_StrLen nLen = aString.Len();
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 95da04fef0e0..fda3ca585621 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -888,19 +888,19 @@ void ScCoupledCompressedArrayIterator<A,D,S>::Resync( A nPos )
// === Force instantiation of specializations ================================
-template class ScCompressedArray< SCROW, USHORT>; // heights, base class
-template class ScSummableCompressedArray< SCROW, USHORT>; // heights
-template class ScCompressedArray< SCROW, BYTE>; // flags, base class
-template class ScBitMaskCompressedArray< SCROW, BYTE>; // flags
+template class ScCompressedArray< SCROW, sal_uInt16>; // heights, base class
+template class ScSummableCompressedArray< SCROW, sal_uInt16>; // heights
+template class ScCompressedArray< SCROW, sal_uInt8>; // flags, base class
+template class ScBitMaskCompressedArray< SCROW, sal_uInt8>; // flags
template unsigned long ScBitMaskCompressedArray< SCROW,
- BYTE>::SumCoupledArrayForCondition( SCROW, SCROW, const BYTE&, const BYTE&,
- const ScSummableCompressedArray< SCROW, USHORT>&) const;
+ sal_uInt8>::SumCoupledArrayForCondition( SCROW, SCROW, const sal_uInt8&, const sal_uInt8&,
+ const ScSummableCompressedArray< SCROW, sal_uInt16>&) const;
template unsigned long ScBitMaskCompressedArray< SCROW,
- BYTE>::SumScaledCoupledArrayForCondition( SCROW, SCROW, const BYTE&,
- const BYTE&, const ScSummableCompressedArray< SCROW, USHORT>&,
+ sal_uInt8>::SumScaledCoupledArrayForCondition( SCROW, SCROW, const sal_uInt8&,
+ const sal_uInt8&, const ScSummableCompressedArray< SCROW, sal_uInt16>&,
double) const;
-template void ScCompressedArrayIterator< SCROW, USHORT>::Follow(
- const ScCompressedArrayIterator< SCROW, BYTE>&);
-template class ScCoupledCompressedArrayIterator< SCROW, BYTE, USHORT>;
+template void ScCompressedArrayIterator< SCROW, sal_uInt16>::Follow(
+ const ScCompressedArrayIterator< SCROW, sal_uInt8>&);
+template class ScCoupledCompressedArrayIterator< SCROW, sal_uInt8, sal_uInt16>;
// === EOF ===================================================================
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 3fff9faf2105..3e1b56387604 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -56,7 +56,7 @@ SV_IMPL_OP_PTRARR_SORT( ScConditionalFormats_Impl, ScConditionalFormatPtr );
//------------------------------------------------------------------------
-BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion = 0 )
+sal_Bool lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, sal_uInt16 nRecursion = 0 )
{
if (pFormula)
{
@@ -70,7 +70,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
{
ScSingleRefData& rRef2 = static_cast<ScToken*>(t)->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() )
- return TRUE;
+ return sal_True;
}
// fall through
@@ -78,7 +78,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
{
ScSingleRefData& rRef1 = static_cast<ScToken*>(t)->GetSingleRef();
if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() )
- return TRUE;
+ return sal_True;
}
break;
@@ -87,7 +87,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
if( t->GetOpCode() == ocName ) // DB areas always absolute
if( ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex( t->GetIndex() ) )
if( (nRecursion < 42) && lcl_HasRelRef( pDoc, pRangeData->GetCode(), nRecursion + 1 ) )
- return TRUE;
+ return sal_True;
}
break;
@@ -100,7 +100,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
case ocColumn: // COLUMN() returns own column index
case ocTable: // SHEET() returns own sheet index
case ocCell: // CELL() may return own cell address
- return TRUE;
+ return sal_True;
// break;
default:
{
@@ -117,7 +117,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
}
}
}
- return FALSE;
+ return sal_False;
}
ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) :
@@ -142,7 +142,7 @@ ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) :
pDoc(r.pDoc),
bRelRef1(r.bRelRef1),
bRelRef2(r.bRelRef2),
- bFirstRun(TRUE)
+ bFirstRun(sal_True)
{
// ScTokenArray copy ctor erzeugt flache Kopie
@@ -176,7 +176,7 @@ ScConditionEntry::ScConditionEntry( ScDocument* pDocument, const ScConditionEntr
pDoc(pDocument),
bRelRef1(r.bRelRef1),
bRelRef2(r.bRelRef2),
- bFirstRun(TRUE)
+ bFirstRun(sal_True)
{
// echte Kopie der Formeln (fuer Ref-Undo)
@@ -201,19 +201,19 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
aStrNmsp2(rExprNmsp2),
eTempGrammar1(eGrammar1),
eTempGrammar2(eGrammar2),
- bIsStr1(FALSE),
- bIsStr2(FALSE),
+ bIsStr1(sal_False),
+ bIsStr2(sal_False),
pFormula1(NULL),
pFormula2(NULL),
aSrcPos(rPos),
pFCell1(NULL),
pFCell2(NULL),
pDoc(pDocument),
- bRelRef1(FALSE),
- bRelRef2(FALSE),
- bFirstRun(TRUE)
+ bRelRef1(sal_False),
+ bRelRef2(sal_False),
+ bFirstRun(sal_True)
{
- Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, FALSE );
+ Compile( rExpr1, rExpr2, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2, sal_False );
// Formelzellen werden erst bei IsValid angelegt
}
@@ -227,17 +227,17 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
nVal2(0.0),
eTempGrammar1(FormulaGrammar::GRAM_DEFAULT),
eTempGrammar2(FormulaGrammar::GRAM_DEFAULT),
- bIsStr1(FALSE),
- bIsStr2(FALSE),
+ bIsStr1(sal_False),
+ bIsStr2(sal_False),
pFormula1(NULL),
pFormula2(NULL),
aSrcPos(rPos),
pFCell1(NULL),
pFCell2(NULL),
pDoc(pDocument),
- bRelRef1(FALSE),
- bRelRef2(FALSE),
- bFirstRun(TRUE)
+ bRelRef1(sal_False),
+ bRelRef2(sal_False),
+ bFirstRun(sal_True)
{
if ( pArr1 )
{
@@ -255,7 +255,7 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
}
else if ( pToken->GetType() == svString )
{
- bIsStr1 = TRUE;
+ bIsStr1 = sal_True;
aStrVal1 = pToken->GetString();
DELETEZ(pFormula1); // nicht als Formel merken
}
@@ -279,7 +279,7 @@ ScConditionEntry::ScConditionEntry( ScConditionMode eOper,
}
else if ( pToken->GetType() == svString )
{
- bIsStr2 = TRUE;
+ bIsStr2 = sal_True;
aStrVal2 = pToken->GetString();
DELETEZ(pFormula2); // nicht als Formel merken
}
@@ -302,7 +302,7 @@ ScConditionEntry::~ScConditionEntry()
void ScConditionEntry::Compile( const String& rExpr1, const String& rExpr2,
const String& rExprNmsp1, const String& rExprNmsp2,
- FormulaGrammar::Grammar eGrammar1, FormulaGrammar::Grammar eGrammar2, BOOL bTextToReal )
+ FormulaGrammar::Grammar eGrammar1, FormulaGrammar::Grammar eGrammar2, sal_Bool bTextToReal )
{
if ( rExpr1.Len() || rExpr2.Len() )
{
@@ -335,7 +335,7 @@ void ScConditionEntry::Compile( const String& rExpr1, const String& rExpr2,
}
else if ( pToken->GetType() == svString )
{
- bIsStr1 = TRUE;
+ bIsStr1 = sal_True;
aStrVal1 = pToken->GetString();
DELETEZ(pFormula1); // nicht als Formel merken
}
@@ -372,7 +372,7 @@ void ScConditionEntry::Compile( const String& rExpr1, const String& rExpr2,
}
else if ( pToken->GetType() == svString )
{
- bIsStr2 = TRUE;
+ bIsStr2 = sal_True;
aStrVal2 = pToken->GetString();
DELETEZ(pFormula2); // nicht als Formel merken
}
@@ -402,7 +402,7 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // Formelzel
}
}
-void ScConditionEntry::SetIgnoreBlank(BOOL bSet)
+void ScConditionEntry::SetIgnoreBlank(sal_Bool bSet)
{
// Das Bit SC_COND_NOBLANKS wird gesetzt, wenn Blanks nicht ignoriert werden
// (nur bei Gueltigkeit)
@@ -440,7 +440,7 @@ void ScConditionEntry::CompileXML()
Compile( GetExpression(aSrcPos, 0, 0, eTempGrammar1),
GetExpression(aSrcPos, 1, 0, eTempGrammar2),
- aStrNmsp1, aStrNmsp2, eTempGrammar1, eTempGrammar2, TRUE );
+ aStrNmsp1, aStrNmsp2, eTempGrammar1, eTempGrammar2, sal_True );
}
void ScConditionEntry::SetSrcString( const String& rNew )
@@ -471,10 +471,10 @@ void ScConditionEntry::SetFormula2( const ScTokenArray& rArray )
}
}
-void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab, BOOL& rChanged )
+void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab, sal_Bool& rChanged )
{
// Insert table: only update absolute table references.
- // (Similar to ScCompiler::UpdateInsertTab with bIsName=TRUE, result is the same as for named ranges)
+ // (Similar to ScCompiler::UpdateInsertTab with bIsName=sal_True, result is the same as for named ranges)
// For deleting, ScCompiler::UpdateDeleteTab is used because of the handling of invalid references.
rCode.Reset();
@@ -486,7 +486,7 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
{
rRef1.nTab += 1;
rRef1.nRelTab = rRef1.nTab - nPosTab;
- rChanged = TRUE;
+ rChanged = sal_True;
}
if( p->GetType() == svDoubleRef )
{
@@ -495,7 +495,7 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
{
rRef2.nTab += 1;
rRef2.nRelTab = rRef2.nTab - nPosTab;
- rChanged = TRUE;
+ rChanged = sal_True;
}
}
p = static_cast<ScToken*>(rCode.GetNextReference());
@@ -505,11 +505,11 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- BOOL bInsertTab = ( eUpdateRefMode == URM_INSDEL && nDz == 1 );
- BOOL bDeleteTab = ( eUpdateRefMode == URM_INSDEL && nDz == -1 );
+ sal_Bool bInsertTab = ( eUpdateRefMode == URM_INSDEL && nDz == 1 );
+ sal_Bool bDeleteTab = ( eUpdateRefMode == URM_INSDEL && nDz == -1 );
- BOOL bChanged1 = FALSE;
- BOOL bChanged2 = FALSE;
+ sal_Bool bChanged1 = sal_False;
+ sal_Bool bChanged2 = sal_False;
if (pFormula1)
{
@@ -520,7 +520,7 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
ScCompiler aComp( pDoc, aSrcPos, *pFormula1 );
aComp.SetGrammar(pDoc->GetGrammar());
if ( bDeleteTab )
- aComp.UpdateDeleteTab( rRange.aStart.Tab(), FALSE, TRUE, bChanged1 );
+ aComp.UpdateDeleteTab( rRange.aStart.Tab(), sal_False, sal_True, bChanged1 );
else
aComp.UpdateNameReference( eUpdateRefMode, rRange, nDx, nDy, nDz, bChanged1 );
}
@@ -537,7 +537,7 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
ScCompiler aComp( pDoc, aSrcPos, *pFormula2);
aComp.SetGrammar(pDoc->GetGrammar());
if ( bDeleteTab )
- aComp.UpdateDeleteTab( rRange.aStart.Tab(), FALSE, TRUE, bChanged2 );
+ aComp.UpdateDeleteTab( rRange.aStart.Tab(), sal_False, sal_True, bChanged2 );
else
aComp.UpdateNameReference( eUpdateRefMode, rRange, nDx, nDy, nDz, bChanged2 );
}
@@ -553,39 +553,39 @@ void ScConditionEntry::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
ScCompiler aComp( pDoc, aSrcPos, *pFormula1);
aComp.SetGrammar(pDoc->GetGrammar());
- aComp.UpdateMoveTab(nOldPos, nNewPos, TRUE );
+ aComp.UpdateMoveTab(nOldPos, nNewPos, sal_True );
DELETEZ(pFCell1);
}
if (pFormula2)
{
ScCompiler aComp( pDoc, aSrcPos, *pFormula2);
aComp.SetGrammar(pDoc->GetGrammar());
- aComp.UpdateMoveTab(nOldPos, nNewPos, TRUE );
+ aComp.UpdateMoveTab(nOldPos, nNewPos, sal_True );
DELETEZ(pFCell2);
}
}
//! als Vergleichsoperator ans TokenArray ???
-BOOL lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
+sal_Bool lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
{
// verglichen wird nur das nicht-UPN Array
if ( pArr1 && pArr2 )
{
- USHORT nLen = pArr1->GetLen();
+ sal_uInt16 nLen = pArr1->GetLen();
if ( pArr2->GetLen() != nLen )
- return FALSE;
+ return sal_False;
FormulaToken** ppToken1 = pArr1->GetArray();
FormulaToken** ppToken2 = pArr2->GetArray();
- for (USHORT i=0; i<nLen; i++)
+ for (sal_uInt16 i=0; i<nLen; i++)
{
if ( ppToken1[i] != ppToken2[i] &&
!(*ppToken1[i] == *ppToken2[i]) )
- return FALSE; // Unterschied
+ return sal_False; // Unterschied
}
- return TRUE; // alle Eintraege gleich
+ return sal_True; // alle Eintraege gleich
}
else
return !pArr1 && !pArr2; // beide 0 -> gleich
@@ -593,7 +593,7 @@ BOOL lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
int ScConditionEntry::operator== ( const ScConditionEntry& r ) const
{
- BOOL bEq = (eOp == r.eOp && nOptions == r.nOptions &&
+ sal_Bool bEq = (eOp == r.eOp && nOptions == r.nOptions &&
lcl_IsEqual( pFormula1, r.pFormula1 ) &&
lcl_IsEqual( pFormula2, r.pFormula2 ));
if (bEq)
@@ -601,13 +601,13 @@ int ScConditionEntry::operator== ( const ScConditionEntry& r ) const
// for formulas, the reference positions must be compared, too
// (including aSrcString, for inserting the entries during XML import)
if ( ( pFormula1 || pFormula2 ) && ( aSrcPos != r.aSrcPos || aSrcString != r.aSrcString ) )
- bEq = FALSE;
+ bEq = sal_False;
// wenn keine Formeln, Werte vergleichen
if ( !pFormula1 && ( nVal1 != r.nVal1 || aStrVal1 != r.aStrVal1 || bIsStr1 != r.bIsStr1 ) )
- bEq = FALSE;
+ bEq = sal_False;
if ( !pFormula2 && ( nVal2 != r.nVal2 || aStrVal2 != r.aStrVal2 || bIsStr2 != r.bIsStr2 ) )
- bEq = FALSE;
+ bEq = sal_False;
}
return bEq;
@@ -623,7 +623,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
// Formeln auswerten
- BOOL bDirty = FALSE; //! 1 und 2 getrennt ???
+ sal_Bool bDirty = sal_False; //! 1 und 2 getrennt ???
ScFormulaCell* pTemp1 = NULL;
ScFormulaCell* pEff1 = pFCell1;
@@ -638,16 +638,16 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
{
//! Changed statt Dirty abfragen !!!
if (pEff1->GetDirty() && !bRelRef1)
- bDirty = TRUE;
+ bDirty = sal_True;
if (pEff1->IsValue())
{
- bIsStr1 = FALSE;
+ bIsStr1 = sal_False;
nVal1 = pEff1->GetValue();
aStrVal1.Erase();
}
else
{
- bIsStr1 = TRUE;
+ bIsStr1 = sal_True;
pEff1->GetString( aStrVal1 );
nVal1 = 0.0;
}
@@ -667,16 +667,16 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
if (!pEff2->IsRunning()) // keine 522 erzeugen
{
if (pEff2->GetDirty() && !bRelRef2)
- bDirty = TRUE;
+ bDirty = sal_True;
if (pEff2->IsValue())
{
- bIsStr2 = FALSE;
+ bIsStr2 = sal_False;
nVal2 = pEff2->GetValue();
aStrVal2.Erase();
}
else
{
- bIsStr2 = TRUE;
+ bIsStr2 = sal_True;
pEff2->GetString( aStrVal2 );
nVal2 = 0.0;
}
@@ -693,23 +693,23 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
DataChanged( NULL ); // alles
}
- bFirstRun = FALSE;
+ bFirstRun = sal_False;
}
-BOOL ScConditionEntry::IsValid( double nArg ) const
+sal_Bool ScConditionEntry::IsValid( double nArg ) const
{
// Interpret muss schon gerufen sein
if ( bIsStr1 )
{
- // wenn auf String getestet wird, bei Zahlen immer FALSE, ausser bei "ungleich"
+ // wenn auf String getestet wird, bei Zahlen immer sal_False, ausser bei "ungleich"
return ( eOp == SC_COND_NOTEQUAL );
}
if ( eOp == SC_COND_BETWEEN || eOp == SC_COND_NOTBETWEEN )
if ( bIsStr2 )
- return FALSE;
+ return sal_False;
double nComp1 = nVal1; // Kopie, damit vertauscht werden kann
double nComp2 = nVal2;
@@ -723,11 +723,11 @@ BOOL ScConditionEntry::IsValid( double nArg ) const
// Alle Grenzfaelle muessen per ::rtl::math::approxEqual getestet werden!
- BOOL bValid = FALSE;
+ sal_Bool bValid = sal_False;
switch (eOp)
{
case SC_COND_NONE:
- break; // immer FALSE;
+ break; // immer sal_False;
case SC_COND_EQUAL:
bValid = ::rtl::math::approxEqual( nArg, nComp1 );
break;
@@ -764,20 +764,20 @@ BOOL ScConditionEntry::IsValid( double nArg ) const
return bValid;
}
-BOOL ScConditionEntry::IsValidStr( const String& rArg ) const
+sal_Bool ScConditionEntry::IsValidStr( const String& rArg ) const
{
// Interpret muss schon gerufen sein
if ( eOp == SC_COND_DIRECT ) // Formel ist unabhaengig vom Inhalt
return !::rtl::math::approxEqual( nVal1, 0.0 );
- // Wenn Bedingung Zahl enthaelt, immer FALSE, ausser bei "ungleich"
+ // Wenn Bedingung Zahl enthaelt, immer sal_False, ausser bei "ungleich"
if ( !bIsStr1 )
return ( eOp == SC_COND_NOTEQUAL );
if ( eOp == SC_COND_BETWEEN || eOp == SC_COND_NOTBETWEEN )
if ( !bIsStr2 )
- return FALSE;
+ return sal_False;
String aUpVal1( aStrVal1 ); //! als Member? (dann auch in Interpret setzen)
String aUpVal2( aStrVal2 );
@@ -790,7 +790,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg ) const
String aTemp( aUpVal1 ); aUpVal1 = aUpVal2; aUpVal2 = aTemp;
}
- BOOL bValid;
+ sal_Bool bValid;
switch ( eOp )
{
case SC_COND_EQUAL:
@@ -831,7 +831,7 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg ) const
// SC_COND_DIRECT schon oben abgefragt
default:
DBG_ERROR("unbekannte Operation bei ScConditionEntry");
- bValid = FALSE;
+ bValid = sal_False;
break;
}
}
@@ -839,13 +839,13 @@ BOOL ScConditionEntry::IsValidStr( const String& rArg ) const
return bValid;
}
-BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) const
+sal_Bool ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) const
{
((ScConditionEntry*)this)->Interpret(rPos); // Formeln auswerten
double nArg = 0.0;
String aArgStr;
- BOOL bVal = TRUE;
+ sal_Bool bVal = sal_True;
if ( pCell )
{
@@ -867,7 +867,7 @@ BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c
break;
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
- bVal = FALSE;
+ bVal = sal_False;
if ( eType == CELLTYPE_STRING )
((ScStringCell*)pCell)->GetString(aArgStr);
else
@@ -882,7 +882,7 @@ BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c
if (!pCell)
if (bIsStr1)
- bVal = FALSE; // leere Zellen je nach Bedingung
+ bVal = sal_False; // leere Zellen je nach Bedingung
if (bVal)
return IsValid( nArg );
@@ -890,8 +890,8 @@ BOOL ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c
return IsValidStr( aArgStr );
}
-String ScConditionEntry::GetExpression( const ScAddress& rCursor, USHORT nIndex,
- ULONG nNumFmt,
+String ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 nIndex,
+ sal_uLong nNumFmt,
const FormulaGrammar::Grammar eGrammar ) const
{
String aRet;
@@ -941,7 +941,7 @@ String ScConditionEntry::GetExpression( const ScAddress& rCursor, USHORT nIndex,
return aRet;
}
-ScTokenArray* ScConditionEntry::CreateTokenArry( USHORT nIndex ) const
+ScTokenArray* ScConditionEntry::CreateTokenArry( sal_uInt16 nIndex ) const
{
ScTokenArray* pRet = NULL;
ScAddress aAddr;
@@ -982,7 +982,7 @@ ScTokenArray* ScConditionEntry::CreateTokenArry( USHORT nIndex ) const
void ScConditionEntry::SourceChanged( const ScAddress& rChanged )
{
- for (USHORT nPass = 0; nPass < 2; nPass++)
+ for (sal_uInt16 nPass = 0; nPass < 2; nPass++)
{
ScTokenArray* pFormula = nPass ? pFormula2 : pFormula1;
if (pFormula)
@@ -997,7 +997,7 @@ void ScConditionEntry::SourceChanged( const ScAddress& rChanged )
{
// absolut muss getroffen sein, relativ bestimmt Bereich
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
SCsCOL nCol1;
SCsROW nRow1;
SCsTAB nTab1;
@@ -1072,7 +1072,7 @@ ScAddress ScConditionEntry::GetValidSrcPos() const
SCTAB nMinTab = aSrcPos.Tab();
SCTAB nMaxTab = nMinTab;
- for (USHORT nPass = 0; nPass < 2; nPass++)
+ for (sal_uInt16 nPass = 0; nPass < 2; nPass++)
{
ScTokenArray* pFormula = nPass ? pFormula2 : pFormula1;
if (pFormula)
@@ -1123,7 +1123,7 @@ void ScConditionEntry::DataChanged( const ScRange* /* pModified */ ) const
bool ScConditionEntry::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- for (USHORT nPass = 0; !bAllMarked && nPass < 2; nPass++)
+ for (sal_uInt16 nPass = 0; !bAllMarked && nPass < 2; nPass++)
{
ScTokenArray* pFormula = nPass ? pFormula2 : pFormula1;
if (pFormula)
@@ -1210,7 +1210,7 @@ ScConditionalFormat::ScConditionalFormat(const ScConditionalFormat& r) :
if (nEntryCount)
{
ppEntries = new ScCondFormatEntry*[nEntryCount];
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
{
ppEntries[i] = new ScCondFormatEntry(*r.ppEntries[i]);
ppEntries[i]->SetParent(this);
@@ -1231,7 +1231,7 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
if (nEntryCount)
{
pNew->ppEntries = new ScCondFormatEntry*[nEntryCount];
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
{
pNew->ppEntries[i] = new ScCondFormatEntry( pNewDoc, *ppEntries[i] );
pNew->ppEntries[i]->SetParent(pNew);
@@ -1242,24 +1242,24 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
return pNew;
}
-BOOL ScConditionalFormat::EqualEntries( const ScConditionalFormat& r ) const
+sal_Bool ScConditionalFormat::EqualEntries( const ScConditionalFormat& r ) const
{
if ( nEntryCount != r.nEntryCount )
- return FALSE;
+ return sal_False;
//! auf gleiche Eintraege in anderer Reihenfolge testen ???
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
if ( ! (*ppEntries[i] == *r.ppEntries[i]) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
void ScConditionalFormat::AddEntry( const ScCondFormatEntry& rNew )
{
ScCondFormatEntry** ppNew = new ScCondFormatEntry*[nEntryCount+1];
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppNew[i] = ppEntries[i];
ppNew[nEntryCount] = new ScCondFormatEntry(rNew);
ppNew[nEntryCount]->SetParent(this);
@@ -1270,14 +1270,14 @@ void ScConditionalFormat::AddEntry( const ScCondFormatEntry& rNew )
ScConditionalFormat::~ScConditionalFormat()
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
delete ppEntries[i];
delete[] ppEntries;
delete pAreas;
}
-const ScCondFormatEntry* ScConditionalFormat::GetEntry( USHORT nPos ) const
+const ScCondFormatEntry* ScConditionalFormat::GetEntry( sal_uInt16 nPos ) const
{
if ( nPos < nEntryCount )
return ppEntries[nPos];
@@ -1287,14 +1287,14 @@ const ScCondFormatEntry* ScConditionalFormat::GetEntry( USHORT nPos ) const
const String& ScConditionalFormat::GetCellStyle( ScBaseCell* pCell, const ScAddress& rPos ) const
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
if ( ppEntries[i]->IsCellValid( pCell, rPos ) )
return ppEntries[i]->GetStyle();
return EMPTY_STRING;
}
-void lcl_Extend( ScRange& rRange, ScDocument* pDoc, BOOL bLines )
+void lcl_Extend( ScRange& rRange, ScDocument* pDoc, sal_Bool bLines )
{
SCTAB nTab = rRange.aStart.Tab();
DBG_ASSERT(rRange.aEnd.Tab() == nTab, "lcl_Extend - mehrere Tabellen?");
@@ -1304,7 +1304,7 @@ void lcl_Extend( ScRange& rRange, ScDocument* pDoc, BOOL bLines )
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bEx = pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
+ sal_Bool bEx = pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
if (bLines)
{
@@ -1321,7 +1321,7 @@ void lcl_Extend( ScRange& rRange, ScDocument* pDoc, BOOL bLines )
}
}
-BOOL lcl_CutRange( ScRange& rRange, const ScRange& rOther )
+sal_Bool lcl_CutRange( ScRange& rRange, const ScRange& rOther )
{
rRange.Justify();
ScRange aCmpRange = rOther;
@@ -1347,38 +1347,38 @@ BOOL lcl_CutRange( ScRange& rRange, const ScRange& rOther )
if ( rRange.aEnd.Tab() > aCmpRange.aEnd.Tab() )
rRange.aEnd.SetTab( aCmpRange.aEnd.Tab() );
- return TRUE;
+ return sal_True;
}
- return FALSE; // ausserhalb
+ return sal_False; // ausserhalb
}
void ScConditionalFormat::DoRepaint( const ScRange* pModified )
{
- USHORT i;
+ sal_uInt16 i;
SfxObjectShell* pSh = pDoc->GetDocumentShell();
if (pSh)
{
// Rahmen/Schatten enthalten?
// (alle Bedingungen testen)
- BOOL bExtend = FALSE;
- BOOL bRotate = FALSE;
- BOOL bAttrTested = FALSE;
+ sal_Bool bExtend = sal_False;
+ sal_Bool bRotate = sal_False;
+ sal_Bool bAttrTested = sal_False;
if (!pAreas) // RangeList ggf. holen
{
pAreas = new ScRangeList;
pDoc->FindConditionalFormat( nKey, *pAreas );
}
- USHORT nCount = (USHORT) pAreas->Count();
+ sal_uInt16 nCount = (sal_uInt16) pAreas->Count();
for (i=0; i<nCount; i++)
{
ScRange aRange = *pAreas->GetObject(i);
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if ( pModified )
{
if ( !lcl_CutRange( aRange, *pModified ) )
- bDo = FALSE;
+ bDo = sal_False;
}
if (bDo)
{
@@ -1387,7 +1387,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
// #116562# Look at the style's content only if the repaint is necessary
// for any condition, to avoid the time-consuming Find() if there are many
// conditional formats and styles.
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aStyle = ppEntries[nEntry]->GetStyle();
if (aStyle.Len())
@@ -1397,20 +1397,20 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
if ( pStyleSheet )
{
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
- if (rSet.GetItemState( ATTR_BORDER, TRUE ) == SFX_ITEM_SET ||
- rSet.GetItemState( ATTR_SHADOW, TRUE ) == SFX_ITEM_SET)
+ if (rSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET ||
+ rSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET)
{
- bExtend = TRUE;
+ bExtend = sal_True;
}
- if (rSet.GetItemState( ATTR_ROTATE_VALUE, TRUE ) == SFX_ITEM_SET ||
- rSet.GetItemState( ATTR_ROTATE_MODE, TRUE ) == SFX_ITEM_SET)
+ if (rSet.GetItemState( ATTR_ROTATE_VALUE, sal_True ) == SFX_ITEM_SET ||
+ rSet.GetItemState( ATTR_ROTATE_MODE, sal_True ) == SFX_ITEM_SET)
{
- bRotate = TRUE;
+ bRotate = sal_True;
}
}
}
}
- bAttrTested = TRUE;
+ bAttrTested = sal_True;
}
lcl_Extend( aRange, pDoc, bExtend ); // zusammengefasste und bExtend
@@ -1446,20 +1446,20 @@ void ScConditionalFormat::InvalidateArea()
void ScConditionalFormat::CompileAll()
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->CompileAll();
}
void ScConditionalFormat::CompileXML()
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->CompileXML();
}
void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->UpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz);
delete pAreas; // aus dem AttrArray kommt beim Einfuegen/Loeschen kein Aufruf
@@ -1468,14 +1468,14 @@ void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
void ScConditionalFormat::RenameCellStyle(const String& rOld, const String& rNew)
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
if ( ppEntries[i]->GetStyle() == rOld )
ppEntries[i]->UpdateStyleName( rNew );
}
void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->UpdateMoveTab( nOldPos, nNewPos );
delete pAreas; // aus dem AttrArray kommt beim Einfuegen/Loeschen kein Aufruf
@@ -1484,14 +1484,14 @@ void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
void ScConditionalFormat::SourceChanged( const ScAddress& rAddr )
{
- for (USHORT i=0; i<nEntryCount; i++)
+ for (sal_uInt16 i=0; i<nEntryCount; i++)
ppEntries[i]->SourceChanged( rAddr );
}
bool ScConditionalFormat::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- for (USHORT i=0; !bAllMarked && i<nEntryCount; i++)
+ for (sal_uInt16 i=0; !bAllMarked && i<nEntryCount; i++)
bAllMarked = ppEntries[i]->MarkUsedExternalReferences();
return bAllMarked;
}
@@ -1503,9 +1503,9 @@ ScConditionalFormatList::ScConditionalFormatList(const ScConditionalFormatList&
{
// fuer Ref-Undo - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone() );
//! sortierte Eintraege aus rList schneller einfuegen ???
@@ -1516,23 +1516,23 @@ ScConditionalFormatList::ScConditionalFormatList(ScDocument* pNewDoc,
{
// fuer neues Dokument - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone(pNewDoc) );
//! sortierte Eintraege aus rList schneller einfuegen ???
}
-BOOL ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
+sal_Bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
{
// fuer Ref-Undo - interne Variablen werden nicht verglichen
- USHORT nCount = Count();
- BOOL bEqual = ( nCount == r.Count() );
- for (USHORT i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
+ sal_uInt16 nCount = Count();
+ sal_Bool bEqual = ( nCount == r.Count() );
+ for (sal_uInt16 i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
if ( !(*this)[i]->EqualEntries(*r[i]) ) // Eintraege unterschiedlich ?
- bEqual = FALSE;
+ bEqual = sal_False;
return bEqual;
}
@@ -1541,8 +1541,8 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
{
//! binaer suchen
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*this)[i]->GetKey() == nKey)
return (*this)[i];
@@ -1552,52 +1552,52 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
void ScConditionalFormatList::CompileAll()
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->CompileAll();
}
void ScConditionalFormatList::CompileXML()
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->CompileXML();
}
void ScConditionalFormatList::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz );
}
void ScConditionalFormatList::RenameCellStyle( const String& rOld, const String& rNew )
{
- ULONG nCount=Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uLong nCount=Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->RenameCellStyle(rOld,rNew);
}
void ScConditionalFormatList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateMoveTab( nOldPos, nNewPos );
}
void ScConditionalFormatList::SourceChanged( const ScAddress& rAddr )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->SourceChanged( rAddr );
}
bool ScConditionalFormatList::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- USHORT nCount = Count();
- for (USHORT i=0; !bAllMarked && i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; !bAllMarked && i<nCount; i++)
bAllMarked = (*this)[i]->MarkUsedExternalReferences();
return bAllMarked;
}
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index 39675704fb70..68ddcc0bd9af 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -51,14 +51,14 @@ using namespace ::com::sun::star;
// static
void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
const uno::Reference<sdbc::XRow>& xRow, long nRowPos,
- long nType, BOOL bCurrency, BOOL* pSimpleFlag )
+ long nType, sal_Bool bCurrency, sal_Bool* pSimpleFlag )
{
String aString;
double nVal = 0.0;
- BOOL bValue = FALSE;
- BOOL bEmptyFlag = FALSE;
- BOOL bError = FALSE;
- ULONG nFormatIndex = 0;
+ sal_Bool bValue = sal_False;
+ sal_Bool bEmptyFlag = sal_False;
+ sal_Bool bError = sal_False;
+ sal_uLong nFormatIndex = 0;
//! wasNull calls only if null value was found?
@@ -73,7 +73,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
NUMBERFORMAT_LOGICAL, ScGlobal::eLnge );
nVal = (xRow->getBoolean(nRowPos) ? 1 : 0);
bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
break;
case sdbc::DataType::TINYINT:
@@ -88,7 +88,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
//! do the conversion here?
nVal = xRow->getDouble(nRowPos);
bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
break;
case sdbc::DataType::CHAR:
@@ -108,7 +108,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
nVal = Date( aDate.Day, aDate.Month, aDate.Year ) -
*pFormTable->GetNullDate();
bEmptyFlag = xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
}
break;
@@ -122,7 +122,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
nVal = ( aTime.Hours * 3600 + aTime.Minutes * 60 +
aTime.Seconds + aTime.HundredthSeconds / 100.0 ) / D_TIMEFACTOR;
bEmptyFlag = xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
}
break;
@@ -138,24 +138,24 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
( aStamp.Hours * 3600 + aStamp.Minutes * 60 +
aStamp.Seconds + aStamp.HundredthSeconds / 100.0 ) / D_TIMEFACTOR;
bEmptyFlag = xRow->wasNull();
- bValue = TRUE;
+ bValue = sal_True;
}
break;
case sdbc::DataType::SQLNULL:
- bEmptyFlag = TRUE;
+ bEmptyFlag = sal_True;
break;
case sdbc::DataType::BINARY:
case sdbc::DataType::VARBINARY:
case sdbc::DataType::LONGVARBINARY:
default:
- bError = TRUE; // unknown type
+ bError = sal_True; // unknown type
}
}
catch ( uno::Exception& )
{
- bError = TRUE;
+ bError = sal_True;
}
if ( bValue && bCurrency )
@@ -186,7 +186,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
{
pCell = ScBaseCell::CreateTextCell( aString, pDoc );
if ( pSimpleFlag && pCell->GetCellType() == CELLTYPE_EDIT )
- *pSimpleFlag = FALSE;
+ *pSimpleFlag = sal_False;
}
else
pCell = NULL;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index aa5b011da93b..0e30a2750dbb 100644..100755
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -57,7 +57,7 @@ namespace {
void lcl_toUpper(OUString& rStr)
{
- rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast<USHORT>(rStr.getLength()));
+ rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast<sal_uInt16>(rStr.getLength()));
}
}
@@ -86,7 +86,7 @@ ScDocumentIterator::~ScDocumentIterator()
{
}
-BOOL ScDocumentIterator::GetThisCol()
+sal_Bool ScDocumentIterator::GetThisCol()
{
ScTable* pTab;
while ( (pTab = pDoc->pTab[nTab]) == NULL )
@@ -95,14 +95,14 @@ BOOL ScDocumentIterator::GetThisCol()
{
nCol = MAXCOL;
nRow = MAXROW;
- return FALSE;
+ return sal_False;
}
++nTab;
}
ScColumn* pCol = &pTab->aCol[nCol];
ScAttrArray* pAtt = pCol->pAttrArray;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
do
{
SCROW nColRow;
@@ -126,13 +126,13 @@ BOOL ScDocumentIterator::GetThisCol()
if (nColRow == nRow)
{
- bFound = TRUE;
+ bFound = sal_True;
pCell = pCol->pItems[nColPos].pCell;
pPattern = pAtt->pData[nAttrPos].pPattern;
}
else if ( pAtt->pData[nAttrPos].pPattern != pDefPattern )
{
- bFound = TRUE;
+ bFound = sal_True;
pCell = NULL;
pPattern = pAtt->pData[nAttrPos].pPattern;
}
@@ -146,15 +146,15 @@ BOOL ScDocumentIterator::GetThisCol()
return bFound;
}
-BOOL ScDocumentIterator::GetThis()
+sal_Bool ScDocumentIterator::GetThis()
{
- BOOL bEnd = FALSE;
- BOOL bSuccess = FALSE;
+ sal_Bool bEnd = sal_False;
+ sal_Bool bSuccess = sal_False;
while ( !bSuccess && !bEnd )
{
if ( nRow > MAXROW )
- bSuccess = FALSE;
+ bSuccess = sal_False;
else
bSuccess = GetThisCol();
@@ -166,7 +166,7 @@ BOOL ScDocumentIterator::GetThis()
nCol = 0;
++nTab;
if (nTab > nEndTab)
- bEnd = TRUE;
+ bEnd = sal_True;
}
nRow = 0;
nColPos = 0;
@@ -177,7 +177,7 @@ BOOL ScDocumentIterator::GetThis()
return !bEnd;
}
-BOOL ScDocumentIterator::GetFirst()
+sal_Bool ScDocumentIterator::GetFirst()
{
nCol = 0;
nTab = nStartTab;
@@ -189,7 +189,7 @@ BOOL ScDocumentIterator::GetFirst()
return GetThis();
}
-BOOL ScDocumentIterator::GetNext()
+sal_Bool ScDocumentIterator::GetNext()
{
++nRow;
@@ -218,7 +218,7 @@ void ScDocumentIterator::GetPos( SCCOL& rCol, SCROW& rRow, SCTAB& rTab )
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr,
+void lcl_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rpArr,
SCROW& nAttrEndRow, const ScAttrArray* pNewArr, SCROW nRow,
ScDocument* pDoc )
{
@@ -236,7 +236,7 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr,
//UNUSED2008-05 ScValueIterator::ScValueIterator( ScDocument* pDocument,
//UNUSED2008-05 SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
//UNUSED2008-05 SCCOL nECol, SCROW nERow, SCTAB nETab,
-//UNUSED2008-05 BOOL bSTotal, BOOL bTextZero ) :
+//UNUSED2008-05 sal_Bool bSTotal, sal_Bool bTextZero ) :
//UNUSED2008-05 pDoc( pDocument ),
//UNUSED2008-05 nNumFmtIndex(0),
//UNUSED2008-05 nStartCol( nSCol),
@@ -246,9 +246,9 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr,
//UNUSED2008-05 nEndRow( nERow),
//UNUSED2008-05 nEndTab( nETab ),
//UNUSED2008-05 nNumFmtType( NUMBERFORMAT_UNDEFINED ),
-//UNUSED2008-05 bNumValid( FALSE ),
+//UNUSED2008-05 bNumValid( sal_False ),
//UNUSED2008-05 bSubTotal(bSTotal),
-//UNUSED2008-05 bNextValid( FALSE ),
+//UNUSED2008-05 bNextValid( sal_False ),
//UNUSED2008-05 bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ),
//UNUSED2008-05 bTextAsZero( bTextZero )
//UNUSED2008-05 {
@@ -275,7 +275,7 @@ void lcl_IterGetNumberFormat( ULONG& nFormat, const ScAttrArray*& rpArr,
//UNUSED2008-05 }
ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
- BOOL bSTotal, BOOL bTextZero ) :
+ sal_Bool bSTotal, sal_Bool bTextZero ) :
pDoc( pDocument ),
nNumFmtIndex(0),
nStartCol( rRange.aStart.Col() ),
@@ -285,9 +285,9 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
nEndRow( rRange.aEnd.Row() ),
nEndTab( rRange.aEnd.Tab() ),
nNumFmtType( NUMBERFORMAT_UNDEFINED ),
- bNumValid( FALSE ),
+ bNumValid( sal_False ),
bSubTotal(bSTotal),
- bNextValid( FALSE ),
+ bNextValid( sal_False ),
bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ),
bTextAsZero( bTextZero )
{
@@ -313,7 +313,7 @@ ScValueIterator::ScValueIterator( ScDocument* pDocument, const ScRange& rRange,
nAttrEndRow = 0;
}
-BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
+sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
{
ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
for (;;)
@@ -332,7 +332,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
// rValue = 0.0; //! do not change caller's value!
rErr = 0;
- return FALSE; // Ende und Aus
+ return sal_False; // Ende und Aus
}
}
pCol = &(pDoc->pTab[nTab])->aCol[nCol];
@@ -354,7 +354,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
case CELLTYPE_VALUE:
{
- bNumValid = FALSE;
+ bNumValid = sal_False;
rValue = ((ScValueCell*)pCell)->GetValue();
rErr = 0;
--nRow;
@@ -375,7 +375,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
fNextValue = ((ScValueCell*)pCol->pItems[nColRow].pCell)->GetValue();
nNextRow = pCol->pItems[nColRow].nRow;
- bNextValid = TRUE;
+ bNextValid = sal_True;
if ( bCalcAsShown )
{
lcl_IterGetNumberFormat( nNumFormat, pAttrArray,
@@ -384,7 +384,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
}
}
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
// break;
case CELLTYPE_FORMULA:
@@ -396,15 +396,15 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
{
rValue = ((ScFormulaCell*)pCell)->GetValue();
nRow--;
- bNumValid = FALSE;
- return TRUE; // gefunden
+ bNumValid = sal_False;
+ return sal_True; // gefunden
}
else if ( bTextAsZero )
{
rValue = 0.0;
nRow--;
- bNumValid = FALSE;
- return TRUE;
+ bNumValid = sal_False;
+ return sal_True;
}
}
}
@@ -418,9 +418,9 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
rValue = 0.0;
nNumFmtType = NUMBERFORMAT_NUMBER;
nNumFmtIndex = 0;
- bNumValid = TRUE;
+ bNumValid = sal_True;
--nRow;
- return TRUE;
+ return sal_True;
}
}
break;
@@ -436,7 +436,7 @@ BOOL ScValueIterator::GetThis(double& rValue, USHORT& rErr)
}
}
-void ScValueIterator::GetCurNumFmtInfo( short& nType, ULONG& nIndex )
+void ScValueIterator::GetCurNumFmtInfo( short& nType, sal_uLong& nIndex )
{
if (!bNumValid)
{
@@ -463,13 +463,13 @@ void ScValueIterator::GetCurNumFmtInfo( short& nType, ULONG& nIndex )
}
else
nNumFmtType = pDoc->GetFormatTable()->GetType( nNumFmtIndex );
- bNumValid = TRUE;
+ bNumValid = sal_True;
}
nType = nNumFmtType;
nIndex = nNumFmtIndex;
}
-BOOL ScValueIterator::GetFirst(double& rValue, USHORT& rErr)
+sal_Bool ScValueIterator::GetFirst(double& rValue, sal_uInt16& rErr)
{
nCol = nStartCol;
nRow = nStartRow;
@@ -487,7 +487,7 @@ BOOL ScValueIterator::GetFirst(double& rValue, USHORT& rErr)
}
/* ist inline:
-BOOL ScValueIterator::GetNext(double& rValue, USHORT& rErr)
+sal_Bool ScValueIterator::GetNext(double& rValue, sal_uInt16& rErr)
{
++nRow;
return GetThis(rValue, rErr);
@@ -613,7 +613,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
nNumFmtType = NUMBERFORMAT_NUMBER;
nNumFmtIndex = 0;
rValue.mnError = 0;
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
// break;
case CELLTYPE_FORMULA:
@@ -626,7 +626,7 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
nNumFmtIndex, ScAddress( nCol, nRow, nTab ),
pCell );
rValue.mnError = ((ScFormulaCell*)pCell)->GetErrCode();
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
else
nRow++;
@@ -955,7 +955,7 @@ bool ScDBQueryDataIterator::GetNext(Value& rValue)
ScCellIterator::ScCellIterator( ScDocument* pDocument,
SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
- SCCOL nECol, SCROW nERow, SCTAB nETab, BOOL bSTotal ) :
+ SCCOL nECol, SCROW nERow, SCTAB nETab, sal_Bool bSTotal ) :
pDoc( pDocument ),
nStartCol( nSCol),
nStartRow( nSRow),
@@ -997,7 +997,7 @@ ScCellIterator::ScCellIterator( ScDocument* pDocument,
}
ScCellIterator::ScCellIterator
- ( ScDocument* pDocument, const ScRange& rRange, BOOL bSTotal ) :
+ ( ScDocument* pDocument, const ScRange& rRange, sal_Bool bSTotal ) :
pDoc( pDocument ),
nStartCol( rRange.aStart.Col() ),
nStartRow( rRange.aStart.Row() ),
@@ -1107,14 +1107,14 @@ ScBaseCell* ScCellIterator::GetNext()
//-------------------------------------------------------------------------------
ScQueryCellIterator::ScQueryCellIterator(ScDocument* pDocument, SCTAB nTable,
- const ScQueryParam& rParam, BOOL bMod ) :
+ const ScQueryParam& rParam, sal_Bool bMod ) :
aParam (rParam),
pDoc( pDocument ),
nTab( nTable),
nStopOnMismatch( nStopOnMismatchDisabled ),
nTestEqualCondition( nTestEqualConditionDisabled ),
- bAdvanceQuery( FALSE ),
- bIgnoreMismatchOnLeadingStrings( FALSE )
+ bAdvanceQuery( sal_False ),
+ bIgnoreMismatchOnLeadingStrings( sal_False )
{
nCol = aParam.nCol1;
nRow = aParam.nRow1;
@@ -1184,7 +1184,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
++nRow;
else
{
- BOOL bTestEqualCondition;
+ sal_Bool bTestEqualCondition;
if ( (pDoc->pTab[nTab])->ValidQuery( nRow, aParam, NULL,
(nCol == static_cast<SCCOL>(nFirstQueryField) ? pCell : NULL),
(nTestEqualCondition ? &bTestEqualCondition : NULL) ) )
@@ -1276,14 +1276,14 @@ void ScQueryCellIterator::AdvanceQueryParamEntryField()
}
-BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
- SCROW& nFoundRow, BOOL bSearchForEqualAfterMismatch,
- BOOL bIgnoreMismatchOnLeadingStringsP )
+sal_Bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
+ SCROW& nFoundRow, sal_Bool bSearchForEqualAfterMismatch,
+ sal_Bool bIgnoreMismatchOnLeadingStringsP )
{
nFoundCol = MAXCOL+1;
nFoundRow = MAXROW+1;
- SetStopOnMismatch( TRUE ); // assume sorted keys
- SetTestEqualCondition( TRUE );
+ SetStopOnMismatch( sal_True ); // assume sorted keys
+ SetTestEqualCondition( sal_True );
bIgnoreMismatchOnLeadingStrings = bIgnoreMismatchOnLeadingStringsP;
bool bRegExp = aParam.bRegExp && aParam.GetEntry(0).bQueryByString;
bool bBinary = !bRegExp && aParam.bByRow && (aParam.GetEntry(0).eOp ==
@@ -1335,8 +1335,8 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
break; // for
}
SCSIZE nColRowSave;
- bIgnoreMismatchOnLeadingStrings = FALSE;
- SetTestEqualCondition( FALSE );
+ bIgnoreMismatchOnLeadingStrings = sal_False;
+ SetTestEqualCondition( sal_False );
do
{
nFoundCol = GetCol();
@@ -1347,7 +1347,7 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
nCol = nFoundCol;
nRow = nFoundRow;
nColRow = nColRowSave;
- return TRUE;
+ return sal_True;
}
if ( (bSearchForEqualAfterMismatch || aParam.bRegExp) &&
StoppedOnMismatch() )
@@ -1375,8 +1375,8 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
else
break; // for
}
- SetStopOnMismatch( FALSE );
- SetTestEqualCondition( FALSE );
+ SetStopOnMismatch( sal_False );
+ SetTestEqualCondition( sal_False );
if (GetNext())
{
// Last of a consecutive area, avoid searching the entire parameter
@@ -1388,7 +1388,7 @@ BOOL ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
nFoundCol = GetCol();
nFoundRow = GetRow();
nColRowSave = nColRow;
- SetStopOnMismatch( TRUE );
+ SetStopOnMismatch( sal_True );
} while (GetNext());
nCol = nFoundCol;
nRow = nFoundRow;
@@ -1426,7 +1426,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
pItems[nLo].pCell->HasStringData())
{
String aCellStr;
- ULONG nFormat = pCol->GetNumberFormat( pItems[nLo].nRow);
+ sal_uLong nFormat = pCol->GetNumberFormat( pItems[nLo].nRow);
ScCellFormat::GetInputString( pItems[nLo].pCell, nFormat, aCellStr,
rFormatter);
sal_Int32 nTmp = pCollator->compareString( aCellStr, *rEntry.pStr);
@@ -1456,7 +1456,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
pCell = pItems[nLastInRange].pCell;
if (pCell->HasStringData())
{
- ULONG nFormat = pCol->GetNumberFormat( pItems[nLastInRange].nRow);
+ sal_uLong nFormat = pCol->GetNumberFormat( pItems[nLastInRange].nRow);
ScCellFormat::GetInputString( pCell, nFormat, aLastInRangeString,
rFormatter);
}
@@ -1497,7 +1497,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
bDone = true;
continue; // while
}
- BOOL bStr = pItems[i].pCell->HasStringData();
+ sal_Bool bStr = pItems[i].pCell->HasStringData();
nRes = 0;
// compares are content<query:-1, content>query:1
// Cell value comparison similar to ScTable::ValidQuery()
@@ -1558,7 +1558,7 @@ ScBaseCell* ScQueryCellIterator::BinarySearch()
else if (bStr && bByString)
{
String aCellStr;
- ULONG nFormat = pCol->GetNumberFormat( pItems[i].nRow);
+ sal_uLong nFormat = pCol->GetNumberFormat( pItems[i].nRow);
ScCellFormat::GetInputString( pItems[i].pCell, nFormat, aCellStr,
rFormatter);
nRes = pCollator->compareString( aCellStr, *rEntry.pStr);
@@ -1676,7 +1676,7 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB
nEndRow( nRow2 ),
nCol( nCol1 ),
nRow( nRow1 ),
- bMore( TRUE )
+ bMore( sal_True )
{
SCCOL i;
SCSIZE nIndex;
@@ -1740,7 +1740,7 @@ ScBaseCell* ScHorizontalCellIterator::GetNext( SCCOL& rCol, SCROW& rRow )
return NULL;
}
-BOOL ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow )
+sal_Bool ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow )
{
rCol = nCol;
rRow = nRow;
@@ -1749,14 +1749,14 @@ BOOL ScHorizontalCellIterator::ReturnNext( SCCOL& rCol, SCROW& rRow )
void ScHorizontalCellIterator::Advance()
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL i;
for (i=nCol+1; i<=nEndCol && !bFound; i++)
if (pNextRows[i-nStartCol] == nRow)
{
nCol = i;
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
@@ -1772,12 +1772,12 @@ void ScHorizontalCellIterator::Advance()
if (nMinRow <= nEndRow)
{
nRow = nMinRow;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if ( !bFound )
- bMore = FALSE;
+ bMore = sal_False;
}
//-------------------------------------------------------------------------------
@@ -1797,14 +1797,14 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB
nRow = nStartRow;
nCol = nStartCol;
- bRowEmpty = FALSE;
+ bRowEmpty = sal_False;
pIndices = new SCSIZE[nEndCol-nStartCol+1];
pNextEnd = new SCROW[nEndCol-nStartCol+1];
ppPatterns = new const ScPatternAttr*[nEndCol-nStartCol+1];
SCROW nSkipTo = MAXROW;
- BOOL bEmpty = TRUE;
+ sal_Bool bEmpty = sal_True;
for (i=nStartCol; i<=nEndCol; i++)
{
SCCOL nPos = i - nStartCol;
@@ -1823,7 +1823,7 @@ ScHorizontalAttrIterator::ScHorizontalAttrIterator( ScDocument* pDocument, SCTAB
nSkipTo = nThisEnd; // nSkipTo kann gleich hier gesetzt werden
}
else
- bEmpty = FALSE; // Attribute gefunden
+ bEmpty = sal_False; // Attribute gefunden
pIndices[nPos] = nIndex;
pNextEnd[nPos] = nThisEnd;
@@ -1872,7 +1872,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
if ( nRow > nEndRow ) // schon am Ende?
return NULL; // nichts gefunden
- BOOL bEmpty = TRUE;
+ sal_Bool bEmpty = sal_True;
SCCOL i;
for ( i = nStartCol; i <= nEndCol; i++)
@@ -1890,7 +1890,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
if ( IsDefaultItem( pPattern ) )
pPattern = NULL;
else
- bEmpty = FALSE; // Attribute gefunden
+ bEmpty = sal_False; // Attribute gefunden
pNextEnd[nPos] = nThisEnd;
ppPatterns[nPos] = pPattern;
@@ -1905,7 +1905,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
}
}
else if ( ppPatterns[nPos] )
- bEmpty = FALSE; // Bereich noch nicht zuende
+ bEmpty = sal_False; // Bereich noch nicht zuende
}
if (bEmpty)
@@ -1926,7 +1926,7 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
//-------------------------------------------------------------------------------
-inline BOOL IsGreater( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
+inline sal_Bool IsGreater( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
return ( nRow1 > nRow2 ) || ( nRow1 == nRow2 && nCol1 > nCol2 );
}
@@ -1946,7 +1946,7 @@ ScUsedAreaIterator::~ScUsedAreaIterator()
{
}
-BOOL ScUsedAreaIterator::GetNext()
+sal_Bool ScUsedAreaIterator::GetNext()
{
// Iteratoren weiterzaehlen
@@ -1964,8 +1964,8 @@ BOOL ScUsedAreaIterator::GetNext()
// naechsten Abschnitt heraussuchen
- BOOL bFound = TRUE;
- BOOL bUseCell = FALSE;
+ sal_Bool bFound = sal_True;
+ sal_Bool bUseCell = sal_False;
if ( pCell && pPattern )
{
@@ -1982,7 +1982,7 @@ BOOL ScUsedAreaIterator::GetNext()
}
else
{
- bUseCell = TRUE;
+ bUseCell = sal_True;
if ( nAttrRow == nCellRow && nAttrCol1 == nCellCol ) // Attribute auf der Zelle ?
pFoundPattern = pPattern;
else
@@ -1992,7 +1992,7 @@ BOOL ScUsedAreaIterator::GetNext()
else if ( pCell ) // nur Zelle -> direkt uebernehmen
{
pFoundPattern = NULL;
- bUseCell = TRUE; // Position von Zelle
+ bUseCell = sal_True; // Position von Zelle
}
else if ( pPattern ) // nur Attribute -> direkt uebernehmen
{
@@ -2003,7 +2003,7 @@ BOOL ScUsedAreaIterator::GetNext()
nFoundEndCol = nAttrCol2;
}
else // gar nichts
- bFound = FALSE;
+ bFound = sal_False;
if ( bUseCell ) // Position von Zelle
{
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 2bb5922242cb..7cf5e6de6ce7 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -81,17 +81,17 @@
// STATIC DATA -----------------------------------------------------------
-USHORT* ScDocumentPool::pVersionMap1 = 0;
-USHORT* ScDocumentPool::pVersionMap2 = 0;
-USHORT* ScDocumentPool::pVersionMap3 = 0;
-USHORT* ScDocumentPool::pVersionMap4 = 0;
-USHORT* ScDocumentPool::pVersionMap5 = 0;
-USHORT* ScDocumentPool::pVersionMap6 = 0;
-USHORT* ScDocumentPool::pVersionMap7 = 0;
-USHORT* ScDocumentPool::pVersionMap8 = 0;
-USHORT* ScDocumentPool::pVersionMap9 = 0;
-USHORT* ScDocumentPool::pVersionMap10 = 0;
-USHORT* ScDocumentPool::pVersionMap11 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap1 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap2 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap3 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap4 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap5 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap6 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap7 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap8 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap9 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap10 = 0;
+sal_uInt16* ScDocumentPool::pVersionMap11 = 0;
// ATTR_FONT_TWOLINES (not used) was changed to ATTR_USERDEF (not saved in binary format) in 641c
@@ -190,7 +190,7 @@ static SfxItemInfo __READONLY_DATA aItemInfos[] =
// -----------------------------------------------------------------------
-ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
+ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, sal_Bool bLoadRefCounts )
: SfxItemPool ( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScDocumentPool")),
ATTR_STARTINDEX, ATTR_ENDINDEX,
@@ -222,9 +222,9 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
pGlobalBorderInnerAttr->SetLine(NULL, BOXINFO_LINE_HORI);
pGlobalBorderInnerAttr->SetLine(NULL, BOXINFO_LINE_VERT);
- pGlobalBorderInnerAttr->SetTable(TRUE);
- pGlobalBorderInnerAttr->SetDist(TRUE);
- pGlobalBorderInnerAttr->SetMinDist(FALSE);
+ pGlobalBorderInnerAttr->SetTable(sal_True);
+ pGlobalBorderInnerAttr->SetDist(sal_True);
+ pGlobalBorderInnerAttr->SetMinDist(sal_False);
ppPoolDefaults = new SfxPoolItem*[ATTR_ENDINDEX-ATTR_STARTINDEX+1];
@@ -262,7 +262,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ppPoolDefaults[ ATTR_HOR_JUSTIFY - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY);
ppPoolDefaults[ ATTR_INDENT - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_INDENT, 0 );
ppPoolDefaults[ ATTR_VER_JUSTIFY - ATTR_STARTINDEX ] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY);
- ppPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, FALSE );
+ ppPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, sal_False );
ppPoolDefaults[ ATTR_ROTATE_VALUE - ATTR_STARTINDEX ] = new SfxInt32Item( ATTR_ROTATE_VALUE, 0 );
ppPoolDefaults[ ATTR_ROTATE_MODE - ATTR_STARTINDEX ] = new SvxRotateModeItem( SVX_ROTATE_MODE_BOTTOM, ATTR_ROTATE_MODE );
ppPoolDefaults[ ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_VERTICAL_ASIAN );
@@ -305,16 +305,16 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ppPoolDefaults[ ATTR_PAGE_MAXSIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_MAXSIZE );
ppPoolDefaults[ ATTR_PAGE_HORCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HORCENTER );
ppPoolDefaults[ ATTR_PAGE_VERCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_VERCENTER );
- ppPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, TRUE );
- ppPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, TRUE );
- ppPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, TRUE );
- ppPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, FALSE );
- ppPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, FALSE );
- ppPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, FALSE );
+ ppPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, sal_True );
+ ppPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, sal_True );
+ ppPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, sal_True );
+ ppPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, sal_False );
+ ppPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, sal_False );
+ ppPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, sal_False );
ppPoolDefaults[ ATTR_PAGE_CHARTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_CHARTS );
ppPoolDefaults[ ATTR_PAGE_OBJECTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_OBJECTS );
ppPoolDefaults[ ATTR_PAGE_DRAWINGS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_DRAWINGS );
- ppPoolDefaults[ ATTR_PAGE_TOPDOWN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_TOPDOWN, TRUE );
+ ppPoolDefaults[ ATTR_PAGE_TOPDOWN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_TOPDOWN, sal_True );
ppPoolDefaults[ ATTR_PAGE_SCALE - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALE, 100 );
ppPoolDefaults[ ATTR_PAGE_SCALETOPAGES-ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALETOPAGES, 1 );
ppPoolDefaults[ ATTR_PAGE_FIRSTPAGENO- ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 );
@@ -328,8 +328,8 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
ppPoolDefaults[ ATTR_PAGE_FOOTERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT );
ppPoolDefaults[ ATTR_PAGE_HEADERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_HEADERSET, aSetItemItemSet );
ppPoolDefaults[ ATTR_PAGE_FOOTERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_FOOTERSET, aSetItemItemSet );
- ppPoolDefaults[ ATTR_PAGE_FORMULAS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_FORMULAS, FALSE );
- ppPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, TRUE );
+ ppPoolDefaults[ ATTR_PAGE_FORMULAS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_FORMULAS, sal_False );
+ ppPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, sal_True );
ppPoolDefaults[ ATTR_PAGE_SCALETO - ATTR_STARTINDEX ] = new ScPageScaleToItem( 1, 1 );
// ppPoolDefaults[ ATTR_ITEM_DOUBLE - ATTR_STARTINDEX ] = new ScDoubleItem( ATTR_ITEM_DOUBLE, 0 );
@@ -379,7 +379,7 @@ __EXPORT ScDocumentPool::~ScDocumentPool()
{
Delete();
- for ( USHORT i=0; i < ATTR_ENDINDEX-ATTR_STARTINDEX+1; i++ )
+ for ( sal_uInt16 i=0; i < ATTR_ENDINDEX-ATTR_STARTINDEX+1; i++ )
{
SetRefCount( *ppPoolDefaults[i], 0 );
delete ppPoolDefaults[i];
@@ -403,12 +403,12 @@ void ScDocumentPool::InitVersionMaps()
// erste Map: ATTR_LANGUAGE_FORMAT ab sv329 eingefuegt
- const USHORT nMap1Start = 100; // alter ATTR_STARTINDEX
- const USHORT nMap1End = 157; // alter ATTR_ENDINDEX
- const USHORT nMap1Count = nMap1End - nMap1Start + 1;
- const USHORT nMap1New = 18; // ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX
- pVersionMap1 = new USHORT [ nMap1Count ];
- USHORT i, j;
+ const sal_uInt16 nMap1Start = 100; // alter ATTR_STARTINDEX
+ const sal_uInt16 nMap1End = 157; // alter ATTR_ENDINDEX
+ const sal_uInt16 nMap1Count = nMap1End - nMap1Start + 1;
+ const sal_uInt16 nMap1New = 18; // ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX
+ pVersionMap1 = new sal_uInt16 [ nMap1Count ];
+ sal_uInt16 i, j;
for ( i=0, j=nMap1Start; i < nMap1New; i++, j++ )
pVersionMap1[i] = j;
// ein Eintrag eingefuegt...
@@ -417,11 +417,11 @@ void ScDocumentPool::InitVersionMaps()
// zweite Map: ATTR_VALIDDATA und ATTR_CONDITIONAL ab 341 eingefuegt
- const USHORT nMap2Start = 100; // ATTR_STARTINDEX
- const USHORT nMap2End = 158; // ATTR_ENDINDEX
- const USHORT nMap2Count = nMap2End - nMap2Start + 1;
- const USHORT nMap2New = 24; // ATTR_VALIDDATA - ATTR_STARTINDEX
- pVersionMap2 = new USHORT [ nMap2Count ];
+ const sal_uInt16 nMap2Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap2End = 158; // ATTR_ENDINDEX
+ const sal_uInt16 nMap2Count = nMap2End - nMap2Start + 1;
+ const sal_uInt16 nMap2New = 24; // ATTR_VALIDDATA - ATTR_STARTINDEX
+ pVersionMap2 = new sal_uInt16 [ nMap2Count ];
for ( i=0, j=nMap2Start; i < nMap2New; i++, j++ )
pVersionMap2[i] = j;
// zwei Eintraege eingefuegt...
@@ -430,11 +430,11 @@ void ScDocumentPool::InitVersionMaps()
// dritte Map: ATTR_INDENT ab 350 eingefuegt
- const USHORT nMap3Start = 100; // ATTR_STARTINDEX
- const USHORT nMap3End = 160; // ATTR_ENDINDEX
- const USHORT nMap3Count = nMap3End - nMap3Start + 1;
- const USHORT nMap3New = 11; // ATTR_INDENT - ATTR_STARTINDEX
- pVersionMap3 = new USHORT [ nMap3Count ];
+ const sal_uInt16 nMap3Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap3End = 160; // ATTR_ENDINDEX
+ const sal_uInt16 nMap3Count = nMap3End - nMap3Start + 1;
+ const sal_uInt16 nMap3New = 11; // ATTR_INDENT - ATTR_STARTINDEX
+ pVersionMap3 = new sal_uInt16 [ nMap3Count ];
for ( i=0, j=nMap3Start; i < nMap3New; i++, j++ )
pVersionMap3[i] = j;
// ein Eintrag eingefuegt...
@@ -443,11 +443,11 @@ void ScDocumentPool::InitVersionMaps()
// vierte Map: ATTR_ROTATE_VALUE und ATTR_ROTATE_MODE ab 367 eingefuegt
- const USHORT nMap4Start = 100; // ATTR_STARTINDEX
- const USHORT nMap4End = 161; // ATTR_ENDINDEX
- const USHORT nMap4Count = nMap4End - nMap4Start + 1;
- const USHORT nMap4New = 14; // ATTR_ROTATE_VALUE - ATTR_STARTINDEX
- pVersionMap4 = new USHORT [ nMap4Count ];
+ const sal_uInt16 nMap4Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap4End = 161; // ATTR_ENDINDEX
+ const sal_uInt16 nMap4Count = nMap4End - nMap4Start + 1;
+ const sal_uInt16 nMap4New = 14; // ATTR_ROTATE_VALUE - ATTR_STARTINDEX
+ pVersionMap4 = new sal_uInt16 [ nMap4Count ];
for ( i=0, j=nMap4Start; i < nMap4New; i++, j++ )
pVersionMap4[i] = j;
// zwei Eintraege eingefuegt...
@@ -456,11 +456,11 @@ void ScDocumentPool::InitVersionMaps()
// fifth map: CJK..., CTL..., EMPHASISMARK, TWOLINES (12 items) added in 614
- const USHORT nMap5Start = 100; // ATTR_STARTINDEX
- const USHORT nMap5End = 163; // ATTR_ENDINDEX
- const USHORT nMap5Count = nMap5End - nMap5Start + 1;
- const USHORT nMap5New = 10; // ATTR_CJK_FONT - ATTR_STARTINDEX
- pVersionMap5 = new USHORT [ nMap5Count ];
+ const sal_uInt16 nMap5Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap5End = 163; // ATTR_ENDINDEX
+ const sal_uInt16 nMap5Count = nMap5End - nMap5Start + 1;
+ const sal_uInt16 nMap5New = 10; // ATTR_CJK_FONT - ATTR_STARTINDEX
+ pVersionMap5 = new sal_uInt16 [ nMap5Count ];
for ( i=0, j=nMap5Start; i < nMap5New; i++, j++ )
pVersionMap5[i] = j;
// 12 entries inserted
@@ -469,11 +469,11 @@ void ScDocumentPool::InitVersionMaps()
// sixth map: ATTR_SCRIPTSPACE, ATTR_HANGPUNCTUATION, ATTR_FORBIDDEN_RULES added in 614d
- const USHORT nMap6Start = 100; // ATTR_STARTINDEX
- const USHORT nMap6End = 175; // ATTR_ENDINDEX
- const USHORT nMap6Count = nMap6End - nMap6Start + 1;
- const USHORT nMap6New = 22; // ATTR_SCRIPTSPACE - ATTR_STARTINDEX
- pVersionMap6 = new USHORT [ nMap6Count ];
+ const sal_uInt16 nMap6Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap6End = 175; // ATTR_ENDINDEX
+ const sal_uInt16 nMap6Count = nMap6End - nMap6Start + 1;
+ const sal_uInt16 nMap6New = 22; // ATTR_SCRIPTSPACE - ATTR_STARTINDEX
+ pVersionMap6 = new sal_uInt16 [ nMap6Count ];
for ( i=0, j=nMap6Start; i < nMap6New; i++, j++ )
pVersionMap6[i] = j;
// 3 entries inserted
@@ -482,11 +482,11 @@ void ScDocumentPool::InitVersionMaps()
// seventh map: ATTR_FONT_WORDLINE, ATTR_FONT_RELIEF, ATTR_HYPHENATE added in 632b
- const USHORT nMap7Start = 100; // ATTR_STARTINDEX
- const USHORT nMap7End = 178; // ATTR_ENDINDEX
- const USHORT nMap7Count = nMap7End - nMap7Start + 1;
- const USHORT nMap7New = 22; // ATTR_FONT_WORDLINE - ATTR_STARTINDEX
- pVersionMap7 = new USHORT [ nMap7Count ];
+ const sal_uInt16 nMap7Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap7End = 178; // ATTR_ENDINDEX
+ const sal_uInt16 nMap7Count = nMap7End - nMap7Start + 1;
+ const sal_uInt16 nMap7New = 22; // ATTR_FONT_WORDLINE - ATTR_STARTINDEX
+ pVersionMap7 = new sal_uInt16 [ nMap7Count ];
for ( i=0, j=nMap7Start; i < nMap7New; i++, j++ )
pVersionMap7[i] = j;
// 3 entries inserted
@@ -495,11 +495,11 @@ void ScDocumentPool::InitVersionMaps()
// eighth map: ATTR_VERTICAL_ASIAN added in 642q
- const USHORT nMap8Start = 100; // ATTR_STARTINDEX
- const USHORT nMap8End = 181; // ATTR_ENDINDEX
- const USHORT nMap8Count = nMap8End - nMap8Start + 1;
- const USHORT nMap8New = 34; // ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX
- pVersionMap8 = new USHORT [ nMap8Count ];
+ const sal_uInt16 nMap8Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap8End = 181; // ATTR_ENDINDEX
+ const sal_uInt16 nMap8Count = nMap8End - nMap8Start + 1;
+ const sal_uInt16 nMap8New = 34; // ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX
+ pVersionMap8 = new sal_uInt16 [ nMap8Count ];
for ( i=0, j=nMap8Start; i < nMap8New; i++, j++ )
pVersionMap8[i] = j;
// 1 entry inserted
@@ -508,11 +508,11 @@ void ScDocumentPool::InitVersionMaps()
// 9th map: ATTR_WRITINGDIR added in 643y
- const USHORT nMap9Start = 100; // ATTR_STARTINDEX
- const USHORT nMap9End = 182; // ATTR_ENDINDEX
- const USHORT nMap9Count = nMap9End - nMap9Start + 1;
- const USHORT nMap9New = 35; // ATTR_WRITINGDIR - ATTR_STARTINDEX
- pVersionMap9 = new USHORT [ nMap9Count ];
+ const sal_uInt16 nMap9Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap9End = 182; // ATTR_ENDINDEX
+ const sal_uInt16 nMap9Count = nMap9End - nMap9Start + 1;
+ const sal_uInt16 nMap9New = 35; // ATTR_WRITINGDIR - ATTR_STARTINDEX
+ pVersionMap9 = new sal_uInt16 [ nMap9Count ];
for ( i=0, j=nMap9Start; i < nMap9New; i++, j++ )
pVersionMap9[i] = j;
// 1 entry inserted
@@ -523,11 +523,11 @@ void ScDocumentPool::InitVersionMaps()
// 10th map: ATTR_SHRINKTOFIT, ATTR_BORDER_TL_BR, ATTR_BORDER_BL_TR added in 680/dr14
- const USHORT nMap10Start = 100; // ATTR_STARTINDEX
- const USHORT nMap10End = 184; // ATTR_ENDINDEX
- const USHORT nMap10Count = nMap10End - nMap10Start + 1;
- const USHORT nMap10New = 37; // ATTR_SHRINKTOFIT - ATTR_STARTINDEX
- pVersionMap10 = new USHORT [ nMap10Count ];
+ const sal_uInt16 nMap10Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap10End = 184; // ATTR_ENDINDEX
+ const sal_uInt16 nMap10Count = nMap10End - nMap10Start + 1;
+ const sal_uInt16 nMap10New = 37; // ATTR_SHRINKTOFIT - ATTR_STARTINDEX
+ pVersionMap10 = new sal_uInt16 [ nMap10Count ];
for ( i=0, j=nMap10Start; i < nMap10New; i++, j++ )
pVersionMap10[i] = j;
// 3 entries inserted
@@ -536,11 +536,11 @@ void ScDocumentPool::InitVersionMaps()
// 11th map: ATTR_FONT_OVERLINE added in DEV300/overline2
- const USHORT nMap11Start = 100; // ATTR_STARTINDEX
- const USHORT nMap11End = 187; // ATTR_ENDINDEX
- const USHORT nMap11Count = nMap11End - nMap11Start + 1;
- const USHORT nMap11New = 5; // ATTR_FONT_OVERLINE - ATTR_STARTINDEX
- pVersionMap11 = new USHORT [ nMap11Count ];
+ const sal_uInt16 nMap11Start = 100; // ATTR_STARTINDEX
+ const sal_uInt16 nMap11End = 187; // ATTR_ENDINDEX
+ const sal_uInt16 nMap11Count = nMap11End - nMap11Start + 1;
+ const sal_uInt16 nMap11New = 5; // ATTR_FONT_OVERLINE - ATTR_STARTINDEX
+ pVersionMap11 = new sal_uInt16 [ nMap11Count ];
for ( i=0, j=nMap11Start; i < nMap11New; i++, j++ )
pVersionMap11[i] = j;
// 1 entry inserted
@@ -583,7 +583,7 @@ void ScDocumentPool::DeleteVersionMaps()
// ----------------------------------------------------------------------------------------
//
-// Fuer die Pattern-Attribute (SetItems) kann der USHORT RefCount leicht ueberlaufen
+// Fuer die Pattern-Attribute (SetItems) kann der sal_uInt16 RefCount leicht ueberlaufen
// (z.B. 600 ganze Zeilen abwechselnd formatieren).
// Darum wird der RefCount bei SC_MAX_POOLREF festgehalten und nicht mehr hoch- oder
// heruntergezaehlt. Dieser RefCount wird dann erst beim naechsten Laden neu gezaehlt.
@@ -592,7 +592,7 @@ void ScDocumentPool::DeleteVersionMaps()
// wird (Assertions).
//
-const SfxPoolItem& __EXPORT ScDocumentPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem& __EXPORT ScDocumentPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
if ( rItem.Which() != ATTR_PATTERN ) // nur Pattern ist special
return SfxItemPool::Put( rItem, nWhich );
@@ -611,13 +611,13 @@ void __EXPORT ScDocumentPool::Remove( const SfxPoolItem& rItem )
{
if ( rItem.Which() == ATTR_PATTERN ) // nur Pattern ist special
{
- ULONG nRef = rItem.GetRefCount();
- if ( nRef >= (ULONG) SC_MAX_POOLREF && nRef <= (ULONG) SFX_ITEMS_OLD_MAXREF )
+ sal_uLong nRef = rItem.GetRefCount();
+ if ( nRef >= (sal_uLong) SC_MAX_POOLREF && nRef <= (sal_uLong) SFX_ITEMS_OLD_MAXREF )
{
- if ( nRef != (ULONG) SC_SAFE_POOLREF )
+ if ( nRef != (sal_uLong) SC_SAFE_POOLREF )
{
DBG_ERROR("Wer fummelt da an meinen Ref-Counts herum");
- SetRefCount( (SfxPoolItem&)rItem, (ULONG) SC_SAFE_POOLREF );
+ SetRefCount( (SfxPoolItem&)rItem, (sal_uLong) SC_SAFE_POOLREF );
}
return; // nicht herunterzaehlen
}
@@ -627,14 +627,14 @@ void __EXPORT ScDocumentPool::Remove( const SfxPoolItem& rItem )
void ScDocumentPool::CheckRef( const SfxPoolItem& rItem ) // static
{
- ULONG nRef = rItem.GetRefCount();
- if ( nRef >= (ULONG) SC_MAX_POOLREF && nRef <= (ULONG) SFX_ITEMS_OLD_MAXREF )
+ sal_uLong nRef = rItem.GetRefCount();
+ if ( nRef >= (sal_uLong) SC_MAX_POOLREF && nRef <= (sal_uLong) SFX_ITEMS_OLD_MAXREF )
{
// beim Apply vom Cache wird evtl. um 2 hochgezaehlt (auf MAX+1 oder SAFE+2),
// heruntergezaehlt wird nur einzeln (in LoadCompleted)
- DBG_ASSERT( nRef<=(ULONG)SC_MAX_POOLREF+1 || (nRef>=(ULONG)SC_SAFE_POOLREF-1 && nRef<=(ULONG)SC_SAFE_POOLREF+2),
+ DBG_ASSERT( nRef<=(sal_uLong)SC_MAX_POOLREF+1 || (nRef>=(sal_uLong)SC_SAFE_POOLREF-1 && nRef<=(sal_uLong)SC_SAFE_POOLREF+2),
"ScDocumentPool::CheckRef" );
- SetRefCount( (SfxPoolItem&)rItem, (ULONG) SC_SAFE_POOLREF );
+ SetRefCount( (SfxPoolItem&)rItem, (sal_uLong) SC_SAFE_POOLREF );
}
}
@@ -675,7 +675,7 @@ void ScDocumentPool::CellStyleCreated( const String& rName )
SfxItemPool* __EXPORT ScDocumentPool::Clone() const
{
- return new SfxItemPool (*this, TRUE);
+ return new SfxItemPool (*this, sal_True);
}
SfxItemPresentation lcl_HFPresentation
@@ -691,9 +691,9 @@ SfxItemPresentation lcl_HFPresentation
const SfxItemSet& rSet = ((const SfxSetItem&)rItem).GetItemSet();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rSet.GetItemState(ATTR_PAGE_ON,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(ATTR_PAGE_ON,sal_False,&pItem) )
{
- if( FALSE == ((const SfxBoolItem*)pItem)->GetValue() )
+ if( sal_False == ((const SfxBoolItem*)pItem)->GetValue() )
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -704,7 +704,7 @@ SfxItemPresentation lcl_HFPresentation
while( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
aText.Erase();
@@ -718,14 +718,14 @@ SfxItemPresentation lcl_HFPresentation
case ATTR_LRSPACE:
{
SvxLRSpaceItem& rLRItem = (SvxLRSpaceItem&)*pItem;
- USHORT nPropLeftMargin = rLRItem.GetPropLeft();
- USHORT nPropRightMargin = rLRItem.GetPropRight();
- USHORT nLeftMargin, nRightMargin;
+ sal_uInt16 nPropLeftMargin = rLRItem.GetPropLeft();
+ sal_uInt16 nPropRightMargin = rLRItem.GetPropRight();
+ sal_uInt16 nLeftMargin, nRightMargin;
long nTmp;
nTmp = rLRItem.GetLeft();
- nLeftMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nLeftMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
nTmp = rLRItem.GetRight();
- nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp);
+ nRightMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp);
aText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
@@ -788,7 +788,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation(
String& rText,
const IntlWrapper* pIntl ) const
{
- USHORT nW = rItem.Which();
+ sal_uInt16 nW = rItem.Which();
String aStrYes ( ScGlobal::GetRscString(STR_YES) );
String aStrNo ( ScGlobal::GetRscString(STR_NO) );
String aStrSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(": "));
@@ -901,7 +901,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation(
case ATTR_PAGE_SCALETOPAGES:
{
- USHORT nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
+ sal_uInt16 nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
if( nPagNo )
{
@@ -934,7 +934,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation(
case ATTR_PAGE_FIRSTPAGENO:
{
- USHORT nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
+ sal_uInt16 nPagNo = ((const SfxUInt16Item&)rItem).GetValue();
if( nPagNo )
{
@@ -962,7 +962,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation(
case ATTR_PAGE_SCALE:
{
- USHORT nPercent = ((const SfxUInt16Item&)rItem).GetValue();
+ sal_uInt16 nPercent = ((const SfxUInt16Item&)rItem).GetValue();
if( nPercent )
{
@@ -1045,7 +1045,7 @@ SfxItemPresentation __EXPORT ScDocumentPool::GetPresentation(
return ePresentation;
}
-SfxMapUnit __EXPORT ScDocumentPool::GetMetric( USHORT nWhich ) const
+SfxMapUnit __EXPORT ScDocumentPool::GetMetric( sal_uInt16 nWhich ) const
{
// eigene Attribute: Twips, alles andere 1/100 mm
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index d2c99c75a95e..22155543ee81 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -180,40 +180,40 @@ ScDocument::ScDocument( ScDocumentMode eMode,
nVisibleTab( 0 ),
eLinkMode(LM_UNKNOWN),
bAutoCalc( eMode == SCDOCMODE_DOCUMENT ),
- bAutoCalcShellDisabled( FALSE ),
- bForcedFormulaPending( FALSE ),
- bCalculatingFormulaTree( FALSE ),
+ bAutoCalcShellDisabled( sal_False ),
+ bForcedFormulaPending( sal_False ),
+ bCalculatingFormulaTree( sal_False ),
bIsClip( eMode == SCDOCMODE_CLIP ),
bIsUndo( eMode == SCDOCMODE_UNDO ),
- bIsVisible( FALSE ),
- bIsEmbedded( FALSE ),
-// bNoSetDirty( TRUE ),
- bNoSetDirty( FALSE ),
- bInsertingFromOtherDoc( FALSE ),
+ bIsVisible( sal_False ),
+ bIsEmbedded( sal_False ),
+// bNoSetDirty( sal_True ),
+ bNoSetDirty( sal_False ),
+ bInsertingFromOtherDoc( sal_False ),
bLoadingMedium( false ),
bImportingXML( false ),
- bXMLFromWrapper( FALSE ),
- bCalcingAfterLoad( FALSE ),
- bNoListening( FALSE ),
- bIdleDisabled( FALSE ),
- bInLinkUpdate( FALSE ),
- bChartListenerCollectionNeedsUpdate( FALSE ),
- bHasForcedFormulas( FALSE ),
- bInDtorClear( FALSE ),
- bExpandRefs( FALSE ),
- bDetectiveDirty( FALSE ),
+ bXMLFromWrapper( sal_False ),
+ bCalcingAfterLoad( sal_False ),
+ bNoListening( sal_False ),
+ bIdleDisabled( sal_False ),
+ bInLinkUpdate( sal_False ),
+ bChartListenerCollectionNeedsUpdate( sal_False ),
+ bHasForcedFormulas( sal_False ),
+ bInDtorClear( sal_False ),
+ bExpandRefs( sal_False ),
+ bDetectiveDirty( sal_False ),
nMacroCallMode( SC_MACROCALL_ALLOWED ),
- bHasMacroFunc( FALSE ),
+ bHasMacroFunc( sal_False ),
nVisSpellState( 0 ),
nAsianCompression(SC_ASIANCOMPRESSION_INVALID),
nAsianKerning(SC_ASIANKERNING_INVALID),
- bSetDrawDefaults( FALSE ),
- bPastingDrawFromOtherDoc( FALSE ),
+ bSetDrawDefaults( sal_False ),
+ bPastingDrawFromOtherDoc( sal_False ),
nInDdeLinkUpdate( 0 ),
- bInUnoBroadcast( FALSE ),
- bInUnoListenerCall( FALSE ),
+ bInUnoBroadcast( sal_False ),
+ bInUnoListenerCall( sal_False ),
eGrammar( formula::FormulaGrammar::GRAM_NATIVE ),
- bStyleSheetUsageInvalid( TRUE ),
+ bStyleSheetUsageInvalid( sal_True ),
mbUndoEnabled( true ),
mbAdjustHeightEnabled( true ),
mbExecuteLinkEnabled( true ),
@@ -248,8 +248,8 @@ ScDocument::ScDocument( ScDocumentMode eMode,
for (SCTAB i=1; i<=MAXTAB; i++)
pTab[i] = NULL;
- pRangeName = new ScRangeName( 4, 4, FALSE, this );
- pDBCollection = new ScDBCollection( 4, 4, FALSE, this );
+ pRangeName = new ScRangeName( 4, 4, sal_False, this );
+ pDBCollection = new ScDBCollection( 4, 4, sal_False, this );
pSelectionAttr = NULL;
pChartCollection = new ScChartCollection;
apTemporaryChartLock = std::auto_ptr< ScTemporaryChartLock >( new ScTemporaryChartLock(this) );
@@ -291,7 +291,7 @@ void ScDocument::SetStorageGrammar( formula::FormulaGrammar::Grammar eGram )
}
-void ScDocument::SetDocVisible( BOOL bSet )
+void ScDocument::SetDocVisible( sal_Bool bSet )
{
// called from view ctor - only for a visible document,
// each new sheet's RTL flag is initialized from the locale
@@ -347,7 +347,7 @@ IMPL_LINK( ScDocument, TrackTimeHdl, Timer*, EMPTYARG )
if (!pShell->IsModified())
{
- pShell->SetModified( TRUE );
+ pShell->SetModified( sal_True );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
{
@@ -370,7 +370,7 @@ ScDocument::~ScDocument()
{
DBG_ASSERT( !bInLinkUpdate, "bInLinkUpdate in dtor" );
- bInDtorClear = TRUE;
+ bInDtorClear = sal_True;
// first of all disable all refresh timers by deleting the control
if ( pRefreshTimerControl )
@@ -385,7 +385,7 @@ ScDocument::~ScDocument()
if ( GetLinkManager() )
{
// BaseLinks freigeben
- for ( USHORT n = pLinkManager->GetServers().Count(); n; )
+ for ( sal_uInt16 n = pLinkManager->GetServers().Count(); n; )
pLinkManager->GetServers()[ --n ]->Closed();
if ( pLinkManager->GetLinks().Count() )
@@ -415,7 +415,7 @@ ScDocument::~ScDocument()
delete pUnoRefUndoList;
delete pUnoListenerCalls;
- Clear( sal_True ); // TRUE = from destructor (needed for SdrModel::ClearModel)
+ Clear( sal_True ); // sal_True = from destructor (needed for SdrModel::ClearModel)
if (pCondFormList)
{
@@ -528,8 +528,8 @@ ScFieldEditEngine& ScDocument::GetEditEngine()
if ( !pEditEngine )
{
pEditEngine = new ScFieldEditEngine( GetEnginePool(), GetEditPool() );
- pEditEngine->SetUpdateMode( FALSE );
- pEditEngine->EnableUndo( FALSE );
+ pEditEngine->SetUpdateMode( sal_False );
+ pEditEngine->EnableUndo( sal_False );
pEditEngine->SetRefMapMode( MAP_100TH_MM );
pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters );
}
@@ -541,8 +541,8 @@ ScNoteEditEngine& ScDocument::GetNoteEngine()
if ( !pNoteEngine )
{
pNoteEngine = new ScNoteEditEngine( GetEnginePool(), GetEditPool() );
- pNoteEngine->SetUpdateMode( FALSE );
- pNoteEngine->EnableUndo( FALSE );
+ pNoteEngine->SetUpdateMode( sal_False );
+ pNoteEngine->EnableUndo( sal_False );
pNoteEngine->SetRefMapMode( MAP_100TH_MM );
pNoteEngine->SetForbiddenCharsTable( xForbiddenCharacters );
const SfxItemSet& rItemSet = GetDefPattern()->GetItemSet();
@@ -604,19 +604,19 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
void ScDocument::DeleteNumberFormat( const sal_uInt32* /* pDelKeys */, sal_uInt32 /* nCount */ )
{
/*
- for (ULONG i = 0; i < nCount; i++)
+ for (sal_uLong i = 0; i < nCount; i++)
xPoolHelper->GetFormTable()->DeleteEntry(pDelKeys[i]);
*/
}
void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
- ScBaseCell* pCell, ULONG nFormatIndex, BOOL bForceTab )
+ ScBaseCell* pCell, sal_uLong nFormatIndex, sal_Bool bForceTab )
{
if (VALIDTAB(nTab))
{
if ( bForceTab && !pTab[nTab] )
{
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+ sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
pTab[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -629,12 +629,12 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
//UNUSED2009-05 void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell,
-//UNUSED2009-05 ULONG nFormatIndex, BOOL bForceTab )
+//UNUSED2009-05 sal_uLong nFormatIndex, sal_Bool bForceTab )
//UNUSED2009-05 {
//UNUSED2009-05 SCTAB nTab = rPos.Tab();
//UNUSED2009-05 if ( bForceTab && !pTab[nTab] )
//UNUSED2009-05 {
-//UNUSED2009-05 BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+//UNUSED2009-05 sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
//UNUSED2009-05
//UNUSED2009-05 pTab[nTab] = new ScTable(this, nTab,
//UNUSED2009-05 String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -645,20 +645,20 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
//UNUSED2009-05 pTab[nTab]->PutCell( rPos, nFormatIndex, pCell );
//UNUSED2009-05 }
-BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
- BOOL bNotes ) const
+sal_Bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
+ sal_Bool bNotes ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
+ sal_Bool bAny = pTab[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
- if (DrawGetPrintArea( aDrawRange, TRUE, TRUE ))
+ if (DrawGetPrintArea( aDrawRange, sal_True, sal_True ))
{
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
@@ -666,66 +666,66 @@ BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
rEndCol = 0;
rEndRow = 0;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
- SCCOL& rEndCol, BOOL bNotes ) const
+sal_Bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
+ SCCOL& rEndCol, sal_Bool bNotes ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
+ sal_Bool bAny = pTab[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
- if (DrawGetPrintArea( aDrawRange, TRUE, FALSE ))
+ if (DrawGetPrintArea( aDrawRange, sal_True, sal_False ))
{
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
}
rEndCol = 0;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
- SCROW& rEndRow, BOOL bNotes ) const
+sal_Bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
+ SCROW& rEndRow, sal_Bool bNotes ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
+ sal_Bool bAny = pTab[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
if (pDrawLayer)
{
ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab);
- if (DrawGetPrintArea( aDrawRange, FALSE, TRUE ))
+ if (DrawGetPrintArea( aDrawRange, sal_False, sal_True ))
{
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
}
rEndRow = 0;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
+sal_Bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
{
if (ValidTab(nTab) && pTab[nTab])
{
- BOOL bAny = pTab[nTab]->GetDataStart( rStartCol, rStartRow );
+ sal_Bool bAny = pTab[nTab]->GetDataStart( rStartCol, rStartRow );
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
- if (DrawGetPrintArea( aDrawRange, TRUE, TRUE ))
+ if (DrawGetPrintArea( aDrawRange, sal_True, sal_True ))
{
if (aDrawRange.aStart.Col()<rStartCol) rStartCol=aDrawRange.aStart.Col();
if (aDrawRange.aStart.Row()<rStartRow) rStartRow=aDrawRange.aStart.Row();
- bAny = TRUE;
+ bAny = sal_True;
}
}
return bAny;
@@ -733,13 +733,13 @@ BOOL ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow )
rStartCol = 0;
rStartRow = 0;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
+sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- if (nOldPos == nNewPos) return FALSE;
- BOOL bValid = FALSE;
+ if (nOldPos == nNewPos) return sal_False;
+ sal_Bool bValid = sal_False;
if (VALIDTAB(nOldPos))
{
if (pTab[nOldPos])
@@ -747,9 +747,9 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
SCTAB nTabCount = GetTableCount();
if (nTabCount > 1)
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
- SetNoListening( TRUE );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
+ SetNoListening( sal_True );
ScProgress* pProgress = new ScProgress( GetDocumentShell(),
ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), GetCodeCount() );
if (nNewPos == SC_TAB_APPEND)
@@ -794,7 +794,7 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
for (i = 0; i <= MAXTAB; i++)
if (pTab[i])
pTab[i]->UpdateCompile();
- SetNoListening( FALSE );
+ SetNoListening( sal_False );
for (i = 0; i <= MAXTAB; i++)
if (pTab[i])
pTab[i]->StartAllListeners();
@@ -806,14 +806,14 @@ BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
if (pDrawLayer)
DrawMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
- bValid = TRUE;
+ bValid = sal_True;
}
}
}
return bValid;
}
-BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked )
+sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked )
{
if (SC_TAB_APPEND == nNewPos ) nNewPos = nMaxTableNumber;
String aName;
@@ -821,20 +821,20 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
- BOOL bPrefix = ValidTabName( aName );
+ sal_Bool bPrefix = ValidTabName( aName );
DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
SCTAB nDummy;
CreateValidTabName(aName);
- BOOL bValid;
+ sal_Bool bValid;
if (bPrefix)
bValid = ( ValidNewTabName(aName) && (nMaxTableNumber <= MAXTAB) );
else
bValid = ( !GetTable( aName, nDummy ) && (nMaxTableNumber <= MAXTAB) );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
if (bValid)
{
if (nNewPos == nMaxTableNumber)
@@ -846,7 +846,7 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
{
if (VALIDTAB(nNewPos) && (nNewPos < nMaxTableNumber))
{
- SetNoListening( TRUE );
+ SetNoListening( sal_True );
ScRange aRange( 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB );
xColNameRanges->UpdateReference( URM_INSDEL, this, aRange, 0,0,1 );
@@ -873,11 +873,11 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
nOldPos++;
pTab[nNewPos] = new ScTable(this, nNewPos, aName);
++nMaxTableNumber;
- bValid = TRUE;
+ bValid = sal_True;
for (i = 0; i <= MAXTAB; i++)
if (pTab[i] && i != nOldPos && i != nNewPos)
pTab[i]->UpdateCompile();
- SetNoListening( FALSE );
+ SetNoListening( sal_False );
for (i = 0; i <= MAXTAB; i++)
if (pTab[i] && i != nOldPos && i != nNewPos)
pTab[i]->StartAllListeners();
@@ -891,12 +891,12 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
pChartListenerCollection->UpdateScheduledSeriesRanges();
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
}
if (bValid)
{
- SetNoListening( TRUE ); // noch nicht bei CopyToTable/Insert
+ SetNoListening( sal_True ); // noch nicht bei CopyToTable/Insert
pTab[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
pTab[nNewPos], pOnlyMarked );
pTab[nNewPos]->SetTabBgColor(pTab[nOldPos]->GetTabBgColor());
@@ -913,8 +913,8 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
pTab[nOldPos]->UpdateInsertTab(nNewPos);
pTab[nOldPos]->UpdateCompile();
- pTab[nNewPos]->UpdateCompile( TRUE ); // #67996# maybe already compiled in Clone, but used names need recompilation
- SetNoListening( FALSE );
+ pTab[nNewPos]->UpdateCompile( sal_True ); // #67996# maybe already compiled in Clone, but used names need recompilation
+ SetNoListening( sal_False );
pTab[nOldPos]->StartAllListeners();
pTab[nNewPos]->StartAllListeners();
SetDirty();
@@ -933,14 +933,14 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource );
-ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bResultsOnly )
+sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bResultsOnly )
{
- ULONG nRetVal = 1; // 0 => Fehler 1 = ok
+ sal_uLong nRetVal = 1; // 0 => Fehler 1 = ok
// 2 => RefBox, 3 => NameBox
// 4 => beides
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
if (bInsertNew) // neu einfuegen
{
String aName;
@@ -955,19 +955,19 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
pTab[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
if (bValid)
{
- BOOL bOldAutoCalcSrc = FALSE;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
- SetNoListening( TRUE );
+ sal_Bool bOldAutoCalcSrc = sal_False;
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
+ SetNoListening( sal_True );
if ( bResultsOnly )
{
bOldAutoCalcSrc = pSrcDoc->GetAutoCalc();
- pSrcDoc->SetAutoCalc( TRUE ); // falls was berechnet werden muss
+ pSrcDoc->SetAutoCalc( sal_True ); // falls was berechnet werden muss
}
{
@@ -978,33 +978,33 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
ScBulkBroadcast aBulkBroadcast( pBASM);
pSrcDoc->pTab[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL),
- FALSE, pTab[nDestPos] );
+ sal_False, pTab[nDestPos] );
}
}
pTab[nDestPos]->SetTabNo(nDestPos);
if ( !bResultsOnly )
{
- BOOL bNamesLost = FALSE;
- USHORT nSrcRangeNames = pSrcDoc->pRangeName->GetCount();
+ sal_Bool bNamesLost = sal_False;
+ sal_uInt16 nSrcRangeNames = pSrcDoc->pRangeName->GetCount();
// array containing range names which might need update of indices
ScRangeData** pSrcRangeNames = nSrcRangeNames ? new ScRangeData* [nSrcRangeNames] : NULL;
// the index mapping thereof
ScRangeData::IndexMap aSrcRangeMap;
- BOOL bRangeNameReplace = FALSE;
+ sal_Bool bRangeNameReplace = sal_False;
// find named ranges that are used in the source sheet
- std::set<USHORT> aUsedNames;
+ std::set<sal_uInt16> aUsedNames;
pSrcDoc->pTab[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames );
- for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!!
+ for (sal_uInt16 i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!!
{
ScRangeData* pSrcData = (*pSrcDoc->pRangeName)[i];
- USHORT nOldIndex = pSrcData->GetIndex();
+ sal_uInt16 nOldIndex = pSrcData->GetIndex();
bool bInUse = ( aUsedNames.find(nOldIndex) != aUsedNames.end() );
if (bInUse)
{
- USHORT nExisting = 0;
+ sal_uInt16 nExisting = 0;
if ( pRangeName->SearchName( pSrcData->GetName(), nExisting ) )
{
// the name exists already in the destination document
@@ -1012,13 +1012,13 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
// (when refreshing links, the existing name is used and the warning not shown)
ScRangeData* pExistingData = (*pRangeName)[nExisting];
- USHORT nExistingIndex = pExistingData->GetIndex();
+ sal_uInt16 nExistingIndex = pExistingData->GetIndex();
pSrcRangeNames[i] = NULL; // don't modify the named range
aSrcRangeMap.insert(
ScRangeData::IndexMap::value_type(nOldIndex, nExistingIndex));
- bRangeNameReplace = TRUE;
- bNamesLost = TRUE;
+ bRangeNameReplace = sal_True;
+ bNamesLost = sal_True;
}
else
{
@@ -1035,7 +1035,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
{
pData->TransferTabRef( nSrcPos, nDestPos );
pSrcRangeNames[i] = pData;
- USHORT nNewIndex = pData->GetIndex();
+ sal_uInt16 nNewIndex = pData->GetIndex();
aSrcRangeMap.insert(
ScRangeData::IndexMap::value_type(nOldIndex, nNewIndex));
if ( !bRangeNameReplace )
@@ -1053,7 +1053,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
{
// first update all inserted named formulas if they contain other
// range names and used indices changed
- for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch
+ for (sal_uInt16 i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch
{
if ( pSrcRangeNames[i] )
pSrcRangeNames[i]->ReplaceRangeNamesInUse( aSrcRangeMap );
@@ -1069,7 +1069,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
MAXCOL, MAXROW, nDestPos,
0, 0, nDz, NULL);
// Test for outside absolute references for info box
- BOOL bIsAbsRef = pSrcDoc->pTab[nSrcPos]->TestTabRefAbs(nSrcPos);
+ sal_Bool bIsAbsRef = pSrcDoc->pTab[nSrcPos]->TestTabRefAbs(nSrcPos);
// Readjust self-contained absolute references to this sheet
pTab[nDestPos]->TestTabRefAbs(nSrcPos);
if (bIsAbsRef)
@@ -1085,7 +1085,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
pTab[nDestPos]->CompileAll();
}
- SetNoListening( FALSE );
+ SetNoListening( sal_False );
if ( !bResultsOnly )
pTab[nDestPos]->StartAllListeners();
SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos));
@@ -1103,7 +1103,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
}
if (!bValid)
nRetVal = 0;
- BOOL bVbaEnabled = IsInVBAMode();
+ sal_Bool bVbaEnabled = IsInVBAMode();
if ( bVbaEnabled )
{
@@ -1145,16 +1145,16 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
// ----------------------------------------------------------------------------
-void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError)
+void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError)
{
if (VALIDTAB(nTab))
if (pTab[nTab])
pTab[nTab]->SetError( nCol, nRow, nError );
}
-void ScDocument::EraseNonUsedSharedNames(USHORT nLevel)
+void ScDocument::EraseNonUsedSharedNames(sal_uInt16 nLevel)
{
- for (USHORT i = 0; i < pRangeName->GetCount(); i++)
+ for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++)
{
ScRangeData* pRangeData = (*pRangeName)[i];
if (pRangeData && pRangeData->HasType(RT_SHARED))
@@ -1162,11 +1162,11 @@ void ScDocument::EraseNonUsedSharedNames(USHORT nLevel)
String aName;
pRangeData->GetName(aName);
aName.Erase(0, 6); // !!! vgl. Table4, FillFormula !!
- USHORT nInd = (USHORT) aName.ToInt32();
+ sal_uInt16 nInd = (sal_uInt16) aName.ToInt32();
if (nInd <= nLevel)
{
- USHORT nIndex = pRangeData->GetIndex();
- BOOL bInUse = FALSE;
+ sal_uInt16 nIndex = pRangeData->GetIndex();
+ sal_Bool bInUse = sal_False;
for (SCTAB j = 0; !bInUse && (j <= MAXTAB); j++)
{
if (pTab[j])
@@ -1210,16 +1210,16 @@ ScFieldEditEngine* ScDocument::CreateFieldEditEngine()
if (!pCacheFieldEditEngine)
{
pNewEditEngine = new ScFieldEditEngine( GetEnginePool(),
- GetEditPool(), FALSE );
+ GetEditPool(), sal_False );
}
else
{
if ( !bImportingXML )
{
// #i66209# previous use might not have restored update mode,
- // ensure same state as for a new EditEngine (UpdateMode = TRUE)
+ // ensure same state as for a new EditEngine (UpdateMode = sal_True)
if ( !pCacheFieldEditEngine->GetUpdateMode() )
- pCacheFieldEditEngine->SetUpdateMode(TRUE);
+ pCacheFieldEditEngine->SetUpdateMode(sal_True);
}
pNewEditEngine = pCacheFieldEditEngine;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index b64babdf2dd7..e249d7f3bf47 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -105,7 +105,7 @@ void ScDocument::SetRangeName( ScRangeName* pNewRangeName )
}
//UNUSED2008-05 ScRangeData* ScDocument::GetRangeAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab,
-//UNUSED2008-05 BOOL bStartOnly) const
+//UNUSED2008-05 sal_Bool bStartOnly) const
//UNUSED2008-05 {
//UNUSED2008-05 if ( pRangeName )
//UNUSED2008-05 return pRangeName->GetRangeAtCursor( ScAddress( nCol, nRow, nTab ), bStartOnly );
@@ -130,7 +130,7 @@ ScDBCollection* ScDocument::GetDBCollection() const
return pDBCollection;
}
-void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemoveAutoFilter )
+void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, sal_Bool bRemoveAutoFilter )
{
if ( bRemoveAutoFilter )
{
@@ -139,8 +139,8 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
if ( pDBCollection )
{
- USHORT nOldCount = pDBCollection->GetCount();
- for (USHORT nOld=0; nOld<nOldCount; nOld++)
+ sal_uInt16 nOldCount = pDBCollection->GetCount();
+ for (sal_uInt16 nOld=0; nOld<nOldCount; nOld++)
{
ScDBData* pOldData = (*pDBCollection)[nOld];
if ( pOldData->HasAutoFilter() )
@@ -148,8 +148,8 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
ScRange aOldRange;
pOldData->GetArea( aOldRange );
- BOOL bFound = FALSE;
- USHORT nNewIndex = 0;
+ sal_Bool bFound = sal_False;
+ sal_uInt16 nNewIndex = 0;
if ( pNewDBCollection &&
pNewDBCollection->SearchName( pOldData->GetName(), nNewIndex ) )
{
@@ -159,7 +159,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
ScRange aNewRange;
pNewData->GetArea( aNewRange );
if ( aOldRange.aStart == aNewRange.aStart )
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -181,7 +181,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
pDBCollection = pNewDBCollection;
}
-ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const
+ScDBData* ScDocument::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const
{
if (pDBCollection)
return pDBCollection->GetDBAtCursor(nCol, nRow, nTab, bStartOnly);
@@ -209,9 +209,9 @@ ScDPObject* ScDocument::GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
if (!pDPCollection)
return NULL;
- USHORT nCount = pDPCollection->GetCount();
+ sal_uInt16 nCount = pDPCollection->GetCount();
ScAddress aPos( nCol, nRow, nTab );
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( (*pDPCollection)[i]->GetOutRange().In( aPos ) )
return (*pDPCollection)[i];
@@ -225,7 +225,7 @@ ScDPObject* ScDocument::GetDPAtBlock( const ScRange & rBlock ) const
/* Walk the collection in reverse order to get something of an
* approximation of MS Excels 'most recent' effect. */
- USHORT i = pDPCollection->GetCount();
+ sal_uInt16 i = pDPCollection->GetCount();
while ( i-- > 0 )
if ( (*pDPCollection)[i]->GetOutRange().In( rBlock ) )
return (*pDPCollection)[i];
@@ -246,7 +246,7 @@ void ScDocument::StopTemporaryChartLock()
void ScDocument::SetChartListenerCollection(
ScChartListenerCollection* pNewChartListenerCollection,
- BOOL bSetChartRangeLists )
+ sal_Bool bSetChartRangeLists )
{
ScChartListenerCollection* pOld = pChartListenerCollection;
pChartListenerCollection = pNewChartListenerCollection;
@@ -259,23 +259,23 @@ void ScDocument::SetChartListenerCollection(
delete pOld;
}
-void ScDocument::SetScenario( SCTAB nTab, BOOL bFlag )
+void ScDocument::SetScenario( SCTAB nTab, sal_Bool bFlag )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->SetScenario(bFlag);
}
-BOOL ScDocument::IsScenario( SCTAB nTab ) const
+sal_Bool ScDocument::IsScenario( SCTAB nTab ) const
{
return ValidTab(nTab) && pTab[nTab] &&pTab[nTab]->IsScenario();
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->IsScenario();
- //return FALSE;
+ //return sal_False;
}
void ScDocument::SetScenarioData( SCTAB nTab, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
if (ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsScenario())
{
@@ -306,7 +306,7 @@ bool ScDocument::IsDefaultTabBgColor( SCTAB nTab ) const
}
void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
- Color& rColor, USHORT& rFlags ) const
+ Color& rColor, sal_uInt16& rFlags ) const
{
if (ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsScenario())
{
@@ -316,19 +316,19 @@ void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
}
}
-void ScDocument::GetScenarioFlags( SCTAB nTab, USHORT& rFlags ) const
+void ScDocument::GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const
{
if (VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->IsScenario())
rFlags = pTab[nTab]->GetScenarioFlags();
}
-BOOL ScDocument::IsLinked( SCTAB nTab ) const
+sal_Bool ScDocument::IsLinked( SCTAB nTab ) const
{
return ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsLinked();
// euqivalent to
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->IsLinked();
- //return FALSE;
+ //return sal_False;
}
formula::FormulaGrammar::AddressConvention ScDocument::GetAddressConvention() const
@@ -346,7 +346,7 @@ void ScDocument::SetGrammar( formula::FormulaGrammar::Grammar eGram )
eGrammar = eGram;
}
-BOOL ScDocument::GetLinkMode( SCTAB nTab ) const
+sal_Bool ScDocument::GetLinkMode( SCTAB nTab ) const
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetLinkMode();
@@ -381,22 +381,22 @@ const String& ScDocument::GetLinkTab( SCTAB nTab ) const
return EMPTY_STRING;
}
-ULONG ScDocument::GetLinkRefreshDelay( SCTAB nTab ) const
+sal_uLong ScDocument::GetLinkRefreshDelay( SCTAB nTab ) const
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetLinkRefreshDelay();
return 0;
}
-void ScDocument::SetLink( SCTAB nTab, BYTE nMode, const String& rDoc,
+void ScDocument::SetLink( SCTAB nTab, sal_uInt8 nMode, const String& rDoc,
const String& rFilter, const String& rOptions,
- const String& rTabName, ULONG nRefreshDelay )
+ const String& rTabName, sal_uLong nRefreshDelay )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->SetLink( nMode, rDoc, rFilter, rOptions, rTabName, nRefreshDelay );
}
-BOOL ScDocument::HasLink( const String& rDoc,
+sal_Bool ScDocument::HasLink( const String& rDoc,
const String& rFilter, const String& rOptions ) const
{
SCTAB nCount = GetTableCount();
@@ -405,18 +405,18 @@ BOOL ScDocument::HasLink( const String& rDoc,
&& pTab[i]->GetLinkDoc() == rDoc
&& pTab[i]->GetLinkFlt() == rFilter
&& pTab[i]->GetLinkOpt() == rOptions)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab,
+sal_Bool ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab,
const String& aFileName, const String& aTabName )
{
if ( IsClipboard() )
{
DBG_ERRORFILE( "LinkExternalTab in Clipboard" );
- return FALSE;
+ return sal_False;
}
rTab = 0;
String aFilterName; // wird vom Loader gefuellt
@@ -424,42 +424,42 @@ BOOL ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab,
sal_uInt32 nLinkCnt = pExtDocOptions ? pExtDocOptions->GetDocSettings().mnLinkCnt : 0;
ScDocumentLoader aLoader( aFileName, aFilterName, aOptions, nLinkCnt + 1 );
if ( aLoader.IsError() )
- return FALSE;
+ return sal_False;
ScDocument* pSrcDoc = aLoader.GetDocument();
// Tabelle kopieren
SCTAB nSrcTab;
if ( pSrcDoc->GetTable( aTabName, nSrcTab ) )
{
- if ( !InsertTab( SC_TAB_APPEND, aDocTab, TRUE ) )
+ if ( !InsertTab( SC_TAB_APPEND, aDocTab, sal_True ) )
{
DBG_ERRORFILE("can't insert external document table");
- return FALSE;
+ return sal_False;
}
rTab = GetTableCount() - 1;
// nicht neu einfuegen, nur Ergebnisse
- TransferTab( pSrcDoc, nSrcTab, rTab, FALSE, TRUE );
+ TransferTab( pSrcDoc, nSrcTab, rTab, sal_False, sal_True );
}
else
- return FALSE;
+ return sal_False;
- ULONG nRefreshDelay = 0;
+ sal_uLong nRefreshDelay = 0;
- BOOL bWasThere = HasLink( aFileName, aFilterName, aOptions );
+ sal_Bool bWasThere = HasLink( aFileName, aFilterName, aOptions );
SetLink( rTab, SC_LINK_VALUE, aFileName, aFilterName, aOptions, aTabName, nRefreshDelay );
if ( !bWasThere ) // Link pro Quelldokument nur einmal eintragen
{
ScTableLink* pLink = new ScTableLink( pShell, aFileName, aFilterName, aOptions, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
GetLinkManager()->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName,
&aFilterName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( sal_False );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
pBindings->Invalidate( SID_LINKS );
}
- return TRUE;
+ return sal_True;
}
ScExternalRefManager* ScDocument::GetExternalRefManager() const
@@ -551,28 +551,28 @@ bool ScDocument::HasAnyCalcNotification() const
return false;
}
-BOOL ScDocument::HasCalcNotification( SCTAB nTab ) const
+sal_Bool ScDocument::HasCalcNotification( SCTAB nTab ) const
{
if (VALIDTAB(nTab) && pTab[nTab])
return pTab[nTab]->GetCalcNotification();
- return FALSE;
+ return sal_False;
}
void ScDocument::SetCalcNotification( SCTAB nTab )
{
// set only if not set before
if (VALIDTAB(nTab) && pTab[nTab] && !pTab[nTab]->GetCalcNotification())
- pTab[nTab]->SetCalcNotification(TRUE);
+ pTab[nTab]->SetCalcNotification(sal_True);
}
void ScDocument::ResetCalcNotifications()
{
for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++)
if (pTab[nTab] && pTab[nTab]->GetCalcNotification())
- pTab[nTab]->SetCalcNotification(FALSE);
+ pTab[nTab]->SetCalcNotification(sal_False);
}
-ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, BOOL bCreate )
+ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate )
{
ScOutlineTable* pVal = NULL;
@@ -591,14 +591,14 @@ ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, BOOL bCreate )
return pVal;
}
-BOOL ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline )
+sal_Bool ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->SetOutlineTable(pNewOutline);
//if (VALIDTAB(nTab))
// if (pTab[nTab])
// return pTab[nTab]->SetOutlineTable(pNewOutline);
- //return FALSE;
+ //return sal_False;
}
void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
@@ -608,13 +608,13 @@ void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
pTab[nTab]->DoAutoOutline( nStartCol, nStartRow, nEndCol, nEndRow );
}
-BOOL ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam )
+sal_Bool ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->TestRemoveSubTotals( rParam );
//if (VALIDTAB(nTab) && pTab[nTab] )
// return pTab[nTab]->TestRemoveSubTotals( rParam );
- //return FALSE;
+ //return sal_False;
}
void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
@@ -623,28 +623,28 @@ void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
pTab[nTab]->RemoveSubTotals( rParam );
}
-BOOL ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
+sal_Bool ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->DoSubTotals( rParam );
//if (VALIDTAB(nTab))
// if (pTab[nTab])
// return pTab[nTab]->DoSubTotals( rParam );
- //return FALSE;
+ //return sal_False;
}
-BOOL ScDocument::HasSubTotalCells( const ScRange& rRange )
+sal_Bool ScDocument::HasSubTotalCells( const ScRange& rRange )
{
ScCellIterator aIter( this, rRange );
ScBaseCell* pCell = aIter.GetFirst();
while (pCell)
{
if ( pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->IsSubTotal() )
- return TRUE;
+ return sal_True;
pCell = aIter.GetNext();
}
- return FALSE; // none found
+ return sal_False; // none found
}
// kopiert aus diesem Dokument die Zellen von Positionen, an denen in pPosDoc
@@ -658,7 +658,7 @@ void ScDocument::CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc )
pTab[nTab]->CopyUpdated( pPosDoc->pTab[nTab], pDestDoc->pTab[nTab] );
}
-void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario )
+void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScenario )
{
if (ValidTab(nSrcTab) && ValidTab(nDestTab) && pTab[nSrcTab] && pTab[nDestTab])
{
@@ -666,7 +666,7 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario
// und aktuelle Werte in bisher aktive Szenarios zurueckschreiben
ScRangeList aRanges = *pTab[nSrcTab]->GetScenarioRanges();
- const ULONG nRangeCount = aRanges.Count();
+ const sal_uLong nRangeCount = aRanges.Count();
// nDestTab ist die Zieltabelle
for ( SCTAB nTab = nDestTab+1;
@@ -675,27 +675,27 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario
{
if ( pTab[nTab]->IsActiveScenario() ) // auch wenn's dasselbe Szenario ist
{
- BOOL bTouched = FALSE;
- for ( ULONG nR=0; nR<nRangeCount && !bTouched; nR++)
+ sal_Bool bTouched = sal_False;
+ for ( sal_uLong nR=0; nR<nRangeCount && !bTouched; nR++)
{
const ScRange* pRange = aRanges.GetObject(nR);
if ( pTab[nTab]->HasScenarioRange( *pRange ) )
- bTouched = TRUE;
+ bTouched = sal_True;
}
if (bTouched)
{
- pTab[nTab]->SetActiveScenario(FALSE);
+ pTab[nTab]->SetActiveScenario(sal_False);
if ( pTab[nTab]->GetScenarioFlags() & SC_SCENARIO_TWOWAY )
pTab[nTab]->CopyScenarioFrom( pTab[nDestTab] );
}
}
}
- pTab[nSrcTab]->SetActiveScenario(TRUE); // da kommt's her...
+ pTab[nSrcTab]->SetActiveScenario(sal_True); // da kommt's her...
if (!bNewScenario) // Daten aus dem ausgewaehlten Szenario kopieren
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
pTab[nSrcTab]->CopyScenarioTo( pTab[nDestTab] );
SetDirty();
SetAutoCalc( bOldAutoCalc );
@@ -704,7 +704,7 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, BOOL bNewScenario
}
void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestMark,
- BOOL bResetMark, USHORT nNeededBits ) const
+ sal_Bool bResetMark, sal_uInt16 nNeededBits ) const
{
if (bResetMark)
rDestMark.ResetMark();
@@ -715,13 +715,13 @@ void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestM
rDestMark.SetAreaTab( nDestTab );
}
-BOOL ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const
+sal_Bool ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const
{
return ValidTab(nTab) && pTab[nTab] && pTab[nTab]->HasScenarioRange( rRange );
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->HasScenarioRange( rRange );
- //return FALSE;
+ //return sal_False;
}
const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const
@@ -732,28 +732,28 @@ const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const
return NULL;
}
-BOOL ScDocument::IsActiveScenario( SCTAB nTab ) const
+sal_Bool ScDocument::IsActiveScenario( SCTAB nTab ) const
{
return ValidTab(nTab) && pTab[nTab] && pTab[nTab]->IsActiveScenario( );
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->IsActiveScenario();
- //return FALSE;
+ //return sal_False;
}
-void ScDocument::SetActiveScenario( SCTAB nTab, BOOL bActive )
+void ScDocument::SetActiveScenario( SCTAB nTab, sal_Bool bActive )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->SetActiveScenario( bActive );
}
-BOOL ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const
+sal_Bool ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const
{
if (ValidTab(nSrcTab) && ValidTab(nDestTab))
return pTab[nSrcTab]->TestCopyScenarioTo( pTab[nDestTab] );
DBG_ERROR("falsche Tabelle bei TestCopyScenario");
- return FALSE;
+ return sal_False;
}
void ScDocument::AddUnoObject( SfxListener& rObject )
@@ -812,9 +812,9 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
{
if (pUnoBroadcaster)
{
- bInUnoBroadcast = TRUE;
+ bInUnoBroadcast = sal_True;
pUnoBroadcaster->Broadcast( rHint );
- bInUnoBroadcast = FALSE;
+ bInUnoBroadcast = sal_False;
// During Broadcast notification, Uno objects can add to pUnoListenerCalls.
// The listener calls must be processed after completing the broadcast,
@@ -829,9 +829,9 @@ void ScDocument::BroadcastUno( const SfxHint &rHint )
// outermost call executes them all.
ScChartLockGuard aChartLockGuard(this);
- bInUnoListenerCall = TRUE;
+ bInUnoListenerCall = sal_True;
pUnoListenerCalls->ExecuteAndClear();
- bInUnoListenerCall = FALSE;
+ bInUnoListenerCall = sal_False;
}
}
}
@@ -876,7 +876,7 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScDocument* pUndoDoc, BOOL bIncludeDraw,
+ ScDocument* pUndoDoc, sal_Bool bIncludeDraw,
bool bUpdateNoteCaptionPos )
{
PutInOrder( nCol1, nCol2 );
@@ -884,7 +884,7 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode,
PutInOrder( nTab1, nTab2 );
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
- BOOL bExpandRefsOld = IsExpandRefs();
+ sal_Bool bExpandRefsOld = IsExpandRefs();
if ( eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0 || nDz > 0) )
SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() );
SCTAB i;
@@ -999,7 +999,7 @@ void ScDocument::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
}
void ScDocument::Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
- ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
+ sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
double nStepValue, double nMaxValue)
{
PutInOrder( nCol1, nCol2 );
@@ -1022,7 +1022,7 @@ String ScDocument::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCRO
}
void ScDocument::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- USHORT nFormatNo, const ScMarkData& rMark )
+ sal_uInt16 nFormatNo, const ScMarkData& rMark )
{
PutInOrder( nStartCol, nEndCol );
PutInOrder( nStartRow, nEndRow );
@@ -1050,8 +1050,8 @@ void ScDocument::GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
void ScDocument::GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow )
{
- USHORT nCommand = rSearchItem.GetCommand();
- BOOL bReplace = ( nCommand == SVX_SEARCHCMD_REPLACE ||
+ sal_uInt16 nCommand = rSearchItem.GetCommand();
+ sal_Bool bReplace = ( nCommand == SVX_SEARCHCMD_REPLACE ||
nCommand == SVX_SEARCHCMD_REPLACE_ALL );
if ( rSearchItem.GetBackward() )
{
@@ -1133,7 +1133,7 @@ void ScDocument::GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
}
}
-BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
+sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
@@ -1142,13 +1142,13 @@ BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
rMark.MarkToMulti();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (VALIDTAB(rTab))
{
SCCOL nCol;
SCROW nRow;
SCTAB nTab;
- USHORT nCommand = rSearchItem.GetCommand();
+ sal_uInt16 nCommand = rSearchItem.GetCommand();
if ( nCommand == SVX_SEARCHCMD_FIND_ALL ||
nCommand == SVX_SEARCHCMD_REPLACE_ALL )
{
@@ -1219,36 +1219,36 @@ BOOL ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem,
// Outline anpassen
-BOOL ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, BOOL bShow )
+sal_Bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, sal_Bool bShow )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->UpdateOutlineCol( nStartCol, nEndCol, bShow );
DBG_ERROR("missing tab");
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bShow )
+sal_Bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bShow )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->UpdateOutlineRow( nStartRow, nEndRow, bShow );
DBG_ERROR("missing tab");
- return FALSE;
+ return sal_False;
}
-void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, BOOL bKeepQuery)
+void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, sal_Bool bKeepQuery)
{
if ( ValidTab(nTab) && pTab[nTab] )
{
- BOOL bOldDisableIdle = IsIdleDisabled();
- DisableIdle( TRUE );
+ sal_Bool bOldDisableIdle = IsIdleDisabled();
+ DisableIdle( sal_True );
pTab[nTab]->Sort(rSortParam, bKeepQuery);
DisableIdle( bOldDisableIdle );
}
}
-SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeepSub)
+SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool bKeepSub)
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->Query((ScQueryParam&)rQueryParam, bKeepSub);
@@ -1258,13 +1258,13 @@ SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeep
}
-BOOL ScDocument::ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, BOOL* pSpecial )
+sal_Bool ScDocument::ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool* pSpecial )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->ValidQuery( nRow, rQueryParam, pSpecial );
DBG_ERROR("missing tab");
- return FALSE;
+ return sal_False;
}
@@ -1276,19 +1276,19 @@ void ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String&
rStr.Erase();
}
-BOOL ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam)
+sal_Bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam)
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->CreateQueryParam(nCol1, nRow1, nCol2, nRow2, rQueryParam);
DBG_ERROR("missing tab");
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
+sal_Bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
{
ScDBData* pDBData = GetDBAtCursor( nCurCol, nCurRow, nCurTab );
- BOOL bHasAutoFilter = ( pDBData != NULL );
+ sal_Bool bHasAutoFilter = ( pDBData != NULL );
if ( pDBData )
{
@@ -1296,7 +1296,7 @@ BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
{
SCCOL nCol;
SCROW nRow;
- INT16 nFlag;
+ sal_Int16 nFlag;
ScQueryParam aParam;
pDBData->GetQueryParam( aParam );
@@ -1309,17 +1309,17 @@ BOOL ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
GetValue();
if ( (nFlag & SC_MF_AUTO) == 0 )
- bHasAutoFilter = FALSE;
+ bHasAutoFilter = sal_False;
}
}
else
- bHasAutoFilter = FALSE;
+ bHasAutoFilter = sal_False;
}
return bHasAutoFilter;
}
-BOOL ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+sal_Bool ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow );
@@ -1327,10 +1327,10 @@ BOOL ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
// if (pTab[nTab])
// return pTab[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow );
- //return FALSE;
+ //return sal_False;
}
-BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+sal_Bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab )
{
return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow );
@@ -1338,19 +1338,19 @@ BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
// if (pTab[nTab])
// return pTab[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow );
- //return FALSE;
+ //return sal_False;
}
//
// GetFilterEntries - Eintraege fuer AutoFilter-Listbox
//
-BOOL ScDocument::GetFilterEntries(
+sal_Bool ScDocument::GetFilterEntries(
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates)
{
if ( ValidTab(nTab) && pTab[nTab] && pDBCollection )
{
- ScDBData* pDBData = pDBCollection->GetDBAtCursor(nCol, nRow, nTab, FALSE); //!??
+ ScDBData* pDBData = pDBCollection->GetDBAtCursor(nCol, nRow, nTab, sal_False); //!??
if (pDBData)
{
SCTAB nAreaTab;
@@ -1390,47 +1390,47 @@ BOOL ScDocument::GetFilterEntries(
pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//
// GetFilterEntriesArea - Eintraege fuer Filter-Dialog
//
-BOOL ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
+sal_Bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates )
{
if ( ValidTab(nTab) && pTab[nTab] )
{
pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//
// GetDataEntries - Eintraege fuer Auswahlliste-Listbox (keine Zahlen / Formeln)
//
-BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
- TypedScStrCollection& rStrings, BOOL bLimit )
+sal_Bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ TypedScStrCollection& rStrings, sal_Bool bLimit )
{
if( !bLimit )
{
/* Try to generate the list from list validation. This part is skipped,
- if bLimit==TRUE, because in that case this function is called to get
+ if bLimit==sal_True, because in that case this function is called to get
cell values for auto completion on input. */
sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ) )->GetValue();
if( nValidation )
{
const ScValidationData* pData = GetValidationEntry( nValidation );
if( pData && pData->FillSelectionList( rStrings, ScAddress( nCol, nRow, nTab ) ) )
- return TRUE;
+ return sal_True;
}
}
@@ -1438,7 +1438,7 @@ BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
//if (ValidTab(nTab) && pTab[nTab])
// return pTab[nTab]->GetDataEntries( nCol, nRow, rStrings, bLimit );
- //return FALSE;
+ //return sal_False;
}
//
@@ -1450,9 +1450,9 @@ BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
#define SC_STRTYPE_DBNAMES 3
#define SC_STRTYPE_HEADERS 4
-BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
+sal_Bool ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
{
- USHORT i;
+ sal_uInt16 i;
//
// Bereichsnamen
@@ -1460,7 +1460,7 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
if ( pRangeName )
{
- USHORT nRangeCount = pRangeName->GetCount();
+ sal_uInt16 nRangeCount = pRangeName->GetCount();
for ( i=0; i<nRangeCount; i++ )
{
ScRangeData* pData = (*pRangeName)[i];
@@ -1479,7 +1479,7 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
if ( pDBCollection )
{
- USHORT nDBCount = pDBCollection->GetCount();
+ sal_uInt16 nDBCount = pDBCollection->GetCount();
for ( i=0; i<nDBCount; i++ )
{
ScDBData* pData = (*pDBCollection)[i];
@@ -1499,7 +1499,7 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
ScRangePairList* pLists[2];
pLists[0] = GetColNameRanges();
pLists[1] = GetRowNameRanges();
- for (USHORT nListNo=0; nListNo<2; nListNo++)
+ for (sal_uInt16 nListNo=0; nListNo<2; nListNo++)
{
ScRangePairList* pList = pLists[nListNo];
if (pList)
@@ -1518,11 +1518,11 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDocument::IsEmbedded() const
+sal_Bool ScDocument::IsEmbedded() const
{
return bIsEmbedded;
}
@@ -1563,20 +1563,20 @@ Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm
void ScDocument::SetEmbedded( const ScRange& rRange )
{
- bIsEmbedded = TRUE;
+ bIsEmbedded = sal_True;
aEmbedRange = rRange;
}
void ScDocument::ResetEmbedded()
{
- bIsEmbedded = FALSE;
+ bIsEmbedded = sal_False;
aEmbedRange = ScRange();
}
/** Similar to ScViewData::AddPixelsWhile(), but add height twips and only
while result is less than nStopTwips.
- @return TRUE if advanced at least one row.
+ @return sal_True if advanced at least one row.
*/
bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEndRow, const ScTable * pTable )
{
@@ -1586,7 +1586,7 @@ bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEn
while (rTwips < nStopTwips && nRow <= nEndRow && !bStop)
{
SCROW nHeightEndRow;
- USHORT nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow);
+ sal_uInt16 nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow);
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -1637,13 +1637,13 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
long nSize;
long nTwips;
long nAdd;
- BOOL bEnd;
+ sal_Bool bEnd;
nSize = 0;
nTwips = (long) (aPosRect.Left() / HMM_PER_TWIPS);
SCCOL nX1 = 0;
- bEnd = FALSE;
+ bEnd = sal_False;
while (!bEnd)
{
nAdd = (long) pTable->GetColWidth(nX1);
@@ -1653,13 +1653,13 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
++nX1;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
nTwips = (long) (aPosRect.Right() / HMM_PER_TWIPS);
SCCOL nX2 = nX1;
- bEnd = FALSE;
+ bEnd = sal_False;
while (!bEnd)
{
nAdd = (long) pTable->GetColWidth(nX2);
@@ -1669,7 +1669,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
++nX2;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
@@ -1693,7 +1693,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
void ScDocument::SetEmbedded( const Rectangle& rRect ) // aus VisArea (1/100 mm)
{
- bIsEmbedded = TRUE;
+ bIsEmbedded = sal_True;
aEmbedRange = GetRange( nVisibleTab, rRect );
}
@@ -1764,7 +1764,7 @@ void ScDocument::SnapVisArea( Rectangle& rRect ) const
return;
}
- BOOL bNegativePage = IsNegativePage( nVisibleTab );
+ sal_Bool bNegativePage = IsNegativePage( nVisibleTab );
if ( bNegativePage )
ScDrawLayer::MirrorRectRTL( rRect ); // calculate with positive (LTR) values
@@ -1795,24 +1795,24 @@ void ScDocument::SetDocProtection(const ScDocProtection* pProtect)
pDocProtection.reset(NULL);
}
-BOOL ScDocument::IsDocProtected() const
+sal_Bool ScDocument::IsDocProtected() const
{
return pDocProtection.get() && pDocProtection->isProtected();
}
-BOOL ScDocument::IsDocEditable() const
+sal_Bool ScDocument::IsDocEditable() const
{
// import into read-only document is possible
return !IsDocProtected() && ( bImportingXML || mbChangeReadOnlyEnabled || !pShell || !pShell->IsReadOnly() );
}
-BOOL ScDocument::IsTabProtected( SCTAB nTab ) const
+sal_Bool ScDocument::IsTabProtected( SCTAB nTab ) const
{
if (VALIDTAB(nTab) && pTab[nTab])
return pTab[nTab]->IsProtected();
DBG_ERROR("Falsche Tabellennummer");
- return FALSE;
+ return sal_False;
}
ScTableProtection* ScDocument::GetTabProtection( SCTAB nTab ) const
@@ -1890,7 +1890,7 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy
void ScDocument::SetDrawDefaults()
{
- bSetDrawDefaults = TRUE;
+ bSetDrawDefaults = sal_True;
UpdateDrawDefaults();
}
@@ -1973,7 +1973,7 @@ void ScDocument::DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
ApplyFlagsTab( nStartCol+1, nStartRow+1, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
// remove all covered notes (removed captions are collected by drawing undo if active)
- USHORT nDelFlag = IDF_NOTE | (bDeleteCaptions ? 0 : IDF_NOCAPTIONS);
+ sal_uInt16 nDelFlag = IDF_NOTE | (bDeleteCaptions ? 0 : IDF_NOCAPTIONS);
if( nStartCol < nEndCol )
DeleteAreaTab( nStartCol + 1, nStartRow, nEndCol, nStartRow, nTab, nDelFlag );
if( nStartRow < nEndRow )
@@ -2032,7 +2032,7 @@ ScDPTableDataCache* ScDocument::GetDPObjectCache( long nID )
ScDPTableDataCache* ScDocument::GetUsedDPObjectCache ( ScRange rRange )
{
ScDPTableDataCache* pCache = NULL;
- USHORT nCount = GetDPCollection()->GetCount();
+ sal_uInt16 nCount = GetDPCollection()->GetCount();
for ( short i=nCount-1; i>=0 ; i--)
{
if ( const ScSheetSourceDesc* pUsedSheetDesc = (*pDPCollection)[i]->GetSheetDesc() )
@@ -2101,8 +2101,8 @@ void ScDocument::RemoveUnusedDPObjectCaches()
for ( std::list<ScDPTableDataCache*>::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); iter++ )
{
long nID = (*iter)->GetId();
- USHORT nCount = GetDPCollection()->GetCount();
- USHORT i ;
+ sal_uInt16 nCount = GetDPCollection()->GetCount();
+ sal_uInt16 i ;
for ( i=0; i<nCount; i++)
{
if ( nID == (*pDPCollection)[i]->GetCacheId() )
@@ -2123,8 +2123,8 @@ void ScDocument::GetUsedDPObjectCache( std::list<ScDPTableDataCache*>& usedlist
for ( std::list<ScDPTableDataCache*>::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); iter++ )
{
long nID = (*iter)->GetId();
- USHORT nCount = GetDPCollection()->GetCount();
- USHORT i=0;
+ sal_uInt16 nCount = GetDPCollection()->GetCount();
+ sal_uInt16 i=0;
for ( i=0; i<nCount; i++)
if ( nID == (*pDPCollection)[i]->GetCacheId() )
break;
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index e8b58b0f71d3..c9e19a63f81d 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -61,11 +61,11 @@ using namespace formula;
// -----------------------------------------------------------------------
// Nach der Regula Falsi Methode
-BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
+sal_Bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
const String& sValStr, double& nX)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nX = 0.0;
if (ValidColRow(nFCol, nFRow) && ValidColRow(nVCol, nVRow) &&
VALIDTAB(nFTab) && VALIDTAB(nVTab) && pTab[nFTab] && pTab[nVTab])
@@ -110,10 +110,10 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
// FIXME FIXME FIXME this might need to be reworked now that we have formula::FormulaErrorToken and ScFormulaResult, double check !!!
DBG_ERRORFILE("ScDocument::Solver: -> ScFormulaCell::GetValueAlways might need reimplementation");
pCell->Interpret();
- USHORT nErrCode = pCell->GetErrCode();
+ sal_uInt16 nErrCode = pCell->GetErrCode();
nX = pCell->GetValueAlways();
if (nErrCode == 0) // kein fehler beim Rechnen
- bRet = TRUE;
+ bRet = sal_True;
delete pCell;
}
}
@@ -134,11 +134,11 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
SCCOL j;
SCROW k;
i = 0;
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
while (i <= MAXTAB && !bStop) // erste markierte Tabelle finden
{
if (pTab[i] && rMark.GetTableSelect(i))
- bStop = TRUE;
+ bStop = sal_True;
else
i++;
}
@@ -173,9 +173,9 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
aRefData.nCol = nCol1;
aRefData.nRow = nRow1;
aRefData.nTab = nTab1;
- aRefData.SetColRel( TRUE );
- aRefData.SetRowRel( TRUE );
- aRefData.SetTabRel( TRUE );
+ aRefData.SetColRel( sal_True );
+ aRefData.SetRowRel( sal_True );
+ aRefData.SetTabRel( sal_True );
aRefData.CalcRelFromAbs( ScAddress( nCol1, nRow1, nTab1 ) );
ScTokenArray aArr;
@@ -221,11 +221,11 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
SCCOL j;
SCROW k;
i = 0;
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
while (i <= MAXTAB && !bStop) // erste markierte Tabelle finden
{
if (pTab[i] && rMark.GetTableSelect(i))
- bStop = TRUE;
+ bStop = sal_True;
else
i++;
}
@@ -245,12 +245,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
const String& sSep = ScCompiler::GetNativeSymbol( ocSep);
if (rParam.nMode == 0) // nur Spalte
{
- aRef.Set( rParam.aRefFormulaCell.GetAddress(), TRUE, FALSE, FALSE );
+ aRef.Set( rParam.aRefFormulaCell.GetAddress(), sal_True, sal_False, sal_False );
aForString += aRef.GetRefString(this, nTab1);
aForString += sSep;
aForString += rParam.aRefColCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1, nRow1, nTab1, FALSE, TRUE, TRUE );
+ aRef.Set( nCol1, nRow1, nTab1, sal_False, sal_True, sal_True );
aForString += aRef.GetRefString(this, nTab1);
nCol1++;
nCol2 = Min( nCol2, (SCCOL)(rParam.aRefFormulaEnd.Col() -
@@ -258,12 +258,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
}
else if (rParam.nMode == 1) // nur zeilenweise
{
- aRef.Set( rParam.aRefFormulaCell.GetAddress(), FALSE, TRUE, FALSE );
+ aRef.Set( rParam.aRefFormulaCell.GetAddress(), sal_False, sal_True, sal_False );
aForString += aRef.GetRefString(this, nTab1);
aForString += sSep;
aForString += rParam.aRefRowCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1, nRow1, nTab1, TRUE, FALSE, TRUE );
+ aRef.Set( nCol1, nRow1, nTab1, sal_True, sal_False, sal_True );
aForString += aRef.GetRefString(this, nTab1);
nRow1++;
nRow2 = Min( nRow2, (SCROW)(rParam.aRefFormulaEnd.Row() -
@@ -275,12 +275,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
aForString += sSep;
aForString += rParam.aRefColCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1, nRow1 + 1, nTab1, FALSE, TRUE, TRUE );
+ aRef.Set( nCol1, nRow1 + 1, nTab1, sal_False, sal_True, sal_True );
aForString += aRef.GetRefString(this, nTab1);
aForString += sSep;
aForString += rParam.aRefRowCell.GetRefString(this, nTab1);
aForString += sSep;
- aRef.Set( nCol1 + 1, nRow1, nTab1, TRUE, FALSE, TRUE );
+ aRef.Set( nCol1 + 1, nRow1, nTab1, sal_True, sal_False, sal_True );
aForString += aRef.GetRefString(this, nTab1);
nCol1++; nRow1++;
}
@@ -337,33 +337,33 @@ bool ScDocument::MarkUsedExternalReferences( ScTokenArray & rArr )
return bAllMarked;
}
-BOOL ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
- BOOL bInSel, const ScMarkData& rMark) const
+sal_Bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
+ sal_Bool bInSel, const ScMarkData& rMark) const
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetNextSpellingCell( nCol, nRow, bInSel, rMark );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
+sal_Bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
const ScMarkData& rMark )
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetNextMarkedCell( rCol, rRow, rMark );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
+sal_Bool ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
SCCOL nCol, SCROW nRow, SCTAB nTab,
ScMarkData& rMark,
- BOOL bIsUndoP)
+ sal_Bool bIsUndoP)
{
if (pTab[nTab])
return pTab[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP);
else
- return FALSE;
+ return sal_False;
}
void ScDocument::CompileDBFormula()
@@ -374,7 +374,7 @@ void ScDocument::CompileDBFormula()
}
}
-void ScDocument::CompileDBFormula( BOOL bCreateFormulaString )
+void ScDocument::CompileDBFormula( sal_Bool bCreateFormulaString )
{
for (SCTAB i=0; i<=MAXTAB; i++)
{
@@ -382,7 +382,7 @@ void ScDocument::CompileDBFormula( BOOL bCreateFormulaString )
}
}
-void ScDocument::CompileNameFormula( BOOL bCreateFormulaString )
+void ScDocument::CompileNameFormula( sal_Bool bCreateFormulaString )
{
if ( pCondFormList )
pCondFormList->CompileAll(); // nach ScNameDlg noetig
@@ -441,7 +441,7 @@ xub_StrLen ScDocument::GetMaxNumberStringLen( sal_uInt16& nPrecision, SCTAB nTab
return 0;
}
-BOOL ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
+sal_Bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
const ScAddress& rCursor, const ScMarkData& rMark,
double& rResult )
{
@@ -477,14 +477,14 @@ BOOL ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
if (aData.nCount)
rResult = aData.nVal / (double) aData.nCount;
else
- aData.bError = TRUE;
+ aData.bError = sal_True;
break;
case SUBTOTAL_FUNC_MAX:
case SUBTOTAL_FUNC_MIN:
if (aData.nCount)
rResult = aData.nVal;
else
- aData.bError = TRUE;
+ aData.bError = sal_True;
break;
default:
{
@@ -498,7 +498,7 @@ BOOL ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc,
return !aData.bError;
}
-double ScDocument::RoundValueAsShown( double fVal, ULONG nFormat )
+double ScDocument::RoundValueAsShown( double fVal, sal_uLong nFormat )
{
short nType;
if ( (nType = GetFormatTable()->GetType( nFormat )) != NUMBERFORMAT_DATE
@@ -544,7 +544,7 @@ double ScDocument::RoundValueAsShown( double fVal, ULONG nFormat )
// bedingte Formate und Gueltigkeitsbereiche
//
-ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
+sal_uLong ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
{
if (rNew.IsEmpty())
return 0; // leer ist immer 0
@@ -552,12 +552,12 @@ ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
if (!pCondFormList)
pCondFormList = new ScConditionalFormatList;
- ULONG nMax = 0;
- USHORT nCount = pCondFormList->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uLong nMax = 0;
+ sal_uInt16 nCount = pCondFormList->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const ScConditionalFormat* pForm = (*pCondFormList)[i];
- ULONG nKey = pForm->GetKey();
+ sal_uLong nKey = pForm->GetKey();
if ( pForm->EqualEntries( rNew ) )
return nKey;
if ( nKey > nMax )
@@ -566,14 +566,14 @@ ULONG ScDocument::AddCondFormat( const ScConditionalFormat& rNew )
// Der Aufruf kann aus ScPatternAttr::PutInPool kommen, darum Clone (echte Kopie)
- ULONG nNewKey = nMax + 1;
+ sal_uLong nNewKey = nMax + 1;
ScConditionalFormat* pInsert = rNew.Clone(this);
pInsert->SetKey( nNewKey );
pCondFormList->InsertNew( pInsert );
return nNewKey;
}
-ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
+sal_uLong ScDocument::AddValidationEntry( const ScValidationData& rNew )
{
if (rNew.IsEmpty())
return 0; // leer ist immer 0
@@ -581,12 +581,12 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
if (!pValidationList)
pValidationList = new ScValidationDataList;
- ULONG nMax = 0;
- USHORT nCount = pValidationList->Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uLong nMax = 0;
+ sal_uInt16 nCount = pValidationList->Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
const ScValidationData* pData = (*pValidationList)[i];
- ULONG nKey = pData->GetKey();
+ sal_uLong nKey = pData->GetKey();
if ( pData->EqualEntries( rNew ) )
return nKey;
if ( nKey > nMax )
@@ -595,7 +595,7 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
// Der Aufruf kann aus ScPatternAttr::PutInPool kommen, darum Clone (echte Kopie)
- ULONG nNewKey = nMax + 1;
+ sal_uLong nNewKey = nMax + 1;
ScValidationData* pInsert = rNew.Clone(this);
pInsert->SetKey( nNewKey );
pValidationList->InsertNew( pInsert );
@@ -603,16 +603,16 @@ ULONG ScDocument::AddValidationEntry( const ScValidationData& rNew )
}
const SfxPoolItem* ScDocument::GetEffItem(
- SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const
+ SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const
{
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
if ( pPattern )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
const SfxPoolItem* pItem;
- if ( rSet.GetItemState( ATTR_CONDITIONAL, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( ATTR_CONDITIONAL, sal_True, &pItem ) == SFX_ITEM_SET )
{
- ULONG nIndex = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item*)pItem)->GetValue();
if (nIndex && pCondFormList)
{
const ScConditionalFormat* pForm = pCondFormList->GetFormat( nIndex );
@@ -625,7 +625,7 @@ const SfxPoolItem* ScDocument::GetEffItem(
SfxStyleSheetBase* pStyleSheet = xPoolHelper->GetStylePool()->Find(
aStyle, SFX_STYLE_FAMILY_PARA );
if ( pStyleSheet && pStyleSheet->GetItemSet().GetItemState(
- nWhich, TRUE, &pItem ) == SFX_ITEM_SET )
+ nWhich, sal_True, &pItem ) == SFX_ITEM_SET )
return pItem;
}
}
@@ -658,7 +658,7 @@ const SfxItemSet* ScDocument::GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab
const ScConditionalFormat* ScDocument::GetCondFormat(
SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
- ULONG nIndex = ((const SfxUInt32Item*)GetAttr(nCol,nRow,nTab,ATTR_CONDITIONAL))->GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item*)GetAttr(nCol,nRow,nTab,ATTR_CONDITIONAL))->GetValue();
if (nIndex)
{
if (pCondFormList)
@@ -672,7 +672,7 @@ const ScConditionalFormat* ScDocument::GetCondFormat(
return NULL;
}
-const ScValidationData* ScDocument::GetValidationEntry( ULONG nIndex ) const
+const ScValidationData* ScDocument::GetValidationEntry( sal_uLong nIndex ) const
{
if ( pValidationList )
return pValidationList->GetData( nIndex );
@@ -680,19 +680,19 @@ const ScValidationData* ScDocument::GetValidationEntry( ULONG nIndex ) const
return NULL;
}
-void ScDocument::FindConditionalFormat( ULONG nKey, ScRangeList& rRanges )
+void ScDocument::FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges )
{
for (SCTAB i=0; i<=MAXTAB && pTab[i]; i++)
pTab[i]->FindConditionalFormat( nKey, rRanges );
}
-void ScDocument::FindConditionalFormat( ULONG nKey, ScRangeList& rRanges, SCTAB nTab )
+void ScDocument::FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab )
{
if(VALIDTAB(nTab) && pTab[nTab])
pTab[nTab]->FindConditionalFormat( nKey, rRanges );
}
-void ScDocument::ConditionalChanged( ULONG nKey )
+void ScDocument::ConditionalChanged( sal_uLong nKey )
{
if ( nKey && pCondFormList && !bIsClip && !bIsUndo ) // nKey==0 -> noop
{
@@ -715,7 +715,7 @@ void ScDocument::SetCondFormList(ScConditionalFormatList* pNew)
//------------------------------------------------------------------------
-BOOL ScDocument::HasDetectiveOperations() const
+sal_Bool ScDocument::HasDetectiveOperations() const
{
return pDetOpList && pDetOpList->Count();
}
@@ -753,12 +753,12 @@ void ScDocument::SetDetOpList(ScDetOpList* pNew)
#define SC_DOCCOMP_ROWS 100
-USHORT ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab,
+sal_uInt16 ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab,
ScDocument& rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab,
SCCOL nMaxCol, SCCOLROW* pOtherCols )
{
- ULONG nDif = 0;
- ULONG nUsed = 0;
+ sal_uLong nDif = 0;
+ sal_uLong nUsed = 0;
for (SCCOL nThisCol=0; nThisCol<=nMaxCol; nThisCol++)
{
SCCOL nOtherCol;
@@ -786,20 +786,20 @@ USHORT ScDocument::RowDifferences( SCROW nThisRow, SCTAB nThisTab,
}
if (nUsed > 0)
- return static_cast<USHORT>((nDif*64)/nUsed); // max.256 (SC_DOCCOMP_MAXDIFF)
+ return static_cast<sal_uInt16>((nDif*64)/nUsed); // max.256 (SC_DOCCOMP_MAXDIFF)
DBG_ASSERT(!nDif,"Diff ohne Used");
return 0;
}
-USHORT ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
+sal_uInt16 ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
ScDocument& rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab,
SCROW nMaxRow, SCCOLROW* pOtherRows )
{
//! optimieren mit Iterator oder so
- ULONG nDif = 0;
- ULONG nUsed = 0;
+ sal_uLong nDif = 0;
+ sal_uLong nUsed = 0;
for (SCROW nThisRow=0; nThisRow<=nMaxRow; nThisRow++)
{
SCROW nOtherRow;
@@ -827,17 +827,17 @@ USHORT ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
}
if (nUsed > 0)
- return static_cast<USHORT>((nDif*64)/nUsed); // max.256
+ return static_cast<sal_uInt16>((nDif*64)/nUsed); // max.256
DBG_ASSERT(!nDif,"Diff ohne Used");
return 0;
}
void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
- BOOL bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
- SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, ULONG nProAdd )
+ sal_Bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
+ SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd )
{
- // bColumns=TRUE: Zeilen sind Spalten und umgekehrt
+ // bColumns=sal_True: Zeilen sind Spalten und umgekehrt
SCCOLROW nMaxCont; // wieviel weiter
SCCOLROW nMinGood; // was ist ein Treffer (incl.)
@@ -852,19 +852,19 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
nMaxCont = SC_DOCCOMP_ROWS; // 100 Zeilen
nMinGood = SC_DOCCOMP_MINGOOD;
}
- BOOL bUseTotal = bColumns && !pTranslate; // nur beim ersten Durchgang
+ sal_Bool bUseTotal = bColumns && !pTranslate; // nur beim ersten Durchgang
SCCOLROW nOtherRow = 0;
- USHORT nComp;
+ sal_uInt16 nComp;
SCCOLROW nThisRow;
- BOOL bTotal = FALSE; // ueber verschiedene nThisRow beibehalten
+ sal_Bool bTotal = sal_False; // ueber verschiedene nThisRow beibehalten
SCCOLROW nUnknown = 0;
for (nThisRow = 0; nThisRow <= nThisEndRow; nThisRow++)
{
SCCOLROW nTempOther = nOtherRow;
- BOOL bFound = FALSE;
- USHORT nBest = SC_DOCCOMP_MAXDIFF;
+ sal_Bool bFound = sal_False;
+ sal_uInt16 nBest = SC_DOCCOMP_MAXDIFF;
SCCOLROW nMax = Min( nOtherEndRow, static_cast<SCCOLROW>(( nTempOther + nMaxCont + nUnknown )) );
for (SCCOLROW i=nTempOther; i<=nMax && nBest>0; i++) // bei 0 abbrechen
{
@@ -876,12 +876,12 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
{
nTempOther = i;
nBest = nComp;
- bFound = TRUE;
+ bFound = sal_True;
}
if ( nComp < SC_DOCCOMP_MAXDIFF || bFound )
- bTotal = FALSE;
+ bTotal = sal_False;
else if ( i == nTempOther && bUseTotal )
- bTotal = TRUE; // nur ganz oben
+ bTotal = sal_True; // nur ganz oben
}
if ( bFound )
{
@@ -896,14 +896,14 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
}
if (pProgress)
- pProgress->SetStateOnPercent(nProAdd+static_cast<ULONG>(nThisRow));
+ pProgress->SetStateOnPercent(nProAdd+static_cast<sal_uLong>(nThisRow));
}
// Bloecke ohne Uebereinstimmung ausfuellen
SCROW nFillStart = 0;
SCROW nFillPos = 0;
- BOOL bInFill = FALSE;
+ sal_Bool bInFill = sal_False;
for (nThisRow = 0; nThisRow <= nThisEndRow+1; nThisRow++)
{
SCROW nThisOther = ( nThisRow <= nThisEndRow ) ? pOtherRows[nThisRow] : (nOtherEndRow+1);
@@ -920,13 +920,13 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
pOtherRows[nFillPos+i] = nFillStart+i;
}
- bInFill = FALSE;
+ bInFill = sal_False;
}
nFillStart = nThisOther + 1;
nFillPos = nThisRow + 1;
}
else
- bInFill = TRUE;
+ bInFill = sal_True;
}
}
@@ -962,7 +962,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
// auffuellen, damit einzeln umbenannte Tabellen nicht wegfallen
SCTAB nFillStart = 0;
SCTAB nFillPos = 0;
- BOOL bInFill = FALSE;
+ sal_Bool bInFill = sal_False;
for (nThisTab = 0; nThisTab <= nThisCount; nThisTab++)
{
SCTAB nThisOther = ( nThisTab < nThisCount ) ? pOtherTabs[nThisTab] : nOtherCount;
@@ -980,13 +980,13 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
pOtherTabs[nFillPos+i] = nFillStart+i;
}
- bInFill = FALSE;
+ bInFill = sal_False;
}
nFillStart = nThisOther + 1;
nFillPos = nThisTab + 1;
}
else
- bInFill = TRUE;
+ bInFill = sal_True;
}
//
@@ -1008,7 +1008,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
SCROW nEndRow = Max(nThisEndRow, nOtherEndRow);
SCCOL nThisCol;
SCROW nThisRow;
- ULONG n1,n2; // fuer AppendDeleteRange
+ sal_uLong n1,n2; // fuer AppendDeleteRange
//! ein Progress ueber alle Tabellen ???
String aTabName;
@@ -1034,23 +1034,23 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
//! Spalten vergleichen zweimal mit unterschiedlichem nMinGood ???
// 1
- FindOrder( pTempRows, nThisEndRow, nOtherEndRow, FALSE,
+ FindOrder( pTempRows, nThisEndRow, nOtherEndRow, sal_False,
rOtherDoc, nThisTab, nOtherTab, nEndCol, NULL, &aProgress, 0 );
// 2
- FindOrder( pOtherCols, nThisEndCol, nOtherEndCol, TRUE,
+ FindOrder( pOtherCols, nThisEndCol, nOtherEndCol, sal_True,
rOtherDoc, nThisTab, nOtherTab, nEndRow, NULL, NULL, 0 );
- FindOrder( pOtherRows, nThisEndRow, nOtherEndRow, FALSE,
+ FindOrder( pOtherRows, nThisEndRow, nOtherEndRow, sal_False,
rOtherDoc, nThisTab, nOtherTab, nThisEndCol,
pOtherCols, &aProgress, nThisEndRow );
- ULONG nMatch1 = 0; // pTempRows, keine Spalten
+ sal_uLong nMatch1 = 0; // pTempRows, keine Spalten
for (nThisRow = 0; nThisRow<=nThisEndRow; nThisRow++)
if (ValidRow(pTempRows[nThisRow]))
nMatch1 += SC_DOCCOMP_MAXDIFF -
RowDifferences( nThisRow, nThisTab, rOtherDoc, pTempRows[nThisRow],
nOtherTab, nEndCol, NULL );
- ULONG nMatch2 = 0; // pOtherRows, pOtherCols
+ sal_uLong nMatch2 = 0; // pOtherRows, pOtherCols
for (nThisRow = 0; nThisRow<=nThisEndRow; nThisRow++)
if (ValidRow(pOtherRows[nThisRow]))
nMatch2 += SC_DOCCOMP_MAXDIFF -
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 303dbd2ccae3..fd8d9936683f 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -134,11 +134,11 @@ void ScDocument::UpdateAllCharts()
if ( !pDrawLayer || !pShell )
return;
- USHORT nDataCount = pChartCollection->GetCount();
+ sal_uInt16 nDataCount = pChartCollection->GetCount();
if ( !nDataCount )
return ; // nothing to do
- USHORT nPos;
+ sal_uInt16 nPos;
for (SCTAB nTab=0; nTab<=MAXTAB; nTab++)
{
@@ -208,7 +208,7 @@ void ScDocument::UpdateAllCharts()
pChartCollection->FreeAll();
}
-BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
+sal_Bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
{
if (pDrawLayer && pTab[nTab])
{
@@ -228,7 +228,7 @@ BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
{
if (pName)
*pName = ((SdrOle2Obj*)pObject)->GetPersistName();
- return TRUE;
+ return sal_True;
}
}
pObject = aIter.Next();
@@ -237,12 +237,12 @@ BOOL ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName )
if (pName)
pName->Erase();
- return FALSE; // nix gefunden
+ return sal_False; // nix gefunden
}
void ScDocument::UpdateChartArea( const String& rChartName,
- const ScRange& rNewArea, BOOL bColHeaders, BOOL bRowHeaders,
- BOOL bAdd )
+ const ScRange& rNewArea, sal_Bool bColHeaders, sal_Bool bRowHeaders,
+ sal_Bool bAdd )
{
ScRangeListRef aRLR( new ScRangeList );
aRLR->Append( rNewArea );
@@ -313,7 +313,7 @@ void ScDocument::SetChartRanges( const String& rChartName, const ::std::vector<
}
void ScDocument::GetOldChartParameters( const String& rName,
- ScRangeList& rRanges, BOOL& rColHeaders, BOOL& rRowHeaders )
+ ScRangeList& rRanges, sal_Bool& rColHeaders, sal_Bool& rRowHeaders )
{
// used for undo of changing chart source area
@@ -362,8 +362,8 @@ void ScDocument::GetOldChartParameters( const String& rName,
}
void ScDocument::UpdateChartArea( const String& rChartName,
- const ScRangeListRef& rNewList, BOOL bColHeaders, BOOL bRowHeaders,
- BOOL bAdd )
+ const ScRangeListRef& rNewList, sal_Bool bColHeaders, sal_Bool bRowHeaders,
+ sal_Bool bAdd )
{
if (!pDrawLayer)
return;
@@ -400,8 +400,8 @@ void ScDocument::UpdateChartArea( const String& rChartName,
aNewRanges = new ScRangeList;
aNewRanges->Parse( aRangesStr, this );
- ULONG nAddCount = rNewList->Count();
- for ( ULONG nAdd=0; nAdd<nAddCount; nAdd++ )
+ sal_uLong nAddCount = rNewList->Count();
+ for ( sal_uLong nAdd=0; nAdd<nAddCount; nAdd++ )
aNewRanges->Append( *rNewList->GetObject(nAdd) );
}
else
@@ -514,15 +514,15 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
if (!pDrawLayer)
return;
- USHORT nChartCount = pChartListenerCollection->GetCount();
- for ( USHORT nIndex = 0; nIndex < nChartCount; nIndex++ )
+ sal_uInt16 nChartCount = pChartListenerCollection->GetCount();
+ for ( sal_uInt16 nIndex = 0; nIndex < nChartCount; nIndex++ )
{
ScChartListener* pChartListener =
(ScChartListener*) (pChartListenerCollection->At(nIndex));
ScRangeListRef aRLR( pChartListener->GetRangeList() );
ScRangeListRef aNewRLR( new ScRangeList );
- BOOL bChanged = FALSE;
- BOOL bDataChanged = FALSE;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bDataChanged = sal_False;
for ( ScRangePtr pR = aRLR->First(); pR; pR = aRLR->Next() )
{
SCCOL theCol1 = pR->aStart.Col();
@@ -539,7 +539,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
theCol2,theRow2,theTab2 );
if ( eRes != UR_NOTHING )
{
- bChanged = TRUE;
+ bChanged = sal_True;
aNewRLR->Append( ScRange(
theCol1, theRow1, theTab1,
theCol2, theRow2, theTab2 ));
@@ -553,7 +553,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
|| (pR->aEnd.Tab() - pR->aStart.Tab()
!= theTab2 - theTab1))) )
{
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -656,12 +656,12 @@ void ScDocument::SetChartRangeList( const String& rChartName,
}
-BOOL ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_Bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
if (pTab[nTab])
return pTab[nTab]->HasData( nCol, nRow );
else
- return FALSE;
+ return sal_False;
}
uno::Reference< embed::XEmbeddedObject >
@@ -700,19 +700,19 @@ uno::Reference< embed::XEmbeddedObject >
return uno::Reference< embed::XEmbeddedObject >();
}
-BOOL lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr )
+sal_Bool lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr )
{
if ( !pColl )
- return FALSE;
+ return sal_False;
StrData aData( rStr );
- USHORT nDummy;
+ sal_uInt16 nDummy;
return pColl->Search( &aData, nDummy );
}
void ScDocument::UpdateChartListenerCollection()
{
- bChartListenerCollectionNeedsUpdate = FALSE;
+ bChartListenerCollectionNeedsUpdate = sal_False;
if (!pDrawLayer)
return;
else
@@ -738,11 +738,11 @@ void ScDocument::UpdateChartListenerCollection()
{
String aObjName = ((SdrOle2Obj*)pObject)->GetPersistName();
aCLSearcher.SetString( aObjName );
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pChartListenerCollection->Search( &aCLSearcher, nIndex ) )
{
((ScChartListener*) (pChartListenerCollection->
- At( nIndex )))->SetUsed( TRUE );
+ At( nIndex )))->SetUsed( sal_True );
}
else if ( lcl_StringInCollection( pOtherObjects, aObjName ) )
{
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index 8706c49320d1..6b0c8d3bee41 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -69,7 +69,7 @@ const uno::Reference< i18n::XBreakIterator >& ScDocument::GetBreakIterator()
return pScriptTypeData->xBreakIter;
}
-BOOL ScDocument::HasStringWeakCharacters( const String& rString )
+sal_Bool ScDocument::HasStringWeakCharacters( const String& rString )
{
if (rString.Len())
{
@@ -84,7 +84,7 @@ BOOL ScDocument::HasStringWeakCharacters( const String& rString )
{
sal_Int16 nType = xBreakIter->getScriptType( aText, nPos );
if ( nType == i18n::ScriptType::WEAK )
- return TRUE; // found
+ return sal_True; // found
nPos = xBreakIter->endOfScript( aText, nPos, nType );
}
@@ -92,13 +92,13 @@ BOOL ScDocument::HasStringWeakCharacters( const String& rString )
}
}
- return FALSE; // none found
+ return sal_False; // none found
}
-BYTE ScDocument::GetStringScriptType( const String& rString )
+sal_uInt8 ScDocument::GetStringScriptType( const String& rString )
{
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
if (rString.Len())
{
uno::Reference<i18n::XBreakIterator> xBreakIter = GetBreakIterator();
@@ -132,12 +132,12 @@ BYTE ScDocument::GetStringScriptType( const String& rString )
return nRet;
}
-BYTE ScDocument::GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat )
+sal_uInt8 ScDocument::GetCellScriptType( ScBaseCell* pCell, sal_uLong nNumberFormat )
{
if ( !pCell )
return 0; // empty
- BYTE nStored = pCell->GetScriptType();
+ sal_uInt8 nStored = pCell->GetScriptType();
if ( nStored != SC_SCRIPTTYPE_UNKNOWN ) // stored value valid?
return nStored; // use stored value
@@ -145,14 +145,14 @@ BYTE ScDocument::GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat )
Color* pColor;
ScCellFormat::GetString( pCell, nNumberFormat, aStr, &pColor, *xPoolHelper->GetFormTable() );
- BYTE nRet = GetStringScriptType( aStr );
+ sal_uInt8 nRet = GetStringScriptType( aStr );
pCell->SetScriptType( nRet ); // store for later calls
return nRet;
}
-BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell )
+sal_uInt8 ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell )
{
// if cell is not passed, take from document
@@ -165,7 +165,7 @@ BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*
// if script type is set, don't have to get number formats
- BYTE nStored = pCell->GetScriptType();
+ sal_uInt8 nStored = pCell->GetScriptType();
if ( nStored != SC_SCRIPTTYPE_UNKNOWN ) // stored value valid?
return nStored; // use stored value
@@ -177,7 +177,7 @@ BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*
if ( ((const SfxUInt32Item&)pPattern->GetItem(ATTR_CONDITIONAL)).GetValue() )
pCondSet = GetCondResult( nCol, nRow, nTab );
- ULONG nFormat = pPattern->GetNumberFormat( xPoolHelper->GetFormTable(), pCondSet );
+ sal_uLong nFormat = pPattern->GetNumberFormat( xPoolHelper->GetFormTable(), pCondSet );
return GetCellScriptType( pCell, nFormat );
}
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index d77dc1041d9c..b1084ddeecfd 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -63,8 +63,8 @@ extern const ScFormulaCell* pLastFormulaTreeTop; // cellform.cxx Err527 WorkA
// STATIC DATA -----------------------------------------------------------
#ifdef erDEBUG
-ULONG erCountBCAInserts = 0;
-ULONG erCountBCAFinds = 0;
+sal_uLong erCountBCAInserts = 0;
+sal_uLong erCountBCAFinds = 0;
#endif
// -----------------------------------------------------------------------
@@ -87,7 +87,7 @@ void ScDocument::EndListeningArea( const ScRange& rRange,
}
-void ScDocument::Broadcast( ULONG nHint, const ScAddress& rAddr,
+void ScDocument::Broadcast( sal_uLong nHint, const ScAddress& rAddr,
ScBaseCell* pCell
)
{
@@ -105,7 +105,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
if ( !nHardRecalcState )
{
ScBulkBroadcast aBulkBroadcast( pBASM); // scoped bulk broadcast
- BOOL bIsBroadcasted = FALSE;
+ sal_Bool bIsBroadcasted = sal_False;
ScBaseCell* pCell = rHint.GetCell();
if ( pCell )
{
@@ -113,7 +113,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
if ( pBC )
{
pBC->Broadcast( rHint );
- bIsBroadcasted = TRUE;
+ bIsBroadcasted = sal_True;
}
}
if ( pBASM->AreaBroadcast( rHint ) || bIsBroadcasted )
@@ -128,7 +128,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
{
SCTAB nTab = rHint.GetAddress().Tab();
if (pTab[nTab] && pTab[nTab]->IsStreamValid())
- pTab[nTab]->SetStreamValid(FALSE);
+ pTab[nTab]->SetStreamValid(sal_False);
}
}
@@ -252,7 +252,7 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell )
pEOFormulaTree = pPrev; // ist letzte Zelle
pCell->SetPrevious( 0 );
pCell->SetNext( 0 );
- USHORT nRPN = pCell->GetCode()->GetCodeLen();
+ sal_uInt16 nRPN = pCell->GetCode()->GetCodeLen();
if ( nFormulaCodeInTree >= nRPN )
nFormulaCodeInTree -= nRPN;
else
@@ -269,27 +269,27 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell )
}
-BOOL ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const
+sal_Bool ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const
{
return pCell->GetPrevious() || pFormulaTree == pCell;
}
-void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress )
+void ScDocument::CalcFormulaTree( sal_Bool bOnlyForced, sal_Bool bNoProgress )
{
DBG_ASSERT( !IsCalculatingFormulaTree(), "CalcFormulaTree recursion" );
// never ever recurse into this, might end up lost in infinity
if ( IsCalculatingFormulaTree() )
return ;
- bCalculatingFormulaTree = TRUE;
+ bCalculatingFormulaTree = sal_True;
- SetForcedFormulaPending( FALSE );
- BOOL bOldIdleDisabled = IsIdleDisabled();
- DisableIdle( TRUE );
- BOOL bOldAutoCalc = GetAutoCalc();
- //! _nicht_ SetAutoCalc( TRUE ) weil das evtl. CalcFormulaTree( TRUE )
+ SetForcedFormulaPending( sal_False );
+ sal_Bool bOldIdleDisabled = IsIdleDisabled();
+ DisableIdle( sal_True );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ //! _nicht_ SetAutoCalc( sal_True ) weil das evtl. CalcFormulaTree( sal_True )
//! aufruft, wenn vorher disabled war und bHasForcedFormulas gesetzt ist
- bAutoCalc = TRUE;
+ bAutoCalc = sal_True;
if ( nHardRecalcState )
CalcAll();
else
@@ -317,9 +317,9 @@ void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress )
}
}
}
- BOOL bProgress = !bOnlyForced && nFormulaCodeInTree && !bNoProgress;
+ sal_Bool bProgress = !bOnlyForced && nFormulaCodeInTree && !bNoProgress;
if ( bProgress )
- ScProgress::CreateInterpretProgress( this, TRUE );
+ ScProgress::CreateInterpretProgress( this, sal_True );
pCell = pFormulaTree;
ScFormulaCell* pLastNoGood = 0;
@@ -377,7 +377,7 @@ void ScDocument::CalcFormulaTree( BOOL bOnlyForced, BOOL bNoProgress )
}
bAutoCalc = bOldAutoCalc;
DisableIdle( bOldIdleDisabled );
- bCalculatingFormulaTree = FALSE;
+ bCalculatingFormulaTree = sal_False;
}
@@ -435,7 +435,7 @@ void ScDocument::RemoveFromFormulaTrack( ScFormulaCell* pCell )
}
-BOOL ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
+sal_Bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
{
return pCell->GetPreviousTrack() || pFormulaTrack == pCell;
}
@@ -447,7 +447,7 @@ BOOL ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const
Der nachfolgende broadcastet wieder usw.
View stoesst Interpret an.
*/
-void ScDocument::TrackFormulas( ULONG nHintId )
+void ScDocument::TrackFormulas( sal_uLong nHintId )
{
if ( pFormulaTrack )
@@ -474,24 +474,24 @@ void ScDocument::TrackFormulas( ULONG nHintId )
pTrack = pTrack->GetNextTrack();
} while ( pTrack );
pTrack = pFormulaTrack;
- BOOL bHaveForced = FALSE;
+ sal_Bool bHaveForced = sal_False;
do
{
pNext = pTrack->GetNextTrack();
RemoveFromFormulaTrack( pTrack );
PutInFormulaTree( pTrack );
if ( pTrack->GetCode()->IsRecalcModeForced() )
- bHaveForced = TRUE;
+ bHaveForced = sal_True;
pTrack = pNext;
} while ( pTrack );
if ( bHaveForced )
{
- SetForcedFormulas( TRUE );
+ SetForcedFormulas( sal_True );
if ( bAutoCalc && !IsAutoCalcShellDisabled() && !IsInInterpreter()
&& !IsCalculatingFormulaTree() )
- CalcFormulaTree( TRUE );
+ CalcFormulaTree( sal_True );
else
- SetForcedFormulaPending( TRUE );
+ SetForcedFormulaPending( sal_True );
}
}
DBG_ASSERT( nFormulaTrackCount==0, "TrackFormulas: nFormulaTrackCount!=0" );
@@ -509,7 +509,7 @@ void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz
)
{
- BOOL bExpandRefsOld = IsExpandRefs();
+ sal_Bool bExpandRefsOld = IsExpandRefs();
if ( eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0 || nDz > 0) )
SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() );
if ( pBASM )
@@ -517,16 +517,16 @@ void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
SetExpandRefs( bExpandRefsOld );
}
-void ScDocument::SetAutoCalc( BOOL bNewAutoCalc )
+void ScDocument::SetAutoCalc( sal_Bool bNewAutoCalc )
{
- BOOL bOld = bAutoCalc;
+ sal_Bool bOld = bAutoCalc;
bAutoCalc = bNewAutoCalc;
if ( !bOld && bNewAutoCalc && bHasForcedFormulas )
{
if ( IsAutoCalcShellDisabled() )
- SetForcedFormulaPending( TRUE );
+ SetForcedFormulaPending( sal_True );
else if ( !IsInInterpreter() )
- CalcFormulaTree( TRUE );
+ CalcFormulaTree( sal_True );
}
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 9eb4bad7466d..385939738d81 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -124,7 +124,7 @@ void ScDocument::ImplDeleteOptions()
//------------------------------------------------------------------------
-SfxPrinter* ScDocument::GetPrinter(BOOL bCreateIfNotExist)
+SfxPrinter* ScDocument::GetPrinter(sal_Bool bCreateIfNotExist)
{
if ( !pPrinter && bCreateIfNotExist )
{
@@ -137,7 +137,7 @@ SfxPrinter* ScDocument::GetPrinter(BOOL bCreateIfNotExist)
NULL );
::utl::MiscCfg aMisc;
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( aMisc.IsPaperOrientationWarning() )
nFlags |= SFX_PRINTER_CHG_ORIENTATION;
if ( aMisc.IsPaperSizeWarning() )
@@ -173,7 +173,7 @@ void ScDocument::SetPrinter( SfxPrinter* pNewPrinter )
pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
delete pOld;
}
- InvalidateTextWidth(NULL, NULL, FALSE); // in both cases
+ InvalidateTextWidth(NULL, NULL, sal_False); // in both cases
}
//------------------------------------------------------------------------
@@ -188,7 +188,7 @@ void ScDocument::SetPrintOptions()
::utl::MiscCfg aMisc;
SfxItemSet aOptSet( pPrinter->GetOptions() );
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( aMisc.IsPaperOrientationWarning() )
nFlags |= SFX_PRINTER_CHG_ORIENTATION;
if ( aMisc.IsPaperSizeWarning() )
@@ -240,11 +240,11 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
{
case SFX_STYLE_FAMILY_PAGE:
{
- const USHORT nOldScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
- const USHORT nOldScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nOldScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nOldScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
rSet.Put( rChanges );
- const USHORT nNewScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
- const USHORT nNewScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nNewScale = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nNewScaleToPages = GET_SCALEVALUE(rSet,ATTR_PAGE_SCALETOPAGES);
if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) )
InvalidateTextWidth( rStyleSheet.GetName() );
@@ -252,7 +252,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
if( SvtLanguageOptions().IsCTLFontEnabled() )
{
const SfxPoolItem *pItem = NULL;
- if( rChanges.GetItemState(ATTR_WRITINGDIR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if( rChanges.GetItemState(ATTR_WRITINGDIR, sal_True, &pItem ) == SFX_ITEM_SET )
ScChartHelper::DoUpdateAllCharts( this );
}
}
@@ -260,19 +260,19 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
case SFX_STYLE_FAMILY_PARA:
{
- BOOL bNumFormatChanged;
+ sal_Bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rSet, rChanges ) )
InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
for (SCTAB nTab=0; nTab<=MAXTAB; ++nTab)
if (pTab[nTab] && pTab[nTab]->IsStreamValid())
- pTab[nTab]->SetStreamValid( FALSE );
+ pTab[nTab]->SetStreamValid( sal_False );
- ULONG nOldFormat =
+ sal_uLong nOldFormat =
((const SfxUInt32Item*)&rSet.Get(
ATTR_VALUE_FORMAT ))->GetValue();
- ULONG nNewFormat =
+ sal_uLong nNewFormat =
((const SfxUInt32Item*)&rChanges.Get(
ATTR_VALUE_FORMAT ))->GetValue();
LanguageType eNewLang, eOldLang;
@@ -289,10 +289,10 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
// Dontcare - Default setzen
// Default - keine Aenderung
// ("keine Aenderung" geht nicht mit PutExtended, darum Schleife)
- for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
+ for (sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
{
const SfxPoolItem* pItem;
- SfxItemState eState = rChanges.GetItemState( nWhich, FALSE, &pItem );
+ SfxItemState eState = rChanges.GetItemState( nWhich, sal_False, &pItem );
if ( eState == SFX_ITEM_SET )
rSet.Put( *pItem );
else if ( eState == SFX_ITEM_DONTCARE )
@@ -337,14 +337,14 @@ void ScDocument::InvalidateTextWidth( SCTAB nTab )
{
ScAddress aAdrFrom( 0, 0, nTab );
ScAddress aAdrTo ( MAXCOL, MAXROW, nTab );
- InvalidateTextWidth( &aAdrFrom, &aAdrTo, FALSE );
+ InvalidateTextWidth( &aAdrFrom, &aAdrTo, sal_False );
}
//------------------------------------------------------------------------
-BOOL ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab )
+sal_Bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab )
{
- BOOL bInUse = FALSE;
+ sal_Bool bInUse = sal_False;
const SCTAB nCount = GetTableCount();
SCTAB i;
@@ -359,30 +359,30 @@ BOOL ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab )
//------------------------------------------------------------------------
-BOOL ScDocument::RemovePageStyleInUse( const String& rStyle )
+sal_Bool ScDocument::RemovePageStyleInUse( const String& rStyle )
{
- BOOL bWasInUse = FALSE;
+ sal_Bool bWasInUse = sal_False;
const SCTAB nCount = GetTableCount();
for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
if ( pTab[i]->GetPageStyle() == rStyle )
{
- bWasInUse = TRUE;
+ bWasInUse = sal_True;
pTab[i]->SetPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
}
return bWasInUse;
}
-BOOL ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew )
+sal_Bool ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew )
{
- BOOL bWasInUse = FALSE;
+ sal_Bool bWasInUse = sal_False;
const SCTAB nCount = GetTableCount();
for ( SCTAB i=0; i<nCount && pTab[i]; i++ )
if ( pTab[i]->GetPageStyle() == rOld )
{
- bWasInUse = TRUE;
+ bWasInUse = sal_True;
pTab[i]->SetPageStyle( rNew );
}
@@ -391,7 +391,7 @@ BOOL ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew )
//------------------------------------------------------------------------
-BYTE ScDocument::GetEditTextDirection(SCTAB nTab) const
+sal_uInt8 ScDocument::GetEditTextDirection(SCTAB nTab) const
{
EEHorizontalTextDirection eRet = EE_HTEXTDIR_DEFAULT;
@@ -410,15 +410,15 @@ BYTE ScDocument::GetEditTextDirection(SCTAB nTab) const
// else (invalid for EditEngine): keep "default"
}
- return sal::static_int_cast<BYTE>(eRet);
+ return sal::static_int_cast<sal_uInt8>(eRet);
}
//------------------------------------------------------------------------
void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
- BOOL bNumFormatChanged )
+ sal_Bool bNumFormatChanged )
{
- BOOL bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard());
+ sal_Bool bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard());
if ( pAdrFrom && !pAdrTo )
{
const SCTAB nTab = pAdrFrom->Tab();
@@ -442,17 +442,17 @@ void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress
#define CALCMAX 1000 // Berechnungen
#define ABORT_EVENTS (INPUT_ANY & ~INPUT_TIMER & ~INPUT_OTHER)
-BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder versuchen
+sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wieder versuchen
{
// #i75610# if a printer hasn't been set or created yet, don't create one for this
- if ( bIdleDisabled || IsInLinkUpdate() || GetPrinter(FALSE) == NULL )
- return FALSE;
- bIdleDisabled = TRUE;
+ if ( bIdleDisabled || IsInLinkUpdate() || GetPrinter(sal_False) == NULL )
+ return sal_False;
+ bIdleDisabled = sal_True;
-// ULONG nMs = 0;
-// USHORT nIter = 0;
+// sal_uLong nMs = 0;
+// sal_uInt16 nIter = 0;
- const ULONG nStart = Time::GetSystemTicks();
+ const sal_uLong nStart = Time::GetSystemTicks();
double nPPTX = 0.0;
double nPPTY = 0.0;
OutputDevice* pDev = NULL;
@@ -465,9 +465,9 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
SCTAB nTab = aCurTextWidthCalcPos.Tab();
SCROW nRow = aCurTextWidthCalcPos.Row();
SCsCOL nCol = aCurTextWidthCalcPos.Col();
- USHORT nRestart = 0;
- USHORT nZoom = 0;
- BOOL bNeedMore= FALSE;
+ sal_uInt16 nRestart = 0;
+ sal_uInt16 nZoom = 0;
+ sal_Bool bNeedMore= sal_False;
if ( !ValidRow(nRow) )
nRow = 0, nCol--;
@@ -483,7 +483,7 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
// Query-Box aufgemacht wird !!!
ScStyleSheetPool* pStylePool = xPoolHelper->GetStylePool();
- USHORT nOldMask = pStylePool->GetSearchMask();
+ sal_uInt16 nOldMask = pStylePool->GetSearchMask();
SfxStyleFamily eOldFam = pStylePool->GetSearchFamily();
pTable = pTab[nTab];
@@ -493,10 +493,10 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
DBG_ASSERT( pStyle, "Missing StyleSheet :-/" );
- BOOL bProgress = FALSE;
+ sal_Bool bProgress = sal_False;
if ( pStyle && 0 == GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALETOPAGES) )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
nZoom = GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALE);
Fraction aZoomFract( nZoom, 100 );
@@ -522,28 +522,28 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
if ( !bProgress && pCell->GetCellType() == CELLTYPE_FORMULA
&& ((ScFormulaCell*)pCell)->GetDirty() )
{
- ScProgress::CreateInterpretProgress( this, FALSE );
- bProgress = TRUE;
+ ScProgress::CreateInterpretProgress( this, sal_False );
+ bProgress = sal_True;
}
// DBG_ERROR( String("t,c,r = ") + String(nTab) + String(',') + String(nCol) + String(',') + String(nRow) );
// DBG_ERROR( String("nOldWidth = ") + String(pCell->GetTextWidth()) );
- USHORT nNewWidth = (USHORT)GetNeededSize( nCol, nRow, nTab,
+ sal_uInt16 nNewWidth = (sal_uInt16)GetNeededSize( nCol, nRow, nTab,
pDev, nPPTX, nPPTY,
- aZoomFract,aZoomFract, TRUE,
- TRUE ); // bTotalSize
+ aZoomFract,aZoomFract, sal_True,
+ sal_True ); // bTotalSize
// DBG_ERROR( String("nNewWidth = ") + String(nNewWidth) );
pCell->SetTextWidth( nNewWidth );
- bNeedMore = TRUE;
+ bNeedMore = sal_True;
}
}
else
{
- BOOL bNewTab = FALSE;
+ sal_Bool bNewTab = sal_False;
nRow = 0;
nCol--;
@@ -552,14 +552,14 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
{
nCol = MAXCOL;
nTab++;
- bNewTab = TRUE;
+ bNewTab = sal_True;
}
if ( !ValidTab(nTab) || !pTab[nTab] )
{
nTab = 0;
nRestart++;
- bNewTab = TRUE;
+ bNewTab = sal_True;
}
if ( nRestart < 2 )
@@ -631,7 +631,7 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
// DBG_ERROR( String(nMs) + String(" ms (") + String(nIter) + String(')') );
pStylePool->SetSearchMask( eOldFam, nOldMask );
- bIdleDisabled = FALSE;
+ bIdleDisabled = sal_False;
return bNeedMore;
}
@@ -641,18 +641,18 @@ BOOL ScDocument::IdleCalcTextWidth() // TRUE = demnaechst wieder vers
class ScSpellStatus
{
public:
- BOOL bModified;
+ sal_Bool bModified;
- ScSpellStatus() : bModified(FALSE) {};
+ ScSpellStatus() : bModified(sal_False) {};
DECL_LINK (EventHdl, EditStatus*);
};
IMPL_LINK( ScSpellStatus, EventHdl, EditStatus *, pStatus )
{
- ULONG nStatus = pStatus->GetStatusWord();
+ sal_uLong nStatus = pStatus->GetStatusWord();
if ( nStatus & EE_STAT_WRONGWORDCHANGED )
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -668,16 +668,16 @@ IMPL_LINK( ScSpellStatus, EventHdl, EditStatus *, pStatus )
#define SPELL_MAXTEST_ALL 3
#define SPELL_MAXCELLS 256
-BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos,
- USHORT nMaxTest )
+sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos,
+ sal_uInt16 nMaxTest )
{
ScEditEngineDefaulter* pEngine = NULL; //! am Dokument speichern
SfxItemSet* pDefaults = NULL;
ScSpellStatus aStatus;
- USHORT nCellCount = 0; // Zellen insgesamt
- USHORT nTestCount = 0; // Aufrufe Spelling
- BOOL bChanged = FALSE; // Aenderungen?
+ sal_uInt16 nCellCount = 0; // Zellen insgesamt
+ sal_uInt16 nTestCount = 0; // Aufrufe Spelling
+ sal_Bool bChanged = sal_False; // Aenderungen?
SCCOL nCol = rSpellRange.aStart.Col(); // iterator always starts on the left edge
SCROW nRow = rSpellPos.Row();
@@ -689,7 +689,7 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
if ( !pTab[nTab] )
{
// may happen for visible range
- return FALSE;
+ return sal_False;
}
}
ScHorizontalCellIterator aIter( this, nTab,
@@ -729,9 +729,9 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
pPattern->FillEditItemSet( pDefaults );
- pEngine->SetDefaults( pDefaults, FALSE ); //! noetig ?
+ pEngine->SetDefaults( pDefaults, sal_False ); //! noetig ?
- USHORT nCellLang = ((const SvxLanguageItem&)
+ sal_uInt16 nCellLang = ((const SvxLanguageItem&)
pPattern->GetItem(ATTR_FONT_LANGUAGE)).GetValue();
if ( nCellLang == LANGUAGE_SYSTEM )
nCellLang = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling
@@ -746,11 +746,11 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
else
pEngine->SetText( *((ScEditCell*)pCell)->GetData() );
- aStatus.bModified = FALSE;
+ aStatus.bModified = sal_False;
pEngine->CompleteOnlineSpelling();
if ( aStatus.bModified ) // Fehler dazu oder weggekommen?
{
- BOOL bNeedEdit = TRUE; // Test auf einfachen Text
+ sal_Bool bNeedEdit = sal_True; // Test auf einfachen Text
if ( !pEngine->HasOnlineSpellErrors() )
{
ScEditAttrTester aTester( pEngine );
@@ -777,11 +777,11 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
// #47751# Seitenvorschau ist davon nicht betroffen
// (sollte jedenfalls nicht)
ScPaintHint aHint( ScRange( nCol, nRow, nTab ), PAINT_GRID );
- aHint.SetPrintFlag( FALSE );
+ aHint.SetPrintFlag( sal_False );
pShell->Broadcast( aHint );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( ++nTestCount >= nMaxTest ) // checked enough text?
@@ -823,24 +823,24 @@ BOOL ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
}
-BOOL ScDocument::ContinueOnlineSpelling()
+sal_Bool ScDocument::ContinueOnlineSpelling()
{
if ( bIdleDisabled || !pDocOptions->IsAutoSpell() || (pShell && pShell->IsReadOnly()) )
- return FALSE;
+ return sal_False;
// #i48433# set bInsertingFromOtherDoc flag so there are no broadcasts when PutCell is called
// (same behavior as in RemoveAutoSpellObj: just transfer the broadcaster)
- BOOL bOldInserting = IsInsertingFromOtherDoc();
- SetInsertingFromOtherDoc( TRUE );
+ sal_Bool bOldInserting = IsInsertingFromOtherDoc();
+ SetInsertingFromOtherDoc( sal_True );
//! use one EditEngine for both calls
// #41504# first check visible range
- BOOL bResult = OnlineSpellInRange( aVisSpellRange, aVisSpellPos, SPELL_MAXTEST_VIS );
+ sal_Bool bResult = OnlineSpellInRange( aVisSpellRange, aVisSpellPos, SPELL_MAXTEST_VIS );
// during first pass through visible range, always continue
if ( nVisSpellState == VSPL_START )
- bResult = TRUE;
+ bResult = sal_True;
if (bResult)
{
@@ -869,13 +869,13 @@ void ScDocument::SetOnlineSpellPos( const ScAddress& rPos )
aOnlineSpellPos = aVisSpellRange.aEnd;
}
-BOOL ScDocument::SetVisibleSpellRange( const ScRange& rNewRange )
+sal_Bool ScDocument::SetVisibleSpellRange( const ScRange& rNewRange )
{
- BOOL bChange = ( aVisSpellRange != rNewRange );
+ sal_Bool bChange = ( aVisSpellRange != rNewRange );
if (bChange)
{
// continue spelling through visible range when scrolling down
- BOOL bContDown = ( nVisSpellState == VSPL_START && rNewRange.In( aVisSpellPos ) &&
+ sal_Bool bContDown = ( nVisSpellState == VSPL_START && rNewRange.In( aVisSpellPos ) &&
rNewRange.aStart.Row() > aVisSpellRange.aStart.Row() &&
rNewRange.aStart.Col() == aVisSpellRange.aStart.Col() &&
rNewRange.aEnd.Col() == aVisSpellRange.aEnd.Col() );
@@ -915,15 +915,15 @@ void ScDocument::RepaintRange( const ScRange& rRange )
//------------------------------------------------------------------------
-BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuchen
+sal_Bool ScDocument::IdleCheckLinks() // sal_True = demnaechst wieder versuchen
{
- BOOL bAnyLeft = FALSE;
+ sal_Bool bAnyLeft = sal_False;
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -933,7 +933,7 @@ BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuche
{
pDdeLink->TryUpdate();
if (pDdeLink->NeedsUpdate()) // war nix?
- bAnyLeft = TRUE;
+ bAnyLeft = sal_True;
}
}
}
@@ -945,15 +945,15 @@ BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuche
void ScDocument::SaveDdeLinks(SvStream& rStream) const
{
// bei 4.0-Export alle mit Modus != DEFAULT weglassen
- BOOL bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 );
+ sal_Bool bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 );
const ::sfx2::SvBaseLinks& rLinks = GetLinkManager()->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
// erstmal zaehlen...
- USHORT nDdeCount = 0;
- USHORT i;
+ sal_uInt16 nDdeCount = 0;
+ sal_uInt16 i;
for (i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
@@ -986,9 +986,9 @@ void ScDocument::LoadDdeLinks(SvStream& rStream)
ScMultipleReadHeader aHdr( rStream );
GetLinkManager();
- USHORT nCount;
+ sal_uInt16 nCount;
rStream >> nCount;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScDdeLink* pLink = new ScDdeLink( this, rStream, aHdr );
pLinkManager->InsertDDELink( pLink,
@@ -996,21 +996,21 @@ void ScDocument::LoadDdeLinks(SvStream& rStream)
}
}
-BOOL ScDocument::HasDdeLinks() const
+sal_Bool ScDocument::HasDdeLinks() const
{
if (GetLinkManager()) // Clipboard z.B. hat keinen LinkManager
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*rLinks[i])->ISA(ScDdeLink))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void ScDocument::SetInLinkUpdate(BOOL bSet)
+void ScDocument::SetInLinkUpdate(sal_Bool bSet)
{
// called from TableLink and AreaLink
@@ -1018,7 +1018,7 @@ void ScDocument::SetInLinkUpdate(BOOL bSet)
bInLinkUpdate = bSet;
}
-BOOL ScDocument::IsInLinkUpdate() const
+sal_Bool ScDocument::IsInLinkUpdate() const
{
return bInLinkUpdate || IsInDdeLinkUpdate();
}
@@ -1029,10 +1029,10 @@ void ScDocument::UpdateExternalRefLinks()
return;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
bool bAny = false;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
ScExternalRefLink* pRefLink = dynamic_cast<ScExternalRefLink*>(pBase);
@@ -1051,7 +1051,7 @@ void ScDocument::UpdateExternalRefLinks()
// #i101960# set document modified, as in TrackTimeHdl for DDE links
if (!pShell->IsModified())
{
- pShell->SetModified( TRUE );
+ pShell->SetModified( sal_True );
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
{
@@ -1067,19 +1067,19 @@ void ScDocument::UpdateDdeLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- USHORT i;
+ sal_uInt16 nCount = rLinks.Count();
+ sal_uInt16 i;
// #49226# falls das Updaten laenger dauert, erstmal alle Werte
// zuruecksetzen, damit nichts altes (falsches) stehen bleibt
- BOOL bAny = FALSE;
+ sal_Bool bAny = sal_False;
for (i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
{
((ScDdeLink*)pBase)->ResetValue();
- bAny = TRUE;
+ bAny = sal_True;
}
}
if (bAny)
@@ -1103,18 +1103,18 @@ void ScDocument::UpdateDdeLinks()
}
}
-BOOL ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem )
+sal_Bool ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem )
{
// fuer refresh() per StarOne Api
// ResetValue() fuer einzelnen Link nicht noetig
//! wenn's mal alles asynchron wird, aber auch hier
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -1125,7 +1125,7 @@ BOOL ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const
pDdeLink->GetItem() == rItem )
{
pDdeLink->TryUpdate();
- bFound = TRUE; // koennen theoretisch mehrere sein (Mode), darum weitersuchen
+ bFound = sal_True; // koennen theoretisch mehrere sein (Mode), darum weitersuchen
}
}
}
@@ -1138,8 +1138,8 @@ void ScDocument::DisconnectDdeLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -1161,8 +1161,8 @@ void ScDocument::CopyDdeLinks( ScDocument* pDestDoc ) const
else if (GetLinkManager()) // Links direkt kopieren
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScDdeLink))
@@ -1176,14 +1176,14 @@ void ScDocument::CopyDdeLinks( ScDocument* pDestDoc ) const
}
}
-USHORT ScDocument::GetDdeLinkCount() const
+sal_uInt16 ScDocument::GetDdeLinkCount() const
{
- USHORT nDdeCount = 0;
+ sal_uInt16 nDdeCount = 0;
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*rLinks[i])->ISA(ScDdeLink))
++nDdeCount;
}
@@ -1200,15 +1200,15 @@ namespace {
@return The DDE link, if it exists, otherwise 0. */
ScDdeLink* lclGetDdeLink(
const sfx2::LinkManager* pLinkManager,
- const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode,
- USHORT* pnDdePos = NULL )
+ const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode,
+ sal_uInt16* pnDdePos = NULL )
{
if( pLinkManager )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
+ sal_uInt16 nCount = rLinks.Count();
if( pnDdePos ) *pnDdePos = 0;
- for( USHORT nIndex = 0; nIndex < nCount; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < nCount; ++nIndex )
{
::sfx2::SvBaseLink* pLink = *rLinks[ nIndex ];
if( ScDdeLink* pDdeLink = PTR_CAST( ScDdeLink, pLink ) )
@@ -1228,14 +1228,14 @@ ScDdeLink* lclGetDdeLink(
/** Returns a pointer to the specified DDE link.
@param nDdePos Index of the DDE link (does not include other links from link manager).
@return The DDE link, if it exists, otherwise 0. */
-ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, USHORT nDdePos )
+ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, sal_uInt16 nDdePos )
{
if( pLinkManager )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- USHORT nDdeIndex = 0; // counts only the DDE links
- for( USHORT nIndex = 0; nIndex < nCount; ++nIndex )
+ sal_uInt16 nCount = rLinks.Count();
+ sal_uInt16 nDdeIndex = 0; // counts only the DDE links
+ for( sal_uInt16 nIndex = 0; nIndex < nCount; ++nIndex )
{
::sfx2::SvBaseLink* pLink = *rLinks[ nIndex ];
if( ScDdeLink* pDdeLink = PTR_CAST( ScDdeLink, pLink ) )
@@ -1253,12 +1253,12 @@ ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, USHORT nDdePos
// ----------------------------------------------------------------------------
-bool ScDocument::FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, USHORT& rnDdePos )
+bool ScDocument::FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, sal_uInt16& rnDdePos )
{
return lclGetDdeLink( GetLinkManager(), rAppl, rTopic, rItem, nMode, &rnDdePos ) != NULL;
}
-bool ScDocument::GetDdeLinkData( USHORT nDdePos, String& rAppl, String& rTopic, String& rItem ) const
+bool ScDocument::GetDdeLinkData( sal_uInt16 nDdePos, String& rAppl, String& rTopic, String& rItem ) const
{
if( const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
{
@@ -1270,7 +1270,7 @@ bool ScDocument::GetDdeLinkData( USHORT nDdePos, String& rAppl, String& rTopic,
return false;
}
-bool ScDocument::GetDdeLinkMode( USHORT nDdePos, BYTE& rnMode ) const
+bool ScDocument::GetDdeLinkMode( sal_uInt16 nDdePos, sal_uInt8& rnMode ) const
{
if( const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
{
@@ -1280,13 +1280,13 @@ bool ScDocument::GetDdeLinkMode( USHORT nDdePos, BYTE& rnMode ) const
return false;
}
-const ScMatrix* ScDocument::GetDdeLinkResultMatrix( USHORT nDdePos ) const
+const ScMatrix* ScDocument::GetDdeLinkResultMatrix( sal_uInt16 nDdePos ) const
{
const ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos );
return pDdeLink ? pDdeLink->GetResult() : NULL;
}
-bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, ScMatrix* pResults )
+bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, sal_uInt8 nMode, ScMatrix* pResults )
{
/* Create a DDE link without updating it (i.e. for Excel import), to prevent
unwanted connections. First try to find existing link. Set result array
@@ -1312,7 +1312,7 @@ bool ScDocument::CreateDdeLink( const String& rAppl, const String& rTopic, const
return false;
}
-bool ScDocument::SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrix* pResults )
+bool ScDocument::SetDdeLinkResultMatrix( sal_uInt16 nDdePos, ScMatrix* pResults )
{
if( ScDdeLink* pDdeLink = lclGetDdeLink( GetLinkManager(), nDdePos ) )
{
@@ -1324,18 +1324,18 @@ bool ScDocument::SetDdeLinkResultMatrix( USHORT nDdePos, ScMatrix* pResults )
//------------------------------------------------------------------------
-BOOL ScDocument::HasAreaLinks() const
+sal_Bool ScDocument::HasAreaLinks() const
{
if (GetLinkManager()) // Clipboard z.B. hat keinen LinkManager
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*rLinks[i])->ISA(ScAreaLink))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void ScDocument::UpdateAreaLinks()
@@ -1343,8 +1343,8 @@ void ScDocument::UpdateAreaLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1358,7 +1358,7 @@ void ScDocument::DeleteAreaLinksOnTab( SCTAB nTab )
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < rLinks.Count() )
{
const ::sfx2::SvBaseLink* pBase = *rLinks[nPos];
@@ -1379,8 +1379,8 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
bool bAnyUpdate = false;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1414,7 +1414,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
// If several links start at the same cell, the one with the lower index is removed
// (file format specifies only one link definition for a cell).
- USHORT nFirstIndex = 0;
+ sal_uInt16 nFirstIndex = 0;
while ( nFirstIndex < nCount )
{
bool bFound = false;
@@ -1422,7 +1422,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
if ( pFirst->ISA(ScAreaLink) )
{
ScAddress aFirstPos = static_cast<ScAreaLink*>(pFirst)->GetDestArea().aStart;
- for ( USHORT nSecondIndex = nFirstIndex + 1; nSecondIndex < nCount && !bFound; ++nSecondIndex )
+ for ( sal_uInt16 nSecondIndex = nFirstIndex + 1; nSecondIndex < nCount && !bFound; ++nSecondIndex )
{
::sfx2::SvBaseLink* pSecond = *rLinks[nSecondIndex];
if ( pSecond->ISA(ScAreaLink) &&
@@ -1455,12 +1455,12 @@ void ScDocument::KeyInput( const KeyEvent& )
// ----------------------------------------------------------------------------
-BOOL ScDocument::CheckMacroWarn()
+sal_Bool ScDocument::CheckMacroWarn()
{
// The check for macro configuration, macro warning and disabling is now handled
// in SfxObjectShell::AdjustMacroMode, called by SfxObjectShell::CallBasic.
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -1491,23 +1491,23 @@ SfxBindings* ScDocument::GetViewBindings()
void lcl_TransliterateEditEngine( ScEditEngineDefaulter& rEngine,
utl::TransliterationWrapper& rTranslitarationWrapper,
- BOOL bConsiderLanguage, ScDocument* pDoc )
+ sal_Bool bConsiderLanguage, ScDocument* pDoc )
{
//! should use TransliterateText method of EditEngine instead, when available!
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
- USHORT nParCount = rEngine.GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
SvUShorts aPortions;
- rEngine.GetPortions( (USHORT)nPar, aPortions );
+ rEngine.GetPortions( (sal_uInt16)nPar, aPortions );
- for ( USHORT nPos = aPortions.Count(); nPos; )
+ for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
{
--nPos;
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
ESelection aSel( nPar, nStart, nPar, nEnd );
String aOldStr = rEngine.GetText( aSel );
@@ -1517,8 +1517,8 @@ void lcl_TransliterateEditEngine( ScEditEngineDefaulter& rEngine,
{
if ( bConsiderLanguage )
{
- BYTE nScript = pDoc->GetStringScriptType( aOldStr );
- USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_LANGUAGE_CJK :
+ sal_uInt8 nScript = pDoc->GetStringScriptType( aOldStr );
+ sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_LANGUAGE_CJK :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? EE_CHAR_LANGUAGE_CTL :
EE_CHAR_LANGUAGE );
nLanguage = ((const SvxLanguageItem&)aAttr.Get(nWhich)).GetValue();
@@ -1545,7 +1545,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
DBG_ASSERT( rMultiMark.IsMultiMarked(), "TransliterateText: no selection" );
utl::TransliterationWrapper aTranslitarationWrapper( xServiceManager, nType );
- BOOL bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode();
+ sal_Bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode();
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
ScEditEngineDefaulter* pEngine = NULL; // not using pEditEngine member because of defaults
@@ -1557,7 +1557,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
SCCOL nCol = 0;
SCROW nRow = 0;
- BOOL bFound = rMultiMark.IsCellMarked( nCol, nRow );
+ sal_Bool bFound = rMultiMark.IsCellMarked( nCol, nRow );
if (!bFound)
bFound = GetNextMarkedCell( nCol, nRow, nTab, rMultiMark );
@@ -1574,8 +1574,8 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
if ( bConsiderLanguage )
{
- BYTE nScript = GetStringScriptType( aOldStr ); //! cell script type?
- USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
+ sal_uInt8 nScript = GetStringScriptType( aOldStr ); //! cell script type?
+ sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE :
( ( nScript == SCRIPTTYPE_COMPLEX ) ? ATTR_CTL_FONT_LANGUAGE :
ATTR_FONT_LANGUAGE );
nLanguage = ((const SvxLanguageItem*)GetAttr( nCol, nRow, nTab, nWhich ))->GetValue();
@@ -1596,7 +1596,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
SfxItemSet* pDefaults = new SfxItemSet( pEngine->GetEmptyItemSet() );
pPattern->FillEditItemSet( pDefaults );
- pEngine->SetDefaults( pDefaults, TRUE );
+ pEngine->SetDefaults( pDefaults, sal_True );
const EditTextObject* pData = ((const ScEditCell*)pCell)->GetData();
pEngine->SetText( *pData );
@@ -1612,7 +1612,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
{
// remove defaults (paragraph attributes) before creating text object
SfxItemSet* pEmpty = new SfxItemSet( pEngine->GetEmptyItemSet() );
- pEngine->SetDefaults( pEmpty, TRUE );
+ pEngine->SetDefaults( pEmpty, sal_True );
EditTextObject* pNewData = pEngine->CreateTextObject();
PutCell( nCol, nRow, nTab,
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 37b3c830bb30..534c2333bd9b 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -170,8 +170,8 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
pTab[nTab]->SetDrawPageSize(false,false); // #54782# set the right size immediately
#if 0
- ULONG nx = (ULONG) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
- ULONG ny = (ULONG) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
+ sal_uLong nx = (sal_uLong) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
+ sal_uLong ny = (sal_uLong) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
pDrawLayer->SetPageSize( nTab, Size( nx, ny ) );
#endif
}
@@ -183,7 +183,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
UpdateDrawDefaults();
UpdateDrawLanguages();
if (bImportingXML)
- pDrawLayer->EnableAdjust(FALSE);
+ pDrawLayer->EnableAdjust(sal_False);
pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
pDrawLayer->SetCharCompressType( GetAsianCompression() );
@@ -209,7 +209,7 @@ void ScDocument::UpdateDrawDefaults()
if ( pDrawLayer && bSetDrawDefaults )
{
SfxItemPool& rDrawPool = pDrawLayer->GetItemPool();
- rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
}
}
@@ -238,11 +238,11 @@ sal_Bool ScDocument::IsChart( const SdrObject* pObject )
return sal_False;
}
-IMPL_LINK_INLINE_START( ScDocument, GetUserDefinedColor, USHORT *, pColorIndex )
+IMPL_LINK_INLINE_START( ScDocument, GetUserDefinedColor, sal_uInt16 *, pColorIndex )
{
return (long) &((GetColorTable()->GetColor(*pColorIndex))->GetColor());
}
-IMPL_LINK_INLINE_END( ScDocument, GetUserDefinedColor, USHORT *, pColorIndex )
+IMPL_LINK_INLINE_END( ScDocument, GetUserDefinedColor, sal_uInt16 *, pColorIndex )
void ScDocument::DeleteDrawLayer()
{
@@ -254,20 +254,20 @@ void ScDocument::DeleteColorTable()
delete pColorTable;
}
-BOOL ScDocument::DrawGetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const
+sal_Bool ScDocument::DrawGetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const
{
return pDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer );
}
-void ScDocument::DrawMovePage( USHORT nOldPos, USHORT nNewPos )
+void ScDocument::DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
pDrawLayer->ScMovePage(nOldPos,nNewPos);
}
-void ScDocument::DrawCopyPage( USHORT nOldPos, USHORT nNewPos )
+void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
// angelegt wird die Page schon im ScTable ctor
- pDrawLayer->ScCopyPage( nOldPos, nNewPos, FALSE );
+ pDrawLayer->ScCopyPage( nOldPos, nNewPos, sal_False );
}
void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
@@ -290,12 +290,12 @@ void ScDocument::DeleteObjectsInSelection( const ScMarkData& rMark )
pDrawLayer->DeleteObjectsInSelection( rMark );
}
-BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark )
+sal_Bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark )
{
// pTabMark is used only for selected tables. If pTabMark is 0, all tables of rRange are used.
if (!pDrawLayer)
- return FALSE;
+ return sal_False;
SCTAB nStartTab = 0;
SCTAB nEndTab = MAXTAB;
@@ -322,7 +322,7 @@ BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p
{
if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
aMMRect.IsInside( pObject->GetCurrentBoundRect() ) )
- return TRUE;
+ return sal_True;
pObject = aIter.Next();
}
@@ -330,7 +330,7 @@ BOOL ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p
}
}
- return FALSE;
+ return sal_False;
}
@@ -365,7 +365,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin )
//UNUSED2008-05 if (!pDrawLayer)
//UNUSED2008-05 return;
//UNUSED2008-05
-//UNUSED2008-05 BOOL bAnyIntObj = FALSE;
+//UNUSED2008-05 sal_Bool bAnyIntObj = sal_False;
//UNUSED2008-05 SCTAB nTab;
//UNUSED2008-05 ScPostIt aNote(this);
//UNUSED2008-05 for (nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++)
@@ -380,7 +380,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin )
//UNUSED2008-05 {
//UNUSED2008-05 if ( pObject->GetLayer() == SC_LAYER_INTERN )
//UNUSED2008-05 {
-//UNUSED2008-05 bAnyIntObj = TRUE; // for all internal objects, including detective
+//UNUSED2008-05 bAnyIntObj = sal_True; // for all internal objects, including detective
//UNUSED2008-05
//UNUSED2008-05 if ( pObject->ISA( SdrCaptionObj ) )
//UNUSED2008-05 {
@@ -390,7 +390,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin )
//UNUSED2008-05 if ( GetNote( pData->aStt.Col(), pData->aStt.Row(), nTab, aNote))
//UNUSED2008-05 if ( !aNote.IsShown() )
//UNUSED2008-05 {
-//UNUSED2008-05 aNote.SetShown(TRUE);
+//UNUSED2008-05 aNote.SetShown(sal_True);
//UNUSED2008-05 SetNote( pData->aStt.Col(), pData->aStt.Row(), nTab, aNote);
//UNUSED2008-05 }
//UNUSED2008-05 }
@@ -412,7 +412,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin )
//UNUSED2008-05 }
//UNUSED2008-05 }
-BOOL ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect )
+sal_Bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect )
{
// Gibt es Objekte auf dem Hintergrund-Layer, die (teilweise) von rMMRect
// betroffen sind?
@@ -420,47 +420,47 @@ BOOL ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect )
// zu werden)
if (!pDrawLayer)
- return FALSE;
+ return sal_False;
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
if (!pPage)
- return FALSE;
+ return sal_False;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().IsOver( rMMRect ) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
return bFound;
}
-BOOL ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect )
+sal_Bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect )
{
// Gibt es ueberhaupt Objekte, die (teilweise) von rMMRect
// betroffen sind?
// (um leere Seiten beim Drucken zu erkennen)
if (!pDrawLayer)
- return FALSE;
+ return sal_False;
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
if (!pPage)
- return FALSE;
+ return sal_False;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
{
if ( pObject->GetCurrentBoundRect().IsOver( rMMRect ) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
@@ -512,12 +512,12 @@ SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos )
return pFound;
}
-BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, BOOL bLeftIsEmpty,
+sal_Bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, sal_Bool bLeftIsEmpty,
ScRange* pLastRange, Rectangle* pLastMM ) const
{
if (!IsBlockEmpty( nTab, nStartCol, nStartRow, nEndCol, nEndRow ))
- return FALSE;
+ return sal_False;
ScDocument* pThis = (ScDocument*)this; //! GetMMRect / HasAnyDraw etc. const !!!
@@ -549,7 +549,7 @@ BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
}
if ( pThis->HasAnyDraw( nTab, aMMRect ))
- return FALSE;
+ return sal_False;
if ( nStartCol > 0 && !bLeftIsEmpty )
{
@@ -560,16 +560,16 @@ BOOL ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCROW nTmpRow = nEndRow;
pThis->ExtendMerge( 0,nStartRow, nExtendCol,nTmpRow, nTab,
- FALSE, TRUE ); // kein Refresh, incl. Attrs
+ sal_False, sal_True ); // kein Refresh, incl. Attrs
OutputDevice* pDev = pThis->GetPrinter();
pDev->SetMapMode( MAP_PIXEL ); // wichtig fuer GetNeededSize
pThis->ExtendPrintArea( pDev, nTab, 0, nStartRow, nExtendCol, nEndRow );
if ( nExtendCol >= nStartCol )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScDocument::Clear( sal_Bool bFromDestructor )
@@ -591,9 +591,9 @@ void ScDocument::Clear( sal_Bool bFromDestructor )
}
}
-BOOL ScDocument::HasControl( SCTAB nTab, const Rectangle& rMMRect )
+sal_Bool ScDocument::HasControl( SCTAB nTab, const Rectangle& rMMRect )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (pDrawLayer)
{
@@ -609,7 +609,7 @@ BOOL ScDocument::HasControl( SCTAB nTab, const Rectangle& rMMRect )
{
Rectangle aObjRect = pObject->GetLogicRect();
if ( aObjRect.IsOver( rMMRect ) )
- bFound = TRUE;
+ bFound = sal_True;
}
pObject = aIter.Next();
@@ -652,12 +652,12 @@ void ScDocument::InvalidateControls( Window* pWin, SCTAB nTab, const Rectangle&
}
}
-BOOL ScDocument::HasDetectiveObjects(SCTAB nTab) const
+sal_Bool ScDocument::HasDetectiveObjects(SCTAB nTab) const
{
// looks for detective objects, annotations don't count
// (used to adjust scale so detective objects hit their cells better)
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (pDrawLayer)
{
@@ -671,7 +671,7 @@ BOOL ScDocument::HasDetectiveObjects(SCTAB nTab) const
{
// anything on the internal layer except captions (annotations)
if ( (pObject->GetLayer() == SC_LAYER_INTERN) && !ScDrawLayer::IsNoteCaption( pObject ) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
@@ -689,7 +689,7 @@ void ScDocument::UpdateFontCharSet()
// Alles, was nicht SYMBOL ist, wird auf den System-CharSet umgesetzt.
// Bei neuen Dokumenten (Version SC_FONTCHARSET) sollte der CharSet stimmen.
- BOOL bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
+ sal_Bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
CharSet eSysSet = gsl_getSystemTextEncoding();
if ( eSrcSet != eSysSet || bUpdateOld )
@@ -747,15 +747,15 @@ void ScDocument::SetImportingXML( bool bVal )
for ( SCTAB nTab=0; nTab<=MAXTAB && pTab[nTab]; nTab++ )
if ( pTab[nTab]->IsLoadingRTL() )
{
- pTab[nTab]->SetLoadingRTL( FALSE );
- SetLayoutRTL( nTab, TRUE ); // includes mirroring; bImportingXML must be cleared first
+ pTab[nTab]->SetLoadingRTL( sal_False );
+ SetLayoutRTL( nTab, sal_True ); // includes mirroring; bImportingXML must be cleared first
}
}
SetLoadingMedium(bVal);
}
-void ScDocument::SetXMLFromWrapper( BOOL bVal )
+void ScDocument::SetXMLFromWrapper( sal_Bool bVal )
{
bXMLFromWrapper = bVal;
}
@@ -774,12 +774,12 @@ void ScDocument::SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersT
pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters );
}
-BOOL ScDocument::IsValidAsianCompression() const
+sal_Bool ScDocument::IsValidAsianCompression() const
{
return ( nAsianCompression != SC_ASIANCOMPRESSION_INVALID );
}
-BYTE ScDocument::GetAsianCompression() const
+sal_uInt8 ScDocument::GetAsianCompression() const
{
if ( nAsianCompression == SC_ASIANCOMPRESSION_INVALID )
return 0;
@@ -787,7 +787,7 @@ BYTE ScDocument::GetAsianCompression() const
return nAsianCompression;
}
-void ScDocument::SetAsianCompression(BYTE nNew)
+void ScDocument::SetAsianCompression(sal_uInt8 nNew)
{
nAsianCompression = nNew;
if ( pEditEngine )
@@ -796,25 +796,25 @@ void ScDocument::SetAsianCompression(BYTE nNew)
pDrawLayer->SetCharCompressType( nAsianCompression );
}
-BOOL ScDocument::IsValidAsianKerning() const
+sal_Bool ScDocument::IsValidAsianKerning() const
{
return ( nAsianKerning != SC_ASIANKERNING_INVALID );
}
-BOOL ScDocument::GetAsianKerning() const
+sal_Bool ScDocument::GetAsianKerning() const
{
if ( nAsianKerning == SC_ASIANKERNING_INVALID )
- return FALSE;
+ return sal_False;
else
- return (BOOL)nAsianKerning;
+ return (sal_Bool)nAsianKerning;
}
-void ScDocument::SetAsianKerning(BOOL bNew)
+void ScDocument::SetAsianKerning(sal_Bool bNew)
{
- nAsianKerning = (BYTE)bNew;
+ nAsianKerning = (sal_uInt8)bNew;
if ( pEditEngine )
- pEditEngine->SetKernAsianPunctuation( (BOOL)nAsianKerning );
+ pEditEngine->SetKernAsianPunctuation( (sal_Bool)nAsianKerning );
if ( pDrawLayer )
- pDrawLayer->SetKernAsianPunctuation( (BOOL)nAsianKerning );
+ pDrawLayer->SetKernAsianPunctuation( (sal_Bool)nAsianKerning );
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e77056b9446a..80e9038cc539 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -136,56 +136,56 @@ void ScDocument::MakeTable( SCTAB nTab,bool _bNeedsNameCheck )
}
-BOOL ScDocument::HasTable( SCTAB nTab ) const
+sal_Bool ScDocument::HasTable( SCTAB nTab ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetName( SCTAB nTab, String& rName ) const
+sal_Bool ScDocument::GetName( SCTAB nTab, String& rName ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
{
pTab[nTab]->GetName( rName );
- return TRUE;
+ return sal_True;
}
rName.Erase();
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::SetCodeName( SCTAB nTab, const String& rName )
+sal_Bool ScDocument::SetCodeName( SCTAB nTab, const String& rName )
{
if (VALIDTAB(nTab))
{
if (pTab[nTab])
{
pTab[nTab]->SetCodeName( rName );
- return TRUE;
+ return sal_True;
}
}
OSL_TRACE( "**** can't set code name %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() );
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
+sal_Bool ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
{
pTab[nTab]->GetCodeName( rName );
- return TRUE;
+ return sal_True;
}
rName.Erase();
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
+sal_Bool ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
{
String aUpperName = rName;
ScGlobal::pCharClass->toUpper(aUpperName);
@@ -196,15 +196,15 @@ BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
if ( pTab[i]->GetUpperName() == aUpperName )
{
rTab = i;
- return TRUE;
+ return sal_True;
}
}
rTab = 0;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::ValidTabName( const String& rName ) const
+sal_Bool ScDocument::ValidTabName( const String& rName ) const
{
xub_StrLen nLen = rName.Len();
if (!nLen)
@@ -244,9 +244,9 @@ BOOL ScDocument::ValidTabName( const String& rName ) const
}
-BOOL ScDocument::ValidNewTabName( const String& rName ) const
+sal_Bool ScDocument::ValidNewTabName( const String& rName ) const
{
- BOOL bValid = ValidTabName(rName);
+ sal_Bool bValid = ValidTabName(rName);
for (SCTAB i=0; (i<=MAXTAB) && bValid; i++)
if (pTab[i])
{
@@ -265,11 +265,11 @@ void ScDocument::CreateValidTabName(String& rName) const
// neu erzeugen
const String aStrTable( ScResId(SCSTR_TABLE) );
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
- BOOL bPrefix = ValidTabName( aStrTable );
+ sal_Bool bPrefix = ValidTabName( aStrTable );
DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
SCTAB nDummy;
@@ -311,11 +311,11 @@ void ScDocument::CreateValidTabName(String& rName) const
}
-BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
- BOOL bExternalDocument )
+sal_Bool ScDocument::InsertTab( SCTAB nPos, const String& rName,
+ sal_Bool bExternalDocument )
{
SCTAB nTabCount = GetTableCount();
- BOOL bValid = ValidTab(nTabCount);
+ sal_Bool bValid = ValidTab(nTabCount);
if ( !bExternalDocument ) // sonst rName == "'Doc'!Tab", vorher pruefen
bValid = (bValid && ValidNewTabName(rName));
if (bValid)
@@ -326,7 +326,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
pTab[nTabCount]->SetCodeName( rName );
++nMaxTableNumber;
if ( bExternalDocument )
- pTab[nTabCount]->SetVisible( FALSE );
+ pTab[nTabCount]->SetVisible( sal_False );
}
else
{
@@ -382,19 +382,19 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
pChartListenerCollection->UpdateScheduledSeriesRanges();
SetDirty();
- bValid = TRUE;
+ bValid = sal_True;
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
}
return bValid;
}
-BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
+sal_Bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
{
- BOOL bValid = FALSE;
+ sal_Bool bValid = sal_False;
if (VALIDTAB(nTab))
{
if (pTab[nTab])
@@ -402,8 +402,8 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
SCTAB nTabCount = GetTableCount();
if (nTabCount > 1)
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
DelBroadcastAreasInRange( aRange );
@@ -443,7 +443,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
SCTAB i;
for (i=0; i<=MAXTAB; i++)
if (pTab[i])
- pTab[i]->UpdateDeleteTab(nTab,FALSE,
+ pTab[i]->UpdateDeleteTab(nTab,sal_False,
pRefUndoDoc ? pRefUndoDoc->pTab[i] : 0);
delete pTab[nTab];
for (i=nTab + 1; i < nTabCount; i++)
@@ -470,7 +470,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
pChartListenerCollection->UpdateScheduledSeriesRanges();
SetAutoCalc( bOldAutoCalc );
- bValid = TRUE;
+ bValid = sal_True;
}
}
}
@@ -478,16 +478,16 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
}
-BOOL ScDocument::RenameTab( SCTAB nTab, const String& rName, BOOL /* bUpdateRef */,
- BOOL bExternalDocument )
+sal_Bool ScDocument::RenameTab( SCTAB nTab, const String& rName, sal_Bool /* bUpdateRef */,
+ sal_Bool bExternalDocument )
{
- BOOL bValid = FALSE;
+ sal_Bool bValid = sal_False;
SCTAB i;
if VALIDTAB(nTab)
if (pTab[nTab])
{
if ( bExternalDocument )
- bValid = TRUE; // zusammengesetzter Name
+ bValid = sal_True; // zusammengesetzter Name
else
bValid = ValidTabName(rName);
for (i=0; (i<=MAXTAB) && bValid; i++)
@@ -509,14 +509,14 @@ BOOL ScDocument::RenameTab( SCTAB nTab, const String& rName, BOOL /* bUpdateRef
// but the XML stream must be re-generated.
for (i=0; i<=MAXTAB; ++i)
if (pTab[i] && pTab[i]->IsStreamValid())
- pTab[i]->SetStreamValid( FALSE );
+ pTab[i]->SetStreamValid( sal_False );
}
}
return bValid;
}
-void ScDocument::SetVisible( SCTAB nTab, BOOL bVisible )
+void ScDocument::SetVisible( SCTAB nTab, sal_Bool bVisible )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -524,26 +524,26 @@ void ScDocument::SetVisible( SCTAB nTab, BOOL bVisible )
}
-BOOL ScDocument::IsVisible( SCTAB nTab ) const
+sal_Bool ScDocument::IsVisible( SCTAB nTab ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
return pTab[nTab]->IsVisible();
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::IsStreamValid( SCTAB nTab ) const
+sal_Bool ScDocument::IsStreamValid( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->IsStreamValid();
- return FALSE;
+ return sal_False;
}
-void ScDocument::SetStreamValid( SCTAB nTab, BOOL bSet, BOOL bIgnoreLock )
+void ScDocument::SetStreamValid( SCTAB nTab, sal_Bool bSet, sal_Bool bIgnoreLock )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetStreamValid( bSet, bIgnoreLock );
@@ -556,30 +556,30 @@ void ScDocument::LockStreamValid( bool bLock )
}
-BOOL ScDocument::IsPendingRowHeights( SCTAB nTab ) const
+sal_Bool ScDocument::IsPendingRowHeights( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->IsPendingRowHeights();
- return FALSE;
+ return sal_False;
}
-void ScDocument::SetPendingRowHeights( SCTAB nTab, BOOL bSet )
+void ScDocument::SetPendingRowHeights( SCTAB nTab, sal_Bool bSet )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetPendingRowHeights( bSet );
}
-void ScDocument::SetLayoutRTL( SCTAB nTab, BOOL bRTL )
+void ScDocument::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL )
{
if ( ValidTab(nTab) && pTab[nTab] )
{
if ( bImportingXML )
{
// #i57869# only set the LoadingRTL flag, the real setting (including mirroring)
- // is applied in SetImportingXML(FALSE). This is so the shapes can be loaded in
+ // is applied in SetImportingXML(sal_False). This is so the shapes can be loaded in
// normal LTR mode.
pTab[nTab]->SetLoadingRTL( bRTL );
@@ -617,16 +617,16 @@ void ScDocument::SetLayoutRTL( SCTAB nTab, BOOL bRTL )
}
-BOOL ScDocument::IsLayoutRTL( SCTAB nTab ) const
+sal_Bool ScDocument::IsLayoutRTL( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->IsLayoutRTL();
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::IsNegativePage( SCTAB nTab ) const
+sal_Bool ScDocument::IsNegativePage( SCTAB nTab ) const
{
// Negative page area is always used for RTL layout.
// The separate method is used to find all RTL handling of drawing objects.
@@ -644,7 +644,7 @@ BOOL ScDocument::IsNegativePage( SCTAB nTab ) const
---------------------------------------------------------------------------- */
-BOOL ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -652,11 +652,11 @@ BOOL ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
rEndCol = 0;
rEndRow = 0;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -664,7 +664,7 @@ BOOL ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) cons
rEndCol = 0;
rEndRow = 0;
- return FALSE;
+ return sal_False;
}
bool ScDocument::ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow) const
@@ -712,7 +712,7 @@ bool ScDocument::ShrinkToUsedDataArea( bool& o_bShrunk, SCTAB nTab, SCCOL& rStar
// zusammenhaengender Bereich
void ScDocument::GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
- SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld, bool bOnlyDown ) const
+ SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bIncludeOld, bool bOnlyDown ) const
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->GetDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bIncludeOld, bOnlyDown );
@@ -733,8 +733,8 @@ void ScDocument::LimitChartIfAll( ScRangeListRef& rRangeList )
ScRangeListRef aNew = new ScRangeList;
if (rRangeList.Is())
{
- ULONG nCount = rRangeList->Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rRangeList->Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScRange aRange(*rRangeList->GetObject( i ));
if ( ( aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL ) ||
@@ -800,7 +800,7 @@ bool lcl_GetNextTabRange( SCTAB& rTabRangeStart, SCTAB& rTabRangeEnd, const ScMa
}
-BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const
+sal_Bool ScDocument::CanInsertRow( const ScRange& rRange ) const
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -813,7 +813,7 @@ BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const
PutInOrder( nStartTab, nEndTab );
SCSIZE nSize = static_cast<SCSIZE>(nEndRow - nStartRow + 1);
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
for (SCTAB i=nStartTab; i<=nEndTab && bTest; i++)
if (pTab[i])
bTest &= pTab[i]->TestInsertRow( nStartCol, nEndCol, nSize );
@@ -822,7 +822,7 @@ BOOL ScDocument::CanInsertRow( const ScRange& rRange ) const
}
-BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
+sal_Bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc,
const ScMarkData* pTabMark )
@@ -837,10 +837,10 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
nEndTab = MAXTAB;
}
- BOOL bTest = TRUE;
- BOOL bRet = FALSE;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bTest = sal_True;
+ sal_Bool bRet = sal_False;
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for ( i = nStartTab; i <= nEndTab && bTest; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
bTest &= pTab[i]->TestInsertRow( nStartCol, nEndCol, nSize );
@@ -866,7 +866,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
{
UpdateReference( URM_INSDEL, nStartCol, nStartRow, nTabRangeStart,
nEndCol, MAXROW, nTabRangeEnd,
- 0, static_cast<SCsROW>(nSize), 0, pRefUndoDoc, FALSE ); // without drawing objects
+ 0, static_cast<SCsROW>(nSize), 0, pRefUndoDoc, sal_False ); // without drawing objects
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
@@ -899,7 +899,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
if (pTab[i])
pTab[i]->SetRelNameDirty();
}
- bRet = TRUE;
+ bRet = sal_True;
}
SetAutoCalc( bOldAutoCalc );
if ( bRet )
@@ -908,7 +908,7 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
}
-BOOL ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
+sal_Bool ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
{
return InsertRow( rRange.aStart.Col(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Tab(),
@@ -920,7 +920,7 @@ BOOL ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize,
- ScDocument* pRefUndoDoc, BOOL* pUndoOutline,
+ ScDocument* pRefUndoDoc, sal_Bool* pUndoOutline,
const ScMarkData* pTabMark )
{
SCTAB i;
@@ -933,8 +933,8 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
nEndTab = MAXTAB;
}
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -965,13 +965,13 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
{
UpdateReference( URM_INSDEL, nStartCol, nStartRow+nSize, nTabRangeStart,
nEndCol, MAXROW, nTabRangeEnd,
- 0, -(static_cast<SCsROW>(nSize)), 0, pRefUndoDoc, TRUE, false );
+ 0, -(static_cast<SCsROW>(nSize)), 0, pRefUndoDoc, sal_True, false );
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
}
if (pUndoOutline)
- *pUndoOutline = FALSE;
+ *pUndoOutline = sal_False;
for ( i = nStartTab; i <= nEndTab; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
@@ -994,7 +994,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
}
-void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL* pUndoOutline )
+void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, sal_Bool* pUndoOutline )
{
DeleteRow( rRange.aStart.Col(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Tab(),
@@ -1003,7 +1003,7 @@ void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL
}
-BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const
+sal_Bool ScDocument::CanInsertCol( const ScRange& rRange ) const
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -1016,7 +1016,7 @@ BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const
PutInOrder( nStartTab, nEndTab );
SCSIZE nSize = static_cast<SCSIZE>(nEndCol - nStartCol + 1);
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
for (SCTAB i=nStartTab; i<=nEndTab && bTest; i++)
if (pTab[i])
bTest &= pTab[i]->TestInsertCol( nStartRow, nEndRow, nSize );
@@ -1025,7 +1025,7 @@ BOOL ScDocument::CanInsertCol( const ScRange& rRange ) const
}
-BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
+sal_Bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc,
const ScMarkData* pTabMark )
@@ -1040,10 +1040,10 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
nEndTab = MAXTAB;
}
- BOOL bTest = TRUE;
- BOOL bRet = FALSE;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bTest = sal_True;
+ sal_Bool bRet = sal_False;
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for ( i = nStartTab; i <= nEndTab && bTest; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
bTest &= pTab[i]->TestInsertCol( nStartRow, nEndRow, nSize );
@@ -1066,7 +1066,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
{
UpdateReference( URM_INSDEL, nStartCol, nStartRow, nTabRangeStart,
MAXCOL, nEndRow, nTabRangeEnd,
- static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, TRUE, false );
+ static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, sal_True, false );
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
@@ -1091,7 +1091,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
if (pTab[i])
pTab[i]->SetRelNameDirty();
}
- bRet = TRUE;
+ bRet = sal_True;
}
SetAutoCalc( bOldAutoCalc );
if ( bRet )
@@ -1100,7 +1100,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
}
-BOOL ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
+sal_Bool ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
{
return InsertCol( rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -1111,7 +1111,7 @@ BOOL ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc,
- BOOL* pUndoOutline, const ScMarkData* pTabMark )
+ sal_Bool* pUndoOutline, const ScMarkData* pTabMark )
{
SCTAB i;
@@ -1123,8 +1123,8 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
nEndTab = MAXTAB;
}
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -1155,13 +1155,13 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
{
UpdateReference( URM_INSDEL, sal::static_int_cast<SCCOL>(nStartCol+nSize), nStartRow, nTabRangeStart,
MAXCOL, nEndRow, nTabRangeEnd,
- -static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, TRUE, false );
+ -static_cast<SCsCOL>(nSize), 0, 0, pRefUndoDoc, sal_True, false );
}
while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark ) );
}
if (pUndoOutline)
- *pUndoOutline = FALSE;
+ *pUndoOutline = sal_False;
for ( i = nStartTab; i <= nEndTab; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
@@ -1184,7 +1184,7 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
}
-void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL* pUndoOutline )
+void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, sal_Bool* pUndoOutline )
{
DeleteCol( rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -1198,12 +1198,12 @@ void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, BOOL
void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
- ScRange& rColRange, BOOL& rInsCol, BOOL& rDelCol,
- ScRange& rRowRange, BOOL& rInsRow, BOOL& rDelRow )
+ ScRange& rColRange, sal_Bool& rInsCol, sal_Bool& rDelCol,
+ ScRange& rRowRange, sal_Bool& rInsRow, sal_Bool& rDelRow )
{
DBG_ASSERT( rOld.aStart == rNew.aStart, "FitBlock: Anfang unterschiedlich" );
- rInsCol = rDelCol = rInsRow = rDelRow = FALSE;
+ rInsCol = rDelCol = rInsRow = rDelRow = sal_False;
SCCOL nStartX = rOld.aStart.Col();
SCROW nStartY = rOld.aStart.Row();
@@ -1214,7 +1214,7 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
SCTAB nTab = rOld.aStart.Tab();
// wenn es mehr Zeilen werden, werden Spalten auf der alten Hoehe eingefuegt/geloescht
- BOOL bGrowY = ( nNewEndY > nOldEndY );
+ sal_Bool bGrowY = ( nNewEndY > nOldEndY );
SCROW nColEndY = bGrowY ? nOldEndY : nNewEndY;
SCCOL nRowEndX = bGrowY ? nNewEndX : nOldEndX;
@@ -1223,12 +1223,12 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
if ( nNewEndX > nOldEndX ) // Spalten einfuegen
{
rColRange = ScRange( nOldEndX+1, nStartY, nTab, nNewEndX, nColEndY, nTab );
- rInsCol = TRUE;
+ rInsCol = sal_True;
}
else if ( nNewEndX < nOldEndX ) // Spalten loeschen
{
rColRange = ScRange( nNewEndX+1, nStartY, nTab, nOldEndX, nColEndY, nTab );
- rDelCol = TRUE;
+ rDelCol = sal_True;
}
// Zeilen
@@ -1236,19 +1236,19 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
if ( nNewEndY > nOldEndY ) // Zeilen einfuegen
{
rRowRange = ScRange( nStartX, nOldEndY+1, nTab, nRowEndX, nNewEndY, nTab );
- rInsRow = TRUE;
+ rInsRow = sal_True;
}
else if ( nNewEndY < nOldEndY ) // Zeilen loeschen
{
rRowRange = ScRange( nStartX, nNewEndY+1, nTab, nRowEndX, nOldEndY, nTab );
- rDelRow = TRUE;
+ rDelRow = sal_True;
}
}
-BOOL ScDocument::HasPartOfMerged( const ScRange& rRange )
+sal_Bool ScDocument::HasPartOfMerged( const ScRange& rRange )
{
- BOOL bPart = FALSE;
+ sal_Bool bPart = sal_False;
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartX = rRange.aStart.Col();
@@ -1269,44 +1269,44 @@ BOOL ScDocument::HasPartOfMerged( const ScRange& rRange )
}
-BOOL ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew )
+sal_Bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew )
{
if ( rOld == rNew )
- return TRUE;
+ return sal_True;
- BOOL bOk = TRUE;
- BOOL bInsCol,bDelCol,bInsRow,bDelRow;
+ sal_Bool bOk = sal_True;
+ sal_Bool bInsCol,bDelCol,bInsRow,bDelRow;
ScRange aColRange,aRowRange;
lcl_GetInsDelRanges( rOld, rNew, aColRange,bInsCol,bDelCol, aRowRange,bInsRow,bDelRow );
if ( bInsCol && !CanInsertCol( aColRange ) ) // Zellen am Rand ?
- bOk = FALSE;
+ bOk = sal_False;
if ( bInsRow && !CanInsertRow( aRowRange ) ) // Zellen am Rand ?
- bOk = FALSE;
+ bOk = sal_False;
if ( bInsCol || bDelCol )
{
aColRange.aEnd.SetCol(MAXCOL);
if ( HasPartOfMerged(aColRange) )
- bOk = FALSE;
+ bOk = sal_False;
}
if ( bInsRow || bDelRow )
{
aRowRange.aEnd.SetRow(MAXROW);
if ( HasPartOfMerged(aRowRange) )
- bOk = FALSE;
+ bOk = sal_False;
}
return bOk;
}
-void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, BOOL bClear )
+void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, sal_Bool bClear )
{
if (bClear)
DeleteAreaTab( rOld, IDF_ALL );
- BOOL bInsCol,bDelCol,bInsRow,bDelRow;
+ sal_Bool bInsCol,bDelCol,bInsRow,bDelRow;
ScRange aColRange,aRowRange;
lcl_GetInsDelRanges( rOld, rNew, aColRange,bInsCol,bDelCol, aRowRange,bInsRow,bDelRow );
@@ -1336,12 +1336,12 @@ void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, BOOL bClear
void ScDocument::DeleteArea(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rMark, USHORT nDelFlag)
+ const ScMarkData& rMark, sal_uInt16 nDelFlag)
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCTAB i = 0; i <= MAXTAB; i++)
if (pTab[i])
if ( rMark.GetTableSelect(i) || bIsUndo )
@@ -1352,21 +1352,21 @@ void ScDocument::DeleteArea(SCCOL nCol1, SCROW nRow1,
void ScDocument::DeleteAreaTab(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- SCTAB nTab, USHORT nDelFlag)
+ SCTAB nTab, sal_uInt16 nDelFlag)
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
if ( VALIDTAB(nTab) && pTab[nTab] )
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
pTab[nTab]->DeleteArea(nCol1, nRow1, nCol2, nRow2, nDelFlag);
SetAutoCalc( bOldAutoCalc );
}
}
-void ScDocument::DeleteAreaTab( const ScRange& rRange, USHORT nDelFlag )
+void ScDocument::DeleteAreaTab( const ScRange& rRange, sal_uInt16 nDelFlag )
{
for ( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); nTab++ )
DeleteAreaTab( rRange.aStart.Col(), rRange.aStart.Row(),
@@ -1376,7 +1376,7 @@ void ScDocument::DeleteAreaTab( const ScRange& rRange, USHORT nDelFlag )
void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
- BOOL bColInfo, BOOL bRowInfo )
+ sal_Bool bColInfo, sal_Bool bRowInfo )
{
if (bIsUndo)
{
@@ -1400,7 +1400,7 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe
void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
- BOOL bColInfo, BOOL bRowInfo )
+ sal_Bool bColInfo, sal_Bool bRowInfo )
{
if (bIsUndo)
{
@@ -1421,7 +1421,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
}
-void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowInfo )
+void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, sal_Bool bColInfo, sal_Bool bRowInfo )
{
if (bIsUndo)
{
@@ -1440,7 +1440,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowI
}
-void ScDocument::SetCutMode( BOOL bVal )
+void ScDocument::SetCutMode( sal_Bool bVal )
{
if (bIsClip)
GetClipParam().mbCutMode = bVal;
@@ -1451,22 +1451,22 @@ void ScDocument::SetCutMode( BOOL bVal )
}
-BOOL ScDocument::IsCutMode()
+sal_Bool ScDocument::IsCutMode()
{
if (bIsClip)
return GetClipParam().mbCutMode;
else
{
DBG_ERROR("IsCutMode ohne bIsClip");
- return FALSE;
+ return sal_False;
}
}
void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks, BOOL bColRowFlags )
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
+ const ScMarkData* pMarks, sal_Bool bColRowFlags )
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
@@ -1475,14 +1475,14 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
pDestDoc->aDocName = aDocName;
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCTAB i = nTab1; i <= nTab2; i++)
{
if (pTab[i] && pDestDoc->pTab[i])
pTab[i]->CopyToTable( nCol1, nRow1, nCol2, nRow2, nFlags,
bOnlyMarked, pDestDoc->pTab[i], pMarks,
- FALSE, bColRowFlags );
+ sal_False, bColRowFlags );
}
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
@@ -1491,7 +1491,7 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
const ScMarkData* pMarks)
{
PutInOrder( nCol1, nCol2 );
@@ -1499,10 +1499,10 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
PutInOrder( nTab1, nTab2 );
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, sal_False, pDestDoc, pMarks );
for (SCTAB i = nTab1; i <= nTab2; i++)
{
@@ -1512,35 +1512,35 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
}
if (nTab2 < MAXTAB)
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, sal_False, pDestDoc, pMarks );
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
}
void ScDocument::CopyToDocument(const ScRange& rRange,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks, BOOL bColRowFlags)
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
+ const ScMarkData* pMarks, sal_Bool bColRowFlags)
{
ScRange aNewRange = rRange;
aNewRange.Justify();
if( !pDestDoc->aDocName.Len() )
pDestDoc->aDocName = aDocName;
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCTAB i = aNewRange.aStart.Tab(); i <= aNewRange.aEnd.Tab(); i++)
if (pTab[i] && pDestDoc->pTab[i])
pTab[i]->CopyToTable(aNewRange.aStart.Col(), aNewRange.aStart.Row(),
aNewRange.aEnd.Col(), aNewRange.aEnd.Row(),
nFlags, bOnlyMarked, pDestDoc->pTab[i],
- pMarks, FALSE, bColRowFlags);
+ pMarks, sal_False, bColRowFlags);
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
void ScDocument::UndoToDocument(const ScRange& rRange,
- USHORT nFlags, BOOL bOnlyMarked, ScDocument* pDestDoc,
+ sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc,
const ScMarkData* pMarks)
{
ScRange aNewRange = rRange;
@@ -1548,10 +1548,10 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
SCTAB nTab1 = aNewRange.aStart.Tab();
SCTAB nTab2 = aNewRange.aEnd.Tab();
- BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDestDoc->GetAutoCalc();
+ pDestDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, sal_False, pDestDoc, pMarks );
for (SCTAB i = nTab1; i <= nTab2; i++)
{
@@ -1562,7 +1562,7 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
}
if (nTab2 < MAXTAB)
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, FALSE, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, sal_False, pDestDoc, pMarks );
pDestDoc->SetAutoCalc( bOldAutoCalc );
}
@@ -1632,14 +1632,14 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
pClipDoc->ResetClip( this, nTab );
if (pTab[nTab] && pClipDoc->pTab[nTab])
- pTab[nTab]->CopyToClip(nCol1, nRow1, nCol2, nRow2, pClipDoc->pTab[nTab], FALSE, TRUE);
+ pTab[nTab]->CopyToClip(nCol1, nRow1, nCol2, nRow2, pClipDoc->pTab[nTab], sal_False, sal_True);
pClipDoc->GetClipParam().mbCutMode = false;
}
}
-void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsLink )
+void ScDocument::TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink )
{
DBG_ASSERT( bIsClip && pTransClip && pTransClip->bIsClip,
"TransposeClip mit falschem Dokument" );
@@ -1652,9 +1652,9 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
// Bereiche uebernehmen
pTransClip->pRangeName->FreeAll();
- for (USHORT i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!!
+ for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!!
{
- USHORT nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex();
+ sal_uInt16 nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex();
ScRangeData* pData = new ScRangeData(*((*pRangeName)[i]));
if (!pTransClip->pRangeName->Insert(pData))
delete pData;
@@ -1708,7 +1708,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs)
{
- std::set<USHORT> aUsedNames; // indexes of named ranges that are used in the copied cells
+ std::set<sal_uInt16> aUsedNames; // indexes of named ranges that are used in the copied cells
for (SCTAB i = 0; i <= MAXTAB; ++i)
if (pTab[i] && pClipDoc->pTab[i])
if ( bAllTabs || !pMarks || pMarks->GetTableSelect(i) )
@@ -1717,9 +1717,9 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip
rClipRange.aEnd.Col(), rClipRange.aEnd.Row(), aUsedNames);
pClipDoc->pRangeName->FreeAll();
- for (USHORT i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!!
+ for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!!
{
- USHORT nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex();
+ sal_uInt16 nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex();
bool bInUse = ( aUsedNames.find(nIndex) != aUsedNames.end() );
if (bInUse)
{
@@ -1774,12 +1774,12 @@ void ScDocument::CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameDat
The adjustment of the indices in the formulas is done later.
*/
ScRangeData* pClipRangeData = (*pClipDoc->pRangeName)[i];
- USHORT k;
+ sal_uInt16 k;
if ( pRangeName->SearchName( pClipRangeData->GetName(), k ) )
{
aClipRangeNames.mpRangeNames[i] = NULL; // range name not inserted
- USHORT nOldIndex = pClipRangeData->GetIndex();
- USHORT nNewIndex = ((*pRangeName)[k])->GetIndex();
+ sal_uInt16 nOldIndex = pClipRangeData->GetIndex();
+ sal_uInt16 nNewIndex = ((*pRangeName)[k])->GetIndex();
aClipRangeNames.insert(nOldIndex, nNewIndex);
if ( !aClipRangeNames.mbReplace )
aClipRangeNames.mbReplace = ( nOldIndex != nNewIndex );
@@ -1793,8 +1793,8 @@ void ScDocument::CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameDat
if ( pRangeName->Insert( pData ) )
{
aClipRangeNames.mpRangeNames[i] = pData;
- USHORT nOldIndex = pClipRangeData->GetIndex();
- USHORT nNewIndex = pData->GetIndex();
+ sal_uInt16 nOldIndex = pClipRangeData->GetIndex();
+ sal_uInt16 nNewIndex = pData->GetIndex();
aClipRangeNames.insert(nOldIndex, nNewIndex);
if ( !aClipRangeNames.mbReplace )
aClipRangeNames.mbReplace = ( nOldIndex != nNewIndex );
@@ -1830,7 +1830,7 @@ void ScDocument::UpdateRangeNamesInFormulas(
rRangeNames.mpRangeNames[i]->ReplaceRangeNamesInUse(rRangeNames.maRangeMap);
}
// then update the formulas, they might need just the updated range names
- for (ULONG nRange = 0; nRange < rDestRanges.Count(); ++nRange)
+ for (sal_uLong nRange = 0; nRange < rDestRanges.Count(); ++nRange)
{
const ScRange* pRange = rDestRanges.GetObject( nRange);
SCCOL nCol1 = pRange->aStart.Col();
@@ -1882,7 +1882,7 @@ void ScDocument::SetClipParam(const ScClipParam& rParam)
mpClipParam.reset(new ScClipParam(rParam));
}
-BOOL ScDocument::IsClipboardSource() const
+sal_Bool ScDocument::IsClipboardSource() const
{
ScDocument* pClipDoc = SC_MOD()->GetClipDoc();
return pClipDoc && pClipDoc->xPoolHelper.isValid() &&
@@ -1892,7 +1892,7 @@ BOOL ScDocument::IsClipboardSource() const
void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rMark, USHORT nInsFlag )
+ const ScMarkData& rMark, sal_uInt16 nInsFlag )
{
if (nInsFlag & IDF_CONTENTS)
{
@@ -1906,7 +1906,7 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
void ScDocument::BroadcastFromClip( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
- const ScMarkData& rMark, USHORT nInsFlag )
+ const ScMarkData& rMark, sal_uInt16 nInsFlag )
{
if (nInsFlag & IDF_CONTENTS)
{
@@ -1982,8 +1982,8 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
if ( pCBFCP->pClipDoc->GetClipParam().mbCutMode )
{
- BOOL bOldInserting = IsInsertingFromOtherDoc();
- SetInsertingFromOtherDoc( TRUE);
+ sal_Bool bOldInserting = IsInsertingFromOtherDoc();
+ SetInsertingFromOtherDoc( sal_True);
UpdateReference( URM_MOVE,
nCol1, nRow1, i, nCol2, nRow2, i+nFollow,
nDx, nDy, nDz, pCBFCP->pRefUndoDoc );
@@ -1992,7 +1992,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
else
UpdateReference( URM_COPY,
nCol1, nRow1, i, nCol2, nRow2, i+nFollow,
- nDx, nDy, nDz, pCBFCP->pRefUndoDoc, FALSE );
+ nDx, nDy, nDz, pCBFCP->pRefUndoDoc, sal_False );
nClipTab = (nClipTab+nFollow+1) % (MAXTAB+1);
i = sal::static_int_cast<SCTAB>( i + nFollow );
@@ -2053,9 +2053,9 @@ void ScDocument::CopyNonFilteredFromClip( SCCOL nCol1, SCROW nRow1,
void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
- USHORT nInsFlag,
- ScDocument* pRefUndoDoc, ScDocument* pClipDoc, BOOL bResetCut,
- BOOL bAsLink, BOOL bIncludeFiltered, BOOL bSkipAttrForEmpty,
+ sal_uInt16 nInsFlag,
+ ScDocument* pRefUndoDoc, ScDocument* pClipDoc, sal_Bool bResetCut,
+ sal_Bool bAsLink, sal_Bool bIncludeFiltered, sal_Bool bSkipAttrForEmpty,
const ScRangeList * pDestRanges )
{
if (!bIsClip)
@@ -2067,8 +2067,8 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
}
if (pClipDoc->bIsClip && pClipDoc->GetTableCount())
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple recalculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // avoid multiple recalculations
NumFmtMergeHandler aNumFmtMergeHdl(this, pClipDoc);
@@ -2113,7 +2113,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
overwrite/delete existing cells but to insert the notes into
these cells. In this case, just delete old notes from the
destination area. */
- USHORT nDelFlag = IDF_NONE;
+ sal_uInt16 nDelFlag = IDF_NONE;
if ( (nInsFlag & (IDF_CONTENTS | IDF_ADDNOTES)) == (IDF_NOTE | IDF_ADDNOTES) )
nDelFlag |= IDF_NOTE;
else if ( nInsFlag & IDF_CONTENTS )
@@ -2152,19 +2152,19 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
pDestRanges = &aLocalRangeList;
}
- bInsertingFromOtherDoc = TRUE; // kein Broadcast/Listener aufbauen bei Insert
+ bInsertingFromOtherDoc = sal_True; // kein Broadcast/Listener aufbauen bei Insert
// bei mindestens 64 Zeilen wird in ScColumn::CopyFromClip voralloziert
- BOOL bDoDouble = ( nYw < 64 && nAllRow2 - nAllRow1 > 64);
- BOOL bOldDouble = ScColumn::bDoubleAlloc;
+ sal_Bool bDoDouble = ( nYw < 64 && nAllRow2 - nAllRow1 > 64);
+ sal_Bool bOldDouble = ScColumn::bDoubleAlloc;
if (bDoDouble)
- ScColumn::bDoubleAlloc = TRUE;
+ ScColumn::bDoubleAlloc = sal_True;
SCCOL nClipStartCol = aClipRange.aStart.Col();
SCROW nClipStartRow = aClipRange.aStart.Row();
// WaE: commented because unused: SCCOL nClipEndCol = pClipDoc->aClipRange.aEnd.Col();
SCROW nClipEndRow = aClipRange.aEnd.Row();
- for (ULONG nRange = 0; nRange < pDestRanges->Count(); ++nRange)
+ for (sal_uLong nRange = 0; nRange < pDestRanges->Count(); ++nRange)
{
const ScRange* pRange = pDestRanges->GetObject( nRange);
SCCOL nCol1 = pRange->aStart.Col();
@@ -2230,7 +2230,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
if (pTab[k] && rMark.GetTableSelect(k))
pTab[k]->DecRecalcLevel();
- bInsertingFromOtherDoc = FALSE;
+ bInsertingFromOtherDoc = sal_False;
UpdateRangeNamesInFormulas(aClipRangeNames, *pDestRanges, rMark, nXw, nYw);
@@ -2246,7 +2246,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
}
static SCROW lcl_getLastNonFilteredRow(
- const ScBitMaskCompressedArray<SCROW, BYTE>& rFlags, SCROW nBegRow, SCROW nEndRow,
+ const ScBitMaskCompressedArray<SCROW, sal_uInt8>& rFlags, SCROW nBegRow, SCROW nEndRow,
SCROW nRowCount)
{
SCROW nFilteredRow = rFlags.GetFirstForCondition(
@@ -2271,8 +2271,8 @@ void ScDocument::CopyMultiRangeFromClip(
// There is nothing in the clip doc to copy.
return;
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // avoid multiple recalculations
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // avoid multiple recalculations
NumFmtMergeHandler aNumFmtMergeHdl(this, pClipDoc);
@@ -2307,11 +2307,11 @@ void ScDocument::CopyMultiRangeFromClip(
rMark.GetMarkArea(aDestRange);
SCROW nLastMarkedRow = aDestRange.aEnd.Row();
- bInsertingFromOtherDoc = TRUE; // kein Broadcast/Listener aufbauen bei Insert
+ bInsertingFromOtherDoc = sal_True; // kein Broadcast/Listener aufbauen bei Insert
SCROW nBegRow = nRow1;
sal_uInt16 nDelFlag = IDF_CONTENTS;
- const ScBitMaskCompressedArray<SCROW, BYTE>& rFlags = GetRowFlagsArray(aCBFCP.nTabStart);
+ const ScBitMaskCompressedArray<SCROW, sal_uInt8>& rFlags = GetRowFlagsArray(aCBFCP.nTabStart);
for (ScRange* p = rClipParam.maRanges.First(); p; p = rClipParam.maRanges.Next())
{
@@ -2365,7 +2365,7 @@ void ScDocument::CopyMultiRangeFromClip(
if (pTab[i] && rMark.GetTableSelect(i))
pTab[i]->DecRecalcLevel();
- bInsertingFromOtherDoc = FALSE;
+ bInsertingFromOtherDoc = sal_False;
ScRangeList aRanges;
aRanges.Append(aDestRange);
@@ -2385,7 +2385,7 @@ void ScDocument::CopyMultiRangeFromClip(
SetAutoCalc( bOldAutoCalc );
}
-void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
+void ScDocument::SetClipArea( const ScRange& rArea, sal_Bool bCut )
{
if (bIsClip)
{
@@ -2401,7 +2401,7 @@ void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
}
-void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, BOOL bIncludeFiltered)
+void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, sal_Bool bIncludeFiltered)
{
if (!bIsClip)
{
@@ -2471,7 +2471,7 @@ void ScDocument::GetClipStart(SCCOL& nClipX, SCROW& nClipY)
}
-BOOL ScDocument::HasClipFilteredRows()
+sal_Bool ScDocument::HasClipFilteredRows()
{
// count on first used table in clipboard
SCTAB nCountTab = 0;
@@ -2492,7 +2492,7 @@ BOOL ScDocument::HasClipFilteredRows()
}
-void ScDocument::MixDocument( const ScRange& rRange, USHORT nFunction, BOOL bSkipEmpty,
+void ScDocument::MixDocument( const ScRange& rRange, sal_uInt16 nFunction, sal_Bool bSkipEmpty,
ScDocument* pSrcDoc )
{
SCTAB nTab1 = rRange.aStart.Tab();
@@ -2506,10 +2506,10 @@ void ScDocument::MixDocument( const ScRange& rRange, USHORT nFunction, BOOL bSki
void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
- USHORT nFlags, USHORT nFunction,
- BOOL bSkipEmpty, BOOL bAsLink )
+ sal_uInt16 nFlags, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, sal_Bool bAsLink )
{
- USHORT nDelFlags = nFlags;
+ sal_uInt16 nDelFlags = nFlags;
if (nDelFlags & IDF_CONTENTS)
nDelFlags |= IDF_CONTENTS; // immer alle Inhalte oder keine loeschen!
@@ -2522,10 +2522,10 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
SCCOL nEndCol = rSrcArea.aEnd.Col();
SCROW nEndRow = rSrcArea.aEnd.Row();
ScDocument* pMixDoc = NULL;
- BOOL bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
+ sal_Bool bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
SCTAB nCount = GetTableCount();
for (SCTAB i=0; i<nCount; i++)
@@ -2541,11 +2541,11 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
else
pMixDoc->AddUndoTab( i, i );
pTab[i]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- IDF_CONTENTS, FALSE, pMixDoc->pTab[i] );
+ IDF_CONTENTS, sal_False, pMixDoc->pTab[i] );
}
pTab[i]->DeleteArea( nStartCol,nStartRow, nEndCol,nEndRow, nDelFlags);
pTab[nSrcTab]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- nFlags, FALSE, pTab[i], NULL, bAsLink );
+ nFlags, sal_False, pTab[i], NULL, bAsLink );
if (bDoMix)
pTab[i]->MixData( nStartCol,nStartRow, nEndCol,nEndRow,
@@ -2564,20 +2564,20 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
- USHORT nFlags, USHORT nFunction,
- BOOL bSkipEmpty, BOOL bAsLink )
+ sal_uInt16 nFlags, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, sal_Bool bAsLink )
{
- USHORT nDelFlags = nFlags;
+ sal_uInt16 nDelFlags = nFlags;
if (nDelFlags & IDF_CONTENTS)
nDelFlags |= IDF_CONTENTS; // immer alle Inhalte oder keine loeschen!
if (ValidTab(nSrcTab) && pTab[nSrcTab])
{
ScDocument* pMixDoc = NULL;
- BOOL bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
+ sal_Bool bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
ScRange aArea;
rMark.GetMultiMarkArea( aArea );
@@ -2600,12 +2600,12 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
else
pMixDoc->AddUndoTab( i, i );
pTab[i]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- IDF_CONTENTS, TRUE, pMixDoc->pTab[i], &rMark );
+ IDF_CONTENTS, sal_True, pMixDoc->pTab[i], &rMark );
}
pTab[i]->DeleteSelection( nDelFlags, rMark );
pTab[nSrcTab]->CopyToTable( nStartCol,nStartRow, nEndCol,nEndRow,
- nFlags, TRUE, pTab[i], &rMark, bAsLink );
+ nFlags, sal_True, pTab[i], &rMark, bAsLink );
if (bDoMix)
pTab[i]->MixMarked( rMark, nFunction, bSkipEmpty, pMixDoc->pTab[i] );
@@ -2622,13 +2622,13 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
}
-void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, BOOL bForceTab )
+void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, sal_Bool bForceTab )
{
if (VALIDTAB(nTab))
{
if ( bForceTab && !pTab[nTab] )
{
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+ sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
pTab[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -2642,12 +2642,12 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
}
-void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, BOOL bForceTab )
+void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, sal_Bool bForceTab )
{
SCTAB nTab = rPos.Tab();
if ( bForceTab && !pTab[nTab] )
{
- BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
+ sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
pTab[nTab] = new ScTable(this, nTab,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
@@ -2660,13 +2660,13 @@ void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, BOOL bForceT
}
-BOOL ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
+sal_Bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
SvNumberFormatter* pFormatter, bool bDetectNumberFormat )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->SetString( nCol, nRow, nTab, rString, pFormatter, bDetectNumberFormat );
else
- return FALSE;
+ return sal_False;
}
@@ -2736,7 +2736,7 @@ sal_uInt32 ScDocument::GetNumberFormat( const ScAddress& rPos ) const
}
-void ScDocument::GetNumberFormatInfo( short& nType, ULONG& nIndex,
+void ScDocument::GetNumberFormatInfo( short& nType, sal_uLong& nIndex,
const ScAddress& rPos, const ScBaseCell* pCell ) const
{
SCTAB nTab = rPos.Tab();
@@ -2758,7 +2758,7 @@ void ScDocument::GetNumberFormatInfo( short& nType, ULONG& nIndex,
void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormula,
- BOOL bAsciiExport ) const
+ sal_Bool bAsciiExport ) const
{
if ( VALIDTAB(nTab) && pTab[nTab] )
pTab[nTab]->GetFormula( nCol, nRow, rFormula, bAsciiExport );
@@ -2810,27 +2810,27 @@ ScBaseCell* ScDocument::GetCell( const ScAddress& rPos ) const
}
-BOOL ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
if ( VALIDTAB(nTab) && pTab[nTab] )
return pTab[nTab]->HasStringData( nCol, nRow );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
if ( VALIDTAB(nTab) && pTab[nTab] )
return pTab[nTab]->HasValueData( nCol, nRow );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::HasStringCells( const ScRange& rRange ) const
+sal_Bool ScDocument::HasStringCells( const ScRange& rRange ) const
{
- // TRUE, wenn String- oder Editzellen im Bereich
+ // sal_True, wenn String- oder Editzellen im Bereich
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -2841,20 +2841,20 @@ BOOL ScDocument::HasStringCells( const ScRange& rRange ) const
for ( SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++ )
if ( pTab[nTab] && pTab[nTab]->HasStringCells( nStartCol, nStartRow, nEndCol, nEndRow ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ) )->GetValue();
if( nValidation )
{
const ScValidationData* pData = GetValidationEntry( nValidation );
if( pData && pData->HasSelectionList() )
- return TRUE;
+ return sal_True;
}
return HasStringCells( ScRange( nCol, 0, nTab, nCol, MAXROW, nTab ) );
}
@@ -2916,8 +2916,8 @@ void ScDocument::InitializeAllNoteCaptions( bool bForced )
void ScDocument::SetDirty()
{
- BOOL bOldAutoCalc = GetAutoCalc();
- bAutoCalc = FALSE; // keine Mehrfachberechnung
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ bAutoCalc = sal_False; // keine Mehrfachberechnung
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM());
for (SCTAB i=0; i<=MAXTAB; i++)
@@ -2936,8 +2936,8 @@ void ScDocument::SetDirty()
void ScDocument::SetDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = GetAutoCalc();
- bAutoCalc = FALSE; // keine Mehrfachberechnung
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ bAutoCalc = sal_False; // keine Mehrfachberechnung
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( GetBASM());
SCTAB nTab2 = rRange.aEnd.Tab();
@@ -2950,8 +2950,8 @@ void ScDocument::SetDirty( const ScRange& rRange )
void ScDocument::SetTableOpDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = GetAutoCalc();
- bAutoCalc = FALSE; // no multiple recalculation
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ bAutoCalc = sal_False; // no multiple recalculation
SCTAB nTab2 = rRange.aEnd.Tab();
for (SCTAB i=rRange.aStart.Tab(); i<=nTab2; i++)
if (pTab[i]) pTab[i]->SetTableOpDirty( rRange );
@@ -2961,8 +2961,8 @@ void ScDocument::SetTableOpDirty( const ScRange& rRange )
void ScDocument::InterpretDirtyCells( const ScRangeList& rRanges )
{
- ULONG nRangeCount = rRanges.Count();
- for (ULONG nPos=0; nPos<nRangeCount; nPos++)
+ sal_uLong nRangeCount = rRanges.Count();
+ for (sal_uLong nPos=0; nPos<nRangeCount; nPos++)
{
ScCellIterator aIter( this, *rRanges.GetObject(nPos) );
ScBaseCell* pCell = aIter.GetFirst();
@@ -3000,8 +3000,8 @@ void ScDocument::AddTableOpFormulaCell( ScFormulaCell* pCell )
void ScDocument::CalcAll()
{
ClearLookupCaches(); // Ensure we don't deliver zombie data.
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( TRUE );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_True );
SCTAB i;
for (i=0; i<=MAXTAB; i++)
if (pTab[i]) pTab[i]->SetDirtyVar();
@@ -3025,8 +3025,8 @@ void ScDocument::CompileAll()
void ScDocument::CompileXML()
{
- BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE );
+ sal_Bool bOldAutoCalc = GetAutoCalc();
+ SetAutoCalc( sal_False );
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(
STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount() );
@@ -3056,14 +3056,14 @@ void ScDocument::CalcAfterLoad()
if (bIsClip) // Excel-Dateien werden aus dem Clipboard in ein Clip-Doc geladen
return; // dann wird erst beim Einfuegen in das richtige Doc berechnet
- bCalcingAfterLoad = TRUE;
+ bCalcingAfterLoad = sal_True;
for ( i = 0; i <= MAXTAB; i++)
if (pTab[i]) pTab[i]->CalcAfterLoad();
for (i=0; i<=MAXTAB; i++)
if (pTab[i]) pTab[i]->SetDirtyAfterLoad();
- bCalcingAfterLoad = FALSE;
+ bCalcingAfterLoad = sal_False;
- SetDetectiveDirty(FALSE); // noch keine wirklichen Aenderungen
+ SetDetectiveDirty(sal_False); // noch keine wirklichen Aenderungen
// #i112436# If formula cells are already dirty, they don't broadcast further changes.
// So the source ranges of charts must be interpreted even if they are not visible,
@@ -3080,7 +3080,7 @@ void ScDocument::CalcAfterLoad()
}
-USHORT ScDocument::GetErrCode( const ScAddress& rPos ) const
+sal_uInt16 ScDocument::GetErrCode( const ScAddress& rPos ) const
{
SCTAB nTab = rPos.Tab();
if ( pTab[nTab] )
@@ -3103,41 +3103,41 @@ void ScDocument::ResetChanged( const ScRange& rRange )
//
-void ScDocument::SetColWidth( SCCOL nCol, SCTAB nTab, USHORT nNewWidth )
+void ScDocument::SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetColWidth( nCol, nNewWidth );
}
-void ScDocument::SetRowHeight( SCROW nRow, SCTAB nTab, USHORT nNewHeight )
+void ScDocument::SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowHeight( nRow, nNewHeight );
}
-void ScDocument::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nNewHeight )
+void ScDocument::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowHeightRange
( nStartRow, nEndRow, nNewHeight, 1.0, 1.0 );
}
-void ScDocument::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nNewHeight )
+void ScDocument::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowHeightOnly( nStartRow, nEndRow, nNewHeight );
}
-void ScDocument::SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bManual )
+void ScDocument::SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bManual )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetManualHeight( nStartRow, nEndRow, bManual );
}
-USHORT ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetColWidth( nCol );
@@ -3146,7 +3146,7 @@ USHORT ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab ) const
}
-USHORT ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetOriginalWidth( nCol );
@@ -3155,7 +3155,7 @@ USHORT ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
}
-USHORT ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetCommonWidth( nEndCol );
@@ -3164,7 +3164,7 @@ USHORT ScDocument::GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const
}
-USHORT ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
+sal_uInt16 ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetOriginalHeight( nRow );
@@ -3173,7 +3173,7 @@ USHORT ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
}
-USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) const
+sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowHeight( nRow, NULL, NULL, bHiddenAsZero );
@@ -3182,7 +3182,7 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) co
}
-USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
+sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowHeight( nRow, pStartRow, pEndRow, bHiddenAsZero );
@@ -3191,7 +3191,7 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW
}
-ULONG ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const
+sal_uLong ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const
{
if (nStartRow == nEndRow)
return GetRowHeight( nStartRow, nTab); // faster for a single row
@@ -3207,17 +3207,17 @@ ULONG ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) con
return 0;
}
-SCROW ScDocument::GetRowForHeight( SCTAB nTab, ULONG nHeight ) const
+SCROW ScDocument::GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const
{
return pTab[nTab]->GetRowForHeight(nHeight);
}
-ULONG ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow,
+sal_uLong ScDocument::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow,
SCTAB nTab, double fScale ) const
{
// faster for a single row
if (nStartRow == nEndRow)
- return (ULONG) (GetRowHeight( nStartRow, nTab) * fScale);
+ return (sal_uLong) (GetRowHeight( nStartRow, nTab) * fScale);
// check bounds because this method replaces former for(i=start;i<=end;++i) loops
if (nStartRow > nEndRow)
@@ -3239,7 +3239,7 @@ SCROW ScDocument::GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const
}
-ULONG ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
+sal_uLong ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetColOffset( nCol );
@@ -3248,7 +3248,7 @@ ULONG ScDocument::GetColOffset( SCCOL nCol, SCTAB nTab ) const
}
-ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
+sal_uLong ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowOffset( nRow );
@@ -3257,11 +3257,11 @@ ULONG ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const
}
-USHORT ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
+sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bFormula, const ScMarkData* pMarkData,
- BOOL bSimpleTextImport )
+ sal_Bool bFormula, const ScMarkData* pMarkData,
+ sal_Bool bSimpleTextImport )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetOptimalColWidth( nCol, pDev, nPPTX, nPPTY,
@@ -3275,7 +3275,7 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bWidth, BOOL bTotalSize )
+ sal_Bool bWidth, sal_Bool bTotalSize )
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetNeededSize
@@ -3285,18 +3285,18 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
-BOOL ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nExtra,
+sal_Bool ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bShrink )
+ sal_Bool bShrink )
{
//! MarkToMulti();
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->SetOptimalHeight( nStartRow, nEndRow, nExtra,
pDev, nPPTX, nPPTY, rZoomX, rZoomY, bShrink );
DBG_ERROR("Falsche Tabellennummer");
- return FALSE;
+ return sal_False;
}
@@ -3305,19 +3305,19 @@ void ScDocument::UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double n
{
// one progress across all (selected) sheets
- ULONG nCellCount = 0;
+ sal_uLong nCellCount = 0;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
nCellCount += pTab[nTab]->GetWeightedCount();
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount );
- ULONG nProgressStart = 0;
+ sal_uLong nProgressStart = 0;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
{
pTab[nTab]->SetOptimalHeight( 0, MAXROW, 0,
- pDev, nPPTX, nPPTY, rZoomX, rZoomY, FALSE, &aProgress, nProgressStart );
+ pDev, nPPTX, nPPTY, rZoomX, rZoomY, sal_False, &aProgress, nProgressStart );
nProgressStart += pTab[nTab]->GetWeightedCount();
}
}
@@ -3327,49 +3327,49 @@ void ScDocument::UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double n
// Spalten-/Zeilen-Flags ----------------------------------------------
//
-void ScDocument::ShowCol(SCCOL nCol, SCTAB nTab, BOOL bShow)
+void ScDocument::ShowCol(SCCOL nCol, SCTAB nTab, sal_Bool bShow)
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->ShowCol( nCol, bShow );
}
-void ScDocument::ShowRow(SCROW nRow, SCTAB nTab, BOOL bShow)
+void ScDocument::ShowRow(SCROW nRow, SCTAB nTab, sal_Bool bShow)
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->ShowRow( nRow, bShow );
}
-void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow)
+void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, sal_Bool bShow)
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->ShowRows( nRow1, nRow2, bShow );
}
-void ScDocument::SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags )
+void ScDocument::SetColFlags( SCCOL nCol, SCTAB nTab, sal_uInt8 nNewFlags )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetColFlags( nCol, nNewFlags );
}
-void ScDocument::SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags )
+void ScDocument::SetRowFlags( SCROW nRow, SCTAB nTab, sal_uInt8 nNewFlags )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowFlags( nRow, nNewFlags );
}
-void ScDocument::SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BYTE nNewFlags )
+void ScDocument::SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt8 nNewFlags )
{
if ( ValidTab(nTab) && pTab[nTab] )
pTab[nTab]->SetRowFlags( nStartRow, nEndRow, nNewFlags );
}
-BYTE ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
+sal_uInt8 ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetColFlags( nCol );
@@ -3377,7 +3377,7 @@ BYTE ScDocument::GetColFlags( SCCOL nCol, SCTAB nTab ) const
return 0;
}
-BYTE ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
+sal_uInt8 ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowFlags( nRow );
@@ -3385,17 +3385,17 @@ BYTE ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
return 0;
}
-ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArrayModifiable(
+ScBitMaskCompressedArray< SCROW, sal_uInt8> & ScDocument::GetRowFlagsArrayModifiable(
SCTAB nTab )
{
- return const_cast< ScBitMaskCompressedArray< SCROW, BYTE> & >(
+ return const_cast< ScBitMaskCompressedArray< SCROW, sal_uInt8> & >(
GetRowFlagsArray( nTab));
}
-const ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArray(
+const ScBitMaskCompressedArray< SCROW, sal_uInt8> & ScDocument::GetRowFlagsArray(
SCTAB nTab ) const
{
- const ScBitMaskCompressedArray< SCROW, BYTE> * pFlags;
+ const ScBitMaskCompressedArray< SCROW, sal_uInt8> * pFlags;
if ( ValidTab(nTab) && pTab[nTab] )
pFlags = pTab[nTab]->GetRowFlagsArray();
else
@@ -3406,7 +3406,7 @@ const ScBitMaskCompressedArray< SCROW, BYTE> & ScDocument::GetRowFlagsArray(
if (!pFlags)
{
DBG_ERROR("no row flags at sheet");
- static ScBitMaskCompressedArray< SCROW, BYTE> aDummy( MAXROW, 0);
+ static ScBitMaskCompressedArray< SCROW, sal_uInt8> aDummy( MAXROW, 0);
pFlags = &aDummy;
}
return *pFlags;
@@ -3693,8 +3693,8 @@ SCCOL ScDocument::GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const
{
if ( ValidTab(nTab) && pTab[nTab] )
{
- BYTE nStartFlags = pTab[nTab]->GetColFlags(nStart);
- USHORT nStartWidth = pTab[nTab]->GetOriginalWidth(nStart);
+ sal_uInt8 nStartFlags = pTab[nTab]->GetColFlags(nStart);
+ sal_uInt16 nStartWidth = pTab[nTab]->GetOriginalWidth(nStart);
for (SCCOL nCol = nStart + 1; nCol <= MAXCOL; nCol++)
{
if (((nStartFlags & CR_MANUALBREAK) != (pTab[nTab]->GetColFlags(nCol) & CR_MANUALBREAK)) ||
@@ -3709,7 +3709,7 @@ SCCOL ScDocument::GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const
SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCareManualSize) const
{
- const ScBitMaskCompressedArray< SCROW, BYTE> * pRowFlagsArray;
+ const ScBitMaskCompressedArray< SCROW, sal_uInt8> * pRowFlagsArray;
if ( ValidTab(nTab) && pTab[nTab] && ((pRowFlagsArray = pTab[nTab]->GetRowFlagsArray()) != NULL) &&
pTab[nTab]->mpRowHeights && pTab[nTab]->mpHiddenRows )
{
@@ -3717,12 +3717,12 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
SCROW nFlagsEndRow;
SCROW nHiddenEndRow;
SCROW nHeightEndRow;
- BYTE nFlags;
+ sal_uInt8 nFlags;
bool bHidden;
- USHORT nHeight;
- BYTE nStartFlags = nFlags = pRowFlagsArray->GetValue( nStart, nIndex, nFlagsEndRow);
+ sal_uInt16 nHeight;
+ sal_uInt8 nStartFlags = nFlags = pRowFlagsArray->GetValue( nStart, nIndex, nFlagsEndRow);
bool bStartHidden = bHidden = pTab[nTab]->RowHidden( nStart, NULL, &nHiddenEndRow);
- USHORT nStartHeight = nHeight = pTab[nTab]->GetRowHeight( nStart, NULL, &nHeightEndRow, false);
+ sal_uInt16 nStartHeight = nHeight = pTab[nTab]->GetRowHeight( nStart, NULL, &nHeightEndRow, false);
SCROW nRow;
while ((nRow = std::min( nHiddenEndRow, std::min( nFlagsEndRow, nHeightEndRow)) + 1) <= MAXROW)
{
@@ -3744,9 +3744,9 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
return 0;
}
-BOOL ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault)
+sal_Bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault)
{
- BOOL bRet(FALSE);
+ sal_Bool bRet(sal_False);
nDefault = 0;
ScDocAttrIterator aDocAttrItr(this, nTab, nCol, 0, nCol, nLastRow);
SCCOL nColumn;
@@ -3789,16 +3789,16 @@ BOOL ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& n
aItr++;
}
nDefault = aDefaultItr->nFirst;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
-BOOL ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ )
+sal_Bool ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ )
{
- BOOL bRet(FALSE);
+ sal_Bool bRet(sal_False);
return bRet;
}
@@ -3819,7 +3819,7 @@ void ScDocument::ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, S
// Attribute ----------------------------------------------------------
//
-const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const
+const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
{
@@ -3944,7 +3944,7 @@ void ScDocument::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkDat
void ScDocument::ApplySelectionLineStyle( const ScMarkData& rMark,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -3967,8 +3967,8 @@ const ScStyleSheet* ScDocument::GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) c
const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) const
{
- BOOL bEqual = TRUE;
- BOOL bFound;
+ sal_Bool bEqual = sal_True;
+ sal_Bool bFound;
const ScStyleSheet* pStyle = NULL;
const ScStyleSheet* pNewStyle;
@@ -3981,7 +3981,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
if (bFound)
{
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = sal_False; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -3998,7 +3998,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
if (bFound)
{
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = sal_False; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -4008,7 +4008,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
}
-void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRemoved,
+void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY )
@@ -4026,7 +4026,7 @@ void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL b
}
-BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const
+sal_Bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const
{
if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == ScStyleSheet::UNKNOWN )
{
@@ -4043,7 +4043,7 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt
}
}
- BOOL bIsUsed = FALSE;
+ sal_Bool bIsUsed = sal_False;
for ( SCTAB i=0; i<=MAXTAB; i++ )
{
@@ -4052,14 +4052,14 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt
if ( pTab[i]->IsStyleSheetUsed( rStyle, bGatherAllStyles ) )
{
if ( !bGatherAllStyles )
- return TRUE;
- bIsUsed = TRUE;
+ return sal_True;
+ bIsUsed = sal_True;
}
}
}
if ( bGatherAllStyles )
- bStyleSheetUsageInvalid = FALSE;
+ bStyleSheetUsageInvalid = sal_False;
return bIsUsed;
}
@@ -4068,32 +4068,32 @@ BOOL ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllSt
}
-BOOL ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, INT16 nFlags )
+sal_Bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
return pTab[nTab]->ApplyFlags( nStartCol, nStartRow, nEndCol, nEndRow, nFlags );
DBG_ERROR("ApplyFlags: falsche Tabelle");
- return FALSE;
+ return sal_False;
}
-BOOL ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, INT16 nFlags )
+sal_Bool ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
return pTab[nTab]->RemoveFlags( nStartCol, nStartRow, nEndCol, nEndRow, nFlags );
DBG_ERROR("RemoveFlags: falsche Tabelle");
- return FALSE;
+ return sal_False;
}
void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr,
- BOOL bPutToPool )
+ sal_Bool bPutToPool )
{
if (VALIDTAB(nTab))
if (pTab[nTab])
@@ -4102,7 +4102,7 @@ void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPattern
void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr,
- BOOL bPutToPool )
+ sal_Bool bPutToPool )
{
SCTAB nTab = rPos.Tab();
if (pTab[nTab])
@@ -4110,7 +4110,7 @@ void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr,
}
-ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, BOOL bDeep )
+ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep )
{
ScMergePatternState aState;
@@ -4139,7 +4139,7 @@ ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, BOOL
}
-const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, BOOL bDeep )
+const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep )
{
delete pSelectionAttr;
pSelectionAttr = CreateSelectionPattern( rMark, bDeep );
@@ -4159,9 +4159,9 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
rLineInner.SetLine(NULL, BOXINFO_LINE_HORI);
rLineInner.SetLine(NULL, BOXINFO_LINE_VERT);
- rLineInner.SetTable(TRUE);
- rLineInner.SetDist(TRUE);
- rLineInner.SetMinDist(FALSE);
+ rLineInner.SetTable(sal_True);
+ rLineInner.SetDist(sal_True);
+ rLineInner.SetMinDist(sal_False);
ScLineFlags aFlags;
@@ -4190,7 +4190,7 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, USHORT nMask )
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt16 nMask )
{
if ( nMask & HASATTR_ROTATE )
{
@@ -4199,7 +4199,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- BOOL bAnyItem = FALSE;
+ sal_Bool bAnyItem = sal_False;
sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE );
for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++)
{
@@ -4208,10 +4208,10 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
// (see ScPatternAttr::GetCellOrientation)
- INT32 nAngle = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ sal_Int32 nAngle = static_cast<const SfxInt32Item*>(pItem)->GetValue();
if ( nAngle != 0 && nAngle != 9000 && nAngle != 27000 )
{
- bAnyItem = TRUE;
+ bAnyItem = sal_True;
break;
}
}
@@ -4227,14 +4227,14 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- BOOL bHasRtl = FALSE;
+ sal_Bool bHasRtl = sal_False;
sal_uInt32 nDirCount = pPool->GetItemCount2( ATTR_WRITINGDIR );
for (sal_uInt32 nItem=0; nItem<nDirCount; nItem++)
{
const SfxPoolItem* pItem = pPool->GetItem2( ATTR_WRITINGDIR, nItem );
if ( pItem && ((const SvxFrameDirectionItem*)pItem)->GetValue() == FRMDIR_HORI_RIGHT_TOP )
{
- bHasRtl = TRUE;
+ bHasRtl = sal_True;
break;
}
}
@@ -4257,7 +4257,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
if ( nMask & HASATTR_RIGHTORCENTER )
{
// On a RTL sheet, don't start to look for the default left value
- // (which is then logically right), instead always assume TRUE.
+ // (which is then logically right), instead always assume sal_True.
// That way, ScAttrArray::HasAttrib doesn't have to handle RTL sheets.
if ( IsLayoutRTL(i) )
@@ -4271,7 +4271,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
return bFound;
}
-bool ScDocument::HasAttrib( const ScRange& rRange, USHORT nMask )
+bool ScDocument::HasAttrib( const ScRange& rRange, sal_uInt16 nMask )
{
return HasAttrib( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab(),
@@ -4342,7 +4342,7 @@ void ScDocument::GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
*ppBottom = pBottomLine;
}
-BOOL ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes ) const
{
if (VALIDTAB(nTab))
@@ -4350,7 +4350,7 @@ BOOL ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
return pTab[nTab]->IsBlockEmpty( nStartCol, nStartRow, nEndCol, nEndRow, bIgnoreNotes );
DBG_ERROR("Falsche Tabellennummer");
- return FALSE;
+ return sal_False;
}
@@ -4376,16 +4376,16 @@ void ScDocument::UnlockTable(SCTAB nTab)
}
-BOOL ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
- BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+ sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
// import into read-only document is possible
if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && pShell->IsReadOnly() )
{
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
+ return sal_False;
}
if (VALIDTAB(nTab))
@@ -4395,27 +4395,27 @@ BOOL ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
DBG_ERROR("Falsche Tabellennummer");
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
+ return sal_False;
}
-BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
- BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+sal_Bool ScDocument::IsSelectionEditable( const ScMarkData& rMark,
+ sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
// import into read-only document is possible
if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && pShell->IsReadOnly() )
{
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
+ return sal_False;
}
ScRange aRange;
rMark.GetMarkArea(aRange);
- BOOL bOk = TRUE;
- BOOL bMatrix = ( pOnlyNotBecauseOfMatrix != NULL );
+ sal_Bool bOk = sal_True;
+ sal_Bool bMatrix = ( pOnlyNotBecauseOfMatrix != NULL );
for ( SCTAB i=0; i<=MAXTAB && (bOk || bMatrix); i++ )
{
if ( pTab[i] && rMark.GetTableSelect(i) )
@@ -4426,7 +4426,7 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
aRange.aStart.Row(), aRange.aEnd.Col(),
aRange.aEnd.Row(), pOnlyNotBecauseOfMatrix ) )
{
- bOk = FALSE;
+ bOk = sal_False;
if ( pOnlyNotBecauseOfMatrix )
bMatrix = *pOnlyNotBecauseOfMatrix;
}
@@ -4435,7 +4435,7 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
{
if ( !pTab[i]->IsSelectionEditable( rMark, pOnlyNotBecauseOfMatrix ) )
{
- bOk = FALSE;
+ bOk = sal_False;
if ( pOnlyNotBecauseOfMatrix )
bMatrix = *pOnlyNotBecauseOfMatrix;
}
@@ -4450,26 +4450,26 @@ BOOL ScDocument::IsSelectionEditable( const ScMarkData& rMark,
}
-BOOL ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for (SCTAB i=0; i<=MAXTAB && bOk; i++)
if (pTab[i])
if (rMark.GetTableSelect(i))
if (pTab[i]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ))
- bOk = FALSE;
+ bOk = sal_False;
return !bOk;
}
-BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix )
+sal_Bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix )
{
// if rCell is part of a matrix formula, return its complete range
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ScBaseCell* pCell = GetCell( rCellPos );
if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA)
{
@@ -4501,7 +4501,7 @@ BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMat
rMatrix.aStart = aOrigin;
rMatrix.aEnd = aEnd;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -4510,10 +4510,10 @@ BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMat
}
-BOOL ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
+sal_Bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if ( ValidColRow(rStartCol,rStartRow) && ValidColRow(nEndCol,nEndRow) && ValidTab(nTab) )
{
if (pTab[nTab])
@@ -4565,13 +4565,13 @@ BOOL ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
}
-BOOL ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- const ScMarkData& rMark, BOOL bRefresh, BOOL bAttrs )
+ const ScMarkData& rMark, sal_Bool bRefresh, sal_Bool bAttrs )
{
// use all selected sheets from rMark
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nOldEndCol = rEndCol;
SCROW nOldEndRow = rEndRow;
@@ -4581,7 +4581,7 @@ BOOL ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
SCCOL nThisEndCol = nOldEndCol;
SCROW nThisEndRow = nOldEndRow;
if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, nTab, bRefresh, bAttrs ) )
- bFound = TRUE;
+ bFound = sal_True;
if ( nThisEndCol > rEndCol )
rEndCol = nThisEndCol;
if ( nThisEndRow > rEndRow )
@@ -4592,11 +4592,11 @@ BOOL ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- SCTAB nTab, BOOL bRefresh, BOOL bAttrs )
+ SCTAB nTab, sal_Bool bRefresh, sal_Bool bAttrs )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if ( ValidColRow(nStartCol,nStartRow) && ValidColRow(rEndCol,rEndRow) && ValidTab(nTab) )
{
if (pTab[nTab])
@@ -4614,9 +4614,9 @@ BOOL ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScDocument::ExtendMerge( ScRange& rRange, BOOL bRefresh, BOOL bAttrs )
+sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh, sal_Bool bAttrs )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCTAB nStartTab = rRange.aStart.Tab();
SCTAB nEndTab = rRange.aEnd.Tab();
SCCOL nEndCol = rRange.aEnd.Col();
@@ -4631,7 +4631,7 @@ BOOL ScDocument::ExtendMerge( ScRange& rRange, BOOL bRefresh, BOOL bAttrs )
nExtendCol, nExtendRow,
nTab, bRefresh, bAttrs ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if (nExtendCol > nEndCol) nEndCol = nExtendCol;
if (nExtendRow > nEndRow) nEndRow = nExtendRow;
}
@@ -4643,12 +4643,12 @@ BOOL ScDocument::ExtendMerge( ScRange& rRange, BOOL bRefresh, BOOL bAttrs )
return bFound;
}
-BOOL ScDocument::ExtendTotalMerge( ScRange& rRange )
+sal_Bool ScDocument::ExtendTotalMerge( ScRange& rRange )
{
// Bereich genau dann auf zusammengefasste Zellen erweitern, wenn
// dadurch keine neuen nicht-ueberdeckten Zellen getroffen werden
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ScRange aExt = rRange;
if (ExtendMerge(aExt))
{
@@ -4673,9 +4673,9 @@ BOOL ScDocument::ExtendTotalMerge( ScRange& rRange )
return bRet;
}
-BOOL ScDocument::ExtendOverlapped( ScRange& rRange )
+sal_Bool ScDocument::ExtendOverlapped( ScRange& rRange )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCTAB nStartTab = rRange.aStart.Tab();
SCTAB nEndTab = rRange.aEnd.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -4691,12 +4691,12 @@ BOOL ScDocument::ExtendOverlapped( ScRange& rRange )
if (nExtendCol < nStartCol)
{
nStartCol = nExtendCol;
- bFound = TRUE;
+ bFound = sal_True;
}
if (nExtendRow < nStartRow)
{
nStartRow = nExtendRow;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -4706,11 +4706,11 @@ BOOL ScDocument::ExtendOverlapped( ScRange& rRange )
return bFound;
}
-BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
{
- USHORT nCount = pDBCollection->GetCount();
- USHORT i;
+ sal_uInt16 nCount = pDBCollection->GetCount();
+ sal_uInt16 i;
ScDBData* pData;
SCTAB nDBTab;
SCCOL nDBStartCol;
@@ -4720,7 +4720,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
// Autofilter loeschen
- BOOL bChange = RemoveFlagsTab( nStartCol,nStartRow, nEndCol,nEndRow, nTab, SC_MF_AUTO );
+ sal_Bool bChange = RemoveFlagsTab( nStartCol,nStartRow, nEndCol,nEndRow, nTab, SC_MF_AUTO );
// Autofilter setzen
@@ -4735,7 +4735,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
{
if (ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow,
nDBTab, SC_MF_AUTO ))
- bChange = TRUE;
+ bChange = sal_True;
}
}
}
@@ -4743,7 +4743,7 @@ BOOL ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
const ScMergeFlagAttr* pAttr = (const ScMergeFlagAttr*)
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG );
@@ -4752,12 +4752,12 @@ BOOL ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
else
{
DBG_ERROR("Overlapped: Attr==0");
- return FALSE;
+ return sal_False;
}
}
-BOOL ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
+sal_Bool ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
{
const ScMergeFlagAttr* pAttr = (const ScMergeFlagAttr*)
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG );
@@ -4766,7 +4766,7 @@ BOOL ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
else
{
DBG_ERROR("Overlapped: Attr==0");
- return FALSE;
+ return sal_False;
}
}
@@ -4776,13 +4776,13 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
const SvxBoxInfoItem* pLineInner )
{
ScRangeList aRangeList;
- rMark.FillRangeListWithMarks( &aRangeList, FALSE );
- ULONG nRangeCount = aRangeList.Count();
+ rMark.FillRangeListWithMarks( &aRangeList, sal_False );
+ sal_uLong nRangeCount = aRangeList.Count();
for (SCTAB i=0; i<=MAXTAB; i++)
{
if (pTab[i] && rMark.GetTableSelect(i))
{
- for (ULONG j=0; j<nRangeCount; j++)
+ for (sal_uLong j=0; j<nRangeCount; j++)
{
ScRange aRange = *aRangeList.GetObject(j);
pTab[i]->ApplyBlockFrame( pLineOuter, pLineInner,
@@ -4811,11 +4811,11 @@ void ScDocument::ApplyFrameAreaTab( const ScRange& rRange,
void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark )
{
const SfxItemSet* pSet = &rAttr.GetItemSet();
- BOOL bSet = FALSE;
- USHORT i;
+ sal_Bool bSet = sal_False;
+ sal_uInt16 i;
for (i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END && !bSet; i++)
if (pSet->GetItemState(i) == SFX_ITEM_SET)
- bSet = TRUE;
+ bSet = sal_True;
if (bSet)
{
@@ -4839,7 +4839,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
}
-void ScDocument::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark )
+void ScDocument::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark )
{
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i] && rMark.GetTableSelect(i))
@@ -4847,7 +4847,7 @@ void ScDocument::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark
}
-void ScDocument::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark )
+void ScDocument::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark )
{
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i] && rMark.GetTableSelect(i))
@@ -4855,7 +4855,7 @@ void ScDocument::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rM
}
-void ScDocument::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
+void ScDocument::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i] && rMark.GetTableSelect(i))
@@ -4863,7 +4863,7 @@ void ScDocument::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
}
-void ScDocument::DeleteSelectionTab( SCTAB nTab, USHORT nDelFlag, const ScMarkData& rMark )
+void ScDocument::DeleteSelectionTab( SCTAB nTab, sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
if (ValidTab(nTab) && pTab[nTab])
pTab[nTab]->DeleteSelection( nDelFlag, rMark );
@@ -4919,12 +4919,12 @@ void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX
void ScDocument::GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
- BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark )
+ sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark )
{
DBG_ASSERT( !nMovX || !nMovY, "GetNextPos: nur X oder Y" );
ScMarkData aCopyMark = rMark;
- aCopyMark.SetMarking(FALSE);
+ aCopyMark.SetMarking(sal_False);
aCopyMark.MarkToMulti();
if (ValidTab(nTab) && pTab[nTab])
@@ -4972,9 +4972,9 @@ void ScDocument::StylesToNames()
}
-ULONG ScDocument::GetCellCount() const
+sal_uLong ScDocument::GetCellCount() const
{
- ULONG nCellCount = 0L;
+ sal_uLong nCellCount = 0L;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] )
@@ -4991,9 +4991,9 @@ SCSIZE ScDocument::GetCellCount(SCTAB nTab, SCCOL nCol) const
return pTab[nTab]->GetCellCount(nCol);
}
-ULONG ScDocument::GetCodeCount() const
+sal_uLong ScDocument::GetCodeCount() const
{
- ULONG nCodeCount = 0;
+ sal_uLong nCodeCount = 0;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] )
@@ -5003,9 +5003,9 @@ ULONG ScDocument::GetCodeCount() const
}
-ULONG ScDocument::GetWeightedCount() const
+sal_uLong ScDocument::GetWeightedCount() const
{
- ULONG nCellCount = 0L;
+ sal_uLong nCellCount = 0L;
for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
if ( pTab[nTab] )
@@ -5078,13 +5078,13 @@ void ScDocument::RemoveManualBreaks( SCTAB nTab )
pTab[nTab]->RemoveManualBreaks();
}
-BOOL ScDocument::HasManualBreaks( SCTAB nTab ) const
+sal_Bool ScDocument::HasManualBreaks( SCTAB nTab ) const
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->HasManualBreaks();
DBG_ERROR("falsche Tab");
- return FALSE;
+ return sal_False;
}
@@ -5096,9 +5096,9 @@ void ScDocument::GetDocStat( ScDocStat& rDocStat )
}
-BOOL ScDocument::HasPrintRange()
+sal_Bool ScDocument::HasPrintRange()
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
for ( SCTAB i=0; !bResult && i<nMaxTableNumber; i++ )
if ( pTab[i] )
@@ -5108,13 +5108,13 @@ BOOL ScDocument::HasPrintRange()
}
-BOOL ScDocument::IsPrintEntireSheet( SCTAB nTab ) const
+sal_Bool ScDocument::IsPrintEntireSheet( SCTAB nTab ) const
{
return (ValidTab(nTab) ) && pTab[nTab] && pTab[nTab]->IsPrintEntireSheet();
}
-USHORT ScDocument::GetPrintRangeCount( SCTAB nTab )
+sal_uInt16 ScDocument::GetPrintRangeCount( SCTAB nTab )
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetPrintRangeCount();
@@ -5123,7 +5123,7 @@ USHORT ScDocument::GetPrintRangeCount( SCTAB nTab )
}
-const ScRange* ScDocument::GetPrintRange( SCTAB nTab, USHORT nPos )
+const ScRange* ScDocument::GetPrintRange( SCTAB nTab, sal_uInt16 nPos )
{
if (ValidTab(nTab) && pTab[nTab])
return pTab[nTab]->GetPrintRange(nPos);
@@ -5212,7 +5212,7 @@ void ScDocument::RestorePrintRanges( const ScPrintRangeSaver& rSaver )
}
-BOOL ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
+sal_Bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
{
// Die Seitennummern-Zaehlung faengt bei einer Tabelle neu an, wenn eine
// andere Vorlage als bei der vorherigen gesetzt ist (nur Namen vergleichen)
@@ -5227,14 +5227,14 @@ BOOL ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
if ( pStyle )
{
const SfxItemSet& rSet = pStyle->GetItemSet();
- USHORT nFirst = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_FIRSTPAGENO)).GetValue();
+ sal_uInt16 nFirst = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_FIRSTPAGENO)).GetValue();
if ( nFirst != 0 )
- return TRUE; // Seitennummer in neuer Vorlage angegeben
+ return sal_True; // Seitennummer in neuer Vorlage angegeben
}
}
}
- return FALSE; // sonst nicht
+ return sal_False; // sonst nicht
}
SfxUndoManager* ScDocument::GetUndoManager()
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index d97900e6b904..0876e814167c 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -66,7 +66,7 @@ using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::sheet::DataPilotFieldFilter;
-static BOOL lcl_HasQueryEntry( const ScQueryParam& rParam )
+static sal_Bool lcl_HasQueryEntry( const ScQueryParam& rParam )
{
return rParam.GetEntryCount() > 0 &&
rParam.GetEntry(0).bDoQuery;
@@ -183,7 +183,7 @@ sal_Int32 ScDPCacheTable::getColSize() const
return GetCache()->GetColumnCount();
}
-void ScDPCacheTable::fillTable( const ScQueryParam& rQuery, BOOL* pSpecial,
+void ScDPCacheTable::fillTable( const ScQueryParam& rQuery, sal_Bool* pSpecial,
bool bIgnoreEmptyRows, bool bRepeatIfEmpty )
{
if ( mpCache == NULL )
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 21669eb7a435..9e418bf3c300 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -116,7 +116,7 @@ void ScDPSaveGroupItem::AddToData( ScDPGroupDimension& rDataDim, SvNumberFormatt
sal_uInt32 nFormat = 0; //! ...
double fValue;
if ( pFormatter->IsNumberFormat( *aIter, nFormat, fValue ) )
- aData = ScDPItemData( *aIter, fValue, TRUE );
+ aData = ScDPItemData( *aIter, fValue, sal_True );
else
aData.SetString( *aIter );
@@ -257,7 +257,7 @@ bool ScDPSaveGroupDimension::HasOnlyHidden( const ScStrCollection& rVisible )
for ( ScDPSaveGroupItemVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end() && bAllHidden; aIter++ )
{
StrData aSearch( aIter->GetGroupName() );
- USHORT nCollIndex;
+ sal_uInt16 nCollIndex;
if ( rVisible.Search( &aSearch, nCollIndex ) )
bAllHidden = false; // found one that is visible
}
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
index 6b84d37d8d0f..61161f333cd3 100755..100644
--- a/sc/source/core/data/dpglobal.cxx
+++ b/sc/source/core/data/dpglobal.cxx
@@ -47,23 +47,23 @@ namespace ScDPGlobal
return rcResult;
}
- String GetFuncString( const String &rString, const USHORT nIndex )
+ String GetFuncString( const String &rString, const sal_uInt16 nIndex )
{
if ( nIndex <= 1 ) return rString;
- ULONG uch = rString.Len() ? rString.GetChar( rString.Len()-1 ) : (L'9'+1);
+ sal_uLong uch = rString.Len() ? rString.GetChar( rString.Len()-1 ) : (L'9'+1);
bool bEndWithDigital = ( L'0'<=uch && uch<=L'9');
char szTemp[__MAX_NUM_LEN+1];
int nLen = sprintf( szTemp, bEndWithDigital ? DATA_RENAME_SEPARATOR"%hu" : "%hu", nIndex );
String strRet = rString;
- strRet.Append( String::CreateFromAscii( szTemp, static_cast<USHORT>(nLen) ));
+ strRet.Append( String::CreateFromAscii( szTemp, static_cast<sal_uInt16>(nLen) ));
return strRet;
}
- bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list<ScDPObject> & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, USHORT nEndTab, BOOL bExcludeClip /*= FALSE*/ )
+ bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list<ScDPObject> & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, sal_uInt16 nEndTab, sal_Bool bExcludeClip /*= sal_False*/ )
{
if ( ScDPCollection* pDPCollection = pDestDoc->GetDPCollection() )
{
- USHORT nCount = pDPCollection->GetCount();
+ sal_uInt16 nCount = pDPCollection->GetCount();
SCsCOL nOffsetX = nStartCol - nClipStartCol;
SCsROW nOffsetY = nStartRow - nClipStartRow;
@@ -71,12 +71,12 @@ namespace ScDPGlobal
{
ScRange aRange = iter->GetOutRange();
- for( USHORT nCurrTab = nStartTab; nCurrTab<=nEndTab; nCurrTab++ )
+ for( sal_uInt16 nCurrTab = nStartTab; nCurrTab<=nEndTab; nCurrTab++ )
{
SCsTAB nOffsetZ = nCurrTab - aRange.aStart.Tab();
aRange.Move( nOffsetX, nOffsetY, nOffsetZ );
- for ( USHORT i = 0; i<nCount; i++)
+ for ( sal_uInt16 i = 0; i<nCount; i++)
{
if ( (*pDPCollection)[i] && aRange.Intersects( (*pDPCollection)[i]->GetOutRange()))
{
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index edb3b787b9b2..4d91544e42c8 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -72,7 +72,7 @@ using ::boost::shared_ptr;
#define D_TIMEFACTOR 86400.0
-const USHORT SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calculations
+const sal_uInt16 SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calculations
// part values for the extra "<" and ">" entries (same for all parts)
const sal_Int32 SC_DP_DATE_FIRST = -1;
@@ -81,10 +81,10 @@ const sal_Int32 SC_DP_DATE_LAST = 10000;
// ============================================================================
namespace
{
- BOOL lcl_Search( SCCOL nSourceDim, ScDPTableDataCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex)
+ sal_Bool lcl_Search( SCCOL nSourceDim, ScDPTableDataCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex)
{
rIndex = vIdx.size();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCROW nLo = 0;
SCROW nHi = vIdx.size() - 1;
SCROW nIndex;
@@ -104,7 +104,7 @@ namespace
nHi = nIndex - 1;
if (nCompare == 0)
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -145,7 +145,7 @@ namespace
template<bool bUpdateData>
void lcl_InsertValue ( SCCOL nSourceDim, ScDPTableDataCache* pCache , std::vector< SCROW >& vIdx, const String& rString, const double& fValue )
{
- lcl_InsertValue<bUpdateData>( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, TRUE ) );
+ lcl_InsertValue<bUpdateData>( nSourceDim, pCache, vIdx, ScDPItemData( rString, fValue, sal_True ) );
}
template<bool bUpdateData>
@@ -156,7 +156,7 @@ namespace
void lcl_AppendDateStr( rtl::OUStringBuffer& rBuffer, double fValue, SvNumberFormatter* pFormatter )
{
- ULONG nFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
+ sal_uLong nFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge );
String aString;
pFormatter->GetInputLineString( fValue, nFormat, aString );
rBuffer.append( aString );
@@ -447,7 +447,7 @@ String lcl_GetDateGroupName( sal_Int32 nDatePart, sal_Int32 nValue, SvNumberForm
Date aNullDate = *(pFormatter->GetNullDate());
long nDays = aDate - aNullDate;
- ULONG nFormat = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMM, ScGlobal::eLnge );
+ sal_uLong nFormat = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMM, ScGlobal::eLnge );
Color* pColor;
pFormatter->GetOutputString( nDays, nFormat, aRet, &pColor );
}
@@ -539,7 +539,7 @@ sal_Int32 lcl_GetDatePartValue( double fValue, sal_Int32 nDatePart, SvNumberForm
return nResult;
}
-BOOL lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
+sal_Bool lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
sal_Int32 nBasePart, const ScDPItemData& rBaseData )
{
if ( !rGroupData.IsValue() || !rBaseData.IsValue() )
@@ -569,7 +569,7 @@ BOOL lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
return ( nGroupValue == nBaseValue );
}
- BOOL bContained = TRUE;
+ sal_Bool bContained = sal_True;
switch ( nBasePart ) // inner part
{
case com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS:
@@ -1145,13 +1145,13 @@ String ScDPGroupTableData::getDimensionName(long nColumn)
return pSourceData->getDimensionName( nColumn );
}
-BOOL ScDPGroupTableData::getIsDataLayoutDimension(long nColumn)
+sal_Bool ScDPGroupTableData::getIsDataLayoutDimension(long nColumn)
{
// position of data layout dimension is moved from source data
return ( nColumn == sal::static_int_cast<long>( nSourceCount + aGroups.size() ) ); // data layout dimension?
}
-BOOL ScDPGroupTableData::IsDateDimension(long nDim)
+sal_Bool ScDPGroupTableData::IsDateDimension(long nDim)
{
if ( nDim >= nSourceCount )
{
@@ -1164,7 +1164,7 @@ BOOL ScDPGroupTableData::IsDateDimension(long nDim)
return pSourceData->IsDateDimension( nDim );
}
-ULONG ScDPGroupTableData::GetNumberFormat(long nDim)
+sal_uLong ScDPGroupTableData::GetNumberFormat(long nDim)
{
if ( nDim >= nSourceCount )
{
@@ -1188,7 +1188,7 @@ void ScDPGroupTableData::DisposeData()
pSourceData->DisposeData();
}
-void ScDPGroupTableData::SetEmptyFlags( BOOL bIgnoreEmptyRows, BOOL bRepeatIfEmpty )
+void ScDPGroupTableData::SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty )
{
pSourceData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
}
@@ -1392,7 +1392,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
double fGroupValue;
String aGroupName = lcl_GetNumGroupForValue( pData->GetValue(),
aNumInfo, bHasNonInteger, cDecSeparator, fGroupValue, pDoc );
- ScDPItemData aItemData ( aGroupName, fGroupValue, TRUE ) ;
+ ScDPItemData aItemData ( aGroupName, fGroupValue, sal_True ) ;
pItemDataIndex[nDim] = pCache->GetAdditionalItemID( aItemData );
}
// else (textual) keep original value
@@ -1418,16 +1418,16 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
}
}
-BOOL ScDPGroupTableData::IsBaseForGroup(long nDim) const
+sal_Bool ScDPGroupTableData::IsBaseForGroup(long nDim) const
{
for ( ScDPGroupDimensionVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end(); aIter++ )
{
const ScDPGroupDimension& rDim = *aIter;
if ( rDim.GetSourceDim() == nDim )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
long ScDPGroupTableData::GetGroupBase(long nGroupDim) const
@@ -1442,7 +1442,7 @@ long ScDPGroupTableData::GetGroupBase(long nGroupDim) const
return -1; // none
}
-BOOL ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
+sal_Bool ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
{
// Virtual method from ScDPTableData, used in result data to force text labels.
@@ -1459,10 +1459,10 @@ BOOL ScDPGroupTableData::IsNumOrDateGroup(long nDimension) const
return ( rDim.GetDateHelper() != NULL );
}
- return FALSE;
+ return sal_False;
}
-BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
+sal_Bool ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
const ScDPItemData& rBaseData, long nBaseIndex ) const
{
for ( ScDPGroupDimensionVec::const_iterator aIter(aGroups.begin()); aIter != aGroups.end(); aIter++ )
@@ -1486,7 +1486,7 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
if ( !pBaseDateHelper )
{
DBG_ERROR( "mix of date and non-date groups" );
- return TRUE;
+ return sal_True;
}
sal_Int32 nGroupPart = pGroupDateHelper->GetDatePart();
@@ -1506,10 +1506,10 @@ BOOL ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, long nGroupI
}
DBG_ERROR("IsInGroup: no group dimension found");
- return TRUE;
+ return sal_True;
}
-BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex,
+sal_Bool ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex,
const ScDPItemData& rSecondData, long nSecondIndex ) const
{
const ScDPGroupDimension* pFirstDim = NULL;
@@ -1532,7 +1532,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
if ( !pFirstDateHelper || !pSecondDateHelper )
{
DBG_ERROR( "mix of date and non-date groups" );
- return TRUE;
+ return sal_True;
}
sal_Int32 nFirstPart = pFirstDateHelper->GetDatePart();
@@ -1544,7 +1544,7 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
const ScDPGroupItem* pSecondItem = pSecondDim->GetGroupForName( rSecondData );
if ( pFirstItem && pSecondItem )
{
- // two existing groups -> TRUE if they have a common element
+ // two existing groups -> sal_True if they have a common element
return pFirstItem->HasCommonElement( *pSecondItem );
}
else if ( pFirstItem )
@@ -1559,13 +1559,13 @@ BOOL ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, long
}
else
{
- // no groups -> TRUE if equal
+ // no groups -> sal_True if equal
return rFirstData.IsCaseInsEqual( rSecondData );
}
}
DBG_ERROR("HasCommonElement: no group dimension found");
- return TRUE;
+ return sal_True;
}
long ScDPGroupTableData::GetSourceDim( long nDim )
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 29ba9f15dc92..149c712fbdcf 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -130,7 +130,7 @@ using ::rtl::OUString;
// -----------------------------------------------------------------------
-USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplier>& xSource )
+sal_uInt16 lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplier>& xSource )
{
long nRet = sheet::DataPilotFieldOrientation_HIDDEN;
if ( xSource.is() )
@@ -138,7 +138,7 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplie
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName );
long nIntCount = xIntDims->getCount();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (long nIntDim=0; nIntDim<nIntCount && !bFound; nIntDim++)
{
uno::Reference<uno::XInterface> xIntDim =
@@ -156,7 +156,7 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplie
}
}
}
- return static_cast< USHORT >( nRet );
+ return static_cast< sal_uInt16 >( nRet );
}
// -----------------------------------------------------------------------
@@ -169,13 +169,13 @@ ScDPObject::ScDPObject( ScDocument* pD ) :
pServDesc( NULL ),
mpTableData(static_cast<ScDPTableData*>(NULL)),
pOutput( NULL ),
- bSettingsChanged( FALSE ),
- bAlive( FALSE ),
+ bSettingsChanged( sal_False ),
+ bAlive( sal_False ),
mnAutoFormatIndex( 65535 ),
- bAllowMove( FALSE ),
+ bAllowMove( sal_False ),
nHeaderRows( 0 ),
mbHeaderLayout(false),
- bRefresh( FALSE ), // Wang Xu Ming - DataPilot migration
+ bRefresh( sal_False ), // Wang Xu Ming - DataPilot migration
mnCacheId( -1) // Wang Xu Ming - DataPilot migration
{
}
@@ -192,10 +192,10 @@ ScDPObject::ScDPObject(const ScDPObject& r) :
pServDesc( NULL ),
mpTableData(static_cast<ScDPTableData*>(NULL)),
pOutput( NULL ),
- bSettingsChanged( FALSE ),
- bAlive( FALSE ),
+ bSettingsChanged( sal_False ),
+ bAlive( sal_False ),
mnAutoFormatIndex( r.mnAutoFormatIndex ),
- bAllowMove( FALSE ),
+ bAllowMove( sal_False ),
nHeaderRows( r.nHeaderRows ),
mbHeaderLayout( r.mbHeaderLayout ),
bRefresh( r.bRefresh ), // Wang Xu Ming - DataPilot migration
@@ -228,12 +228,12 @@ ScDataObject* ScDPObject::Clone() const
return new ScDPObject(*this);
}
-void ScDPObject::SetAlive(BOOL bSet)
+void ScDPObject::SetAlive(sal_Bool bSet)
{
bAlive = bSet;
}
-void ScDPObject::SetAllowMove(BOOL bSet)
+void ScDPObject::SetAllowMove(sal_Bool bSet)
{
bAllowMove = bSet;
}
@@ -301,7 +301,7 @@ void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc)
pSheetDesc->aQueryParam.nRow1 = pSheetDesc->aSourceRange.aStart.Row();
pSheetDesc->aQueryParam.nCol2 = pSheetDesc->aSourceRange.aEnd.Col();
pSheetDesc->aQueryParam.nRow2 = pSheetDesc->aSourceRange.aEnd.Row();;
- pSheetDesc->aQueryParam.bHasHeader = TRUE;
+ pSheetDesc->aQueryParam.bHasHeader = sal_True;
InvalidateSource(); // new source must be created
}
@@ -354,7 +354,7 @@ void ScDPObject::WriteTempDataTo( ScDPObject& rDest ) const
rDest.nHeaderRows = nHeaderRows;
}
-BOOL ScDPObject::IsSheetData() const
+sal_Bool ScDPObject::IsSheetData() const
{
return ( pSheetDesc != NULL );
}
@@ -396,7 +396,7 @@ void ScDPObject::CreateOutput()
CreateObjects();
if (!pOutput)
{
- BOOL bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton();
+ sal_Bool bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton();
pOutput = new ScDPOutput( pDoc, xSource, aOutRange.aStart, bFilterButton );
pOutput->SetHeaderLayout ( mbHeaderLayout );
@@ -421,7 +421,7 @@ void ScDPObject::CreateOutput()
//! modify aOutRange?
- bAllowMove = FALSE; // use only once
+ bAllowMove = sal_False; // use only once
}
}
}
@@ -500,7 +500,7 @@ void ScDPObject::CreateObjects()
if ( pSaveData && bRefresh )
{
pSaveData->Refresh( xSource );
- bRefresh = FALSE;
+ bRefresh = sal_False;
}
}
if (pSaveData )
@@ -526,12 +526,12 @@ void ScDPObject::CreateObjects()
if (pSaveData)
pSaveData->WriteToSource( xSource );
}
- bSettingsChanged = FALSE;
+ bSettingsChanged = sal_False;
}
void ScDPObject::InvalidateData()
{
- bSettingsChanged = TRUE;
+ bSettingsChanged = sal_True;
}
void ScDPObject::InvalidateSource()
@@ -552,7 +552,7 @@ void ScDPObject::InvalidateSource()
mpTableData.reset();
}
-ScRange ScDPObject::GetNewOutputRange( BOOL& rOverflow )
+ScRange ScDPObject::GetNewOutputRange( sal_Bool& rOverflow )
{
CreateOutput(); // create xSource and pOutput if not already done
@@ -599,7 +599,7 @@ const ScRange ScDPObject::GetOutputRangeByType( sal_Int32 nType )
return pOutput->GetOutputRange(nType);
}
-BOOL lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+sal_Bool lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
return ((const ScMergeFlagAttr*)pDoc->GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->HasButton();
}
@@ -624,7 +624,7 @@ void ScDPObject::RefreshAfterLoad()
pDoc->IsBlockEmpty( nTab, nFirstCol, nFirstRow + nInitial, nFirstCol, nFirstRow + nInitial ) &&
aOutRange.aEnd.Col() > nFirstCol )
{
- BOOL bFilterButton = IsSheetData(); // when available, filter button setting must be checked here
+ sal_Bool bFilterButton = IsSheetData(); // when available, filter button setting must be checked here
SCROW nSkip = bFilterButton ? 1 : 0;
for (SCROW nPos=nSkip; nPos<nInitial; nPos++)
@@ -756,23 +756,23 @@ void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode,
}
}
-BOOL ScDPObject::RefsEqual( const ScDPObject& r ) const
+sal_Bool ScDPObject::RefsEqual( const ScDPObject& r ) const
{
if ( aOutRange != r.aOutRange )
- return FALSE;
+ return sal_False;
if ( pSheetDesc && r.pSheetDesc )
{
if ( pSheetDesc->aSourceRange != r.pSheetDesc->aSourceRange )
- return FALSE;
+ return sal_False;
}
else if ( pSheetDesc || r.pSheetDesc )
{
DBG_ERROR("RefsEqual: SheetDesc set at only one object");
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScDPObject::WriteRefsTo( ScDPObject& r ) const
@@ -846,9 +846,9 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const
return false;
}
-String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags )
+String ScDPObject::GetDimName( long nDim, sal_Bool& rIsDataLayout, sal_Int32* pFlags )
{
- rIsDataLayout = FALSE;
+ rIsDataLayout = sal_False;
String aRet;
if ( xSource.is() )
@@ -864,7 +864,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
uno::Reference<beans::XPropertySet> xDimProp( xIntDim, uno::UNO_QUERY );
if ( xDimName.is() && xDimProp.is() )
{
- BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
//! error checking -- is "IsDataLayoutDimension" property required??
@@ -877,7 +877,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
{
}
if ( bData )
- rIsDataLayout = TRUE;
+ rIsDataLayout = sal_True;
else
aRet = String( aName );
@@ -891,9 +891,9 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
return aRet;
}
-BOOL ScDPObject::IsDuplicated( long nDim )
+sal_Bool ScDPObject::IsDuplicated( long nDim )
{
- BOOL bDuplicated = FALSE;
+ sal_Bool bDuplicated = sal_False;
if ( xSource.is() )
{
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
@@ -912,7 +912,7 @@ BOOL ScDPObject::IsDuplicated( long nDim )
rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
- bDuplicated = TRUE;
+ bDuplicated = sal_True;
}
catch(uno::Exception&)
{
@@ -1051,8 +1051,8 @@ void ScDPObject::GetHeaderPositionData(const ScAddress& rPos, DataPilotTableHead
aPosData.PositionData >>= rData;
}
-// Returns TRUE on success and stores the result in rTarget
-BOOL ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget,
+// Returns sal_True on success and stores the result in rTarget
+sal_Bool ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget,
const std::vector< ScDPGetPivotDataField >& rFilters )
{
CreateOutput(); // create xSource and pOutput if not already done
@@ -1060,22 +1060,22 @@ BOOL ScDPObject::GetPivotData( ScDPGetPivotDataField& rTarget,
return pOutput->GetPivotData( rTarget, rFilters );
}
-BOOL ScDPObject::IsFilterButton( const ScAddress& rPos )
+sal_Bool ScDPObject::IsFilterButton( const ScAddress& rPos )
{
CreateOutput(); // create xSource and pOutput if not already done
return pOutput->IsFilterButton( rPos );
}
-long ScDPObject::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
+long ScDPObject::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient )
{
CreateOutput(); // create xSource and pOutput if not already done
return pOutput->GetHeaderDim( rPos, rOrient );
}
-BOOL ScDPObject::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMouseTop, long nDragDim,
- Rectangle& rPosRect, USHORT& rOrient, long& rDimPos )
+sal_Bool ScDPObject::GetHeaderDrag( const ScAddress& rPos, sal_Bool bMouseLeft, sal_Bool bMouseTop, long nDragDim,
+ Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos )
{
CreateOutput(); // create xSource and pOutput if not already done
@@ -1311,7 +1311,7 @@ bool lcl_IsAtStart( const String& rList, const String& rSearch, sal_Int32& rMatc
return false;
}
-BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
+sal_Bool ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
std::vector< ScDPGetPivotDataField >& rFilters,
const String& rFilterList )
{
@@ -1337,7 +1337,7 @@ BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
uno::Reference<container::XNamed> xDim( xIntDim, uno::UNO_QUERY );
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY );
- BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty(
xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
@@ -1547,7 +1547,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
String aDimName = xDim->getName();
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
- BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
if (bDataLayout)
{
@@ -1593,8 +1593,8 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
if ( xMbrSupp.is() )
xMembers = xMbrSupp->getMembers();
- BOOL bFound = FALSE;
- BOOL bShowDetails = TRUE;
+ sal_Bool bFound = sal_False;
+ sal_Bool bShowDetails = sal_True;
if ( xMembers.is() )
{
@@ -1608,7 +1608,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp,
rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS) );
//! don't set bFound if property is unknown?
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -1647,7 +1647,7 @@ long lcl_FindName( const rtl::OUString& rString, const uno::Reference<container:
return -1; // not found
}
-USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp ) // PIVOT_FUNC mask
+sal_uInt16 lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp ) // PIVOT_FUNC mask
{
uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDimProp, uno::UNO_QUERY );
if ( xDimProp.is() && xDimSupp.is() )
@@ -1681,7 +1681,7 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
uno::Sequence<sheet::GeneralFunction> aSeq;
if ( aSubAny >>= aSeq )
{
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
const sheet::GeneralFunction* pArray = aSeq.getConstArray();
long nCount = aSeq.getLength();
for (long i=0; i<nCount; i++)
@@ -1696,13 +1696,13 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
return 0;
}
-USHORT lcl_CountBits( USHORT nBits )
+sal_uInt16 lcl_CountBits( sal_uInt16 nBits )
{
if (!nBits) return 0;
- USHORT nCount = 0;
- USHORT nMask = 1;
- for (USHORT i=0; i<16; i++)
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nMask = 1;
+ for (sal_uInt16 i=0; i<16; i++)
{
if ( nBits & nMask )
++nCount;
@@ -1713,10 +1713,10 @@ USHORT lcl_CountBits( USHORT nBits )
SCSIZE lcl_FillOldFields( PivotField* pFields,
const uno::Reference<sheet::XDimensionsSupplier>& xSource,
- USHORT nOrient, SCCOL nColAdd, BOOL bAddData )
+ sal_uInt16 nOrient, SCCOL nColAdd, sal_Bool bAddData )
{
SCSIZE nOutCount = 0;
- BOOL bDataFound = FALSE;
+ sal_Bool bDataFound = sal_False;
SCSIZE nCount = (nOrient == sheet::DataPilotFieldOrientation_PAGE) ? PIVOT_MAXPAGEFIELD : PIVOT_MAXFIELD;
@@ -1738,7 +1738,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
sheet::DataPilotFieldOrientation_HIDDEN );
if ( xDimProp.is() && nDimOrient == nOrient )
{
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if ( nOrient == sheet::DataPilotFieldOrientation_DATA )
{
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
@@ -1754,7 +1754,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
else
nMask = lcl_FirstSubTotal( xDimProp ); // from first hierarchy
- BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
uno::Any aOrigAny;
try
@@ -1775,7 +1775,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
nDupSource = lcl_FindName( xNameOrig->getName(), xDimsName );
}
- BOOL bDupUsed = FALSE;
+ sal_Bool bDupUsed = sal_False;
if ( nDupSource >= 0 )
{
// add function bit to previous entry
@@ -1794,7 +1794,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
{
pFields[nOld].nFuncMask |= nMask;
pFields[nOld].nFuncCount = lcl_CountBits( pFields[nOld].nFuncMask );
- bDupUsed = TRUE;
+ bDupUsed = sal_True;
}
}
}
@@ -1804,7 +1804,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
if ( bDataLayout )
{
pFields[nOutCount].nCol = PIVOT_DATA_FIELD;
- bDataFound = TRUE;
+ bDataFound = sal_True;
}
else if ( nDupSource >= 0 ) // if source was not found (different orientation)
pFields[nOutCount].nCol = static_cast<SCsCOL>(nDupSource)+nColAdd; //! seek from name
@@ -1856,7 +1856,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
return nOutCount;
}
-BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
+sal_Bool ScDPObject::FillOldParam(ScPivotParam& rParam, sal_Bool bForFile) const
{
((ScDPObject*)this)->CreateObjects(); // xSource is needed for field numbers
@@ -1874,15 +1874,15 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
nColAdd = pSheetDesc->aSourceRange.aStart.Col();
}
- BOOL bAddData = ( lcl_GetDataGetOrientation( xSource ) == sheet::DataPilotFieldOrientation_HIDDEN );
+ sal_Bool bAddData = ( lcl_GetDataGetOrientation( xSource ) == sheet::DataPilotFieldOrientation_HIDDEN );
rParam.nPageCount = lcl_FillOldFields( rParam.aPageArr,
- xSource, sheet::DataPilotFieldOrientation_PAGE, nColAdd, FALSE );
+ xSource, sheet::DataPilotFieldOrientation_PAGE, nColAdd, sal_False );
rParam.nColCount = lcl_FillOldFields( rParam.aColArr,
xSource, sheet::DataPilotFieldOrientation_COLUMN, nColAdd, bAddData );
rParam.nRowCount = lcl_FillOldFields( rParam.aRowArr,
- xSource, sheet::DataPilotFieldOrientation_ROW, nColAdd, FALSE );
+ xSource, sheet::DataPilotFieldOrientation_ROW, nColAdd, sal_False );
rParam.nDataCount = lcl_FillOldFields( rParam.aDataArr,
- xSource, sheet::DataPilotFieldOrientation_DATA, nColAdd, FALSE );
+ xSource, sheet::DataPilotFieldOrientation_DATA, nColAdd, sal_False );
uno::Reference<beans::XPropertySet> xProp( xSource, uno::UNO_QUERY );
if (xProp.is())
@@ -1890,9 +1890,9 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
try
{
rParam.bMakeTotalCol = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), TRUE );
+ rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), sal_True );
rParam.bMakeTotalRow = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), TRUE );
+ rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), sal_True );
// following properties may be missing for external sources
rParam.bIgnoreEmptyRows = ScUnoHelpFunctions::GetBoolProperty( xProp,
@@ -1905,7 +1905,7 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
// no error
}
}
- return TRUE;
+ return sal_True;
}
void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XPropertySet >& xDimProp )
@@ -1952,7 +1952,7 @@ void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XProp
}
}
-BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
+sal_Bool ScDPObject::FillLabelData(ScPivotParam& rParam)
{
rParam.maLabelArray.clear();
@@ -1964,7 +1964,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
if ( nDimCount > MAX_LABELS )
nDimCount = MAX_LABELS;
if (!nDimCount)
- return FALSE;
+ return sal_False;
for (long nDim=0; nDim < nDimCount; nDim++)
{
@@ -1976,8 +1976,8 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
if ( xDimName.is() && xDimProp.is() )
{
- BOOL bDuplicated = FALSE;
- BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ sal_Bool bDuplicated = sal_False;
+ sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
//! error checking -- is "IsDataLayoutDimension" property required??
@@ -1989,7 +1989,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
- bDuplicated = TRUE;
+ bDuplicated = sal_True;
}
catch(uno::Exception&)
{
@@ -2015,12 +2015,12 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
}
}
- return TRUE;
+ return sal_True;
}
-BOOL ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xHiers )
+sal_Bool ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xHiers )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
uno::Reference<container::XNameAccess> xDimsName( GetSource()->getDimensions() );
uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName ));
if( xIntDims.is() )
@@ -2035,14 +2035,14 @@ BOOL ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XN
return bRet;
}
-BOOL ScDPObject::GetHierarchies( sal_Int32 nDim, uno::Sequence< rtl::OUString >& rHiers )
+sal_Bool ScDPObject::GetHierarchies( sal_Int32 nDim, uno::Sequence< rtl::OUString >& rHiers )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
uno::Reference< container::XNameAccess > xHiersNA;
if( GetHierarchiesNA( nDim, xHiersNA ) )
{
rHiers = xHiersNA->getElementNames();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -2058,14 +2058,14 @@ sal_Int32 ScDPObject::GetUsedHierarchy( sal_Int32 nDim )
return nHier;
}
-BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xMembers )
+sal_Bool ScDPObject::GetMembersNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xMembers )
{
return GetMembersNA( nDim, GetUsedHierarchy( nDim ), xMembers );
}
-BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference< container::XNameAccess >& xMembers )
+sal_Bool ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference< container::XNameAccess >& xMembers )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
uno::Reference<container::XNameAccess> xDimsName( GetSource()->getDimensions() );
uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName ));
uno::Reference<beans::XPropertySet> xDim(xIntDims->getByIndex( nDim ), uno::UNO_QUERY);
@@ -2088,7 +2088,7 @@ BOOL ScDPObject::GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, uno::Reference<
if ( xMembSupp.is() )
{
xMembers.set(xMembSupp->getMembers());
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -2131,10 +2131,10 @@ String lcl_GetDimName( const uno::Reference<sheet::XDimensionsSupplier>& xSource
// static
void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
- PivotField* pFields, SCSIZE nCount, USHORT nOrient,
+ PivotField* pFields, SCSIZE nCount, sal_uInt16 nOrient,
ScDocument* pDoc, SCROW nRow, SCTAB nTab,
const uno::Reference<sheet::XDimensionsSupplier>& xSource,
- BOOL bOldDefaults,
+ sal_Bool bOldDefaults,
PivotField* pRefColFields, SCSIZE nRefColCount,
PivotField* pRefRowFields, SCSIZE nRefRowCount,
PivotField* pRefPageFields, SCSIZE nRefPageCount )
@@ -2148,7 +2148,7 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
for (SCSIZE i=0; i<nCount; i++)
{
SCCOL nCol = pFields[i].nCol;
- USHORT nFuncs = pFields[i].nFuncMask;
+ sal_uInt16 nFuncs = pFields[i].nFuncMask;
const sheet::DataPilotFieldReference& rFieldRef = pFields[i].maFieldRef;
if ( nCol == PIVOT_DATA_FIELD )
@@ -2171,45 +2171,45 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
if ( nOrient == sheet::DataPilotFieldOrientation_DATA ) // set summary function
{
// generate an individual entry for each function
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
// if a dimension is used for column/row/page and data,
// use duplicated dimensions for all data occurrences
if (pRefColFields)
for (SCSIZE nRefCol=0; nRefCol<nRefColCount; nRefCol++)
if (pRefColFields[nRefCol].nCol == nCol)
- bFirst = FALSE;
+ bFirst = sal_False;
if (pRefRowFields)
for (SCSIZE nRefRow=0; nRefRow<nRefRowCount; nRefRow++)
if (pRefRowFields[nRefRow].nCol == nCol)
- bFirst = FALSE;
+ bFirst = sal_False;
if (pRefPageFields)
- for (USHORT nRefPage=0; nRefPage<nRefPageCount; ++nRefPage)
+ for (sal_uInt16 nRefPage=0; nRefPage<nRefPageCount; ++nRefPage)
if (pRefPageFields[nRefPage].nCol == nCol)
- bFirst = FALSE;
+ bFirst = sal_False;
// if set via api, a data column may occur several times
// (if the function hasn't been changed yet) -> also look for duplicate data column
for (SCSIZE nPrevData=0; nPrevData<i; nPrevData++)
if (pFields[nPrevData].nCol == nCol)
- bFirst = FALSE;
+ bFirst = sal_False;
- USHORT nMask = 1;
- for (USHORT nBit=0; nBit<16; nBit++)
+ sal_uInt16 nMask = 1;
+ for (sal_uInt16 nBit=0; nBit<16; nBit++)
{
if ( nFuncs & nMask )
{
sheet::GeneralFunction eFunc = ScDataPilotConversion::FirstFunc( nMask );
ScDPSaveDimension* pCurrDim = bFirst ? pDim : rSaveData.DuplicateDimension(pDim->GetName());
pCurrDim->SetOrientation( nOrient );
- pCurrDim->SetFunction( sal::static_int_cast<USHORT>(eFunc) );
+ pCurrDim->SetFunction( sal::static_int_cast<sal_uInt16>(eFunc) );
if( rFieldRef.ReferenceType == sheet::DataPilotFieldReferenceType::NONE )
pCurrDim->SetReferenceValue( 0 );
else
pCurrDim->SetReferenceValue( &rFieldRef );
- bFirst = FALSE;
+ bFirst = sal_False;
}
nMask *= 2;
}
@@ -2218,13 +2218,13 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
{
pDim->SetOrientation( nOrient );
- USHORT nFuncArray[16];
- USHORT nFuncCount = 0;
- USHORT nMask = 1;
- for (USHORT nBit=0; nBit<16; nBit++)
+ sal_uInt16 nFuncArray[16];
+ sal_uInt16 nFuncCount = 0;
+ sal_uInt16 nMask = 1;
+ for (sal_uInt16 nBit=0; nBit<16; nBit++)
{
if ( nFuncs & nMask )
- nFuncArray[nFuncCount++] = sal::static_int_cast<USHORT>(ScDataPilotConversion::FirstFunc( nMask ));
+ nFuncArray[nFuncCount++] = sal::static_int_cast<sal_uInt16>(ScDataPilotConversion::FirstFunc( nMask ));
nMask *= 2;
}
pDim->SetSubTotals( nFuncCount, nFuncArray );
@@ -2232,14 +2232,14 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
// ShowEmpty was implicit in old tables,
// must be set for data layout dimension (not accessible in dialog)
if ( bOldDefaults || nCol == PIVOT_DATA_FIELD )
- pDim->SetShowEmpty( TRUE );
+ pDim->SetShowEmpty( sal_True );
}
}
}
}
// static
-bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
+bool ScDPObject::IsOrientationAllowed( sal_uInt16 nOrient, sal_Int32 nDimFlags )
{
bool bAllowed = true;
switch (nOrient)
@@ -2267,9 +2267,9 @@ bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
// -----------------------------------------------------------------------
// static
-BOOL ScDPObject::HasRegisteredSources()
+sal_Bool ScDPObject::HasRegisteredSources()
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
uno::Reference<lang::XMultiServiceFactory> xManager = comphelper::getProcessServiceFactory();
uno::Reference<container::XContentEnumerationAccess> xEnAc( xManager, uno::UNO_QUERY );
@@ -2278,7 +2278,7 @@ BOOL ScDPObject::HasRegisteredSources()
uno::Reference<container::XEnumeration> xEnum = xEnAc->createContentEnumeration(
rtl::OUString::createFromAscii( SCDPSOURCE_SERVICE ) );
if ( xEnum.is() && xEnum->hasMoreElements() )
- bFound = TRUE;
+ bFound = sal_True;
}
return bFound;
@@ -2425,7 +2425,7 @@ ScDataObject* ScDPCollection::Clone() const
void ScDPCollection::DeleteOnTab( SCTAB nTab )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < nCount )
{
// look for output positions on the deleted sheet
@@ -2439,20 +2439,20 @@ void ScDPCollection::DeleteOnTab( SCTAB nTab )
void ScDPCollection::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
((ScDPObject*)At(i))->UpdateReference( eUpdateRefMode, r, nDx, nDy, nDz );
}
-BOOL ScDPCollection::RefsEqual( const ScDPCollection& r ) const
+sal_Bool ScDPCollection::RefsEqual( const ScDPCollection& r ) const
{
if ( nCount != r.nCount )
- return FALSE;
+ return sal_False;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( ! ((const ScDPObject*)At(i))->RefsEqual( *((const ScDPObject*)r.At(i)) ) )
- return FALSE;
+ return sal_False;
- return TRUE; // all equal
+ return sal_True; // all equal
}
void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
@@ -2460,7 +2460,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
if ( nCount == r.nCount )
{
//! assert equal names?
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
((const ScDPObject*)At(i))->WriteRefsTo( *((ScDPObject*)r.At(i)) );
}
else
@@ -2470,12 +2470,12 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
// Matching objects are found by their names.
DBG_ASSERT( nCount >= r.nCount, "WriteRefsTo: missing entries in document" );
- for (USHORT nSourcePos=0; nSourcePos<nCount; nSourcePos++)
+ for (sal_uInt16 nSourcePos=0; nSourcePos<nCount; nSourcePos++)
{
const ScDPObject* pSourceObj = static_cast<const ScDPObject*>(At(nSourcePos));
String aName = pSourceObj->GetName();
bool bFound = false;
- for (USHORT nDestPos=0; nDestPos<r.nCount && !bFound; nDestPos++)
+ for (sal_uInt16 nDestPos=0; nDestPos<r.nCount && !bFound; nDestPos++)
{
ScDPObject* pDestObj = static_cast<ScDPObject*>(r.At(nDestPos));
if ( pDestObj->GetName() == aName )
@@ -2489,7 +2489,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
// none found, re-insert deleted object (see ScUndoDataPilot::Undo)
ScDPObject* pDestObj = new ScDPObject( *pSourceObj );
- pDestObj->SetAlive(TRUE);
+ pDestObj->SetAlive(sal_True);
if ( !r.InsertNewTable(pDestObj) )
{
DBG_ERROR("cannot insert DPObject");
@@ -2503,25 +2503,25 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
ScDPObject* ScDPCollection::GetByName(const String& rName) const
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (static_cast<const ScDPObject*>(pItems[i])->GetName() == rName)
return static_cast<ScDPObject*>(pItems[i]);
return NULL;
}
-String ScDPCollection::CreateNewName( USHORT nMin ) const
+String ScDPCollection::CreateNewName( sal_uInt16 nMin ) const
{
String aBase = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("DataPilot"));
//! from Resource?
- for (USHORT nAdd=0; nAdd<=nCount; nAdd++) // nCount+1 tries
+ for (sal_uInt16 nAdd=0; nAdd<=nCount; nAdd++) // nCount+1 tries
{
String aNewName = aBase;
aNewName += String::CreateFromInt32( nMin + nAdd );
- BOOL bFound = FALSE;
- for (USHORT i=0; i<nCount && !bFound; i++)
+ sal_Bool bFound = sal_False;
+ for (sal_uInt16 i=0; i<nCount && !bFound; i++)
if (((const ScDPObject*)pItems[i])->GetName() == aNewName)
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
return aNewName; // found unused Name
}
@@ -2539,7 +2539,7 @@ long ScDPObject::GetCacheId() const
else
return mnCacheId;
}
-ULONG ScDPObject::RefreshCache()
+sal_uLong ScDPObject::RefreshCache()
{
if ( pServDesc )
{
@@ -2548,7 +2548,7 @@ ULONG ScDPObject::RefreshCache()
}
CreateObjects();
- ULONG nErrId = 0;
+ sal_uLong nErrId = 0;
if ( pSheetDesc)
nErrId = pSheetDesc->CheckValidate( pDoc );
if ( nErrId == 0 )
@@ -2573,10 +2573,10 @@ ULONG ScDPObject::RefreshCache()
nNewId = pCache->GetId();
- bRefresh = TRUE;
+ bRefresh = sal_True;
ScDPCollection* pDPCollection = pDoc->GetDPCollection();
- USHORT nCount = pDPCollection->GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pDPCollection->GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{ //set new cache id
if ( (*pDPCollection)[i]->GetCacheId() == nOldId )
{
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index bdd6fd555b89..6cdfe2a467e7 100755..100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -115,7 +115,7 @@ struct ScDPOutLevelData
mbHasHiddenMember = false;
}
- BOOL operator<(const ScDPOutLevelData& r) const
+ sal_Bool operator<(const ScDPOutLevelData& r) const
{ return nDimPos<r.nDimPos || ( nDimPos==r.nDimPos && nHier<r.nHier ) ||
( nDimPos==r.nDimPos && nHier==r.nHier && nLevel<r.nLevel ); }
@@ -130,7 +130,7 @@ struct ScDPOutLevelData
void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nStrId )
+ sal_uInt16 nStrId )
{
if ( nCol1 > nCol2 || nRow1 > nRow2 )
{
@@ -160,7 +160,7 @@ void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nWidth )
+ sal_uInt16 nWidth )
{
SvxBorderLine aLine;
aLine.SetOutWidth(nWidth);
@@ -170,16 +170,16 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
aBox.SetLine(&aLine, BOX_LINE_RIGHT);
aBox.SetLine(&aLine, BOX_LINE_BOTTOM);
SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER );
- aBoxInfo.SetValid(VALID_HORI,FALSE);
- aBoxInfo.SetValid(VALID_VERT,FALSE);
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
+ aBoxInfo.SetValid(VALID_HORI,sal_False);
+ aBoxInfo.SetValid(VALID_VERT,sal_False);
+ aBoxInfo.SetValid(VALID_DISTANCE,sal_False);
pDoc->ApplyFrameAreaTab( ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab ), &aBox, &aBoxInfo );
}
// -----------------------------------------------------------------------
-void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
+void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
const uno::Reference<sheet::XDataPilotMemberResults>& xLevRes,
const uno::Reference<container::XIndexAccess>& xDims )
{
@@ -198,9 +198,9 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
//! merge this with the loop to collect ScDPOutLevelData?
String aDataNames[SC_DPOUT_MAXLEVELS];
- UINT32 nDataFormats[SC_DPOUT_MAXLEVELS];
+ sal_uInt32 nDataFormats[SC_DPOUT_MAXLEVELS];
long nDataCount = 0;
- BOOL bAnySet = FALSE;
+ sal_Bool bAnySet = sal_False;
long nDimCount = xDims->getCount();
for (long nDim=0; nDim<nDimCount; nDim++)
@@ -223,7 +223,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
rtl::OUString::createFromAscii(DP_PROP_NUMBERFORMAT) );
nDataFormats[nDataCount] = nFormat;
if ( nFormat != 0 )
- bAnySet = TRUE;
+ bAnySet = sal_True;
++nDataCount;
}
}
@@ -234,7 +234,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
const sheet::MemberResult* pArray = aResult.getConstArray();
String aName;
- UINT32* pNumFmt = new UINT32[nSize];
+ sal_uInt32* pNumFmt = new sal_uInt32[nSize];
if (nDataCount == 1)
{
// only one data dimension -> use its numberformat everywhere
@@ -251,7 +251,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
if ( !(pArray[nPos].Flags & sheet::MemberResultFlags::CONTINUE) )
aName = String( pArray[nPos].Name );
- UINT32 nFormat = 0;
+ sal_uInt32 nFormat = 0;
for (long i=0; i<nDataCount; i++)
if (aName == aDataNames[i]) //! search more efficiently?
{
@@ -268,7 +268,7 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
}
}
-UINT32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAccess>& xDims )
+sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAccess>& xDims )
{
long nDimCount = xDims->getCount();
for (long nDim=0; nDim<nDimCount; nDim++)
@@ -306,7 +306,7 @@ void lcl_SortFields( ScDPOutLevelData* pFields, long nFieldCount )
}
}
-BOOL lcl_MemberEmpty( const uno::Sequence<sheet::MemberResult>& rSeq )
+sal_Bool lcl_MemberEmpty( const uno::Sequence<sheet::MemberResult>& rSeq )
{
// used to skip levels that have no members
@@ -314,9 +314,9 @@ BOOL lcl_MemberEmpty( const uno::Sequence<sheet::MemberResult>& rSeq )
const sheet::MemberResult* pArray = rSeq.getConstArray();
for (long i=0; i<nLen; i++)
if (pArray[i].Flags & sheet::MemberResultFlags::HASMEMBER)
- return FALSE;
+ return sal_False;
- return TRUE; // no member data -> empty
+ return sal_True; // no member data -> empty
}
uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Reference<beans::XPropertySet>& xDimProp )
@@ -356,20 +356,20 @@ uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Refer
}
ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsSupplier>& xSrc,
- const ScAddress& rPos, BOOL bFilter ) :
+ const ScAddress& rPos, sal_Bool bFilter ) :
pDoc( pD ),
xSource( xSrc ),
aStartPos( rPos ),
bDoFilter( bFilter ),
- bResultsError( FALSE ),
+ bResultsError( sal_False ),
mbHasDataLayout(false),
pColNumFmt( NULL ),
pRowNumFmt( NULL ),
nColFmtCount( 0 ),
nRowFmtCount( 0 ),
nSingleNumFmt( 0 ),
- bSizesValid( FALSE ),
- bSizeOverflow( FALSE ),
+ bSizesValid( sal_False ),
+ bSizeOverflow( sal_False ),
mbHeaderLayout( false )
{
nTabStartCol = nMemberStartCol = nDataStartCol = nTabEndCol = 0;
@@ -404,7 +404,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
sheet::DataPilotFieldOrientation_HIDDEN );
long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp,
rtl::OUString::createFromAscii(DP_PROP_POSITION) );
- BOOL bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
+ sal_Bool bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
xDimProp,
rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty(
@@ -532,7 +532,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
}
catch (uno::RuntimeException&)
{
- bResultsError = TRUE;
+ bResultsError = sal_True;
}
}
@@ -568,7 +568,7 @@ ScDPOutput::~ScDPOutput()
void ScDPOutput::SetPosition( const ScAddress& rPos )
{
aStartPos = rPos;
- bSizesValid = bSizeOverflow = FALSE;
+ bSizesValid = bSizeOverflow = sal_False;
}
void ScDPOutput::DataCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const sheet::DataResult& rData )
@@ -585,7 +585,7 @@ void ScDPOutput::DataCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const sheet::Data
// use number formats from source
DBG_ASSERT( bSizesValid, "DataCell: !bSizesValid" );
- UINT32 nFormat = 0;
+ sal_uInt32 nFormat = 0;
if ( pColNumFmt )
{
if ( nCol >= nDataStartCol )
@@ -618,7 +618,7 @@ void ScDPOutput::DataCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const sheet::Data
}
void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
- const sheet::MemberResult& rData, BOOL bColHeader, long nLevel )
+ const sheet::MemberResult& rData, sal_Bool bColHeader, long nLevel )
{
long nFlags = rData.Flags;
@@ -664,7 +664,7 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
{
// Wang Xu Ming -- 2009-8-17
// DataPilot Migration - Cache&&Performance
- //lcl_SetFrame( pDoc,nTab, nMemberStartCol+(USHORT)nLevel,nRow, nTabEndCol,nRow, SC_DP_FRAME_INNER_BOLD );
+ //lcl_SetFrame( pDoc,nTab, nMemberStartCol+(sal_uInt16)nLevel,nRow, nTabEndCol,nRow, SC_DP_FRAME_INNER_BOLD );
outputimp.OutputBlockFrame( nMemberStartCol+(SCCOL)nLevel,nRow, nDataStartCol-1,nRow );
// End Comments
lcl_SetStyleById( pDoc,nTab, nMemberStartCol+(SCCOL)nLevel,nRow, nDataStartCol-1,nRow,
@@ -728,7 +728,7 @@ void ScDPOutput::CalcSizes()
if ( aStartPos.Col() + nRowFieldCount + nColCount - 1 > MAXCOL ||
aStartPos.Row() + nPageSize + nHeaderSize + nColFieldCount + nRowCount > MAXROW )
{
- bSizeOverflow = TRUE;
+ bSizeOverflow = sal_True;
}
nTabStartCol = aStartPos.Col();
@@ -748,7 +748,7 @@ void ScDPOutput::CalcSizes()
nTabEndRow = nDataStartRow + (SCROW)nRowCount - 1;
else
nTabEndRow = nDataStartRow; // single row will remain empty
- bSizesValid = TRUE;
+ bSizesValid = sal_True;
}
}
@@ -890,7 +890,7 @@ void ScDPOutput::Output()
for (long nCol=0; nCol<nThisColCount; nCol++)
{
SCCOL nColPos = nDataStartCol + (SCCOL)nCol; //! check for overflow
- HeaderCell( nColPos, nRowPos, nTab, pArray[nCol], TRUE, nField );
+ HeaderCell( nColPos, nRowPos, nTab, pArray[nCol], sal_True, nField );
// Wang Xu Ming -- 2009-8-17
// DataPilot Migration - Cache&&Performance
if ( ( pArray[nCol].Flags & sheet::MemberResultFlags::HASMEMBER ) &&
@@ -908,7 +908,7 @@ void ScDPOutput::Output()
{
outputimp.AddCol( nColPos );
if ( nColPos + 1 == nEndColPos )
- outputimp.OutputBlockFrame( nColPos,nRowPos, nEndColPos,nRowPos+1, TRUE );
+ outputimp.OutputBlockFrame( nColPos,nRowPos, nEndColPos,nRowPos+1, sal_True );
}
else
outputimp.OutputBlockFrame( nColPos,nRowPos, nEndColPos,nRowPos );
@@ -927,8 +927,8 @@ void ScDPOutput::Output()
}
// output row headers:
- std::vector<BOOL> vbSetBorder;
- vbSetBorder.resize( nTabEndRow - nDataStartRow + 1, FALSE );
+ std::vector<sal_Bool> vbSetBorder;
+ vbSetBorder.resize( nTabEndRow - nDataStartRow + 1, sal_False );
for (nField=0; nField<nRowFieldCount; nField++)
{
bool bDataLayout = mbHasDataLayout && (nField == nRowFieldCount-1);
@@ -946,7 +946,7 @@ void ScDPOutput::Output()
for (long nRow=0; nRow<nThisRowCount; nRow++)
{
SCROW nRowPos = nDataStartRow + (SCROW)nRow; //! check for overflow
- HeaderCell( nColPos, nRowPos, nTab, pArray[nRow], FALSE, nField );
+ HeaderCell( nColPos, nRowPos, nTab, pArray[nRow], sal_False, nField );
if ( ( pArray[nRow].Flags & sheet::MemberResultFlags::HASMEMBER ) &&
!( pArray[nRow].Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
@@ -961,10 +961,10 @@ void ScDPOutput::Output()
// lcl_SetFrame( pDoc,nTab, nColPos,nRowPos, nColPos,nEndRowPos, SC_DP_FRAME_INNER_BOLD );
//lcl_SetFrame( pDoc,nTab, nColPos,nRowPos, nTabEndCol,nEndRowPos, SC_DP_FRAME_INNER_BOLD );
outputimp.AddRow( nRowPos );
- if ( vbSetBorder[ nRow ] == FALSE )
+ if ( vbSetBorder[ nRow ] == sal_False )
{
outputimp.OutputBlockFrame( nColPos, nRowPos, nTabEndCol, nEndRowPos );
- vbSetBorder[ nRow ] = TRUE;
+ vbSetBorder[ nRow ] = sal_True;
}
outputimp.OutputBlockFrame( nColPos, nRowPos, nColPos, nEndRowPos );
@@ -1017,7 +1017,7 @@ ScRange ScDPOutput::GetOutputRange( sal_Int32 nRegionType )
return ScRange(aStartPos.Col(), aStartPos.Row(), nTab, nTabEndCol, nTabEndRow, nTab);
}
-BOOL ScDPOutput::HasError()
+sal_Bool ScDPOutput::HasError()
{
CalcSizes();
@@ -1098,12 +1098,12 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
rDataOrient = sheet::DataPilotFieldOrientation_HIDDEN;
uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
- BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
+ sal_Bool bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND) );
if ( bColGrand )
rGrandTotalCols = 1; // default if data layout not in columns
- BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
+ sal_Bool bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
rtl::OUString::createFromAscii(DP_PROP_ROWGRAND) );
if ( bRowGrand )
rGrandTotalRows = 1; // default if data layout not in rows
@@ -1375,13 +1375,13 @@ bool lcl_IsCondition( const sheet::MemberResult& rResultEntry, const ScDPGetPivo
bool lcl_CheckPageField( const ScDPOutLevelData& rField,
const std::vector< ScDPGetPivotDataField >& rFilters,
- std::vector< BOOL >& rFilterUsed )
+ std::vector< sal_Bool >& rFilterUsed )
{
for (SCSIZE nFilterPos = 0; nFilterPos < rFilters.size(); ++nFilterPos)
{
if ( lcl_IsNamedCategoryField( rFilters[nFilterPos], rField ) )
{
- rFilterUsed[nFilterPos] = TRUE;
+ rFilterUsed[nFilterPos] = sal_True;
// page field result is empty or the selection as single entry (see lcl_GetSelectedPageAsResult)
if ( rField.aResult.getLength() == 1 &&
@@ -1459,10 +1459,10 @@ uno::Sequence<sheet::GeneralFunction> lcl_GetSubTotals(
return aSubTotals;
}
-void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >& rSubtotal,
+void lcl_FilterInclude( std::vector< sal_Bool >& rResult, std::vector< sal_Int32 >& rSubtotal,
const ScDPOutLevelData& rField,
const std::vector< ScDPGetPivotDataField >& rFilters,
- std::vector< BOOL >& rFilterUsed,
+ std::vector< sal_Bool >& rFilterUsed,
bool& rBeforeDataLayout,
sal_Int32 nGrandTotals, sal_Int32 nDataLayoutIndex,
const std::vector<String>& rDataNames, const std::vector<String>& rGivenNames,
@@ -1485,7 +1485,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
if ( lcl_IsNamedCategoryField( rFilters[nFilterPos], rField ) )
{
aFilter = rFilters[nFilterPos];
- rFilterUsed[nFilterPos] = TRUE;
+ rFilterUsed[nFilterPos] = sal_True;
bHasFilter = true;
}
}
@@ -1597,7 +1597,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
// if a function was specified, automatic subtotals never match
if ( bHasFunc )
- rResult[j] = FALSE;
+ rResult[j] = sal_False;
}
}
@@ -1631,7 +1631,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
// if a function was specified, simple (non-subtotal) values never match
if ( bHasFunc && nSubTotalCount == 0 )
- rResult[j] = FALSE;
+ rResult[j] = sal_False;
}
// if no condition is given, keep the columns/rows included
}
@@ -1639,7 +1639,7 @@ void lcl_FilterInclude( std::vector< BOOL >& rResult, std::vector< sal_Int32 >&
}
}
-void lcl_StripSubTotals( std::vector< BOOL >& rResult, const std::vector< sal_Int32 >& rSubtotal )
+void lcl_StripSubTotals( std::vector< sal_Bool >& rResult, const std::vector< sal_Int32 >& rSubtotal )
{
sal_Int32 nSize = rResult.size();
DBG_ASSERT( (sal_Int32)rSubtotal.size() == nSize, "sizes don't match" );
@@ -1652,13 +1652,13 @@ void lcl_StripSubTotals( std::vector< BOOL >& rResult, const std::vector< sal_In
DBG_ASSERT( nStart >= 0, "invalid subtotal count" );
for (sal_Int32 nPrev = nStart; nPrev < nPos; nPrev++)
- rResult[nPrev] = FALSE;
+ rResult[nPrev] = sal_False;
}
}
String lcl_GetDataFieldName( const String& rSourceName, sheet::GeneralFunction eFunc )
{
- USHORT nStrId = 0;
+ sal_uInt16 nStrId = 0;
switch ( eFunc )
{
case sheet::GeneralFunction_SUM: nStrId = STR_FUN_TEXT_SUM; break;
@@ -1711,9 +1711,9 @@ void ScDPOutput::GetDataDimensionNames( String& rSourceName, String& rGivenName,
}
}
-// Returns TRUE on success and stores the result in rTarget
-// Returns FALSE if rFilters or rTarget describes something that is not visible
-BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
+// Returns sal_True on success and stores the result in rTarget
+// Returns sal_False if rFilters or rTarget describes something that is not visible
+sal_Bool ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
const std::vector< ScDPGetPivotDataField >& rFilters )
{
CalcSizes();
@@ -1728,7 +1728,7 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
lcl_GetTableVars( nGrandTotalCols, nGrandTotalRows, nDataLayoutIndex, aDataNames, aGivenNames, eDataOrient, xSource );
if ( aDataNames.empty() )
- return FALSE; // incomplete table without data fields -> no result
+ return sal_False; // incomplete table without data fields -> no result
if ( eDataOrient == sheet::DataPilotFieldOrientation_HIDDEN )
{
@@ -1736,15 +1736,15 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
DBG_ASSERT( aDataNames.size() == 1, "several data fields but no data layout field" );
if ( !lcl_IsNamedDataField( rTarget, aDataNames[0], aGivenNames[0] ) )
- return FALSE;
+ return sal_False;
}
- std::vector< BOOL > aIncludeCol( nColCount, TRUE );
+ std::vector< sal_Bool > aIncludeCol( nColCount, sal_True );
std::vector< sal_Int32 > aSubtotalCol( nColCount, 0 );
- std::vector< BOOL > aIncludeRow( nRowCount, TRUE );
+ std::vector< sal_Bool > aIncludeRow( nRowCount, sal_True );
std::vector< sal_Int32 > aSubtotalRow( nRowCount, 0 );
- std::vector< BOOL > aFilterUsed( rFilters.size(), FALSE );
+ std::vector< sal_Bool > aFilterUsed( rFilters.size(), sal_False );
long nField;
long nCol;
@@ -1769,12 +1769,12 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
for (nField=0; nField<nPageFieldCount; nField++)
if ( !lcl_CheckPageField( pPageFields[nField], rFilters, aFilterUsed ) )
- return FALSE;
+ return sal_False;
// all filter fields must be used
for (SCSIZE nFilter=0; nFilter<aFilterUsed.size(); nFilter++)
if (!aFilterUsed[nFilter])
- return FALSE;
+ return sal_False;
lcl_StripSubTotals( aIncludeCol, aSubtotalCol );
lcl_StripSubTotals( aIncludeRow, aSubtotalRow );
@@ -1798,35 +1798,35 @@ BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
}
if ( nColIncluded != 1 || nRowIncluded != 1 )
- return FALSE;
+ return sal_False;
const uno::Sequence<sheet::DataResult>& rDataRow = aData[nRowPos];
if ( nColPos >= rDataRow.getLength() )
- return FALSE;
+ return sal_False;
const sheet::DataResult& rResult = rDataRow[nColPos];
if ( rResult.Flags & sheet::DataResultFlags::ERROR )
- return FALSE; //! different error?
+ return sal_False; //! different error?
- rTarget.mbValIsStr = FALSE;
+ rTarget.mbValIsStr = sal_False;
rTarget.mnValNum = rResult.Value;
- return TRUE;
+ return sal_True;
}
-BOOL ScDPOutput::IsFilterButton( const ScAddress& rPos )
+sal_Bool ScDPOutput::IsFilterButton( const ScAddress& rPos )
{
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
SCTAB nTab = rPos.Tab();
if ( nTab != aStartPos.Tab() || !bDoFilter )
- return FALSE; // wrong sheet or no button at all
+ return sal_False; // wrong sheet or no button at all
// filter button is at top left
return ( nCol == aStartPos.Col() && nRow == aStartPos.Row() );
}
-long ScDPOutput::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
+long ScDPOutput::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient )
{
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -1872,9 +1872,9 @@ long ScDPOutput::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
return -1; // invalid
}
-BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMouseTop,
+sal_Bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, sal_Bool bMouseLeft, sal_Bool bMouseTop,
long nDragDim,
- Rectangle& rPosRect, USHORT& rOrient, long& rDimPos )
+ Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos )
{
// Rectangle instead of ScRange for rPosRect to allow for negative values
@@ -1882,7 +1882,7 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
SCROW nRow = rPos.Row();
SCTAB nTab = rPos.Tab();
if ( nTab != aStartPos.Tab() )
- return FALSE; // wrong sheet
+ return sal_False; // wrong sheet
// calculate output positions and sizes
@@ -1897,25 +1897,25 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
if (nField < 0)
{
nField = 0;
- bMouseTop = TRUE;
+ bMouseTop = sal_True;
}
//! find start of dimension
rPosRect = Rectangle( nDataStartCol, nMemberStartRow + nField,
nTabEndCol, nMemberStartRow + nField -1 );
- BOOL bFound = FALSE; // is this within the same orientation?
- BOOL bBeforeDrag = FALSE;
- BOOL bAfterDrag = FALSE;
+ sal_Bool bFound = sal_False; // is this within the same orientation?
+ sal_Bool bBeforeDrag = sal_False;
+ sal_Bool bAfterDrag = sal_False;
for (long nPos=0; nPos<nColFieldCount && !bFound; nPos++)
{
if (pColFields[nPos].nDim == nDragDim)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nField < nPos )
- bBeforeDrag = TRUE;
+ bBeforeDrag = sal_True;
else if ( nField > nPos )
- bAfterDrag = TRUE;
+ bAfterDrag = sal_True;
}
}
@@ -1940,13 +1940,13 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rOrient = sheet::DataPilotFieldOrientation_COLUMN;
rDimPos = nField; //!...
- return TRUE;
+ return sal_True;
}
// test for row header
// special case if no row fields
- BOOL bSpecial = ( nRow+1 >= nDataStartRow && nRow <= nTabEndRow &&
+ sal_Bool bSpecial = ( nRow+1 >= nDataStartRow && nRow <= nTabEndRow &&
nRowFieldCount == 0 && nCol == nTabStartCol && bMouseLeft );
if ( bSpecial || ( nRow+1 >= nDataStartRow && nRow <= nTabEndRow &&
@@ -1958,18 +1958,18 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rPosRect = Rectangle( nTabStartCol + nField, nDataStartRow - 1,
nTabStartCol + nField - 1, nTabEndRow );
- BOOL bFound = FALSE; // is this within the same orientation?
- BOOL bBeforeDrag = FALSE;
- BOOL bAfterDrag = FALSE;
+ sal_Bool bFound = sal_False; // is this within the same orientation?
+ sal_Bool bBeforeDrag = sal_False;
+ sal_Bool bAfterDrag = sal_False;
for (long nPos=0; nPos<nRowFieldCount && !bFound; nPos++)
{
if (pRowFields[nPos].nDim == nDragDim)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nField < nPos )
- bBeforeDrag = TRUE;
+ bBeforeDrag = sal_True;
else if ( nField > nPos )
- bAfterDrag = TRUE;
+ bAfterDrag = sal_True;
}
}
@@ -1994,7 +1994,7 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rOrient = sheet::DataPilotFieldOrientation_ROW;
rDimPos = nField; //!...
- return TRUE;
+ return sal_True;
}
// test for page fields
@@ -2007,25 +2007,25 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
if (nField < 0)
{
nField = 0;
- bMouseTop = TRUE;
+ bMouseTop = sal_True;
}
//! find start of dimension
rPosRect = Rectangle( aStartPos.Col(), nPageStartRow + nField,
nTabEndCol, nPageStartRow + nField - 1 );
- BOOL bFound = FALSE; // is this within the same orientation?
- BOOL bBeforeDrag = FALSE;
- BOOL bAfterDrag = FALSE;
+ sal_Bool bFound = sal_False; // is this within the same orientation?
+ sal_Bool bBeforeDrag = sal_False;
+ sal_Bool bAfterDrag = sal_False;
for (long nPos=0; nPos<nPageFieldCount && !bFound; nPos++)
{
if (pPageFields[nPos].nDim == nDragDim)
{
- bFound = TRUE;
+ bFound = sal_True;
if ( nField < nPos )
- bBeforeDrag = TRUE;
+ bBeforeDrag = sal_True;
else if ( nField > nPos )
- bAfterDrag = TRUE;
+ bAfterDrag = sal_True;
}
}
@@ -2050,10 +2050,10 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
rOrient = sheet::DataPilotFieldOrientation_PAGE;
rDimPos = nField; //!...
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index bad05968bf72..100db65df4b7 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -118,32 +118,32 @@ ScDPSaveMember::~ScDPSaveMember()
{
}
-BOOL ScDPSaveMember::operator== ( const ScDPSaveMember& r ) const
+sal_Bool ScDPSaveMember::operator== ( const ScDPSaveMember& r ) const
{
if ( aName != r.aName ||
nVisibleMode != r.nVisibleMode ||
nShowDetailsMode != r.nShowDetailsMode )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
-BOOL ScDPSaveMember::HasIsVisible() const
+sal_Bool ScDPSaveMember::HasIsVisible() const
{
return nVisibleMode != SC_DPSAVEMODE_DONTKNOW;
}
-void ScDPSaveMember::SetIsVisible(BOOL bSet)
+void ScDPSaveMember::SetIsVisible(sal_Bool bSet)
{
nVisibleMode = bSet;
}
-BOOL ScDPSaveMember::HasShowDetails() const
+sal_Bool ScDPSaveMember::HasShowDetails() const
{
return nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW;
}
-void ScDPSaveMember::SetShowDetails(BOOL bSet)
+void ScDPSaveMember::SetShowDetails(sal_Bool bSet)
{
nShowDetailsMode = bSet;
}
@@ -181,11 +181,11 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
if ( nVisibleMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xMembProp,
- rtl::OUString::createFromAscii(DP_PROP_ISVISIBLE), (BOOL)nVisibleMode );
+ rtl::OUString::createFromAscii(DP_PROP_ISVISIBLE), (sal_Bool)nVisibleMode );
if ( nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xMembProp,
- rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS), (BOOL)nShowDetailsMode );
+ rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS), (sal_Bool)nShowDetailsMode );
if (mpLayoutName.get())
ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_LAYOUTNAME, *mpLayoutName);
@@ -197,18 +197,18 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
// -----------------------------------------------------------------------
-ScDPSaveDimension::ScDPSaveDimension(const String& rName, BOOL bDataLayout) :
+ScDPSaveDimension::ScDPSaveDimension(const String& rName, sal_Bool bDataLayout) :
aName( rName ),
pSelectedPage( NULL ),
mpLayoutName(NULL),
mpSubtotalName(NULL),
bIsDataLayout( bDataLayout ),
- bDupFlag( FALSE ),
+ bDupFlag( sal_False ),
nOrientation( sheet::DataPilotFieldOrientation_HIDDEN ),
nFunction( sheet::GeneralFunction_AUTO ),
nUsedHierarchy( -1 ),
nShowEmptyMode( SC_DPSAVEMODE_DONTKNOW ),
- bSubTotalDefault( TRUE ),
+ bSubTotalDefault( sal_True ),
nSubTotalCount( 0 ),
pSubTotalFuncs( NULL ),
pReferenceValue( NULL ),
@@ -234,7 +234,7 @@ ScDPSaveDimension::ScDPSaveDimension(const ScDPSaveDimension& r) :
{
if ( nSubTotalCount && r.pSubTotalFuncs )
{
- pSubTotalFuncs = new USHORT[nSubTotalCount];
+ pSubTotalFuncs = new sal_uInt16[nSubTotalCount];
for (long nSub=0; nSub<nSubTotalCount; nSub++)
pSubTotalFuncs[nSub] = r.pSubTotalFuncs[nSub];
}
@@ -284,7 +284,7 @@ ScDPSaveDimension::~ScDPSaveDimension()
delete [] pSubTotalFuncs;
}
-BOOL ScDPSaveDimension::operator== ( const ScDPSaveDimension& r ) const
+sal_Bool ScDPSaveDimension::operator== ( const ScDPSaveDimension& r ) const
{
if ( aName != r.aName ||
bIsDataLayout != r.bIsDataLayout ||
@@ -295,71 +295,71 @@ BOOL ScDPSaveDimension::operator== ( const ScDPSaveDimension& r ) const
nShowEmptyMode != r.nShowEmptyMode ||
bSubTotalDefault != r.bSubTotalDefault ||
nSubTotalCount != r.nSubTotalCount )
- return FALSE;
+ return sal_False;
if ( nSubTotalCount && ( !pSubTotalFuncs || !r.pSubTotalFuncs ) ) // should not happen
- return FALSE;
+ return sal_False;
long i;
for (i=0; i<nSubTotalCount; i++)
if ( pSubTotalFuncs[i] != r.pSubTotalFuncs[i] )
- return FALSE;
+ return sal_False;
if (maMemberHash.size() != r.maMemberHash.size() )
- return FALSE;
+ return sal_False;
MemberList::const_iterator a=maMemberList.begin();
MemberList::const_iterator b=r.maMemberList.begin();
for (; a != maMemberList.end() ; ++a, ++b)
if (!(**a == **b))
- return FALSE;
+ return sal_False;
if ( this->HasCurrentPage() && r.HasCurrentPage() )
{
if ( this->GetCurrentPage() != r.GetCurrentPage() )
{
- return FALSE;
+ return sal_False;
}
}
else if ( this->HasCurrentPage() || r.HasCurrentPage() )
{
- return FALSE;
+ return sal_False;
}
if( pReferenceValue && r.pReferenceValue )
{
if ( !(*pReferenceValue == *r.pReferenceValue) )
{
- return FALSE;
+ return sal_False;
}
}
else if ( pReferenceValue || r.pReferenceValue )
{
- return FALSE;
+ return sal_False;
}
if( this->pSortInfo && r.pSortInfo )
{
if ( !(*this->pSortInfo == *r.pSortInfo) )
{
- return FALSE;
+ return sal_False;
}
}
else if ( this->pSortInfo || r.pSortInfo )
{
- return FALSE;
+ return sal_False;
}
if( this->pAutoShowInfo && r.pAutoShowInfo )
{
if ( !(*this->pAutoShowInfo == *r.pAutoShowInfo) )
{
- return FALSE;
+ return sal_False;
}
}
else if ( this->pAutoShowInfo || r.pAutoShowInfo )
{
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScDPSaveDimension::AddMember(ScDPSaveMember* pMember)
@@ -388,26 +388,26 @@ void ScDPSaveDimension::SetName( const String& rNew )
aName = rNew;
}
-void ScDPSaveDimension::SetOrientation(USHORT nNew)
+void ScDPSaveDimension::SetOrientation(sal_uInt16 nNew)
{
nOrientation = nNew;
}
-void ScDPSaveDimension::SetSubTotals(long nCount, const USHORT* pFuncs)
+void ScDPSaveDimension::SetSubTotals(long nCount, const sal_uInt16* pFuncs)
{
if (pSubTotalFuncs)
delete [] pSubTotalFuncs;
nSubTotalCount = nCount;
if ( nCount && pFuncs )
{
- pSubTotalFuncs = new USHORT[nCount];
+ pSubTotalFuncs = new sal_uInt16[nCount];
for (long i=0; i<nCount; i++)
pSubTotalFuncs[i] = pFuncs[i];
}
else
pSubTotalFuncs = NULL;
- bSubTotalDefault = FALSE;
+ bSubTotalDefault = sal_False;
}
bool ScDPSaveDimension::HasShowEmpty() const
@@ -415,12 +415,12 @@ bool ScDPSaveDimension::HasShowEmpty() const
return nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW;
}
-void ScDPSaveDimension::SetShowEmpty(BOOL bSet)
+void ScDPSaveDimension::SetShowEmpty(sal_Bool bSet)
{
nShowEmptyMode = bSet;
}
-void ScDPSaveDimension::SetFunction(USHORT nNew)
+void ScDPSaveDimension::SetFunction(sal_uInt16 nNew)
{
nFunction = nNew;
}
@@ -516,7 +516,7 @@ void ScDPSaveDimension::SetCurrentPage( const String* pPage )
pSelectedPage = NULL;
}
-BOOL ScDPSaveDimension::HasCurrentPage() const
+sal_Bool ScDPSaveDimension::HasCurrentPage() const
{
return ( pSelectedPage != NULL );
}
@@ -580,7 +580,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
if ( nUsedHierarchy >= 0 )
{
- aAny <<= (INT32)nUsedHierarchy;
+ aAny <<= (sal_Int32)nUsedHierarchy;
xDimProp->setPropertyValue( rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY), aAny );
}
@@ -664,7 +664,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
}
if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xLevProp,
- rtl::OUString::createFromAscii(DP_PROP_SHOWEMPTY), (BOOL)nShowEmptyMode );
+ rtl::OUString::createFromAscii(DP_PROP_SHOWEMPTY), (sal_Bool)nShowEmptyMode );
if ( pSortInfo )
ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_SORTING, *pSortInfo);
@@ -751,8 +751,8 @@ ScDPSaveData::ScDPSaveData() :
nRowGrandMode( SC_DPSAVEMODE_DONTKNOW ),
nIgnoreEmptyMode( SC_DPSAVEMODE_DONTKNOW ),
nRepeatEmptyMode( SC_DPSAVEMODE_DONTKNOW ),
- bFilterButton( TRUE ),
- bDrillDown( TRUE ),
+ bFilterButton( sal_True ),
+ bDrillDown( sal_True ),
// Wang Xu Ming -- 2009-8-17
// DataPilot Migration - Cache&&Performance
mnCacheId( -1),
@@ -805,7 +805,7 @@ ScDPSaveData& ScDPSaveData::operator= ( const ScDPSaveData& r )
return *this;
}
-BOOL ScDPSaveData::operator== ( const ScDPSaveData& r ) const
+sal_Bool ScDPSaveData::operator== ( const ScDPSaveData& r ) const
{
if ( nColumnGrandMode != r.nColumnGrandMode ||
nRowGrandMode != r.nRowGrandMode ||
@@ -815,20 +815,20 @@ BOOL ScDPSaveData::operator== ( const ScDPSaveData& r ) const
mnCacheId != r.mnCacheId ||/// Wang Xu Ming -- 2009-6-18 DataPilot Migration
bDrillDown != r.bDrillDown ||
mbDimensionMembersBuilt != r.mbDimensionMembersBuilt)
- return FALSE;
+ return sal_False;
if ( pDimensionData || r.pDimensionData )
if ( !pDimensionData || !r.pDimensionData || !( *pDimensionData == *r.pDimensionData ) )
- return FALSE;
+ return sal_False;
- ULONG nCount = aDimList.Count();
+ sal_uLong nCount = aDimList.Count();
if ( nCount != r.aDimList.Count() )
- return FALSE;
+ return sal_False;
- for (ULONG i=0; i<nCount; i++)
+ for (sal_uLong i=0; i<nCount; i++)
if ( !( *(ScDPSaveDimension*)aDimList.GetObject(i) ==
*(ScDPSaveDimension*)r.aDimList.GetObject(i) ) )
- return FALSE;
+ return sal_False;
if (mpGrandTotalName.get())
{
@@ -840,7 +840,7 @@ BOOL ScDPSaveData::operator== ( const ScDPSaveData& r ) const
else if (r.mpGrandTotalName.get())
return false;
- return TRUE;
+ return sal_True;
}
ScDPSaveData::~ScDPSaveData()
@@ -872,7 +872,7 @@ ScDPSaveDimension* ScDPSaveData::GetDimensionByName(const String& rName)
if ( pDim->GetName() == rName && !pDim->IsDataLayout() )
return pDim;
}
- ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, FALSE );
+ ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, sal_False );
aDimList.Insert( pNew, LIST_APPEND );
return pNew;
}
@@ -898,7 +898,7 @@ ScDPSaveDimension* ScDPSaveData::GetNewDimensionByName(const String& rName)
if ( pDim->GetName() == rName && !pDim->IsDataLayout() )
return DuplicateDimension(rName);
}
- ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, FALSE );
+ ScDPSaveDimension* pNew = new ScDPSaveDimension( rName, sal_False );
aDimList.Insert( pNew, LIST_APPEND );
return pNew;
}
@@ -909,7 +909,7 @@ ScDPSaveDimension* ScDPSaveData::GetDataLayoutDimension()
if (pDim)
return pDim;
- ScDPSaveDimension* pNew = new ScDPSaveDimension( String(), TRUE );
+ ScDPSaveDimension* pNew = new ScDPSaveDimension( String(), sal_True );
aDimList.Insert( pNew, LIST_APPEND );
return pNew;
}
@@ -933,7 +933,7 @@ ScDPSaveDimension* ScDPSaveData::DuplicateDimension(const String& rName)
ScDPSaveDimension* pOld = GetDimensionByName( rName );
ScDPSaveDimension* pNew = new ScDPSaveDimension( *pOld );
- pNew->SetDupFlag( TRUE );
+ pNew->SetDupFlag( sal_True );
aDimList.Insert( pNew, LIST_APPEND );
return pNew;
}
@@ -956,12 +956,12 @@ void ScDPSaveData::RemoveDimensionByName(const String& rName)
ScDPSaveDimension& ScDPSaveData::DuplicateDimension( const ScDPSaveDimension& rDim )
{
ScDPSaveDimension* pNew = new ScDPSaveDimension( rDim );
- pNew->SetDupFlag( TRUE );
+ pNew->SetDupFlag( sal_True );
aDimList.Insert( pNew, LIST_APPEND );
return *pNew;
}
-ScDPSaveDimension* ScDPSaveData::GetInnermostDimension(USHORT nOrientation)
+ScDPSaveDimension* ScDPSaveData::GetInnermostDimension(sal_uInt16 nOrientation)
{
// return the innermost dimension for the given orientation,
// excluding data layout dimension
@@ -1008,12 +1008,12 @@ void ScDPSaveData::SetPosition( ScDPSaveDimension* pDim, long nNew )
{
// position (nNew) is counted within dimensions of the same orientation
- USHORT nOrient = pDim->GetOrientation();
+ sal_uInt16 nOrient = pDim->GetOrientation();
aDimList.Remove( pDim );
- ULONG nCount = aDimList.Count(); // after remove
+ sal_uLong nCount = aDimList.Count(); // after remove
- ULONG nInsPos = 0;
+ sal_uLong nInsPos = 0;
while ( nNew > 0 && nInsPos < nCount )
{
if ( ((ScDPSaveDimension*)aDimList.GetObject(nInsPos))->GetOrientation() == nOrient )
@@ -1024,32 +1024,32 @@ void ScDPSaveData::SetPosition( ScDPSaveDimension* pDim, long nNew )
aDimList.Insert( pDim, nInsPos );
}
-void ScDPSaveData::SetColumnGrand(BOOL bSet)
+void ScDPSaveData::SetColumnGrand(sal_Bool bSet)
{
nColumnGrandMode = bSet;
}
-void ScDPSaveData::SetRowGrand(BOOL bSet)
+void ScDPSaveData::SetRowGrand(sal_Bool bSet)
{
nRowGrandMode = bSet;
}
-void ScDPSaveData::SetIgnoreEmptyRows(BOOL bSet)
+void ScDPSaveData::SetIgnoreEmptyRows(sal_Bool bSet)
{
nIgnoreEmptyMode = bSet;
}
-void ScDPSaveData::SetRepeatIfEmpty(BOOL bSet)
+void ScDPSaveData::SetRepeatIfEmpty(sal_Bool bSet)
{
nRepeatEmptyMode = bSet;
}
-void ScDPSaveData::SetFilterButton(BOOL bSet)
+void ScDPSaveData::SetFilterButton(sal_Bool bSet)
{
bFilterButton = bSet;
}
-void ScDPSaveData::SetDrillDown(BOOL bSet)
+void ScDPSaveData::SetDrillDown(sal_Bool bSet)
{
bDrillDown = bSet;
}
@@ -1092,10 +1092,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( nIgnoreEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_IGNOREEMPTY), (BOOL)nIgnoreEmptyMode );
+ rtl::OUString::createFromAscii(DP_PROP_IGNOREEMPTY), (sal_Bool)nIgnoreEmptyMode );
if ( nRepeatEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_REPEATIFEMPTY), (BOOL)nRepeatEmptyMode );
+ rtl::OUString::createFromAscii(DP_PROP_REPEATIFEMPTY), (sal_Bool)nRepeatEmptyMode );
}
catch(uno::Exception&)
{
@@ -1125,14 +1125,14 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
DBG_TRACESTR(pDim->GetName());
- BOOL bData = pDim->IsDataLayout();
+ sal_Bool bData = pDim->IsDataLayout();
//! getByName for ScDPSource, including DataLayoutDimension !!!!!!!!
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName );
long nIntCount = xIntDims->getCount();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (long nIntDim=0; nIntDim<nIntCount && !bFound; nIntDim++)
{
uno::Reference<uno::XInterface> xIntDim = ScUnoHelpFunctions::AnyToInterface( xIntDims->getByIndex(nIntDim) );
@@ -1150,7 +1150,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
uno::Reference<container::XNamed> xDimName( xIntDim, uno::UNO_QUERY );
if ( xDimName.is() && xDimName->getName() == aName )
- bFound = TRUE;
+ bFound = sal_True;
}
if ( bFound )
@@ -1187,10 +1187,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( nColumnGrandMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), (BOOL)nColumnGrandMode );
+ rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), (sal_Bool)nColumnGrandMode );
if ( nRowGrandMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), (BOOL)nRowGrandMode );
+ rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), (sal_Bool)nRowGrandMode );
}
}
catch(uno::Exception&)
@@ -1199,16 +1199,16 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
}
}
-BOOL ScDPSaveData::IsEmpty() const
+sal_Bool ScDPSaveData::IsEmpty() const
{
long nCount = aDimList.Count();
for (long i=0; i<nCount; i++)
{
ScDPSaveDimension* pDim = (ScDPSaveDimension*)aDimList.GetObject(i);
if ( pDim->GetOrientation() != sheet::DataPilotFieldOrientation_HIDDEN && !pDim->IsDataLayout() )
- return FALSE;
+ return sal_False;
}
- return TRUE; // no entries that are not hidden
+ return sal_True; // no entries that are not hidden
}
ScDPDimensionSaveData* ScDPSaveData::GetDimensionData()
@@ -1301,13 +1301,13 @@ void ScDPSaveData::Refresh( const uno::Reference<sheet::XDimensionsSupplier>& xS
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName );
long nIntCount = xIntDims->getCount();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (long nIntDim=0; nIntDim<nIntCount && !bFound; nIntDim++)
{
uno::Reference<uno::XInterface> xIntDim = ScUnoHelpFunctions::AnyToInterface( xIntDims->getByIndex(nIntDim) );
uno::Reference<container::XNamed> xDimName( xIntDim, uno::UNO_QUERY );
if ( xDimName.is() && xDimName->getName() == aName )
- bFound = TRUE;
+ bFound = sal_True;
}
if ( !bFound )
{
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index b966d9d458ea..f0e060e8cc7d 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -82,7 +82,7 @@ using ::com::sun::star::uno::UNO_QUERY;
{
ScDPTableDataCache* pCache = NULL;
ScDPCollection* pDPCollection= pDoc->GetDPCollection();
- USHORT nCount = pDPCollection->GetCount();
+ sal_uInt16 nCount = pDPCollection->GetCount();
for ( short i=nCount-1; i>=0 ; i--)
{
@@ -250,18 +250,18 @@ String ScDatabaseDPData::getDimensionName(long nColumn)
return aCacheTable.getFieldName((SCCOL)nColumn);
}
-BOOL ScDatabaseDPData::getIsDataLayoutDimension(long nColumn)
+sal_Bool ScDatabaseDPData::getIsDataLayoutDimension(long nColumn)
{
return ( nColumn == GetCacheTable().getColSize());
}
-BOOL ScDatabaseDPData::IsDateDimension(long /* nDim */)
+sal_Bool ScDatabaseDPData::IsDateDimension(long /* nDim */)
{
//! later...
- return FALSE;
+ return sal_False;
}
-void ScDatabaseDPData::SetEmptyFlags( BOOL /* bIgnoreEmptyRows */, BOOL /* bRepeatIfEmpty */ )
+void ScDatabaseDPData::SetEmptyFlags( sal_Bool /* bIgnoreEmptyRows */, sal_Bool /* bRepeatIfEmpty */ )
{
// not used for database data
//! disable flags
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index a1fa9d2d60a6..33ce84cc94c2 100755..100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -65,12 +65,12 @@ ScSheetDPData::ScSheetDPData( ScDocument* pD, const ScSheetSourceDesc& rDesc , l
ScDPTableData(pD, rDesc.GetCacheId( pD, nCacheId) ), // DataPilot Migration - Cache&&Performance
aQuery ( rDesc.aQueryParam ),
pSpecial(NULL),
- bIgnoreEmptyRows( FALSE ),
- bRepeatIfEmpty(FALSE),
+ bIgnoreEmptyRows( sal_False ),
+ bRepeatIfEmpty(sal_False),
aCacheTable( pD, rDesc.GetCacheId( pD, nCacheId))
{
SCSIZE nEntryCount( aQuery.GetEntryCount());
- pSpecial = new BOOL[nEntryCount];
+ pSpecial = new sal_Bool[nEntryCount];
for (SCSIZE j = 0; j < nEntryCount; ++j )
{
ScQueryEntry& rEntry = aQuery.GetEntry(j);
@@ -130,18 +130,18 @@ String ScSheetDPData::getDimensionName(long nColumn)
}
}
-BOOL ScSheetDPData::IsDateDimension(long nDim)
+sal_Bool ScSheetDPData::IsDateDimension(long nDim)
{
CreateCacheTable();
long nColCount = aCacheTable.getColSize();
if (getIsDataLayoutDimension(nDim))
{
- return FALSE;
+ return sal_False;
}
else if (nDim >= nColCount)
{
DBG_ERROR("IsDateDimension: invalid dimension");
- return FALSE;
+ return sal_False;
}
else
{
@@ -149,7 +149,7 @@ BOOL ScSheetDPData::IsDateDimension(long nDim)
}
}
-ULONG ScSheetDPData::GetNumberFormat(long nDim)
+sal_uLong ScSheetDPData::GetNumberFormat(long nDim)
{
CreateCacheTable();
if (getIsDataLayoutDimension(nDim))
@@ -166,7 +166,7 @@ ULONG ScSheetDPData::GetNumberFormat(long nDim)
return GetCacheTable().GetCache()->GetNumberFormat( nDim );
}
}
-UINT32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
+sal_uInt32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
{
if( !mpDoc )
return 0;
@@ -177,13 +177,13 @@ UINT32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
return 0;
}
-BOOL ScSheetDPData::getIsDataLayoutDimension(long nColumn)
+sal_Bool ScSheetDPData::getIsDataLayoutDimension(long nColumn)
{
CreateCacheTable();
return (nColumn ==(long)( aCacheTable.getColSize()));
}
-void ScSheetDPData::SetEmptyFlags( BOOL bIgnoreEmptyRowsP, BOOL bRepeatIfEmptyP )
+void ScSheetDPData::SetEmptyFlags( sal_Bool bIgnoreEmptyRowsP, sal_Bool bRepeatIfEmptyP )
{
bIgnoreEmptyRows = bIgnoreEmptyRowsP;
bRepeatIfEmpty = bRepeatIfEmptyP;
@@ -245,7 +245,7 @@ ScDPTableDataCache* ScSheetSourceDesc::CreateCache( ScDocument* pDoc , long nID
if ( pCache && ( nID < 0 || nID == pCache->GetId() ) )
return pCache;
- ULONG nErrId = CheckValidate( pDoc );
+ sal_uLong nErrId = CheckValidate( pDoc );
if ( !nErrId )
{
pCache = new ScDPTableDataCache( pDoc );
@@ -286,12 +286,12 @@ long ScSheetSourceDesc:: GetCacheId( ScDocument* pDoc, long nID ) const
return pCache->GetId();
}
-ULONG ScSheetSourceDesc::CheckValidate( ScDocument* pDoc ) const
+sal_uLong ScSheetSourceDesc::CheckValidate( ScDocument* pDoc ) const
{
ScRange aSrcRange( aSourceRange);
if ( !pDoc )
return STR_ERR_DATAPILOTSOURCE;
- for(USHORT i= aSrcRange.aStart.Col();i <= aSrcRange.aEnd.Col();i++)
+ for(sal_uInt16 i= aSrcRange.aStart.Col();i <= aSrcRange.aEnd.Col();i++)
{
if ( pDoc->IsBlockEmpty( aSrcRange.aStart.Tab(),
i, aSrcRange.aStart.Row(),i, aSrcRange.aStart.Row()))
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index cb68732a237f..f6b85117d63b 100755..100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -124,14 +124,14 @@ bool ScDPTableData::IsRepeatIfEmpty()
return false;
}
-ULONG ScDPTableData::GetNumberFormat(long)
+sal_uLong ScDPTableData::GetNumberFormat(long)
{
return 0; // default format
}
-BOOL ScDPTableData::IsBaseForGroup(long) const
+sal_Bool ScDPTableData::IsBaseForGroup(long) const
{
- return FALSE; // always false
+ return sal_False; // always false
}
long ScDPTableData::GetGroupBase(long) const
@@ -139,23 +139,23 @@ long ScDPTableData::GetGroupBase(long) const
return -1; // always none
}
-BOOL ScDPTableData::IsNumOrDateGroup(long) const
+sal_Bool ScDPTableData::IsNumOrDateGroup(long) const
{
- return FALSE; // always false
+ return sal_False; // always false
}
-BOOL ScDPTableData::IsInGroup( const ScDPItemData&, long,
+sal_Bool ScDPTableData::IsInGroup( const ScDPItemData&, long,
const ScDPItemData&, long ) const
{
DBG_ERROR("IsInGroup shouldn't be called for non-group data");
- return FALSE;
+ return sal_False;
}
-BOOL ScDPTableData::HasCommonElement( const ScDPItemData&, long,
+sal_Bool ScDPTableData::HasCommonElement( const ScDPItemData&, long,
const ScDPItemData&, long ) const
{
DBG_ERROR("HasCommonElement shouldn't be called for non-group data");
- return FALSE;
+ return sal_False;
}
void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTable& rCacheTable,
const CalcInfo& rInfo, CalcRowData& rData)
@@ -191,13 +191,13 @@ void ScDPTableData::ProcessRowData(CalcInfo& rInfo, CalcRowData& rData, bool bAu
// DataPilot Migration
if (!bAutoShow)
{
- LateInitParams aColParams( rInfo.aColDims, rInfo.aColLevels, FALSE );
- LateInitParams aRowParams ( rInfo.aRowDims, rInfo.aRowLevels, TRUE );
+ LateInitParams aColParams( rInfo.aColDims, rInfo.aColLevels, sal_False );
+ LateInitParams aRowParams ( rInfo.aRowDims, rInfo.aRowLevels, sal_True );
// root always init child
- aColParams.SetInitChild( TRUE );
- aColParams.SetInitAllChildren( FALSE);
- aRowParams.SetInitChild( TRUE );
- aRowParams.SetInitAllChildren( FALSE);
+ aColParams.SetInitChild( sal_True );
+ aColParams.SetInitAllChildren( sal_False);
+ aRowParams.SetInitChild( sal_True );
+ aRowParams.SetInitAllChildren( sal_False);
rInfo.pColRoot->LateInitFrom( aColParams, rData.aColData,0, *rInfo.pInitState);
rInfo.pRowRoot->LateInitFrom( aRowParams, rData.aRowData, 0, *rInfo.pInitState);
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index 8d2a5ec070f5..f2cc8d2c1e5c 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -59,15 +59,15 @@ using ::com::sun::star::uno::UNO_QUERY_THROW;
// -----------------------------------------------------------------------
namespace
{
- BOOL lcl_isDate( ULONG nNumType )
+ sal_Bool lcl_isDate( sal_uLong nNumType )
{
return ( (nNumType & NUMBERFORMAT_DATE) != 0 )? 1:0 ;
}
- BOOL lcl_Search( const std::vector<ScDPItemData*>& list, const ::std::vector<SCROW>& rOrder, const ScDPItemData& item, SCROW& rIndex)
+ sal_Bool lcl_Search( const std::vector<ScDPItemData*>& list, const ::std::vector<SCROW>& rOrder, const ScDPItemData& item, SCROW& rIndex)
{
rIndex = list.size();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCROW nLo = 0;
SCROW nHi = list.size() - 1;
SCROW nIndex;
@@ -83,7 +83,7 @@ namespace
nHi = nIndex - 1;
if (nCompare == 0)
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -107,7 +107,7 @@ namespace
{
nNumType = NUMBERFORMAT_LOGICAL;
fValue = xRow->getBoolean(nCol) ? 1 : 0;
- return new ScDPItemData( rStr, fValue,TRUE,nNumType);
+ return new ScDPItemData( rStr, fValue,sal_True,nNumType);
}
//break;
@@ -123,7 +123,7 @@ namespace
{
//! do the conversion here?
fValue = xRow->getDouble(nCol);
- return new ScDPItemData( rStr, fValue,TRUE);
+ return new ScDPItemData( rStr, fValue,sal_True);
}
//break;
@@ -133,7 +133,7 @@ namespace
util::Date aDate = xRow->getDate(nCol);
fValue = Date(aDate.Day, aDate.Month, aDate.Year) - rNullDate;
- return new ScDPItemData( rStr, fValue, TRUE, nNumType );
+ return new ScDPItemData( rStr, fValue, sal_True, nNumType );
}
//break;
@@ -144,7 +144,7 @@ namespace
util::Time aTime = xRow->getTime(nCol);
fValue = ( aTime.Hours * 3600 + aTime.Minutes * 60 +
aTime.Seconds + aTime.HundredthSeconds / 100.0 ) / D_TIMEFACTOR;
- return new ScDPItemData( rStr,fValue, TRUE, nNumType );
+ return new ScDPItemData( rStr,fValue, sal_True, nNumType );
}
//break;
@@ -156,7 +156,7 @@ namespace
fValue = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - rNullDate ) +
( aStamp.Hours * 3600 + aStamp.Minutes * 60 +
aStamp.Seconds + aStamp.HundredthSeconds / 100.0 ) / D_TIMEFACTOR;
- return new ScDPItemData( rStr,fValue, TRUE, nNumType );
+ return new ScDPItemData( rStr,fValue, sal_True, nNumType );
}
//break;
case sdbc::DataType::CHAR:
@@ -183,13 +183,13 @@ namespace
}
// Wang Xu Ming -- 12/23/2008
//Refactor cache data
-ScDPItemData::ScDPItemData( const String& rS, double fV/* = 0.0*/, BOOL bHV/* = FALSE*/, const ULONG nNumFormatP /*= 0*/ , BOOL bData/* = TRUE*/) :
+ScDPItemData::ScDPItemData( const String& rS, double fV/* = 0.0*/, sal_Bool bHV/* = sal_False*/, const sal_uLong nNumFormatP /*= 0*/ , sal_Bool bData/* = sal_True*/) :
nNumFormat( nNumFormatP ), aString(rS), fValue(fV),
-mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!FALSE) | (MK_DATE*!!lcl_isDate( nNumFormat ) ) )
+mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!sal_False) | (MK_DATE*!!lcl_isDate( nNumFormat ) ) )
{
}
-ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nDocTab ):
+ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, sal_uInt16 nCol, sal_uInt16 nDocTab ):
nNumFormat( 0 ), fValue(0.0), mbFlag( 0 )
{
String aDocStr;
@@ -203,13 +203,13 @@ ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nD
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
{
SetString ( aDocStr ); //[SODC_19347] add liyi
- //bErr = TRUE; //[SODC_19347] del liyi
+ //bErr = sal_True; //[SODC_19347] del liyi
mbFlag |= MK_ERR;
}
else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
{
double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab));
- ULONG nFormat = NUMBERFORMAT_NUMBER;
+ sal_uLong nFormat = NUMBERFORMAT_NUMBER;
if ( pFormatter )
nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
aString = aDocStr;
@@ -223,7 +223,7 @@ ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nD
}
// End Comments
-BOOL ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
+sal_Bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
{ //TODO: indified Date?
//! pass Transliteration?
//! inline?
@@ -242,27 +242,27 @@ size_t ScDPItemData::Hash() const
return rtl_ustr_hashCode_WithLength( aString.GetBuffer(), aString.Len() );
}
-BOOL ScDPItemData::operator==( const ScDPItemData& r ) const
+sal_Bool ScDPItemData::operator==( const ScDPItemData& r ) const
{
if ( IsValue() )
{
if( (HasDatePart() != r.HasDatePart()) || (HasDatePart() && mnDatePart != r.mnDatePart) )
- return FALSE;
+ return sal_False;
// Wang Xu Ming -- 1/9/2009
// Add Data Cache Support.
// Identify date
if ( IsDate() != r.IsDate() )
- return FALSE;
+ return sal_False;
else
if ( r.IsValue() )
return rtl::math::approxEqual( fValue, r.fValue );
else
- return FALSE;
+ return sal_False;
// End Comments
}
else if ( r.IsValue() )
- return FALSE;
+ return sal_False;
else
// need exact equality until we have a safe case insensitive string hash
return aString == r.aString;
@@ -334,17 +334,17 @@ sal_uInt8 ScDPItemData::GetType() const
}
-BOOL ScDPItemData::IsHasData() const
+sal_Bool ScDPItemData::IsHasData() const
{
return !!(mbFlag&MK_DATA);
}
-BOOL ScDPItemData::IsHasErr() const
+sal_Bool ScDPItemData::IsHasErr() const
{
return !!(mbFlag&MK_ERR);
}
-BOOL ScDPItemData::IsValue() const
+sal_Bool ScDPItemData::IsValue() const
{
return !!(mbFlag&MK_VAL);
}
@@ -359,25 +359,25 @@ double ScDPItemData::GetValue() const
{
return fValue;
}
-ULONG ScDPItemData::GetNumFormat() const
+sal_uLong ScDPItemData::GetNumFormat() const
{
return nNumFormat;
}
-BOOL ScDPItemData::HasStringData() const
+sal_Bool ScDPItemData::HasStringData() const
{
return IsHasData()&&!IsHasErr()&&!IsValue();
}
-BOOL ScDPItemData::IsDate() const
+sal_Bool ScDPItemData::IsDate() const
{
return !!(mbFlag&MK_DATE);
}
-BOOL ScDPItemData::HasDatePart() const
+sal_Bool ScDPItemData::HasDatePart() const
{
return !!(mbFlag&MK_DATEPART);
}
-void ScDPItemData::SetDate( BOOL b )
+void ScDPItemData::SetDate( sal_Bool b )
{
b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE );
}
@@ -386,17 +386,17 @@ void ScDPItemData::SetDate( BOOL b )
//class ScDPTableDataCache
//To cache the pivot table data source
-BOOL ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const
+sal_Bool ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const
{
if ( GetColumnCount() == r.GetColumnCount() )
{
for ( SCCOL i = 0 ; i < GetColumnCount(); i++ )
{ //check dim names
if ( GetDimensionName( i ) != r.GetDimensionName( i ) )
- return FALSE;
+ return sal_False;
//check rows count
if ( GetRowCount() != r.GetRowCount() )
- return FALSE;
+ return sal_False;
//check dim member values
size_t nMembersCount = GetDimMemberValues( i ).size();
if ( GetDimMemberValues( i ).size() == r. GetDimMemberValues( i ).size() )
@@ -406,22 +406,22 @@ BOOL ScDPTableDataCache::operator== ( const ScDPTableDataCache& r ) const
if ( *( GetDimMemberValues( i )[j] ) == *( r.GetDimMemberValues( i )[j] ) )
continue;
else
- return FALSE;
+ return sal_False;
}
}
else
- return FALSE;
+ return sal_False;
//check source table index
for ( SCROW k=0 ; k < GetRowCount(); k ++ )
{
- if ( GetItemDataId( i, k, FALSE ) == r.GetItemDataId( i,k,FALSE) )
+ if ( GetItemDataId( i, k, sal_False ) == r.GetItemDataId( i,k,sal_False) )
continue;
else
- return FALSE;
+ return sal_False;
}
}
}
- return TRUE;
+ return sal_True;
}
ScDPTableDataCache::ScDPTableDataCache( ScDocument* pDoc ) :
@@ -441,10 +441,10 @@ ScDPTableDataCache::~ScDPTableDataCache()
{
// Wang Xu Ming -- 2/17/2009
// Performance issue
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol=0; nCol < GetColumnCount() ; nCol++ )
{
- for ( ULONG row = 0 ; row < mpTableDataValues[nCol].size(); row++ )
+ for ( sal_uLong row = 0 ; row < mpTableDataValues[nCol].size(); row++ )
delete mpTableDataValues[nCol][row];
}
for ( nCol =0; nCol < mrLabelNames.size(); nCol++ )
@@ -464,7 +464,7 @@ ScDPTableDataCache::~ScDPTableDataCache()
}
// -----------------------------------------------------------------------
-void ScDPTableDataCache::AddRow( ScDPItemData* pRow, USHORT nCount )
+void ScDPTableDataCache::AddRow( ScDPItemData* pRow, sal_uInt16 nCount )
{
DBG_ASSERT( pRow , " empty pointer" );
if ( !mrLabelNames.size() )
@@ -475,12 +475,12 @@ void ScDPTableDataCache::AddRow( ScDPItemData* pRow, USHORT nCount )
mpGlobalOrder = new std::vector<SCROW>[ mnColumnCount ];
mpIndexOrder = new std::vector<SCROW>[ mnColumnCount ];
- for ( USHORT i = 0; i < nCount ; i ++ )
+ for ( sal_uInt16 i = 0; i < nCount ; i ++ )
AddLabel( new ScDPItemData( pRow[i] ) );
}
else
{
- for ( USHORT i = 0; i < nCount && i < mnColumnCount; i ++ )
+ for ( sal_uInt16 i = 0; i < nCount && i < mnColumnCount; i ++ )
AddData( i, new ScDPItemData( pRow[i] ) );
}
}
@@ -529,18 +529,18 @@ bool ScDPTableDataCache::InitFromDoc( ScDocument* pDoc, const ScRange& rRange )
//
SCROW nStartRow = rRange.aStart.Row(); // start of data
SCROW nEndRow = rRange.aEnd.Row();
- USHORT nStartCol = rRange.aStart.Col();
- USHORT nEndCol = rRange.aEnd.Col();
- USHORT nDocTab = rRange.aStart.Tab();
+ sal_uInt16 nStartCol = rRange.aStart.Col();
+ sal_uInt16 nEndCol = rRange.aEnd.Col();
+ sal_uInt16 nDocTab = rRange.aStart.Tab();
//init
long nOldColumCount = mnColumnCount;
mnColumnCount = nEndCol - nStartCol + 1;
if ( IsValid() )
{
- for ( USHORT nCol=0; nCol < nOldColumCount ; nCol++ )
+ for ( sal_uInt16 nCol=0; nCol < nOldColumCount ; nCol++ )
{
- for ( ULONG row = 0 ; row < mpTableDataValues[nCol].size(); row++ )
+ for ( sal_uLong row = 0 ; row < mpTableDataValues[nCol].size(); row++ )
delete mpTableDataValues[nCol][row];
delete mrLabelNames[nCol];
}
@@ -558,7 +558,7 @@ bool ScDPTableDataCache::InitFromDoc( ScDocument* pDoc, const ScRange& rRange )
//check valid
for ( SCROW nRow = nStartRow; nRow <= nEndRow; nRow ++ )
{
- for ( USHORT nCol = nStartCol; nCol <= nEndCol; nCol++ )
+ for ( sal_uInt16 nCol = nStartCol; nCol <= nEndCol; nCol++ )
{
if ( nRow == nStartRow )
AddLabel( new ScDPItemData( pDoc, nRow, nCol, nDocTab ) );
@@ -566,7 +566,7 @@ bool ScDPTableDataCache::InitFromDoc( ScDocument* pDoc, const ScRange& rRange )
AddData( nCol - nStartCol, new ScDPItemData( pDoc, nRow, nCol, nDocTab ) );
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -586,9 +586,9 @@ bool ScDPTableDataCache::InitFromDataBase (const Reference<sdbc::XRowSet>& xRowS
mnColumnCount = xMeta->getColumnCount();
if ( IsValid() )
{
- for ( USHORT nCol=0; nCol < nOldColumCount ; nCol++ )
+ for ( sal_uInt16 nCol=0; nCol < nOldColumCount ; nCol++ )
{
- for ( ULONG row = 0 ; row < mpTableDataValues[nCol].size(); row++ )
+ for ( sal_uLong row = 0 ; row < mpTableDataValues[nCol].size(); row++ )
delete mpTableDataValues[nCol][row];
delete mrLabelNames[nCol];
}
@@ -638,7 +638,7 @@ bool ScDPTableDataCache::InitFromDataBase (const Reference<sdbc::XRowSet>& xRowS
}
}
// -----------------------------------------------------------------------
-ULONG ScDPTableDataCache::GetDimNumType( SCCOL nDim) const
+sal_uLong ScDPTableDataCache::GetDimNumType( SCCOL nDim) const
{
DBG_ASSERT( IsValid(), " IsValid() == false " );
DBG_ASSERT( nDim < mnColumnCount && nDim >=0, " dimention out of bound " );
@@ -649,20 +649,20 @@ ULONG ScDPTableDataCache::GetDimNumType( SCCOL nDim) const
}
// -----------------------------------------------------------------------
-bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOOL *pSpecial)
+bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, sal_Bool *pSpecial)
{ //Copied and modified from ScTable::ValidQuery
if (!rParam.GetEntry(0).bDoQuery)
- return TRUE;
- BOOL bMatchWholeCell = mpDoc->GetDocOptions().IsMatchWholeCell();
+ return sal_True;
+ sal_Bool bMatchWholeCell = mpDoc->GetDocOptions().IsMatchWholeCell();
//---------------------------------------------------------------
const SCSIZE nFixedBools = 32;
- BOOL aBool[nFixedBools];
- BOOL aTest[nFixedBools];
+ sal_Bool aBool[nFixedBools];
+ sal_Bool aTest[nFixedBools];
SCSIZE nEntryCount = rParam.GetEntryCount();
- BOOL* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new BOOL[nEntryCount] );
- BOOL* pTest = ( nEntryCount <= nFixedBools ? &aTest[0] : new BOOL[nEntryCount] );
+ sal_Bool* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new sal_Bool[nEntryCount] );
+ sal_Bool* pTest = ( nEntryCount <= nFixedBools ? &aTest[0] : new sal_Bool[nEntryCount] );
long nPos = -1;
SCSIZE i = 0;
@@ -682,11 +682,11 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO
if ( nQueryCol > rParam.nCol2 )
nQueryCol = rParam.nCol2;
SCCOL nSourceField = nQueryCol - rParam.nCol1;
- SCROW nId = GetItemDataId( nSourceField, nRow, FALSE );
+ SCROW nId = GetItemDataId( nSourceField, nRow, sal_False );
const ScDPItemData* pCellData = GetItemDataById( nSourceField, nId );
- BOOL bOk = FALSE;
- BOOL bTestEqual = FALSE;
+ sal_Bool bOk = sal_False;
+ sal_Bool bTestEqual = sal_False;
if ( pSpecial && pSpecial[i] )
{
@@ -720,7 +720,7 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO
bOk = !::rtl::math::approxEqual( nCellVal, rEntry.nVal );
break;
default:
- bOk= FALSE;
+ bOk= sal_False;
break;
}
}
@@ -731,19 +731,19 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO
{ // by String
String aCellStr = pCellData->GetString();
- BOOL bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
+ sal_Bool bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
|| (rEntry.eOp == SC_NOT_EQUAL)));
- BOOL bTestRegExp = FALSE;
+ sal_Bool bTestRegExp = sal_False;
if ( bRealRegExp || bTestRegExp )
{
xub_StrLen nStart = 0;
xub_StrLen nEnd = aCellStr.Len();
- BOOL bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens )
+ sal_Bool bMatch = (sal_Bool) rEntry.GetSearchTextPtr( rParam.bCaseSens )
->SearchFrwrd( aCellStr, &nStart, &nEnd );
// from 614 on, nEnd is behind the found text
if ( bMatch && bMatchWholeCell
&& (nStart != 0 || nEnd != aCellStr.Len()) )
- bMatch = FALSE; // RegExp must match entire cell string
+ bMatch = sal_False; // RegExp must match entire cell string
if ( bRealRegExp )
bOk = ((rEntry.eOp == SC_NOT_EQUAL) ? !bMatch : bMatch);
else
@@ -768,7 +768,7 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO
{
for(i=0;(i<nIndex) && (i< aCellStr.Len()) ; i++)
{
- if(aCellStr.GetChar( (USHORT)i ) == aStr.GetChar((USHORT) i ))
+ if(aCellStr.GetChar( (sal_uInt16)i ) == aStr.GetChar((sal_uInt16) i ))
{
bOk=1;
}
@@ -857,7 +857,7 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, BOO
pTest[0] = pTest[0] || pTest[j];
}
- BOOL bRet = pPasst[0];
+ sal_Bool bRet = pPasst[0];
if ( pPasst != &aBool[0] )
delete [] pPasst;
if ( pTest != &aTest[0] )
@@ -874,18 +874,18 @@ bool ScDPTableDataCache::IsRowEmpty( SCROW nRow ) const
}
// -----------------------------------------------------------------------
-bool ScDPTableDataCache::IsEmptyMember( SCROW nRow, USHORT nColumn ) const
+bool ScDPTableDataCache::IsEmptyMember( SCROW nRow, sal_uInt16 nColumn ) const
{
- return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, FALSE ) )->IsHasData();
+ return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, sal_False ) )->IsHasData();
}
-BOOL ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData)
+sal_Bool ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData)
{
DBG_ASSERT( IsValid(), " IsValid() == false " );
DBG_ASSERT( nDim < mnColumnCount && nDim >=0 , "dimension out of bound" );
SCROW nIndex = 0;
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
pitemData->SetDate( lcl_isDate( GetNumType( pitemData->nNumFormat ) ) );
@@ -895,7 +895,7 @@ BOOL ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData)
mpGlobalOrder[nDim].insert( mpGlobalOrder[nDim].begin()+nIndex, mpTableDataValues[nDim].size()-1 );
DBG_ASSERT( (size_t) mpGlobalOrder[nDim][nIndex] == mpTableDataValues[nDim].size()-1 ,"ScDPTableDataCache::AddData ");
mpSourceData[nDim].push_back( mpTableDataValues[nDim].size()-1 );
- bInserted = TRUE;
+ bInserted = sal_True;
}
else
mpSourceData[nDim].push_back( mpGlobalOrder[nDim][nIndex] );
@@ -903,22 +903,22 @@ BOOL ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData)
size_t nCurRow = mpSourceData[nDim].size() -1 ;
while ( mbEmptyRow.size() <= nCurRow )
- mbEmptyRow.push_back( TRUE );
+ mbEmptyRow.push_back( sal_True );
if ( pitemData->IsHasData() )
- mbEmptyRow[ nCurRow ] = FALSE;
+ mbEmptyRow[ nCurRow ] = sal_False;
if ( !bInserted )
delete pitemData;
- return TRUE;
+ return sal_True;
}
-String ScDPTableDataCache::GetDimensionName( USHORT nColumn ) const
+String ScDPTableDataCache::GetDimensionName( sal_uInt16 nColumn ) const
{
DBG_ASSERT( /* nColumn>=0 && */ nColumn < mrLabelNames.size()-1 , "ScDPTableDataCache::GetDimensionName");
- DBG_ASSERT( mrLabelNames.size() == static_cast <USHORT> (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName");
+ DBG_ASSERT( mrLabelNames.size() == static_cast <sal_uInt16> (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName");
if ( static_cast<size_t>(nColumn+1) < mrLabelNames.size() )
{
return mrLabelNames[nColumn+1]->aString;
@@ -937,7 +937,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData)
//reset name if needed
String strNewName = pData->aString;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
long nIndex = 1;
do
{
@@ -948,7 +948,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData)
strNewName = pData->aString;
strNewName += String::CreateFromInt32( nIndex );
nIndex ++ ;
- bFound = TRUE;
+ bFound = sal_True;
}
}
bFound = !bFound;
@@ -959,7 +959,7 @@ void ScDPTableDataCache::AddLabel(ScDPItemData *pData)
mrLabelNames.push_back( pData );
}
-SCROW ScDPTableDataCache::GetItemDataId(USHORT nDim, SCROW nRow, BOOL bRepeatIfEmpty) const
+SCROW ScDPTableDataCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, sal_Bool bRepeatIfEmpty) const
{ //
DBG_ASSERT( IsValid(), " IsValid() == false " );
DBG_ASSERT( /* nDim >= 0 && */ nDim < mnColumnCount, "ScDPTableDataCache::GetItemDataId " );
@@ -1007,16 +1007,16 @@ SCROW ScDPTableDataCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const
return mpGlobalOrder[nDim][nOrder];
}
-ULONG ScDPTableDataCache::GetNumType(ULONG nFormat) const
+sal_uLong ScDPTableDataCache::GetNumType(sal_uLong nFormat) const
{
SvNumberFormatter* pFormatter = mpDoc->GetFormatTable();
- ULONG nType = NUMBERFORMAT_NUMBER;
+ sal_uLong nType = NUMBERFORMAT_NUMBER;
if ( pFormatter )
nType = pFormatter->GetType( nFormat );
return nType;
}
-ULONG ScDPTableDataCache::GetNumberFormat( long nDim ) const
+sal_uLong ScDPTableDataCache::GetNumberFormat( long nDim ) const
{
if ( nDim >= mnColumnCount )
return 0;
@@ -1026,7 +1026,7 @@ ULONG ScDPTableDataCache::GetNumberFormat( long nDim ) const
return mpTableDataValues[nDim][0]->nNumFormat;
}
-BOOL ScDPTableDataCache::IsDateDimension( long nDim ) const
+sal_Bool ScDPTableDataCache::IsDateDimension( long nDim ) const
{
if ( nDim >= mnColumnCount )
return false;
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index c79f7c1b17a6..e7cb9dd2b679 100755..100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -72,7 +72,7 @@ SV_IMPL_PTRARR( ScDPDataMembers, ScDPDataMemberPtr );
// -----------------------------------------------------------------------
-static USHORT nFuncStrIds[12] = // passend zum enum ScSubTotalFunc
+static sal_uInt16 nFuncStrIds[12] = // passend zum enum ScSubTotalFunc
{
0, // SUBTOTAL_FUNC_NONE
STR_FUN_TEXT_AVG, // SUBTOTAL_FUNC_AVE
@@ -99,10 +99,10 @@ namespace {
}
vec.resize( nSize, NULL );
}
- BOOL lcl_SearchMember( const std::vector <ScDPResultMember *>& list, SCROW nOrder, SCROW& rIndex)
+ sal_Bool lcl_SearchMember( const std::vector <ScDPResultMember *>& list, SCROW nOrder, SCROW& rIndex)
{
rIndex = list.size();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCROW nLo = 0;
SCROW nHi = list.size() - 1;
SCROW nIndex;
@@ -116,7 +116,7 @@ namespace {
nHi = nIndex - 1;
if ( list[nIndex]->GetOrder() == nOrder )
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -135,37 +135,37 @@ class ScDPRowMembersOrder
{
ScDPResultDimension& rDimension;
long nMeasure;
- BOOL bAscending;
+ sal_Bool bAscending;
public:
- ScDPRowMembersOrder( ScDPResultDimension& rDim, long nM, BOOL bAsc ) :
+ ScDPRowMembersOrder( ScDPResultDimension& rDim, long nM, sal_Bool bAsc ) :
rDimension(rDim),
nMeasure(nM),
bAscending(bAsc)
{}
~ScDPRowMembersOrder() {}
- BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
+ sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
};
class ScDPColMembersOrder
{
ScDPDataDimension& rDimension;
long nMeasure;
- BOOL bAscending;
+ sal_Bool bAscending;
public:
- ScDPColMembersOrder( ScDPDataDimension& rDim, long nM, BOOL bAsc ) :
+ ScDPColMembersOrder( ScDPDataDimension& rDim, long nM, sal_Bool bAsc ) :
rDimension(rDim),
nMeasure(nM),
bAscending(bAsc)
{}
~ScDPColMembersOrder() {}
- BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
+ sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
};
-static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure, BOOL bAscending )
+static sal_Bool lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure, sal_Bool bAscending )
{
// members can be NULL if used for rows
@@ -173,17 +173,17 @@ static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember
const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : NULL;
const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : NULL;
- BOOL bError1 = pAgg1 && pAgg1->HasError();
- BOOL bError2 = pAgg2 && pAgg2->HasError();
+ sal_Bool bError1 = pAgg1 && pAgg1->HasError();
+ sal_Bool bError2 = pAgg2 && pAgg2->HasError();
if ( bError1 )
{
if ( bError2 )
- return FALSE; // equal
+ return sal_False; // equal
else
- return FALSE; // errors are always sorted at the end
+ return sal_False; // errors are always sorted at the end
}
else if ( bError2 )
- return TRUE; // errors are always sorted at the end
+ return sal_True; // errors are always sorted at the end
else
{
double fVal1 = ( pAgg1 && pAgg1->HasData() ) ? pAgg1->GetResult() : 0.0; // no data is sorted as 0
@@ -196,7 +196,7 @@ static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember
}
}
-static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure )
+static sal_Bool lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure )
{
// members can be NULL if used for rows
@@ -204,17 +204,17 @@ static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMembe
const ScDPAggData* pAgg1 = pDataMember1 ? pDataMember1->GetConstAggData( nMeasure, aEmptyState ) : NULL;
const ScDPAggData* pAgg2 = pDataMember2 ? pDataMember2->GetConstAggData( nMeasure, aEmptyState ) : NULL;
- BOOL bError1 = pAgg1 && pAgg1->HasError();
- BOOL bError2 = pAgg2 && pAgg2->HasError();
+ sal_Bool bError1 = pAgg1 && pAgg1->HasError();
+ sal_Bool bError2 = pAgg2 && pAgg2->HasError();
if ( bError1 )
{
if ( bError2 )
- return TRUE; // equal
+ return sal_True; // equal
else
- return FALSE;
+ return sal_False;
}
else if ( bError2 )
- return FALSE;
+ return sal_False;
else
{
double fVal1 = ( pAgg1 && pAgg1->HasData() ) ? pAgg1->GetResult() : 0.0; // no data is sorted as 0
@@ -227,7 +227,7 @@ static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMembe
}
}
-BOOL ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
+sal_Bool ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
{
const ScDPResultMember* pMember1 = rDimension.GetMember(nIndex1);
const ScDPResultMember* pMember2 = rDimension.GetMember(nIndex2);
@@ -240,17 +240,17 @@ BOOL ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) con
const ScDPDataMember* pDataMember2 = pMember2->GetDataRoot();
// End Comments
// GetDataRoot can be NULL if there was no data.
- // IsVisible == FALSE can happen after AutoShow.
+ // IsVisible == sal_False can happen after AutoShow.
return lcl_IsLess( pDataMember1, pDataMember2, nMeasure, bAscending );
}
-BOOL ScDPColMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
+sal_Bool ScDPColMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
{
ScDPDataMember* pDataMember1 = rDimension.GetMember(nIndex1);
ScDPDataMember* pDataMember2 = rDimension.GetMember(nIndex2);
// Wang Xu Ming -- 2009-6-17
- BOOL bHide1 = pDataMember1 && !pDataMember1->IsVisible();
- BOOL bHide2 = pDataMember2 && !pDataMember2->IsVisible();
+ sal_Bool bHide1 = pDataMember1 && !pDataMember1->IsVisible();
+ sal_Bool bHide2 = pDataMember2 && !pDataMember2->IsVisible();
if ( bHide1 || bHide2 )
return !bHide1;
// End Comments
@@ -510,7 +510,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
// check the error conditions for the selected function
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
switch (eFunc)
{
case SUBTOTAL_FUNC_SUM:
@@ -585,7 +585,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
}
}
- BOOL bEmpty = ( nCount == 0 ); // no data
+ sal_Bool bEmpty = ( nCount == 0 ); // no data
// store the result
// Empty is checked first, so empty results are shown empty even for "average" etc.
@@ -608,7 +608,7 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc, const ScDPSubTotalState& rSub
fAux = 0.0; // used for running total or original result of reference value
}
-BOOL ScDPAggData::IsCalculated() const
+sal_Bool ScDPAggData::IsCalculated() const
{
return ( nCount <= SC_DPAGG_RESULT_EMPTY );
}
@@ -620,14 +620,14 @@ double ScDPAggData::GetResult() const
return fVal; // use calculated value
}
-BOOL ScDPAggData::HasError() const
+sal_Bool ScDPAggData::HasError() const
{
DBG_ASSERT( IsCalculated(), "ScDPAggData not calculated" );
return ( nCount == SC_DPAGG_RESULT_ERROR );
}
-BOOL ScDPAggData::HasData() const
+sal_Bool ScDPAggData::HasData() const
{
DBG_ASSERT( IsCalculated(), "ScDPAggData not calculated" );
@@ -648,7 +648,7 @@ void ScDPAggData::SetError()
nCount = SC_DPAGG_RESULT_ERROR;
}
-void ScDPAggData::SetEmpty( BOOL bSet )
+void ScDPAggData::SetEmpty( sal_Bool bSet )
{
DBG_ASSERT( IsCalculated(), "ScDPAggData not calculated" );
@@ -693,7 +693,7 @@ void ScDPAggData::Reset()
// -----------------------------------------------------------------------
ScDPRowTotals::ScDPRowTotals() :
- bIsInColRoot( FALSE )
+ bIsInColRoot( sal_False )
{
}
@@ -772,9 +772,9 @@ ScDPResultData::ScDPResultData( ScDPSource* pSrc ) : //! Ref
pMeasRefs( NULL ),
pMeasRefOrient( NULL ),
pMeasNames( NULL ),
- bLateInit( FALSE ),
- bDataAtCol( FALSE ),
- bDataAtRow( FALSE )
+ bLateInit( sal_False ),
+ bDataAtCol( sal_False ),
+ bDataAtRow( sal_False )
{
lcl_ResizePointVector( mpDimMembers , SC_DAPI_MAXFIELDS );
@@ -791,7 +791,7 @@ ScDPResultData::~ScDPResultData()
}
void ScDPResultData::SetMeasureData( long nCount, const ScSubTotalFunc* pFunctions,
- const sheet::DataPilotFieldReference* pRefs, const USHORT* pRefOrient,
+ const sheet::DataPilotFieldReference* pRefs, const sal_uInt16* pRefOrient,
const String* pNames )
{
delete[] pMeasFuncs;
@@ -803,7 +803,7 @@ void ScDPResultData::SetMeasureData( long nCount, const ScSubTotalFunc* pFunctio
nMeasCount = nCount;
pMeasFuncs = new ScSubTotalFunc[nCount];
pMeasRefs = new sheet::DataPilotFieldReference[nCount];
- pMeasRefOrient = new USHORT[nCount];
+ pMeasRefOrient = new sal_uInt16[nCount];
pMeasNames = new String[nCount];
for (long i=0; i<nCount; i++)
{
@@ -820,20 +820,20 @@ void ScDPResultData::SetMeasureData( long nCount, const ScSubTotalFunc* pFunctio
pMeasFuncs = new ScSubTotalFunc[1];
pMeasFuncs[0] = SUBTOTAL_FUNC_NONE;
pMeasRefs = new sheet::DataPilotFieldReference[1]; // default ctor is ok
- pMeasRefOrient = new USHORT[1];
+ pMeasRefOrient = new sal_uInt16[1];
pMeasRefOrient[0] = sheet::DataPilotFieldOrientation_HIDDEN;
pMeasNames = new String[1];
pMeasNames[0] = ScGlobal::GetRscString( STR_EMPTYDATA );
}
}
-void ScDPResultData::SetDataLayoutOrientation( USHORT nOrient )
+void ScDPResultData::SetDataLayoutOrientation( sal_uInt16 nOrient )
{
bDataAtCol = ( nOrient == sheet::DataPilotFieldOrientation_COLUMN );
bDataAtRow = ( nOrient == sheet::DataPilotFieldOrientation_ROW );
}
-void ScDPResultData::SetLateInit( BOOL bSet )
+void ScDPResultData::SetLateInit( sal_Bool bSet )
{
bLateInit = bSet;
}
@@ -862,15 +862,15 @@ const sheet::DataPilotFieldReference& ScDPResultData::GetMeasureRefVal(long nMea
return pMeasRefs[nMeasure];
}
-USHORT ScDPResultData::GetMeasureRefOrient(long nMeasure) const
+sal_uInt16 ScDPResultData::GetMeasureRefOrient(long nMeasure) const
{
DBG_ASSERT( pMeasRefOrient && nMeasure < nMeasCount, "bumm" );
return pMeasRefOrient[nMeasure];
}
-String ScDPResultData::GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const
+String ScDPResultData::GetMeasureString(long nMeasure, sal_Bool bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const
{
- // with bForce==TRUE, return function instead of "result" for single measure
+ // with bForce==sal_True, return function instead of "result" for single measure
// with eForceFunc != SUBTOTAL_FUNC_NONE, always use eForceFunc
rbTotalResult = false;
if ( nMeasure < 0 || ( nMeasCount == 1 && !bForce && eForceFunc == SUBTOTAL_FUNC_NONE ) )
@@ -896,7 +896,7 @@ String ScDPResultData::GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFu
String aRet;
ScSubTotalFunc eFunc = ( eForceFunc == SUBTOTAL_FUNC_NONE ) ?
GetMeasureFunction(nMeasure) : eForceFunc;
- USHORT nId = nFuncStrIds[eFunc];
+ sal_uInt16 nId = nFuncStrIds[eFunc];
if (nId)
{
aRet += ScGlobal::GetRscString(nId); // function name
@@ -919,7 +919,7 @@ String ScDPResultData::GetMeasureDimensionName(long nMeasure) const
return pSource->GetDataDimName( nMeasure );
}
-BOOL ScDPResultData::IsBaseForGroup( long nDim ) const
+sal_Bool ScDPResultData::IsBaseForGroup( long nDim ) const
{
return pSource->GetData()->IsBaseForGroup( nDim );
}
@@ -929,38 +929,38 @@ long ScDPResultData::GetGroupBase( long nGroupDim ) const
return pSource->GetData()->GetGroupBase( nGroupDim );
}
-BOOL ScDPResultData::IsNumOrDateGroup( long nDim ) const
+sal_Bool ScDPResultData::IsNumOrDateGroup( long nDim ) const
{
return pSource->GetData()->IsNumOrDateGroup( nDim );
}
-BOOL ScDPResultData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
+sal_Bool ScDPResultData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
long nBaseDataId, long nBaseIndex ) const
{
const ScDPItemData* pData = pSource->GetItemDataById( nGroupIndex , nBaseDataId);
if ( pData )
return pSource->GetData()->IsInGroup( rGroupData, nGroupIndex, *pData , nBaseIndex );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDPResultData::IsInGroup( SCROW nGroupDataId, long nGroupIndex,
+sal_Bool ScDPResultData::IsInGroup( SCROW nGroupDataId, long nGroupIndex,
const ScDPItemData& rBaseData, long nBaseIndex ) const
{
const ScDPItemData* pGroupData = pSource->GetItemDataById( nGroupIndex , nGroupDataId);
if ( pGroupData )
return pSource->GetData()->IsInGroup( *pGroupData, nGroupIndex, rBaseData , nBaseIndex );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDPResultData::HasCommonElement(/* const ScDPItemData& rFirstData*/SCROW nFirstDataId, long nFirstIndex,
+sal_Bool ScDPResultData::HasCommonElement(/* const ScDPItemData& rFirstData*/SCROW nFirstDataId, long nFirstIndex,
const ScDPItemData& rSecondData, long nSecondIndex ) const
{
const ScDPItemData* pFirstData = pSource->GetItemDataById( nFirstIndex , nFirstDataId);
if ( pFirstData )
return pSource->GetData()->HasCommonElement( *pFirstData, nFirstIndex, rSecondData, nSecondIndex );
else
- return FALSE;
+ return sal_False;
}
const ScDPSource* ScDPResultData::GetSource() const
@@ -1002,31 +1002,31 @@ ResultMembers* ScDPResultData::GetDimResultMembers( long nDim , ScDPDimension*
ScDPResultMember::ScDPResultMember( const ScDPResultData* pData, const ScDPParentDimData& rParentDimData ,
- BOOL bForceSub ) :
+ sal_Bool bForceSub ) :
pResultData( pData ),
aParentDimData( rParentDimData ),
pChildDimension( NULL ),
pDataRoot( NULL ),
- bHasElements( FALSE ),
+ bHasElements( sal_False ),
bForceSubTotal( bForceSub ),
- bHasHiddenDetails( FALSE ),
- bInitialized( FALSE ),
- bAutoHidden( FALSE ),
+ bHasHiddenDetails( sal_False ),
+ bInitialized( sal_False ),
+ bAutoHidden( sal_False ),
nMemberStep( 1 )
{
// pParentLevel/pMemberDesc is 0 for root members
}
ScDPResultMember::ScDPResultMember( const ScDPResultData* pData,
- BOOL bForceSub ) :
+ sal_Bool bForceSub ) :
pResultData( pData ),
pChildDimension( NULL ),
pDataRoot( NULL ),
- bHasElements( FALSE ),
+ bHasElements( sal_False ),
bForceSubTotal( bForceSub ),
- bHasHiddenDetails( FALSE ),
- bInitialized( FALSE ),
- bAutoHidden( FALSE ),
+ bHasHiddenDetails( sal_False ),
+ bInitialized( sal_False ),
+ bAutoHidden( sal_False ),
nMemberStep( 1 )
{
}
@@ -1054,13 +1054,13 @@ void ScDPResultMember::FillItemData( ScDPItemData& rData ) const
rData.SetString( ScGlobal::GetRscString(STR_PIVOT_TOTAL) ); // root member
}
-BOOL ScDPResultMember::IsNamedItem( SCROW nIndex ) const
+sal_Bool ScDPResultMember::IsNamedItem( SCROW nIndex ) const
{
//! store ScDPMember pointer instead of ScDPMember ???
const ScDPMember* pMemberDesc = GetDPMember();
if (pMemberDesc)
return ((ScDPMember*)pMemberDesc)->IsNamedItem( nIndex );
- return FALSE;
+ return sal_False;
}
bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const
@@ -1084,13 +1084,13 @@ bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const
void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev,
size_t nPos, ScDPInitState& rInitState ,
- BOOL bInitChild /*= TRUE */)
+ sal_Bool bInitChild /*= sal_True */)
{
// with LateInit, initialize only those members that have data
if ( pResultData->IsLateInit() )
return;
- bInitialized = TRUE;
+ bInitialized = sal_True;
if (nPos >= ppDim.size())
return;
@@ -1107,7 +1107,7 @@ void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vect
{
if ( !pChildDimension )
pChildDimension = new ScDPResultDimension( pResultData );
- pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState , FALSE );
+ pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState , sal_False );
return;
}
else
@@ -1117,14 +1117,14 @@ void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vect
}
}
// End Comments
- bHasHiddenDetails = TRUE; // only if there is a next dimension
+ bHasHiddenDetails = sal_True; // only if there is a next dimension
return;
}
if ( bInitChild )
{
pChildDimension = new ScDPResultDimension( pResultData );
- pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState, TRUE );
+ pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState, sal_True );
}
}
@@ -1136,7 +1136,7 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
if ( !pResultData->IsLateInit() )
return;
- bInitialized = TRUE;
+ bInitialized = sal_True;
if ( rParams.IsEnd( nPos ) /*nPos >= ppDim.size()*/)
// No next dimension. Bail out.
@@ -1158,8 +1158,8 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
// #i111462# reset InitChild flag only for this child dimension's LateInitFrom call,
// not for following members of parent dimensions
- BOOL bWasInitChild = rParams.GetInitChild();
- rParams.SetInitChild( FALSE );
+ sal_Bool bWasInitChild = rParams.GetInitChild();
+ rParams.SetInitChild( sal_False );
pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState );
rParams.SetInitChild( bWasInitChild );
return;
@@ -1171,7 +1171,7 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
}
}
// End Comments
- bHasHiddenDetails = TRUE; // only if there is a next dimension
+ bHasHiddenDetails = sal_True; // only if there is a next dimension
return;
}
@@ -1184,9 +1184,9 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
}
}
-BOOL ScDPResultMember::IsSubTotalInTitle(long nMeasure) const
+sal_Bool ScDPResultMember::IsSubTotalInTitle(long nMeasure) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pChildDimension && /*pParentLevel*/GetParentLevel() &&
/*pParentLevel*/GetParentLevel()->IsOutlineLayout() && /*pParentLevel*/GetParentLevel()->IsSubtotalsAtTop() )
{
@@ -1200,7 +1200,7 @@ BOOL ScDPResultMember::IsSubTotalInTitle(long nMeasure) const
// only a single subtotal row will be shown in the outline title row
if ( nSubTotals == 1 )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1243,7 +1243,7 @@ long ScDPResultMember::GetSize(long nMeasure) const
}
}
-BOOL ScDPResultMember::IsVisible() const
+sal_Bool ScDPResultMember::IsVisible() const
{
// not initialized -> shouldn't be there at all
// (allocated only to preserve ordering)
@@ -1251,22 +1251,22 @@ BOOL ScDPResultMember::IsVisible() const
return ( bHasElements || ( pParentLevel && pParentLevel->getShowEmpty() ) ) && IsValid() && bInitialized;
}
-BOOL ScDPResultMember::IsValid() const
+sal_Bool ScDPResultMember::IsValid() const
{
// non-Valid members are left out of calculation
// was member set no invisible at the DataPilotSource?
const ScDPMember* pMemberDesc =GetDPMember();
if ( pMemberDesc && !pMemberDesc->getIsVisible() )
- return FALSE;
+ return sal_False;
if ( bAutoHidden )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
-BOOL ScDPResultMember::HasHiddenDetails() const
+sal_Bool ScDPResultMember::HasHiddenDetails() const
{
// bHasHiddenDetails is set only if the "show details" flag is off,
// and there was a child dimension to skip
@@ -1371,7 +1371,7 @@ static String lcl_parseSubtotalName(const String& rSubStr, const String& rCaptio
}
void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pSequences,
- long& rPos, long nMeasure, BOOL bRoot,
+ long& rPos, long nMeasure, sal_Bool bRoot,
const String* pMemberName,
const String* pMemberCaption )
{
@@ -1382,7 +1382,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
sheet::MemberResult* pArray = pSequences->getArray();
DBG_ASSERT( rPos+nSize <= pSequences->getLength(), "bumm" );
- BOOL bIsNumeric = FALSE;
+ sal_Bool bIsNumeric = sal_False;
String aName;
if ( pMemberName ) // if pMemberName != NULL, use instead of real member name
aName = *pMemberName;
@@ -1398,7 +1398,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
{
// Numeric group dimensions use numeric entries for proper sorting,
// but the group titles must be output as text.
- bIsNumeric = FALSE;
+ bIsNumeric = sal_False;
}
String aCaption = aName;
@@ -1439,15 +1439,15 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
if ( pParentLevel && pParentLevel->IsAddEmpty() )
++nExtraSpace;
- BOOL bTitleLine = FALSE;
+ sal_Bool bTitleLine = sal_False;
if ( pParentLevel && pParentLevel->IsOutlineLayout() )
- bTitleLine = TRUE;
+ bTitleLine = sal_True;
// if the subtotals are shown at the top (title row) in outline layout,
// no extra row for the subtotals is needed
- BOOL bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
+ sal_Bool bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
{
if ( bTitleLine ) // in tabular layout the title is on a separate row
@@ -1489,7 +1489,7 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS
bool bTotalResult = false;
String aSubStr = aCaption;
aSubStr += ' ';
- aSubStr += pResultData->GetMeasureString(nMemberMeasure, FALSE, eForce, bTotalResult);
+ aSubStr += pResultData->GetMeasureString(nMemberMeasure, sal_False, eForce, bTotalResult);
if (bTotalResult)
{
@@ -1560,13 +1560,13 @@ void ScDPResultMember::FillDataResults( const ScDPResultMember* pRefMember,
if ( pParentLevel && pParentLevel->IsAddEmpty() )
++nExtraSpace;
- BOOL bTitleLine = FALSE;
+ sal_Bool bTitleLine = sal_False;
if ( pParentLevel && pParentLevel->IsOutlineLayout() )
- bTitleLine = TRUE;
+ bTitleLine = sal_True;
- BOOL bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
+ sal_Bool bSubTotalInTitle = IsSubTotalInTitle( nMeasure );
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
{
if ( bTitleLine ) // in tabular layout the title is on a separate row
@@ -1650,7 +1650,7 @@ void ScDPResultMember::UpdateDataResults( const ScDPResultMember* pRefMember, lo
// IsVisible() test is in ScDPResultDimension::FillDataResults
// (not on data layout dimension)
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
long nUserSubCount = GetSubTotalCount();
// process subtotals even if not shown
@@ -1697,7 +1697,7 @@ void ScDPResultMember::UpdateDataResults( const ScDPResultMember* pRefMember, lo
void ScDPResultMember::SortMembers( ScDPResultMember* pRefMember )
{
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
pChildDimension->SortMembers( pRefMember ); // sorting is done at the dimension
@@ -1712,7 +1712,7 @@ void ScDPResultMember::SortMembers( ScDPResultMember* pRefMember )
void ScDPResultMember::DoAutoShow( ScDPResultMember* pRefMember )
{
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
if (bHasChild)
pChildDimension->DoAutoShow( pRefMember ); // sorting is done at the dimension
@@ -1725,7 +1725,7 @@ void ScDPResultMember::DoAutoShow( ScDPResultMember* pRefMember )
}
}
-void ScDPResultMember::ResetResults( BOOL /*bRoot*/ )
+void ScDPResultMember::ResetResults( sal_Bool /*bRoot*/ )
{
if (pDataRoot)
pDataRoot->ResetResults();
@@ -1734,7 +1734,7 @@ void ScDPResultMember::ResetResults( BOOL /*bRoot*/ )
pChildDimension->ResetResults();
// if (!bRoot)
- // bHasElements = FALSE;
+ // bHasElements = sal_False;
}
void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember, long nMeasure,
@@ -1745,7 +1745,7 @@ void ScDPResultMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
rTotals.SetInColRoot( IsRoot() );
- BOOL bHasChild = ( pChildDimension != NULL );
+ sal_Bool bHasChild = ( pChildDimension != NULL );
long nUserSubCount = GetSubTotalCount();
//if ( nUserSubCount || !bHasChild )
@@ -1838,28 +1838,28 @@ String ScDPDataMember::GetName() const
return EMPTY_STRING;
}
-BOOL ScDPDataMember::IsVisible() const
+sal_Bool ScDPDataMember::IsVisible() const
{
if (pResultMember)
return pResultMember->IsVisible();
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDPDataMember::IsNamedItem( /*const ScDPItemData& r*/SCROW r ) const
+sal_Bool ScDPDataMember::IsNamedItem( /*const ScDPItemData& r*/SCROW r ) const
{
if (pResultMember)
return pResultMember->IsNamedItem(r);
else
- return FALSE;
+ return sal_False;
}
-BOOL ScDPDataMember::HasHiddenDetails() const
+sal_Bool ScDPDataMember::HasHiddenDetails() const
{
if (pResultMember)
return pResultMember->HasHiddenDetails();
else
- return FALSE;
+ return sal_False;
}
void ScDPDataMember::InitFrom( const ScDPResultDimension* pDim )
@@ -1949,26 +1949,26 @@ void ScDPDataMember::ProcessData( const vector< SCROW >& aChildMembers, const ve
pChildDimension->ProcessData( aChildMembers, aValues, rSubState ); // with unmodified subtotal state
}
-BOOL ScDPDataMember::HasData( long nMeasure, const ScDPSubTotalState& rSubState ) const
+sal_Bool ScDPDataMember::HasData( long nMeasure, const ScDPSubTotalState& rSubState ) const
{
if ( rSubState.eColForce != SUBTOTAL_FUNC_NONE && rSubState.eRowForce != SUBTOTAL_FUNC_NONE &&
rSubState.eColForce != rSubState.eRowForce )
- return FALSE;
+ return sal_False;
// #74542# HasData can be different between measures!
const ScDPAggData* pAgg = GetConstAggData( nMeasure, rSubState );
if (!pAgg)
- return FALSE; //! error?
+ return sal_False; //! error?
return pAgg->HasData();
}
-BOOL ScDPDataMember::HasError( long nMeasure, const ScDPSubTotalState& rSubState ) const
+sal_Bool ScDPDataMember::HasError( long nMeasure, const ScDPSubTotalState& rSubState ) const
{
const ScDPAggData* pAgg = GetConstAggData( nMeasure, rSubState );
if (!pAgg)
- return TRUE;
+ return sal_True;
return pAgg->HasError();
}
@@ -2024,7 +2024,7 @@ const ScDPAggData* ScDPDataMember::GetConstAggData( long nMeasure, const ScDPSub
void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
uno::Sequence<sheet::DataResult>& rSequence,
- long& rCol, long nMeasure, BOOL bIsSubTotalRow,
+ long& rCol, long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState ) const
{
DBG_ASSERT( pRefMember == pResultMember || !pResultMember, "bla" );
@@ -2042,15 +2042,15 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
if ( pRefParentLevel && pRefParentLevel->IsAddEmpty() )
++nExtraSpace;
- BOOL bTitleLine = FALSE;
+ sal_Bool bTitleLine = sal_False;
if ( pRefParentLevel && pRefParentLevel->IsOutlineLayout() )
- bTitleLine = TRUE;
+ bTitleLine = sal_True;
- BOOL bSubTotalInTitle = pRefMember->IsSubTotalInTitle( nMeasure );
+ sal_Bool bSubTotalInTitle = pRefMember->IsSubTotalInTitle( nMeasure );
// leave space for children even if the DataMember hasn't been initialized
// (pDataChild is null then, this happens when no values for it are in this row)
- BOOL bHasChild = ( pRefChild != NULL );
+ sal_Bool bHasChild = ( pRefChild != NULL );
if ( bHasChild )
{
@@ -2059,7 +2059,7 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
if ( pDataChild )
pDataChild->FillDataRow( pRefChild, rSequence, rCol, nMeasure, bIsSubTotalRow, rSubState );
- rCol += (USHORT)pRefMember->GetSize( nMeasure );
+ rCol += (sal_uInt16)pRefMember->GetSize( nMeasure );
if ( bTitleLine ) // title column is included in GetSize, so the following
--rCol; // positions are calculated with the normal values
@@ -2142,7 +2142,7 @@ void ScDPDataMember::FillDataRow( const ScDPResultMember* pRefMember,
}
void ScDPDataMember::UpdateDataRow( const ScDPResultMember* pRefMember,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState )
{
DBG_ASSERT( pRefMember == pResultMember || !pResultMember, "bla" );
@@ -2153,7 +2153,7 @@ void ScDPDataMember::UpdateDataRow( const ScDPResultMember* pRefMember,
// leave space for children even if the DataMember hasn't been initialized
// (pDataChild is null then, this happens when no values for it are in this row)
- BOOL bHasChild = ( pRefChild != NULL );
+ sal_Bool bHasChild = ( pRefChild != NULL );
// process subtotals even if not shown
long nUserSubCount = pRefMember->GetSubTotalCount();
@@ -2250,7 +2250,7 @@ void ScDPDataMember::ResetResults()
}
void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState, ScDPRunningTotalState& rRunning,
ScDPRowTotals& rTotals, const ScDPResultMember& rRowParent )
{
@@ -2261,11 +2261,11 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
const ScDPDataDimension* pDataChild = GetChildDimension();
const ScDPResultDimension* pRefChild = pRefMember->GetChildDimension();
- BOOL bIsRoot = ( pResultMember == NULL || pResultMember->GetParentLevel() == NULL );
+ sal_Bool bIsRoot = ( pResultMember == NULL || pResultMember->GetParentLevel() == NULL );
// leave space for children even if the DataMember hasn't been initialized
// (pDataChild is null then, this happens when no values for it are in this row)
- BOOL bHasChild = ( pRefChild != NULL );
+ sal_Bool bHasChild = ( pRefChild != NULL );
long nUserSubCount = pRefMember->GetSubTotalCount();
//if ( nUserSubCount || !bHasChild )
@@ -2307,8 +2307,8 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
eRefType == sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE ||
eRefType == sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE )
{
- BOOL bRunningTotal = ( eRefType == sheet::DataPilotFieldReferenceType::RUNNING_TOTAL );
- BOOL bRelative =
+ sal_Bool bRunningTotal = ( eRefType == sheet::DataPilotFieldReferenceType::RUNNING_TOTAL );
+ sal_Bool bRelative =
( aReferenceValue.ReferenceItemType != sheet::DataPilotFieldReferenceItemType::NAMED && !bRunningTotal );
long nRelativeDir = bRelative ?
( ( aReferenceValue.ReferenceItemType == sheet::DataPilotFieldReferenceItemType::PREVIOUS ) ? -1 : 1 ) : 0;
@@ -2321,9 +2321,9 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
String aRefFieldName = aReferenceValue.ReferenceField;
//! aLocalSubState?
- USHORT nRefOrient = pResultData->GetMeasureRefOrient( nMemberMeasure );
- BOOL bRefDimInCol = ( nRefOrient == sheet::DataPilotFieldOrientation_COLUMN );
- BOOL bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW );
+ sal_uInt16 nRefOrient = pResultData->GetMeasureRefOrient( nMemberMeasure );
+ sal_Bool bRefDimInCol = ( nRefOrient == sheet::DataPilotFieldOrientation_COLUMN );
+ sal_Bool bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW );
const ScDPResultDimension* pSelectDim = NULL;
long nRowPos = 0;
@@ -2367,7 +2367,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
pSelectDim = NULL;
}
- BOOL bNoDetailsInRef = FALSE;
+ sal_Bool bNoDetailsInRef = sal_False;
if ( pSelectDim && bRunningTotal )
{
// Running totals:
@@ -2382,7 +2382,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
if ( pMyRefMember && pMyRefMember->HasHiddenDetails() )
{
pSelectDim = NULL; // don't calculate
- bNoDetailsInRef = TRUE; // show error, not empty
+ bNoDetailsInRef = sal_True; // show error, not empty
}
}
}
@@ -2401,17 +2401,17 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
// - Otherwise, the error isn't strictly necessary, but shown for
// consistency.
- BOOL bInnerNoDetails = bRefDimInCol ? HasHiddenDetails() :
- ( bRefDimInRow ? rRowParent.HasHiddenDetails() : TRUE );
+ sal_Bool bInnerNoDetails = bRefDimInCol ? HasHiddenDetails() :
+ ( bRefDimInRow ? rRowParent.HasHiddenDetails() : sal_True );
if ( bInnerNoDetails )
{
pSelectDim = NULL;
- bNoDetailsInRef = TRUE; // show error, not empty
+ bNoDetailsInRef = sal_True; // show error, not empty
}
}
if ( !bRefDimInCol && !bRefDimInRow ) // invalid dimension specified
- bNoDetailsInRef = TRUE; // pSelectDim is then already NULL
+ bNoDetailsInRef = sal_True; // pSelectDim is then already NULL
//
// get the member for the reference item and do the calculation
@@ -2449,7 +2449,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
fTotal += pAggData->GetResult();
pSelectData->SetAuxiliary( fTotal );
pAggData->SetResult( fTotal );
- pAggData->SetEmpty(FALSE); // always display
+ pAggData->SetEmpty(sal_False); // always display
}
}
else
@@ -2458,7 +2458,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
else if (bNoDetailsInRef)
pAggData->SetError();
else
- pAggData->SetEmpty(TRUE); // empty (dim set to 0 above)
+ pAggData->SetEmpty(sal_True); // empty (dim set to 0 above)
}
else
{
@@ -2495,7 +2495,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
if ( pSelectMember == this &&
eRefType != sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE )
{
- pAggData->SetEmpty(TRUE);
+ pAggData->SetEmpty(sal_True);
}
else if ( pSelectMember )
{
@@ -2509,7 +2509,7 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
double fOtherResult = pOtherAggData->GetAuxiliary();
double fThisResult = pAggData->GetResult();
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
switch ( eRefType )
{
case sheet::DataPilotFieldReferenceType::ITEM_DIFFERENCE:
@@ -2517,13 +2517,13 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
break;
case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE:
if ( fOtherResult == 0.0 )
- bError = TRUE;
+ bError = sal_True;
else
fThisResult = fThisResult / fOtherResult;
break;
case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE:
if ( fOtherResult == 0.0 )
- bError = TRUE;
+ bError = sal_True;
else
fThisResult = ( fThisResult - fOtherResult ) / fOtherResult;
break;
@@ -2537,20 +2537,20 @@ void ScDPDataMember::UpdateRunningTotals( const ScDPResultMember* pRefMember,
else
{
pAggData->SetResult(fThisResult);
- pAggData->SetEmpty(FALSE); // always display
+ pAggData->SetEmpty(sal_False); // always display
}
//! errors in data?
}
}
else if (bRelative && !bNoDetailsInRef)
- pAggData->SetEmpty(TRUE); // empty
+ pAggData->SetEmpty(sal_True); // empty
else
pAggData->SetError(); // error
}
else if (bNoDetailsInRef)
pAggData->SetError(); // error
else
- pAggData->SetEmpty(TRUE); // empty
+ pAggData->SetEmpty(sal_True); // empty
}
}
else if ( eRefType == sheet::DataPilotFieldReferenceType::ROW_PERCENTAGE ||
@@ -2654,8 +2654,8 @@ private:
const ScDPResultData* pResultData;
const ScDPInitState& rInitState;
long nDimSource;
- BOOL bIncludeAll;
- BOOL bIsBase;
+ sal_Bool bIncludeAll;
+ sal_Bool bIsBase;
long nGroupBase;
// Wang Xu Ming -- 2009-8-6
// DataPilot Migration - Cache&&Performance
@@ -2665,8 +2665,8 @@ public:
ScDPGroupCompare( const ScDPResultData* pData, const ScDPInitState& rState, long nDimension );
~ScDPGroupCompare() {}
- BOOL IsIncluded( const ScDPMember& rMember ) { return bIncludeAll || TestIncluded( rMember ); }
- BOOL TestIncluded( const ScDPMember& rMember );
+ sal_Bool IsIncluded( const ScDPMember& rMember ) { return bIncludeAll || TestIncluded( rMember ); }
+ sal_Bool TestIncluded( const ScDPMember& rMember );
};
ScDPGroupCompare::ScDPGroupCompare( const ScDPResultData* pData, const ScDPInitState& rState, long nDimension ) :
@@ -2684,9 +2684,9 @@ ScDPGroupCompare::ScDPGroupCompare( const ScDPResultData* pData, const ScDPInitS
bIncludeAll = !( bIsBase || nGroupBase >= 0 );
}
-BOOL ScDPGroupCompare::TestIncluded( const ScDPMember& rMember )
+sal_Bool ScDPGroupCompare::TestIncluded( const ScDPMember& rMember )
{
- BOOL bInclude = TRUE;
+ sal_Bool bInclude = sal_True;
if ( nBaseDataId >=0 )
{
ScDPItemData aMemberData;
@@ -2738,13 +2738,13 @@ BOOL ScDPGroupCompare::TestIncluded( const ScDPMember& rMember )
ScDPResultDimension::ScDPResultDimension( const ScDPResultData* pData ) :
pResultData( pData ),
- bInitialized( FALSE ),
- bIsDataLayout( FALSE ),
- bSortByData( FALSE ),
- bSortAscending( FALSE ),
+ bInitialized( sal_False ),
+ bIsDataLayout( sal_False ),
+ bSortByData( sal_False ),
+ bSortAscending( sal_False ),
nSortMeasure( 0 ),
- bAutoShow( FALSE ),
- bAutoTopItems( FALSE ),
+ bAutoShow( sal_False ),
+ bAutoTopItems( sal_False ),
nAutoMeasure( 0 ),
nAutoCount( 0 )
{
@@ -2781,7 +2781,7 @@ ScDPResultMember *ScDPResultDimension::FindMember( SCROW iData ) const
}
void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev,
- size_t nPos, ScDPInitState& rInitState, BOOL bInitChild /*= TRUE */ )
+ size_t nPos, ScDPInitState& rInitState, sal_Bool bInitChild /*= sal_True */ )
{
if (nPos >= ppDim.size() || nPos >= ppLev.size())
{
@@ -2805,7 +2805,7 @@ void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const v
const sheet::DataPilotFieldAutoShowInfo& rAutoInfo = pThisLevel->GetAutoShow();
if ( rAutoInfo.IsEnabled )
{
- bAutoShow = TRUE;
+ bAutoShow = sal_True;
bAutoTopItems = ( rAutoInfo.ShowItemsMode == sheet::DataPilotFieldShowItemsMode::FROM_TOP );
nAutoMeasure = pThisLevel->GetAutoMeasure();
nAutoCount = rAutoInfo.ItemCount;
@@ -2815,7 +2815,7 @@ void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const v
const sheet::DataPilotFieldSortInfo& rSortInfo = pThisLevel->GetSortInfo();
if ( rSortInfo.Mode == sheet::DataPilotFieldSortMode::DATA )
{
- bSortByData = TRUE;
+ bSortByData = sal_True;
bSortAscending = rSortInfo.IsAscending;
nSortMeasure = pThisLevel->GetSortMeasure();
}
@@ -2844,7 +2844,7 @@ void ScDPResultDimension::InitFrom( const vector<ScDPDimension*>& ppDim, const v
rInitState.RemoveMember();
}
}
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev*/,
@@ -2866,7 +2866,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
long nDimSource = pThisDim->GetDimension(); //! check GetSourceDim?
- BOOL bShowEmpty = pThisLevel->getShowEmpty();
+ sal_Bool bShowEmpty = pThisLevel->getShowEmpty();
if ( !bInitialized )
{ // init some values
@@ -2877,7 +2877,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
const sheet::DataPilotFieldAutoShowInfo& rAutoInfo = pThisLevel->GetAutoShow();
if ( rAutoInfo.IsEnabled )
{
- bAutoShow = TRUE;
+ bAutoShow = sal_True;
bAutoTopItems = ( rAutoInfo.ShowItemsMode == sheet::DataPilotFieldShowItemsMode::FROM_TOP );
nAutoMeasure = pThisLevel->GetAutoMeasure();
nAutoCount = rAutoInfo.ItemCount;
@@ -2886,7 +2886,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
const sheet::DataPilotFieldSortInfo& rSortInfo = pThisLevel->GetSortInfo();
if ( rSortInfo.Mode == sheet::DataPilotFieldSortMode::DATA )
{
- bSortByData = TRUE;
+ bSortByData = sal_True;
bSortAscending = rSortInfo.IsAscending;
nSortMeasure = pThisLevel->GetSortMeasure();
}
@@ -2903,7 +2903,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
if ( pMembers->IsHasHideDetailsMembers() )
DBG_TRACE ( "HasHideDetailsMembers" );
#endif
- pMembers->SetHasHideDetailsMembers( FALSE );
+ pMembers->SetHasHideDetailsMembers( sal_False );
}
bool bNewAllMembers =(!rParams.IsRow()) || nPos == 0 || bLateInitAllMembers ;
@@ -2929,7 +2929,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
AddMember( aData );
}
}
- bInitialized = TRUE; // don't call again, even if no members were included
+ bInitialized = sal_True; // don't call again, even if no members were included
}
// initialize only specific member (or all if "show empty" flag is set)
if ( bLateInitAllMembers )
@@ -2940,13 +2940,13 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S
ScDPResultMember* pResultMember = maMemberArray[i];
// check show empty
- BOOL bAllChildren = FALSE;
+ sal_Bool bAllChildren = sal_False;
if( bShowEmpty )
{
if ( pResultMember->IsNamedItem( rThisData ) )
- bAllChildren = FALSE;
+ bAllChildren = sal_False;
else
- bAllChildren = TRUE;
+ bAllChildren = sal_True;
}
rParams.SetInitAllChildren( bAllChildren );
rInitState.AddMember( nDimSource, pResultMember->GetDataId() );
@@ -3049,11 +3049,11 @@ void ScDPResultDimension::FillMemberResults( uno::Sequence<sheet::MemberResult>*
{
bool bTotalResult = false;
String aMbrName = pResultData->GetMeasureDimensionName( nSorted );
- String aMbrCapt = pResultData->GetMeasureString( nSorted, FALSE, SUBTOTAL_FUNC_NONE, bTotalResult );
- maMemberArray[0]->FillMemberResults( pSequences, nPos, nSorted, FALSE, &aMbrName, &aMbrCapt );
+ String aMbrCapt = pResultData->GetMeasureString( nSorted, sal_False, SUBTOTAL_FUNC_NONE, bTotalResult );
+ maMemberArray[0]->FillMemberResults( pSequences, nPos, nSorted, sal_False, &aMbrName, &aMbrCapt );
}
else if ( pMember->IsVisible() )
- pMember->FillMemberResults( pSequences, nPos, nMeasure, FALSE, NULL, NULL );
+ pMember->FillMemberResults( pSequences, nPos, nMeasure, sal_False, NULL, NULL );
// nPos is modified
}
}
@@ -3170,10 +3170,10 @@ void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember )
long nIncluded = nAutoCount;
const ScDPResultMember* pMember1 = maMemberArray[aAutoOrder[nIncluded - 1]];
const ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL;
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue )
{
- bContinue = FALSE;
+ bContinue = sal_False;
if ( nIncluded < nCount )
{
const ScDPResultMember* pMember2 = maMemberArray[aAutoOrder[nIncluded]];
@@ -3182,7 +3182,7 @@ void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember )
if ( lcl_IsEqual( pDataMember1, pDataMember2, nAutoMeasure ) )
{
++nIncluded; // include more members if values are equal
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
}
@@ -3204,7 +3204,7 @@ void ScDPResultDimension::ResetResults()
{
// sort order doesn't matter
ScDPResultMember* pMember = maMemberArray[bIsDataLayout ? 0 : i];
- pMember->ResetResults( FALSE );
+ pMember->ResetResults( sal_False );
}
}
@@ -3254,7 +3254,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember( const ScDPRelativePo
ScDPDataMember* pColMember = NULL;
- BOOL bFirstExisting = ( pRelativePos == NULL && pName == NULL );
+ sal_Bool bFirstExisting = ( pRelativePos == NULL && pName == NULL );
long nMemberCount = maMemberArray.size();
long nMemberIndex = 0; // unsorted
long nDirection = 1; // forward if no relative position is used
@@ -3282,7 +3282,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember( const ScDPRelativePo
}
}
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue && nMemberIndex >= 0 && nMemberIndex < nMemberCount )
{
const ScDPResultMember* pRowMember = maMemberArray[GetSortedIndex(nMemberIndex)];
@@ -3389,7 +3389,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember( const ScDPRelativePo
{
long nReferenceCount = pReferenceDim->GetMemberCount();
- BOOL bFirstExisting = ( pRelativePos == NULL && pName == NULL );
+ sal_Bool bFirstExisting = ( pRelativePos == NULL && pName == NULL );
long nMemberIndex = 0; // unsorted
long nDirection = 1; // forward if no relative position is used
pColMember = NULL; // don't use parent dimension's member if none found
@@ -3415,7 +3415,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember( const ScDPRelativePo
}
}
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue && nMemberIndex >= 0 && nMemberIndex < nReferenceCount )
{
pColMember = pReferenceDim->GetMember( pReferenceDim->GetSortedIndex( nMemberIndex ) );
@@ -3519,7 +3519,7 @@ void ScDPResultDimension::FillVisibilityData(ScDPResultVisibilityData& rData) co
ScDPDataDimension::ScDPDataDimension( const ScDPResultData* pData ) :
pResultData( pData ),
pResultDimension( NULL ),
- bIsDataLayout( FALSE )
+ bIsDataLayout( sal_False )
{
}
@@ -3565,7 +3565,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const
long nCount = aMembers.Count();
for (long i=0; i<nCount; i++)
{
- ScDPDataMember* pMember = aMembers[(USHORT)i];
+ ScDPDataMember* pMember = aMembers[(sal_uInt16)i];
// always first member for data layout dim
if ( bIsDataLayout || ( !aDataMembers.empty() && pMember->IsNamedItem(aDataMembers[0]) ) )
@@ -3586,7 +3586,7 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const
void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
uno::Sequence<sheet::DataResult>& rSequence,
- long nCol, long nMeasure, BOOL bIsSubTotalRow,
+ long nCol, long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState ) const
{
DBG_ASSERT( pRefDim && pRefDim->GetMemberCount() == aMembers.Count(), "dimensions don't match" );
@@ -3613,7 +3613,7 @@ void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
const ScDPResultMember* pRefMember = pRefDim->GetMember(nMemberPos);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember::FillDataRow ???
{
- const ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ const ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->FillDataRow( pRefMember, rSequence, nMemberCol, nMemberMeasure, bIsSubTotalRow, rSubState );
// nMemberCol is modified
}
@@ -3621,7 +3621,7 @@ void ScDPDataDimension::FillDataRow( const ScDPResultDimension* pRefDim,
}
void ScDPDataDimension::UpdateDataRow( const ScDPResultDimension* pRefDim,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState ) const
{
DBG_ASSERT( pRefDim && pRefDim->GetMemberCount() == aMembers.Count(), "dimensions don't match" );
@@ -3642,7 +3642,7 @@ void ScDPDataDimension::UpdateDataRow( const ScDPResultDimension* pRefDim,
// Calculate must be called even if the member is not visible (for use as reference value)
const ScDPResultMember* pRefMember = pRefDim->GetMember(nMemberPos);
- ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->UpdateDataRow( pRefMember, nMemberMeasure, bIsSubTotalRow, rSubState );
}
}
@@ -3677,7 +3677,7 @@ void ScDPDataDimension::SortMembers( ScDPResultDimension* pRefDim )
ScDPResultMember* pRefMember = pRefDim->GetMember(i);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember ???
{
- ScDPDataMember* pDataMember = aMembers[(USHORT)i];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i];
pDataMember->SortMembers( pRefMember );
}
}
@@ -3699,7 +3699,7 @@ void ScDPDataDimension::DoAutoShow( ScDPResultDimension* pRefDim )
ScDPResultMember* pRefMember = pRefDim->GetMember(i);
if ( pRefMember->IsVisible() ) //! here or in ScDPDataMember ???
{
- ScDPDataMember* pDataMember = aMembers[(USHORT)i];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i];
pDataMember->DoAutoShow( pRefMember );
}
}
@@ -3720,23 +3720,23 @@ void ScDPDataDimension::DoAutoShow( ScDPResultDimension* pRefDim )
// look for equal values to the last included one
long nIncluded = pRefDim->GetAutoCount();
- ScDPDataMember* pDataMember1 = aMembers[(USHORT)aAutoOrder[nIncluded - 1]];
+ ScDPDataMember* pDataMember1 = aMembers[(sal_uInt16)aAutoOrder[nIncluded - 1]];
if ( !pDataMember1->IsVisible() )
pDataMember1 = NULL;
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
while ( bContinue )
{
- bContinue = FALSE;
+ bContinue = sal_False;
if ( nIncluded < nCount )
{
- ScDPDataMember* pDataMember2 = aMembers[(USHORT)aAutoOrder[nIncluded]];
+ ScDPDataMember* pDataMember2 = aMembers[(sal_uInt16)aAutoOrder[nIncluded]];
if ( !pDataMember2->IsVisible() )
pDataMember2 = NULL;
if ( lcl_IsEqual( pDataMember1, pDataMember2, pRefDim->GetAutoMeasure() ) )
{
++nIncluded; // include more members if values are equal
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
}
@@ -3759,7 +3759,7 @@ void ScDPDataDimension::ResetResults()
// sort order doesn't matter
long nMemberPos = bIsDataLayout ? 0 : i;
- ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->ResetResults();
}
}
@@ -3774,7 +3774,7 @@ long ScDPDataDimension::GetSortedIndex( long nUnsorted ) const
}
void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim,
- long nMeasure, BOOL bIsSubTotalRow,
+ long nMeasure, sal_Bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState, ScDPRunningTotalState& rRunning,
ScDPRowTotals& rTotals, const ScDPResultMember& rRowParent ) const
{
@@ -3805,7 +3805,7 @@ void ScDPDataDimension::UpdateRunningTotals( const ScDPResultDimension* pRefDim,
else
rRunning.AddColIndex( i, nSorted );
- ScDPDataMember* pDataMember = aMembers[(USHORT)nMemberPos];
+ ScDPDataMember* pDataMember = aMembers[(sal_uInt16)nMemberPos];
pDataMember->UpdateRunningTotals( pRefMember, nMemberMeasure,
bIsSubTotalRow, rSubState, rRunning, rTotals, rRowParent );
@@ -3825,7 +3825,7 @@ void ScDPDataDimension::DumpState( const ScDPResultDimension* pRefDim, ScDocumen
for (long i=0; i<nCount; i++)
{
const ScDPResultMember* pRefMember = pRefDim->GetMember(i);
- const ScDPDataMember* pDataMember = aMembers[(USHORT)i];
+ const ScDPDataMember* pDataMember = aMembers[(sal_uInt16)i];
pDataMember->DumpState( pRefMember, pDoc, rPos );
}
@@ -3839,7 +3839,7 @@ long ScDPDataDimension::GetMemberCount() const
ScDPDataMember* ScDPDataDimension::GetMember(long n) const
{
- return aMembers[(USHORT)n];
+ return aMembers[(sal_uInt16)n];
}
// ----------------------------------------------------------------------------
@@ -3939,7 +3939,7 @@ SCROW ScDPResultMember::GetDataId( ) const
ScDPResultMember* ScDPResultDimension::AddMember(const ScDPParentDimData &aData )
{
- ScDPResultMember* pMember = new ScDPResultMember( pResultData, aData, FALSE );
+ ScDPResultMember* pMember = new ScDPResultMember( pResultData, aData, sal_False );
SCROW nDataIndex = pMember->GetDataId();
maMemberArray.push_back( pMember );
@@ -3974,7 +3974,7 @@ ScDPResultMember* ScDPResultDimension::InsertMember(ScDPParentDimData *pMemberDa
SCROW nInsert = 0;
if ( !lcl_SearchMember( maMemberArray, pMemberData->mnOrder , nInsert ) )
{ //Member not exist
- ScDPResultMember* pNew = new ScDPResultMember( pResultData, *pMemberData, FALSE );
+ ScDPResultMember* pNew = new ScDPResultMember( pResultData, *pMemberData, sal_False );
maMemberArray.insert( maMemberArray.begin()+nInsert, pNew );
SCROW nDataIndex = pMemberData->mpMemberDesc->GetItemDataId();
@@ -4008,7 +4008,7 @@ void ScDPResultDimension:: InitWithMembers( LateInitParams& rParams,
if ( bInitialized )
pResultMember = FindMember( nDataID );
else
- bInitialized = TRUE;
+ bInitialized = sal_True;
if ( pResultMember == NULL )
{ //only insert found item
@@ -4039,12 +4039,12 @@ ScDPParentDimData* ResultMembers::FindMember( const SCROW& nIndex ) const
void ResultMembers::InsertMember( ScDPParentDimData* pNew )
{
if ( !pNew->mpMemberDesc->getShowDetails() )
- mbHasHideDetailsMember = TRUE;
+ mbHasHideDetailsMember = sal_True;
maMemberHash.insert( std::pair< const SCROW, ScDPParentDimData *>( pNew->mpMemberDesc->GetItemDataId(), pNew ) );
}
ResultMembers::ResultMembers():
- mbHasHideDetailsMember( FALSE )
+ mbHasHideDetailsMember( sal_False )
{
}
ResultMembers::~ResultMembers()
@@ -4053,7 +4053,7 @@ ResultMembers::~ResultMembers()
delete iter->second;
}
// -----------------------------------------------------------------------
-LateInitParams::LateInitParams( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev, BOOL bRow, BOOL bInitChild, BOOL bAllChildren ):
+LateInitParams::LateInitParams( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev, sal_Bool bRow, sal_Bool bInitChild, sal_Bool bAllChildren ):
mppDim( ppDim ),
mppLev( ppLev ),
mbRow( bRow ),
@@ -4066,7 +4066,7 @@ LateInitParams::~LateInitParams()
{
}
-BOOL LateInitParams::IsEnd( size_t nPos ) const
+sal_Bool LateInitParams::IsEnd( size_t nPos ) const
{
return nPos >= mppDim.size();
}
@@ -4074,7 +4074,7 @@ BOOL LateInitParams::IsEnd( size_t nPos ) const
// End Comments
// Wang Xu Ming -- 2009-8-4
// DataPilot Migration - old defects merge
-void ScDPResultDimension::CheckShowEmpty( BOOL bShow )
+void ScDPResultDimension::CheckShowEmpty( sal_Bool bShow )
{
long nCount = maMemberArray.size();
@@ -4087,7 +4087,7 @@ void ScDPResultDimension::CheckShowEmpty( BOOL bShow )
}
-void ScDPResultMember::CheckShowEmpty( BOOL bShow )
+void ScDPResultMember::CheckShowEmpty( sal_Bool bShow )
{
if ( bHasElements )
{
@@ -4103,7 +4103,7 @@ void ScDPResultMember::CheckShowEmpty( BOOL bShow )
SetHasElements();
ScDPResultDimension* pChildDim = GetChildDimension();
if (pChildDim )
- pChildDim->CheckShowEmpty( TRUE );
+ pChildDim->CheckShowEmpty( sal_True );
}
}
}// End Comments
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b4ca5dbc7330..81c85a6acb54 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -108,14 +108,14 @@ SC_SIMPLE_SERVICE_INFO( ScDPMember, "ScDPMember", "com.sun.star.sheet.
// -----------------------------------------------------------------------
//! move to a header?
-BOOL lcl_GetBoolFromAny( const uno::Any& aAny )
+sal_Bool lcl_GetBoolFromAny( const uno::Any& aAny )
{
if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN )
return *(sal_Bool*)aAny.getValue();
- return FALSE;
+ return sal_False;
}
-void lcl_SetBoolInAny( uno::Any& rAny, BOOL bValue )
+void lcl_SetBoolInAny( uno::Any& rAny, sal_Bool bValue )
{
rAny.setValue( &bValue, getBooleanCppuType() );
}
@@ -129,17 +129,17 @@ ScDPSource::ScDPSource( ScDPTableData* pD ) :
nRowDimCount( 0 ),
nDataDimCount( 0 ),
nPageDimCount( 0 ),
- bColumnGrand( TRUE ), // default is true
- bRowGrand( TRUE ),
- bIgnoreEmptyRows( FALSE ),
- bRepeatIfEmpty( FALSE ),
+ bColumnGrand( sal_True ), // default is true
+ bRowGrand( sal_True ),
+ bIgnoreEmptyRows( sal_False ),
+ bRepeatIfEmpty( sal_False ),
nDupCount( 0 ),
pResData( NULL ),
pColResRoot( NULL ),
pRowResRoot( NULL ),
pColResults( NULL ),
pRowResults( NULL ),
- bResultOverflow( FALSE ),
+ bResultOverflow( sal_False ),
mpGrandTotalName(NULL)
{
pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
@@ -170,7 +170,7 @@ const ::rtl::OUString* ScDPSource::GetGrandTotalName() const
return mpGrandTotalName.get();
}
-USHORT ScDPSource::GetOrientation(long nColumn)
+sal_uInt16 ScDPSource::GetOrientation(long nColumn)
{
long i;
for (i=0; i<nColDimCount; i++)
@@ -229,14 +229,14 @@ long ScDPSource::GetPosition(long nColumn)
return 0;
}
-BOOL lcl_TestSubTotal( BOOL& rAllowed, long nColumn, long* pArray, long nCount, ScDPSource* pSource )
+sal_Bool lcl_TestSubTotal( sal_Bool& rAllowed, long nColumn, long* pArray, long nCount, ScDPSource* pSource )
{
for (long i=0; i<nCount; i++)
if (pArray[i] == nColumn)
{
// no subtotals for data layout dim, no matter where
if ( pSource->IsDataLayoutDimension(nColumn) )
- rAllowed = FALSE;
+ rAllowed = sal_False;
else
{
// no subtotals if no other dim but data layout follows
@@ -244,18 +244,18 @@ BOOL lcl_TestSubTotal( BOOL& rAllowed, long nColumn, long* pArray, long nCount,
if ( nNextIndex < nCount && pSource->IsDataLayoutDimension(pArray[nNextIndex]) )
++nNextIndex;
if ( nNextIndex >= nCount )
- rAllowed = FALSE;
+ rAllowed = sal_False;
}
- return TRUE; // found
+ return sal_True; // found
}
- return FALSE;
+ return sal_False;
}
-BOOL ScDPSource::SubTotalAllowed(long nColumn)
+sal_Bool ScDPSource::SubTotalAllowed(long nColumn)
{
//! cache this at ScDPResultData
- BOOL bAllowed = TRUE;
+ sal_Bool bAllowed = sal_True;
if ( lcl_TestSubTotal( bAllowed, nColumn, nColDims, nColDimCount, this ) )
return bAllowed;
if ( lcl_TestSubTotal( bAllowed, nColumn, nRowDims, nRowDimCount, this ) )
@@ -275,7 +275,7 @@ void lcl_RemoveDim( long nRemove, long* pDims, long& rCount )
}
}
-void ScDPSource::SetOrientation(long nColumn, USHORT nNew)
+void ScDPSource::SetOrientation(long nColumn, sal_uInt16 nNew)
{
//! change to no-op if new orientation is equal to old?
@@ -311,22 +311,22 @@ void ScDPSource::SetOrientation(long nColumn, USHORT nNew)
}
}
-BOOL ScDPSource::IsDataLayoutDimension(long nDim)
+sal_Bool ScDPSource::IsDataLayoutDimension(long nDim)
{
return nDim == pData->GetColumnCount();
}
-USHORT ScDPSource::GetDataLayoutOrientation()
+sal_uInt16 ScDPSource::GetDataLayoutOrientation()
{
return GetOrientation(pData->GetColumnCount());
}
-BOOL ScDPSource::IsDateDimension(long nDim)
+sal_Bool ScDPSource::IsDateDimension(long nDim)
{
return pData->IsDateDimension(nDim);
}
-UINT32 ScDPSource::GetNumberFormat(long nDim)
+sal_uInt32 ScDPSource::GetNumberFormat(long nDim)
{
return pData->GetNumberFormat( nDim );
}
@@ -506,7 +506,7 @@ String ScDPSource::getDataDescription()
if ( pResData->GetMeasureCount() == 1 )
{
bool bTotalResult = false;
- aRet = pResData->GetMeasureString( 0, TRUE, SUBTOTAL_FUNC_NONE, bTotalResult );
+ aRet = pResData->GetMeasureString( 0, sal_True, SUBTOTAL_FUNC_NONE, bTotalResult );
}
// empty for more than one measure
@@ -514,43 +514,43 @@ String ScDPSource::getDataDescription()
return aRet;
}
-BOOL ScDPSource::getColumnGrand() const
+sal_Bool ScDPSource::getColumnGrand() const
{
return bColumnGrand;
}
-void ScDPSource::setColumnGrand(BOOL bSet)
+void ScDPSource::setColumnGrand(sal_Bool bSet)
{
bColumnGrand = bSet;
}
-BOOL ScDPSource::getRowGrand() const
+sal_Bool ScDPSource::getRowGrand() const
{
return bRowGrand;
}
-void ScDPSource::setRowGrand(BOOL bSet)
+void ScDPSource::setRowGrand(sal_Bool bSet)
{
bRowGrand = bSet;
}
-BOOL ScDPSource::getIgnoreEmptyRows() const
+sal_Bool ScDPSource::getIgnoreEmptyRows() const
{
return bIgnoreEmptyRows;
}
-void ScDPSource::setIgnoreEmptyRows(BOOL bSet)
+void ScDPSource::setIgnoreEmptyRows(sal_Bool bSet)
{
bIgnoreEmptyRows = bSet;
pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
}
-BOOL ScDPSource::getRepeatIfEmpty() const
+sal_Bool ScDPSource::getRepeatIfEmpty() const
{
return bRepeatIfEmpty;
}
-void ScDPSource::setRepeatIfEmpty(BOOL bSet)
+void ScDPSource::setRepeatIfEmpty(sal_Bool bSet)
{
bRepeatIfEmpty = bSet;
pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
@@ -589,7 +589,7 @@ void ScDPSource::disposeData()
nColDimCount = nRowDimCount = nDataDimCount = nPageDimCount = 0;
pData->DisposeData(); // cached entries etc.
- bResultOverflow = FALSE;
+ bResultOverflow = sal_False;
}
long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLevel, long nLevels )
@@ -599,7 +599,7 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
long nTotal = 1;
long nDataCount = 1;
- BOOL bWasShowAll = TRUE;
+ sal_Bool bWasShowAll = sal_True;
long nPos = nLevels;
while ( nPos > 0 )
{
@@ -611,7 +611,7 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
return 0;
}
- BOOL bDo = FALSE;
+ sal_Bool bDo = sal_False;
if ( ppDim[nPos]->getIsDataLayoutDimension() )
{
// data layout dim doesn't interfere with "show all" flags
@@ -621,11 +621,11 @@ long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPL
}
else if ( bWasShowAll ) // "show all" set for all following levels?
{
- bDo = TRUE;
+ bDo = sal_True;
if ( !ppLevel[nPos]->getShowEmpty() )
{
// this level is counted, following ones are not
- bWasShowAll = FALSE;
+ bWasShowAll = sal_False;
}
}
if ( bDo )
@@ -692,7 +692,7 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool
pLevel->SetEnableLayout( bIsRow );
if ( pLevel->GetAutoShow().IsEnabled )
- rHasAutoShow = TRUE;
+ rHasAutoShow = sal_True;
if (bIsRow)
{
@@ -794,7 +794,7 @@ void ScDPSource::CreateRes_Impl()
{
if ( !pResData )
{
- USHORT nDataOrient = GetDataLayoutOrientation();
+ sal_uInt16 nDataOrient = GetDataLayoutOrientation();
if ( nDataDimCount > 1 && ( nDataOrient != sheet::DataPilotFieldOrientation_COLUMN &&
nDataOrient != sheet::DataPilotFieldOrientation_ROW ) )
{
@@ -809,7 +809,7 @@ void ScDPSource::CreateRes_Impl()
String* pDataNames = NULL;
sheet::DataPilotFieldReference* pDataRefValues = NULL;
ScSubTotalFunc eDataFunctions[SC_DAPI_MAXFIELDS];
- USHORT nDataRefOrient[SC_DAPI_MAXFIELDS];
+ sal_uInt16 nDataRefOrient[SC_DAPI_MAXFIELDS];
if (nDataDimCount)
{
pDataNames = new String[nDataDimCount];
@@ -821,7 +821,7 @@ void ScDPSource::CreateRes_Impl()
// LateInit (initialize only those rows/children that are used) can be used unless
// any data dimension needs reference values from column/row dimensions
- BOOL bLateInit = TRUE;
+ sal_Bool bLateInit = sal_True;
// Go through all data dimensions (i.e. fields) and build their meta data
// so that they can be passed on to ScDPResultData instance later.
@@ -859,7 +859,7 @@ void ScDPSource::CreateRes_Impl()
// need fully initialized results to find reference values
// (both in column or row dimensions), so updated values or
// differences to 0 can be displayed even for empty results.
- bLateInit = FALSE;
+ bLateInit = sal_False;
}
}
@@ -920,7 +920,7 @@ void ScDPSource::CreateRes_Impl()
if ( nRowLevelCount > 0 )
{
// disable layout flags for the innermost row field (level)
- aInfo.aRowLevels[nRowLevelCount-1]->SetEnableLayout( FALSE );
+ aInfo.aRowLevels[nRowLevelCount-1]->SetEnableLayout( sal_False );
}
pRowResRoot->InitFrom( aInfo.aRowDims, aInfo.aRowLevels, 0, aInitState );
@@ -951,7 +951,7 @@ void ScDPSource::CreateRes_Impl()
// resulting table is too big -> abort before calculating
// (this relies on late init, so no members are allocated in InitFrom above)
- bResultOverflow = TRUE;
+ bResultOverflow = sal_True;
}
else
{
@@ -982,8 +982,8 @@ void ScDPSource::CreateRes_Impl()
// Reset all results to empty, so they can be built again with data for the
// desired members only.
- pColResRoot->ResetResults( TRUE );
- pRowResRoot->ResetResults( TRUE );
+ pColResRoot->ResetResults( sal_True );
+ pRowResRoot->ResetResults( sal_True );
pData->CalcResults(aInfo, true);
// Call UpdateDataResults again, with the new (limited) values.
@@ -1021,7 +1021,7 @@ void ScDPSource::CreateRes_Impl()
//UNUSED2009-05 pRowResRoot->DumpState( pColResRoot, pDoc, aDocPos );
//UNUSED2009-05 }
-void ScDPSource::FillLevelList( USHORT nOrientation, List& rList )
+void ScDPSource::FillLevelList( sal_uInt16 nOrientation, List& rList )
{
rList.Clear();
@@ -1102,7 +1102,7 @@ void ScDPSource::FillMemberResults()
// pColResDim->FillMemberResults( pColResults, 0, pResData->GetColStartMeasure() );
long nPos = 0;
pColResRoot->FillMemberResults( pColResults, nPos, pResData->GetColStartMeasure(),
- TRUE, NULL, NULL );
+ sal_True, NULL, NULL );
}
FillLevelList( sheet::DataPilotFieldOrientation_ROW, aRowLevelList );
@@ -1118,7 +1118,7 @@ void ScDPSource::FillMemberResults()
// pRowResDim->FillMemberResults( pRowResults, 0, pResData->GetRowStartMeasure() );
long nPos = 0;
pRowResRoot->FillMemberResults( pRowResults, nPos, pResData->GetRowStartMeasure(),
- TRUE, NULL, NULL );
+ sal_True, NULL, NULL );
}
}
}
@@ -1319,8 +1319,8 @@ sal_Bool SAL_CALL ScDPDimensions::hasByName( const rtl::OUString& aName ) throw(
long nCount = getCount();
for (long i=0; i<nCount; i++)
if ( getByIndex(i)->getName() == aName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
uno::Type SAL_CALL ScDPDimensions::getElementType() throw(uno::RuntimeException)
@@ -1375,7 +1375,7 @@ ScDPDimension::ScDPDimension( ScDPSource* pSrc, long nD ) :
mpLayoutName(NULL),
mpSubtotalName(NULL),
nSourceDim( -1 ),
- bHasSelectedPage( FALSE ),
+ bHasSelectedPage( sal_False ),
pSelectedData( NULL ),
mbHasHiddenMember(false)
{
@@ -1432,12 +1432,12 @@ void SAL_CALL ScDPDimension::setName( const ::rtl::OUString& rNewName ) throw(un
aName = String( rNewName );
}
-USHORT ScDPDimension::getOrientation() const
+sal_uInt16 ScDPDimension::getOrientation() const
{
return pSource->GetOrientation( nDim );
}
-void ScDPDimension::setOrientation(USHORT nNew)
+void ScDPDimension::setOrientation(sal_uInt16 nNew)
{
pSource->SetOrientation( nDim, nNew );
}
@@ -1452,17 +1452,17 @@ void ScDPDimension::setPosition(long /* nNew */)
//! ...
}
-BOOL ScDPDimension::getIsDataLayoutDimension() const
+sal_Bool ScDPDimension::getIsDataLayoutDimension() const
{
return pSource->GetData()->getIsDataLayoutDimension( nDim );
}
-USHORT ScDPDimension::getFunction() const
+sal_uInt16 ScDPDimension::getFunction() const
{
return nFunction;
}
-void ScDPDimension::setFunction(USHORT nNew)
+void ScDPDimension::setFunction(sal_uInt16 nNew)
{
nFunction = nNew;
}
@@ -1498,7 +1498,7 @@ uno::Reference<util::XCloneable> SAL_CALL ScDPDimension::createClone() throw(uno
return CreateCloneObject();
}
-BOOL ScDPDimension::isDuplicated() const
+sal_Bool ScDPDimension::isDuplicated() const
{
return (nSourceDim >= 0);
}
@@ -1539,21 +1539,21 @@ const ScDPItemData& ScDPDimension::GetSelectedData()
}
if ( !pSelectedData )
- pSelectedData = new ScDPItemData( aSelectedPage, 0.0, FALSE ); // default - name only
+ pSelectedData = new ScDPItemData( aSelectedPage, 0.0, sal_False ); // default - name only
}
return *pSelectedData;
}
-//UNUSED2009-05 BOOL ScDPDimension::IsValidPage( const ScDPItemData& rData )
+//UNUSED2009-05 sal_Bool ScDPDimension::IsValidPage( const ScDPItemData& rData )
//UNUSED2009-05 {
//UNUSED2009-05 if ( bHasSelectedPage )
//UNUSED2009-05 return rData.IsCaseInsEqual( GetSelectedData() );
//UNUSED2009-05
-//UNUSED2009-05 return TRUE; // no selection -> all data
+//UNUSED2009-05 return sal_True; // no selection -> all data
//UNUSED2009-05 }
-BOOL ScDPDimension::IsVisible( const ScDPItemData& rData )
+sal_Bool ScDPDimension::IsVisible( const ScDPItemData& rData )
{
if( ScDPMembers* pMembers = this->GetHierarchiesObject()->getByIndex(0)->
GetLevelsObject()->getByIndex(0)->GetMembersObject() )
@@ -1561,10 +1561,10 @@ BOOL ScDPDimension::IsVisible( const ScDPItemData& rData )
for( long i = pMembers->getCount()-1; i>=0; i-- )
if( ScDPMember *pDPMbr = pMembers->getByIndex( i ) )
if( rData.IsCaseInsEqual( pDPMbr->GetItemData() ) && !pDPMbr->getIsVisible() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// XPropertySet
@@ -1603,13 +1603,13 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
String aNameStr = aPropertyName;
if ( aNameStr.EqualsAscii( SC_UNO_POSITION ) )
{
- INT32 nInt = 0;
+ sal_Int32 nInt = 0;
if (aValue >>= nInt)
setPosition( nInt );
}
else if ( aNameStr.EqualsAscii( SC_UNO_USEDHIER ) )
{
- INT32 nInt = 0;
+ sal_Int32 nInt = 0;
if (aValue >>= nInt)
setUsedHierarchy( nInt );
}
@@ -1617,19 +1617,19 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
{
sheet::DataPilotFieldOrientation eEnum;
if (aValue >>= eEnum)
- setOrientation( sal::static_int_cast<USHORT>(eEnum) );
+ setOrientation( sal::static_int_cast<sal_uInt16>(eEnum) );
}
else if ( aNameStr.EqualsAscii( SC_UNO_FUNCTION ) )
{
sheet::GeneralFunction eEnum;
if (aValue >>= eEnum)
- setFunction( sal::static_int_cast<USHORT>(eEnum) );
+ setFunction( sal::static_int_cast<sal_uInt16>(eEnum) );
}
else if ( aNameStr.EqualsAscii( SC_UNO_REFVALUE ) )
aValue >>= aReferenceValue;
else if ( aNameStr.EqualsAscii( SC_UNO_FILTER ) )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
uno::Sequence<sheet::TableFilterField> aSeq;
if (aValue >>= aSeq)
{
@@ -1637,8 +1637,8 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
if ( nLength == 0 )
{
aSelectedPage.Erase();
- bHasSelectedPage = FALSE;
- bDone = TRUE;
+ bHasSelectedPage = sal_False;
+ bDone = sal_True;
}
else if ( nLength == 1 )
{
@@ -1646,8 +1646,8 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
if ( rField.Field == 0 && rField.Operator == sheet::FilterOperator_EQUAL && !rField.IsNumeric )
{
aSelectedPage = rField.StringValue;
- bHasSelectedPage = TRUE;
- bDone = TRUE;
+ bHasSelectedPage = sal_True;
+ bDone = sal_True;
}
}
}
@@ -1839,8 +1839,8 @@ sal_Bool SAL_CALL ScDPHierarchies::hasByName( const rtl::OUString& aName ) throw
long nCount = getCount();
for (long i=0; i<nCount; i++)
if ( getByIndex(i)->getName() == aName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
uno::Type SAL_CALL ScDPHierarchies::getElementType() throw(uno::RuntimeException)
@@ -2023,8 +2023,8 @@ sal_Bool SAL_CALL ScDPLevels::hasByName( const rtl::OUString& aName ) throw(uno:
long nCount = getCount();
for (long i=0; i<nCount; i++)
if ( getByIndex(i)->getName() == aName )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
uno::Type SAL_CALL ScDPLevels::getElementType() throw(uno::RuntimeException)
@@ -2071,19 +2071,19 @@ ScDPLevel* ScDPLevels::getByIndex(long nIndex) const
class ScDPGlobalMembersOrder
{
ScDPLevel& rLevel;
- BOOL bAscending;
+ sal_Bool bAscending;
public:
- ScDPGlobalMembersOrder( ScDPLevel& rLev, BOOL bAsc ) :
+ ScDPGlobalMembersOrder( ScDPLevel& rLev, sal_Bool bAsc ) :
rLevel(rLev),
bAscending(bAsc)
{}
~ScDPGlobalMembersOrder() {}
- BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
+ sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const;
};
-BOOL ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
+sal_Bool ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const
{
sal_Int32 nCompare = 0;
// seems that some ::std::sort() implementations pass the same index twice
@@ -2105,11 +2105,11 @@ ScDPLevel::ScDPLevel( ScDPSource* pSrc, long nD, long nH, long nL ) :
nHier( nH ),
nLev( nL ),
pMembers( NULL ),
- bShowEmpty( FALSE ),
+ bShowEmpty( sal_False ),
aSortInfo( EMPTY_STRING, sal_True, sheet::DataPilotFieldSortMode::NAME ), // default: sort by name
nSortMeasure( 0 ),
nAutoMeasure( 0 ),
- bEnableLayout( FALSE )
+ bEnableLayout( sal_False )
{
//! hold pSource
// aSubTotals is empty
@@ -2157,7 +2157,7 @@ void ScDPLevel::EvaluateSortOrder()
aGlobalOrder[nPos] = nPos;
// allow manual or name (manual is always ascending)
- BOOL bAscending = ( aSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL || aSortInfo.IsAscending );
+ sal_Bool bAscending = ( aSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL || aSortInfo.IsAscending );
ScDPGlobalMembersOrder aComp( *this, bAscending );
::std::sort( aGlobalOrder.begin(), aGlobalOrder.end(), aComp );
}
@@ -2183,7 +2183,7 @@ void ScDPLevel::EvaluateSortOrder()
}
}
-void ScDPLevel::SetEnableLayout( BOOL bSet )
+void ScDPLevel::SetEnableLayout( sal_Bool bSet )
{
bEnableLayout = bSet;
}
@@ -2291,12 +2291,12 @@ void ScDPLevel::setSubTotals(const uno::Sequence<sheet::GeneralFunction>& rNew)
//! set "manual change" flag?
}
-BOOL ScDPLevel::getShowEmpty() const
+sal_Bool ScDPLevel::getShowEmpty() const
{
return bShowEmpty;
}
-void ScDPLevel::setShowEmpty(BOOL bSet)
+void ScDPLevel::setShowEmpty(sal_Bool bSet)
{
bShowEmpty = bSet;
}
@@ -2645,7 +2645,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
if ( !aName.Len() )
aName = String::CreateFromInt32(nVal);
- ScDPItemData rData( aName, nVal, TRUE, 0 ) ;
+ ScDPItemData rData( aName, nVal, sal_True, 0 ) ;
pNew = new ScDPMember( pSource, nDim, nHier, nLev, pSource->GetCache()->GetAdditionalItemID(rData));
}
else
@@ -2668,7 +2668,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
// -----------------------------------------------------------------------
ScDPMember::ScDPMember( ScDPSource* pSrc, long nD, long nH, long nL,
- SCROW nIndex /*const String& rN, double fV, BOOL bHV*/ ) :
+ SCROW nIndex /*const String& rN, double fV, sal_Bool bHV*/ ) :
pSource( pSrc ),
nDim( nD ),
nHier( nH ),
@@ -2676,8 +2676,8 @@ ScDPMember::ScDPMember( ScDPSource* pSrc, long nD, long nH, long nL,
mnDataId( nIndex ),
mpLayoutName(NULL),
nPosition( -1 ),
- bVisible( TRUE ),
- bShowDet( TRUE )
+ bVisible( sal_True ),
+ bShowDet( sal_True )
{
//! hold pSource
}
@@ -2687,7 +2687,7 @@ ScDPMember::~ScDPMember()
//! release pSource
}
-BOOL ScDPMember::IsNamedItem( const ScDPItemData& r ) const
+sal_Bool ScDPMember::IsNamedItem( const ScDPItemData& r ) const
{
long nSrcDim = pSource->GetSourceDim( nDim );
if ( nHier != SC_DAPI_HIERARCHY_FLAT && pSource->IsDateDimension( nSrcDim ) && r.IsValue() )
@@ -2703,7 +2703,7 @@ BOOL ScDPMember::IsNamedItem( const ScDPItemData& r ) const
return r.IsCaseInsEqual( GetItemData() );
}
-BOOL ScDPMember::IsNamedItem( SCROW nIndex ) const
+sal_Bool ScDPMember::IsNamedItem( SCROW nIndex ) const
{
long nSrcDim = pSource->GetSourceDim( nDim );
if ( nHier != SC_DAPI_HIERARCHY_FLAT && pSource->IsDateDimension( nSrcDim ) )
@@ -2774,23 +2774,23 @@ void SAL_CALL ScDPMember::setName( const ::rtl::OUString& /* rNewName */ ) throw
DBG_ERROR("not implemented"); //! exception?
}
-BOOL ScDPMember::getIsVisible() const
+sal_Bool ScDPMember::getIsVisible() const
{
return bVisible;
}
-void ScDPMember::setIsVisible(BOOL bSet)
+void ScDPMember::setIsVisible(sal_Bool bSet)
{
bVisible = bSet;
//! set "manual change" flag
}
-BOOL ScDPMember::getShowDetails() const
+sal_Bool ScDPMember::getShowDetails() const
{
return bShowDet;
}
-void ScDPMember::setShowDetails(BOOL bSet)
+void ScDPMember::setShowDetails(sal_Bool bSet)
{
bShowDet = bSet;
//! set "manual change" flag
diff --git a/sc/source/core/data/drawpage.cxx b/sc/source/core/data/drawpage.cxx
index 715b99f362a1..d4de55f4942f 100644
--- a/sc/source/core/data/drawpage.cxx
+++ b/sc/source/core/data/drawpage.cxx
@@ -43,7 +43,7 @@
// -----------------------------------------------------------------------
-ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, BOOL bMasterPage) :
+ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, StarBASIC* pBasic, sal_Bool bMasterPage) :
FmFormPage(rNewModel, pBasic, bMasterPage)
{
SetSize( Size( LONG_MAX, LONG_MAX ) );
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index b4e1cc71dc3d..e3b75436f72c 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -101,12 +101,12 @@ TYPEINIT1(ScTabSizeChangedHint, SfxHint);
static ScDrawObjFactory* pFac = NULL;
static E3dObjFactory* pF3d = NULL;
-static USHORT nInst = 0;
+static sal_uInt16 nInst = 0;
SfxObjectShell* ScDrawLayer::pGlobalDrawPersist = NULL;
//REMOVE SvPersist* ScDrawLayer::pGlobalDrawPersist = NULL;
-BOOL bDrawIsInUndo = FALSE; //! Member
+sal_Bool bDrawIsInUndo = sal_False; //! Member
// -----------------------------------------------------------------------
@@ -211,13 +211,13 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
pGlobalDrawPersist ?
pGlobalDrawPersist :
( pDocument ? pDocument->GetDocumentShell() : NULL ),
- TRUE ), // bUseExtColorTable (is set below)
+ sal_True ), // bUseExtColorTable (is set below)
aName( rName ),
pDoc( pDocument ),
pUndoGroup( NULL ),
- bRecording( FALSE ),
- bAdjustEnabled( TRUE ),
- bHyphenatorSet( FALSE )
+ bRecording( sal_False ),
+ bAdjustEnabled( sal_True ),
+ bHyphenatorSet( sal_False )
{
pGlobalDrawPersist = NULL; // nur einmal benutzen
@@ -234,8 +234,8 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
else
SetColorTable( XColorTable::GetStdColorTable() );
- SetSwapGraphics(TRUE);
-// SetSwapAsynchron(TRUE); // an der View
+ SetSwapGraphics(sal_True);
+// SetSwapAsynchron(sal_True); // an der View
SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = GetItemPool();
@@ -254,7 +254,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
eOfficeLanguage == LANGUAGE_JAPANESE )
{
// secondary is edit engine pool
- rPool.GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ rPool.GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) );
}
rPool.FreezeIdRanges(); // the pool is also used directly
@@ -318,7 +318,7 @@ void ScDrawLayer::UseHyphenator()
GetDrawOutliner().SetHyphenator( xHyphenator );
GetHitTestOutliner().SetHyphenator( xHyphenator );
- bHyphenatorSet = TRUE;
+ bHyphenatorSet = sal_True;
}
}
@@ -326,18 +326,18 @@ SdrPage* __EXPORT ScDrawLayer::AllocPage(FASTBOOL bMasterPage)
{
// don't create basic until it is needed
StarBASIC* pBasic = NULL;
- ScDrawPage* pPage = new ScDrawPage( *this, pBasic, sal::static_int_cast<BOOL>(bMasterPage) );
+ ScDrawPage* pPage = new ScDrawPage( *this, pBasic, sal::static_int_cast<sal_Bool>(bMasterPage) );
return pPage;
}
-BOOL ScDrawLayer::HasObjects() const
+sal_Bool ScDrawLayer::HasObjects() const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
- USHORT nCount = GetPageCount();
- for (USHORT i=0; i<nCount && !bFound; i++)
+ sal_uInt16 nCount = GetPageCount();
+ for (sal_uInt16 i=0; i<nCount && !bFound; i++)
if (GetPage(i)->GetObjCount())
- bFound = TRUE;
+ bFound = sal_True;
return bFound;
}
@@ -371,17 +371,17 @@ Window* __EXPORT ScDrawLayer::GetCurDocViewWin()
return NULL;
}
-BOOL ScDrawLayer::ScAddPage( SCTAB nTab )
+sal_Bool ScDrawLayer::ScAddPage( SCTAB nTab )
{
if (bDrawIsInUndo)
- return FALSE; // not inserted
+ return sal_False; // not inserted
- ScDrawPage* pPage = (ScDrawPage*)AllocPage( FALSE );
+ ScDrawPage* pPage = (ScDrawPage*)AllocPage( sal_False );
InsertPage(pPage, static_cast<sal_uInt16>(nTab));
if (bRecording)
AddCalcUndo(new SdrUndoNewPage(*pPage));
- return TRUE; // inserted
+ return sal_True; // inserted
}
void ScDrawLayer::ScRemovePage( SCTAB nTab )
@@ -407,20 +407,20 @@ void ScDrawLayer::ScRenamePage( SCTAB nTab, const String& rNewName )
pPage->SetName(rNewName);
}
-void ScDrawLayer::ScMovePage( USHORT nOldPos, USHORT nNewPos )
+void ScDrawLayer::ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
MovePage( nOldPos, nNewPos );
}
-void ScDrawLayer::ScCopyPage( USHORT nOldPos, USHORT nNewPos, BOOL bAlloc )
+void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool bAlloc )
{
- //! remove argument bAlloc (always FALSE)
+ //! remove argument bAlloc (always sal_False)
if (bDrawIsInUndo)
return;
SdrPage* pOldPage = GetPage(nOldPos);
- SdrPage* pNewPage = bAlloc ? AllocPage(FALSE) : GetPage(nNewPos);
+ SdrPage* pNewPage = bAlloc ? AllocPage(sal_False) : GetPage(nNewPos);
// kopieren
@@ -449,7 +449,7 @@ void ScDrawLayer::ScCopyPage( USHORT nOldPos, USHORT nNewPos, BOOL bAlloc )
InsertPage(pNewPage, nNewPos);
}
-inline BOOL IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 )
+inline sal_Bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 )
{
return rPos.Col() >= nCol1 && rPos.Col() <= nCol2 &&
rPos.Row() >= nRow1 && rPos.Row() <= nRow2;
@@ -463,10 +463,10 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
if (!pPage)
return;
- BOOL bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
- ULONG nCount = pPage->GetObjCount();
- for ( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = pPage->GetObjCount();
+ for ( sal_uLong i = 0; i < nCount; i++ )
{
SdrObject* pObj = pPage->GetObj( i );
ScDrawObjData* pData = GetObjDataTab( pObj, nTab );
@@ -474,18 +474,18 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
{
const ScAddress aOldStt = pData->maStart;
const ScAddress aOldEnd = pData->maEnd;
- BOOL bChange = FALSE;
+ sal_Bool bChange = sal_False;
if ( aOldStt.IsValid() && IsInBlock( aOldStt, nCol1,nRow1, nCol2,nRow2 ) )
{
pData->maStart.IncCol( nDx );
pData->maStart.IncRow( nDy );
- bChange = TRUE;
+ bChange = sal_True;
}
if ( aOldEnd.IsValid() && IsInBlock( aOldEnd, nCol1,nRow1, nCol2,nRow2 ) )
{
pData->maEnd.IncCol( nDx );
pData->maEnd.IncRow( nDy );
- bChange = TRUE;
+ bChange = sal_True;
}
if (bChange)
{
@@ -498,7 +498,7 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
}
}
-void ScDrawLayer::SetPageSize( USHORT nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos )
+void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos )
{
SdrPage* pPage = GetPage(nPageNo);
if (pPage)
@@ -513,10 +513,10 @@ void ScDrawLayer::SetPageSize( USHORT nPageNo, const Size& rSize, bool bUpdateNo
// auch wenn Groesse gleich geblieben ist
// (einzelne Zeilen/Spalten koennen geaendert sein)
- BOOL bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) );
+ sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) );
- ULONG nCount = pPage->GetObjCount();
- for ( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = pPage->GetObjCount();
+ for ( sal_uLong i = 0; i < nCount; i++ )
{
SdrObject* pObj = pPage->GetObj( i );
ScDrawObjData* pData = GetObjDataTab( pObj, static_cast<SCTAB>(nPageNo) );
@@ -702,18 +702,18 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, const ScDrawObjData& rData, bool b
}
}
-BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const
+sal_Bool ScDrawLayer::GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const
{
DBG_ASSERT( pDoc, "ScDrawLayer::GetPrintArea without document" );
if ( !pDoc )
- return FALSE;
+ return sal_False;
SCTAB nTab = rRange.aStart.Tab();
DBG_ASSERT( rRange.aEnd.Tab() == nTab, "GetPrintArea: Tab unterschiedlich" );
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
- BOOL bAny = FALSE;
+ sal_Bool bAny = sal_False;
long nEndX = 0;
long nEndY = 0;
long nStartX = LONG_MAX;
@@ -762,11 +762,11 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
//! Flags (ausgeblendet?) testen
Rectangle aObjRect = pObject->GetCurrentBoundRect();
- BOOL bFit = TRUE;
+ sal_Bool bFit = sal_True;
if ( !bSetHor && ( aObjRect.Right() < nStartX || aObjRect.Left() > nEndX ) )
- bFit = FALSE;
+ bFit = sal_False;
if ( !bSetVer && ( aObjRect.Bottom() < nStartY || aObjRect.Top() > nEndY ) )
- bFit = FALSE;
+ bFit = sal_False;
if ( bFit )
{
if (bSetHor)
@@ -779,7 +779,7 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
if (aObjRect.Top() < nStartY) nStartY = aObjRect.Top();
if (aObjRect.Bottom() > nEndY) nEndY = aObjRect.Bottom();
}
- bAny = TRUE;
+ bAny = sal_True;
}
pObject = aIter.Next();
@@ -860,7 +860,7 @@ void ScDrawLayer::BeginCalcUndo()
//! DBG_ASSERT( !bRecording, "BeginCalcUndo ohne GetCalcUndo" );
DELETEZ(pUndoGroup);
- bRecording = TRUE;
+ bRecording = sal_True;
}
SdrUndoGroup* ScDrawLayer::GetCalcUndo()
@@ -869,7 +869,7 @@ SdrUndoGroup* ScDrawLayer::GetCalcUndo()
SdrUndoGroup* pRet = pUndoGroup;
pUndoGroup = NULL;
- bRecording = FALSE;
+ bRecording = sal_False;
return pRet;
}
@@ -885,16 +885,16 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
if (!pPage)
return;
- BOOL bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
// fuer Shrinking!
Rectangle aNew( rArea );
- BOOL bShrink = FALSE;
+ sal_Bool bShrink = sal_False;
if ( rMove.X() < 0 || rMove.Y() < 0 ) // verkleinern
{
if ( rTopLeft != rArea.TopLeft() ) // sind gleich beim Verschieben von Zellen
{
- bShrink = TRUE;
+ bShrink = sal_True;
aNew.Left() = rTopLeft.X();
aNew.Top() = rTopLeft.Y();
}
@@ -916,14 +916,14 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
}
else if ( pObject->IsPolyObj() && pObject->GetPointCount()==2 )
{
- for (USHORT i=0; i<2; i++)
+ for (sal_uInt16 i=0; i<2; i++)
{
- BOOL bMoved = FALSE;
+ sal_Bool bMoved = sal_False;
Point aPoint = pObject->GetPoint(i);
lcl_ReverseTwipsToMM( aPoint );
if (rArea.IsInside(aPoint))
{
- aPoint += rMove; bMoved = TRUE;
+ aPoint += rMove; bMoved = sal_True;
}
else if (bShrink && aNew.IsInside(aPoint))
{
@@ -932,13 +932,13 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
{
aPoint.X() = rArea.Left() + rMove.X() - SHRINK_DIST_TWIPS;
if ( aPoint.X() < 0 ) aPoint.X() = 0;
- bMoved = TRUE;
+ bMoved = sal_True;
}
if ( rMove.Y() && aPoint.Y() >= rArea.Top() + rMove.Y() )
{
aPoint.Y() = rArea.Top() + rMove.Y() - SHRINK_DIST_TWIPS;
if ( aPoint.Y() < 0 ) aPoint.Y() = 0;
- bMoved = TRUE;
+ bMoved = sal_True;
}
}
if( bMoved )
@@ -957,11 +957,11 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
lcl_ReverseTwipsToMM( aObjRect );
Point aTopLeft = bNegativePage ? aObjRect.TopRight() : aObjRect.TopLeft(); // logical left
Size aMoveSize;
- BOOL bDoMove = FALSE;
+ sal_Bool bDoMove = sal_False;
if (rArea.IsInside(aTopLeft))
{
aMoveSize = Size(rMove.X(),rMove.Y());
- bDoMove = TRUE;
+ bDoMove = sal_True;
}
else if (bShrink && aNew.IsInside(aTopLeft))
{
@@ -969,12 +969,12 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
if ( rMove.X() && aTopLeft.X() >= rArea.Left() + rMove.X() )
{
aMoveSize.Width() = rArea.Left() + rMove.X() - SHRINK_DIST - aTopLeft.X();
- bDoMove = TRUE;
+ bDoMove = sal_True;
}
if ( rMove.Y() && aTopLeft.Y() >= rArea.Top() + rMove.Y() )
{
aMoveSize.Height() = rArea.Top() + rMove.Y() - SHRINK_DIST - aTopLeft.Y();
- bDoMove = TRUE;
+ bDoMove = sal_True;
}
}
if ( bDoMove )
@@ -1019,7 +1019,7 @@ void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
}
void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
- SCsCOL nDx,SCsROW nDy, BOOL bInsDel, bool bUpdateNoteCaptionPos )
+ SCsCOL nDx,SCsROW nDy, sal_Bool bInsDel, bool bUpdateNoteCaptionPos )
{
DBG_ASSERT( pDoc, "ScDrawLayer::MoveArea without document" );
if ( !pDoc )
@@ -1028,7 +1028,7 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR
if (!bAdjustEnabled)
return;
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab );
lcl_ReverseTwipsToMM( aRect );
@@ -1094,7 +1094,7 @@ void ScDrawLayer::WidthChanged( SCTAB nTab, SCCOL nCol, long nDifTwips )
//! aTopLeft ist falsch, wenn mehrere Spalten auf einmal ausgeblendet werden
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
if ( bNegativePage )
{
MirrorRectRTL( aRect );
@@ -1127,7 +1127,7 @@ void ScDrawLayer::HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips )
//! aTopLeft ist falsch, wenn mehrere Zeilen auf einmal ausgeblendet werden
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
if ( bNegativePage )
{
MirrorRectRTL( aRect );
@@ -1137,11 +1137,11 @@ void ScDrawLayer::HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips )
MoveAreaTwips( nTab, aRect, Point( 0,nDifTwips ), aTopLeft );
}
-BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, bool bIncludeNotes )
+sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, bool bIncludeNotes )
{
DBG_ASSERT( pDoc, "ScDrawLayer::HasObjectsInRows without document" );
if ( !pDoc )
- return FALSE;
+ return sal_False;
Rectangle aTestRect;
@@ -1161,16 +1161,16 @@ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
aTestRect.Left() = 0;
aTestRect.Right() = MAXMM;
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
if ( bNegativePage )
MirrorRectRTL( aTestRect );
SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page nicht gefunden");
if (!pPage)
- return FALSE;
+ return sal_False;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
Rectangle aObjRect;
SdrObjListIter aIter( *pPage );
@@ -1181,7 +1181,7 @@ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
// #i116164# note captions are handled separately, don't have to be included for each single row height change
if ( (aTestRect.IsInside(aObjRect.TopLeft()) || aTestRect.IsInside(aObjRect.BottomLeft())) &&
(bIncludeNotes || !IsNoteCaption(pObject)) )
- bFound = TRUE;
+ bFound = sal_True;
pObject = aIter.Next();
}
@@ -1200,7 +1200,7 @@ void ScDrawLayer::DeleteObjects( SCTAB nTab )
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
SdrObject** ppObj = new SdrObject*[nObjCount];
@@ -1242,7 +1242,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab );
@@ -1298,7 +1298,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
{
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
// Rechteck um die ganze Selektion
@@ -1404,7 +1404,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle&
}
}
-BOOL lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const ScRange& rClipRange )
+sal_Bool lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const ScRange& rClipRange )
{
// check if every range of rRangesVector is completely in rClipRange
@@ -1412,30 +1412,30 @@ BOOL lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const
for( ;aIt!=rRangesVector.end(); ++aIt )
{
const ScRangeList& rRanges = *aIt;
- ULONG nCount = rRanges.Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rRanges.Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScRange aRange = *rRanges.GetObject(i);
if ( !rClipRange.In( aRange ) )
{
- return FALSE; // at least one range is not valid
+ return sal_False; // at least one range is not valid
}
}
}
- return TRUE; // everything is fine
+ return sal_True; // everything is fine
}
-BOOL lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange& rSourceRange, const ScAddress& rDestPos )
+sal_Bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange& rSourceRange, const ScAddress& rDestPos )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
::std::vector< ScRangeList >::iterator aIt = rRangesVector.begin();
for( ;aIt!=rRangesVector.end(); ++aIt )
{
ScRangeList& rRanges = *aIt;
- ULONG nCount = rRanges.Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rRanges.Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScRange* pRange = rRanges.GetObject(i);
if ( rSourceRange.In( *pRange ) )
@@ -1444,7 +1444,7 @@ BOOL lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange&
SCsROW nDiffY = rDestPos.Row() - (SCsROW)rSourceRange.aStart.Row();
SCsTAB nDiffZ = rDestPos.Tab() - (SCsTAB)rSourceRange.aStart.Tab();
pRange->Move( nDiffX, nDiffY, nDiffZ );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -1468,7 +1468,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
return;
}
- BOOL bMirrorObj = ( rSourceRange.Left() < 0 && rSourceRange.Right() < 0 &&
+ sal_Bool bMirrorObj = ( rSourceRange.Left() < 0 && rSourceRange.Right() < 0 &&
rDestRange.Left() > 0 && rDestRange.Right() > 0 ) ||
( rSourceRange.Left() > 0 && rSourceRange.Right() > 0 &&
rDestRange.Left() < 0 && rDestRange.Right() < 0 );
@@ -1491,13 +1491,13 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
// a clipboard document and its source share the same document item pool,
// so the pointers can be compared to see if this is copy&paste within
// the same document
- BOOL bSameDoc = pDoc && pClipDoc && pDoc->GetPool() == pClipDoc->GetPool();
- BOOL bDestClip = pDoc && pDoc->IsClipboard();
+ sal_Bool bSameDoc = pDoc && pClipDoc && pDoc->GetPool() == pClipDoc->GetPool();
+ sal_Bool bDestClip = pDoc && pDoc->IsClipboard();
//#i110034# charts need correct sheet names for xml range conversion during load
//so the target sheet name is temporarily renamed (if we have any SdrObjects)
String aDestTabName;
- BOOL bRestoreDestTabName = FALSE;
+ sal_Bool bRestoreDestTabName = sal_False;
if( pOldObject && !bSameDoc && !bDestClip )
{
if( pDoc && pClipDoc )
@@ -1509,7 +1509,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
if( !(aSourceTabName==aDestTabName) &&
pDoc->ValidNewTabName(aSourceTabName) )
{
- bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //BOOL bUpdateRef = TRUE, BOOL bExternalDocument = FALSE
+ bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //sal_Bool bUpdateRef = sal_True, sal_Bool bExternalDocument = sal_False
}
}
}
@@ -1528,18 +1528,18 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
Fraction aHorFract(1,1);
Fraction aVerFract(1,1);
- BOOL bResize = FALSE;
+ sal_Bool bResize = sal_False;
// sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes,
// don't resize to empty size when pasting into hidden columns or rows
if ( Abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 )
{
aHorFract = Fraction( nDestWidth, nSourceWidth );
- bResize = TRUE;
+ bResize = sal_True;
}
if ( Abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 )
{
aVerFract = Fraction( nDestHeight, nSourceHeight );
- bResize = TRUE;
+ bResize = sal_True;
}
Point aRefPos = rDestRange.TopLeft(); // for resizing (after moving)
@@ -1593,7 +1593,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
pDoc->GetChartRanges( aChartName, aRangesVector, pDoc );
if( !aRangesVector.empty() )
{
- BOOL bInSourceRange = FALSE;
+ sal_Bool bInSourceRange = sal_False;
ScRange aClipRange;
if ( pClipDoc )
{
@@ -1602,7 +1602,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
SCCOL nClipEndX;
SCROW nClipEndY;
pClipDoc->GetClipStart( nClipStartX, nClipStartY );
- pClipDoc->GetClipArea( nClipEndX, nClipEndY, TRUE );
+ pClipDoc->GetClipArea( nClipEndX, nClipEndY, sal_True );
nClipEndX = nClipEndX + nClipStartX;
nClipEndY += nClipStartY; // GetClipArea returns the difference
@@ -1657,11 +1657,11 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
void ScDrawLayer::MirrorRTL( SdrObject* pObj )
{
- UINT16 nIdent = pObj->GetObjIdentifier();
+ sal_uInt16 nIdent = pObj->GetObjIdentifier();
// don't mirror OLE or graphics, otherwise ask the object
// if it can be mirrored
- BOOL bCanMirror = ( nIdent != OBJ_GRAF && nIdent != OBJ_OLE2 );
+ sal_Bool bCanMirror = ( nIdent != OBJ_GRAF && nIdent != OBJ_OLE2 );
if (bCanMirror)
{
SdrObjTransformInfoRec aInfo;
@@ -1759,7 +1759,7 @@ String ScDrawLayer::GetVisibleName( SdrObject* pObj )
inline sal_Bool IsNamedObject( SdrObject* pObj, const String& rName )
{
- // TRUE if rName is the object's Name or PersistName
+ // sal_True if rName is the object's Name or PersistName
// (used to find a named object)
return ( pObj->GetName() == rName ||
@@ -1767,7 +1767,7 @@ inline sal_Bool IsNamedObject( SdrObject* pObj, const String& rName )
static_cast<SdrOle2Obj*>(pObj)->GetPersistName() == rName ) );
}
-SdrObject* ScDrawLayer::GetNamedObject( const String& rName, USHORT nId, SCTAB& rFoundTab ) const
+SdrObject* ScDrawLayer::GetNamedObject( const String& rName, sal_uInt16 nId, SCTAB& rFoundTab ) const
{
sal_uInt16 nTabCount = GetPageCount();
for (sal_uInt16 nTab=0; nTab<nTabCount; nTab++)
@@ -1800,7 +1800,7 @@ String ScDrawLayer::GetNewGraphicName( long* pnCounter ) const
String aBase = ScGlobal::GetRscString(STR_GRAPHICNAME);
aBase += ' ';
- BOOL bThere = TRUE;
+ sal_Bool bThere = sal_True;
String aGraphicName;
SCTAB nDummy;
long nId = pnCounter ? *pnCounter : 0;
@@ -1867,10 +1867,10 @@ ScAnchorType ScDrawLayer::GetAnchor( const SdrObject* pObj )
return ( aAnchor.Y() != 0 ) ? SCA_PAGE : SCA_CELL;
}
-ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, BOOL bCreate ) // static
+ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, sal_Bool bCreate ) // static
{
- USHORT nCount = pObj ? pObj->GetUserDataCount() : 0;
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = pObj ? pObj->GetUserDataCount() : 0;
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
SdrObjUserData* pData = pObj->GetUserData( i );
if( pData && pData->GetInventor() == SC_DRAWLAYER
@@ -1913,8 +1913,8 @@ ScDrawObjData* ScDrawLayer::GetNoteCaptionData( SdrObject* pObj, SCTAB nTab )
ScIMapInfo* ScDrawLayer::GetIMapInfo( SdrObject* pObj ) // static
{
- USHORT nCount = pObj->GetUserDataCount();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = pObj->GetUserDataCount();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
SdrObjUserData* pData = pObj->GetUserData( i );
if( pData && pData->GetInventor() == SC_DRAWLAYER
@@ -1940,7 +1940,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
Size aGraphSize;
ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap();
Graphic aGraphic;
- BOOL bObjSupported = FALSE;
+ sal_Bool bObjSupported = sal_False;
if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt
{
@@ -1969,13 +1969,13 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
rGraphic.GetPrefMapMode(),
aMap100 );
- bObjSupported = TRUE;
+ bObjSupported = sal_True;
}
else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt
{
// TODO/LEAN: working with visual area needs running state
aGraphSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize();
- bObjSupported = TRUE;
+ bObjSupported = sal_True;
}
// hat alles geklappt, dann HitTest ausfuehren
@@ -1990,10 +1990,10 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
return pIMapObj;
}
-ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, BOOL bCreate ) // static
+ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, sal_Bool bCreate ) // static
{
- USHORT nCount = pObj->GetUserDataCount();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = pObj->GetUserDataCount();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
SdrObjUserData* pData = pObj->GetUserData( i );
if( pData && pData->GetInventor() == SC_DRAWLAYER
@@ -2018,7 +2018,7 @@ void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist) // s
void __EXPORT ScDrawLayer::SetChanged( sal_Bool bFlg /* = sal_True */ )
{
if ( bFlg && pDoc )
- pDoc->SetChartListenerCollectionNeedsUpdate( TRUE );
+ pDoc->SetChartListenerCollectionNeedsUpdate( sal_True );
FmFormModel::SetChanged( bFlg );
}
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 12b4bb27950d..6cc56405448e 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -54,7 +54,7 @@
// -----------------------------------------------------------------------
-const USHORT ROWINFO_MAX = 1024;
+const sal_uInt16 ROWINFO_MAX = 1024;
enum FillInfoLinePos
@@ -94,8 +94,8 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
rStartX = nX;
rStartY = nY;
- BOOL bHOver = pInfo->bHOverlapped;
- BOOL bVOver = pInfo->bVOverlapped;
+ sal_Bool bHOver = pInfo->bHOverlapped;
+ sal_Bool bVOver = pInfo->bVOverlapped;
SCCOL nLastCol;
SCROW nLastRow;
@@ -109,7 +109,7 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rStartX, rStartY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
@@ -133,7 +133,7 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
}
else
{
- USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
+ sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rStartX, rStartY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
bVOver = ((nOverlap & SC_MF_VER) != 0);
@@ -160,11 +160,11 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
SCTAB nTab, double nScaleX, double nScaleY,
- BOOL bPageMode, BOOL bFormulaMode, const ScMarkData* pMarkData )
+ sal_Bool bPageMode, sal_Bool bFormulaMode, const ScMarkData* pMarkData )
{
DBG_ASSERT( pTab[nTab], "Tabelle existiert nicht" );
- BOOL bLayoutRTL = IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = IsLayoutRTL( nTab );
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
ScStyleSheetPool* pStlPool = xPoolHelper->GetStylePool();
@@ -185,16 +185,16 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
SCCOL nArrX;
SCSIZE nArrY;
SCSIZE nArrCount;
- BOOL bAnyMerged = FALSE;
- BOOL bAnyShadow = FALSE;
- BOOL bAnyCondition = FALSE;
+ sal_Bool bAnyMerged = sal_False;
+ sal_Bool bAnyShadow = sal_False;
+ sal_Bool bAnyCondition = sal_False;
- BOOL bTabProtect = IsTabProtected(nTab);
+ sal_Bool bTabProtect = IsTabProtected(nTab);
// fuer Blockmarken von zusammengefassten Zellen mit
// versteckter erster Zeile / Spalte
- BOOL bPaintMarks = FALSE;
- BOOL bSkipMarks = FALSE;
+ sal_Bool bPaintMarks = sal_False;
+ sal_Bool bSkipMarks = sal_False;
SCCOL nBlockStartX = 0, nBlockEndX = 0;
SCROW nBlockEndY = 0, nBlockStartY = 0;
if (pMarkData && pMarkData->IsMarked())
@@ -209,9 +209,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nBlockEndY = aTmpRange.aEnd.Row();
ExtendHidden( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY, nTab ); //? noetig ?
if (pMarkData->IsMarkNegative())
- bSkipMarks = TRUE;
+ bSkipMarks = sal_True;
else
- bPaintMarks = TRUE;
+ bPaintMarks = sal_True;
}
}
@@ -219,7 +219,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nArrY=0;
SCROW nYExtra = nY2+1;
- USHORT nDocHeight = ScGlobal::nStdRowHeight;
+ sal_uInt16 nDocHeight = ScGlobal::nStdRowHeight;
SCROW nDocHeightEndRow = -1;
for (nSignedY=((SCsROW)nY1)-1; nSignedY<=(SCsROW)nYExtra; nSignedY++)
{
@@ -241,17 +241,17 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
pThisRowInfo->pCellInfo = NULL; // wird unten belegt
- USHORT nHeight = (USHORT) ( nDocHeight * nScaleY );
+ sal_uInt16 nHeight = (sal_uInt16) ( nDocHeight * nScaleY );
if (!nHeight)
nHeight = 1;
pThisRowInfo->nRowNo = nY; //! Fall < 0 ?
pThisRowInfo->nHeight = nHeight;
- pThisRowInfo->bEmptyBack = TRUE;
- pThisRowInfo->bEmptyText = TRUE;
- pThisRowInfo->bChanged = TRUE;
- pThisRowInfo->bAutoFilter = FALSE;
- pThisRowInfo->bPushButton = FALSE;
+ pThisRowInfo->bEmptyBack = sal_True;
+ pThisRowInfo->bEmptyText = sal_True;
+ pThisRowInfo->bChanged = sal_True;
+ pThisRowInfo->bAutoFilter = sal_False;
+ pThisRowInfo->bPushButton = sal_False;
pThisRowInfo->nRotMaxCol = SC_ROTMAX_NONE;
++nArrY;
@@ -271,12 +271,12 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// rotierter Text...
// Attribut im Dokument ueberhaupt verwendet?
- BOOL bAnyItem = FALSE;
+ sal_Bool bAnyItem = sal_False;
sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE );
for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++)
if (pPool->GetItem2( ATTR_ROTATE_VALUE, nItem ))
{
- bAnyItem = TRUE;
+ bAnyItem = sal_True;
break;
}
@@ -313,28 +313,28 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nX = MAXCOL+1; // ungueltig
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX];
- pInfo->bEmptyCellText = TRUE;
+ pInfo->bEmptyCellText = sal_True;
pInfo->pCell = NULL;
if (bPaintMarks)
pInfo->bMarked = ( nX >= nBlockStartX && nX <= nBlockEndX
&& nY >= nBlockStartY && nY <= nBlockEndY );
else
- pInfo->bMarked = FALSE;
+ pInfo->bMarked = sal_False;
pInfo->nWidth = 0;
pInfo->nClipMark = SC_CLIPMARK_NONE;
- pInfo->bMerged = FALSE;
- pInfo->bHOverlapped = FALSE;
- pInfo->bVOverlapped = FALSE;
- pInfo->bAutoFilter = FALSE;
- pInfo->bPushButton = FALSE;
+ pInfo->bMerged = sal_False;
+ pInfo->bHOverlapped = sal_False;
+ pInfo->bVOverlapped = sal_False;
+ pInfo->bAutoFilter = sal_False;
+ pInfo->bPushButton = sal_False;
pInfo->bPopupButton = false;
pInfo->bFilterActive = false;
pInfo->nRotateDir = SC_ROTDIR_NONE;
- pInfo->bPrinted = FALSE; // view-intern
- pInfo->bHideGrid = FALSE; // view-intern
- pInfo->bEditEngine = FALSE; // view-intern
+ pInfo->bPrinted = sal_False; // view-intern
+ pInfo->bHideGrid = sal_False; // view-intern
+ pInfo->bEditEngine = sal_False; // view-intern
pInfo->pBackground = NULL; //! weglassen?
pInfo->pPatternAttr = NULL;
@@ -357,7 +357,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
if (!ColHidden(nX, nTab))
{
- USHORT nThisWidth = (USHORT) (GetColWidth( nX, nTab ) * nScaleX);
+ sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * nScaleX);
if (!nThisWidth)
nThisWidth = 1;
@@ -378,7 +378,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// TODO: Optimize this loop.
if (!ColHidden(nX, nTab))
{
- USHORT nThisWidth = (USHORT) (GetColWidth( nX, nTab ) * nScaleX);
+ sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * nScaleX);
if (!nThisWidth)
nThisWidth = 1;
@@ -407,8 +407,8 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
pInfo->pCell = pThisCol->pItems[nUIndex].pCell;
if (pInfo->pCell->GetCellType() != CELLTYPE_NOTE)
{
- pThisRowInfo->bEmptyText = FALSE; // Zeile nicht leer
- pInfo->bEmptyCellText = FALSE; // Zelle nicht leer
+ pThisRowInfo->bEmptyText = sal_False; // Zeile nicht leer
+ pInfo->bEmptyCellText = sal_False; // Zelle nicht leer
}
++nArrY;
}
@@ -449,24 +449,24 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
const SvxShadowItem* pShadowAttr = (const SvxShadowItem*)
&pPattern->GetItem(ATTR_SHADOW);
if (pShadowAttr != pDefShadow)
- bAnyShadow = TRUE;
+ bAnyShadow = sal_True;
const ScMergeAttr* pMergeAttr = (const ScMergeAttr*)
&pPattern->GetItem(ATTR_MERGE);
- BOOL bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge );
- USHORT nOverlap = ((const ScMergeFlagAttr*) &pPattern->GetItemSet().
+ sal_Bool bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge );
+ sal_uInt16 nOverlap = ((const ScMergeFlagAttr*) &pPattern->GetItemSet().
Get(ATTR_MERGE_FLAG))->GetValue();
- BOOL bHOverlapped = ((nOverlap & SC_MF_HOR) != 0);
- BOOL bVOverlapped = ((nOverlap & SC_MF_VER) != 0);
- BOOL bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0);
- BOOL bPushButton = ((nOverlap & SC_MF_BUTTON) != 0);
- BOOL bScenario = ((nOverlap & SC_MF_SCENARIO) != 0);
+ sal_Bool bHOverlapped = ((nOverlap & SC_MF_HOR) != 0);
+ sal_Bool bVOverlapped = ((nOverlap & SC_MF_VER) != 0);
+ sal_Bool bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0);
+ sal_Bool bPushButton = ((nOverlap & SC_MF_BUTTON) != 0);
+ sal_Bool bScenario = ((nOverlap & SC_MF_SCENARIO) != 0);
bool bPopupButton = ((nOverlap & SC_MF_BUTTON_POPUP) != 0);
bool bFilterActive = ((nOverlap & SC_MF_HIDDEN_MEMBER) != 0);
if (bMerged||bHOverlapped||bVOverlapped)
- bAnyMerged = TRUE; // intern
+ bAnyMerged = sal_True; // intern
- BOOL bHidden, bHideFormula;
+ sal_Bool bHidden, bHideFormula;
if (bTabProtect)
{
const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&)
@@ -475,9 +475,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
bHideFormula = rProtAttr.GetHideFormula();
}
else
- bHidden = bHideFormula = FALSE;
+ bHidden = bHideFormula = sal_False;
- ULONG nConditional = ((const SfxUInt32Item&)pPattern->
+ sal_uLong nConditional = ((const SfxUInt32Item&)pPattern->
GetItem(ATTR_CONDITIONAL)).GetValue();
const ScConditionalFormat* pCondForm = NULL;
if ( nConditional && pCondFormList )
@@ -491,11 +491,11 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
if (pBackground != pDefBackground) // Spalten-HG == Standard ?
- pThisRowInfo->bEmptyBack = FALSE;
+ pThisRowInfo->bEmptyBack = sal_False;
if (bAutoFilter)
- pThisRowInfo->bAutoFilter = TRUE;
+ pThisRowInfo->bAutoFilter = sal_True;
if (bPushButton)
- pThisRowInfo->bPushButton = TRUE;
+ pThisRowInfo->bPushButton = sal_True;
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX];
pInfo->pBackground = pBackground;
@@ -513,7 +513,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
pInfo->pShadowAttr = pShadowAttr;
// nWidth wird nicht mehr einzeln gesetzt
- BOOL bEmbed = FALSE; //bIsEmbedded &&
+ sal_Bool bEmbed = sal_False; //bIsEmbedded &&
nTab >= aEmbedRange.aStart.Tab() &&
nTab <= aEmbedRange.aEnd.Tab() &&
nX >= aEmbedRange.aStart.Col() &&
@@ -524,18 +524,18 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
if (bScenario)
{
pInfo->pBackground = ScGlobal::GetButtonBrushItem();
- pThisRowInfo->bEmptyBack = FALSE;
+ pThisRowInfo->bEmptyBack = sal_False;
}
else if (bEmbed)
{
pInfo->pBackground = ScGlobal::GetEmbeddedBrushItem();
- pThisRowInfo->bEmptyBack = FALSE;
+ pThisRowInfo->bEmptyBack = sal_False;
}
if (bHidden || ( bFormulaMode && bHideFormula && pInfo->pCell
&& pInfo->pCell->GetCellType()
== CELLTYPE_FORMULA ))
- pInfo->bEmptyCellText = TRUE;
+ pInfo->bEmptyCellText = sal_True;
if ( pCondForm )
{
@@ -549,7 +549,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
//! Style-Sets cachen !!!
pInfo->pConditionSet = &pStyleSheet->GetItemSet();
- bAnyCondition = TRUE;
+ bAnyCondition = sal_True;
}
// if style is not there, treat like no condition
}
@@ -575,7 +575,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
// Blockmarken
const ScMarkArray* pThisMarkArr = pMarkData->GetArray()+nX;
- BOOL bThisMarked;
+ sal_Bool bThisMarked;
nArrY = 1;
nCurRow = nY1; // einzelne Zeile
nThisRow = nY1; // Ende des Bereichs
@@ -593,7 +593,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
if ( bThisMarked )
{
- BOOL bSkip = bSkipMarks &&
+ sal_Bool bSkip = bSkipMarks &&
nX >= nBlockStartX &&
nX <= nBlockEndX &&
nCurRow >= nBlockStartY &&
@@ -602,7 +602,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX];
- pInfo->bMarked = TRUE;
+ pInfo->bMarked = sal_True;
}
}
++nArrY;
@@ -649,26 +649,26 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
const SfxPoolItem* pItem;
// Hintergrund
- if ( pCondSet->GetItemState( ATTR_BACKGROUND, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BACKGROUND, sal_True, &pItem ) == SFX_ITEM_SET )
{
pInfo->pBackground = (const SvxBrushItem*) pItem;
- pRowInfo[nArrY].bEmptyBack = FALSE;
+ pRowInfo[nArrY].bEmptyBack = sal_False;
}
// Umrandung
- if ( pCondSet->GetItemState( ATTR_BORDER, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BORDER, sal_True, &pItem ) == SFX_ITEM_SET )
pInfo->pLinesAttr = (const SvxBoxItem*) pItem;
- if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, sal_True, &pItem ) == SFX_ITEM_SET )
pInfo->mpTLBRLine = static_cast< const SvxLineItem* >( pItem );
- if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, sal_True, &pItem ) == SFX_ITEM_SET )
pInfo->mpBLTRLine = static_cast< const SvxLineItem* >( pItem );
// Schatten
- if ( pCondSet->GetItemState( ATTR_SHADOW, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_SHADOW, sal_True, &pItem ) == SFX_ITEM_SET )
{
pInfo->pShadowAttr = (const SvxShadowItem*) pItem;
- bAnyShadow = TRUE;
+ bAnyShadow = sal_True;
}
}
}
@@ -709,23 +709,23 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// Hintergrund kopieren (oder in output.cxx)
if ( !pStartCond || pStartCond->
- GetItemState(ATTR_BACKGROUND,TRUE,&pItem) != SFX_ITEM_SET )
+ GetItemState(ATTR_BACKGROUND,sal_True,&pItem) != SFX_ITEM_SET )
pItem = &pStartPattern->GetItem(ATTR_BACKGROUND);
pInfo->pBackground = (const SvxBrushItem*) pItem;
- pRowInfo[nArrY].bEmptyBack = FALSE;
+ pRowInfo[nArrY].bEmptyBack = sal_False;
// Schatten
if ( !pStartCond || pStartCond->
- GetItemState(ATTR_SHADOW,TRUE,&pItem) != SFX_ITEM_SET )
+ GetItemState(ATTR_SHADOW,sal_True,&pItem) != SFX_ITEM_SET )
pItem = &pStartPattern->GetItem(ATTR_SHADOW);
pInfo->pShadowAttr = (const SvxShadowItem*) pItem;
if (pInfo->pShadowAttr != pDefShadow)
- bAnyShadow = TRUE;
+ bAnyShadow = sal_True;
// Blockmarken - wieder mit Original-Merge-Werten
- BOOL bCellMarked = FALSE;
+ sal_Bool bCellMarked = sal_False;
if (bPaintMarks)
bCellMarked = ( nStartX >= (SCsCOL) nBlockStartX
&& nStartX <= (SCsCOL) nBlockEndX
@@ -749,13 +749,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{
for (nArrY=0; nArrY<nArrCount; nArrY++)
{
- BOOL bTop = ( nArrY == 0 );
- BOOL bBottom = ( nArrY+1 == nArrCount );
+ sal_Bool bTop = ( nArrY == 0 );
+ sal_Bool bBottom = ( nArrY+1 == nArrCount );
for (nArrX=nX1; nArrX<=nX2+2; nArrX++) // links und rechts einer mehr
{
- BOOL bLeft = ( nArrX == nX1 );
- BOOL bRight = ( nArrX == nX2+2 );
+ sal_Bool bLeft = ( nArrX == nX1 );
+ sal_Bool bRight = ( nArrX == nX2+2 );
CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nArrX];
const SvxShadowItem* pThisAttr = pInfo->pShadowAttr;
@@ -772,13 +772,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
while ( nArrX+nDxNeg > nX1 && pRowInfo[0].pCellInfo[nArrX+nDxNeg].nWidth == 0 )
--nDxNeg;
- BOOL bLeftDiff = !bLeft &&
+ sal_Bool bLeftDiff = !bLeft &&
CELLINFO(nDxNeg,0).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
- BOOL bRightDiff = !bRight &&
+ sal_Bool bRightDiff = !bRight &&
CELLINFO(nDxPos,0).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
- BOOL bTopDiff = !bTop &&
+ sal_Bool bTopDiff = !bTop &&
CELLINFO(0,-1).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
- BOOL bBottomDiff = !bBottom &&
+ sal_Bool bBottomDiff = !bBottom &&
CELLINFO(0,1).pShadowAttr->GetLocation() == SVX_SHADOW_NONE;
if ( bLayoutRTL )
@@ -886,7 +886,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
}
}
- rTabInfo.mnArrCount = sal::static_int_cast<USHORT>(nArrCount);
+ rTabInfo.mnArrCount = sal::static_int_cast<sal_uInt16>(nArrCount);
rTabInfo.mbPageMode = bPageMode;
// ========================================================================
@@ -904,12 +904,12 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
for( size_t nRow = 0; nRow < nRowCount; ++nRow )
{
- USHORT nCellInfoY = static_cast< USHORT >( nRow );
+ sal_uInt16 nCellInfoY = static_cast< sal_uInt16 >( nRow );
RowInfo& rThisRowInfo = pRowInfo[ nCellInfoY ];
for( size_t nCol = 0; nCol < nColCount; ++nCol )
{
- USHORT nCellInfoX = static_cast< USHORT >( nCol + nX1 );
+ sal_uInt16 nCellInfoX = static_cast< sal_uInt16 >( nCol + nX1 );
const CellInfo& rInfo = rThisRowInfo.pCellInfo[ nCellInfoX ];
const SvxBoxItem* pBox = rInfo.pLinesAttr;
@@ -952,16 +952,16 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// first visible column (nX1-1 is first processed document column)
SCCOL nFirstDocCol = (nX1 > 0) ? ::std::max< SCCOL >( nFirstRealDocCol, nX1 - 1 ) : nFirstRealDocCol;
- USHORT nFirstCellInfoX = static_cast< USHORT >( nFirstDocCol + 1 );
+ sal_uInt16 nFirstCellInfoX = static_cast< sal_uInt16 >( nFirstDocCol + 1 );
nFirstCol = static_cast< size_t >( nFirstCellInfoX - nX1 );
// last visible column (nX2+1 is last processed document column)
SCCOL nLastDocCol = (nX2 < MAXCOL) ? ::std::min< SCCOL >( nLastRealDocCol, nX2 + 1 ) : nLastRealDocCol;
- USHORT nLastCellInfoX = static_cast< USHORT >( nLastDocCol + 1 );
+ sal_uInt16 nLastCellInfoX = static_cast< sal_uInt16 >( nLastDocCol + 1 );
size_t nLastCol = static_cast< size_t >( nLastCellInfoX - nX1 );
// first visible row
- USHORT nFirstCellInfoY = nCellInfoY;
+ sal_uInt16 nFirstCellInfoY = nCellInfoY;
while( ((nFirstCellInfoY > 1) && (pRowInfo[ nFirstCellInfoY - 1 ].nRowNo >= nFirstRealDocRow)) ||
((nFirstCellInfoY == 1) && (static_cast< SCROW >( nY1 - 1 ) >= nFirstRealDocRow)) )
--nFirstCellInfoY;
@@ -969,7 +969,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nFirstRow = static_cast< size_t >( nFirstCellInfoY );
// last visible row
- USHORT nLastCellInfoY = nCellInfoY;
+ sal_uInt16 nLastCellInfoY = nCellInfoY;
while( (sal::static_int_cast<SCSIZE>(nLastCellInfoY + 1) < nArrCount) &&
(pRowInfo[ nLastCellInfoY + 1 ].nRowNo <= nLastRealDocRow) )
++nLastCellInfoY;
@@ -1064,13 +1064,13 @@ ScTableInfo::ScTableInfo() :
mpRowInfo( new RowInfo[ ROWINFO_MAX ] ),
mbPageMode( false )
{
- for( USHORT nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
+ for( sal_uInt16 nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
mpRowInfo[ nIdx ].pCellInfo = 0;
}
ScTableInfo::~ScTableInfo()
{
- for( USHORT nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
+ for( sal_uInt16 nIdx = 0; nIdx < ROWINFO_MAX; ++nIdx )
delete [] mpRowInfo[ nIdx ].pCellInfo;
delete [] mpRowInfo;
}
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 10aacc678d74..0db09d4d50d9 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -135,19 +135,19 @@ SvNumberFormatter* ScGlobal::pEnglishFormatter = NULL;
double ScGlobal::nScreenPPTX = 96.0;
double ScGlobal::nScreenPPTY = 96.0;
-USHORT ScGlobal::nDefFontHeight = 240;
-USHORT ScGlobal::nStdRowHeight = 257;
+sal_uInt16 ScGlobal::nDefFontHeight = 240;
+sal_uInt16 ScGlobal::nStdRowHeight = 257;
long ScGlobal::nLastRowHeightExtra = 0;
long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH;
-static USHORT nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
+static sal_uInt16 nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
class SfxViewShell;
SfxViewShell* pScActiveViewShell = NULL; //! als Member !!!!!
-USHORT nScClickMouseModifier = 0; //! dito
-USHORT nScFillModeMouseModifier = 0; //! dito
+sal_uInt16 nScClickMouseModifier = 0; //! dito
+sal_uInt16 nScFillModeMouseModifier = 0; //! dito
// Hack: ScGlobal::GetUserList() muss InitAppOptions in der UI aufrufen,
// damit UserList aus Cfg geladen wird
@@ -160,11 +160,11 @@ void global_InitAppOptions();
//
//========================================================================
-BOOL ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
+sal_Bool ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
const SfxItemSet& rOldAttrs,
- const USHORT nWhich )
+ const sal_uInt16 nWhich )
{
- BOOL bInvalidate = FALSE;
+ sal_Bool bInvalidate = sal_False;
const SfxItemState eNewState = rNewAttrs.GetItemState( nWhich );
const SfxItemState eOldState = rOldAttrs.GetItemState( nWhich );
@@ -190,14 +190,14 @@ BOOL ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
? rNewAttrs.Get( nWhich )
: rNewAttrs.GetPool()->GetDefaultItem( nWhich );
- bInvalidate = sal::static_int_cast<BOOL>(rNewItem != rOldItem);
+ bInvalidate = sal::static_int_cast<sal_Bool>(rNewItem != rOldItem);
}
return bInvalidate;
}
-ULONG ScGlobal::GetStandardFormat( SvNumberFormatter& rFormatter,
- ULONG nFormat, short nType )
+sal_uLong ScGlobal::GetStandardFormat( SvNumberFormatter& rFormatter,
+ sal_uLong nFormat, short nType )
{
const SvNumberformat* pFormat = rFormatter.GetEntry( nFormat );
if ( pFormat )
@@ -205,8 +205,8 @@ ULONG ScGlobal::GetStandardFormat( SvNumberFormatter& rFormatter,
return rFormatter.GetStandardFormat( nType, eLnge );
}
-ULONG ScGlobal::GetStandardFormat( double fNumber, SvNumberFormatter& rFormatter,
- ULONG nFormat, short nType )
+sal_uLong ScGlobal::GetStandardFormat( double fNumber, SvNumberFormatter& rFormatter,
+ sal_uLong nFormat, short nType )
{
const SvNumberformat* pFormat = rFormatter.GetEntry( nFormat );
if ( pFormat )
@@ -231,7 +231,7 @@ SvNumberFormatter* ScGlobal::GetEnglishFormatter()
//------------------------------------------------------------------------
-BOOL ScGlobal::CheckWidthInvalidate( BOOL& bNumFormatChanged,
+sal_Bool ScGlobal::CheckWidthInvalidate( sal_Bool& bNumFormatChanged,
const SfxItemSet& rNewAttrs,
const SfxItemSet& rOldAttrs )
{
@@ -347,7 +347,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
}
}
-const String& ScGlobal::GetRscString( USHORT nIndex )
+const String& ScGlobal::GetRscString( sal_uInt16 nIndex )
{
DBG_ASSERT( nIndex < STR_COUNT, "ScGlobal::GetRscString - invalid string index");
if( !ppRscString[ nIndex ] )
@@ -390,7 +390,7 @@ const String& ScGlobal::GetRscString( USHORT nIndex )
return *ppRscString[ nIndex ];
}
-String ScGlobal::GetErrorString(USHORT nErrNumber)
+String ScGlobal::GetErrorString(sal_uInt16 nErrNumber)
{
String sResStr;
switch (nErrNumber)
@@ -416,7 +416,7 @@ String ScGlobal::GetErrorString(USHORT nErrNumber)
return sResStr;
}
-String ScGlobal::GetLongErrorString(USHORT nErrNumber)
+String ScGlobal::GetLongErrorString(sal_uInt16 nErrNumber)
{
switch (nErrNumber)
{
@@ -546,7 +546,7 @@ void ScGlobal::Init()
pLocaleData = pSysLocale->GetLocaleDataPtr();
ppRscString = new String *[ STR_COUNT ];
- for( USHORT nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
+ for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
pButtonBrushItem = new SvxBrushItem( Color(), ATTR_BACKGROUND );
@@ -571,7 +571,7 @@ void ScGlobal::Init()
void ScGlobal::UpdatePPT( OutputDevice* pDev )
{
- USHORT nCurrentZoom = Application::GetSettings().GetStyleSettings().GetScreenZoom();
+ sal_uInt16 nCurrentZoom = Application::GetSettings().GetStyleSettings().GetScreenZoom();
if ( nCurrentZoom != nPPTZoom )
{
// Screen PPT values must be updated when ScreenZoom has changed.
@@ -621,12 +621,12 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
Font aDefFont;
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // font color doesn't matter here
aVirtWindow.SetFont(aDefFont);
- nDefFontHeight = (USHORT) aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()),
+ nDefFontHeight = (sal_uInt16) aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()),
MAP_TWIP).Height();
const SvxMarginItem* pMargin = (const SvxMarginItem*)&pPattern->GetItem(ATTR_MARGIN);
- nStdRowHeight = (USHORT) ( nDefFontHeight +
+ nStdRowHeight = (sal_uInt16) ( nDefFontHeight +
pMargin->GetTopMargin() + pMargin->GetBottomMargin()
- STD_ROWHEIGHT_DIFF );
}
@@ -642,7 +642,7 @@ void ScGlobal::Clear()
DELETEZ(pAddInCollection);
DELETEZ(pUserList);
- for( USHORT nC = 0 ; nC < STR_COUNT ; nC++ )
+ for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ )
if( ppRscString ) delete ppRscString[ nC ];
delete[] ppRscString;
ppRscString = NULL;
@@ -889,33 +889,33 @@ const sal_Unicode* ScGlobal::FindUnquoted( const sal_Unicode* pString, sal_Unico
//------------------------------------------------------------------------
-BOOL ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
+sal_Bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
const EditTextObject* pObj2 )
{
if ( pObj1 == pObj2 ) // both empty or the same object
- return TRUE;
+ return sal_True;
if ( pObj1 && pObj2 )
{
// first test for equal text content
- USHORT nParCount = pObj1->GetParagraphCount();
+ sal_uInt16 nParCount = pObj1->GetParagraphCount();
if ( nParCount != pObj2->GetParagraphCount() )
- return FALSE;
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ return sal_False;
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
if ( pObj1->GetText(nPar) != pObj2->GetText(nPar) )
- return FALSE;
+ return sal_False;
SvMemoryStream aStream1;
SvMemoryStream aStream2;
pObj1->Store( aStream1 );
pObj2->Store( aStream2 );
- ULONG nSize = aStream1.Tell();
+ sal_uLong nSize = aStream1.Tell();
if ( aStream2.Tell() == nSize )
- if ( !memcmp( aStream1.GetData(), aStream2.GetData(), (USHORT) nSize ) )
- return TRUE;
+ if ( !memcmp( aStream1.GetData(), aStream2.GetData(), (sal_uInt16) nSize ) )
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
@@ -943,8 +943,8 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
SfxFrameItem aFrm( SID_DOCFRAME, pFrame );
SfxStringItem aReferer( SID_REFERER, aReferName );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
- SfxBoolItem aBrowsing( SID_BROWSE, TRUE );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
+ SfxBoolItem aBrowsing( SID_BROWSE, sal_True );
// kein SID_SILENT mehr wegen Bug #42525# (war angeblich sowieso falsch)
@@ -960,19 +960,19 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
//------------------------------------------------------------------------
-BOOL ScGlobal::IsSystemRTL()
+sal_Bool ScGlobal::IsSystemRTL()
{
return MsLangId::isRightToLeft( Application::GetSettings().GetLanguage() );
}
-BYTE ScGlobal::GetDefaultScriptType()
+sal_uInt8 ScGlobal::GetDefaultScriptType()
{
// Used when text contains only WEAK characters.
// Script type of office language is used then (same as GetEditDefaultLanguage,
// to get consistent behavior of text in simple cells and EditEngine,
// also same as GetAppLanguage() in Writer)
- return (BYTE) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() );
+ return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() );
}
LanguageType ScGlobal::GetEditDefaultLanguage()
@@ -982,7 +982,7 @@ LanguageType ScGlobal::GetEditDefaultLanguage()
return Application::GetSettings().GetLanguage();
}
-USHORT ScGlobal::GetScriptedWhichID( BYTE nScriptType, USHORT nWhich )
+sal_uInt16 ScGlobal::GetScriptedWhichID( sal_uInt8 nScriptType, sal_uInt16 nWhich )
{
switch ( nScriptType )
{
@@ -1074,16 +1074,16 @@ USHORT ScGlobal::GetScriptedWhichID( BYTE nScriptType, USHORT nWhich )
void ScGlobal::AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter )
{
- DBG_ASSERT( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, FALSE ) == SFX_ITEM_DEFAULT,
+ DBG_ASSERT( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, sal_False ) == SFX_ITEM_DEFAULT,
"ScGlobal::AddLanguage - language already added");
const SfxPoolItem* pHardItem;
- if ( rSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pHardItem ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( ATTR_VALUE_FORMAT, sal_False, &pHardItem ) == SFX_ITEM_SET )
{
const SvNumberformat* pHardFormat = rFormatter.GetEntry(
((const SfxUInt32Item*)pHardItem)->GetValue() );
- ULONG nParentFmt = 0; // pool default
+ sal_uLong nParentFmt = 0; // pool default
const SfxItemSet* pParent = rSet.GetParent();
if ( pParent )
nParentFmt = ((const SfxUInt32Item&)pParent->Get( ATTR_VALUE_FORMAT )).GetValue();
@@ -1113,7 +1113,7 @@ public:
ScFuncRes( ResId&, ScFuncDesc*, bool & rbSuppressed );
private:
- USHORT GetNum();
+ sal_uInt16 GetNum();
};
//--------------------------------------------------------------------
@@ -1125,20 +1125,20 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed )
pDesc->nCategory = GetNum();
pDesc->sHelpId = ReadByteStringRes(); //! Hack, see scfuncs.src
pDesc->nArgCount = GetNum();
- USHORT nArgs = pDesc->nArgCount;
+ sal_uInt16 nArgs = pDesc->nArgCount;
if (nArgs >= VAR_ARGS)
nArgs -= VAR_ARGS - 1;
if (nArgs)
{
pDesc->pDefArgFlags = new ScFuncDesc::ParameterFlags[nArgs];
- for (USHORT i = 0; i < nArgs; i++)
+ for (sal_uInt16 i = 0; i < nArgs; i++)
{
pDesc->pDefArgFlags[i].bOptional = (bool)GetNum();
}
}
// Need to read the value from the resource even if nArgs==0 to advance the
// resource position pointer, so this can't be in the if(nArgs) block above.
- USHORT nSuppressed = GetNum();
+ sal_uInt16 nSuppressed = GetNum();
if (nSuppressed)
{
if (nSuppressed > nArgs)
@@ -1147,9 +1147,9 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed )
aRes.GetId(), (int)nSuppressed, (int)nArgs);
nSuppressed = nArgs; // sanitize
}
- for (USHORT i=0; i < nSuppressed; ++i)
+ for (sal_uInt16 i=0; i < nSuppressed; ++i)
{
- USHORT nParam = GetNum();
+ sal_uInt16 nParam = GetNum();
if (nParam < nArgs)
{
if (pDesc->nArgCount >= VAR_ARGS && nParam == nArgs-1)
@@ -1178,7 +1178,7 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed )
{
pDesc->ppDefArgNames = new String*[nArgs];
pDesc->ppDefArgDescs = new String*[nArgs];
- for (USHORT i = 0; i < nArgs; i++)
+ for (sal_uInt16 i = 0; i < nArgs; i++)
{
pDesc->ppDefArgNames[i] = new String(ScResId(2*(i+1) ));
pDesc->ppDefArgDescs[i] = new String(ScResId(2*(i+1)+1));
@@ -1190,7 +1190,7 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed )
//------------------------------------------------------------------------
-USHORT ScFuncRes::GetNum()
+sal_uInt16 ScFuncRes::GetNum()
{
return ReadShortRes();
}
@@ -1205,7 +1205,7 @@ private:
public:
ScResourcePublisher( const ScResId& rId ) : Resource( rId ) {}
~ScResourcePublisher() { FreeResource(); }
- BOOL IsAvailableRes( const ResId& rId ) const
+ sal_Bool IsAvailableRes( const ResId& rId ) const
{ return Resource::IsAvailableRes( rId ); }
};
@@ -1217,17 +1217,17 @@ ScFunctionList::ScFunctionList() :
ScFuncDesc* pDesc = NULL;
xub_StrLen nStrLen = 0;
FuncCollection* pFuncColl;
- USHORT i,j;
- USHORT nDescBlock[] =
+ sal_uInt16 i,j;
+ sal_uInt16 nDescBlock[] =
{
RID_SC_FUNCTION_DESCRIPTIONS1,
RID_SC_FUNCTION_DESCRIPTIONS2
};
- const USHORT nBlocks = sizeof(nDescBlock) / sizeof(USHORT);
+ const sal_uInt16 nBlocks = sizeof(nDescBlock) / sizeof(sal_uInt16);
aFunctionList.Clear();
- for ( USHORT k = 0; k < nBlocks; k++ )
+ for ( sal_uInt16 k = 0; k < nBlocks; k++ )
{
::std::auto_ptr<ScResourcePublisher> pBlock( new ScResourcePublisher( ScResId( nDescBlock[k] ) ) );
// Browse for all possible OpCodes. This is not the fastest method, but
@@ -1262,7 +1262,7 @@ ScFunctionList::ScFunctionList() :
}
}
- USHORT nNextId = SC_OPCODE_LAST_OPCODE_ID + 1; // FuncID for AddIn functions
+ sal_uInt16 nNextId = SC_OPCODE_LAST_OPCODE_ID + 1; // FuncID for AddIn functions
// Auswertung AddIn-Liste
String aDefArgNameValue(RTL_CONSTASCII_STRINGPARAM("value"));
@@ -1283,7 +1283,7 @@ ScFunctionList::ScFunctionList() :
{
pDesc = new ScFuncDesc;
FuncData *pAddInFuncData = (FuncData*)pFuncColl->At(i);
- USHORT nArgs = pAddInFuncData->GetParamCount() - 1;
+ sal_uInt16 nArgs = pAddInFuncData->GetParamCount() - 1;
pAddInFuncData->GetParamDesc( aArgName, aArgDesc, 0 );
pDesc->nFIndex = nNextId++; // ??? OpCode vergeben
pDesc->nCategory = ID_FUNCTION_GRP_ADDINS;
@@ -1428,11 +1428,11 @@ ScFuncDesc::~ScFuncDesc()
void ScFuncDesc::Clear()
{
- USHORT nArgs = nArgCount;
+ sal_uInt16 nArgs = nArgCount;
if (nArgs >= VAR_ARGS) nArgs -= VAR_ARGS-1;
if (nArgs)
{
- for (USHORT i=0; i<nArgs; i++ )
+ for (sal_uInt16 i=0; i<nArgs; i++ )
{
delete ppDefArgNames[i];
delete ppDefArgDescs[i];
@@ -1471,9 +1471,9 @@ String ScFuncDesc::GetParamList() const
{
if ( nArgCount < VAR_ARGS )
{
- USHORT nLastSuppressed = nArgCount;
- USHORT nLastAdded = nArgCount;
- for ( USHORT i=0; i<nArgCount; i++ )
+ sal_uInt16 nLastSuppressed = nArgCount;
+ sal_uInt16 nLastAdded = nArgCount;
+ for ( sal_uInt16 i=0; i<nArgCount; i++ )
{
if (pDefArgFlags[i].bSuppress)
nLastSuppressed = i;
@@ -1496,8 +1496,8 @@ String ScFuncDesc::GetParamList() const
}
else
{
- USHORT nFix = nArgCount - VAR_ARGS;
- for ( USHORT nArg = 0; nArg < nFix; nArg++ )
+ sal_uInt16 nFix = nArgCount - VAR_ARGS;
+ for ( sal_uInt16 nArg = 0; nArg < nFix; nArg++ )
{
if (!pDefArgFlags[nArg].bSuppress)
{
@@ -1566,7 +1566,7 @@ String ScFuncDesc::GetSignature() const
if ( nArgCount > 0 && aIter != aEnd )
{
- BOOL bLastArg = ( aIter->getLength() == 0 );
+ sal_Bool bLastArg = ( aIter->getLength() == 0 );
while( aIter != aEnd && !bLastArg )
{
@@ -1589,16 +1589,16 @@ String ScFuncDesc::GetSignature() const
//------------------------------------------------------------------------
-USHORT ScFuncDesc::GetSuppressedArgCount() const
+sal_uInt16 ScFuncDesc::GetSuppressedArgCount() const
{
if (!bHasSuppressedArgs || !pDefArgFlags)
return nArgCount;
- USHORT nArgs = nArgCount;
+ sal_uInt16 nArgs = nArgCount;
if (nArgs >= VAR_ARGS)
nArgs -= VAR_ARGS - 1;
- USHORT nCount = nArgs;
- for (USHORT i=0; i < nArgs; ++i)
+ sal_uInt16 nCount = nArgs;
+ for (sal_uInt16 i=0; i < nArgs; ++i)
{
if (pDefArgFlags[i].bSuppress)
--nCount;
@@ -1638,7 +1638,7 @@ xub_StrLen ScFuncDesc::getSuppressedArgumentCount() const
}
// -----------------------------------------------------------------------------
//
-void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const
+void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const
{
if (!bHasSuppressedArgs || !pDefArgFlags)
{
@@ -1647,10 +1647,10 @@ void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments)
}
_rArguments.reserve( nArgCount);
- USHORT nArgs = nArgCount;
+ sal_uInt16 nArgs = nArgCount;
if (nArgs >= VAR_ARGS)
nArgs -= VAR_ARGS - 1;
- for (USHORT i=0; i < nArgs; ++i)
+ for (sal_uInt16 i=0; i < nArgs; ++i)
{
if (!pDefArgFlags[i].bSuppress)
_rArguments.push_back(i);
@@ -1665,7 +1665,7 @@ void ScFuncDesc::initArgumentInfo() const
if ( bIncomplete && pFuncName )
{
ScUnoAddInCollection& rAddIns = *ScGlobal::GetAddInCollection();
- String aIntName = rAddIns.FindFunction( *pFuncName, TRUE ); // pFuncName is upper-case
+ String aIntName = rAddIns.FindFunction( *pFuncName, sal_True ); // pFuncName is upper-case
if ( aIntName.Len() )
{
@@ -1678,7 +1678,7 @@ void ScFuncDesc::initArgumentInfo() const
if ( bIncomplete )
{
DBG_ERRORFILE( "couldn't initialize add-in function" );
- const_cast<ScFuncDesc*>(this)->bIncomplete = FALSE; // even if there was an error, don't try again
+ const_cast<ScFuncDesc*>(this)->bIncomplete = sal_False; // even if there was an error, don't try again
}
}
}
@@ -1723,19 +1723,19 @@ ScFunctionMgr::ScFunctionMgr()
pCurCatList ( NULL )
{
DBG_ASSERT( pFuncList, "Funktionsliste nicht gefunden." );
- ULONG nCount = pFuncList->GetCount();
+ sal_uLong nCount = pFuncList->GetCount();
const ScFuncDesc* pDesc;
List* pRootList;
- ULONG n;
+ sal_uLong n;
- for ( USHORT i=0; i<MAX_FUNCCAT; i++ ) // Kategorie-Listen erstellen
+ for ( sal_uInt16 i=0; i<MAX_FUNCCAT; i++ ) // Kategorie-Listen erstellen
aCatLists[i] = new List;
pRootList = aCatLists[0]; // Gesamtliste ("Alle") erstellen
CollatorWrapper* pCaseCollator = ScGlobal::GetCaseCollator();
for ( n=0; n<nCount; n++ )
{
- ULONG nTmpCnt=0;
+ sal_uLong nTmpCnt=0;
pDesc = pFuncList->GetFunction(n);
for (nTmpCnt = 0; nTmpCnt < n; nTmpCnt++)
{
@@ -1761,7 +1761,7 @@ ScFunctionMgr::ScFunctionMgr()
ScFunctionMgr::~ScFunctionMgr()
{
- for (USHORT i = 0; i < MAX_FUNCCAT; i++)
+ for (sal_uInt16 i = 0; i < MAX_FUNCCAT; i++)
delete aCatLists[i];
// delete pFuncList; // Macht spaeter die App
}
@@ -1780,7 +1780,7 @@ const ScFuncDesc* ScFunctionMgr::Get( const String& rFName ) const
//------------------------------------------------------------------------
-const ScFuncDesc* ScFunctionMgr::Get( USHORT nFIndex ) const
+const ScFuncDesc* ScFunctionMgr::Get( sal_uInt16 nFIndex ) const
{
const ScFuncDesc* pDesc;
for (pDesc = First(0); pDesc; pDesc = Next())
@@ -1791,7 +1791,7 @@ const ScFuncDesc* ScFunctionMgr::Get( USHORT nFIndex ) const
//------------------------------------------------------------------------
-const ScFuncDesc* ScFunctionMgr::First( USHORT nCategory ) const
+const ScFuncDesc* ScFunctionMgr::First( sal_uInt16 nCategory ) const
{
DBG_ASSERT( nCategory < MAX_FUNCCAT, "Unbekannte Kategorie" );
@@ -1840,12 +1840,12 @@ void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::
#define LRU_MAX 10
const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
- USHORT nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (USHORT)LRU_MAX );
- USHORT* pLRUListIds = rAppOpt.GetLRUFuncList();
+ sal_uInt16 nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX );
+ sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList();
if ( pLRUListIds )
{
- for ( USHORT i=0; i<nLRUFuncCount; i++ )
+ for ( sal_uInt16 i=0; i<nLRUFuncCount; i++ )
_rLastRUFunctions.push_back( Get( pLRUListIds[i] ) );
}
}
@@ -1859,7 +1859,7 @@ String ScFunctionMgr::GetCategoryName(sal_uInt32 _nCategoryNumber )
} // if ( _nCategoryNumber >= SC_FUNCGROUP_COUNT )
::std::auto_ptr<ScResourcePublisher> pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) );
- return String(ScResId((USHORT)_nCategoryNumber));
+ return String(ScResId((sal_uInt16)_nCategoryNumber));
}
sal_Unicode ScFunctionMgr::getSingleToken(const formula::IFunctionManager::EToken _eToken) const
{
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 3234340ae9dd..f79d403683f6 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -72,9 +72,9 @@ ScImportParam::ScImportParam() :
nRow1(0),
nCol2(0),
nRow2(0),
- bImport(FALSE),
- bNative(FALSE),
- bSql(TRUE),
+ bImport(sal_False),
+ bNative(sal_False),
+ bSql(sal_True),
nType(ScDbTable)
{
}
@@ -101,9 +101,9 @@ ScImportParam::~ScImportParam()
//UNUSED2009-05 {
//UNUSED2009-05 nCol1 = nCol2 = 0;
//UNUSED2009-05 nRow1 = nRow2 = 0;
-//UNUSED2009-05 bImport = FALSE;
-//UNUSED2009-05 bNative = FALSE;
-//UNUSED2009-05 bSql = TRUE;
+//UNUSED2009-05 bImport = sal_False;
+//UNUSED2009-05 bNative = sal_False;
+//UNUSED2009-05 bSql = sal_True;
//UNUSED2009-05 nType = ScDbTable;
//UNUSED2009-05 aDBName.Erase();
//UNUSED2009-05 aStatement.Erase();
@@ -125,7 +125,7 @@ ScImportParam& ScImportParam::operator=( const ScImportParam& r )
return *this;
}
-BOOL ScImportParam::operator==( const ScImportParam& rOther ) const
+sal_Bool ScImportParam::operator==( const ScImportParam& rOther ) const
{
return( nCol1 == rOther.nCol1 &&
nRow1 == rOther.nRow1 &&
@@ -146,8 +146,8 @@ BOOL ScImportParam::operator==( const ScImportParam& rOther ) const
// struct ScQueryParam:
ScQueryEntry::ScQueryEntry() :
- bDoQuery(FALSE),
- bQueryByString(FALSE),
+ bDoQuery(sal_False),
+ bQueryByString(sal_False),
bQueryByDate(false),
nField(0),
eOp(SC_EQUAL),
@@ -206,8 +206,8 @@ ScQueryEntry& ScQueryEntry::operator=( const ScQueryEntry& r )
void ScQueryEntry::Clear()
{
- bDoQuery = FALSE;
- bQueryByString = FALSE;
+ bDoQuery = sal_False;
+ bQueryByString = sal_False;
bQueryByDate = false;
eOp = SC_EQUAL;
eConnect = SC_AND;
@@ -223,7 +223,7 @@ void ScQueryEntry::Clear()
pSearchText = NULL;
}
-BOOL ScQueryEntry::operator==( const ScQueryEntry& r ) const
+sal_Bool ScQueryEntry::operator==( const ScQueryEntry& r ) const
{
return bDoQuery == r.bDoQuery
&& bQueryByString == r.bQueryByString
@@ -236,12 +236,12 @@ BOOL ScQueryEntry::operator==( const ScQueryEntry& r ) const
//! pSearchParam und pSearchText nicht vergleichen
}
-utl::TextSearch* ScQueryEntry::GetSearchTextPtr( BOOL bCaseSens )
+utl::TextSearch* ScQueryEntry::GetSearchTextPtr( sal_Bool bCaseSens )
{
if ( !pSearchParam )
{
pSearchParam = new utl::SearchParam( *pStr, utl::SearchParam::SRCH_REGEXP,
- bCaseSens, FALSE, FALSE );
+ bCaseSens, sal_False, sal_False );
pSearchText = new utl::TextSearch( *pSearchParam, *ScGlobal::pCharClass );
}
return pSearchText;
@@ -252,7 +252,7 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( BOOL bCaseSens )
ScSubTotalParam::ScSubTotalParam()
{
- for ( USHORT i=0; i<MAXSUBTOTAL; i++ )
+ for ( sal_uInt16 i=0; i<MAXSUBTOTAL; i++ )
{
nSubTotals[i] = 0;
pSubTotals[i] = NULL;
@@ -270,7 +270,7 @@ ScSubTotalParam::ScSubTotalParam( const ScSubTotalParam& r ) :
bDoSort(r.bDoSort),bAscending(r.bAscending),bUserDef(r.bUserDef),nUserIndex(r.nUserIndex),
bIncludePattern(r.bIncludePattern)
{
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
bGroupActive[i] = r.bGroupActive[i];
nField[i] = r.nField[i];
@@ -303,12 +303,12 @@ void ScSubTotalParam::Clear()
nCol1=nCol2= 0;
nRow1=nRow2 = 0;
nUserIndex = 0;
- bPagebreak=bCaseSens=bUserDef=bIncludePattern=bRemoveOnly = FALSE;
- bAscending=bReplace=bDoSort = TRUE;
+ bPagebreak=bCaseSens=bUserDef=bIncludePattern=bRemoveOnly = sal_False;
+ bAscending=bReplace=bDoSort = sal_True;
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
- bGroupActive[i] = FALSE;
+ bGroupActive[i] = sal_False;
nField[i] = 0;
if ( (nSubTotals[i] > 0) && pSubTotals[i] && pFunctions[i] )
@@ -339,7 +339,7 @@ ScSubTotalParam& ScSubTotalParam::operator=( const ScSubTotalParam& r )
nUserIndex = r.nUserIndex;
bIncludePattern = r.bIncludePattern;
- for (USHORT i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
bGroupActive[i] = r.bGroupActive[i];
nField[i] = r.nField[i];
@@ -372,9 +372,9 @@ ScSubTotalParam& ScSubTotalParam::operator=( const ScSubTotalParam& r )
//------------------------------------------------------------------------
-BOOL ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
+sal_Bool ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
{
- BOOL bEqual = (nCol1 == rOther.nCol1)
+ sal_Bool bEqual = (nCol1 == rOther.nCol1)
&& (nRow1 == rOther.nRow1)
&& (nCol2 == rOther.nCol2)
&& (nRow2 == rOther.nRow2)
@@ -390,8 +390,8 @@ BOOL ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
if ( bEqual )
{
- bEqual = TRUE;
- for ( USHORT i=0; i<MAXSUBTOTAL && bEqual; i++ )
+ bEqual = sal_True;
+ for ( sal_uInt16 i=0; i<MAXSUBTOTAL && bEqual; i++ )
{
bEqual = (bGroupActive[i] == rOther.bGroupActive[i])
&& (nField[i] == rOther.nField[i])
@@ -416,10 +416,10 @@ BOOL ScSubTotalParam::operator==( const ScSubTotalParam& rOther ) const
//------------------------------------------------------------------------
-void ScSubTotalParam::SetSubTotals( USHORT nGroup,
+void ScSubTotalParam::SetSubTotals( sal_uInt16 nGroup,
const SCCOL* ptrSubTotals,
const ScSubTotalFunc* ptrFunctions,
- USHORT nCount )
+ sal_uInt16 nCount )
{
DBG_ASSERT( (nGroup <= MAXSUBTOTAL),
"ScSubTotalParam::SetSubTotals(): nGroup > MAXSUBTOTAL!" );
@@ -443,7 +443,7 @@ void ScSubTotalParam::SetSubTotals( USHORT nGroup,
pFunctions[nGroup] = new ScSubTotalFunc [nCount];
nSubTotals[nGroup] = static_cast<SCCOL>(nCount);
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
pSubTotals[nGroup][i] = ptrSubTotals[i];
pFunctions[nGroup][i] = ptrFunctions[i];
@@ -472,7 +472,7 @@ ScConsolidateParam::ScConsolidateParam( const ScConsolidateParam& r ) :
{
nDataAreaCount = r.nDataAreaCount;
ppDataAreas = new ScArea*[nDataAreaCount];
- for ( USHORT i=0; i<nDataAreaCount; i++ )
+ for ( sal_uInt16 i=0; i<nDataAreaCount; i++ )
ppDataAreas[i] = new ScArea( *(r.ppDataAreas[i]) );
}
}
@@ -490,7 +490,7 @@ void __EXPORT ScConsolidateParam::ClearDataAreas()
{
if ( ppDataAreas )
{
- for ( USHORT i=0; i<nDataAreaCount; i++ )
+ for ( sal_uInt16 i=0; i<nDataAreaCount; i++ )
delete ppDataAreas[i];
delete [] ppDataAreas;
ppDataAreas = NULL;
@@ -507,7 +507,7 @@ void __EXPORT ScConsolidateParam::Clear()
nCol = 0;
nRow = 0;
nTab = 0;
- bByCol = bByRow = bReferenceData = FALSE;
+ bByCol = bByRow = bReferenceData = sal_False;
eFunction = SUBTOTAL_FUNC_SUM;
}
@@ -529,9 +529,9 @@ ScConsolidateParam& __EXPORT ScConsolidateParam::operator=( const ScConsolidateP
//------------------------------------------------------------------------
-BOOL __EXPORT ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
+sal_Bool __EXPORT ScConsolidateParam::operator==( const ScConsolidateParam& r ) const
{
- BOOL bEqual = (nCol == r.nCol)
+ sal_Bool bEqual = (nCol == r.nCol)
&& (nRow == r.nRow)
&& (nTab == r.nTab)
&& (bByCol == r.bByCol)
@@ -546,7 +546,7 @@ BOOL __EXPORT ScConsolidateParam::operator==( const ScConsolidateParam& r ) cons
bEqual = bEqual && (ppDataAreas != NULL) && (r.ppDataAreas != NULL);
if ( bEqual && (nDataAreaCount > 0) )
- for ( USHORT i=0; i<nDataAreaCount && bEqual; i++ )
+ for ( sal_uInt16 i=0; i<nDataAreaCount && bEqual; i++ )
bEqual = *(ppDataAreas[i]) == *(r.ppDataAreas[i]);
return bEqual;
@@ -554,13 +554,13 @@ BOOL __EXPORT ScConsolidateParam::operator==( const ScConsolidateParam& r ) cons
//------------------------------------------------------------------------
-void __EXPORT ScConsolidateParam::SetAreas( ScArea* const* ppAreas, USHORT nCount )
+void __EXPORT ScConsolidateParam::SetAreas( ScArea* const* ppAreas, sal_uInt16 nCount )
{
ClearDataAreas();
if ( ppAreas && nCount > 0 )
{
ppDataAreas = new ScArea*[nCount];
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
ppDataAreas[i] = new ScArea( *(ppAreas[i]) );
nDataAreaCount = nCount;
}
@@ -568,7 +568,7 @@ void __EXPORT ScConsolidateParam::SetAreas( ScArea* const* ppAreas, USHORT nCoun
// -----------------------------------------------------------------------
-PivotField::PivotField( SCsCOL nNewCol, USHORT nNewFuncMask ) :
+PivotField::PivotField( SCsCOL nNewCol, sal_uInt16 nNewFuncMask ) :
nCol( nNewCol ),
nFuncMask( nNewFuncMask ),
nFuncCount( 0 )
@@ -592,8 +592,8 @@ bool PivotField::operator==( const PivotField& r ) const
ScPivotParam::ScPivotParam()
: nCol(0), nRow(0), nTab(0),
nPageCount(0), nColCount(0), nRowCount(0), nDataCount(0),
- bIgnoreEmptyRows(FALSE), bDetectCategories(FALSE),
- bMakeTotalCol(TRUE), bMakeTotalRow(TRUE)
+ bIgnoreEmptyRows(sal_False), bDetectCategories(sal_False),
+ bMakeTotalCol(sal_True), bMakeTotalRow(sal_True)
{
}
@@ -626,8 +626,8 @@ __EXPORT ScPivotParam::~ScPivotParam()
//UNUSED2009-05 nCol = 0;
//UNUSED2009-05 nRow = 0;
//UNUSED2009-05 nTab = 0;
-//UNUSED2009-05 bIgnoreEmptyRows = bDetectCategories = FALSE;
-//UNUSED2009-05 bMakeTotalCol = bMakeTotalRow = TRUE;
+//UNUSED2009-05 bIgnoreEmptyRows = bDetectCategories = sal_False;
+//UNUSED2009-05 bMakeTotalCol = bMakeTotalRow = sal_True;
//UNUSED2009-05 ClearLabelData();
//UNUSED2009-05 ClearPivotArrays();
//UNUSED2009-05 }
@@ -704,9 +704,9 @@ ScPivotParam& __EXPORT ScPivotParam::operator=( const ScPivotParam& r )
//------------------------------------------------------------------------
-BOOL __EXPORT ScPivotParam::operator==( const ScPivotParam& r ) const
+sal_Bool __EXPORT ScPivotParam::operator==( const ScPivotParam& r ) const
{
- BOOL bEqual = (nCol == r.nCol)
+ sal_Bool bEqual = (nCol == r.nCol)
&& (nRow == r.nRow)
&& (nTab == r.nTab)
&& (bIgnoreEmptyRows == r.bIgnoreEmptyRows)
@@ -792,17 +792,17 @@ ScSolveParam& __EXPORT ScSolveParam::operator=( const ScSolveParam& r )
//------------------------------------------------------------------------
-BOOL ScSolveParam::operator==( const ScSolveParam& r ) const
+sal_Bool ScSolveParam::operator==( const ScSolveParam& r ) const
{
- BOOL bEqual = (aRefFormulaCell == r.aRefFormulaCell)
+ sal_Bool bEqual = (aRefFormulaCell == r.aRefFormulaCell)
&& (aRefVariableCell == r.aRefVariableCell);
if ( bEqual )
{
if ( !pStrTargetVal && !r.pStrTargetVal )
- bEqual = TRUE;
+ bEqual = sal_True;
else if ( !pStrTargetVal || !r.pStrTargetVal )
- bEqual = FALSE;
+ bEqual = sal_False;
else if ( pStrTargetVal && r.pStrTargetVal )
bEqual = ( *pStrTargetVal == *(r.pStrTargetVal) );
}
@@ -829,7 +829,7 @@ ScTabOpParam::ScTabOpParam( const ScRefAddress& rFormulaCell,
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMd)
+ sal_uInt8 nMd)
: aRefFormulaCell ( rFormulaCell ),
aRefFormulaEnd ( rFormulaEnd ),
aRefRowCell ( rRowCell ),
@@ -852,7 +852,7 @@ ScTabOpParam& ScTabOpParam::operator=( const ScTabOpParam& r )
//------------------------------------------------------------------------
-BOOL __EXPORT ScTabOpParam::operator==( const ScTabOpParam& r ) const
+sal_Bool __EXPORT ScTabOpParam::operator==( const ScTabOpParam& r ) const
{
return ( (aRefFormulaCell == r.aRefFormulaCell)
&& (aRefFormulaEnd == r.aRefFormulaEnd)
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index aeca394437cd..d6258229c1e3 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -59,7 +59,7 @@ ScMarkArray::~ScMarkArray()
//------------------------------------------------------------------------
-void ScMarkArray::Reset( BOOL bMarked )
+void ScMarkArray::Reset( sal_Bool bMarked )
{
// always create pData here
// (or have separate method to ensure pData)
@@ -74,14 +74,14 @@ void ScMarkArray::Reset( BOOL bMarked )
//------------------------------------------------------------------------
-BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
+sal_Bool ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
{
long nLo = 0;
long nHi = static_cast<long>(nCount) - 1;
long nStartRow = 0;
long nEndRow = 0;
long i = 0;
- BOOL bFound = (nCount == 1);
+ sal_Bool bFound = (nCount == 1);
if (pData)
{
while ( !bFound && nLo <= nHi )
@@ -98,11 +98,11 @@ BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
if (nStartRow >= (long) nRow)
nHi = --i;
else
- bFound = TRUE;
+ bFound = sal_True;
}
}
else
- bFound = FALSE;
+ bFound = sal_False;
if (bFound)
nIndex=(SCSIZE)i;
@@ -111,19 +111,19 @@ BOOL ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
return bFound;
}
-BOOL ScMarkArray::GetMark( SCROW nRow ) const
+sal_Bool ScMarkArray::GetMark( SCROW nRow ) const
{
SCSIZE i;
if (Search( nRow, i ))
return pData[i].bMarked;
else
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
-void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
+void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, sal_Bool bMarked )
{
if (ValidRow(nStartRow) && ValidRow(nEndRow))
{
@@ -134,7 +134,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
else
{
if (!pData)
- Reset(FALSE); // create pData for further processing - could use special case handling!
+ Reset(sal_False); // create pData for further processing - could use special case handling!
SCSIZE nNeeded = nCount + 2;
if ( nLimit < nNeeded )
@@ -150,8 +150,8 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
SCSIZE ni; // number of entries in beginning
SCSIZE nInsert; // insert position (MAXROW+1 := no insert)
- BOOL bCombined = FALSE;
- BOOL bSplit = FALSE;
+ sal_Bool bCombined = sal_False;
+ sal_Bool bSplit = sal_False;
if ( nStartRow > 0 )
{
// skip beginning
@@ -166,7 +166,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
{ // may be a split or a simple insert or just a shrink,
// row adjustment is done further down
if ( pData[ni].nRow > nEndRow )
- bSplit = TRUE;
+ bSplit = sal_True;
ni++;
nInsert = ni;
}
@@ -177,7 +177,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
{ // combine
pData[ni-1].nRow = nEndRow;
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
}
else
@@ -204,7 +204,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
pData[ni-1].nRow = nStartRow - 1; // shrink
}
nInsert = MAXROWCOUNT;
- bCombined = TRUE;
+ bCombined = sal_True;
}
else if ( ni > 0 && ni == nInsert )
pData[ni-1].nRow = nStartRow - 1; // shrink
@@ -253,10 +253,10 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, BOOL bMarked )
//UNUSED2009-05 void ScMarkArray::DeleteArea(SCROW nStartRow, SCROW nEndRow)
//UNUSED2009-05 {
-//UNUSED2009-05 SetMarkArea(nStartRow, nEndRow, FALSE);
+//UNUSED2009-05 SetMarkArea(nStartRow, nEndRow, sal_False);
//UNUSED2009-05 }
-BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
+sal_Bool ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
@@ -265,21 +265,21 @@ BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
if (pData[nStartIndex].bMarked)
if (Search( nEndRow, nEndIndex ))
if (nEndIndex==nStartIndex)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
+sal_Bool ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( nCount == 1 )
{
if ( pData[0].bMarked )
{
rStartRow = 0;
rEndRow = MAXROW;
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( nCount == 2 )
@@ -294,7 +294,7 @@ BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
rStartRow = pData[0].nRow + 1;
rEndRow = MAXROW;
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( nCount == 3 )
{
@@ -302,7 +302,7 @@ BOOL ScMarkArray::HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const
{
rStartRow = pData[0].nRow + 1;
rEndRow = pData[1].nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -323,10 +323,10 @@ void ScMarkArray::CopyMarksTo( ScMarkArray& rDestMarkArray ) const
rDestMarkArray.nCount = rDestMarkArray.nLimit = nCount;
}
-SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, BOOL bUp ) const
+SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, sal_Bool bUp ) const
{
if (!pData)
- const_cast<ScMarkArray*>(this)->Reset(FALSE); // create pData for further processing
+ const_cast<ScMarkArray*>(this)->Reset(sal_False); // create pData for further processing
SCsROW nRet = nRow;
if (VALIDROW(nRow))
@@ -349,10 +349,10 @@ SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, BOOL bUp ) const
return nRet;
}
-SCROW ScMarkArray::GetMarkEnd( SCROW nRow, BOOL bUp ) const
+SCROW ScMarkArray::GetMarkEnd( SCROW nRow, sal_Bool bUp ) const
{
if (!pData)
- const_cast<ScMarkArray*>(this)->Reset(FALSE); // create pData for further processing
+ const_cast<ScMarkArray*>(this)->Reset(sal_False); // create pData for further processing
SCROW nRet;
SCSIZE nIndex;
@@ -385,15 +385,15 @@ ScMarkArrayIter::~ScMarkArrayIter()
{
}
-BOOL ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
+sal_Bool ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
{
if ( nPos >= pArray->nCount )
- return FALSE;
+ return sal_False;
while (!pArray->pData[nPos].bMarked)
{
++nPos;
if ( nPos >= pArray->nCount )
- return FALSE;
+ return sal_False;
}
rBottom = pArray->pData[nPos].nRow;
if (nPos==0)
@@ -401,7 +401,7 @@ BOOL ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
else
rTop = pArray->pData[nPos-1].nRow + 1;
++nPos;
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 4401ac19d199..66d205d305db 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -46,7 +46,7 @@ ScMarkData::ScMarkData() :
pMultiSel( NULL )
{
for (SCTAB i=0; i<=MAXTAB; i++)
- bTabMarked[i] = FALSE;
+ bTabMarked[i] = sal_False;
ResetMark();
}
@@ -110,8 +110,8 @@ void ScMarkData::ResetMark()
delete[] pMultiSel;
pMultiSel = NULL;
- bMarked = bMultiMarked = FALSE;
- bMarking = bMarkIsNeg = FALSE;
+ bMarked = bMultiMarked = sal_False;
+ bMarking = bMarkIsNeg = sal_False;
}
void ScMarkData::SetMarkArea( const ScRange& rRange )
@@ -124,8 +124,8 @@ void ScMarkData::SetMarkArea( const ScRange& rRange )
// may query (default) attributes although no sheet is marked yet.
// => mark that one.
if ( !GetSelectCount() )
- bTabMarked[ aMarkRange.aStart.Tab() ] = TRUE;
- bMarked = TRUE;
+ bTabMarked[ aMarkRange.aStart.Tab() ] = sal_True;
+ bMarked = sal_True;
}
}
@@ -139,7 +139,7 @@ void ScMarkData::GetMultiMarkArea( ScRange& rRange ) const
rRange = aMultiRange;
}
-void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark )
+void ScMarkData::SetMultiMarkArea( const ScRange& rRange, sal_Bool bMark )
{
if (!pMultiSel)
{
@@ -148,8 +148,8 @@ void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark )
// if simple mark range is set, copy to multi marks
if ( bMarked && !bMarkIsNeg )
{
- bMarked = FALSE;
- SetMultiMarkArea( aMarkRange, TRUE );
+ bMarked = sal_False;
+ SetMultiMarkArea( aMarkRange, sal_True );
}
}
@@ -178,7 +178,7 @@ void ScMarkData::SetMultiMarkArea( const ScRange& rRange, BOOL bMark )
else
{
aMultiRange = rRange; // neu
- bMultiMarked = TRUE;
+ bMultiMarked = sal_True;
}
}
@@ -221,7 +221,7 @@ void ScMarkData::MarkToMulti()
if ( bMarked && !bMarking )
{
SetMultiMarkArea( aMarkRange, !bMarkIsNeg );
- bMarked = FALSE;
+ bMarked = sal_False;
// check if all multi mark ranges have been removed
if ( bMarkIsNeg && !HasAnyMultiMarks() )
@@ -243,7 +243,7 @@ void ScMarkData::MarkToSimple()
ScRange aNew = aMultiRange;
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
SCCOL nStartCol = aNew.aStart.Col();
SCCOL nEndCol = aNew.aEnd.Col();
@@ -256,12 +256,12 @@ void ScMarkData::MarkToSimple()
SCROW nStartRow, nEndRow;
if ( pMultiSel[nStartCol].HasOneMark( nStartRow, nEndRow ) )
{
- bOk = TRUE;
+ bOk = sal_True;
SCROW nCmpStart, nCmpEnd;
for (SCCOL nCol=nStartCol+1; nCol<=nEndCol && bOk; nCol++)
if ( !pMultiSel[nCol].HasOneMark( nCmpStart, nCmpEnd )
|| nCmpStart != nStartRow || nCmpEnd != nEndRow )
- bOk = FALSE;
+ bOk = sal_False;
}
if (bOk)
@@ -273,18 +273,18 @@ void ScMarkData::MarkToSimple()
ResetMark();
aMarkRange = aNew;
- bMarked = TRUE;
- bMarkIsNeg = FALSE;
+ bMarked = sal_True;
+ bMarkIsNeg = sal_False;
}
}
}
-BOOL ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, BOOL bNoSimple ) const
+sal_Bool ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, sal_Bool bNoSimple ) const
{
if ( bMarked && !bNoSimple && !bMarkIsNeg )
if ( aMarkRange.aStart.Col() <= nCol && aMarkRange.aEnd.Col() >= nCol &&
aMarkRange.aStart.Row() <= nRow && aMarkRange.aEnd.Row() >= nRow )
- return TRUE;
+ return sal_True;
if (bMultiMarked)
{
@@ -294,10 +294,10 @@ BOOL ScMarkData::IsCellMarked( SCCOL nCol, SCROW nRow, BOOL bNoSimple ) const
return pMultiSel[nCol].GetMark( nRow );
}
- return FALSE;
+ return sal_False;
}
-BOOL ScMarkData::IsColumnMarked( SCCOL nCol ) const
+sal_Bool ScMarkData::IsColumnMarked( SCCOL nCol ) const
{
// bMarkIsNeg inzwischen auch fuer Spaltenkoepfe
//! GetMarkColumnRanges fuer komplett markierte Spalten
@@ -305,15 +305,15 @@ BOOL ScMarkData::IsColumnMarked( SCCOL nCol ) const
if ( bMarked && !bMarkIsNeg &&
aMarkRange.aStart.Col() <= nCol && aMarkRange.aEnd.Col() >= nCol &&
aMarkRange.aStart.Row() == 0 && aMarkRange.aEnd.Row() == MAXROW )
- return TRUE;
+ return sal_True;
if ( bMultiMarked && pMultiSel[nCol].IsAllMarked(0,MAXROW) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScMarkData::IsRowMarked( SCROW nRow ) const
+sal_Bool ScMarkData::IsRowMarked( SCROW nRow ) const
{
// bMarkIsNeg inzwischen auch fuer Zeilenkoepfe
//! GetMarkRowRanges fuer komplett markierte Zeilen
@@ -321,48 +321,48 @@ BOOL ScMarkData::IsRowMarked( SCROW nRow ) const
if ( bMarked && !bMarkIsNeg &&
aMarkRange.aStart.Col() == 0 && aMarkRange.aEnd.Col() == MAXCOL &&
aMarkRange.aStart.Row() <= nRow && aMarkRange.aEnd.Row() >= nRow )
- return TRUE;
+ return sal_True;
if ( bMultiMarked )
{
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
for (SCCOL nCol=0; nCol<=MAXCOL; nCol++)
if (!pMultiSel[nCol].GetMark(nRow))
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void ScMarkData::MarkFromRangeList( const ScRangeList& rList, BOOL bReset )
+void ScMarkData::MarkFromRangeList( const ScRangeList& rList, sal_Bool bReset )
{
if (bReset)
{
for (SCTAB i=0; i<=MAXTAB; i++)
- bTabMarked[i] = FALSE; // Tabellen sind nicht in ResetMark
+ bTabMarked[i] = sal_False; // Tabellen sind nicht in ResetMark
ResetMark();
}
- ULONG nCount = rList.Count();
+ sal_uLong nCount = rList.Count();
if ( nCount == 1 && !bMarked && !bMultiMarked )
{
ScRange aRange = *rList.GetObject(0);
SetMarkArea( aRange );
- SelectTable( aRange.aStart.Tab(), TRUE );
+ SelectTable( aRange.aStart.Tab(), sal_True );
}
else
{
- for (ULONG i=0; i<nCount; i++)
+ for (sal_uLong i=0; i<nCount; i++)
{
ScRange aRange = *rList.GetObject(i);
- SetMultiMarkArea( aRange, TRUE );
- SelectTable( aRange.aStart.Tab(), TRUE );
+ SetMultiMarkArea( aRange, sal_True );
+ SelectTable( aRange.aStart.Tab(), sal_True );
}
}
}
-void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, BOOL bClear ) const
+void ScMarkData::FillRangeListWithMarks( ScRangeList* pList, sal_Bool bClear ) const
{
if (!pList)
return;
@@ -410,8 +410,8 @@ void ScMarkData::ExtendRangeListTables( ScRangeList* pList ) const
for (SCTAB nTab=0; nTab<=MAXTAB; nTab++)
if (bTabMarked[nTab])
{
- ULONG nCount = aOldList.Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = aOldList.Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScRange aRange = *aOldList.GetObject(i);
aRange.aStart.SetTab(nTab);
@@ -483,8 +483,8 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
const SCCOLROW nMultiStart = aMultiRange.aStart.Row();
const SCCOLROW nMultiEnd = aMultiRange.aEnd.Row();
- BOOL* bRowMarked = new BOOL[MAXROWCOUNT];
- memset( bRowMarked, 0, sizeof(BOOL) * MAXROWCOUNT);
+ sal_Bool* bRowMarked = new sal_Bool[MAXROWCOUNT];
+ memset( bRowMarked, 0, sizeof(sal_Bool) * MAXROWCOUNT);
SCROW nRow;
SCCOL nCol;
@@ -494,7 +494,7 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
ScMarkArrayIter aMarkIter( &pMultiSel[nCol] );
while (aMarkIter.Next( nTop, nBottom ))
for (nRow=nTop; nRow<=nBottom; nRow++)
- bRowMarked[nRow] = TRUE;
+ bRowMarked[nRow] = sal_True;
if (nTop == nMultiStart && nBottom == nMultiEnd)
break; // for, all relevant rows marked
}
@@ -535,10 +535,10 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
return nRangeCnt;
}
-BOOL ScMarkData::IsAllMarked( const ScRange& rRange ) const
+sal_Bool ScMarkData::IsAllMarked( const ScRange& rRange ) const
{
if ( !bMultiMarked )
- return FALSE;
+ return sal_False;
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
@@ -546,15 +546,15 @@ BOOL ScMarkData::IsAllMarked( const ScRange& rRange ) const
SCROW nStartRow = rRange.aStart.Row();
SCCOL nEndCol = rRange.aEnd.Col();
SCROW nEndRow = rRange.aEnd.Row();
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for (SCCOL nCol=nStartCol; nCol<=nEndCol && bOk; nCol++)
if ( !pMultiSel[nCol].IsAllMarked( nStartRow, nEndRow ) )
- bOk = FALSE;
+ bOk = sal_False;
return bOk;
}
-SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, BOOL bUp ) const
+SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, sal_Bool bUp ) const
{
if ( !bMultiMarked )
return nRow;
@@ -564,42 +564,42 @@ SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, BOOL bUp ) const
return pMultiSel[nCol].GetNextMarked( nRow, bUp );
}
-BOOL ScMarkData::HasMultiMarks( SCCOL nCol ) const
+sal_Bool ScMarkData::HasMultiMarks( SCCOL nCol ) const
{
if ( !bMultiMarked )
- return FALSE;
+ return sal_False;
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
return pMultiSel[nCol].HasMarks();
}
-BOOL ScMarkData::HasAnyMultiMarks() const
+sal_Bool ScMarkData::HasAnyMultiMarks() const
{
if ( !bMultiMarked )
- return FALSE;
+ return sal_False;
DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
for (SCCOL nCol=0; nCol<=MAXCOL; nCol++)
if ( pMultiSel[nCol].HasMarks() )
- return TRUE;
+ return sal_True;
- return FALSE; // nix
+ return sal_False; // nix
}
void ScMarkData::InsertTab( SCTAB nTab )
{
for (SCTAB i=MAXTAB; i>nTab; i--)
bTabMarked[i] = bTabMarked[i-1];
- bTabMarked[nTab] = FALSE;
+ bTabMarked[nTab] = sal_False;
}
void ScMarkData::DeleteTab( SCTAB nTab )
{
for (SCTAB i=nTab; i<MAXTAB; i++)
bTabMarked[i] = bTabMarked[i+1];
- bTabMarked[MAXTAB] = FALSE;
+ bTabMarked[MAXTAB] = sal_False;
}
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index af444c4b2123..636cf42d7511 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -49,7 +49,7 @@ ScOutlineEntry::ScOutlineEntry( SCCOLROW nNewStart, SCCOLROW nNewSize, bool bNew
nStart ( nNewStart ),
nSize ( nNewSize ),
bHidden ( bNewHidden ),
- bVisible( TRUE )
+ bVisible( sal_True )
{
}
@@ -107,7 +107,7 @@ void ScOutlineEntry::SetVisible( bool bNewVisible )
//------------------------------------------------------------------------
ScOutlineCollection::ScOutlineCollection() :
- ScSortedCollection( 4,4,FALSE )
+ ScSortedCollection( 4,4,sal_False )
{
}
@@ -124,13 +124,13 @@ short ScOutlineCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) con
((ScOutlineEntry*)pKey2)->GetStart() );
}
-USHORT ScOutlineCollection::FindStart( SCCOLROW nMinStart )
+sal_uInt16 ScOutlineCollection::FindStart( SCCOLROW nMinStart )
{
//! binaer suchen ?
- USHORT nPos = 0;
- USHORT nLocalCount = GetCount();
- while ( (nPos<nLocalCount) ? (((ScOutlineEntry*)At(nPos))->GetStart() < nMinStart) : FALSE )
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nLocalCount = GetCount();
+ while ( (nPos<nLocalCount) ? (((ScOutlineEntry*)At(nPos))->GetStart() < nMinStart) : sal_False )
++nPos;
return nPos;
@@ -146,10 +146,10 @@ ScOutlineArray::ScOutlineArray() :
ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
nDepth( rArray.nDepth )
{
- for (USHORT nLevel=0; nLevel<nDepth; nLevel++)
+ for (sal_uInt16 nLevel=0; nLevel<nDepth; nLevel++)
{
- USHORT nCount = rArray.aCollections[nLevel].GetCount();
- for (USHORT nEntry=0; nEntry<nCount; nEntry++)
+ sal_uInt16 nCount = rArray.aCollections[nLevel].GetCount();
+ for (sal_uInt16 nEntry=0; nEntry<nCount; nEntry++)
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) rArray.aCollections[nLevel].At(nEntry);
aCollections[nLevel].Insert( new ScOutlineEntry( *pEntry ) );
@@ -157,19 +157,19 @@ ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
}
}
-void ScOutlineArray::FindEntry( SCCOLROW nSearchPos, USHORT& rFindLevel, USHORT& rFindIndex,
- USHORT nMaxLevel )
+void ScOutlineArray::FindEntry( SCCOLROW nSearchPos, sal_uInt16& rFindLevel, sal_uInt16& rFindIndex,
+ sal_uInt16 nMaxLevel )
{
rFindLevel = rFindIndex = 0;
if (nMaxLevel > nDepth)
nMaxLevel = nDepth;
- for (USHORT nLevel=0; nLevel<nMaxLevel; nLevel++) //! rueckwaerts suchen ?
+ for (sal_uInt16 nLevel=0; nLevel<nMaxLevel; nLevel++) //! rueckwaerts suchen ?
{
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pCollect->GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
if ( pEntry->GetStart() <= nSearchPos && pEntry->GetEnd() >= nSearchPos )
@@ -181,28 +181,28 @@ void ScOutlineArray::FindEntry( SCCOLROW nSearchPos, USHORT& rFindLevel, USHORT&
}
}
-BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeChanged,
- BOOL bHidden, BOOL bVisible )
+sal_Bool ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, sal_Bool& rSizeChanged,
+ sal_Bool bHidden, sal_Bool bVisible )
{
- rSizeChanged = FALSE;
+ rSizeChanged = sal_False;
- USHORT nStartLevel;
- USHORT nStartIndex;
- USHORT nEndLevel;
- USHORT nEndIndex;
- BOOL bFound = FALSE;
+ sal_uInt16 nStartLevel;
+ sal_uInt16 nStartIndex;
+ sal_uInt16 nEndLevel;
+ sal_uInt16 nEndIndex;
+ sal_Bool bFound = sal_False;
- BOOL bCont;
- USHORT nFindMax;
+ sal_Bool bCont;
+ sal_uInt16 nFindMax;
FindEntry( nStartCol, nStartLevel, nStartIndex ); // nLevel = neuer Level (alter+1) !!!
FindEntry( nEndCol, nEndLevel, nEndIndex );
nFindMax = Max(nStartLevel,nEndLevel);
do
{
- bCont = FALSE;
+ bCont = sal_False;
if ( nStartLevel == nEndLevel && nStartIndex == nEndIndex && nStartLevel < SC_OL_MAXDEPTH )
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
{
@@ -217,25 +217,25 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh
if ( ((ScOutlineEntry*)aCollections[nEndLevel-1].At(nEndIndex))->
GetEnd() == nEndCol )
FindEntry( nEndCol, nEndLevel, nEndIndex, nFindMax );
- bCont = TRUE;
+ bCont = sal_True;
}
}
}
while ( !bFound && bCont );
if (!bFound)
- return FALSE;
+ return sal_False;
- USHORT nLevel = nStartLevel;
+ sal_uInt16 nLevel = nStartLevel;
// untere verschieben
- BOOL bNeedSize = FALSE;
+ sal_Bool bNeedSize = sal_False;
for ( short nMoveLevel = nDepth-1; nMoveLevel >= (short) nLevel; nMoveLevel-- )
{
- USHORT nCount = aCollections[nMoveLevel].GetCount();
- BOOL bMoved = FALSE;
- for ( USHORT i=0; i<nCount; i += bMoved ? 0 : 1 )
+ sal_uInt16 nCount = aCollections[nMoveLevel].GetCount();
+ sal_Bool bMoved = sal_False;
+ for ( sal_uInt16 i=0; i<nCount; i += bMoved ? 0 : 1 )
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) aCollections[nMoveLevel].At(i);
SCCOLROW nEntryStart = pEntry->GetStart();
@@ -243,40 +243,40 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh
{
if (nMoveLevel >= SC_OL_MAXDEPTH - 1)
{
- rSizeChanged = FALSE; // kein Platz
- return FALSE;
+ rSizeChanged = sal_False; // kein Platz
+ return sal_False;
}
aCollections[nMoveLevel+1].Insert( new ScOutlineEntry( *pEntry ) );
aCollections[nMoveLevel].AtFree( i );
nCount = aCollections[nMoveLevel].GetCount();
- bMoved = TRUE;
+ bMoved = sal_True;
if (nMoveLevel == (short) nDepth - 1)
- bNeedSize = TRUE;
+ bNeedSize = sal_True;
}
else
- bMoved = FALSE;
+ bMoved = sal_False;
}
}
if (bNeedSize)
{
++nDepth;
- rSizeChanged = TRUE;
+ rSizeChanged = sal_True;
}
if (nDepth <= nLevel)
{
nDepth = nLevel+1;
- rSizeChanged = TRUE;
+ rSizeChanged = sal_True;
}
/* nicht zusammenfassen!
// zusammenfassen
- USHORT nCount = aCollections[nLevel].GetCount();
- USHORT nIndex;
- bFound = FALSE;
+ sal_uInt16 nCount = aCollections[nLevel].GetCount();
+ sal_uInt16 nIndex;
+ bFound = sal_False;
for ( nIndex=0; nIndex<nCount && !bFound; nIndex++ )
{
if ( ((ScOutlineEntry*) aCollections[nLevel].At(nIndex))->GetEnd() + 1 == nStartCol )
@@ -284,18 +284,18 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh
nStartCol = ((ScOutlineEntry*) aCollections[nLevel].At(nIndex))->GetStart();
aCollections[nLevel].AtFree(nIndex);
nCount = aCollections[nLevel].GetCount(); // Daten geaendert
- bFound = TRUE;
+ bFound = sal_True;
}
}
- bFound = FALSE;
+ bFound = sal_False;
for ( nIndex=0; nIndex<nCount && !bFound; nIndex++ )
{
if ( ((ScOutlineEntry*) aCollections[nLevel].At(nIndex))->GetStart() == nEndCol + 1 )
{
nEndCol = ((ScOutlineEntry*) aCollections[nLevel].At(nIndex))->GetEnd();
aCollections[nLevel].AtFree(nIndex);
- bFound = TRUE;
+ bFound = sal_True;
}
}
*/
@@ -303,19 +303,19 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol, SCCOLROW nEndCol, BOOL& rSizeCh
pNewEntry->SetVisible( bVisible );
aCollections[nLevel].Insert( pNewEntry );
- return TRUE;
+ return sal_True;
}
-BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, USHORT& rFindLevel ) const
+sal_Bool ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_uInt16& rFindLevel ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
rFindLevel = 0;
- for (USHORT nLevel=0; nLevel<nDepth; nLevel++)
+ for (sal_uInt16 nLevel=0; nLevel<nDepth; nLevel++)
{
const ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = pCollect->GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
@@ -325,7 +325,7 @@ BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd,
( nBlockEnd >=nStart && nBlockEnd <=nEnd ) )
{
rFindLevel = nLevel; // wirklicher Level
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -333,16 +333,16 @@ BOOL ScOutlineArray::FindTouchedLevel( SCCOLROW nBlockStart, SCCOLROW nBlockEnd,
return bFound;
}
-void ScOutlineArray::RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nLevel )
+void ScOutlineArray::RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_uInt16 nLevel )
{
if ( nLevel >= nDepth )
return;
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
+ sal_uInt16 nCount = pCollect->GetCount();
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
{
- bFound = FALSE;
+ bFound = sal_False;
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -352,12 +352,12 @@ void ScOutlineArray::RemoveSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nLe
RemoveSub( nStart, nEnd, nLevel+1 );
pCollect->AtFree(i);
nCount = pCollect->GetCount();
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
-void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nStartLevel )
+void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, sal_uInt16 nStartLevel )
{
if (nStartLevel==0)
{
@@ -365,14 +365,14 @@ void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nS
return;
}
- for (USHORT nLevel = nStartLevel; nLevel < nDepth; nLevel++)
+ for (sal_uInt16 nLevel = nStartLevel; nLevel < nDepth; nLevel++)
{
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
+ sal_uInt16 nCount = pCollect->GetCount();
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
{
- bFound = FALSE;
+ bFound = sal_False;
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -382,43 +382,43 @@ void ScOutlineArray::PromoteSub( SCCOLROW nStartPos, SCCOLROW nEndPos, USHORT nS
aCollections[nLevel-1].Insert( new ScOutlineEntry( *pEntry ) );
pCollect->AtFree(i);
nCount = pCollect->GetCount();
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
}
-BOOL ScOutlineArray::DecDepth() // nDepth auf leere Levels anpassen
+sal_Bool ScOutlineArray::DecDepth() // nDepth auf leere Levels anpassen
{
- BOOL bChanged = FALSE;
- BOOL bCont;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bCont;
do
{
- bCont = FALSE;
+ bCont = sal_False;
if (nDepth)
if (aCollections[nDepth-1].GetCount() == 0)
{
--nDepth;
- bChanged = TRUE;
- bCont = TRUE;
+ bChanged = sal_True;
+ bCont = sal_True;
}
}
while (bCont);
return bChanged;
}
-BOOL ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, BOOL& rSizeChanged )
+sal_Bool ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_Bool& rSizeChanged )
{
- USHORT nLevel;
+ sal_uInt16 nLevel;
FindTouchedLevel( nBlockStart, nBlockEnd, nLevel );
ScOutlineCollection* pCollect = &aCollections[nLevel];
- USHORT nCount = pCollect->GetCount();
- BOOL bFound = FALSE;
- BOOL bAny = FALSE;
- for ( USHORT i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
+ sal_uInt16 nCount = pCollect->GetCount();
+ sal_Bool bFound = sal_False;
+ sal_Bool bAny = sal_False;
+ for ( sal_uInt16 i=0; i<nCount; i += ( bFound ? 0 : 1 ) )
{
- bFound = FALSE;
+ bFound = sal_False;
ScOutlineEntry* pEntry = (ScOutlineEntry*) pCollect->At(i);
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
@@ -430,34 +430,34 @@ BOOL ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, BOOL& rSi
PromoteSub( nStart, nEnd, nLevel+1 );
nCount = pCollect->GetCount();
i = pCollect->FindStart( nEnd+1 );
- bFound = TRUE;
- bAny = TRUE;
+ bFound = sal_True;
+ bAny = sal_True;
}
}
if (bAny) // Depth anpassen
if (DecDepth())
- rSizeChanged = TRUE;
+ rSizeChanged = sal_True;
return bAny;
}
-ScOutlineEntry* ScOutlineArray::GetEntry( USHORT nLevel, USHORT nIndex ) const
+ScOutlineEntry* ScOutlineArray::GetEntry( sal_uInt16 nLevel, sal_uInt16 nIndex ) const
{
return (ScOutlineEntry*)((nLevel < nDepth) ? aCollections[nLevel].At(nIndex) : NULL);
}
-USHORT ScOutlineArray::GetCount( USHORT nLevel ) const
+sal_uInt16 ScOutlineArray::GetCount( sal_uInt16 nLevel ) const
{
return (nLevel < nDepth) ? aCollections[nLevel].GetCount() : 0;
}
-ScOutlineEntry* ScOutlineArray::GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) const
+ScOutlineEntry* ScOutlineArray::GetEntryByPos( sal_uInt16 nLevel, SCCOLROW nPos ) const
{
- USHORT nCount = GetCount( nLevel );
+ sal_uInt16 nCount = GetCount( nLevel );
ScOutlineEntry* pEntry;
- for (USHORT nIndex = 0; nIndex < nCount; nIndex++)
+ for (sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++)
{
pEntry = GetEntry( nLevel, nIndex );
if ((pEntry->GetStart() <= nPos) && (nPos <= pEntry->GetEnd()))
@@ -466,34 +466,34 @@ ScOutlineEntry* ScOutlineArray::GetEntryByPos( USHORT nLevel, SCCOLROW nPos ) co
return NULL;
}
-BOOL ScOutlineArray::GetEntryIndex( USHORT nLevel, SCCOLROW nPos, USHORT& rnIndex ) const
+sal_Bool ScOutlineArray::GetEntryIndex( sal_uInt16 nLevel, SCCOLROW nPos, sal_uInt16& rnIndex ) const
{
// found entry contains passed position
- USHORT nCount = GetCount( nLevel );
+ sal_uInt16 nCount = GetCount( nLevel );
for ( rnIndex = 0; rnIndex < nCount; ++rnIndex )
{
const ScOutlineEntry* pEntry = GetEntry( nLevel, rnIndex );
if ( (pEntry->GetStart() <= nPos) && (nPos <= pEntry->GetEnd()) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScOutlineArray::GetEntryIndexInRange(
- USHORT nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, USHORT& rnIndex ) const
+sal_Bool ScOutlineArray::GetEntryIndexInRange(
+ sal_uInt16 nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, sal_uInt16& rnIndex ) const
{
// found entry will be completely inside of passed range
- USHORT nCount = GetCount( nLevel );
+ sal_uInt16 nCount = GetCount( nLevel );
for ( rnIndex = 0; rnIndex < nCount; ++rnIndex )
{
const ScOutlineEntry* pEntry = GetEntry( nLevel, rnIndex );
if ( (nBlockStart <= pEntry->GetStart()) && (pEntry->GetEnd() <= nBlockEnd) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue, BOOL bSkipHidden )
+void ScOutlineArray::SetVisibleBelow( sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bValue, sal_Bool bSkipHidden )
{
ScOutlineEntry* pEntry = GetEntry( nLevel, nEntry );
if( pEntry )
@@ -501,9 +501,9 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue,
SCCOLROW nStart = pEntry->GetStart();
SCCOLROW nEnd = pEntry->GetEnd();
- for (USHORT nSubLevel=nLevel+1; nSubLevel<nDepth; nSubLevel++)
+ for (sal_uInt16 nSubLevel=nLevel+1; nSubLevel<nDepth; nSubLevel++)
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
pEntry = (ScOutlineEntry*) aCollections[nSubLevel].At(i);
while (pEntry)
{
@@ -513,7 +513,7 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue,
if (bSkipHidden)
if (!pEntry->IsHidden())
- SetVisibleBelow( nSubLevel, i, bValue, TRUE );
+ SetVisibleBelow( nSubLevel, i, bValue, sal_True );
}
++i;
@@ -528,7 +528,7 @@ void ScOutlineArray::SetVisibleBelow( USHORT nLevel, USHORT nEntry, BOOL bValue,
void ScOutlineArray::GetRange( SCCOLROW& rStart, SCCOLROW& rEnd ) const
{
- USHORT nCount = aCollections[0].GetCount();
+ sal_uInt16 nCount = aCollections[0].GetCount();
if (nCount)
{
rStart = ((ScOutlineEntry*) aCollections[0].At(0))->GetStart();
@@ -538,12 +538,12 @@ void ScOutlineArray::GetRange( SCCOLROW& rStart, SCCOLROW& rEnd ) const
rStart = rEnd = 0;
}
-void ScOutlineArray::ExtendBlock( USHORT nLevel, SCCOLROW& rBlkStart, SCCOLROW& rBlkEnd )
+void ScOutlineArray::ExtendBlock( sal_uInt16 nLevel, SCCOLROW& rBlkStart, SCCOLROW& rBlkEnd )
{
- USHORT nCount;
+ sal_uInt16 nCount;
SCCOLROW nStart;
SCCOLROW nEnd;
- USHORT i;
+ sal_uInt16 i;
ScOutlineEntry* pEntry;
nCount = GetCount(nLevel);
@@ -561,16 +561,16 @@ void ScOutlineArray::ExtendBlock( USHORT nLevel, SCCOLROW& rBlkStart, SCCOLROW&
}
}
-BOOL ScOutlineArray::TestInsertSpace( SCSIZE nSize, SCCOLROW nMaxVal ) const
+sal_Bool ScOutlineArray::TestInsertSpace( SCSIZE nSize, SCCOLROW nMaxVal ) const
{
- USHORT nCount = aCollections[0].GetCount();
+ sal_uInt16 nCount = aCollections[0].GetCount();
if (nCount)
{
SCCOLROW nEnd = ((ScOutlineEntry*) aCollections[0].At(nCount-1))->GetEnd();
return ( sal::static_int_cast<SCCOLROW>(nEnd+nSize) <= nMaxVal );
}
- return TRUE;
+ return sal_True;
}
void ScOutlineArray::InsertSpace( SCCOLROW nStartPos, SCSIZE nSize )
@@ -596,11 +596,11 @@ void ScOutlineArray::InsertSpace( SCCOLROW nStartPos, SCSIZE nSize )
}
}
-BOOL ScOutlineArray::DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize )
+sal_Bool ScOutlineArray::DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize )
{
SCCOLROW nEndPos = nStartPos + nSize - 1;
- BOOL bNeedSave = FALSE; // Original fuer Undo benoetigt?
- BOOL bChanged = FALSE; // fuer Test auf Level
+ sal_Bool bNeedSave = sal_False; // Original fuer Undo benoetigt?
+ sal_Bool bChanged = sal_False; // fuer Test auf Level
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
@@ -618,11 +618,11 @@ BOOL ScOutlineArray::DeleteSpace( SCCOLROW nStartPos, SCSIZE nSize )
pEntry->SetSize( nEntrySize-nSize );
else
{
- bNeedSave = TRUE;
+ bNeedSave = sal_True;
if ( nEntryStart >= nStartPos && nEntryEnd <= nEndPos ) // innen
{
aIter.DeleteLast();
- bChanged = TRUE;
+ bChanged = sal_True;
}
else if ( nEntryStart >= nStartPos ) // rechts ueber
pEntry->SetPosSize( nStartPos, static_cast<SCSIZE>(nEntryEnd-nEndPos) );
@@ -673,7 +673,7 @@ bool ScOutlineArray::ManualAction( SCCOLROW nStartPos, SCCOLROW nEndPos, bool bS
void ScOutlineArray::RemoveAll()
{
- for (USHORT nLevel=0; nLevel<nDepth; nLevel++)
+ for (sal_uInt16 nLevel=0; nLevel<nDepth; nLevel++)
aCollections[nLevel].FreeAll();
nDepth = 0;
@@ -691,7 +691,7 @@ ScOutlineTable::ScOutlineTable( const ScOutlineTable& rOutline ) :
{
}
-BOOL ScOutlineTable::TestInsertCol( SCSIZE nSize )
+sal_Bool ScOutlineTable::TestInsertCol( SCSIZE nSize )
{
return aColOutline.TestInsertSpace( nSize, MAXCOL );
}
@@ -701,12 +701,12 @@ void ScOutlineTable::InsertCol( SCCOL nStartCol, SCSIZE nSize )
aColOutline.InsertSpace( nStartCol, nSize );
}
-BOOL ScOutlineTable::DeleteCol( SCCOL nStartCol, SCSIZE nSize )
+sal_Bool ScOutlineTable::DeleteCol( SCCOL nStartCol, SCSIZE nSize )
{
return aColOutline.DeleteSpace( nStartCol, nSize );
}
-BOOL ScOutlineTable::TestInsertRow( SCSIZE nSize )
+sal_Bool ScOutlineTable::TestInsertRow( SCSIZE nSize )
{
return aRowOutline.TestInsertSpace( nSize, MAXROW );
}
@@ -716,7 +716,7 @@ void ScOutlineTable::InsertRow( SCROW nStartRow, SCSIZE nSize )
aRowOutline.InsertSpace( nStartRow, nSize );
}
-BOOL ScOutlineTable::DeleteRow( SCROW nStartRow, SCSIZE nSize )
+sal_Bool ScOutlineTable::DeleteRow( SCROW nStartRow, SCSIZE nSize )
{
return aRowOutline.DeleteSpace( nStartRow, nSize );
}
@@ -734,7 +734,7 @@ ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray ) :
}
ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray,
- USHORT nLevel, USHORT nEntry ) :
+ sal_uInt16 nLevel, sal_uInt16 nEntry ) :
pArray( pOutlineArray )
{
ScOutlineEntry* pEntry = (ScOutlineEntry*) pArray->aCollections[nLevel].At(nEntry);
@@ -748,7 +748,7 @@ ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray,
ScOutlineEntry* ScSubOutlineIterator::GetNext()
{
ScOutlineEntry* pEntry;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
do
{
if (nSubLevel >= nDepth)
@@ -763,7 +763,7 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext()
else
{
if ( pEntry->GetStart() >= nStart && pEntry->GetEnd() <= nEnd )
- bFound = TRUE;
+ bFound = sal_True;
++nSubEntry;
}
}
@@ -771,12 +771,12 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext()
return pEntry; // nSubLevel gueltig, wenn pEntry != 0
}
-USHORT ScSubOutlineIterator::LastLevel() const
+sal_uInt16 ScSubOutlineIterator::LastLevel() const
{
return nSubLevel;
}
-USHORT ScSubOutlineIterator::LastEntry() const
+sal_uInt16 ScSubOutlineIterator::LastEntry() const
{
if (nSubEntry == 0)
{
diff --git a/sc/source/core/data/pagepar.cxx b/sc/source/core/data/pagepar.cxx
index 318f5c19501b..ddd21c01b313 100644
--- a/sc/source/core/data/pagepar.cxx
+++ b/sc/source/core/data/pagepar.cxx
@@ -57,11 +57,11 @@ ScPageTableParam::~ScPageTableParam()
void ScPageTableParam::Reset()
{
- bCellContent = TRUE;
+ bCellContent = sal_True;
bNotes=bGrid=bHeaders=bDrawings=
bLeftRight=bScaleAll=bScaleTo=bScalePageNum=
- bFormulas=bNullVals=bSkipEmpty = FALSE;
- bTopDown=bScaleNone=bCharts=bObjects = TRUE;
+ bFormulas=bNullVals=bSkipEmpty = sal_False;
+ bTopDown=bScaleNone=bCharts=bObjects = sal_True;
nScaleAll = 100;
nScalePageNum = nScaleWidth = nScaleHeight = 0;
nFirstPageNo = 1;
@@ -69,7 +69,7 @@ void ScPageTableParam::Reset()
//------------------------------------------------------------------------
-BOOL ScPageTableParam::operator==( const ScPageTableParam& r ) const
+sal_Bool ScPageTableParam::operator==( const ScPageTableParam& r ) const
{
return ( memcmp( this, &r, sizeof(ScPageTableParam) ) == 0 );
}
@@ -92,7 +92,7 @@ ScPageAreaParam::~ScPageAreaParam()
void ScPageAreaParam::Reset()
{
- bPrintArea = bRepeatRow = bRepeatCol = FALSE;
+ bPrintArea = bRepeatRow = bRepeatCol = sal_False;
memset( &aPrintArea, 0, sizeof(ScRange) );
memset( &aRepeatRow, 0, sizeof(ScRange) );
@@ -101,9 +101,9 @@ void ScPageAreaParam::Reset()
//------------------------------------------------------------------------
-BOOL ScPageAreaParam::operator==( const ScPageAreaParam& r ) const
+sal_Bool ScPageAreaParam::operator==( const ScPageAreaParam& r ) const
{
- BOOL bEqual =
+ sal_Bool bEqual =
bPrintArea == r.bPrintArea
&& bRepeatRow == r.bRepeatRow
&& bRepeatCol == r.bRepeatCol;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index b66aea63dd05..eadcac860496 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -126,7 +126,7 @@ __EXPORT ScPatternAttr::~ScPatternAttr()
SfxPoolItem* __EXPORT ScPatternAttr::Clone( SfxItemPool *pPool ) const
{
- ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(TRUE, pPool) );
+ ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(sal_True, pPool) );
pPattern->pStyle = pStyle;
pPattern->pName = pName ? new String(*pName) : NULL;
@@ -136,7 +136,7 @@ SfxPoolItem* __EXPORT ScPatternAttr::Clone( SfxItemPool *pPool ) const
inline int StrCmp( const String* pStr1, const String* pStr2 )
{
- return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : FALSE ) : ( pStr2 ? FALSE : TRUE ) );
+ return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : sal_False ) : ( pStr2 ? sal_False : sal_True ) );
}
inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
@@ -162,10 +162,10 @@ int __EXPORT ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const
StrCmp( GetStyleName(), static_cast<const ScPatternAttr&>(rCmp).GetStyleName() ) );
}
-SfxPoolItem* __EXPORT ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersion */ ) const
+SfxPoolItem* __EXPORT ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */ ) const
{
String* pStr;
- BOOL bHasStyle;
+ sal_Bool bHasStyle;
short eFamDummy;
rStream >> bHasStyle;
@@ -190,9 +190,9 @@ SfxPoolItem* __EXPORT ScPatternAttr::Create( SvStream& rStream, USHORT /* nVersi
return pPattern;
}
-SvStream& __EXPORT ScPatternAttr::Store(SvStream& rStream, USHORT /* nItemVersion */) const
+SvStream& __EXPORT ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */) const
{
- rStream << (BOOL)TRUE;
+ rStream << (sal_Bool)sal_True;
if ( pStyle )
rStream.WriteByteString( pStyle->GetName(), rStream.GetStreamCharSet() );
@@ -219,7 +219,7 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet& rItemSet
}
else
{
- INT32 nAngle = ((const SfxInt32Item&)GetItem( ATTR_ROTATE_VALUE, rItemSet, pCondSet )).GetValue();
+ sal_Int32 nAngle = ((const SfxInt32Item&)GetItem( ATTR_ROTATE_VALUE, rItemSet, pCondSet )).GetValue();
if( nAngle == 9000 )
eOrient = SVX_ORIENTATION_BOTTOMTOP;
else if( nAngle == 27000 )
@@ -237,27 +237,27 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet* pCondSet
void ScPatternAttr::GetFont(
Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode,
OutputDevice* pOutDev, const Fraction* pScale,
- const SfxItemSet* pCondSet, BYTE nScript,
+ const SfxItemSet* pCondSet, sal_uInt8 nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor )
{
// Items auslesen
const SvxFontItem* pFontAttr;
- UINT32 nFontHeight;
+ sal_uInt32 nFontHeight;
FontWeight eWeight;
FontItalic eItalic;
FontUnderline eUnder;
FontUnderline eOver;
- BOOL bWordLine;
+ sal_Bool bWordLine;
FontStrikeout eStrike;
- BOOL bOutline;
- BOOL bShadow;
+ sal_Bool bOutline;
+ sal_Bool bShadow;
FontEmphasisMark eEmphasis;
FontRelief eRelief;
Color aColor;
LanguageType eLang;
- USHORT nFontId, nHeightId, nWeightId, nPostureId, nLangId;
+ sal_uInt16 nFontId, nHeightId, nWeightId, nPostureId, nLangId;
if ( nScript == SCRIPTTYPE_ASIAN )
{
nFontId = ATTR_CJK_FONT;
@@ -287,59 +287,59 @@ void ScPatternAttr::GetFont(
{
const SfxPoolItem* pItem;
- if ( pCondSet->GetItemState( nFontId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nFontId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nFontId );
pFontAttr = (const SvxFontItem*) pItem;
- if ( pCondSet->GetItemState( nHeightId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nHeightId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nHeightId );
nFontHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( nWeightId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nWeightId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nWeightId );
eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( nPostureId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nPostureId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nPostureId );
eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE );
eUnder = (FontUnderline)((const SvxUnderlineItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_OVERLINE );
eOver = (FontUnderline)((const SvxOverlineItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_WORDLINE );
bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_CROSSEDOUT );
eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_CONTOUR );
bOutline = ((const SvxContourItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_SHADOWED );
bShadow = ((const SvxShadowedItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_EMPHASISMARK );
eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark();
- if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_RELIEF );
eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_COLOR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_COLOR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_FONT_COLOR );
aColor = ((const SvxColorItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( nLangId, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( nLangId, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( nLangId );
eLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
}
@@ -432,7 +432,7 @@ void ScPatternAttr::GetFont(
if ( pCondSet )
{
const SfxPoolItem* pItem;
- if ( pCondSet->GetItemState( ATTR_BACKGROUND, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_BACKGROUND, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rItemSet.Get( ATTR_BACKGROUND );
aBackColor = ((const SvxBrushItem*)pItem)->GetColor();
}
@@ -497,13 +497,13 @@ void ScPatternAttr::GetFont(
rFont.SetEmphasisMark( eEmphasis );
rFont.SetRelief( eRelief );
rFont.SetColor( aColor );
- rFont.SetTransparent( TRUE );
+ rFont.SetTransparent( sal_True );
}
void ScPatternAttr::GetFont(
Font& rFont, ScAutoFontColorMode eAutoMode,
OutputDevice* pOutDev, const Fraction* pScale,
- const SfxItemSet* pCondSet, BYTE nScript,
+ const SfxItemSet* pCondSet, sal_uInt8 nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor ) const
{
GetFont( rFont, GetItemSet(), eAutoMode, pOutDev, pScale, pCondSet, nScript, pBackConfigColor, pTextConfigColor );
@@ -522,16 +522,16 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
FontWeight eWeight, eCjkWeight, eCtlWeight;
SvxUnderlineItem aUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE);
SvxOverlineItem aOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE);
- BOOL bWordLine;
+ sal_Bool bWordLine;
FontStrikeout eStrike;
FontItalic eItalic, eCjkItalic, eCtlItalic;
- BOOL bOutline;
- BOOL bShadow;
- BOOL bForbidden;
+ sal_Bool bOutline;
+ sal_Bool bShadow;
+ sal_Bool bForbidden;
FontEmphasisMark eEmphasis;
FontRelief eRelief;
LanguageType eLang, eCjkLang, eCtlLang;
- BOOL bHyphenate;
+ sal_Bool bHyphenate;
SvxFrameDirection eDirection;
//! additional parameter to control if language is needed?
@@ -540,100 +540,100 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
{
const SfxPoolItem* pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_COLOR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_COLOR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_COLOR );
aColorItem = *(const SvxColorItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT );
aFontItem = *(const SvxFontItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_CJK_FONT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT );
aCjkFontItem = *(const SvxFontItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_CTL_FONT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT );
aCtlFontItem = *(const SvxFontItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_HEIGHT );
nTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_HEIGHT );
nCjkTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_HEIGHT );
nCtlTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
- if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_WEIGHT );
eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_WEIGHT );
eCjkWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_WEIGHT );
eCtlWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_POSTURE );
eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_POSTURE );
eCjkItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_POSTURE );
eCtlItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_UNDERLINE );
aUnderlineItem = *(const SvxUnderlineItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_OVERLINE );
aOverlineItem = *(const SvxOverlineItem*)pItem;
- if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_WORDLINE );
bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_CROSSEDOUT );
eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_CONTOUR );
bOutline = ((const SvxContourItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_SHADOWED );
bShadow = ((const SvxShadowedItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FORBIDDEN_RULES );
bForbidden = ((const SvxForbiddenRuleItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_EMPHASISMARK );
eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark();
- if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_RELIEF );
eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_FONT_LANGUAGE );
eLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
- if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CJK_FONT_LANGUAGE );
eCjkLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
- if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_CTL_FONT_LANGUAGE );
eCtlLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
- if ( pCondSet->GetItemState( ATTR_HYPHENATE, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_HYPHENATE, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_HYPHENATE );
bHyphenate = ((const SfxBoolItem*)pItem)->GetValue();
- if ( pCondSet->GetItemState( ATTR_WRITINGDIR, TRUE, &pItem ) != SFX_ITEM_SET )
+ if ( pCondSet->GetItemState( ATTR_WRITINGDIR, sal_True, &pItem ) != SFX_ITEM_SET )
pItem = &rSrcSet.Get( ATTR_WRITINGDIR );
eDirection = (SvxFrameDirection)((const SvxFrameDirectionItem*)pItem)->GetValue();
}
@@ -740,7 +740,7 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
// (don't evaluate attributes that can't be changed).
// If a locale-dependent default is needed, it has to go into the cell
// style, like the fonts.
- rEditSet.Put( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ rEditSet.Put( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) );
}
void ScPatternAttr::FillEditItemSet( SfxItemSet* pEditSet, const SfxItemSet* pCondSet ) const
@@ -754,80 +754,80 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet&
{
const SfxPoolItem* pItem;
- if (rEditSet.GetItemState(EE_CHAR_COLOR,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_COLOR,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxColorItem(ATTR_FONT_COLOR) = *(const SvxColorItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTINFO,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTINFO,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontItem(ATTR_FONT) = *(const SvxFontItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontItem(ATTR_CJK_FONT) = *(const SvxFontItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontItem(ATTR_CTL_FONT) = *(const SvxFontItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
100, ATTR_FONT_HEIGHT ) );
- if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
100, ATTR_CJK_FONT_HEIGHT ) );
- if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
100, ATTR_CTL_FONT_HEIGHT ) );
- if (rEditSet.GetItemState(EE_CHAR_WEIGHT,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WEIGHT,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
ATTR_FONT_WEIGHT) );
- if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
ATTR_CJK_FONT_WEIGHT) );
- if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
ATTR_CTL_FONT_WEIGHT) );
// SvxTextLineItem contains enum and color
- if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxUnderlineItem(UNDERLINE_NONE,ATTR_FONT_UNDERLINE) = *(const SvxUnderlineItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_OVERLINE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_OVERLINE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxOverlineItem(UNDERLINE_NONE,ATTR_FONT_OVERLINE) = *(const SvxOverlineItem*)pItem );
- if (rEditSet.GetItemState(EE_CHAR_WLM,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_WLM,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxWordLineModeItem( ((const SvxWordLineModeItem*)pItem)->GetValue(),
ATTR_FONT_WORDLINE) );
- if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxCrossedOutItem( (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue(),
ATTR_FONT_CROSSEDOUT) );
- if (rEditSet.GetItemState(EE_CHAR_ITALIC,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_ITALIC,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
ATTR_FONT_POSTURE) );
- if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
ATTR_CJK_FONT_POSTURE) );
- if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
ATTR_CTL_FONT_POSTURE) );
- if (rEditSet.GetItemState(EE_CHAR_OUTLINE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_OUTLINE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxContourItem( ((const SvxContourItem*)pItem)->GetValue(),
ATTR_FONT_CONTOUR) );
- if (rEditSet.GetItemState(EE_CHAR_SHADOW,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_SHADOW,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxShadowedItem( ((const SvxShadowedItem*)pItem)->GetValue(),
ATTR_FONT_SHADOWED) );
- if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxEmphasisMarkItem( ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark(),
ATTR_FONT_EMPHASISMARK) );
- if (rEditSet.GetItemState(EE_CHAR_RELIEF,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_RELIEF,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxCharReliefItem( (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue(),
ATTR_FONT_RELIEF) );
- if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_FONT_LANGUAGE) );
- if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CJK_FONT_LANGUAGE) );
- if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,sal_True,&pItem) == SFX_ITEM_SET)
rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CTL_FONT_LANGUAGE) );
- if (rEditSet.GetItemState(EE_PARA_JUST,TRUE,&pItem) == SFX_ITEM_SET)
+ if (rEditSet.GetItemState(EE_PARA_JUST,sal_True,&pItem) == SFX_ITEM_SET)
{
SvxCellHorJustify eVal;
switch ( ((const SvxAdjustItem*)pItem)->GetAdjust() )
@@ -896,12 +896,12 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
const SfxPoolItem* pThisItem;
const SfxPoolItem* pOldItem;
- for ( USHORT nSubWhich=ATTR_PATTERN_START; nSubWhich<=ATTR_PATTERN_END; nSubWhich++ )
+ for ( sal_uInt16 nSubWhich=ATTR_PATTERN_START; nSubWhich<=ATTR_PATTERN_END; nSubWhich++ )
{
// only items that are set are interesting
- if ( rThisSet.GetItemState( nSubWhich, FALSE, &pThisItem ) == SFX_ITEM_SET )
+ if ( rThisSet.GetItemState( nSubWhich, sal_False, &pThisItem ) == SFX_ITEM_SET )
{
- SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, TRUE, &pOldItem );
+ SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, sal_True, &pOldItem );
if ( eOldState == SFX_ITEM_SET )
{
// item is set in OldAttrs (or its parent) -> compare pointers
@@ -918,19 +918,19 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
}
}
-BOOL ScPatternAttr::HasItemsSet( const USHORT* pWhich ) const
+sal_Bool ScPatternAttr::HasItemsSet( const sal_uInt16* pWhich ) const
{
const SfxItemSet& rSet = GetItemSet();
- for (USHORT i=0; pWhich[i]; i++)
- if ( rSet.GetItemState( pWhich[i], FALSE ) == SFX_ITEM_SET )
- return TRUE;
- return FALSE;
+ for (sal_uInt16 i=0; pWhich[i]; i++)
+ if ( rSet.GetItemState( pWhich[i], sal_False ) == SFX_ITEM_SET )
+ return sal_True;
+ return sal_False;
}
-void ScPatternAttr::ClearItems( const USHORT* pWhich )
+void ScPatternAttr::ClearItems( const sal_uInt16* pWhich )
{
SfxItemSet& rSet = GetItemSet();
- for (USHORT i=0; pWhich[i]; i++)
+ for (sal_uInt16 i=0; pWhich[i]; i++)
rSet.ClearItem(pWhich[i]);
}
@@ -968,9 +968,9 @@ SfxStyleSheetBase* lcl_CopyStyleToPool
const SfxPoolItem* pSrcItem;
if ( pFormatExchangeList &&
- rSrcSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pSrcItem ) == SFX_ITEM_SET )
+ rSrcSet.GetItemState( ATTR_VALUE_FORMAT, sal_False, &pSrcItem ) == SFX_ITEM_SET )
{
- ULONG nOldFormat = static_cast<const SfxUInt32Item*>(pSrcItem)->GetValue();
+ sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pSrcItem)->GetValue();
sal_uInt32* pNewFormat = static_cast<sal_uInt32*>(pFormatExchangeList->Get( nOldFormat ));
if (pNewFormat)
rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, *pNewFormat ) );
@@ -1016,10 +1016,10 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
pDestPattern->SetStyleSheet( (ScStyleSheet*)pStyleCpy );
}
- for ( USHORT nAttrId = ATTR_PATTERN_START; nAttrId <= ATTR_PATTERN_END; nAttrId++ )
+ for ( sal_uInt16 nAttrId = ATTR_PATTERN_START; nAttrId <= ATTR_PATTERN_END; nAttrId++ )
{
const SfxPoolItem* pSrcItem;
- SfxItemState eItemState = pSrcSet->GetItemState( nAttrId, FALSE, &pSrcItem );
+ SfxItemState eItemState = pSrcSet->GetItemState( nAttrId, sal_False, &pSrcItem );
if (eItemState==SFX_ITEM_ON)
{
SfxPoolItem* pNewItem = NULL;
@@ -1028,11 +1028,11 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
{
// Bedingte Formate ins neue Dokument kopieren
- ULONG nNewIndex = 0;
+ sal_uLong nNewIndex = 0;
ScConditionalFormatList* pSrcList = pSrcDoc->GetCondFormList();
if ( pSrcList )
{
- ULONG nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
+ sal_uLong nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
const ScConditionalFormat* pOldData = pSrcList->GetFormat( nOldIndex );
if ( pOldData )
{
@@ -1044,8 +1044,8 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
ScStyleSheetPool* pSrcSPool = pSrcDoc->GetStyleSheetPool();
ScStyleSheetPool* pDestSPool = pDestDoc->GetStyleSheetPool();
const SvNumberFormatterIndexTable* pFormatExchangeList = pDestDoc->GetFormatExchangeList();
- USHORT nStlCnt = pOldData->Count();
- for (USHORT i=0; i<nStlCnt; i++)
+ sal_uInt16 nStlCnt = pOldData->Count();
+ for (sal_uInt16 i=0; i<nStlCnt; i++)
{
String aName = pOldData->GetEntry(i)->GetStyle();
SfxStyleSheetBase* pSrcStl =
@@ -1060,11 +1060,11 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
{
// Gueltigkeit ins neue Dokument kopieren
- ULONG nNewIndex = 0;
+ sal_uLong nNewIndex = 0;
ScValidationDataList* pSrcList = pSrcDoc->GetValidationList();
if ( pSrcList )
{
- ULONG nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
+ sal_uLong nOldIndex = ((const SfxUInt32Item*)pSrcItem)->GetValue();
const ScValidationData* pOldData = pSrcList->GetData( nOldIndex );
if ( pOldData )
nNewIndex = pDestDoc->AddValidationEntry( *pOldData );
@@ -1075,10 +1075,10 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
{
// Zahlformate nach Exchange-Liste
- ULONG nOldFormat = ((const SfxUInt32Item*)pSrcItem)->GetValue();
+ sal_uLong nOldFormat = ((const SfxUInt32Item*)pSrcItem)->GetValue();
sal_uInt32* pNewFormat = static_cast<sal_uInt32*>(pDestDoc->GetFormatExchangeList()->Get(nOldFormat));
if (pNewFormat)
- pNewItem = new SfxUInt32Item( ATTR_VALUE_FORMAT, (UINT32) (*pNewFormat) );
+ pNewItem = new SfxUInt32Item( ATTR_VALUE_FORMAT, (sal_uInt32) (*pNewFormat) );
}
if ( pNewItem )
@@ -1097,53 +1097,53 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
return pPatternAttr;
}
-BOOL ScPatternAttr::IsVisible() const
+sal_Bool ScPatternAttr::IsVisible() const
{
const SfxItemSet& rSet = GetItemSet();
const SfxPoolItem* pItem;
SfxItemState eState;
- eState = rSet.GetItemState( ATTR_BACKGROUND, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BACKGROUND, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if ( ((const SvxBrushItem*)pItem)->GetColor().GetColor() != COL_TRANSPARENT )
- return TRUE;
+ return sal_True;
- eState = rSet.GetItemState( ATTR_BORDER, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BORDER, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
{
const SvxBoxItem* pBoxItem = (SvxBoxItem*) pItem;
if ( pBoxItem->GetTop() || pBoxItem->GetBottom() ||
pBoxItem->GetLeft() || pBoxItem->GetRight() )
- return TRUE;
+ return sal_True;
}
- eState = rSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if( static_cast< const SvxLineItem* >( pItem )->GetLine() )
- return TRUE;
+ return sal_True;
- eState = rSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if( static_cast< const SvxLineItem* >( pItem )->GetLine() )
- return TRUE;
+ return sal_True;
- eState = rSet.GetItemState( ATTR_SHADOW, TRUE, &pItem );
+ eState = rSet.GetItemState( ATTR_SHADOW, sal_True, &pItem );
if ( eState == SFX_ITEM_SET )
if ( ((const SvxShadowItem*)pItem)->GetLocation() != SVX_SHADOW_NONE )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-inline BOOL OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, USHORT nId )
+inline sal_Bool OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, sal_uInt16 nId )
{
const SfxPoolItem* pItem1 = &rSet1.Get(nId);
const SfxPoolItem* pItem2 = &rSet2.Get(nId);
return ( pItem1 == pItem2 || *pItem1 == *pItem2 );
}
-BOOL ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
+sal_Bool ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
{
const SfxItemSet& rThisSet = GetItemSet();
const SfxItemSet& rOtherSet = rOther.GetItemSet();
@@ -1170,9 +1170,9 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle )
SfxItemSet& rPatternSet = GetItemSet();
const SfxItemSet& rStyleSet = pNewStyle->GetItemSet();
- for (USHORT i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++)
+ for (sal_uInt16 i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++)
{
- if (rStyleSet.GetItemState(i, TRUE) == SFX_ITEM_SET)
+ if (rStyleSet.GetItemState(i, sal_True) == SFX_ITEM_SET)
rPatternSet.ClearItem(i);
}
rPatternSet.SetParent(&pNewStyle->GetItemSet());
@@ -1229,20 +1229,20 @@ void ScPatternAttr::StyleToName()
}
}
-BOOL ScPatternAttr::IsSymbolFont() const
+sal_Bool ScPatternAttr::IsSymbolFont() const
{
const SfxPoolItem* pItem;
- if( GetItemSet().GetItemState( ATTR_FONT, TRUE, &pItem ) == SFX_ITEM_SET )
- return BOOL( ((const SvxFontItem*) pItem)->GetCharSet()
+ if( GetItemSet().GetItemState( ATTR_FONT, sal_True, &pItem ) == SFX_ITEM_SET )
+ return sal_Bool( ((const SvxFontItem*) pItem)->GetCharSet()
== RTL_TEXTENCODING_SYMBOL );
else
- return FALSE;
+ return sal_False;
}
-//UNUSED2008-05 FontToSubsFontConverter ScPatternAttr::GetSubsFontConverter( ULONG nFlags ) const
+//UNUSED2008-05 FontToSubsFontConverter ScPatternAttr::GetSubsFontConverter( sal_uLong nFlags ) const
//UNUSED2008-05 {
//UNUSED2008-05 const SfxPoolItem* pItem;
-//UNUSED2008-05 if( GetItemSet().GetItemState( ATTR_FONT, TRUE, &pItem ) == SFX_ITEM_SET )
+//UNUSED2008-05 if( GetItemSet().GetItemState( ATTR_FONT, sal_True, &pItem ) == SFX_ITEM_SET )
//UNUSED2008-05 return CreateFontToSubsFontConverter(
//UNUSED2008-05 ((const SvxFontItem*) pItem)->GetFamilyName(), nFlags );
//UNUSED2008-05 else
@@ -1250,9 +1250,9 @@ BOOL ScPatternAttr::IsSymbolFont() const
//UNUSED2008-05 }
-ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
+sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
{
- ULONG nFormat =
+ sal_uLong nFormat =
((SfxUInt32Item*)&GetItemSet().Get( ATTR_VALUE_FORMAT ))->GetValue();
LanguageType eLang =
((SvxLanguageItem*)&GetItemSet().Get( ATTR_LANGUAGE_FORMAT ))->GetLanguage();
@@ -1265,17 +1265,17 @@ ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
// dasselbe, wenn bedingte Formatierung im Spiel ist:
-ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
+sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
const SfxItemSet* pCondSet ) const
{
DBG_ASSERT(pFormatter,"GetNumberFormat ohne Formatter");
const SfxPoolItem* pFormItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,TRUE,&pFormItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,sal_True,&pFormItem) != SFX_ITEM_SET )
pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT);
const SfxPoolItem* pLangItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,TRUE,&pLangItem) != SFX_ITEM_SET )
+ if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,sal_True,&pLangItem) != SFX_ITEM_SET )
pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT);
return pFormatter->GetFormatForLanguageIfBuiltIn(
@@ -1283,15 +1283,15 @@ ULONG ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
((SvxLanguageItem*)pLangItem)->GetLanguage() );
}
-const SfxPoolItem& ScPatternAttr::GetItem( USHORT nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
+const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
{
const SfxPoolItem* pCondItem;
- if ( pCondSet && pCondSet->GetItemState( nWhich, TRUE, &pCondItem ) == SFX_ITEM_SET )
+ if ( pCondSet && pCondSet->GetItemState( nWhich, sal_True, &pCondItem ) == SFX_ITEM_SET )
return *pCondItem;
return rItemSet.Get(nWhich);
}
-const SfxPoolItem& ScPatternAttr::GetItem( USHORT nSubWhich, const SfxItemSet* pCondSet ) const
+const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nSubWhich, const SfxItemSet* pCondSet ) const
{
return GetItem( nSubWhich, GetItemSet(), pCondSet );
}
@@ -1303,7 +1303,7 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
long nAttrRotate = 0;
if ( GetCellOrientation() == SVX_ORIENTATION_STANDARD )
{
- BOOL bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
+ sal_Bool bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
GetValue() == SVX_HOR_JUSTIFY_REPEAT );
// ignore orientation/rotation if "repeat" is active
if ( !bRepeat )
@@ -1312,9 +1312,9 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
return nAttrRotate;
}
-BYTE ScPatternAttr::GetRotateDir( const SfxItemSet* pCondSet ) const
+sal_uInt8 ScPatternAttr::GetRotateDir( const SfxItemSet* pCondSet ) const
{
- BYTE nRet = SC_ROTDIR_NONE;
+ sal_uInt8 nRet = SC_ROTDIR_NONE;
long nAttrRotate = GetRotateVal( pCondSet );
if ( nAttrRotate )
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index ddac72f0230b..dc1ac56438f7 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -98,13 +98,13 @@ OUString ScDPLabelData::getDisplayName() const
// ============================================================================
-ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask ) :
+ScDPFuncData::ScDPFuncData( short nCol, sal_uInt16 nFuncMask ) :
mnCol( nCol ),
mnFuncMask( nFuncMask )
{
}
-ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask, const DataPilotFieldReference& rFieldRef ) :
+ScDPFuncData::ScDPFuncData( short nCol, sal_uInt16 nFuncMask, const DataPilotFieldReference& rFieldRef ) :
mnCol( nCol ),
mnFuncMask( nFuncMask ),
maFieldRef( rFieldRef )
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 010cc502798b..aa7e5adeb834 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -101,10 +101,10 @@ void ScPoolHelper::UseDocOptions() const
{
if (pFormTable)
{
- USHORT d,m,y;
+ sal_uInt16 d,m,y;
aOpt.GetDate( d,m,y );
pFormTable->ChangeNullDate( d,m,y );
- pFormTable->ChangeStandardPrec( (USHORT)aOpt.GetStdPrecision() );
+ pFormTable->ChangeStandardPrec( (sal_uInt16)aOpt.GetStdPrecision() );
pFormTable->SetYear2000( aOpt.GetYear2000() );
}
}
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 999a3194eaa6..d1534f1b014c 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -129,16 +129,16 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc )
value. */
aItemSet.Put( XLineStartItem( String::EmptyString(), ::basegfx::B2DPolyPolygon( aTriangle ) ) );
aItemSet.Put( XLineStartWidthItem( 200 ) );
- aItemSet.Put( XLineStartCenterItem( FALSE ) );
+ aItemSet.Put( XLineStartCenterItem( sal_False ) );
aItemSet.Put( XFillStyleItem( XFILL_SOLID ) );
aItemSet.Put( XFillColorItem( String::EmptyString(), ScDetectiveFunc::GetCommentColor() ) );
aItemSet.Put( SdrCaptionEscDirItem( SDRCAPT_ESCBESTFIT ) );
// shadow
- /* SdrShadowItem has FALSE, instead the shadow is set for the
+ /* SdrShadowItem has sal_False, instead the shadow is set for the
rectangle only with SetSpecialTextBoxShadow() when the object is
created (item must be set to adjust objects from older files). */
- aItemSet.Put( SdrShadowItem( FALSE ) );
+ aItemSet.Put( SdrShadowItem( sal_False ) );
aItemSet.Put( SdrShadowXDistItem( 100 ) );
aItemSet.Put( SdrShadowYDistItem( 100 ) );
@@ -147,8 +147,8 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc )
aItemSet.Put( SdrTextRightDistItem( 100 ) );
aItemSet.Put( SdrTextUpperDistItem( 100 ) );
aItemSet.Put( SdrTextLowerDistItem( 100 ) );
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
// #78943# use the default cell style to be able to modify the caption font
const ScPatternAttr& rDefPattern = static_cast< const ScPatternAttr& >( rDoc.GetPool()->GetDefaultItem( ATTR_PATTERN ) );
rDefPattern.FillEditItemSet( &aItemSet );
@@ -161,7 +161,7 @@ void ScCaptionUtil::SetCaptionItems( SdrCaptionObj& rCaption, const SfxItemSet&
// copy all items
rCaption.SetMergedItemSet( rItemSet );
// reset shadow items
- rCaption.SetMergedItem( SdrShadowItem( FALSE ) );
+ rCaption.SetMergedItem( SdrShadowItem( sal_False ) );
rCaption.SetMergedItem( SdrShadowXDistItem( 100 ) );
rCaption.SetMergedItem( SdrShadowYDistItem( 100 ) );
rCaption.SetSpecialTextBoxShadow();
@@ -566,7 +566,7 @@ OUString ScPostIt::GetText() const
if( const EditTextObject* pEditObj = GetEditTextObject() )
{
OUStringBuffer aBuffer;
- for( USHORT nPara = 0, nParaCount = pEditObj->GetParagraphCount(); nPara < nParaCount; ++nPara )
+ for( sal_uInt16 nPara = 0, nParaCount = pEditObj->GetParagraphCount(); nPara < nParaCount; ++nPara )
{
if( nPara > 0 )
aBuffer.append( sal_Unicode( '\n' ) );
@@ -836,10 +836,10 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
ScCaptionUtil::SetDefaultItems( *pCaption, rDoc );
// adjust caption size to text size
long nMaxWidth = ::std::min< long >( aVisRect.GetWidth() * 2 / 3, SC_NOTECAPTION_MAXWIDTH_TEMP );
- pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( TRUE ) );
+ pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( sal_True ) );
pCaption->SetMergedItem( SdrTextMinFrameWidthItem( SC_NOTECAPTION_WIDTH ) );
pCaption->SetMergedItem( SdrTextMaxFrameWidthItem( nMaxWidth ) );
- pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( TRUE ) );
+ pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( sal_True ) );
pCaption->AdjustTextFrameWidthAndHeight();
}
diff --git a/sc/source/core/data/scdpoutputimpl.cxx b/sc/source/core/data/scdpoutputimpl.cxx
index 6a667806e097..2cd711ac4497 100644
--- a/sc/source/core/data/scdpoutputimpl.cxx
+++ b/sc/source/core/data/scdpoutputimpl.cxx
@@ -52,7 +52,7 @@ void OutputImpl::OutputDataArea()
mnCols.push_back( mnTabEndCol+1); //set last row bottom
mnRows.push_back( mnTabEndRow+1); //set last col bottom
- BOOL bAllRows = ( ( mnTabEndRow - mnDataStartRow + 2 ) == (SCROW) mnRows.size() );
+ sal_Bool bAllRows = ( ( mnTabEndRow - mnDataStartRow + 2 ) == (SCROW) mnRows.size() );
std::sort( mnCols.begin(), mnCols.end(), lcl_compareColfuc );
std::sort( mnRows.begin(), mnRows.end(), lcl_compareRowfuc );
@@ -88,7 +88,7 @@ void OutputImpl::OutputDataArea()
OutputBlockFrame( mnDataStartCol, mnTabStartRow, mnTabEndCol, mnDataStartRow-1 );
}
-OutputImpl::OutputImpl( ScDocument* pDoc, USHORT nTab,
+OutputImpl::OutputImpl( ScDocument* pDoc, sal_uInt16 nTab,
SCCOL nTabStartCol,
SCROW nTabStartRow,
SCCOL nMemberStartCol,
@@ -113,32 +113,32 @@ OutputImpl::OutputImpl( ScDocument* pDoc, USHORT nTab,
}
-BOOL OutputImpl::AddRow( SCROW nRow )
+sal_Bool OutputImpl::AddRow( SCROW nRow )
{
if ( !mbNeedLineRows[ nRow - mnDataStartRow ] )
{
mbNeedLineRows[ nRow - mnDataStartRow ] = true;
mnRows.push_back( nRow );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL OutputImpl::AddCol( SCCOL nCol )
+sal_Bool OutputImpl::AddCol( SCCOL nCol )
{
if ( !mbNeedLineCols[ nCol - mnDataStartCol ] )
{
mbNeedLineCols[ nCol - mnDataStartCol ] = true;
mnCols.push_back( nCol );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, BOOL bHori )
+void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Bool bHori )
{
SvxBorderLine aLine, aOutLine;
@@ -171,16 +171,16 @@ void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEnd
SvxBoxInfoItem aBoxInfo( ATTR_BORDER_INNER );
- aBoxInfo.SetValid(VALID_VERT,FALSE );
+ aBoxInfo.SetValid(VALID_VERT,sal_False );
if ( bHori )
{
- aBoxInfo.SetValid(VALID_HORI,TRUE);
+ aBoxInfo.SetValid(VALID_HORI,sal_True);
aBoxInfo.SetLine( &aLine, BOXINFO_LINE_HORI );
}
else
- aBoxInfo.SetValid(VALID_HORI,FALSE );
+ aBoxInfo.SetValid(VALID_HORI,sal_False );
- aBoxInfo.SetValid(VALID_DISTANCE,FALSE);
+ aBoxInfo.SetValid(VALID_DISTANCE,sal_False);
mpDoc->ApplyFrameAreaTab( ScRange( nStartCol, nStartRow, mnTab, nEndCol, nEndRow , mnTab ), &aBox, &aBoxInfo );
diff --git a/sc/source/core/data/scdpoutputimpl.hxx b/sc/source/core/data/scdpoutputimpl.hxx
index 9148fe91ba02..a1b0a6c3a55b 100755..100644
--- a/sc/source/core/data/scdpoutputimpl.hxx
+++ b/sc/source/core/data/scdpoutputimpl.hxx
@@ -41,7 +41,7 @@
class OutputImpl
{
ScDocument* mpDoc;
- USHORT mnTab;
+ sal_uInt16 mnTab;
::std::vector< bool > mbNeedLineCols;
::std::vector< SCCOL > mnCols;
@@ -59,7 +59,7 @@ class OutputImpl
SCROW mnTabEndRow;
public:
- OutputImpl( ScDocument* pDoc, USHORT nTab,
+ OutputImpl( ScDocument* pDoc, sal_uInt16 nTab,
SCCOL nTabStartCol,
SCROW nTabStartRow,
SCCOL nMemberStartCol,
@@ -68,11 +68,11 @@ public:
SCROW nDataStartRow,
SCCOL nTabEndCol,
SCROW nTabEndRow );
- BOOL AddRow( SCROW nRow );
- BOOL AddCol( SCCOL nCol );
+ sal_Bool AddRow( SCROW nRow );
+ sal_Bool AddCol( SCCOL nCol );
void OutputDataArea();
- void OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, BOOL bHori = FALSE );
+ void OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Bool bHori = sal_False );
};
diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx
index 9e8d355e74fa..d6c3308a47e0 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -54,7 +54,7 @@ ScSortParam::ScSortParam( const ScSortParam& r ) :
nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow),
aCollatorLocale( r.aCollatorLocale ), aCollatorAlgorithm( r.aCollatorAlgorithm )
{
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
bDoSort[i] = r.bDoSort[i];
nField[i] = r.nField[i];
@@ -71,16 +71,16 @@ void ScSortParam::Clear()
nCompatHeader = 2;
nDestTab = 0;
nUserIndex = 0;
- bHasHeader=bCaseSens=bUserDef = FALSE;
- bByRow=bIncludePattern=bInplace = TRUE;
+ bHasHeader=bCaseSens=bUserDef = sal_False;
+ bByRow=bIncludePattern=bInplace = sal_True;
aCollatorLocale = ::com::sun::star::lang::Locale();
aCollatorAlgorithm.Erase();
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
- bDoSort[i] = FALSE;
+ bDoSort[i] = sal_False;
nField[i] = 0;
- bAscending[i] = TRUE;
+ bAscending[i] = sal_True;
}
}
@@ -105,7 +105,7 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
aCollatorLocale = r.aCollatorLocale;
aCollatorAlgorithm = r.aCollatorAlgorithm;
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
bDoSort[i] = r.bDoSort[i];
nField[i] = r.nField[i];
@@ -117,12 +117,12 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
//------------------------------------------------------------------------
-BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
+sal_Bool ScSortParam::operator==( const ScSortParam& rOther ) const
{
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = sal_False;
// Anzahl der Sorts gleich?
- USHORT nLast = 0;
- USHORT nOtherLast = 0;
+ sal_uInt16 nLast = 0;
+ sal_uInt16 nOtherLast = 0;
while ( bDoSort[nLast++] && nLast < MAXSORT ) ;
while ( rOther.bDoSort[nOtherLast++] && nOtherLast < MAXSORT ) ;
nLast--;
@@ -148,8 +148,8 @@ BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
&& (aCollatorAlgorithm == rOther.aCollatorAlgorithm)
)
{
- bEqual = TRUE;
- for ( USHORT i=0; i<=nLast && bEqual; i++ )
+ bEqual = sal_True;
+ for ( sal_uInt16 i=0; i<=nLast && bEqual; i++ )
{
bEqual = (nField[i] == rOther.nField[i]) && (bAscending[i] == rOther.bAscending[i]);
}
@@ -161,14 +161,14 @@ BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld ) :
nCol1(rSub.nCol1),nRow1(rSub.nRow1),nCol2(rSub.nCol2),nRow2(rSub.nRow2),
- bHasHeader(TRUE),bByRow(TRUE),bCaseSens(rSub.bCaseSens),
+ bHasHeader(sal_True),bByRow(sal_True),bCaseSens(rSub.bCaseSens),
bUserDef(rSub.bUserDef),nUserIndex(rSub.nUserIndex),bIncludePattern(rSub.bIncludePattern),
- bInplace(TRUE),
+ bInplace(sal_True),
nDestTab(0),nDestCol(0),nDestRow(0),
aCollatorLocale( rOld.aCollatorLocale ), aCollatorAlgorithm( rOld.aCollatorAlgorithm )
{
- USHORT nNewCount = 0;
- USHORT i;
+ sal_uInt16 nNewCount = 0;
+ sal_uInt16 i;
// zuerst die Gruppen aus den Teilergebnissen
if (rSub.bDoSort)
@@ -177,7 +177,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
{
if (nNewCount < MAXSORT)
{
- bDoSort[nNewCount] = TRUE;
+ bDoSort[nNewCount] = sal_True;
nField[nNewCount] = rSub.nField[i];
bAscending[nNewCount] = rSub.bAscending;
++nNewCount;
@@ -189,15 +189,15 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
if (rOld.bDoSort[i])
{
SCCOLROW nThisField = rOld.nField[i];
- BOOL bDouble = FALSE;
- for (USHORT j=0; j<nNewCount; j++)
+ sal_Bool bDouble = sal_False;
+ for (sal_uInt16 j=0; j<nNewCount; j++)
if ( nField[j] == nThisField )
- bDouble = TRUE;
+ bDouble = sal_True;
if (!bDouble) // ein Feld nicht zweimal eintragen
{
if (nNewCount < MAXSORT)
{
- bDoSort[nNewCount] = TRUE;
+ bDoSort[nNewCount] = sal_True;
nField[nNewCount] = nThisField;
bAscending[nNewCount] = rOld.bAscending[i];
++nNewCount;
@@ -207,9 +207,9 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
for (i=nNewCount; i<MAXSORT; i++) // Rest loeschen
{
- bDoSort[i] = FALSE;
+ bDoSort[i] = sal_False;
nField[i] = 0;
- bAscending[i] = TRUE;
+ bAscending[i] = sal_True;
}
}
@@ -217,20 +217,20 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
ScSortParam::ScSortParam( const ScQueryParam& rParam, SCCOL nCol ) :
nCol1(nCol),nRow1(rParam.nRow1),nCol2(nCol),nRow2(rParam.nRow2),
- bHasHeader(rParam.bHasHeader),bByRow(TRUE),bCaseSens(rParam.bCaseSens),
+ bHasHeader(rParam.bHasHeader),bByRow(sal_True),bCaseSens(rParam.bCaseSens),
//! TODO: what about Locale and Algorithm?
- bUserDef(FALSE),nUserIndex(0),bIncludePattern(FALSE),
- bInplace(TRUE),
+ bUserDef(sal_False),nUserIndex(0),bIncludePattern(sal_False),
+ bInplace(sal_True),
nDestTab(0),nDestCol(0),nDestRow(0)
{
- bDoSort[0] = TRUE;
+ bDoSort[0] = sal_True;
nField[0] = nCol;
- bAscending[0] = TRUE;
- for (USHORT i=1; i<MAXSORT; i++)
+ bAscending[0] = sal_True;
+ for (sal_uInt16 i=1; i<MAXSORT; i++)
{
- bDoSort[i] = FALSE;
+ bDoSort[i] = sal_False;
nField[i] = 0;
- bAscending[i] = TRUE;
+ bAscending[i] = sal_True;
}
}
@@ -247,13 +247,13 @@ void ScSortParam::MoveToDest()
nRow1 = sal::static_int_cast<SCROW>( nRow1 + nDifY );
nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nDifX );
nRow2 = sal::static_int_cast<SCROW>( nRow2 + nDifY );
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
if (bByRow)
nField[i] += nDifX;
else
nField[i] += nDifY;
- bInplace = TRUE;
+ bInplace = sal_True;
}
else
{
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index d722856dc80a..6af80e51e7a2 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -100,7 +100,7 @@ void ScStyleSheetPool::SetDocument( ScDocument* pDocument )
//------------------------------------------------------------------------
SfxStyleSheetBase& ScStyleSheetPool::Make( const String& rName,
- SfxStyleFamily eFam, USHORT mask, USHORT nPos )
+ SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos )
{
// When updating styles from a template, Office 5.1 sometimes created
// files with multiple default styles.
@@ -129,7 +129,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const String& rName,
SfxStyleSheetBase* __EXPORT ScStyleSheetPool::Create(
const String& rName,
SfxStyleFamily eFamily,
- USHORT nMaskP )
+ sal_uInt16 nMaskP )
{
ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
if ( eFamily == SFX_STYLE_FAMILY_PARA && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
@@ -182,14 +182,14 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
{
// Set-Items
- if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet();
SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
aDestSub.PutExtended( rSrcSub, SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT );
rDestSet.Put( SvxSetItem( ATTR_PAGE_HEADERSET, aDestSub ) );
}
- if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxItemSet& rSrcSub = ((const SvxSetItem*) pItem)->GetItemSet();
SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
@@ -202,9 +202,9 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
// #b5017505# number format exchange list has to be handled here, too
if ( pDoc && pDoc->GetFormatExchangeList() &&
- rSourceSet.GetItemState( ATTR_VALUE_FORMAT, FALSE, &pItem ) == SFX_ITEM_SET )
+ rSourceSet.GetItemState( ATTR_VALUE_FORMAT, sal_False, &pItem ) == SFX_ITEM_SET )
{
- ULONG nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
+ sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
sal_uInt32* pNewFormat = static_cast<sal_uInt32*>(pDoc->GetFormatExchangeList()->Get( nOldFormat ));
if (pNewFormat)
rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, *pNewFormat ) );
@@ -236,7 +236,7 @@ void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool )
//------------------------------------------------------------------------
-void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, USHORT nFontType, USHORT nItemId )
+void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, sal_uInt16 nFontType, sal_uInt16 nItemId )
{
if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
{
@@ -260,12 +260,12 @@ void ScStyleSheetPool::CreateStandardStyles()
String aStr;
xub_StrLen nStrLen;
String aHelpFile;//XXX JN welcher Text???
- //ULONG nNumFmt = 0L;
+ //sal_uLong nNumFmt = 0L;
SfxItemSet* pSet = NULL;
SfxItemSet* pHFSet = NULL;
SvxSetItem* pHFSetItem = NULL;
- ScEditEngineDefaulter* pEdEngine = new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE );
- pEdEngine->SetUpdateMode( FALSE );
+ ScEditEngineDefaulter* pEdEngine = new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True );
+ pEdEngine->SetUpdateMode( sal_False );
EditTextObject* pEmptyTxtObj = pEdEngine->CreateTextObject();
EditTextObject* pTxtObj = NULL;
ScPageHFItem* pHeaderItem = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT );
@@ -442,13 +442,13 @@ void ScStyleSheetPool::CreateStandardStyles()
aBoxItem.SetLine( &aBorderLine, BOX_LINE_LEFT );
aBoxItem.SetLine( &aBorderLine, BOX_LINE_RIGHT );
aBoxItem.SetDistance( 10 ); // 0.2mm
- aBoxInfoItem.SetValid( VALID_TOP, TRUE );
- aBoxInfoItem.SetValid( VALID_BOTTOM, TRUE );
- aBoxInfoItem.SetValid( VALID_LEFT, TRUE );
- aBoxInfoItem.SetValid( VALID_RIGHT, TRUE );
- aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
- aBoxInfoItem.SetTable( FALSE );
- aBoxInfoItem.SetDist ( TRUE );
+ aBoxInfoItem.SetValid( VALID_TOP, sal_True );
+ aBoxInfoItem.SetValid( VALID_BOTTOM, sal_True );
+ aBoxInfoItem.SetValid( VALID_LEFT, sal_True );
+ aBoxInfoItem.SetValid( VALID_RIGHT, sal_True );
+ aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True );
+ aBoxInfoItem.SetTable( sal_False );
+ aBoxInfoItem.SetDist ( sal_True );
pHFSetItem = new SvxSetItem( ((SvxSetItem&)pSet->Get( ATTR_PAGE_HEADERSET ) ) );
pHFSet = &(pHFSetItem->GetItemSet());
@@ -521,12 +521,12 @@ void ScStyleSheetPool::CreateStandardStyles()
//UNUSED2008-05 if (!pStyle->IsUserDefined())
//UNUSED2008-05 {
//UNUSED2008-05 String aOldName = pStyle->GetName();
-//UNUSED2008-05 ULONG nHelpId = pStyle->GetHelpId( aHelpFile );
+//UNUSED2008-05 sal_uLong nHelpId = pStyle->GetHelpId( aHelpFile );
//UNUSED2008-05 SfxStyleFamily eFam = pStyle->GetFamily();
//UNUSED2008-05
-//UNUSED2008-05 BOOL bHelpKnown = TRUE;
+//UNUSED2008-05 sal_Bool bHelpKnown = sal_True;
//UNUSED2008-05 String aNewName;
-//UNUSED2008-05 USHORT nNameId = 0;
+//UNUSED2008-05 sal_uInt16 nNameId = 0;
//UNUSED2008-05 switch( nHelpId )
//UNUSED2008-05 {
//UNUSED2008-05 case HID_SC_SHEET_CELL_STD:
@@ -538,7 +538,7 @@ void ScStyleSheetPool::CreateStandardStyles()
//UNUSED2008-05 case HID_SC_SHEET_PAGE_REP: nNameId = STR_STYLENAME_REPORT; break;
//UNUSED2008-05 default:
//UNUSED2008-05 // 0 oder falsche (alte) HelpId
-//UNUSED2008-05 bHelpKnown = FALSE;
+//UNUSED2008-05 bHelpKnown = sal_False;
//UNUSED2008-05 }
//UNUSED2008-05 if (bHelpKnown)
//UNUSED2008-05 {
@@ -571,7 +571,7 @@ void ScStyleSheetPool::CreateStandardStyles()
//UNUSED2008-05 // saved again with a new version in a different language
//UNUSED2008-05 // (so SrcVersion doesn't help)
//UNUSED2008-05
-//UNUSED2008-05 USHORT nNewId = 0;
+//UNUSED2008-05 sal_uInt16 nNewId = 0;
//UNUSED2008-05 if ( eFam == SFX_STYLE_FAMILY_PARA )
//UNUSED2008-05 {
//UNUSED2008-05 if ( aOldName == SCSTR( STR_STYLENAME_STANDARD ) )
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index bfe3fa04a398..fbb37c1c5775 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -67,7 +67,7 @@ TYPEINIT1(ScStyleSheet, SfxStyleSheet);
ScStyleSheet::ScStyleSheet( const String& rName,
ScStyleSheetPool& rPoolP,
SfxStyleFamily eFamily,
- USHORT nMaskP )
+ sal_uInt16 nMaskP )
: SfxStyleSheet ( rName, rPoolP, eFamily, nMaskP )
, eUsage( UNKNOWN )
@@ -90,21 +90,21 @@ __EXPORT ScStyleSheet::~ScStyleSheet()
//------------------------------------------------------------------------
-BOOL __EXPORT ScStyleSheet::HasFollowSupport() const
+sal_Bool __EXPORT ScStyleSheet::HasFollowSupport() const
{
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
-BOOL __EXPORT ScStyleSheet::HasParentSupport () const
+sal_Bool __EXPORT ScStyleSheet::HasParentSupport () const
{
- BOOL bHasParentSupport = FALSE;
+ sal_Bool bHasParentSupport = sal_False;
switch ( GetFamily() )
{
- case SFX_STYLE_FAMILY_PARA: bHasParentSupport = TRUE; break;
- case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = FALSE; break;
+ case SFX_STYLE_FAMILY_PARA: bHasParentSupport = sal_True; break;
+ case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = sal_False; break;
default:
{
// added to avoid warnings
@@ -116,9 +116,9 @@ BOOL __EXPORT ScStyleSheet::HasParentSupport () const
//------------------------------------------------------------------------
-BOOL __EXPORT ScStyleSheet::SetParent( const String& rParentName )
+sal_Bool __EXPORT ScStyleSheet::SetParent( const String& rParentName )
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
String aEffName = rParentName;
SfxStyleSheetBase* pStyle = rPool.Find( aEffName, nFamily );
if (!pStyle)
@@ -207,12 +207,12 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet()
ATTR_ULSPACE );
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetTable( FALSE );
- aBoxInfoItem.SetDist( TRUE );
- aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
+ aBoxInfoItem.SetTable( sal_False );
+ aBoxInfoItem.SetDist( sal_True );
+ aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True );
// aPageItem.SetLandscape( ORIENTATION_LANDSCAPE == pPrinter->GetOrientation() );
- aPageItem.SetLandscape( FALSE );
+ aPageItem.SetLandscape( sal_False );
rHFSet.Put( aBoxInfoItem );
rHFSet.Put( aHFSizeItem );
@@ -251,7 +251,7 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet()
0 );
break;
}
- bMySet = TRUE;
+ bMySet = sal_True;
} // if ( !pSet )
if ( nHelpId == HID_SC_SHEET_CELL_ERG1 )
{
@@ -260,7 +260,7 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet()
ScDocument* pDoc = ((ScStyleSheetPool&)GetPool()).GetDocument();
if ( pDoc )
{
- ULONG nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_CURRENCY,ScGlobal::eLnge );
+ sal_uLong nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_CURRENCY,ScGlobal::eLnge );
pSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumFmt ) );
} // if ( pDoc && pDoc->IsLoadingDone() )
}
@@ -271,21 +271,21 @@ SfxItemSet& __EXPORT ScStyleSheet::GetItemSet()
//------------------------------------------------------------------------
-BOOL __EXPORT ScStyleSheet::IsUsed() const
+sal_Bool __EXPORT ScStyleSheet::IsUsed() const
{
if ( GetFamily() == SFX_STYLE_FAMILY_PARA )
{
// Always query the document to let it decide if a rescan is necessary,
// and store the state.
ScDocument* pDoc = ((ScStyleSheetPool&)rPool).GetDocument();
- if ( pDoc && pDoc->IsStyleSheetUsed( *this, TRUE ) )
+ if ( pDoc && pDoc->IsStyleSheetUsed( *this, sal_True ) )
eUsage = USED;
else
eUsage = NOTUSED;
return eUsage == USED;
}
else
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -340,11 +340,11 @@ const String& ScStyleSheet::GetFollow() const
//! Flag gesetzt und abgefragt werden.
//! Die ganze Abfrage muss raus, wenn fuer eine neue Datei-Version die Namens-Umsetzung wegfaellt.
-BOOL ScStyleSheet::SetName( const String& rNew )
+sal_Bool ScStyleSheet::SetName( const String& rNew )
{
String aFileStdName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(STRING_STANDARD));
if ( rNew == aFileStdName && aFileStdName != ScGlobal::GetRscString(STR_STYLENAME_STANDARD) )
- return FALSE;
+ return sal_False;
else
return SfxStyleSheet::SetName( rNew );
}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 439c8d9635a5..be7cab80508b 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -57,15 +57,15 @@
// -----------------------------------------------------------------------
ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
- BOOL bColInfo, BOOL bRowInfo ) :
+ sal_Bool bColInfo, sal_Bool bRowInfo ) :
aName( rNewName ),
aCodeName( rNewName ),
- bScenario( FALSE ),
- bLayoutRTL( FALSE ),
- bLoadingRTL( FALSE ),
+ bScenario( sal_False ),
+ bLayoutRTL( sal_False ),
+ bLoadingRTL( sal_False ),
nLinkMode( 0 ),
aPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ),
- bPageSizeValid( FALSE ),
+ bPageSizeValid( sal_False ),
nRepeatStartX( SCCOL_REPEAT_NONE ),
nRepeatStartY( SCROW_REPEAT_NONE ),
pTabProtection( NULL ),
@@ -79,18 +79,18 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
mpFilteredRows(new ScFlatBoolRowSegments),
pOutlineTable( NULL ),
pSheetEvents( NULL ),
- bTableAreaValid( FALSE ),
- bVisible( TRUE ),
- bStreamValid( FALSE ),
- bPendingRowHeights( FALSE ),
- bCalcNotification( FALSE ),
+ bTableAreaValid( sal_False ),
+ bVisible( sal_True ),
+ bStreamValid( sal_False ),
+ bPendingRowHeights( sal_False ),
+ bCalcNotification( sal_False ),
nTab( nNewTab ),
nRecalcLvl( 0 ),
pDocument( pDoc ),
pSearchParam( NULL ),
pSearchText ( NULL ),
pSortCollator( NULL ),
- bPrintEntireSheet( FALSE ),
+ bPrintEntireSheet( sal_False ),
pRepeatColRange( NULL ),
pRepeatRowRange( NULL ),
nLockCount( 0 ),
@@ -98,14 +98,14 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
aScenarioColor( COL_LIGHTGRAY ),
aTabBgColor( COL_AUTO ),
nScenarioFlags( 0 ),
- bActiveScenario( FALSE ),
+ bActiveScenario( sal_False ),
mbPageBreaksValid(false)
{
if (bColInfo)
{
- pColWidth = new USHORT[ MAXCOL+1 ];
- pColFlags = new BYTE[ MAXCOL+1 ];
+ pColWidth = new sal_uInt16[ MAXCOL+1 ];
+ pColFlags = new sal_uInt8[ MAXCOL+1 ];
for (SCCOL i=0; i<=MAXCOL; i++)
{
@@ -117,7 +117,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
if (bRowInfo)
{
mpRowHeights.reset(new ScFlatUInt16RowSegments(ScGlobal::nStdRowHeight));
- pRowFlags = new ScBitMaskCompressedArray< SCROW, BYTE>( MAXROW, 0);
+ pRowFlags = new ScBitMaskCompressedArray< SCROW, sal_uInt8>( MAXROW, 0);
}
if ( pDocument->IsDocVisible() )
@@ -130,11 +130,11 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer)
{
- if ( pDrawLayer->ScAddPage( nTab ) ) // FALSE (not inserted) during Undo
+ if ( pDrawLayer->ScAddPage( nTab ) ) // sal_False (not inserted) during Undo
{
pDrawLayer->ScRenamePage( nTab, aName );
- ULONG nx = (ULONG) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
- ULONG ny = (ULONG) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
+ sal_uLong nx = (sal_uLong) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
+ sal_uLong ny = (sal_uLong) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
pDrawLayer->SetPageSize( static_cast<sal_uInt16>(nTab), Size( nx, ny ), false );
}
}
@@ -189,31 +189,31 @@ const String& ScTable::GetUpperName() const
return aUpperName;
}
-void ScTable::SetVisible( BOOL bVis )
+void ScTable::SetVisible( sal_Bool bVis )
{
if (bVisible != bVis && IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
bVisible = bVis;
}
-void ScTable::SetStreamValid( BOOL bSet, BOOL bIgnoreLock )
+void ScTable::SetStreamValid( sal_Bool bSet, sal_Bool bIgnoreLock )
{
if ( bIgnoreLock || !pDocument->IsStreamValidLocked() )
bStreamValid = bSet;
}
-void ScTable::SetPendingRowHeights( BOOL bSet )
+void ScTable::SetPendingRowHeights( sal_Bool bSet )
{
bPendingRowHeights = bSet;
}
-void ScTable::SetLayoutRTL( BOOL bSet )
+void ScTable::SetLayoutRTL( sal_Bool bSet )
{
bLayoutRTL = bSet;
}
-void ScTable::SetLoadingRTL( BOOL bSet )
+void ScTable::SetLoadingRTL( sal_Bool bSet )
{
bLoadingRTL = bSet;
}
@@ -234,14 +234,14 @@ void ScTable::SetTabBgColor(const Color& rColor)
}
}
-void ScTable::SetScenario( BOOL bFlag )
+void ScTable::SetScenario( sal_Bool bFlag )
{
bScenario = bFlag;
}
-void ScTable::SetLink( BYTE nMode,
+void ScTable::SetLink( sal_uInt8 nMode,
const String& rDoc, const String& rFlt, const String& rOpt,
- const String& rTab, ULONG nRefreshDelay )
+ const String& rTab, sal_uLong nRefreshDelay )
{
nLinkMode = nMode;
aLinkDoc = rDoc; // Datei
@@ -251,14 +251,14 @@ void ScTable::SetLink( BYTE nMode,
nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
-USHORT ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
+sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bFormula, const ScMarkData* pMarkData,
- BOOL bSimpleTextImport )
+ sal_Bool bFormula, const ScMarkData* pMarkData,
+ sal_Bool bSimpleTextImport )
{
return aCol[nCol].GetOptimalColWidth( pDev, nPPTX, nPPTY, rZoomX, rZoomY,
bFormula, STD_COL_WIDTH - STD_EXTRA_WIDTH, pMarkData, bSimpleTextImport );
@@ -268,30 +268,30 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bWidth, BOOL bTotalSize )
+ sal_Bool bWidth, sal_Bool bTotalSize )
{
ScNeededSizeOptions aOptions;
- aOptions.bSkipMerged = FALSE; // zusammengefasste mitzaehlen
+ aOptions.bSkipMerged = sal_False; // zusammengefasste mitzaehlen
aOptions.bTotalSize = bTotalSize;
return aCol[nCol].GetNeededSize
( nRow, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bWidth, aOptions );
}
-BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
+sal_Bool ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
- BOOL bForce, ScProgress* pOuterProgress, ULONG nProgressStart )
+ sal_Bool bForce, ScProgress* pOuterProgress, sal_uLong nProgressStart )
{
DBG_ASSERT( nExtra==0 || bForce, "autom. OptimalHeight mit Extra" );
if ( !pDocument->IsAdjustHeightEnabled() )
{
- return FALSE;
+ return sal_False;
}
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
SCSIZE nCount = static_cast<SCSIZE>(nEndRow-nStartRow+1);
ScProgress* pProgress = NULL;
@@ -301,8 +301,8 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
pProgress = new ScProgress( pDocument->GetDocumentShell(),
ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), GetWeightedCount() );
- USHORT* pHeight = new USHORT[nCount]; // Twips !
- memset( pHeight, 0, sizeof(USHORT) * nCount );
+ sal_uInt16* pHeight = new sal_uInt16[nCount]; // Twips !
+ memset( pHeight, 0, sizeof(sal_uInt16) * nCount );
// zuerst einmal ueber den ganzen Bereich
// (mit der letzten Spalte in der Hoffnung, dass die am ehesten noch auf
@@ -313,13 +313,13 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
// daraus Standardhoehe suchen, die im unteren Bereich gilt
- USHORT nMinHeight = pHeight[nCount-1];
+ sal_uInt16 nMinHeight = pHeight[nCount-1];
SCSIZE nPos = nCount-1;
while ( nPos && pHeight[nPos-1] >= nMinHeight )
--nPos;
SCROW nMinStart = nStartRow + nPos;
- ULONG nWeightedCount = 0;
+ sal_uLong nWeightedCount = 0;
for (SCCOL nCol=0; nCol<MAXCOL; nCol++) // MAXCOL schon oben
{
aCol[nCol].GetOptimalHeight(
@@ -328,7 +328,7 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
if (pProgress)
{
- ULONG nWeight = aCol[nCol].GetWeightedCount();
+ sal_uLong nWeight = aCol[nCol].GetWeightedCount();
if (nWeight) // nochmal denselben Status muss auch nicht sein
{
nWeightedCount += nWeight;
@@ -339,12 +339,12 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
SCROW nRngStart = 0;
SCROW nRngEnd = 0;
- USHORT nLast = 0;
+ sal_uInt16 nLast = 0;
for (SCSIZE i=0; i<nCount; i++)
{
size_t nIndex;
SCROW nRegionEndRow;
- BYTE nRowFlag = pRowFlags->GetValue( nStartRow+i, nIndex, nRegionEndRow );
+ sal_uInt8 nRowFlag = pRowFlags->GetValue( nStartRow+i, nIndex, nRegionEndRow );
if ( nRegionEndRow > nEndRow )
nRegionEndRow = nEndRow;
SCSIZE nMoreRows = nRegionEndRow - ( nStartRow+i ); // additional equal rows after first
@@ -398,17 +398,17 @@ BOOL ScTable::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT nExtra,
return bChanged;
}
-BOOL ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nMaxX = 0;
SCROW nMaxY = 0;
for (SCCOL i=0; i<=MAXCOL; i++)
- if (!aCol[i].IsEmptyVisData(TRUE)) // TRUE = Notizen zaehlen auch
+ if (!aCol[i].IsEmptyVisData(sal_True)) // sal_True = Notizen zaehlen auch
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
- SCROW nColY = aCol[i].GetLastVisDataPos(TRUE);
+ SCROW nColY = aCol[i].GetLastVisDataPos(sal_True);
if (nColY > nMaxY)
nMaxY = nColY;
}
@@ -418,14 +418,14 @@ BOOL ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
return bFound;
}
-BOOL ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
+sal_Bool ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
{
- BOOL bRet = TRUE; //! merken?
+ sal_Bool bRet = sal_True; //! merken?
if (!bTableAreaValid)
{
bRet = GetPrintArea( ((ScTable*)this)->nTableAreaX,
- ((ScTable*)this)->nTableAreaY, TRUE );
- ((ScTable*)this)->bTableAreaValid = TRUE;
+ ((ScTable*)this)->nTableAreaY, sal_True );
+ ((ScTable*)this)->bTableAreaValid = sal_True;
}
rEndCol = nTableAreaX;
rEndRow = nTableAreaY;
@@ -434,13 +434,13 @@ BOOL ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
/* vorher:
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nMaxX = 0;
SCROW nMaxY = 0;
for (SCCOL i=0; i<=MAXCOL; i++)
if (!aCol[i].IsEmpty())
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
SCCOL nColY = aCol[i].GetLastEntryPos();
if (nColY > nMaxY)
@@ -454,9 +454,9 @@ BOOL ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
const SCCOL SC_COLUMNS_STOP = 30;
-BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
+sal_Bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bNotes ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nMaxX = 0;
SCROW nMaxY = 0;
SCCOL i;
@@ -464,7 +464,7 @@ BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
for (i=0; i<=MAXCOL; i++) // Daten testen
if (!aCol[i].IsEmptyVisData(bNotes))
{
- bFound = TRUE;
+ bFound = sal_True;
if (i>nMaxX)
nMaxX = i;
SCROW nColY = aCol[i].GetLastVisDataPos(bNotes);
@@ -479,7 +479,7 @@ BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
SCROW nLastRow;
if (aCol[i].GetLastVisibleAttr( nLastRow ))
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
if (nLastRow > nMaxY)
nMaxY = nLastRow;
@@ -525,10 +525,10 @@ BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
return bFound;
}
-BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
- SCCOL& rEndCol, BOOL /* bNotes */ ) const
+sal_Bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
+ SCCOL& rEndCol, sal_Bool /* bNotes */ ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nMaxX = 0;
SCCOL i;
@@ -536,7 +536,7 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
{
if (aCol[i].HasVisibleAttrIn( nStartRow, nEndRow ))
{
- bFound = TRUE;
+ bFound = sal_True;
nMaxX = i;
}
}
@@ -552,7 +552,7 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
{
if (!aCol[i].IsEmptyBlock( nStartRow, nEndRow )) //! bNotes ??????
{
- bFound = TRUE;
+ bFound = sal_True;
if (i>nMaxX)
nMaxX = i;
}
@@ -562,10 +562,10 @@ BOOL ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
return bFound;
}
-BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
- SCROW& rEndRow, BOOL bNotes ) const
+sal_Bool ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
+ SCROW& rEndRow, sal_Bool bNotes ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCROW nMaxY = 0;
SCCOL i;
@@ -574,7 +574,7 @@ BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
SCROW nLastRow;
if (aCol[i].GetLastVisibleAttr( nLastRow ))
{
- bFound = TRUE;
+ bFound = sal_True;
if (nLastRow > nMaxY)
nMaxY = nLastRow;
}
@@ -583,7 +583,7 @@ BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
for (i=nStartCol; i<=nEndCol; i++) // Daten testen
if (!aCol[i].IsEmptyVisData(bNotes))
{
- bFound = TRUE;
+ bFound = sal_True;
SCROW nColY = aCol[i].GetLastVisDataPos(bNotes);
if (nColY > nMaxY)
nMaxY = nColY;
@@ -593,9 +593,9 @@ BOOL ScTable::GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
return bFound;
}
-BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
+sal_Bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nMinX = MAXCOL;
SCROW nMinY = MAXROW;
SCCOL i;
@@ -607,7 +607,7 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
{
if (!bFound)
nMinX = i;
- bFound = TRUE;
+ bFound = sal_True;
if (nFirstRow < nMinY)
nMinY = nFirstRow;
}
@@ -623,14 +623,14 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
}
}
- BOOL bDatFound = FALSE;
+ sal_Bool bDatFound = sal_False;
for (i=0; i<=MAXCOL; i++) // Daten testen
- if (!aCol[i].IsEmptyVisData(TRUE))
+ if (!aCol[i].IsEmptyVisData(sal_True))
{
if (!bDatFound && i<nMinX)
nMinX = i;
- bFound = bDatFound = TRUE;
- SCROW nColY = aCol[i].GetFirstVisDataPos(TRUE);
+ bFound = bDatFound = sal_True;
+ SCROW nColY = aCol[i].GetFirstVisDataPos(sal_True);
if (nColY < nMinY)
nMinY = nColY;
}
@@ -641,20 +641,20 @@ BOOL ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const
}
void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow,
- BOOL bIncludeOld, bool bOnlyDown ) const
+ sal_Bool bIncludeOld, bool bOnlyDown ) const
{
- BOOL bLeft = FALSE;
- BOOL bRight = FALSE;
- BOOL bTop = FALSE;
- BOOL bBottom = FALSE;
- BOOL bChanged;
- BOOL bFound;
+ sal_Bool bLeft = sal_False;
+ sal_Bool bRight = sal_False;
+ sal_Bool bTop = sal_False;
+ sal_Bool bBottom = sal_False;
+ sal_Bool bChanged;
+ sal_Bool bFound;
SCCOL i;
SCROW nTest;
do
{
- bChanged = FALSE;
+ bChanged = sal_False;
if (!bOnlyDown)
{
@@ -667,30 +667,30 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
if (!aCol[rEndCol+1].IsEmptyBlock(nStart,nEnd))
{
++rEndCol;
- bChanged = TRUE;
- bRight = TRUE;
+ bChanged = sal_True;
+ bRight = sal_True;
}
if (rStartCol > 0)
if (!aCol[rStartCol-1].IsEmptyBlock(nStart,nEnd))
{
--rStartCol;
- bChanged = TRUE;
- bLeft = TRUE;
+ bChanged = sal_True;
+ bLeft = sal_True;
}
if (rStartRow > 0)
{
nTest = rStartRow-1;
- bFound = FALSE;
+ bFound = sal_False;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(nTest))
- bFound = TRUE;
+ bFound = sal_True;
if (bFound)
{
--rStartRow;
- bChanged = TRUE;
- bTop = TRUE;
+ bChanged = sal_True;
+ bTop = sal_True;
}
}
}
@@ -698,15 +698,15 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
if (rEndRow < MAXROW)
{
nTest = rEndRow+1;
- bFound = FALSE;
+ bFound = sal_False;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(nTest))
- bFound = TRUE;
+ bFound = sal_True;
if (bFound)
{
++rEndRow;
- bChanged = TRUE;
- bBottom = TRUE;
+ bChanged = sal_True;
+ bBottom = sal_True;
}
}
}
@@ -722,19 +722,19 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
--rEndCol;
if ( !bTop && rStartRow < MAXROW && rStartRow < rEndRow )
{
- bFound = FALSE;
+ bFound = sal_False;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(rStartRow))
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
++rStartRow;
}
if ( !bBottom && rEndRow > 0 && rStartRow < rEndRow )
{
- bFound = FALSE;
+ bFound = sal_False;
for (i=rStartCol; i<=rEndCol && !bFound; i++)
if (aCol[i].HasDataAt(rEndRow))
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
--rEndRow;
}
@@ -857,12 +857,12 @@ SCSIZE ScTable::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
return nCount;
}
-BOOL ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol )
+sal_Bool ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (SCCOL i=nStartCol; i<=nEndCol && !bFound; i++)
if (aCol[i].HasDataAt(nRow))
- bFound = TRUE;
+ bFound = sal_True;
return !bFound;
}
@@ -886,20 +886,20 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY
if (nMovX)
{
SCsCOL nNewCol = (SCsCOL) rCol;
- BOOL bThere = aCol[nNewCol].HasVisibleDataAt(rRow);
- BOOL bFnd;
+ sal_Bool bThere = aCol[nNewCol].HasVisibleDataAt(rRow);
+ sal_Bool bFnd;
if (bThere)
{
do
{
nNewCol = sal::static_int_cast<SCsCOL>( nNewCol + nMovX );
- bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : FALSE;
+ bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : sal_False;
}
while (bFnd);
nNewCol = sal::static_int_cast<SCsCOL>( nNewCol - nMovX );
if (nNewCol == (SCsCOL)rCol)
- bThere = FALSE;
+ bThere = sal_False;
}
if (!bThere)
@@ -907,7 +907,7 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY
do
{
nNewCol = sal::static_int_cast<SCsCOL>( nNewCol + nMovX );
- bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : TRUE;
+ bFnd = (nNewCol>=0 && nNewCol<=MAXCOL) ? aCol[nNewCol].HasVisibleDataAt(rRow) : sal_True;
}
while (!bFnd);
}
@@ -921,22 +921,22 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY
aCol[rCol].FindDataAreaPos(rRow,nMovY);
}
-BOOL ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
- BOOL bMarked, BOOL bUnprotected )
+sal_Bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
+ sal_Bool bMarked, sal_Bool bUnprotected )
{
if (!ValidCol(nCol) || !ValidRow(nRow))
- return FALSE;
+ return sal_False;
if (pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED))
// Skip an overlapped cell.
return false;
if (bMarked && !rMark.IsCellMarked(nCol,nRow))
- return FALSE;
+ return sal_False;
if (bUnprotected && ((const ScProtectionAttr*)
GetAttr(nCol,nRow,ATTR_PROTECTION))->GetProtection())
- return FALSE;
+ return sal_False;
if (bMarked || bUnprotected) //! auch sonst ???
{
@@ -945,22 +945,22 @@ BOOL ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
//! per Extra-Parameter steuern, nur fuer Cursor-Bewegung ???
if (RowHidden(nRow))
- return FALSE;
+ return sal_False;
if (ColHidden(nCol))
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
- BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark )
+ sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark )
{
if (bUnprotected && !IsProtected()) // Tabelle ueberhaupt geschuetzt?
- bUnprotected = FALSE;
+ bUnprotected = sal_False;
- USHORT nWrap = 0;
+ sal_uInt16 nWrap = 0;
SCsCOL nCol = rCol;
SCsROW nRow = rRow;
@@ -972,7 +972,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
if ( nMovY && bMarked )
{
- BOOL bUp = ( nMovY < 0 );
+ sal_Bool bUp = ( nMovY < 0 );
nRow = rMark.GetNextMarked( nCol, nRow, bUp );
while ( VALIDROW(nRow) &&
(RowHidden(nRow) || pDocument->HasAttrib(nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_OVERLAPPED)) )
@@ -1045,9 +1045,9 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
{
SCsROW nNextRow = pNextRows[nCol] + 1;
if ( bMarked )
- nNextRow = rMark.GetNextMarked( nCol, nNextRow, FALSE );
+ nNextRow = rMark.GetNextMarked( nCol, nNextRow, sal_False );
if ( bUnprotected )
- nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, FALSE );
+ nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, sal_False );
pNextRows[nCol] = nNextRow;
SCsROW nMinRow = MAXROW+1;
@@ -1078,9 +1078,9 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
{
SCsROW nNextRow = pNextRows[nCol] - 1;
if ( bMarked )
- nNextRow = rMark.GetNextMarked( nCol, nNextRow, TRUE );
+ nNextRow = rMark.GetNextMarked( nCol, nNextRow, sal_True );
if ( bUnprotected )
- nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, TRUE );
+ nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, sal_True );
pNextRows[nCol] = nNextRow;
SCsROW nMaxRow = -1;
@@ -1119,12 +1119,12 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
}
}
-BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark )
+sal_Bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark )
{
const ScMarkArray* pMarkArray = rMark.GetArray();
DBG_ASSERT(pMarkArray,"GetNextMarkedCell ohne MarkArray");
if ( !pMarkArray )
- return FALSE;
+ return sal_False;
++rRow; // naechste Zelle ist gesucht
@@ -1133,10 +1133,10 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
const ScMarkArray& rArray = pMarkArray[rCol];
while ( rRow <= MAXROW )
{
- SCROW nStart = (SCROW) rArray.GetNextMarked( (SCsROW) rRow, FALSE );
+ SCROW nStart = (SCROW) rArray.GetNextMarked( (SCsROW) rRow, sal_False );
if ( nStart <= MAXROW )
{
- SCROW nEnd = rArray.GetMarkEnd( nStart, FALSE );
+ SCROW nEnd = rArray.GetMarkEnd( nStart, sal_False );
ScColumnIterator aColIter( &aCol[rCol], nStart, nEnd );
SCROW nCellRow;
ScBaseCell* pCell = NULL;
@@ -1145,7 +1145,7 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE )
{
rRow = nCellRow;
- return TRUE; // Zelle gefunden
+ return sal_True; // Zelle gefunden
}
}
rRow = nEnd + 1; // naechsten markierten Bereich suchen
@@ -1157,7 +1157,7 @@ BOOL ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa
++rCol; // naechste Spalte testen
}
- return FALSE; // alle Spalten durch
+ return sal_False; // alle Spalten durch
}
void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
@@ -1185,7 +1185,7 @@ void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nR
void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScDocument* pUndoDoc, BOOL bIncludeDraw, bool bUpdateNoteCaptionPos )
+ ScDocument* pUndoDoc, sal_Bool bIncludeDraw, bool bUpdateNoteCaptionPos )
{
SCCOL i;
SCCOL iMax;
@@ -1214,7 +1214,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
SCROW nSRow = 0;
SCCOL nECol = 0;
SCROW nERow = 0;
- BOOL bRecalcPages = FALSE;
+ sal_Bool bRecalcPages = sal_False;
for ( ScRangeVec::iterator aIt = aPrintRanges.begin(), aEnd = aPrintRanges.end(); aIt != aEnd; ++aIt )
{
@@ -1230,7 +1230,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
nSCol,nSRow,nSTab, nECol,nERow,nETab ) )
{
*aIt = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
- bRecalcPages = TRUE;
+ bRecalcPages = sal_True;
}
}
@@ -1248,7 +1248,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
nSCol,nSRow,nSTab, nECol,nERow,nETab ) )
{
*pRepeatColRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
- bRecalcPages = TRUE;
+ bRecalcPages = sal_True;
nRepeatStartX = nSCol; // fuer UpdatePageBreaks
nRepeatEndX = nECol;
}
@@ -1268,7 +1268,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
nSCol,nSRow,nSTab, nECol,nERow,nETab ) )
{
*pRepeatRowRange = ScRange( nSCol, nSRow, 0, nECol, nERow, 0 );
- bRecalcPages = TRUE;
+ bRecalcPages = sal_True;
nRepeatStartY = nSRow; // fuer UpdatePageBreaks
nRepeatEndY = nERow;
}
@@ -1303,7 +1303,7 @@ void ScTable::UpdateInsertTab(SCTAB nTable)
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable);
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
//UNUSED2008-05 void ScTable::UpdateInsertTabOnlyCells(SCTAB nTable)
@@ -1311,7 +1311,7 @@ void ScTable::UpdateInsertTab(SCTAB nTable)
//UNUSED2008-05 for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTabOnlyCells(nTable);
//UNUSED2008-05 }
-void ScTable::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScTable* pRefUndo )
+void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo )
{
if (nTab > nTable) nTab--;
@@ -1322,7 +1322,7 @@ void ScTable::UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScTable* pRefUndo )
for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, NULL);
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo,
@@ -1336,10 +1336,10 @@ void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo,
}
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
-void ScTable::UpdateCompile( BOOL bForceIfNameInUse )
+void ScTable::UpdateCompile( sal_Bool bForceIfNameInUse )
{
for (SCCOL i=0; i <= MAXCOL; i++)
{
@@ -1353,17 +1353,17 @@ void ScTable::SetTabNo(SCTAB nNewTab)
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].SetTabNo(nNewTab);
}
-BOOL ScTable::IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nIndex) const
+sal_Bool ScTable::IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ sal_uInt16 nIndex) const
{
- BOOL bInUse = FALSE;
+ sal_Bool bInUse = sal_False;
for (SCCOL i = nCol1; !bInUse && (i <= nCol2) && (ValidCol(i)); i++)
bInUse = aCol[i].IsRangeNameInUse(nRow1, nRow2, nIndex);
return bInUse;
}
void ScTable::FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- std::set<USHORT>& rIndexes) const
+ std::set<sal_uInt16>& rIndexes) const
{
for (SCCOL i = nCol1; i <= nCol2 && ValidCol(i); i++)
aCol[i].FindRangeNamesInUse(nRow1, nRow2, rIndexes);
@@ -1477,14 +1477,14 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d
if ( TEXTWIDTH_DIRTY == nPixel )
{
ScNeededSizeOptions aOptions;
- aOptions.bTotalSize = TRUE;
+ aOptions.bTotalSize = sal_True;
aOptions.bFormula = bFormula;
- aOptions.bSkipMerged = FALSE;
+ aOptions.bSkipMerged = sal_False;
Fraction aZoom(1,1);
nPixel = aCol[rCol].GetNeededSize(
nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions );
- pCell->SetTextWidth( (USHORT)nPixel );
+ pCell->SetTextWidth( (sal_uInt16)nPixel );
}
long nTwips = (long) (nPixel / nPPTX);
@@ -1550,7 +1550,7 @@ void ScTable::SetRepeatColRange( const ScRange* pNew )
SET_PRINTRANGE( pRepeatColRange, pNew );
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
void ScTable::SetRepeatRowRange( const ScRange* pNew )
@@ -1558,26 +1558,26 @@ void ScTable::SetRepeatRowRange( const ScRange* pNew )
SET_PRINTRANGE( pRepeatRowRange, pNew );
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
void ScTable::ClearPrintRanges()
{
aPrintRanges.clear();
- bPrintEntireSheet = FALSE;
+ bPrintEntireSheet = sal_False;
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
void ScTable::AddPrintRange( const ScRange& rNew )
{
- bPrintEntireSheet = FALSE;
+ bPrintEntireSheet = sal_False;
if( aPrintRanges.size() < 0xFFFF )
aPrintRanges.push_back( rNew );
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
//UNUSED2009-05 void ScTable::SetPrintRange( const ScRange& rNew )
@@ -1591,11 +1591,11 @@ void ScTable::SetPrintEntireSheet()
if( !IsPrintEntireSheet() )
{
ClearPrintRanges();
- bPrintEntireSheet = TRUE;
+ bPrintEntireSheet = sal_True;
}
}
-const ScRange* ScTable::GetPrintRange(USHORT nPos) const
+const ScRange* ScTable::GetPrintRange(sal_uInt16 nPos) const
{
return (nPos < GetPrintRangeCount()) ? &aPrintRanges[ nPos ] : NULL;
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9eaaf6c070e7..3b10e51355e8 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -65,12 +65,12 @@
// STATIC DATA -----------------------------------------------------------
-BOOL ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline )
+sal_Bool ScTable::SetOutlineTable( const ScOutlineTable* pNewOutline )
{
- USHORT nOldSizeX = 0;
- USHORT nOldSizeY = 0;
- USHORT nNewSizeX = 0;
- USHORT nNewSizeY = 0;
+ sal_uInt16 nOldSizeX = 0;
+ sal_uInt16 nOldSizeY = 0;
+ sal_uInt16 nNewSizeX = 0;
+ sal_uInt16 nNewSizeY = 0;
if (pOutlineTable)
{
@@ -107,22 +107,22 @@ void ScTable::SetSheetEvents( const ScSheetEvents* pNew )
else
pSheetEvents = NULL;
- SetCalcNotification( FALSE ); // discard notifications before the events were set
+ SetCalcNotification( sal_False ); // discard notifications before the events were set
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
-void ScTable::SetCalcNotification( BOOL bSet )
+void ScTable::SetCalcNotification( sal_Bool bSet )
{
bCalcNotification = bSet;
}
-BOOL ScTable::TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize )
+sal_Bool ScTable::TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize )
{
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if ( nStartCol==0 && nEndCol==MAXCOL && pOutlineTable )
bTest = pOutlineTable->TestInsertRow(nSize);
@@ -143,7 +143,7 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
if (mpRowHeights && pRowFlags)
{
mpRowHeights->insertSegment(nStartRow, nSize, false);
- BYTE nNewFlags = pRowFlags->Insert( nStartRow, nSize);
+ sal_uInt8 nNewFlags = pRowFlags->Insert( nStartRow, nSize);
// only copy manual size flag, clear all others
if (nNewFlags && (nNewFlags != CR_MANUALSIZE))
pRowFlags->SetValue( nStartRow, nStartRow + nSize - 1,
@@ -182,7 +182,7 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize,
- BOOL* pUndoOutline )
+ sal_Bool* pUndoOutline )
{
IncRecalcLevel();
InitializeNoteCaptions();
@@ -197,7 +197,7 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
if (pOutlineTable)
if (pOutlineTable->DeleteRow( nStartRow, nSize ))
if (pUndoOutline)
- *pUndoOutline = TRUE;
+ *pUndoOutline = sal_True;
mpFilteredRows->removeSegment(nStartRow, nStartRow+nSize);
mpHiddenRows->removeSegment(nStartRow, nStartRow+nSize);
@@ -226,15 +226,15 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
}
-BOOL ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize )
+sal_Bool ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize )
{
- BOOL bTest = TRUE;
+ sal_Bool bTest = sal_True;
if ( nStartRow==0 && nEndRow==MAXROW && pOutlineTable )
bTest = pOutlineTable->TestInsertCol(nSize);
if ( nSize > static_cast<SCSIZE>(MAXCOL) )
- bTest = FALSE;
+ bTest = sal_False;
for (SCCOL i=MAXCOL; (i+static_cast<SCCOL>(nSize)>MAXCOL) && bTest; i--)
bTest = aCol[i].TestInsertCol(nStartRow, nEndRow);
@@ -294,14 +294,14 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
if (nStartCol>0) // copy old attributes
{
- USHORT nWhichArray[2];
+ sal_uInt16 nWhichArray[2];
nWhichArray[0] = ATTR_MERGE;
nWhichArray[1] = 0;
for (SCSIZE i=0; i<nSize; i++)
{
aCol[nStartCol-1].CopyToColumn( nStartRow, nEndRow, IDF_ATTRIB,
- FALSE, aCol[nStartCol+i] );
+ sal_False, aCol[nStartCol+i] );
aCol[nStartCol+i].RemoveFlags( nStartRow, nEndRow,
SC_MF_HOR | SC_MF_VER | SC_MF_AUTO );
aCol[nStartCol+i].ClearItems( nStartRow, nEndRow, nWhichArray );
@@ -314,7 +314,7 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize,
- BOOL* pUndoOutline )
+ sal_Bool* pUndoOutline )
{
IncRecalcLevel();
InitializeNoteCaptions();
@@ -330,7 +330,7 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
if (pOutlineTable)
if (pOutlineTable->DeleteCol( nStartCol, nSize ))
if (pUndoOutline)
- *pUndoOutline = TRUE;
+ *pUndoOutline = sal_True;
SCCOL nRmSize = nStartCol + static_cast<SCCOL>(nSize);
mpHiddenCols->removeSegment(nStartCol, nRmSize);
@@ -373,7 +373,7 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
}
-void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nDelFlag)
+void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nDelFlag)
{
if (nCol2 > MAXCOL) nCol2 = MAXCOL;
if (nRow2 > MAXROW) nRow2 = MAXROW;
@@ -394,7 +394,7 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
if ( IsProtected() && (nDelFlag & IDF_ATTRIB) )
{
ScPatternAttr aPattern(pDocument->GetPool());
- aPattern.GetItemSet().Put( ScProtectionAttr( FALSE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_False ) );
ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern );
}
@@ -403,7 +403,7 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
}
-void ScTable::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
+void ScTable::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark )
{
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM());
@@ -419,7 +419,7 @@ void ScTable::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
{
ScDocumentPool* pPool = pDocument->GetPool();
SfxItemSet aSet( *pPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
- aSet.Put( ScProtectionAttr( FALSE ) );
+ aSet.Put( ScProtectionAttr( sal_False ) );
SfxItemPoolCache aCache( pPool, &aSet );
ApplySelectionCache( &aCache, rMark );
}
@@ -428,7 +428,7 @@ void ScTable::DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark )
// pTable = Clipboard
void ScTable::CopyToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ScTable* pTable, BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions)
+ ScTable* pTable, sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions)
{
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
@@ -477,8 +477,8 @@ void ScTable::CopyToClip(const ScRangeList& rRanges, ScTable* pTable,
}
void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- SCsCOL nDx, SCsROW nDy, USHORT nInsFlag,
- BOOL bAsLink, BOOL bSkipAttrForEmpty, ScTable* pTable)
+ SCsCOL nDx, SCsROW nDy, sal_uInt16 nInsFlag,
+ sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty, ScTable* pTable)
{
SCCOL i;
@@ -506,7 +506,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( pTable->pRowFlags->GetValue(j-nDy) & CR_MANUALSIZE )
pRowFlags->OrValue( j, CR_MANUALSIZE);
else
- pRowFlags->AndValue( j, sal::static_int_cast<BYTE>(~CR_MANUALSIZE));
+ pRowFlags->AndValue( j, sal::static_int_cast<sal_uInt8>(~CR_MANUALSIZE));
}
}
@@ -517,7 +517,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( IsProtected() && (nInsFlag & IDF_ATTRIB) )
{
ScPatternAttr aPattern(pDocument->GetPool());
- aPattern.GetItemSet().Put( ScProtectionAttr( FALSE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_False ) );
ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern );
}
}
@@ -527,7 +527,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
void ScTable::MixData( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nFunction, BOOL bSkipEmpty, ScTable* pSrcTab )
+ sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScTable* pSrcTab )
{
for (SCCOL i=nCol1; i<=nCol2; i++)
aCol[i].MixData( nRow1, nRow2, nFunction, bSkipEmpty, pSrcTab->aCol[i] );
@@ -535,8 +535,8 @@ void ScTable::MixData( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// Markierung von diesem Dokument
-void ScTable::MixMarked( const ScMarkData& rMark, USHORT nFunction,
- BOOL bSkipEmpty, ScTable* pSrcTab )
+void ScTable::MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction,
+ sal_Bool bSkipEmpty, ScTable* pSrcTab )
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].MixMarked( rMark, nFunction, bSkipEmpty, pSrcTab->aCol[i] );
@@ -544,9 +544,9 @@ void ScTable::MixMarked( const ScMarkData& rMark, USHORT nFunction,
void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ScTable* pTransClip, USHORT nFlags, BOOL bAsLink )
+ ScTable* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink )
{
- BOOL bWasCut = pDocument->IsCutMode();
+ sal_Bool bWasCut = pDocument->IsCutMode();
ScDocument* pDestDoc = pTransClip->pDocument;
@@ -569,7 +569,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
aRef.nRow = nRow;
aRef.nTab = nTab;
aRef.InitFlags(); // -> all absolute
- aRef.SetFlag3D(TRUE);
+ aRef.SetFlag3D(sal_True);
aRef.CalcRelFromAbs( aDestPos );
ScTokenArray aArr;
aArr.AddSingleReference( aRef );
@@ -622,13 +622,13 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( !IsDefaultItem( pPattern ) )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
- if ( rSet.GetItemState( ATTR_MERGE, FALSE ) == SFX_ITEM_DEFAULT &&
- rSet.GetItemState( ATTR_MERGE_FLAG, FALSE ) == SFX_ITEM_DEFAULT &&
- rSet.GetItemState( ATTR_BORDER, FALSE ) == SFX_ITEM_DEFAULT )
+ if ( rSet.GetItemState( ATTR_MERGE, sal_False ) == SFX_ITEM_DEFAULT &&
+ rSet.GetItemState( ATTR_MERGE_FLAG, sal_False ) == SFX_ITEM_DEFAULT &&
+ rSet.GetItemState( ATTR_BORDER, sal_False ) == SFX_ITEM_DEFAULT )
{
// no borders or merge items involved - use pattern as-is
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
- pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), *pPattern, TRUE );
+ pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), *pPattern, sal_True );
}
else
{
@@ -662,7 +662,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScMergeFlagAttr& rOldFlag = (const ScMergeFlagAttr&)rSet.Get(ATTR_MERGE_FLAG);
if (rOldFlag.IsOverlapped())
{
- INT16 nNewFlags = rOldFlag.GetValue() & ~( SC_MF_HOR | SC_MF_VER );
+ sal_Int16 nNewFlags = rOldFlag.GetValue() & ~( SC_MF_HOR | SC_MF_VER );
if ( nNewFlags )
rNewSet.Put( ScMergeFlagAttr( nNewFlags ) );
else
@@ -671,7 +671,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1),
- static_cast<SCROW>(nCol-nCol1), aNewPattern, TRUE);
+ static_cast<SCROW>(nCol-nCol1), aNewPattern, sal_True);
}
}
}
@@ -718,9 +718,9 @@ void ScTable::StartListeningInArea( SCCOL nCol1, SCROW nRow1,
void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nFlags, BOOL bMarked, ScTable* pDestTab,
+ sal_uInt16 nFlags, sal_Bool bMarked, ScTable* pDestTab,
const ScMarkData* pMarkData,
- BOOL bAsLink, BOOL bColRowFlags)
+ sal_Bool bAsLink, sal_Bool bColRowFlags)
{
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
@@ -736,8 +736,8 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
bool bFlagChange = false;
- BOOL bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
- BOOL bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
+ sal_Bool bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
+ sal_Bool bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
if (bWidth||bHeight)
{
@@ -845,13 +845,13 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nFlags, BOOL bMarked, ScTable* pDestTab,
+ sal_uInt16 nFlags, sal_Bool bMarked, ScTable* pDestTab,
const ScMarkData* pMarkData)
{
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
- BOOL bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
- BOOL bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
+ sal_Bool bWidth = (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth);
+ sal_Bool bHeight = (nCol1==0 && nCol2==MAXCOL && mpRowHeights && pDestTab->mpRowHeights);
if (bWidth||bHeight)
IncRecalcLevel();
@@ -862,7 +862,7 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
aCol[i].UndoToColumn(nRow1, nRow2, nFlags, bMarked, pDestTab->aCol[i],
pMarkData);
else
- aCol[i].CopyToColumn(0, MAXROW, IDF_FORMULA, FALSE, pDestTab->aCol[i]);
+ aCol[i].CopyToColumn(0, MAXROW, IDF_FORMULA, sal_False, pDestTab->aCol[i]);
}
if (bWidth||bHeight)
@@ -892,7 +892,7 @@ void ScTable::CopyUpdated( const ScTable* pPosTab, ScTable* pDestTab ) const
void ScTable::InvalidateTableArea()
{
- bTableAreaValid = FALSE;
+ bTableAreaValid = sal_False;
}
void ScTable::InvalidatePageBreaks()
@@ -916,7 +916,7 @@ void ScTable::CopyScenarioFrom( const ScTable* pSrcTab )
aCol[i].CopyScenarioFrom( pSrcTab->aCol[i] );
}
-void ScTable::MarkScenarioIn( ScMarkData& rDestMark, USHORT nNeededBits ) const
+void ScTable::MarkScenarioIn( ScMarkData& rDestMark, sal_uInt16 nNeededBits ) const
{
DBG_ASSERT( bScenario, "bScenario == FALSE" );
@@ -927,7 +927,7 @@ void ScTable::MarkScenarioIn( ScMarkData& rDestMark, USHORT nNeededBits ) const
aCol[i].MarkScenarioIn( rDestMark );
}
-BOOL ScTable::HasScenarioRange( const ScRange& rRange ) const
+sal_Bool ScTable::HasScenarioRange( const ScRange& rRange ) const
{
DBG_ASSERT( bScenario, "bScenario == FALSE" );
@@ -944,16 +944,16 @@ BOOL ScTable::HasScenarioRange( const ScRange& rRange ) const
if (pList)
{
- ULONG nCount = pList->Count();
- for ( ULONG j = 0; j < nCount; j++ )
+ sal_uLong nCount = pList->Count();
+ for ( sal_uLong j = 0; j < nCount; j++ )
{
ScRange* pR = pList->GetObject( j );
if ( pR->Intersects( aTabRange ) )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void ScTable::InvalidateScenarioRanges()
@@ -971,19 +971,19 @@ const ScRangeList* ScTable::GetScenarioRanges() const
((ScTable*)this)->pScenarioRanges = new ScRangeList;
ScMarkData aMark;
MarkScenarioIn( aMark, 0 ); // immer
- aMark.FillRangeListWithMarks( pScenarioRanges, FALSE );
+ aMark.FillRangeListWithMarks( pScenarioRanges, sal_False );
}
return pScenarioRanges;
}
-BOOL ScTable::TestCopyScenarioTo( const ScTable* pDestTab ) const
+sal_Bool ScTable::TestCopyScenarioTo( const ScTable* pDestTab ) const
{
DBG_ASSERT( bScenario, "bScenario == FALSE" );
if (!pDestTab->IsProtected())
- return TRUE;
+ return sal_True;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for (SCCOL i=0; i<=MAXCOL && bOk; i++)
bOk = aCol[i].TestCopyScenarioTo( pDestTab->aCol[i] );
return bOk;
@@ -1001,7 +1001,7 @@ void ScTable::PutCell( SCCOL nCol, SCROW nRow, ScBaseCell* pCell )
}
-void ScTable::PutCell( SCCOL nCol, SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell )
+void ScTable::PutCell( SCCOL nCol, SCROW nRow, sal_uLong nFormatIndex, ScBaseCell* pCell )
{
if (ValidColRow(nCol,nRow))
{
@@ -1022,7 +1022,7 @@ void ScTable::PutCell( const ScAddress& rPos, ScBaseCell* pCell )
}
-//UNUSED2009-05 void ScTable::PutCell( const ScAddress& rPos, ULONG nFormatIndex, ScBaseCell* pCell )
+//UNUSED2009-05 void ScTable::PutCell( const ScAddress& rPos, sal_uLong nFormatIndex, ScBaseCell* pCell )
//UNUSED2009-05 {
//UNUSED2009-05 if (pCell)
//UNUSED2009-05 aCol[rPos.Col()].Insert( rPos.Row(), nFormatIndex, pCell );
@@ -1031,14 +1031,14 @@ void ScTable::PutCell( const ScAddress& rPos, ScBaseCell* pCell )
//UNUSED2009-05 }
-BOOL ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const String& rString,
+sal_Bool ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const String& rString,
SvNumberFormatter* pFormatter, bool bDetectNumberFormat )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].SetString(
nRow, nTabP, rString, pDocument->GetAddressConvention(), pFormatter, bDetectNumberFormat );
else
- return FALSE;
+ return sal_False;
}
@@ -1076,7 +1076,7 @@ double ScTable::GetValue( SCCOL nCol, SCROW nRow )
void ScTable::GetFormula( SCCOL nCol, SCROW nRow, String& rFormula,
- BOOL bAsciiExport )
+ sal_Bool bAsciiExport )
{
if (ValidColRow(nCol,nRow))
aCol[nCol].GetFormula( nRow, rFormula, bAsciiExport );
@@ -1176,46 +1176,46 @@ void ScTable::GetLastDataPos(SCCOL& rCol, SCROW& rRow) const
}
-BOOL ScTable::HasData( SCCOL nCol, SCROW nRow )
+sal_Bool ScTable::HasData( SCCOL nCol, SCROW nRow )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].HasDataAt( nRow );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScTable::HasStringData( SCCOL nCol, SCROW nRow )
+sal_Bool ScTable::HasStringData( SCCOL nCol, SCROW nRow )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].HasStringData( nRow );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScTable::HasValueData( SCCOL nCol, SCROW nRow )
+sal_Bool ScTable::HasValueData( SCCOL nCol, SCROW nRow )
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].HasValueData( nRow );
else
- return FALSE;
+ return sal_False;
}
-BOOL ScTable::HasStringCells( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScTable::HasStringCells( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow ) const
{
if ( ValidCol(nEndCol) )
for ( SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++ )
if (aCol[nCol].HasStringCells(nStartRow, nEndRow))
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-//UNUSED2008-05 USHORT ScTable::GetErrCode( SCCOL nCol, SCROW nRow ) const
+//UNUSED2008-05 sal_uInt16 ScTable::GetErrCode( SCCOL nCol, SCROW nRow ) const
//UNUSED2008-05 {
//UNUSED2008-05 if (ValidColRow( nCol, nRow ))
//UNUSED2008-05 return aCol[nCol].GetErrCode( nRow );
@@ -1232,8 +1232,8 @@ void ScTable::SetDirtyVar()
void ScTable::SetDirty()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetDirty();
pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1242,8 +1242,8 @@ void ScTable::SetDirty()
void ScTable::SetDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
SCCOL nCol2 = rRange.aEnd.Col();
for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++)
aCol[i].SetDirty( rRange );
@@ -1253,8 +1253,8 @@ void ScTable::SetDirty( const ScRange& rRange )
void ScTable::SetTableOpDirty( const ScRange& rRange )
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // no multiple recalculation
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // no multiple recalculation
SCCOL nCol2 = rRange.aEnd.Col();
for (SCCOL i=rRange.aStart.Col(); i<=nCol2; i++)
aCol[i].SetTableOpDirty( rRange );
@@ -1264,8 +1264,8 @@ void ScTable::SetTableOpDirty( const ScRange& rRange )
void ScTable::SetDirtyAfterLoad()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetDirtyAfterLoad();
pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1274,8 +1274,8 @@ void ScTable::SetDirtyAfterLoad()
void ScTable::SetRelNameDirty()
{
- BOOL bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDocument->GetAutoCalc();
+ pDocument->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].SetRelNameDirty();
pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1332,7 +1332,7 @@ void ScTable::ResetChanged( const ScRange& rRange )
// Attribute
-const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, USHORT nWhich ) const
+const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].GetAttr( nRow, nWhich );
@@ -1341,7 +1341,7 @@ const SfxPoolItem* ScTable::GetAttr( SCCOL nCol, SCROW nRow, USHORT nWhich ) con
}
-ULONG ScTable::GetNumberFormat( SCCOL nCol, SCROW nRow ) const
+sal_uLong ScTable::GetNumberFormat( SCCOL nCol, SCROW nRow ) const
{
if (ValidColRow(nCol,nRow))
return aCol[nCol].GetNumberFormat( nRow );
@@ -1371,7 +1371,7 @@ const ScPatternAttr* ScTable::GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, S
}
-bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USHORT nMask ) const
+bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nMask ) const
{
bool bFound = false;
for (SCCOL i=nCol1; i<=nCol2 && !bFound; i++)
@@ -1380,7 +1380,7 @@ bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
}
-//UNUSED2009-05 BOOL ScTable::HasLines( const ScRange& rRange, Rectangle& rSizes ) const
+//UNUSED2009-05 sal_Bool ScTable::HasLines( const ScRange& rRange, Rectangle& rSizes ) const
//UNUSED2009-05 {
//UNUSED2009-05 SCCOL nCol1 = rRange.aStart.Col();
//UNUSED2009-05 SCROW nRow1 = rRange.aStart.Row();
@@ -1389,34 +1389,34 @@ bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
//UNUSED2009-05 PutInOrder( nCol1, nCol2 );
//UNUSED2009-05 PutInOrder( nRow1, nRow2 );
//UNUSED2009-05
-//UNUSED2009-05 BOOL bFound = FALSE;
+//UNUSED2009-05 sal_Bool bFound = sal_False;
//UNUSED2009-05 for (SCCOL i=nCol1; i<=nCol2; i++)
//UNUSED2009-05 if (aCol[i].HasLines( nRow1, nRow2, rSizes, (i==nCol1), (i==nCol2) ))
-//UNUSED2009-05 bFound = TRUE;
+//UNUSED2009-05 bFound = sal_True;
//UNUSED2009-05
//UNUSED2009-05 return bFound;
//UNUSED2009-05 }
-BOOL ScTable::HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const
+sal_Bool ScTable::HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const
{
- BOOL bFound=FALSE;
+ sal_Bool bFound=sal_False;
for (SCCOL i=0; i<=MAXCOL && !bFound; i++)
bFound |= aCol[i].HasAttribSelection( rMark, nMask );
return bFound;
}
-BOOL ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
+sal_Bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
- BOOL bRefresh, BOOL bAttrs )
+ sal_Bool bRefresh, sal_Bool bAttrs )
{
if (!(ValidCol(nStartCol) && ValidCol(rEndCol)))
{
DBG_ERRORFILE("ScTable::ExtendMerge: invalid column number");
- return FALSE;
+ return sal_False;
}
- BOOL bFound=FALSE;
+ sal_Bool bFound=sal_False;
SCCOL nOldEndX = rEndCol;
SCROW nOldEndY = rEndRow;
for (SCCOL i=nStartCol; i<=nOldEndX; i++)
@@ -1425,14 +1425,14 @@ BOOL ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
}
-BOOL ScTable::IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const
+sal_Bool ScTable::IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const
{
if (!(ValidCol(nCol1) && ValidCol(nCol2)))
{
DBG_ERRORFILE("ScTable::IsBlockEmpty: invalid column number");
- return FALSE;
+ return sal_False;
}
- BOOL bEmpty = TRUE;
+ sal_Bool bEmpty = sal_True;
for (SCCOL i=nCol1; i<=nCol2 && bEmpty; i++)
bEmpty = aCol[i].IsEmptyBlock( nRow1, nRow2, bIgnoreNotes );
return bEmpty;
@@ -1444,10 +1444,10 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
{
// Rueckgabe = neues nArrY
- BYTE nRotDir = pPattern->GetRotateDir( pCondSet );
+ sal_uInt8 nRotDir = pPattern->GetRotateDir( pCondSet );
if ( nRotDir != SC_ROTDIR_NONE )
{
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
if ( nCol+1 < nX1 ) // column to the left
bHit = ( nRotDir != SC_ROTDIR_LEFT );
else if ( nCol > nX2+1 ) // column to the right
@@ -1475,7 +1475,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
{
if (!RowHidden(nRow))
{
- BOOL bHitOne = TRUE;
+ sal_Bool bHitOne = sal_True;
if ( nCol > nX2+1 )
{
// reicht die gedrehte Zelle bis in den sichtbaren Bereich?
@@ -1489,7 +1489,7 @@ SCSIZE ScTable::FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCO
nWidth += GetColWidth( nTouchedCol );
}
if ( nTouchedCol > nX2 )
- bHitOne = FALSE;
+ bHitOne = sal_False;
}
if (bHitOne)
@@ -1532,13 +1532,13 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
while ( pPattern )
{
const SfxPoolItem* pCondItem;
- if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, TRUE, &pCondItem )
+ if ( pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, sal_True, &pCondItem )
== SFX_ITEM_SET )
{
// alle Formate durchgehen, damit die Zellen nicht einzeln
// angeschaut werden muessen
- ULONG nIndex = ((const SfxUInt32Item*)pCondItem)->GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item*)pCondItem)->GetValue();
ScConditionalFormatList* pList = pDocument->GetCondFormList();
ScStyleSheetPool* pStylePool = pDocument->GetStyleSheetPool();
if (pList && pStylePool && nIndex)
@@ -1546,8 +1546,8 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
const ScConditionalFormat* pFormat = pList->GetFormat(nIndex);
if ( pFormat )
{
- USHORT nEntryCount = pFormat->Count();
- for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++)
+ sal_uInt16 nEntryCount = pFormat->Count();
+ for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++)
{
String aStyleName = pFormat->GetEntry(nEntry)->GetStyle();
if (aStyleName.Len())
@@ -1577,62 +1577,62 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
}
}
-BOOL ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const
+sal_Bool ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const
{
// nix:0, mitte:1, unten:2, links:4, oben:8, rechts:16, offen:32
- USHORT nEdges;
+ sal_uInt16 nEdges;
if ( nCol1 == nCol2 )
{ // linke und rechte Spalte
- const USHORT n = 4 | 16;
+ const sal_uInt16 n = 4 | 16;
nEdges = aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2, n );
// nicht (4 und 16) oder 1 oder 32
if ( nEdges && (((nEdges & n) != n) || (nEdges & 33)) )
- return TRUE; // linke oder rechte Kante fehlt oder offen
+ return sal_True; // linke oder rechte Kante fehlt oder offen
}
else
{ // linke Spalte
nEdges = aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2, 4 );
// nicht 4 oder 1 oder 32
if ( nEdges && (((nEdges & 4) != 4) || (nEdges & 33)) )
- return TRUE; // linke Kante fehlt oder offen
+ return sal_True; // linke Kante fehlt oder offen
// rechte Spalte
nEdges = aCol[nCol2].GetBlockMatrixEdges( nRow1, nRow2, 16 );
// nicht 16 oder 1 oder 32
if ( nEdges && (((nEdges & 16) != 16) || (nEdges & 33)) )
- return TRUE; // rechte Kante fehlt oder offen
+ return sal_True; // rechte Kante fehlt oder offen
}
if ( nRow1 == nRow2 )
{ // obere und untere Zeile
- BOOL bOpen = FALSE;
- const USHORT n = 2 | 8;
+ sal_Bool bOpen = sal_False;
+ const sal_uInt16 n = 2 | 8;
for ( SCCOL i=nCol1; i<=nCol2; i++)
{
nEdges = aCol[i].GetBlockMatrixEdges( nRow1, nRow1, n );
if ( nEdges )
{
if ( (nEdges & n) != n )
- return TRUE; // obere oder untere Kante fehlt
+ return sal_True; // obere oder untere Kante fehlt
if ( nEdges & 4 )
- bOpen = TRUE; // linke Kante oeffnet, weitersehen
+ bOpen = sal_True; // linke Kante oeffnet, weitersehen
else if ( !bOpen )
- return TRUE; // es gibt was, was nicht geoeffnet wurde
+ return sal_True; // es gibt was, was nicht geoeffnet wurde
if ( nEdges & 16 )
- bOpen = FALSE; // rechte Kante schliesst
+ bOpen = sal_False; // rechte Kante schliesst
}
}
if ( bOpen )
- return TRUE; // es geht noch weiter
+ return sal_True; // es geht noch weiter
}
else
{
- USHORT j, n;
+ sal_uInt16 j, n;
SCROW nR;
// erst obere Zeile, dann untere Zeile
for ( j=0, nR=nRow1, n=8; j<2; j++, nR=nRow2, n=2 )
{
- BOOL bOpen = FALSE;
+ sal_Bool bOpen = sal_False;
for ( SCCOL i=nCol1; i<=nCol2; i++)
{
nEdges = aCol[i].GetBlockMatrixEdges( nR, nR, n );
@@ -1641,61 +1641,61 @@ BOOL ScTable::HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
// in oberere Zeile keine obere Kante bzw.
// in unterer Zeile keine untere Kante
if ( (nEdges & n) != n )
- return TRUE;
+ return sal_True;
if ( nEdges & 4 )
- bOpen = TRUE; // linke Kante oeffnet, weitersehen
+ bOpen = sal_True; // linke Kante oeffnet, weitersehen
else if ( !bOpen )
- return TRUE; // es gibt was, was nicht geoeffnet wurde
+ return sal_True; // es gibt was, was nicht geoeffnet wurde
if ( nEdges & 16 )
- bOpen = FALSE; // rechte Kante schliesst
+ bOpen = sal_False; // rechte Kante schliesst
}
}
if ( bOpen )
- return TRUE; // es geht noch weiter
+ return sal_True; // es geht noch weiter
}
}
- return FALSE;
+ return sal_False;
}
-BOOL ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
+sal_Bool ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
{
- BOOL bFound=FALSE;
+ sal_Bool bFound=sal_False;
for (SCCOL i=0; i<=MAXCOL && !bFound; i++)
bFound |= aCol[i].HasSelectionMatrixFragment(rMark);
return bFound;
}
-BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
- SCROW nRow2, BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+sal_Bool ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
+ SCROW nRow2, sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
if ( !ValidColRow( nCol2, nRow2 ) )
{
DBG_ERRORFILE("IsBlockEditable: invalid column or row");
if (pOnlyNotBecauseOfMatrix)
- *pOnlyNotBecauseOfMatrix = FALSE;
- return FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
+ return sal_False;
}
- BOOL bIsEditable = TRUE;
+ sal_Bool bIsEditable = sal_True;
if ( nLockCount )
- bIsEditable = FALSE;
+ bIsEditable = sal_False;
else if ( IsProtected() && !pDocument->IsScenario(nTab) )
{
- if((bIsEditable = !HasAttrib( nCol1, nRow1, nCol2, nRow2, HASATTR_PROTECTED )) != FALSE)
+ if((bIsEditable = !HasAttrib( nCol1, nRow1, nCol2, nRow2, HASATTR_PROTECTED )) != sal_False)
{
// If Sheet is protected and cells are not protected then
// check the active scenario protect flag if this range is
// on the active scenario range. Note the 'copy back' must also
// be set to apply protection.
- USHORT nScenTab = nTab+1;
+ sal_uInt16 nScenTab = nTab+1;
while(pDocument->IsScenario(nScenTab))
{
ScRange aEditRange(nCol1, nRow1, nScenTab, nCol2, nRow2, nScenTab);
if(pDocument->IsActiveScenario(nScenTab) && pDocument->HasScenarioRange(nScenTab, aEditRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nScenTab,nFlags);
bIsEditable = !((nFlags & SC_SCENARIO_PROTECT) && (nFlags & SC_SCENARIO_TWOWAY));
break;
@@ -1719,7 +1719,7 @@ BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
ScRange aEditRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab);
if(pDocument->HasScenarioRange(nTab, aEditRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nTab,nFlags);
bIsEditable = !(nFlags & SC_SCENARIO_PROTECT);
}
@@ -1729,46 +1729,46 @@ BOOL ScTable::IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
{
if ( HasBlockMatrixFragment( nCol1, nRow1, nCol2, nRow2 ) )
{
- bIsEditable = FALSE;
+ bIsEditable = sal_False;
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = TRUE;
+ *pOnlyNotBecauseOfMatrix = sal_True;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
return bIsEditable;
}
-BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
- BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
+sal_Bool ScTable::IsSelectionEditable( const ScMarkData& rMark,
+ sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
- BOOL bIsEditable = TRUE;
+ sal_Bool bIsEditable = sal_True;
if ( nLockCount )
- bIsEditable = FALSE;
+ bIsEditable = sal_False;
else if ( IsProtected() && !pDocument->IsScenario(nTab) )
{
- if((bIsEditable = !HasAttribSelection( rMark, HASATTR_PROTECTED )) != FALSE)
+ if((bIsEditable = !HasAttribSelection( rMark, HASATTR_PROTECTED )) != sal_False)
{
// If Sheet is protected and cells are not protected then
// check the active scenario protect flag if this area is
// in the active scenario range.
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
- ULONG nRangeCount = aRanges.Count();
+ rMark.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_uLong nRangeCount = aRanges.Count();
SCTAB nScenTab = nTab+1;
while(pDocument->IsScenario(nScenTab) && bIsEditable)
{
if(pDocument->IsActiveScenario(nScenTab))
{
- for (ULONG i=0; i<nRangeCount && bIsEditable; i++)
+ for (sal_uLong i=0; i<nRangeCount && bIsEditable; i++)
{
ScRange aRange = *aRanges.GetObject(i);
if(pDocument->HasScenarioRange(nScenTab, aRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nScenTab,nFlags);
bIsEditable = !((nFlags & SC_SCENARIO_PROTECT) && (nFlags & SC_SCENARIO_TWOWAY));
}
@@ -1791,14 +1791,14 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
if(pDocument->IsTabProtected(nActualTab))
{
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
- ULONG nRangeCount = aRanges.Count();
- for (ULONG i=0; i<nRangeCount && bIsEditable; i++)
+ rMark.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_uLong nRangeCount = aRanges.Count();
+ for (sal_uLong i=0; i<nRangeCount && bIsEditable; i++)
{
ScRange aRange = *aRanges.GetObject(i);
if(pDocument->HasScenarioRange(nTab, aRange))
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
pDocument->GetScenarioFlags(nTab,nFlags);
bIsEditable = !(nFlags & SC_SCENARIO_PROTECT);
}
@@ -1809,15 +1809,15 @@ BOOL ScTable::IsSelectionEditable( const ScMarkData& rMark,
{
if ( HasSelectionMatrixFragment( rMark ) )
{
- bIsEditable = FALSE;
+ bIsEditable = sal_False;
if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = TRUE;
+ *pOnlyNotBecauseOfMatrix = sal_True;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
}
else if ( pOnlyNotBecauseOfMatrix )
- *pOnlyNotBecauseOfMatrix = FALSE;
+ *pOnlyNotBecauseOfMatrix = sal_False;
return bIsEditable;
}
@@ -1840,7 +1840,7 @@ void ScTable::UnlockTable()
}
-void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, BOOL bDeep ) const
+void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, sal_Bool bDeep ) const
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].MergeSelectionPattern( rState, rMark, bDeep );
@@ -1848,7 +1848,7 @@ void ScTable::MergeSelectionPattern( ScMergePatternState& rState, const ScMarkDa
void ScTable::MergePatternArea( ScMergePatternState& rState, SCCOL nCol1, SCROW nRow1,
- SCCOL nCol2, SCROW nRow2, BOOL bDeep ) const
+ SCCOL nCol2, SCROW nRow2, sal_Bool bDeep ) const
{
for (SCCOL i=nCol1; i<=nCol2; i++)
aCol[i].MergePatternArea( rState, nRow1, nRow2, bDeep );
@@ -1941,7 +1941,7 @@ void ScTable::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData&
void ScTable::ApplySelectionLineStyle( const ScMarkData& rMark,
- const SvxBorderLine* pLine, BOOL bColorOnly )
+ const SvxBorderLine* pLine, sal_Bool bColorOnly )
{
if ( bColorOnly && !pLine )
return;
@@ -1960,12 +1960,12 @@ const ScStyleSheet* ScTable::GetStyle( SCCOL nCol, SCROW nRow ) const
}
-const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const
+const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const
{
- rFound = FALSE;
+ rFound = sal_False;
- BOOL bEqual = TRUE;
- BOOL bColFound;
+ sal_Bool bEqual = sal_True;
+ sal_Bool bColFound;
const ScStyleSheet* pStyle = NULL;
const ScStyleSheet* pNewStyle;
@@ -1976,9 +1976,9 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, BOOL& r
pNewStyle = aCol[i].GetSelectionStyle( rMark, bColFound );
if (bColFound)
{
- rFound = TRUE;
+ rFound = sal_True;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = sal_False; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -1987,13 +1987,13 @@ const ScStyleSheet* ScTable::GetSelectionStyle( const ScMarkData& rMark, BOOL& r
}
-const ScStyleSheet* ScTable::GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow1,
+const ScStyleSheet* ScTable::GetAreaStyle( sal_Bool& rFound, SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2 ) const
{
- rFound = FALSE;
+ rFound = sal_False;
- BOOL bEqual = TRUE;
- BOOL bColFound;
+ sal_Bool bEqual = sal_True;
+ sal_Bool bColFound;
const ScStyleSheet* pStyle = NULL;
const ScStyleSheet* pNewStyle;
@@ -2003,9 +2003,9 @@ const ScStyleSheet* ScTable::GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow
pNewStyle = aCol[i].GetAreaStyle(bColFound, nRow1, nRow2);
if (bColFound)
{
- rFound = TRUE;
+ rFound = sal_True;
if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
- bEqual = FALSE; // unterschiedliche
+ bEqual = sal_False; // unterschiedliche
pStyle = pNewStyle;
}
}
@@ -2014,17 +2014,17 @@ const ScStyleSheet* ScTable::GetAreaStyle( BOOL& rFound, SCCOL nCol1, SCROW nRow
}
-BOOL ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const
+sal_Bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const
{
- BOOL bIsUsed = FALSE;
+ sal_Bool bIsUsed = sal_False;
for ( SCCOL i=0; i<=MAXCOL; i++ )
{
if ( aCol[i].IsStyleSheetUsed( rStyle, bGatherAllStyles ) )
{
if ( !bGatherAllStyles )
- return TRUE;
- bIsUsed = TRUE;
+ return sal_True;
+ bIsUsed = sal_True;
}
}
@@ -2032,7 +2032,7 @@ BOOL ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyle
}
-void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRemoved,
+void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY )
@@ -2051,17 +2051,17 @@ void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, BOOL bRem
SCROW nEndRow = aData.mnRow2;
if (aData.mbValue)
- SetOptimalHeight(nRow, nEndRow, 0, pDev, nPPTX, nPPTY, rZoomX, rZoomY, FALSE);
+ SetOptimalHeight(nRow, nEndRow, 0, pDev, nPPTX, nPPTY, rZoomX, rZoomY, sal_False);
nRow = nEndRow + 1;
}
}
-BOOL ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- INT16 nFlags )
+sal_Bool ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ sal_Int16 nFlags )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
for (SCCOL i = nStartCol; i <= nEndCol; i++)
bChanged |= aCol[i].ApplyFlags(nStartRow, nEndRow, nFlags);
@@ -2069,10 +2069,10 @@ BOOL ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
}
-BOOL ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- INT16 nFlags )
+sal_Bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ sal_Int16 nFlags )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
for (SCCOL i = nStartCol; i <= nEndCol; i++)
bChanged |= aCol[i].RemoveFlags(nStartRow, nEndRow, nFlags);
@@ -2080,7 +2080,7 @@ BOOL ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
}
-void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, BOOL bPutToPool )
+void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, sal_Bool bPutToPool )
{
if (ValidColRow(nCol,nRow))
aCol[nCol].SetPattern( nRow, rAttr, bPutToPool );
@@ -2101,14 +2101,14 @@ void ScTable::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& r
}
-void ScTable::ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark )
+void ScTable::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark )
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].ChangeSelectionIndent( bIncrement, rMark );
}
-void ScTable::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark )
+void ScTable::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark )
{
for (SCCOL i=0; i<=MAXCOL; i++)
aCol[i].ClearSelectionItems( pWhich, rMark );
@@ -2117,7 +2117,7 @@ void ScTable::ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark
// Spaltenbreiten / Zeilenhoehen
-void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth )
+void ScTable::SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth )
{
if (VALIDCOL(nCol) && pColWidth)
{
@@ -2147,7 +2147,7 @@ void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth )
}
-void ScTable::SetRowHeight( SCROW nRow, USHORT nNewHeight )
+void ScTable::SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight )
{
if (VALIDROW(nRow) && mpRowHeights)
{
@@ -2211,10 +2211,10 @@ bool lcl_pixelSizeChanged(
}
-BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeight,
+sal_Bool ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
double /* nPPTX */, double nPPTY )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights)
{
IncRecalcLevel();
@@ -2225,18 +2225,18 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
nNewHeight = ScGlobal::nStdRowHeight;
}
- BOOL bSingle = FALSE; // TRUE = process every row for its own
+ sal_Bool bSingle = sal_False; // sal_True = process every row for its own
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer)
if (pDrawLayer->HasObjectsInRows( nTab, nStartRow, nEndRow ))
- bSingle = TRUE;
+ bSingle = sal_True;
if (bSingle)
{
ScFlatUInt16RowSegments::RangeData aData;
mpRowHeights->getRangeData(nStartRow, aData);
if (nNewHeight == aData.mnValue && nEndRow <= aData.mnRow2)
- bSingle = FALSE; // no difference in this range
+ bSingle = sal_False; // no difference in this range
}
if (bSingle)
{
@@ -2266,9 +2266,9 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
{
SCROW nMid = (nStartRow+nEndRow) / 2;
if (SetRowHeightRange( nStartRow, nMid, nNewHeight, 1.0, 1.0 ))
- bChanged = TRUE;
+ bChanged = sal_True;
if (SetRowHeightRange( nMid+1, nEndRow, nNewHeight, 1.0, 1.0 ))
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -2302,7 +2302,7 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
return bChanged;
}
-void ScTable::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeight )
+void ScTable::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight )
{
if (!ValidRow(nStartRow) || !ValidRow(nEndRow) || !mpRowHeights)
return;
@@ -2313,14 +2313,14 @@ void ScTable::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeigh
mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
}
-void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual )
+void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bManual )
{
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && pRowFlags)
{
if (bManual)
pRowFlags->OrValue( nStartRow, nEndRow, CR_MANUALSIZE);
else
- pRowFlags->AndValue( nStartRow, nEndRow, sal::static_int_cast<BYTE>(~CR_MANUALSIZE));
+ pRowFlags->AndValue( nStartRow, nEndRow, sal::static_int_cast<sal_uInt8>(~CR_MANUALSIZE));
}
else
{
@@ -2329,7 +2329,7 @@ void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual )
}
-USHORT ScTable::GetColWidth( SCCOL nCol ) const
+sal_uInt16 ScTable::GetColWidth( SCCOL nCol ) const
{
DBG_ASSERT(VALIDCOL(nCol),"Falsche Spaltennummer");
@@ -2341,22 +2341,22 @@ USHORT ScTable::GetColWidth( SCCOL nCol ) const
return pColWidth[nCol];
}
else
- return (USHORT) STD_COL_WIDTH;
+ return (sal_uInt16) STD_COL_WIDTH;
}
-USHORT ScTable::GetOriginalWidth( SCCOL nCol ) const // immer die eingestellte
+sal_uInt16 ScTable::GetOriginalWidth( SCCOL nCol ) const // immer die eingestellte
{
DBG_ASSERT(VALIDCOL(nCol),"Falsche Spaltennummer");
if (VALIDCOL(nCol) && pColWidth)
return pColWidth[nCol];
else
- return (USHORT) STD_COL_WIDTH;
+ return (sal_uInt16) STD_COL_WIDTH;
}
-USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
+sal_uInt16 ScTable::GetCommonWidth( SCCOL nEndCol )
{
// get the width that is used in the largest continuous column range (up to nEndCol)
@@ -2366,8 +2366,8 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
nEndCol = MAXCOL;
}
- USHORT nMaxWidth = 0;
- USHORT nMaxCount = 0;
+ sal_uInt16 nMaxWidth = 0;
+ sal_uInt16 nMaxCount = 0;
SCCOL nRangeStart = 0;
while ( nRangeStart <= nEndCol )
{
@@ -2376,8 +2376,8 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
++nRangeStart;
if ( nRangeStart <= nEndCol )
{
- USHORT nThisCount = 0;
- USHORT nThisWidth = pColWidth[nRangeStart];
+ sal_uInt16 nThisCount = 0;
+ sal_uInt16 nThisWidth = pColWidth[nRangeStart];
SCCOL nRangeEnd = nRangeStart;
while ( nRangeEnd <= nEndCol && pColWidth[nRangeEnd] == nThisWidth )
{
@@ -2403,7 +2403,7 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
}
-USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
+sal_uInt16 ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
{
DBG_ASSERT(VALIDROW(nRow),"Invalid row number");
@@ -2441,18 +2441,18 @@ USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool
*pStartRow = nRow;
if (pEndRow)
*pEndRow = nRow;
- return (USHORT) ScGlobal::nStdRowHeight;
+ return (sal_uInt16) ScGlobal::nStdRowHeight;
}
}
-ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
+sal_uLong ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
{
DBG_ASSERT(VALIDROW(nStartRow) && VALIDROW(nEndRow),"Falsche Zeilennummer");
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights)
{
- ULONG nHeight = 0;
+ sal_uLong nHeight = 0;
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
{
@@ -2468,17 +2468,17 @@ ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
return nHeight;
}
else
- return (ULONG) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight);
+ return (sal_uLong) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight);
}
-ULONG ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const
+sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const
{
DBG_ASSERT(VALIDROW(nStartRow) && VALIDROW(nEndRow),"Falsche Zeilennummer");
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && mpRowHeights)
{
- ULONG nHeight = 0;
+ sal_uLong nHeight = 0;
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
{
@@ -2488,25 +2488,25 @@ ULONG ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale
if (nLastRow > nEndRow)
nLastRow = nEndRow;
sal_uInt32 nThisHeight = mpRowHeights->getSumValue(nRow, nLastRow);
- nHeight += static_cast<ULONG>(nThisHeight * fScale);
+ nHeight += static_cast<sal_uLong>(nThisHeight * fScale);
}
nRow = nLastRow + 1;
}
return nHeight;
}
else
- return (ULONG) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight * fScale);
+ return (sal_uLong) ((nEndRow - nStartRow + 1) * ScGlobal::nStdRowHeight * fScale);
}
-USHORT ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if hidden
+sal_uInt16 ScTable::GetOriginalHeight( SCROW nRow ) const // non-0 even if hidden
{
DBG_ASSERT(VALIDROW(nRow),"wrong row number");
if (VALIDROW(nRow) && mpRowHeights)
return mpRowHeights->getValue(nRow);
else
- return (USHORT) ScGlobal::nStdRowHeight;
+ return (sal_uInt16) ScGlobal::nStdRowHeight;
}
@@ -2657,7 +2657,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow, bool bSetFlags)
if (nEndRow > nRow2)
nEndRow = nRow2;
- BOOL bChanged = ( bWasVis != bShow );
+ sal_Bool bChanged = ( bWasVis != bShow );
if ( bChanged && bSetFlags )
{
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
@@ -2717,7 +2717,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
if (nEndRow > nRow2)
nEndRow = nRow2;
- BOOL bChanged = ( bWasVis != bShow );
+ sal_Bool bChanged = ( bWasVis != bShow );
if ( bChanged && bHasObjects )
{
if (pDrawLayer)
@@ -2773,7 +2773,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
}
-void ScTable::SetColFlags( SCCOL nCol, BYTE nNewFlags )
+void ScTable::SetColFlags( SCCOL nCol, sal_uInt8 nNewFlags )
{
if (VALIDCOL(nCol) && pColFlags)
pColFlags[nCol] = nNewFlags;
@@ -2784,7 +2784,7 @@ void ScTable::SetColFlags( SCCOL nCol, BYTE nNewFlags )
}
-void ScTable::SetRowFlags( SCROW nRow, BYTE nNewFlags )
+void ScTable::SetRowFlags( SCROW nRow, sal_uInt8 nNewFlags )
{
if (VALIDROW(nRow) && pRowFlags)
pRowFlags->SetValue( nRow, nNewFlags);
@@ -2795,7 +2795,7 @@ void ScTable::SetRowFlags( SCROW nRow, BYTE nNewFlags )
}
-void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, BYTE nNewFlags )
+void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, sal_uInt8 nNewFlags )
{
if (VALIDROW(nStartRow) && VALIDROW(nEndRow) && pRowFlags)
pRowFlags->SetValue( nStartRow, nEndRow, nNewFlags);
@@ -2806,7 +2806,7 @@ void ScTable::SetRowFlags( SCROW nStartRow, SCROW nEndRow, BYTE nNewFlags )
}
-BYTE ScTable::GetColFlags( SCCOL nCol ) const
+sal_uInt8 ScTable::GetColFlags( SCCOL nCol ) const
{
if (VALIDCOL(nCol) && pColFlags)
return pColFlags[nCol];
@@ -2815,7 +2815,7 @@ BYTE ScTable::GetColFlags( SCCOL nCol ) const
}
-BYTE ScTable::GetRowFlags( SCROW nRow ) const
+sal_uInt8 ScTable::GetRowFlags( SCROW nRow ) const
{
if (VALIDROW(nRow) && pRowFlags)
return pRowFlags->GetValue(nRow);
@@ -2829,7 +2829,7 @@ SCROW ScTable::GetLastFlaggedRow() const
SCROW nLastFound = 0;
if (pRowFlags)
{
- SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<BYTE>(CR_ALL) );
+ SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<sal_uInt8>(CR_ALL) );
if (ValidRow(nRow))
nLastFound = nRow;
}
@@ -2887,24 +2887,24 @@ SCROW ScTable::GetLastChangedRow() const
}
-BOOL ScTable::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, BOOL bShow )
+sal_Bool ScTable::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, sal_Bool bShow )
{
if (pOutlineTable && pColFlags)
{
- ScBitMaskCompressedArray< SCCOLROW, BYTE> aArray( MAXCOL, pColFlags, MAXCOLCOUNT);
+ ScBitMaskCompressedArray< SCCOLROW, sal_uInt8> aArray( MAXCOL, pColFlags, MAXCOLCOUNT);
return pOutlineTable->GetColArray()->ManualAction( nStartCol, nEndCol, bShow, *this, true );
}
else
- return FALSE;
+ return sal_False;
}
-BOOL ScTable::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, BOOL bShow )
+sal_Bool ScTable::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, sal_Bool bShow )
{
if (pOutlineTable && pRowFlags)
return pOutlineTable->GetRowArray()->ManualAction( nStartRow, nEndRow, bShow, *this, false );
else
- return FALSE;
+ return sal_False;
}
@@ -2978,13 +2978,13 @@ short DiffSign( T a, T b )
void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
{
- BOOL bSizeChanged = FALSE;
- BOOL bMissed = FALSE;
+ sal_Bool bSizeChanged = sal_False;
+ sal_Bool bMissed = sal_False;
SCCOL nCol;
SCROW nRow;
SCROW i;
- BOOL bFound;
+ sal_Bool bFound;
ScOutlineArray* pArray;
ScBaseCell* pCell;
ScRange aRef;
@@ -2997,9 +2997,9 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
// Zeilen
SCROW nCount = nEndRow-nStartRow+1;
- BOOL* pUsed = new BOOL[nCount];
+ sal_Bool* pUsed = new sal_Bool[nCount];
for (i=0; i<nCount; i++)
- pUsed[i] = FALSE;
+ pUsed[i] = sal_False;
for (nCol=nStartCol; nCol<=nEndCol; nCol++)
if (!aCol[nCol].IsEmptyData())
aCol[nCol].FindUsed( nStartRow, nEndRow, pUsed );
@@ -3008,7 +3008,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
for (nRow=nStartRow; nRow<=nEndRow; nRow++)
if (pUsed[nRow-nStartRow])
{
- bFound = FALSE;
+ bFound = sal_False;
for (nCol=nStartCol; nCol<=nEndCol && !bFound; nCol++)
if (!aCol[nCol].IsEmptyData())
{
@@ -3024,10 +3024,10 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
if (pArray->Insert( aRef.aStart.Row(), aRef.aEnd.Row(), bSizeChanged ))
{
// ApplyPatternArea( nStartCol, nRow, nEndCol, nRow, aBoldPattern );
- bFound = TRUE;
+ bFound = sal_True;
}
else
- bMissed = TRUE;
+ bMissed = sal_True;
}
}
}
@@ -3041,7 +3041,7 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
if (!aCol[nCol].IsEmptyData())
{
- bFound = FALSE;
+ bFound = sal_False;
ScColumnIterator aIter( &aCol[nCol], nStartRow, nEndRow );
while ( aIter.Next( nRow, pCell ) && !bFound )
{
@@ -3055,10 +3055,10 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
if (pArray->Insert( aRef.aStart.Col(), aRef.aEnd.Col(), bSizeChanged ))
{
// ApplyPatternArea( nCol, nStartRow, nCol, nEndRow, aBoldPattern );
- bFound = TRUE;
+ bFound = sal_True;
}
else
- bMissed = TRUE;
+ bMissed = sal_True;
}
}
}
@@ -3075,7 +3075,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
ScAddress aSrc( nStartCol, nStartRow, nTab );
ScAddress aDest( nDestCol, nDestRow, nDestTab );
ScRange aRange( aSrc, aDest );
- BOOL bThisTab = ( nDestTab == nTab );
+ sal_Bool bThisTab = ( nDestTab == nTab );
SCROW nDestY = nDestRow;
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
{
@@ -3102,12 +3102,12 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
if (bThisTab)
{
PutCell( nDestX, nDestY, pCell );
- SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ), TRUE );
+ SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ), sal_True );
}
else
{
pDocument->PutCell( aDest, pCell );
- pDocument->SetPattern( aDest, *GetPattern( nCol, nRow ), TRUE );
+ pDocument->SetPattern( aDest, *GetPattern( nCol, nRow ), sal_True );
}
++nDestX;
@@ -3117,7 +3117,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
}
-BOOL ScTable::RefVisible(ScFormulaCell* pCell)
+sal_Bool ScTable::RefVisible(ScFormulaCell* pCell)
{
ScRange aRef;
@@ -3131,12 +3131,12 @@ BOOL ScTable::RefVisible(ScFormulaCell* pCell)
nEndRow = ::std::numeric_limits<SCROW>::max();
if (!ValidRow(nEndRow) || nEndRow < aRef.aEnd.Row())
- return TRUE; // at least partly visible
- return FALSE; // completely invisible
+ return sal_True; // at least partly visible
+ return sal_False; // completely invisible
}
}
- return TRUE; // irgendwie anders
+ return sal_True; // irgendwie anders
}
@@ -3173,13 +3173,13 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
// #i102616# actions that modify the draw page size count as sheet modification
// (exception: InitDrawLayer)
if (bResetStreamValid && IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
-ULONG ScTable::GetRowOffset( SCROW nRow ) const
+sal_uLong ScTable::GetRowOffset( SCROW nRow ) const
{
- ULONG n = 0;
+ sal_uLong n = 0;
if ( mpHiddenRows && mpRowHeights )
{
if (nRow == 0)
@@ -3200,7 +3200,7 @@ ULONG ScTable::GetRowOffset( SCROW nRow ) const
return n;
}
-SCROW ScTable::GetRowForHeight(ULONG nHeight) const
+SCROW ScTable::GetRowForHeight(sal_uLong nHeight) const
{
sal_uInt32 nSum = 0;
@@ -3227,9 +3227,9 @@ SCROW ScTable::GetRowForHeight(ULONG nHeight) const
}
-ULONG ScTable::GetColOffset( SCCOL nCol ) const
+sal_uLong ScTable::GetColOffset( SCCOL nCol ) const
{
- ULONG n = 0;
+ sal_uLong n = 0;
if ( pColWidth )
{
SCCOL i;
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 8828d8ab2449..1c5fd71243cc 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -66,7 +66,7 @@
// STATIC DATA -----------------------------------------------------------
-const USHORT nMaxSorts = 3; // maximale Anzahl Sortierkriterien in aSortParam
+const sal_uInt16 nMaxSorts = 3; // maximale Anzahl Sortierkriterien in aSortParam
struct ScSortInfo
{
@@ -74,7 +74,7 @@ struct ScSortInfo
SCCOLROW nOrg;
DECL_FIXEDMEMPOOL_NEWDEL( ScSortInfo );
};
-const USHORT nMemPoolSortInfo = (0x8000 - 64) / sizeof(ScSortInfo);
+const sal_uInt16 nMemPoolSortInfo = (0x8000 - 64) / sizeof(ScSortInfo);
IMPL_FIXEDMEMPOOL_NEWDEL( ScSortInfo, nMemPoolSortInfo, nMemPoolSortInfo )
// END OF STATIC DATA -----------------------------------------------------
@@ -86,14 +86,14 @@ private:
ScSortInfo** pppInfo[nMaxSorts];
SCSIZE nCount;
SCCOLROW nStart;
- USHORT nUsedSorts;
+ sal_uInt16 nUsedSorts;
public:
- ScSortInfoArray( USHORT nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
+ ScSortInfoArray( sal_uInt16 nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
nCount( nInd2 - nInd1 + 1 ), nStart( nInd1 ),
nUsedSorts( Min( nSorts, nMaxSorts ) )
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
ScSortInfo** ppInfo = new ScSortInfo* [nCount];
for ( SCSIZE j = 0; j < nCount; j++ )
@@ -103,7 +103,7 @@ public:
}
~ScSortInfoArray()
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
ScSortInfo** ppInfo = pppInfo[nSort];
for ( SCSIZE j = 0; j < nCount; j++ )
@@ -111,13 +111,13 @@ public:
delete [] ppInfo;
}
}
- ScSortInfo* Get( USHORT nSort, SCCOLROW nInd )
+ ScSortInfo* Get( sal_uInt16 nSort, SCCOLROW nInd )
{ return (pppInfo[nSort])[ nInd - nStart ]; }
void Swap( SCCOLROW nInd1, SCCOLROW nInd2 )
{
SCSIZE n1 = static_cast<SCSIZE>(nInd1 - nStart);
SCSIZE n2 = static_cast<SCSIZE>(nInd2 - nStart);
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
ScSortInfo** ppInfo = pppInfo[nSort];
ScSortInfo* pTmp = ppInfo[n1];
@@ -125,7 +125,7 @@ public:
ppInfo[n2] = pTmp;
}
}
- USHORT GetUsedSorts() { return nUsedSorts; }
+ sal_uInt16 GetUsedSorts() { return nUsedSorts; }
ScSortInfo** GetFirstArray() { return pppInfo[0]; }
SCCOLROW GetStart() { return nStart; }
SCSIZE GetCount() { return nCount; }
@@ -133,13 +133,13 @@ public:
ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
{
- USHORT nUsedSorts = 1;
+ sal_uInt16 nUsedSorts = 1;
while ( nUsedSorts < nMaxSorts && aSortParam.bDoSort[nUsedSorts] )
nUsedSorts++;
ScSortInfoArray* pArray = new ScSortInfoArray( nUsedSorts, nInd1, nInd2 );
if ( aSortParam.bByRow )
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
SCCOL nCol = static_cast<SCCOL>(aSortParam.nField[nSort]);
ScColumn* pCol = &aCol[nCol];
@@ -154,7 +154,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
}
else
{
- for ( USHORT nSort = 0; nSort < nUsedSorts; nSort++ )
+ for ( sal_uInt16 nSort = 0; nSort < nUsedSorts; nSort++ )
{
SCROW nRow = aSortParam.nField[nSort];
for ( SCCOL nCol = static_cast<SCCOL>(nInd1);
@@ -170,7 +170,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
}
-BOOL ScTable::IsSortCollatorGlobal() const
+sal_Bool ScTable::IsSortCollatorGlobal() const
{
return pSortCollator == ScGlobal::GetCollator() ||
pSortCollator == ScGlobal::GetCaseCollator();
@@ -208,7 +208,7 @@ void ScTable::DestroySortCollator()
void ScTable::SortReorder( ScSortInfoArray* pArray, ScProgress& rProgress )
{
- BOOL bByRow = aSortParam.bByRow;
+ sal_Bool bByRow = aSortParam.bByRow;
SCSIZE nCount = pArray->GetCount();
SCCOLROW nStart = pArray->GetStart();
ScSortInfo** ppInfo = pArray->GetFirstArray();
@@ -239,7 +239,7 @@ void ScTable::SortReorder( ScSortInfoArray* pArray, ScProgress& rProgress )
}
}
-short ScTable::CompareCell( USHORT nSort,
+short ScTable::CompareCell( sal_uInt16 nSort,
ScBaseCell* pCell1, SCCOL nCell1Col, SCROW nCell1Row,
ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row )
{
@@ -263,12 +263,12 @@ short ScTable::CompareCell( USHORT nSort,
{
if (pCell2)
{
- BOOL bStr1 = ( eType1 != CELLTYPE_VALUE );
+ sal_Bool bStr1 = ( eType1 != CELLTYPE_VALUE );
if ( eType1 == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell1)->IsValue() )
- bStr1 = FALSE;
- BOOL bStr2 = ( eType2 != CELLTYPE_VALUE );
+ bStr1 = sal_False;
+ sal_Bool bStr2 = ( eType2 != CELLTYPE_VALUE );
if ( eType2 == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell2)->IsValue() )
- bStr2 = FALSE;
+ bStr2 = sal_False;
if ( bStr1 && bStr2 ) // nur Strings untereinander als String vergleichen!
{
@@ -282,7 +282,7 @@ short ScTable::CompareCell( USHORT nSort,
((ScStringCell*)pCell2)->GetString(aStr2);
else
GetString(nCell2Col, nCell2Row, aStr2);
- BOOL bUserDef = aSortParam.bUserDef;
+ sal_Bool bUserDef = aSortParam.bUserDef;
if (bUserDef)
{
ScUserListData* pData =
@@ -296,7 +296,7 @@ short ScTable::CompareCell( USHORT nSort,
nRes = sal::static_int_cast<short>( pData->ICompare(aStr1, aStr2) );
}
else
- bUserDef = FALSE;
+ bUserDef = sal_False;
}
if (!bUserDef)
@@ -346,7 +346,7 @@ short ScTable::CompareCell( USHORT nSort,
short ScTable::Compare( ScSortInfoArray* pArray, SCCOLROW nIndex1, SCCOLROW nIndex2 )
{
short nRes;
- USHORT nSort = 0;
+ sal_uInt16 nSort = 0;
do
{
ScSortInfo* pInfo1 = pArray->Get( nSort, nIndex1 );
@@ -425,8 +425,8 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
if (pPat1 != pPat2)
{
- SetPattern(nCol1, nRow, *pPat2, TRUE);
- SetPattern(nCol2, nRow, *pPat1, TRUE);
+ SetPattern(nCol1, nRow, *pPat2, sal_True);
+ SetPattern(nCol2, nRow, *pPat1, sal_True);
}
}
}
@@ -443,8 +443,8 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
if (pPat1 != pPat2)
{
- SetPattern(nCol, nRow1, *pPat2, TRUE);
- SetPattern(nCol, nRow2, *pPat1, TRUE);
+ SetPattern(nCol, nRow1, *pPat2, sal_True);
+ SetPattern(nCol, nRow2, *pPat1, sal_True);
}
}
}
@@ -465,7 +465,7 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2)
{
short nRes;
- USHORT nSort = 0;
+ sal_uInt16 nSort = 0;
if (aSortParam.bByRow)
{
do
@@ -490,14 +490,14 @@ short ScTable::Compare(SCCOLROW nIndex1, SCCOLROW nIndex2)
return nRes;
}
-BOOL ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) // ueber aSortParam
+sal_Bool ScTable::IsSorted( SCCOLROW nStart, SCCOLROW nEnd ) // ueber aSortParam
{
for (SCCOLROW i=nStart; i<nEnd; i++)
{
if (Compare( i, i+1 ) > 0)
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScTable::DecoladeRow( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2 )
@@ -511,7 +511,7 @@ void ScTable::DecoladeRow( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2 )
}
}
-void ScTable::Sort(const ScSortParam& rSortParam, BOOL bKeepQuery)
+void ScTable::Sort(const ScSortParam& rSortParam, sal_Bool bKeepQuery)
{
aSortParam = rSortParam;
InitSortCollator( rSortParam );
@@ -566,7 +566,7 @@ void ScTable::Sort(const ScSortParam& rSortParam, BOOL bKeepQuery)
// Testen, ob beim Loeschen von Zwischenergebnissen andere Daten mit geloescht werden
// (fuer Hinweis-Box)
-BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
+sal_Bool ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
{
SCCOL nStartCol = rParam.nCol1;
SCROW nStartRow = rParam.nRow1 + 1; // Header
@@ -577,7 +577,7 @@ BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
SCROW nRow;
ScBaseCell* pCell;
- BOOL bWillDelete = FALSE;
+ sal_Bool bWillDelete = sal_False;
for ( nCol=nStartCol; nCol<=nEndCol && !bWillDelete; nCol++ )
{
ScColumnIterator aIter( &aCol[nCol],nStartRow,nEndRow );
@@ -589,7 +589,7 @@ BOOL ScTable::TestRemoveSubTotals( const ScSubTotalParam& rParam )
for (SCCOL nTestCol=0; nTestCol<=MAXCOL; nTestCol++)
if (nTestCol<nStartCol || nTestCol>nEndCol)
if (aCol[nTestCol].HasDataAt(nRow))
- bWillDelete = TRUE;
+ bWillDelete = sal_True;
}
}
}
@@ -634,14 +634,14 @@ void ScTable::RemoveSubTotals( ScSubTotalParam& rParam )
void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
{
const ScPatternAttr* pPattern = pTab->GetPattern( nCol, nRow );
- if ( pPattern->GetItemSet().GetItemState( ATTR_VALUE_FORMAT, FALSE )
+ if ( pPattern->GetItemSet().GetItemState( ATTR_VALUE_FORMAT, sal_False )
== SFX_ITEM_SET )
{
ScPatternAttr aNewPattern( *pPattern );
SfxItemSet& rSet = aNewPattern.GetItemSet();
rSet.ClearItem( ATTR_VALUE_FORMAT );
rSet.ClearItem( ATTR_LANGUAGE_FORMAT );
- pTab->SetPattern( nCol, nRow, aNewPattern, TRUE );
+ pTab->SetPattern( nCol, nRow, aNewPattern, sal_True );
}
}
@@ -649,7 +649,7 @@ void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
// at least MSC needs this at linkage level to be able to use it in a template
typedef struct lcl_ScTable_DoSubTotals_RowEntry
{
- USHORT nGroupNo;
+ sal_uInt16 nGroupNo;
SCROW nSubStartRow;
SCROW nDestRow;
SCROW nFuncStart;
@@ -659,13 +659,13 @@ typedef struct lcl_ScTable_DoSubTotals_RowEntry
// neue Zwischenergebnisse
// rParam.nRow2 wird veraendert !
-BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
+sal_Bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
SCCOL nStartCol = rParam.nCol1;
SCROW nStartRow = rParam.nRow1 + 1; // Header
SCCOL nEndCol = rParam.nCol2;
SCROW nEndRow = rParam.nRow2; // wird veraendert
- USHORT i;
+ sal_uInt16 i;
// Leerzeilen am Ende weglassen,
// damit alle Ueberlaeufe (MAXROW) bei InsertRow gefunden werden (#35180#)
@@ -673,16 +673,16 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
SCSIZE nEmpty = GetEmptyLinesInBlock( nStartCol, nStartRow, nEndCol, nEndRow, DIR_BOTTOM );
nEndRow -= nEmpty;
- USHORT nLevelCount = 0; // Anzahl Gruppierungen
- BOOL bDoThis = TRUE;
+ sal_uInt16 nLevelCount = 0; // Anzahl Gruppierungen
+ sal_Bool bDoThis = sal_True;
for (i=0; i<MAXSUBTOTAL && bDoThis; i++)
if (rParam.bGroupActive[i])
nLevelCount = i+1;
else
- bDoThis = FALSE;
+ bDoThis = sal_False;
if (nLevelCount==0) // nichts tun
- return TRUE;
+ return sal_True;
SCCOL* nGroupCol = rParam.nField; // Spalten nach denen
// gruppiert wird
@@ -690,12 +690,12 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
// #44444# Durch (leer) als eigene Kategorie muss immer auf
// Teilergebniszeilen aus den anderen Spalten getestet werden
// (frueher nur, wenn eine Spalte mehrfach vorkam)
- BOOL bTestPrevSub = ( nLevelCount > 1 );
+ sal_Bool bTestPrevSub = ( nLevelCount > 1 );
String aSubString;
String aOutString;
- BOOL bIgnoreCase = !rParam.bCaseSens;
+ sal_Bool bIgnoreCase = !rParam.bCaseSens;
String *pCompString[MAXSUBTOTAL]; // Pointer wegen Compiler-Problemen
for (i=0; i<MAXSUBTOTAL; i++)
@@ -706,7 +706,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
ScStyleSheet* pStyle = (ScStyleSheet*) pDocument->GetStyleSheetPool()->Find(
ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA );
- BOOL bSpaceLeft = TRUE; // Erfolg beim Einfuegen?
+ sal_Bool bSpaceLeft = sal_True; // Erfolg beim Einfuegen?
// #90279# For performance reasons collect formula entries so their
// references don't have to be tested for updates each time a new row is
@@ -714,9 +714,9 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
RowEntry aRowEntry;
::std::vector< RowEntry > aRowVector;
- for (USHORT nLevel=0; nLevel<=nLevelCount && bSpaceLeft; nLevel++) // incl. Gesamtergebnis
+ for (sal_uInt16 nLevel=0; nLevel<=nLevelCount && bSpaceLeft; nLevel++) // incl. Gesamtergebnis
{
- BOOL bTotal = ( nLevel == nLevelCount );
+ sal_Bool bTotal = ( nLevel == nLevelCount );
aRowEntry.nGroupNo = bTotal ? 0 : (nLevelCount-nLevel-1);
// how many results per level
@@ -735,16 +735,16 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
*pCompString[i] = aSubString;
} // aSubString bleibt auf dem letzten stehen
- BOOL bBlockVis = FALSE; // Gruppe eingeblendet?
+ sal_Bool bBlockVis = sal_False; // Gruppe eingeblendet?
aRowEntry.nSubStartRow = nStartRow;
for (SCROW nRow=nStartRow; nRow<=nEndRow+1 && bSpaceLeft; nRow++)
{
- BOOL bChanged;
+ sal_Bool bChanged;
if (nRow>nEndRow)
- bChanged = TRUE;
+ bChanged = sal_True;
else
{
- bChanged = FALSE;
+ bChanged = sal_False;
if (!bTotal)
{
String aString;
@@ -767,7 +767,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
if ( iEntry->nDestRow == nRow )
{
- bChanged = FALSE;
+ bChanged = sal_False;
break;
}
}
@@ -783,7 +783,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
bSpaceLeft = pDocument->InsertRow( 0, nTab, MAXCOL, nTab,
aRowEntry.nDestRow, 1 );
DBShowRow( aRowEntry.nDestRow, bBlockVis );
- bBlockVis = FALSE;
+ bBlockVis = sal_False;
if ( rParam.bPagebreak && nRow < MAXROW &&
aRowEntry.nSubStartRow != nStartRow && nLevel == 0)
SetRowBreak(aRowEntry.nSubStartRow, false, true);
@@ -814,7 +814,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
if (!aOutString.Len())
aOutString = ScGlobal::GetRscString( STR_EMPTYDATA );
aOutString += ' ';
- USHORT nStrId = STR_TABLE_ERGEBNIS;
+ sal_uInt16 nStrId = STR_TABLE_ERGEBNIS;
if ( nResCount == 1 )
switch ( eResFunc[0] )
{
@@ -917,25 +917,25 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
}
-BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- BOOL* pSpecial /* =NULL */ , ScBaseCell* pCell /* =NULL */ ,
- BOOL* pbTestEqualCondition /* = NULL */ )
+sal_Bool ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
+ sal_Bool* pSpecial /* =NULL */ , ScBaseCell* pCell /* =NULL */ ,
+ sal_Bool* pbTestEqualCondition /* = NULL */ )
{
if (!rParam.GetEntry(0).bDoQuery)
- return TRUE;
+ return sal_True;
//---------------------------------------------------------------
const SCSIZE nFixedBools = 32;
- BOOL aBool[nFixedBools];
- BOOL aTest[nFixedBools];
+ sal_Bool aBool[nFixedBools];
+ sal_Bool aTest[nFixedBools];
SCSIZE nEntryCount = rParam.GetEntryCount();
- BOOL* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new BOOL[nEntryCount] );
- BOOL* pTest = ( nEntryCount <= nFixedBools ? &aTest[0] : new BOOL[nEntryCount] );
+ sal_Bool* pPasst = ( nEntryCount <= nFixedBools ? &aBool[0] : new sal_Bool[nEntryCount] );
+ sal_Bool* pTest = ( nEntryCount <= nFixedBools ? &aTest[0] : new sal_Bool[nEntryCount] );
long nPos = -1;
SCSIZE i = 0;
- BOOL bMatchWholeCell = pDocument->GetDocOptions().IsMatchWholeCell();
+ sal_Bool bMatchWholeCell = pDocument->GetDocOptions().IsMatchWholeCell();
CollatorWrapper* pCollator = (rParam.bCaseSens ? ScGlobal::GetCaseCollator() :
ScGlobal::GetCollator());
::utl::TransliterationWrapper* pTransliteration = (rParam.bCaseSens ?
@@ -948,8 +948,8 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
if ( !pCell || i > 0 )
pCell = GetCell( static_cast<SCCOL>(rEntry.nField), nRow );
- BOOL bOk = FALSE;
- BOOL bTestEqual = FALSE;
+ sal_Bool bOk = sal_False;
+ sal_Bool bTestEqual = sal_False;
if ( pSpecial && pSpecial[i] )
{
@@ -1051,24 +1051,24 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
if( rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN
|| rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH
|| rEntry.eOp == SC_DOES_NOT_BEGIN_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH )
- bMatchWholeCell = FALSE;
+ bMatchWholeCell = sal_False;
if ( pCell )
{
if (pCell->GetCellType() != CELLTYPE_NOTE)
{
- ULONG nFormat = GetNumberFormat( static_cast<SCCOL>(rEntry.nField), nRow );
+ sal_uLong nFormat = GetNumberFormat( static_cast<SCCOL>(rEntry.nField), nRow );
ScCellFormat::GetInputString( pCell, nFormat, aCellStr, *(pDocument->GetFormatTable()) );
}
}
else
GetInputString( static_cast<SCCOL>(rEntry.nField), nRow, aCellStr );
- BOOL bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
+ sal_Bool bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
|| (rEntry.eOp == SC_NOT_EQUAL) || (rEntry.eOp == SC_CONTAINS)
|| (rEntry.eOp == SC_DOES_NOT_CONTAIN) || (rEntry.eOp == SC_BEGINS_WITH)
|| (rEntry.eOp == SC_ENDS_WITH) || (rEntry.eOp == SC_DOES_NOT_BEGIN_WITH)
|| (rEntry.eOp == SC_DOES_NOT_END_WITH)));
- BOOL bTestRegExp = (pbTestEqualCondition && rParam.bRegExp
+ sal_Bool bTestRegExp = (pbTestEqualCondition && rParam.bRegExp
&& ((rEntry.eOp == SC_LESS_EQUAL)
|| (rEntry.eOp == SC_GREATER_EQUAL)));
if ( bRealRegExp || bTestRegExp )
@@ -1077,22 +1077,22 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
xub_StrLen nEnd = aCellStr.Len();
// from 614 on, nEnd is behind the found text
- BOOL bMatch = FALSE;
+ sal_Bool bMatch = sal_False;
if ( rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH )
{
nEnd = 0;
nStart = aCellStr.Len();
- bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens )
+ bMatch = (sal_Bool) rEntry.GetSearchTextPtr( rParam.bCaseSens )
->SearchBkwrd( aCellStr, &nStart, &nEnd );
}
else
{
- bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens )
+ bMatch = (sal_Bool) rEntry.GetSearchTextPtr( rParam.bCaseSens )
->SearchFrwrd( aCellStr, &nStart, &nEnd );
}
if ( bMatch && bMatchWholeCell
&& (nStart != 0 || nEnd != aCellStr.Len()) )
- bMatch = FALSE; // RegExp must match entire cell string
+ bMatch = sal_False; // RegExp must match entire cell string
if ( bRealRegExp )
switch (rEntry.eOp)
{
@@ -1136,7 +1136,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
// #i18374# When used from functions (match, countif, sumif, vlookup, hlookup, lookup),
// the query value is assigned directly, and the string is empty. In that case,
// don't find any string (isEqual would find empty string results in formula cells).
- bOk = FALSE;
+ bOk = sal_False;
if ( rEntry.eOp == SC_NOT_EQUAL )
bOk = !bOk;
}
@@ -1223,14 +1223,14 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
(pCell ? pCell->HasValueData() :
HasValueData( static_cast<SCCOL>(rEntry.nField), nRow)))
{
- bOk = TRUE;
+ bOk = sal_True;
}
else if (!rEntry.bQueryByString &&
(rEntry.eOp == SC_GREATER || rEntry.eOp == SC_GREATER_EQUAL) &&
(pCell ? pCell->HasStringData() :
HasStringData( static_cast<SCCOL>(rEntry.nField), nRow)))
{
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -1263,7 +1263,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
pTest[0] = pTest[0] || pTest[j];
}
- BOOL bRet = pPasst[0];
+ sal_Bool bRet = pPasst[0];
if ( pPasst != &aBool[0] )
delete [] pPasst;
if ( pbTestEqualCondition )
@@ -1276,7 +1276,7 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
void ScTable::TopTenQuery( ScQueryParam& rParam )
{
- BOOL bSortCollatorInitialized = FALSE;
+ sal_Bool bSortCollatorInitialized = sal_False;
SCSIZE nEntryCount = rParam.GetEntryCount();
SCROW nRow1 = (rParam.bHasHeader ? rParam.nRow1 + 1 : rParam.nRow1);
SCSIZE nCount = static_cast<SCSIZE>(rParam.nRow2 - nRow1 + 1);
@@ -1294,7 +1294,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
aSortParam = aLocalSortParam; // used in CreateSortInfoArray, Compare
if ( !bSortCollatorInitialized )
{
- bSortCollatorInitialized = TRUE;
+ bSortCollatorInitialized = sal_True;
InitSortCollator( aLocalSortParam );
}
ScSortInfoArray* pArray = CreateSortInfoArray( nRow1, rParam.nRow2 );
@@ -1314,7 +1314,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
{
if ( rEntry.bQueryByString )
{ // dat wird nix
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = 10; // 10 bzw. 10%
}
SCSIZE nVal = (rEntry.nVal >= 1 ? static_cast<SCSIZE>(rEntry.nVal) : 1);
@@ -1380,7 +1380,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
else
{
rEntry.eOp = SC_GREATER_EQUAL;
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = 0;
}
delete pArray;
@@ -1396,14 +1396,14 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
DestroySortCollator();
}
-static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rParam, BOOL* pSpecial )
+static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rParam, sal_Bool* pSpecial )
{
bool bTopTen = false;
SCSIZE nEntryCount = rParam.GetEntryCount();
for ( SCSIZE i = 0; i < nEntryCount; ++i )
{
- pSpecial[i] = FALSE;
+ pSpecial[i] = sal_False;
ScQueryEntry& rEntry = rParam.GetEntry(i);
if ( rEntry.bDoQuery )
{
@@ -1435,7 +1435,7 @@ static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPa
// #58736# call from UNO or second call from autofilter
if ( rEntry.nVal == SC_EMPTYFIELDS || rEntry.nVal == SC_NONEMPTYFIELDS )
{
- pSpecial[i] = TRUE;
+ pSpecial[i] = sal_True;
}
}
if ( !bTopTen )
@@ -1464,14 +1464,14 @@ static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPa
}
}
-SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
+SCSIZE ScTable::Query(ScQueryParam& rParamOrg, sal_Bool bKeepSub)
{
ScQueryParam aParam( rParamOrg );
ScStrCollection aScStrCollection;
StrData* pStrData = NULL;
- BOOL bStarted = FALSE;
- BOOL bOldResult = TRUE;
+ sal_Bool bStarted = sal_False;
+ sal_Bool bOldResult = sal_True;
SCROW nOldStart = 0;
SCROW nOldEnd = 0;
@@ -1480,7 +1480,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
SCROW nHeader = aParam.bHasHeader ? 1 : 0;
SCSIZE nEntryCount = aParam.GetEntryCount();
- BOOL* pSpecial = new BOOL[nEntryCount];
+ sal_Bool* pSpecial = new sal_Bool[nEntryCount];
lcl_PrepareQuery( pDocument, this, aParam, pSpecial );
if (!aParam.bInplace)
@@ -1501,8 +1501,8 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
for (SCROW j=aParam.nRow1 + nHeader; j<=aParam.nRow2; j++)
{
- BOOL bResult; // Filterergebnis
- BOOL bValid = ValidQuery(j, aParam, pSpecial);
+ sal_Bool bResult; // Filterergebnis
+ sal_Bool bValid = ValidQuery(j, aParam, pSpecial);
if (!bValid && bKeepSub) // Subtotals stehenlassen
{
for (SCCOL nCol=aParam.nCol1; nCol<=aParam.nCol2 && !bValid; nCol++)
@@ -1513,13 +1513,13 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
if ( pCell->GetCellType() == CELLTYPE_FORMULA )
if (((ScFormulaCell*)pCell)->IsSubTotal())
if (RefVisible((ScFormulaCell*)pCell))
- bValid = TRUE;
+ bValid = sal_True;
}
}
if (bValid)
{
if (aParam.bDuplicate)
- bResult = TRUE;
+ bResult = sal_True;
else
{
String aStr;
@@ -1532,20 +1532,20 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
}
pStrData = new StrData(aStr);
- BOOL bIsUnique = TRUE;
+ sal_Bool bIsUnique = sal_True;
if (pStrData)
bIsUnique = aScStrCollection.Insert(pStrData);
if (bIsUnique)
- bResult = TRUE;
+ bResult = sal_True;
else
{
delete pStrData;
- bResult = FALSE;
+ bResult = sal_False;
}
}
}
else
- bResult = FALSE;
+ bResult = sal_False;
if (aParam.bInplace)
{
@@ -1562,7 +1562,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
nOldStart = nOldEnd = j;
bOldResult = bResult;
}
- bStarted = TRUE;
+ bStarted = sal_True;
}
else
{
@@ -1635,9 +1635,9 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
return nCount;
}
-BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
+sal_Bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
SCCOL* pFields = new SCCOL[nCol2-nCol1+1];
String aCellStr;
SCCOL nCol = nCol1;
@@ -1650,7 +1650,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
{
String aQueryStr;
GetUpperCellString(nCol, nRow1, aQueryStr);
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL i = rQueryParam.nCol1;
while (!bFound && (i <= nDBCol2))
{
@@ -1664,12 +1664,12 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
if (bFound)
pFields[nCol - nCol1] = i;
else
- bValid = FALSE;
+ bValid = sal_False;
nCol++;
}
if (bValid)
{
- ULONG nVisible = 0;
+ sal_uLong nVisible = 0;
for ( nCol=nCol1; nCol<=nCol2; nCol++ )
nVisible += aCol[nCol].VisibleCount( nRow1+1, nRow2 );
@@ -1702,7 +1702,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
rQueryParam.GetEntry(nIndex).eConnect = SC_AND;
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
nCol++;
}
@@ -1715,7 +1715,7 @@ BOOL ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
return bValid;
}
-BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
+sal_Bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
// A valid StarQuery must be at least 4 columns wide. To be precise it
// should be exactly 4 columns ...
@@ -1726,10 +1726,10 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
// range wasn't sufficiently specified data changes wouldn't flag formula
// cells for recalculation.
if (nCol2 - nCol1 < 3)
- return FALSE;
+ return sal_False;
- BOOL bValid;
- BOOL bFound;
+ sal_Bool bValid;
+ sal_Bool bFound;
String aCellStr;
SCSIZE nIndex = 0;
SCROW nRow = nRow1;
@@ -1745,7 +1745,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
{
ScQueryEntry& rEntry = rQueryParam.GetEntry(nIndex);
- bValid = FALSE;
+ bValid = sal_False;
// Erste Spalte UND/ODER
if (nIndex > 0)
{
@@ -1753,18 +1753,18 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_UND) )
{
rEntry.eConnect = SC_AND;
- bValid = TRUE;
+ bValid = sal_True;
}
else if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_ODER) )
{
rEntry.eConnect = SC_OR;
- bValid = TRUE;
+ bValid = sal_True;
}
}
// Zweite Spalte FeldName
if ((nIndex < 1) || bValid)
{
- bFound = FALSE;
+ bFound = sal_False;
GetUpperCellString(nCol1 + 1, nRow, aCellStr);
for (SCCOL i=rQueryParam.nCol1; (i <= nDBCol2) && (!bFound); i++)
{
@@ -1777,16 +1777,16 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if (bFound)
{
rEntry.nField = i;
- bValid = TRUE;
+ bValid = sal_True;
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
}
// Dritte Spalte Operator =<>...
if (bValid)
{
- bFound = FALSE;
+ bFound = sal_False;
GetUpperCellString(nCol1 + 2, nRow, aCellStr);
if (aCellStr.GetChar(0) == '<')
{
@@ -1812,7 +1812,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if (bValid)
{
GetString(nCol1 + 3, nRow, *rEntry.pStr);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
}
nIndex++;
nRow++;
@@ -1821,7 +1821,7 @@ BOOL ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
return bValid;
}
-BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
+sal_Bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
SCSIZE i, nCount;
PutInOrder(nCol1, nCol2);
@@ -1832,7 +1832,7 @@ BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
rQueryParam.GetEntry(i).Clear();
// Standard QueryTabelle
- BOOL bValid = CreateStarQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
+ sal_Bool bValid = CreateStarQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
// Excel QueryTabelle
if (!bValid)
bValid = CreateExcelQuery(nCol1, nRow1, nCol2, nRow2, rQueryParam);
@@ -1842,7 +1842,7 @@ BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
{
// bQueryByString muss gesetzt sein
for (i=0; i < nCount; i++)
- rQueryParam.GetEntry(i).bQueryByString = TRUE;
+ rQueryParam.GetEntry(i).bQueryByString = sal_True;
}
else
{
@@ -1853,26 +1853,26 @@ BOOL ScTable::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow
return bValid;
}
-BOOL ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW /* nEndRow */ )
+sal_Bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW /* nEndRow */ )
{
for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
{
CellType eType = GetCellType( nCol, nStartRow );
if (eType != CELLTYPE_STRING && eType != CELLTYPE_EDIT)
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol */, SCROW nEndRow )
+sal_Bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol */, SCROW nEndRow )
{
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
{
CellType eType = GetCellType( nStartCol, nRow );
if (eType != CELLTYPE_STRING && eType != CELLTYPE_EDIT)
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates)
@@ -1897,7 +1897,7 @@ void ScTable::GetFilteredFilterEntries(
}
nEntryCount = aParam.GetEntryCount();
- BOOL* pSpecial = new BOOL[nEntryCount];
+ sal_Bool* pSpecial = new sal_Bool[nEntryCount];
lcl_PrepareQuery( pDocument, this, aParam, pSpecial );
bool bHasDates = false;
for ( SCROW j = nRow1; j <= nRow2; ++j )
@@ -1914,7 +1914,7 @@ void ScTable::GetFilteredFilterEntries(
delete[] pSpecial;
}
-BOOL ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit)
+sal_Bool ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, sal_Bool bLimit)
{
return aCol[nCol].GetDataEntries( nRow, rStrings, bLimit );
}
@@ -1924,9 +1924,9 @@ SCSIZE ScTable::GetCellCount(SCCOL nCol) const
return aCol[nCol].GetCellCount();
}
-ULONG ScTable::GetCellCount() const
+sal_uLong ScTable::GetCellCount() const
{
- ULONG nCellCount = 0;
+ sal_uLong nCellCount = 0;
for ( SCCOL nCol=0; nCol<=MAXCOL; nCol++ )
nCellCount += aCol[nCol].GetCellCount();
@@ -1934,9 +1934,9 @@ ULONG ScTable::GetCellCount() const
return nCellCount;
}
-ULONG ScTable::GetWeightedCount() const
+sal_uLong ScTable::GetWeightedCount() const
{
- ULONG nCellCount = 0;
+ sal_uLong nCellCount = 0;
for ( SCCOL nCol=0; nCol<=MAXCOL; nCol++ )
if ( aCol[nCol].GetCellCount() ) // GetCellCount ist inline
@@ -1945,9 +1945,9 @@ ULONG ScTable::GetWeightedCount() const
return nCellCount;
}
-ULONG ScTable::GetCodeCount() const
+sal_uLong ScTable::GetCodeCount() const
{
- ULONG nCodeCount = 0;
+ sal_uLong nCodeCount = 0;
for ( SCCOL nCol=0; nCol<=MAXCOL; nCol++ )
if ( aCol[nCol].GetCellCount() ) // GetCellCount ist inline
@@ -1980,7 +1980,7 @@ void ScTable::UpdateSelectionFunction( ScFunctionData& rData,
{
// Cursor neben einer Markierung nicht beruecksichtigen:
//! nur noch MarkData uebergeben, Cursorposition ggf. hineinselektieren!!!
- BOOL bSingle = ( rMark.IsMarked() || !rMark.IsMultiMarked() );
+ sal_Bool bSingle = ( rMark.IsMarked() || !rMark.IsMultiMarked() );
// Mehrfachselektion:
@@ -2000,7 +2000,7 @@ void ScTable::UpdateSelectionFunction( ScFunctionData& rData,
aCol[nCol].UpdateAreaFunction( rData, *mpHiddenRows, nStartRow, nEndRow );
}
-void ScTable::FindConditionalFormat( ULONG nKey, ScRangeList& rList )
+void ScTable::FindConditionalFormat( sal_uLong nKey, ScRangeList& rList )
{
SCROW nStartRow = 0, nEndRow = 0;
for (SCCOL nCol=0; nCol<=MAXCOL; nCol++)
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 434144d06e00..5c7c872f6c64 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -85,11 +85,11 @@
#define _D_MAX_LONG_ (double) 0x7fffffff
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
// -----------------------------------------------------------------------
-short lcl_DecompValueString( String& aValue, sal_Int32& nVal, USHORT* pMinDigits = NULL )
+short lcl_DecompValueString( String& aValue, sal_Int32& nVal, sal_uInt16* pMinDigits = NULL )
{
if ( !aValue.Len() )
{
@@ -144,7 +144,7 @@ short lcl_DecompValueString( String& aValue, sal_Int32& nVal, USHORT* pMinDigits
return 0;
}
-String lcl_ValueString( sal_Int32 nValue, USHORT nMinDigits )
+String lcl_ValueString( sal_Int32 nValue, sal_uInt16 nMinDigits )
{
if ( nMinDigits <= 1 )
return String::CreateFromInt32( nValue ); // simple case...
@@ -165,8 +165,8 @@ String lcl_ValueString( sal_Int32 nValue, USHORT nMinDigits )
}
static ScBaseCell * lcl_getSuffixCell( ScDocument* pDocument, sal_Int32 nValue,
- USHORT nDigits, const String& rSuffix, CellType eCellType,
- BOOL bIsOrdinalSuffix )
+ sal_uInt16 nDigits, const String& rSuffix, CellType eCellType,
+ sal_Bool bIsOrdinalSuffix )
{
String aValue( lcl_ValueString( nValue, nDigits ));
if (!bIsOrdinalSuffix)
@@ -189,8 +189,8 @@ static ScBaseCell * lcl_getSuffixCell( ScDocument* pDocument, sal_Int32 nValue,
void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
FillCmd& rCmd, FillDateCmd& rDateCmd,
- double& rInc, USHORT& rMinDigits,
- ScUserListData*& rListData, USHORT& rListIndex)
+ double& rInc, sal_uInt16& rMinDigits,
+ ScUserListData*& rListData, sal_uInt16& rListIndex)
{
DBG_ASSERT( nCol1==nCol2 || nRow1==nRow2, "FillAnalyse: falscher Bereich" );
@@ -225,8 +225,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (eCellType == CELLTYPE_VALUE)
{
- UINT32 nFormat = ((const SfxUInt32Item*)GetAttr(nCol,nRow,ATTR_VALUE_FORMAT))->GetValue();
- BOOL bDate = ( pDocument->GetFormatTable()->GetType(nFormat) == NUMBERFORMAT_DATE );
+ sal_uInt32 nFormat = ((const SfxUInt32Item*)GetAttr(nCol,nRow,ATTR_VALUE_FORMAT))->GetValue();
+ sal_Bool bDate = ( pDocument->GetFormatTable()->GetType(nFormat) == NUMBERFORMAT_DATE );
if (bDate)
{
if (nCount > 1)
@@ -259,8 +259,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- BOOL bVal = TRUE;
- for (USHORT i=1; i<nCount && bVal; i++)
+ sal_Bool bVal = sal_True;
+ for (sal_uInt16 i=1; i<nCount && bVal; i++)
{
ScBaseCell* pCell = GetCell(nCol,nRow);
if (pCell && pCell->GetCellType() == CELLTYPE_VALUE)
@@ -270,7 +270,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( eType == FILL_DAY )
{
if ( aDate2-aDate1 != nCmpInc )
- bVal = FALSE;
+ bVal = sal_False;
}
else
{
@@ -278,14 +278,14 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nMDiff = aDate2.GetMonth() - (long) aDate1.GetMonth();
nYDiff = aDate2.GetYear() - (long) aDate1.GetYear();
if (nDDiff || ( nMDiff + 12 * nYDiff != nCmpInc ))
- bVal = FALSE;
+ bVal = sal_False;
}
aDate1 = aDate2;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
else
- bVal = FALSE; // #50965# kein Datum passt auch nicht
+ bVal = sal_False; // #50965# kein Datum passt auch nicht
}
if (bVal)
{
@@ -316,8 +316,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInc = nVal2 - nVal1;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- BOOL bVal = TRUE;
- for (USHORT i=1; i<nCount && bVal; i++)
+ sal_Bool bVal = sal_True;
+ for (sal_uInt16 i=1; i<nCount && bVal; i++)
{
ScBaseCell* pCell = GetCell(nCol,nRow);
if (pCell && pCell->GetCellType() == CELLTYPE_VALUE)
@@ -325,11 +325,11 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nVal2 = ((ScValueCell*)pCell)->GetValue();
double nDiff = nVal2 - nVal1;
if ( !::rtl::math::approxEqual( nDiff, rInc ) )
- bVal = FALSE;
+ bVal = sal_False;
nVal1 = nVal2;
}
else
- bVal = FALSE;
+ bVal = sal_False;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
@@ -348,7 +348,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rListData->GetSubIndex(aStr, rListIndex);
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- for (USHORT i=1; i<nCount && rListData; i++)
+ for (sal_uInt16 i=1; i<nCount && rListData; i++)
{
GetString(nCol, nRow, aStr);
if (!rListData->GetSubIndex(aStr, rListIndex))
@@ -374,8 +374,8 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInc = (double)nVal2 - (double)nVal1;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
- BOOL bVal = TRUE;
- for (USHORT i=1; i<nCount && bVal; i++)
+ sal_Bool bVal = sal_True;
+ for (sal_uInt16 i=1; i<nCount && bVal; i++)
{
ScBaseCell* pCell = GetCell(nCol,nRow);
CellType eType = pCell ? pCell->GetCellType() : CELLTYPE_NONE;
@@ -390,14 +390,14 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
double nDiff = (double)nVal2 - (double)nVal1;
if ( !::rtl::math::approxEqual( nDiff, rInc ) )
- bVal = FALSE;
+ bVal = sal_False;
nVal1 = nVal2;
}
else
- bVal = FALSE;
+ bVal = sal_False;
}
else
- bVal = FALSE;
+ bVal = sal_False;
nCol = sal::static_int_cast<SCCOL>( nCol + nAddX );
nRow = sal::static_int_cast<SCROW>( nRow + nAddY );
}
@@ -415,10 +415,10 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
}
-void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFormulaCell* pSrcCell,
- SCCOL nDestCol, SCROW nDestRow, BOOL bLast )
+void ScTable::FillFormula(sal_uLong& /* nFormulaCounter */, sal_Bool /* bFirst */, ScFormulaCell* pSrcCell,
+ SCCOL nDestCol, SCROW nDestRow, sal_Bool bLast )
{
-/* USHORT nTokArrLen = pSrcCell->GetTokenArrayLen();
+/* sal_uInt16 nTokArrLen = pSrcCell->GetTokenArrayLen();
if ( nTokArrLen > 15 ) // mehr als =A1 oder =67
{
ScRangeName* pRangeName = pDocument->GetRangeName();
@@ -437,9 +437,9 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor
if (!pRangeName->Insert( pAktRange ))
delete pAktRange;
else
- bSharedNameInserted = TRUE;
+ bSharedNameInserted = sal_True;
}
- USHORT nIndex;
+ sal_uInt16 nIndex;
pRangeName->SearchName(aName, nIndex);
if (!pRangeName)
{
@@ -456,7 +456,7 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor
}
else
*/ {
- pDocument->SetNoListening( TRUE ); // noch falsche Referenzen
+ pDocument->SetNoListening( sal_True ); // noch falsche Referenzen
ScAddress aAddr( nDestCol, nDestRow, nTab );
ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell, *pDocument, aAddr );
aCol[nDestCol].Insert(nDestRow, pDestCell);
@@ -497,13 +497,13 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor
DBG_ERRORFILE( "FillFormula: kein MatrixOrigin" );
}
}
- pDocument->SetNoListening( FALSE );
+ pDocument->SetNoListening( sal_False );
pDestCell->StartListeningTo( pDocument );
}
}
void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ULONG nFillCount, FillDir eFillDir, ScProgress& rProgress )
+ sal_uLong nFillCount, FillDir eFillDir, ScProgress& rProgress )
{
if ( (nFillCount == 0) || !ValidColRow(nCol1, nRow1) || !ValidColRow(nCol2, nRow2) )
return;
@@ -512,19 +512,19 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// Richtung auswerten
//
- BOOL bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
- BOOL bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
+ sal_Bool bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
+ sal_Bool bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
- ULONG nCol = 0;
- ULONG nRow = 0;
- ULONG& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
- ULONG& rOuter = bVertical ? nCol : nRow;
- ULONG nOStart;
- ULONG nOEnd;
- ULONG nIStart;
- ULONG nIEnd;
- ULONG nISrcStart;
- ULONG nISrcEnd;
+ sal_uLong nCol = 0;
+ sal_uLong nRow = 0;
+ sal_uLong& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
+ sal_uLong& rOuter = bVertical ? nCol : nRow;
+ sal_uLong nOStart;
+ sal_uLong nOEnd;
+ sal_uLong nIStart;
+ sal_uLong nIEnd;
+ sal_uLong nISrcStart;
+ sal_uLong nISrcEnd;
if (bVertical)
{
@@ -564,32 +564,32 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nIEnd = nCol1 - nFillCount;
}
}
- ULONG nIMin = nIStart;
- ULONG nIMax = nIEnd;
+ sal_uLong nIMin = nIStart;
+ sal_uLong nIMax = nIEnd;
PutInOrder(nIMin,nIMax);
if (bVertical)
DeleteArea(nCol1, static_cast<SCROW>(nIMin), nCol2, static_cast<SCROW>(nIMax), IDF_AUTOFILL);
else
DeleteArea(static_cast<SCCOL>(nIMin), nRow1, static_cast<SCCOL>(nIMax), nRow2, IDF_AUTOFILL);
- ULONG nProgress = rProgress.GetState();
+ sal_uLong nProgress = rProgress.GetState();
//
// ausfuehren
//
- ULONG nActFormCnt = 0;
+ sal_uLong nActFormCnt = 0;
for (rOuter = nOStart; rOuter <= nOEnd; rOuter++)
{
- ULONG nMaxFormCnt = 0; // fuer Formeln
+ sal_uLong nMaxFormCnt = 0; // fuer Formeln
// Attributierung uebertragen
const ScPatternAttr* pSrcPattern = NULL;
const ScStyleSheet* pStyleSheet = NULL;
- ULONG nAtSrc = nISrcStart;
+ sal_uLong nAtSrc = nISrcStart;
ScPatternAttr* pNewPattern = NULL;
- BOOL bGetPattern = TRUE;
+ sal_Bool bGetPattern = sal_True;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
@@ -601,12 +601,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pSrcPattern = aCol[nCol].GetPattern(static_cast<SCROW>(nAtSrc));
else // rInner&:=nCol, rOuter&:=nRow
pSrcPattern = aCol[nAtSrc].GetPattern(static_cast<SCROW>(nRow));
- bGetPattern = FALSE;
+ bGetPattern = sal_False;
pStyleSheet = pSrcPattern->GetStyleSheet();
// Merge/Mergeflag nicht uebernehmen,
const SfxItemSet& rSet = pSrcPattern->GetItemSet();
- if ( rSet.GetItemState(ATTR_MERGE, FALSE) == SFX_ITEM_SET
- || rSet.GetItemState(ATTR_MERGE_FLAG, FALSE) == SFX_ITEM_SET )
+ if ( rSet.GetItemState(ATTR_MERGE, sal_False) == SFX_ITEM_SET
+ || rSet.GetItemState(ATTR_MERGE_FLAG, sal_False) == SFX_ITEM_SET )
{
pNewPattern = new ScPatternAttr( *pSrcPattern );
SfxItemSet& rNewSet = pNewPattern->GetItemSet();
@@ -654,18 +654,18 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( nAtSrc != nISrcStart )
{ // mehr als eine Source-Zelle
nAtSrc = nISrcStart;
- bGetPattern = TRUE;
+ bGetPattern = sal_True;
}
}
else if (bPositive)
{
++nAtSrc;
- bGetPattern = TRUE;
+ bGetPattern = sal_True;
}
else
{
--nAtSrc;
- bGetPattern = TRUE;
+ bGetPattern = sal_True;
}
if (rInner == nIEnd) break;
@@ -679,9 +679,9 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
FillCmd eFillCmd;
FillDateCmd eDateCmd;
double nInc;
- USHORT nMinDigits;
+ sal_uInt16 nMinDigits;
ScUserListData* pListData = NULL;
- USHORT nListIndex;
+ sal_uInt16 nListIndex;
if (bVertical)
FillAnalyse(static_cast<SCCOL>(nCol),nRow1,
static_cast<SCCOL>(nCol),nRow2, eFillCmd,eDateCmd,
@@ -696,12 +696,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (pListData)
{
- USHORT nListCount = pListData->GetSubCount();
+ sal_uInt16 nListCount = pListData->GetSubCount();
if ( !bPositive )
{
// nListIndex auf FillAnalyse zeigt auf den letzten Eintrag -> anpassen
- ULONG nSub = nISrcStart - nISrcEnd;
- for (ULONG i=0; i<nSub; i++)
+ sal_uLong nSub = nISrcStart - nISrcEnd;
+ for (sal_uLong i=0; i<nSub; i++)
{
if (nListIndex == 0) nListIndex = nListCount;
--nListIndex;
@@ -731,7 +731,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
else if (eFillCmd == FILL_SIMPLE) // Auffuellen mit Muster
{
- ULONG nSource = nISrcStart;
+ sal_uLong nSource = nISrcStart;
double nDelta;
if ( nScFillModeMouseModifier & KEY_MOD1 )
nDelta = 0.0;
@@ -740,16 +740,16 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
else
nDelta = -1.0;
double nVal = 0.0;
- ULONG nFormulaCounter = nActFormCnt;
- BOOL bFirst = TRUE;
- BOOL bGetCell = TRUE;
- USHORT nCellDigits = 0;
+ sal_uLong nFormulaCounter = nActFormCnt;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bGetCell = sal_True;
+ sal_uInt16 nCellDigits = 0;
short nHeadNoneTail = 0;
sal_Int32 nStringValue = 0;
String aValue;
ScBaseCell* pSrcCell = NULL;
CellType eCellType = CELLTYPE_NONE;
- BOOL bIsOrdinalSuffix = FALSE;
+ sal_Bool bIsOrdinalSuffix = sal_False;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
@@ -760,7 +760,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pSrcCell = aCol[nCol].GetCell( static_cast<SCROW>(nSource) );
else // rInner&:=nCol, rOuter&:=nRow
pSrcCell = aCol[nSource].GetCell( static_cast<SCROW>(nRow) );
- bGetCell = FALSE;
+ bGetCell = sal_False;
if ( pSrcCell )
{
eCellType = pSrcCell->GetCellType();
@@ -859,7 +859,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( nSource != nISrcStart )
{ // mehr als eine Source-Zelle
nSource = nISrcStart;
- bGetCell = TRUE;
+ bGetCell = sal_True;
}
if ( !(nScFillModeMouseModifier & KEY_MOD1) )
{
@@ -869,17 +869,17 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nDelta -= 1.0;
}
nFormulaCounter = nActFormCnt;
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if (bPositive)
{
++nSource;
- bGetCell = TRUE;
+ bGetCell = sal_True;
}
else
{
--nSource;
- bGetCell = TRUE;
+ bGetCell = sal_True;
}
// Progress in der inneren Schleife nur bei teuren Zellen,
@@ -902,12 +902,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (bVertical)
FillSeries( static_cast<SCCOL>(nCol), nRow1,
static_cast<SCCOL>(nCol), nRow2, nFillCount, eFillDir,
- eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, FALSE,
+ eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, sal_False,
rProgress );
else
FillSeries( nCol1, static_cast<SCROW>(nRow), nCol2,
static_cast<SCROW>(nRow), nFillCount, eFillDir,
- eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, FALSE,
+ eFillCmd, eDateCmd, nInc, nEndVal, nMinDigits, sal_False,
rProgress );
nProgress = rProgress.GetState();
}
@@ -924,12 +924,12 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
SCROW nRow1 = rSource.aStart.Row();
SCCOL nCol2 = rSource.aEnd.Col();
SCROW nRow2 = rSource.aEnd.Row();
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
long nIndex = 0;
- ULONG nSrcCount = 0;
+ sal_uLong nSrcCount = 0;
FillDir eFillDir = FILL_TO_BOTTOM;
if ( nEndX == nCol2 && nEndY == nRow2 ) // leer
- bOk = FALSE;
+ bOk = sal_False;
else if ( nEndX == nCol2 ) // nach oben/unten
{
nEndX = nCol2 = nCol1; // nur erste Spalte ansehen
@@ -951,29 +951,29 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
eFillDir = FILL_TO_LEFT;
}
else // Richtung nicht eindeutig
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{
FillCmd eFillCmd;
FillDateCmd eDateCmd;
double nInc;
- USHORT nMinDigits;
+ sal_uInt16 nMinDigits;
ScUserListData* pListData = NULL;
- USHORT nListIndex;
+ sal_uInt16 nListIndex;
FillAnalyse(nCol1,nRow1, nCol2,nRow2, eFillCmd,eDateCmd, nInc,nMinDigits, pListData,nListIndex);
if ( pListData ) // benutzerdefinierte Liste
{
- USHORT nListCount = pListData->GetSubCount();
+ sal_uInt16 nListCount = pListData->GetSubCount();
if ( nListCount )
{
- ULONG nSub = nSrcCount - 1; // nListIndex ist vom letzten Source-Eintrag
+ sal_uLong nSub = nSrcCount - 1; // nListIndex ist vom letzten Source-Eintrag
while ( nIndex < sal::static_int_cast<long>(nSub) )
nIndex += nListCount;
- ULONG nPos = ( nListIndex + nIndex - nSub ) % nListCount;
- aValue = pListData->GetSubStr(sal::static_int_cast<USHORT>(nPos));
+ sal_uLong nPos = ( nListIndex + nIndex - nSub ) % nListCount;
+ aValue = pListData->GetSubStr(sal::static_int_cast<sal_uInt16>(nPos));
}
}
else if ( eFillCmd == FILL_SIMPLE ) // Auffuellen mit Muster
@@ -981,7 +981,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
long nPosIndex = nIndex;
while ( nPosIndex < 0 )
nPosIndex += nSrcCount;
- ULONG nPos = nPosIndex % nSrcCount;
+ sal_uLong nPos = nPosIndex % nSrcCount;
SCCOL nSrcX = nCol1;
SCROW nSrcY = nRow1;
if ( eFillDir == FILL_TO_TOP || eFillDir == FILL_TO_BOTTOM )
@@ -1011,7 +1011,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
if ( !(nScFillModeMouseModifier & KEY_MOD1) )
{
sal_Int32 nVal;
- USHORT nCellDigits = 0; // look at each source cell individually
+ sal_uInt16 nCellDigits = 0; // look at each source cell individually
short nFlag = lcl_DecompValueString( aValue, nVal, &nCellDigits );
if ( nFlag < 0 )
{
@@ -1033,7 +1033,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
nVal += (double) nDelta;
Color* pColor;
- ULONG nNumFmt = GetNumberFormat( nSrcX, nSrcY );
+ sal_uLong nNumFmt = GetNumberFormat( nSrcX, nSrcY );
pDocument->GetFormatTable()->
GetOutputString( nVal, nNumFmt, aValue, &pColor );
}
@@ -1048,7 +1048,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
}
else if ( eFillCmd == FILL_LINEAR || eFillCmd == FILL_DATE ) // Werte
{
- BOOL bValueOk;
+ sal_Bool bValueOk;
double nStart;
sal_Int32 nVal = 0;
short nHeadNoneTail = 0;
@@ -1092,8 +1092,8 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
}
else // Datum
{
- bValueOk = TRUE;
- USHORT nDayOfMonth = 0;
+ bValueOk = sal_True;
+ sal_uInt16 nDayOfMonth = 0;
if ( nIndex < 0 )
{
nIndex = -nIndex;
@@ -1121,7 +1121,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
{
//! Zahlformat je nach Index holen?
Color* pColor;
- ULONG nNumFmt = GetNumberFormat( nCol1, nRow1 );
+ sal_uLong nNumFmt = GetNumberFormat( nCol1, nRow1 );
pDocument->GetFormatTable()->
GetOutputString( nStart, nNumFmt, aValue, &pColor );
}
@@ -1136,7 +1136,7 @@ String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW n
return aValue;
}
-void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateCmd eCmd)
+void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd)
{
if (eCmd == FILL_DAY)
{
@@ -1145,8 +1145,8 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
}
// class Date Grenzen
- const USHORT nMinYear = 1583;
- const USHORT nMaxYear = 9956;
+ const sal_uInt16 nMinYear = 1583;
+ const sal_uInt16 nMaxYear = 9956;
long nInc = (long) nStep; // nach oben/unten begrenzen ?
Date aNullDate = *pDocument->GetFormatTable()->GetNullDate();
@@ -1208,8 +1208,8 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
aDate = Date( 31,12, nMaxYear );
else
{
- aDate.SetMonth((USHORT) nMonth);
- aDate.SetYear((USHORT) nYear);
+ aDate.SetMonth((sal_uInt16) nMonth);
+ aDate.SetYear((sal_uInt16) nYear);
if ( nDayOfMonth > 28 )
aDate.SetDay( Min( aDate.GetDaysInMonth(), nDayOfMonth ) );
}
@@ -1224,7 +1224,7 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
else if ( nYear > nMaxYear )
aDate = Date( 31,12, nMaxYear );
else
- aDate.SetYear((USHORT) nYear);
+ aDate.SetYear((sal_uInt16) nYear);
}
break;
default:
@@ -1237,26 +1237,26 @@ void ScTable::IncDate(double& rVal, USHORT& nDayOfMonth, double nStep, FillDateC
}
void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
- double nStepValue, double nMaxValue, USHORT nArgMinDigits,
- BOOL bAttribs, ScProgress& rProgress )
+ sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
+ double nStepValue, double nMaxValue, sal_uInt16 nArgMinDigits,
+ sal_Bool bAttribs, ScProgress& rProgress )
{
//
// Richtung auswerten
//
- BOOL bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
- BOOL bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
+ sal_Bool bVertical = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP);
+ sal_Bool bPositive = (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_RIGHT);
- ULONG nCol = 0;
- ULONG nRow = 0;
- ULONG& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
- ULONG& rOuter = bVertical ? nCol : nRow;
- ULONG nOStart;
- ULONG nOEnd;
- ULONG nIStart;
- ULONG nIEnd;
- ULONG nISource;
+ sal_uLong nCol = 0;
+ sal_uLong nRow = 0;
+ sal_uLong& rInner = bVertical ? nRow : nCol; // Schleifenvariablen
+ sal_uLong& rOuter = bVertical ? nCol : nRow;
+ sal_uLong nOStart;
+ sal_uLong nOEnd;
+ sal_uLong nIStart;
+ sal_uLong nIEnd;
+ sal_uLong nISource;
if (bVertical)
{
@@ -1299,25 +1299,25 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
}
- ULONG nIMin = nIStart;
- ULONG nIMax = nIEnd;
+ sal_uLong nIMin = nIStart;
+ sal_uLong nIMax = nIEnd;
PutInOrder(nIMin,nIMax);
- USHORT nDel = bAttribs ? IDF_AUTOFILL : (IDF_AUTOFILL & IDF_CONTENTS);
+ sal_uInt16 nDel = bAttribs ? IDF_AUTOFILL : (IDF_AUTOFILL & IDF_CONTENTS);
if (bVertical)
DeleteArea(nCol1, static_cast<SCROW>(nIMin), nCol2, static_cast<SCROW>(nIMax), nDel);
else
DeleteArea(static_cast<SCCOL>(nIMin), nRow1, static_cast<SCCOL>(nIMax), nRow2, nDel);
- ULONG nProgress = rProgress.GetState();
+ sal_uLong nProgress = rProgress.GetState();
//
// ausfuehren
//
- ULONG nActFormCnt = 0;
+ sal_uLong nActFormCnt = 0;
for (rOuter = nOStart; rOuter <= nOEnd; rOuter++)
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
rInner = nISource;
ScBaseCell* pSrcCell = aCol[nCol].GetCell(static_cast<SCROW>(nRow));
@@ -1329,10 +1329,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScPatternAttr* pSrcPattern = aCol[nCol].GetPattern(static_cast<SCROW>(nRow));
if (bVertical)
aCol[nCol].SetPatternArea( static_cast<SCROW>(nIMin),
- static_cast<SCROW>(nIMax), *pSrcPattern, TRUE );
+ static_cast<SCROW>(nIMax), *pSrcPattern, sal_True );
else
for (SCCOL nAtCol = static_cast<SCCOL>(nIMin); nAtCol <= sal::static_int_cast<SCCOL>(nIMax); nAtCol++)
- aCol[nAtCol].SetPattern(static_cast<SCROW>(nRow), *pSrcPattern, TRUE);
+ aCol[nAtCol].SetPattern(static_cast<SCROW>(nRow), *pSrcPattern, sal_True);
}
if (pSrcCell)
@@ -1345,10 +1345,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
for (rInner = nIMin; rInner <= nIMax; rInner++)
{
- ULONG nInd = nActFormCnt;
+ sal_uLong nInd = nActFormCnt;
FillFormula(nInd, bFirst, (ScFormulaCell*)pSrcCell,
static_cast<SCCOL>(nCol), nRow, (rInner == nIEnd) );
- bFirst = FALSE;
+ bFirst = sal_False;
rProgress.SetStateOnPercent( ++nProgress );
}
}
@@ -1373,10 +1373,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
double nVal = nStartVal;
long nIndex = 0;
- BOOL bError = FALSE;
- BOOL bOverflow = FALSE;
+ sal_Bool bError = sal_False;
+ sal_Bool bOverflow = sal_False;
- USHORT nDayOfMonth = 0;
+ sal_uInt16 nDayOfMonth = 0;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
@@ -1392,16 +1392,16 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
double nAdd = nStepValue;
if ( !SubTotal::SafeMult( nAdd, (double) ++nIndex ) ||
!SubTotal::SafePlus( nVal, nAdd ) )
- bError = TRUE;
+ bError = sal_True;
}
break;
case FILL_GROWTH:
if (!SubTotal::SafeMult(nVal, nStepValue))
- bError = TRUE;
+ bError = sal_True;
break;
case FILL_DATE:
if (fabs(nVal) > _D_MAX_LONG_)
- bError = TRUE;
+ bError = sal_True;
else
IncDate(nVal, nDayOfMonth, nStepValue, eFillDateCmd);
break;
@@ -1416,7 +1416,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal > nMaxValue) // Zielwert erreicht?
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
else
@@ -1424,7 +1424,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal < nMaxValue)
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
}
@@ -1458,17 +1458,17 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
else
((ScEditCell*)pSrcCell)->GetString( aValue );
sal_Int32 nStringValue;
- USHORT nMinDigits = nArgMinDigits;
+ sal_uInt16 nMinDigits = nArgMinDigits;
short nHeadNoneTail = lcl_DecompValueString( aValue, nStringValue, &nMinDigits );
if ( nHeadNoneTail )
{
double nStartVal = (double)nStringValue;
double nVal = nStartVal;
long nIndex = 0;
- BOOL bError = FALSE;
- BOOL bOverflow = FALSE;
+ sal_Bool bError = sal_False;
+ sal_Bool bOverflow = sal_False;
- BOOL bIsOrdinalSuffix = aValue.Equals( ScGlobal::GetOrdinalSuffix(
+ sal_Bool bIsOrdinalSuffix = aValue.Equals( ScGlobal::GetOrdinalSuffix(
(sal_Int32)nStartVal));
rInner = nIStart;
@@ -1486,12 +1486,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
double nAdd = nStepValue;
if ( !SubTotal::SafeMult( nAdd, (double) ++nIndex ) ||
!SubTotal::SafePlus( nVal, nAdd ) )
- bError = TRUE;
+ bError = sal_True;
}
break;
case FILL_GROWTH:
if (!SubTotal::SafeMult(nVal, nStepValue))
- bError = TRUE;
+ bError = sal_True;
break;
default:
{
@@ -1504,7 +1504,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal > nMaxValue) // Zielwert erreicht?
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
else
@@ -1512,7 +1512,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (nVal < nMaxValue)
{
nVal = nMaxValue;
- bOverflow = TRUE;
+ bOverflow = sal_True;
}
}
}
@@ -1557,10 +1557,10 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
+ sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
double nStepValue, double nMaxValue)
{
- ULONG nProgCount;
+ sal_uLong nProgCount;
if (eFillDir == FILL_TO_BOTTOM || eFillDir == FILL_TO_TOP)
nProgCount = nCol2 - nCol1 + 1;
else
@@ -1569,13 +1569,13 @@ void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
ScProgress aProgress( pDocument->GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount );
- bSharedNameInserted = FALSE;
+ bSharedNameInserted = sal_False;
if (eFillCmd == FILL_AUTO)
FillAuto(nCol1, nRow1, nCol2, nRow2, nFillCount, eFillDir, aProgress);
else
FillSeries(nCol1, nRow1, nCol2, nRow2, nFillCount, eFillDir,
- eFillCmd, eFillDateCmd, nStepValue, nMaxValue, 0, TRUE, aProgress);
+ eFillCmd, eFillDateCmd, nStepValue, nMaxValue, 0, sal_True, aProgress);
if (bSharedNameInserted) // Wurde Shared-Name eingefuegt?
pDocument->GetRangeName()->SetSharedMaxIndex(
@@ -1584,7 +1584,7 @@ void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
void ScTable::AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- const ScPatternAttr& rAttr, USHORT nFormatNo)
+ const ScPatternAttr& rAttr, sal_uInt16 nFormatNo)
{
ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat();
if (pAutoFormat)
@@ -1600,7 +1600,7 @@ void ScTable::AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
}
void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- USHORT nFormatNo )
+ sal_uInt16 nFormatNo )
{
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
{
@@ -1619,7 +1619,7 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
SCCOL nCol = nStartCol;
SCROW nRow = nStartRow;
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
// Linke obere Ecke
AutoFormatArea(nCol, nRow, nCol, nRow, *pPatternAttrs[nIndex], nFormatNo);
// Linke Spalte
@@ -1741,9 +1741,9 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
} // if ValidColRow
}
-void ScTable::GetAutoFormatAttr(SCCOL nCol, SCROW nRow, USHORT nIndex, ScAutoFormatData& rData)
+void ScTable::GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData& rData)
{
- UINT32 nFormatIndex = GetNumberFormat( nCol, nRow );
+ sal_uInt32 nFormatIndex = GetNumberFormat( nCol, nRow );
ScNumFormatAbbrev aNumFormat( nFormatIndex, *pDocument->GetFormatTable() );
rData.GetFromItemSet( nIndex, GetPattern( nCol, nRow )->GetItemSet(), aNumFormat );
}
@@ -1754,7 +1754,7 @@ void ScTable::GetAutoFormatAttr(SCCOL nCol, SCROW nRow, USHORT nIndex, ScAutoFor
#define LF_BOTTOM 8
#define LF_ALL (LF_LEFT | LF_TOP | LF_RIGHT | LF_BOTTOM)
-void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT nIndex, ScAutoFormatData& rData)
+void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData& rData)
{
const SvxBoxItem* pTheBox = (SvxBoxItem*)GetAttr(nCol, nRow, ATTR_BORDER);
const SvxBoxItem* pLeftBox = (SvxBoxItem*)GetAttr(nCol - 1, nRow, ATTR_BORDER);
@@ -1886,7 +1886,7 @@ void ScTable::GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
}
}
-void ScTable::SetError( SCCOL nCol, SCROW nRow, USHORT nError)
+void ScTable::SetError( SCCOL nCol, SCROW nRow, sal_uInt16 nError)
{
if (ValidColRow(nCol, nRow))
aCol[nCol].SetError( nRow, nError );
@@ -1898,7 +1898,7 @@ void ScTable::UpdateInsertTabAbs(SCTAB nTable)
aCol[i].UpdateInsertTabAbs(nTable);
}
-//UNUSED2008-05 USHORT ScTable::GetErrorData( SCCOL nCol, SCROW nRow ) const
+//UNUSED2008-05 sal_uInt16 ScTable::GetErrorData( SCCOL nCol, SCROW nRow ) const
//UNUSED2008-05 {
//UNUSED2008-05 if (ValidColRow(nCol,nRow))
//UNUSED2008-05 return aCol[nCol].GetErrorData( nRow );
@@ -1906,7 +1906,7 @@ void ScTable::UpdateInsertTabAbs(SCTAB nTable)
//UNUSED2008-05 return 0;
//UNUSED2008-05 }
-BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
+sal_Bool ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, sal_Bool bInSel,
const ScMarkData& rMark) const
{
if (rRow == MAXROW+2) // Tabellenende
@@ -1924,17 +1924,17 @@ BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
}
}
if (rCol == MAXCOL+1)
- return TRUE;
+ return sal_True;
else
{
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
while (!bStop)
{
if (ValidCol(rCol))
{
bStop = aCol[rCol].GetNextSpellingCell(rRow, bInSel, rMark);
if (bStop)
- return TRUE;
+ return sal_True;
else /*if (rRow == MAXROW+1) */
{
rCol++;
@@ -1942,10 +1942,10 @@ BOOL ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, BOOL bInSel,
}
}
else
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void ScTable::RemoveAutoSpellObj()
@@ -1954,12 +1954,12 @@ void ScTable::RemoveAutoSpellObj()
aCol[i].RemoveAutoSpellObj();
}
-BOOL ScTable::TestTabRefAbs(SCTAB nTable)
+sal_Bool ScTable::TestTabRefAbs(SCTAB nTable)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for (SCCOL i=0; i <= MAXCOL; i++)
if (aCol[i].TestTabRefAbs(nTable))
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -1968,12 +1968,12 @@ void ScTable::CompileDBFormula()
for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].CompileDBFormula();
}
-void ScTable::CompileDBFormula( BOOL bCreateFormulaString )
+void ScTable::CompileDBFormula( sal_Bool bCreateFormulaString )
{
for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].CompileDBFormula( bCreateFormulaString );
}
-void ScTable::CompileNameFormula( BOOL bCreateFormulaString )
+void ScTable::CompileNameFormula( sal_Bool bCreateFormulaString )
{
for (SCCOL i=0; i<=MAXCOL; i++) aCol[i].CompileNameFormula( bCreateFormulaString );
}
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 7c13756aab38..0548e3ce0abd 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -106,7 +106,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
}
else
{
- USHORT nAreaCount = GetPrintRangeCount();
+ sal_uInt16 nAreaCount = GetPrintRangeCount();
if ( nAreaCount > 1 )
{
// bei mehreren Bereichen nichts anzeigen:
@@ -136,13 +136,13 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
bool bSkipColBreaks = false;
bool bSkipRowBreaks = false;
- if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, sal_False, &pItem ) == SFX_ITEM_SET )
{
DBG_ASSERT( pItem->ISA(SfxUInt16Item), "falsches Item" );
bSkipColBreaks = bSkipRowBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 );
}
- if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, FALSE, &pItem) == SFX_ITEM_SET )
+ if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, sal_False, &pItem) == SFX_ITEM_SET )
{
// #i54993# when fitting to width or height, ignore only manual breaks in that direction
const ScPageScaleToItem* pScaleToItem = static_cast<const ScPageScaleToItem*>(pItem);
@@ -170,24 +170,24 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
// Mittelteil: Breaks verteilen
- BOOL bRepeatCol = ( nRepeatStartX != SCCOL_REPEAT_NONE );
- BOOL bColFound = FALSE;
+ sal_Bool bRepeatCol = ( nRepeatStartX != SCCOL_REPEAT_NONE );
+ sal_Bool bColFound = sal_False;
long nSizeX = 0;
for (nX=nStartCol; nX<=nEndCol; nX++)
{
- BOOL bStartOfPage = FALSE;
+ sal_Bool bStartOfPage = sal_False;
long nThisX = ColHidden(nX) ? 0 : pColWidth[nX];
bool bManualBreak = HasColManualBreak(nX);
if ( (nSizeX+nThisX > nPageSizeX) || (bManualBreak && !bSkipColBreaks) )
{
SetColBreak(nX, true, false);
nSizeX = 0;
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
}
else if (nX != nStartCol)
RemoveColBreak(nX, true, false);
else
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
if ( bStartOfPage && bRepeatCol && nX>nRepeatStartX && !bColFound )
{
@@ -196,7 +196,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
nPageSizeX -= ColHidden(i) ? 0 : pColWidth[i];
while (nX<=nRepeatEndX)
RemoveColBreak(++nX, true, false);
- bColFound = TRUE;
+ bColFound = sal_True;
}
nSizeX += nThisX;
@@ -206,15 +206,15 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
RemoveRowPageBreaks(nStartRow+1, nEndRow);
// And set new page breaks.
- BOOL bRepeatRow = ( nRepeatStartY != SCROW_REPEAT_NONE );
- BOOL bRowFound = FALSE;
+ sal_Bool bRepeatRow = ( nRepeatStartY != SCROW_REPEAT_NONE );
+ sal_Bool bRowFound = sal_False;
long nSizeY = 0;
ScFlatBoolRowSegments::ForwardIterator aIterHidden(*mpHiddenRows);
ScFlatUInt16RowSegments::ForwardIterator aIterHeights(*mpRowHeights);
SCROW nNextManualBreak = GetNextManualBreak(nStartRow); // -1 => no more manual breaks
for (SCROW nY = nStartRow; nY <= nEndRow; ++nY)
{
- BOOL bStartOfPage = FALSE;
+ sal_Bool bStartOfPage = sal_False;
bool bThisRowHidden = false;
aIterHidden.getValue(nY, bThisRowHidden);
long nThisY = 0;
@@ -238,12 +238,12 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
{
SetRowBreak(nY, true, false);
nSizeY = 0;
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
}
else if (nY != nStartRow)
; // page break already removed
else
- bStartOfPage = TRUE;
+ bStartOfPage = sal_True;
if ( bStartOfPage && bRepeatRow && nY>nRepeatStartY && !bRowFound )
{
@@ -256,7 +256,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
nPageSizeY -= nHeights;
if (nY <= nRepeatEndY)
RemoveRowPageBreaks(nY, nRepeatEndY);
- bRowFound = TRUE;
+ bRowFound = sal_True;
}
if (bThisRowHidden)
@@ -318,10 +318,10 @@ void ScTable::RemoveManualBreaks()
InvalidatePageBreaks();
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
-BOOL ScTable::HasManualBreaks() const
+sal_Bool ScTable::HasManualBreaks() const
{
return !maRowManualBreaks.empty() || !maColManualBreaks.empty();
}
@@ -331,7 +331,7 @@ void ScTable::SetRowManualBreaks( const ::std::set<SCROW>& rBreaks )
maRowManualBreaks = rBreaks;
InvalidatePageBreaks();
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks )
@@ -339,7 +339,7 @@ void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks )
maColManualBreaks = rBreaks;
InvalidatePageBreaks();
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) const
@@ -935,13 +935,13 @@ SCROW ScTable::CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const
namespace {
void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, ScFlatBoolRowSegments& rRowSegments,
- BYTE* pColFlags, ScBitMaskCompressedArray< SCROW, BYTE>* pRowFlags, const BYTE nFlagMask)
+ sal_uInt8* pColFlags, ScBitMaskCompressedArray< SCROW, sal_uInt8>* pRowFlags, const sal_uInt8 nFlagMask)
{
using ::sal::static_int_cast;
- pRowFlags->AndValue(0, MAXROW, static_int_cast<BYTE>(~nFlagMask));
+ pRowFlags->AndValue(0, MAXROW, static_int_cast<sal_uInt8>(~nFlagMask));
for (SCCOL i = 0; i <= MAXCOL; ++i)
- pColFlags[i] &= static_int_cast<BYTE>(~nFlagMask);
+ pColFlags[i] &= static_int_cast<sal_uInt8>(~nFlagMask);
{
// row hidden flags.
@@ -954,7 +954,7 @@ void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, ScFlatBoolRowSegments& r
break;
if (aData.mbValue)
- pRowFlags->OrValue(nRow, aData.mnRow2, static_int_cast<BYTE>(nFlagMask));
+ pRowFlags->OrValue(nRow, aData.mnRow2, static_int_cast<sal_uInt8>(nFlagMask));
nRow = aData.mnRow2 + 1;
}
@@ -988,15 +988,15 @@ void ScTable::SyncColRowFlags()
using ::sal::static_int_cast;
// Manual breaks.
- pRowFlags->AndValue(0, MAXROW, static_int_cast<BYTE>(~CR_MANUALBREAK));
+ pRowFlags->AndValue(0, MAXROW, static_int_cast<sal_uInt8>(~CR_MANUALBREAK));
for (SCCOL i = 0; i <= MAXCOL; ++i)
- pColFlags[i] &= static_int_cast<BYTE>(~CR_MANUALBREAK);
+ pColFlags[i] &= static_int_cast<sal_uInt8>(~CR_MANUALBREAK);
if (!maRowManualBreaks.empty())
{
for (set<SCROW>::const_iterator itr = maRowManualBreaks.begin(), itrEnd = maRowManualBreaks.end();
itr != itrEnd; ++itr)
- pRowFlags->OrValue(*itr, static_int_cast<BYTE>(CR_MANUALBREAK));
+ pRowFlags->OrValue(*itr, static_int_cast<sal_uInt8>(CR_MANUALBREAK));
}
if (!maColManualBreaks.empty())
@@ -1018,14 +1018,14 @@ void ScTable::SetPageSize( const Size& rSize )
if (aPageSizeTwips != rSize)
InvalidatePageBreaks();
- bPageSizeValid = TRUE;
+ bPageSizeValid = sal_True;
aPageSizeTwips = rSize;
}
else
- bPageSizeValid = FALSE;
+ bPageSizeValid = sal_False;
}
-BOOL ScTable::IsProtected() const
+sal_Bool ScTable::IsProtected() const
{
return pTabProtection.get() && pTabProtection->isProtected();
}
@@ -1038,7 +1038,7 @@ void ScTable::SetProtection(const ScTableProtection* pProtect)
pTabProtection.reset(NULL);
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
ScTableProtection* ScTable::GetProtection()
@@ -1094,20 +1094,20 @@ void ScTable::SetPageStyle( const String& rName )
{
SfxItemSet& rOldSet = pOldStyle->GetItemSet();
SfxItemSet& rNewSet = pNewStyle->GetItemSet();
- const USHORT nOldScale = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALE);
- const USHORT nOldScaleToPages = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALETOPAGES);
- const USHORT nNewScale = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALE);
- const USHORT nNewScaleToPages = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nOldScale = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nOldScaleToPages = GET_SCALEVALUE(rOldSet,ATTR_PAGE_SCALETOPAGES);
+ const sal_uInt16 nNewScale = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALE);
+ const sal_uInt16 nNewScaleToPages = GET_SCALEVALUE(rNewSet,ATTR_PAGE_SCALETOPAGES);
if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) )
- InvalidateTextWidth(NULL, NULL, FALSE, FALSE);
+ InvalidateTextWidth(NULL, NULL, sal_False, sal_False);
}
if ( pNewStyle ) // auch ohne den alten (fuer UpdateStdNames)
aPageStyle = aStrNew;
if (IsStreamValid())
- SetStreamValid(FALSE);
+ SetStreamValid(sal_False);
}
}
}
@@ -1115,11 +1115,11 @@ void ScTable::SetPageStyle( const String& rName )
void ScTable::PageStyleModified( const String& rNewName )
{
aPageStyle = rNewName;
- InvalidateTextWidth(NULL, NULL, FALSE, FALSE); // don't know what was in the style before
+ InvalidateTextWidth(NULL, NULL, sal_False, sal_False); // don't know what was in the style before
}
void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
- BOOL bNumFormatChanged, BOOL bBroadcast )
+ sal_Bool bNumFormatChanged, sal_Bool bBroadcast )
{
if ( pAdrFrom && !pAdrTo )
{
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 500ac1bb3614..41f73d3d5cf0 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -49,9 +49,9 @@
//--------------------------------------------------------------------------
-BOOL lcl_GetTextWithBreaks( const ScEditCell& rCell, ScDocument* pDoc, String& rVal )
+sal_Bool lcl_GetTextWithBreaks( const ScEditCell& rCell, ScDocument* pDoc, String& rVal )
{
- // TRUE = more than 1 paragraph
+ // sal_True = more than 1 paragraph
const EditTextObject* pData = NULL;
rCell.GetData( pData );
@@ -61,12 +61,12 @@ BOOL lcl_GetTextWithBreaks( const ScEditCell& rCell, ScDocument* pDoc, String& r
return ( rEngine.GetParagraphCount() > 1 );
}
-BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow,
+sal_Bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow,
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = FALSE;
- BOOL bDoSearch = TRUE;
- BOOL bDoBack = rSearchItem.GetBackward();
+ sal_Bool bFound = sal_False;
+ sal_Bool bDoSearch = sal_True;
+ sal_Bool bDoBack = rSearchItem.GetBackward();
String aString;
ScBaseCell* pCell;
@@ -74,7 +74,7 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
bDoSearch = rMark.IsCellMarked(nCol, nRow);
if ( bDoSearch && ((pCell = aCol[nCol].GetCell( nRow )) != NULL) )
{
- BOOL bMultiLine = FALSE;
+ sal_Bool bMultiLine = sal_False;
CellType eCellType = pCell->GetCellType();
switch (rSearchItem.GetCellType())
{
@@ -117,13 +117,13 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
if ( bDoBack )
{
xub_StrLen nTemp=nStart; nStart=nEnd; nEnd=nTemp;
- bFound = (BOOL)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd, &aSearchResult));
+ bFound = (sal_Bool)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd, &aSearchResult));
// change results to definition before 614:
--nEnd;
}
else
{
- bFound = (BOOL)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd, &aSearchResult));
+ bFound = (sal_Bool)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd, &aSearchResult));
// change results to definition before 614:
--nEnd;
}
@@ -137,7 +137,7 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
return bFound;
}
- BYTE cMatrixFlag = MM_NONE;
+ sal_uInt8 cMatrixFlag = MM_NONE;
if ( bFound &&
( (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE)
||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL) ) &&
@@ -156,13 +156,13 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
ScBaseCell* pUndoCell = pCell->CloneWithoutNote( *pUndoDoc );
pUndoDoc->PutCell( aAdr, pUndoCell);
}
- BOOL bRepeat = !rSearchItem.GetWordOnly();
+ sal_Bool bRepeat = !rSearchItem.GetWordOnly();
do
{
// wenn der gefundene Text leer ist, nicht weitersuchen,
// sonst wuerde man nie mehr aufhoeren (#35410#)
if ( nEnd < nStart || nEnd == STRING_MAXLEN )
- bRepeat = FALSE;
+ bRepeat = sal_False;
String sReplStr = rSearchItem.GetReplaceString();
if (rSearchItem.GetRegExp())
@@ -194,17 +194,17 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
if (bRepeat)
{
if ( rSearchItem.GetCommand() != SVX_SEARCHCMD_REPLACE_ALL || nStart >= nEnd )
- bRepeat = FALSE;
+ bRepeat = sal_False;
else if (bDoBack)
{
xub_StrLen nTemp=nStart; nStart=nEnd; nEnd=nTemp;
- bRepeat = ((BOOL)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd)));
+ bRepeat = ((sal_Bool)(pSearchText->SearchBkwrd(aString, &nStart, &nEnd)));
// change results to definition before 614:
--nEnd;
}
else
{
- bRepeat = ((BOOL)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd)));
+ bRepeat = ((sal_Bool)(pSearchText->SearchFrwrd(aString, &nStart, &nEnd)));
// change results to definition before 614:
--nEnd;
}
@@ -246,11 +246,11 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
return bFound;
}
-BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+sal_Bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = FALSE;
- BOOL bAll = (rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL)
+ sal_Bool bFound = sal_False;
+ sal_Bool bAll = (rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL)
||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL);
SCCOL nCol = rCol;
SCROW nRow = rRow;
@@ -271,14 +271,14 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
bFound = SearchCell(rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc);
if (!bFound)
{
- BOOL bIsEmpty;
+ sal_Bool bIsEmpty;
do
{
nCol--;
if ((SCsCOL)nCol >= 0)
bIsEmpty = aCol[nCol].IsEmptyData();
else
- bIsEmpty = TRUE;
+ bIsEmpty = sal_True;
}
while (((SCsCOL)nCol >= 0) && bIsEmpty);
}
@@ -306,7 +306,7 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
}
if (!bFound)
{
- BOOL bIsEmpty;
+ sal_Bool bIsEmpty;
nRow = nLastRow;
do
{
@@ -314,7 +314,7 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
if ((SCsCOL)nCol >= 0)
bIsEmpty = aCol[nCol].IsEmptyData();
else
- bIsEmpty = TRUE;
+ bIsEmpty = sal_True;
}
while (((SCsCOL)nCol >= 0) && bIsEmpty);
}
@@ -375,10 +375,10 @@ BOOL ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
return bFound;
}
-BOOL ScTable::SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
+sal_Bool ScTable::SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
SCCOL nCol = 0;
SCROW nRow = -1;
@@ -398,10 +398,10 @@ BOOL ScTable::SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
return (aNewMark.IsMultiMarked());
}
-BOOL ScTable::Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+sal_Bool ScTable::Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nCol = rCol;
SCROW nRow = rRow;
if (rSearchItem.GetBackward())
@@ -427,14 +427,14 @@ BOOL ScTable::Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow
return bFound;
}
-BOOL ScTable::ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
+sal_Bool ScTable::ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
{
- BOOL bOldDouble = ScColumn::bDoubleAlloc; // sollte immer FALSE sein?
+ sal_Bool bOldDouble = ScColumn::bDoubleAlloc; // sollte immer sal_False sein?
DBG_ASSERT(!bOldDouble,"bDoubleAlloc ???");
- ScColumn::bDoubleAlloc = TRUE; // fuer Undo-Doc
+ ScColumn::bDoubleAlloc = sal_True; // fuer Undo-Doc
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
SCCOL nCol = 0;
SCROW nRow = -1;
@@ -456,7 +456,7 @@ BOOL ScTable::ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
return (aNewMark.IsMultiMarked());
}
-BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+sal_Bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
ScMarkData& rMark)
{
const ScStyleSheet* pSearchStyle = (const ScStyleSheet*)
@@ -465,11 +465,11 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
SCsCOL nCol = rCol;
SCsROW nRow = rRow;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
- BOOL bSelect = rSearchItem.GetSelection();
- BOOL bRows = rSearchItem.GetRowDirection();
- BOOL bBack = rSearchItem.GetBackward();
+ sal_Bool bSelect = rSearchItem.GetSelection();
+ sal_Bool bRows = rSearchItem.GetRowDirection();
+ sal_Bool bBack = rSearchItem.GetBackward();
short nAdd = bBack ? -1 : 1;
if (bRows) // zeilenweise
@@ -486,7 +486,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
else
{
nRow = nNextRow;
- bFound = TRUE;
+ bFound = sal_True;
}
}
while (!bFound && ValidCol(nCol));
@@ -510,7 +510,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
{
nCol = i;
nRow = nNextRows[i];
- bFound = TRUE;
+ bFound = sal_True;
}
}
else // vorwaerts
@@ -521,7 +521,7 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
{
nCol = i;
nRow = nNextRows[i];
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -536,12 +536,12 @@ BOOL ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
//! einzelnes Pattern fuer Undo zurueckgeben
-BOOL ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
- ScMarkData& rMark, BOOL bIsUndo)
+sal_Bool ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
+ ScMarkData& rMark, sal_Bool bIsUndo)
{
- BOOL bRet;
+ sal_Bool bRet;
if (bIsUndo)
- bRet = TRUE;
+ bRet = sal_True;
else
bRet = SearchStyle(rSearchItem, rCol, rRow, rMark);
if (bRet)
@@ -561,19 +561,19 @@ BOOL ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
return bRet;
}
-BOOL ScTable::SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark)
+sal_Bool ScTable::SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark)
{
const ScStyleSheet* pSearchStyle = (const ScStyleSheet*)
pDocument->GetStyleSheetPool()->Find(
rSearchItem.GetSearchString(), SFX_STYLE_FAMILY_PARA );
- BOOL bSelect = rSearchItem.GetSelection();
- BOOL bBack = rSearchItem.GetBackward();
+ sal_Bool bSelect = rSearchItem.GetSelection();
+ sal_Bool bBack = rSearchItem.GetBackward();
ScMarkData aNewMark( rMark ); // Tabellen-Markierungen kopieren
aNewMark.ResetMark();
for (SCCOL i=0; i<=MAXCOL; i++)
{
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
SCsROW nRow = 0;
SCsROW nEndRow;
while (bFound && nRow <= MAXROW)
@@ -599,10 +599,10 @@ BOOL ScTable::SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark
return (aNewMark.IsMultiMarked());
}
-BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
+sal_Bool ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
ScDocument* pUndoDoc)
{
- BOOL bRet = SearchAllStyle(rSearchItem, rMark);
+ sal_Bool bRet = SearchAllStyle(rSearchItem, rMark);
if (bRet)
{
const ScStyleSheet* pReplaceStyle = (const ScStyleSheet*)
@@ -613,7 +613,7 @@ BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMar
{
if (pUndoDoc)
pDocument->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab,
- IDF_ATTRIB, TRUE, pUndoDoc, &rMark );
+ IDF_ATTRIB, sal_True, pUndoDoc, &rMark );
ApplySelectionStyle( *pReplaceStyle, rMark );
}
else
@@ -625,12 +625,12 @@ BOOL ScTable::ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMar
return bRet;
}
-BOOL ScTable::SearchAndReplace(const SvxSearchItem& rSearchItem,
+sal_Bool ScTable::SearchAndReplace(const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc)
{
- USHORT nCommand = rSearchItem.GetCommand();
- BOOL bFound = FALSE;
+ sal_uInt16 nCommand = rSearchItem.GetCommand();
+ sal_Bool bFound = sal_False;
if ( ValidColRow(rCol, rRow) ||
((nCommand == SVX_SEARCHCMD_FIND || nCommand == SVX_SEARCHCMD_REPLACE) &&
(((rCol == MAXCOLCOUNT || rCol == -1) && VALIDROW(rRow)) ||
@@ -639,13 +639,13 @@ BOOL ScTable::SearchAndReplace(const SvxSearchItem& rSearchItem,
)
)
{
- BOOL bStyles = rSearchItem.GetPattern();
+ sal_Bool bStyles = rSearchItem.GetPattern();
if (bStyles)
{
if (nCommand == SVX_SEARCHCMD_FIND)
bFound = SearchStyle(rSearchItem, rCol, rRow, rMark);
else if (nCommand == SVX_SEARCHCMD_REPLACE)
- bFound = ReplaceStyle(rSearchItem, rCol, rRow, rMark, FALSE);
+ bFound = ReplaceStyle(rSearchItem, rCol, rRow, rMark, sal_False);
else if (nCommand == SVX_SEARCHCMD_FIND_ALL)
bFound = SearchAllStyle(rSearchItem, rMark);
else if (nCommand == SVX_SEARCHCMD_REPLACE_ALL)
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index a68867f29e01..0d7e39273000 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -81,7 +81,7 @@ ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOpe
eErrorStyle( SC_VALERR_STOP ),
mnListType( ValidListType::UNSORTED )
{
- bShowInput = bShowError = FALSE;
+ bShowInput = bShowError = sal_False;
}
ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
@@ -93,7 +93,7 @@ ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOpe
eErrorStyle( SC_VALERR_STOP ),
mnListType( ValidListType::UNSORTED )
{
- bShowInput = bShowError = FALSE;
+ bShowInput = bShowError = sal_False;
}
ScValidationData::ScValidationData( const ScValidationData& r ) :
@@ -132,14 +132,14 @@ ScValidationData::~ScValidationData()
{
}
-BOOL ScValidationData::IsEmpty() const
+sal_Bool ScValidationData::IsEmpty() const
{
String aEmpty;
ScValidationData aDefault( SC_VALID_ANY, SC_COND_EQUAL, aEmpty, aEmpty, GetDocument(), ScAddress() );
return EqualEntries( aDefault );
}
-BOOL ScValidationData::EqualEntries( const ScValidationData& r ) const
+sal_Bool ScValidationData::EqualEntries( const ScValidationData& r ) const
{
// gleiche Parameter eingestellt (ohne Key)
@@ -157,17 +157,17 @@ BOOL ScValidationData::EqualEntries( const ScValidationData& r ) const
void ScValidationData::ResetInput()
{
- bShowInput = FALSE;
+ bShowInput = sal_False;
}
void ScValidationData::ResetError()
{
- bShowError = FALSE;
+ bShowError = sal_False;
}
void ScValidationData::SetInput( const String& rTitle, const String& rMsg )
{
- bShowInput = TRUE;
+ bShowInput = sal_True;
aInputTitle = rTitle;
aInputMessage = rMsg;
}
@@ -175,13 +175,13 @@ void ScValidationData::SetInput( const String& rTitle, const String& rMsg )
void ScValidationData::SetError( const String& rTitle, const String& rMsg,
ScValidErrorStyle eStyle )
{
- bShowError = TRUE;
+ bShowError = sal_True;
eErrorStyle = eStyle;
aErrorTitle = rTitle;
aErrorMessage = rMsg;
}
-BOOL ScValidationData::GetErrMsg( String& rTitle, String& rMsg,
+sal_Bool ScValidationData::GetErrMsg( String& rTitle, String& rMsg,
ScValidErrorStyle& rStyle ) const
{
rTitle = aErrorTitle;
@@ -190,15 +190,15 @@ BOOL ScValidationData::GetErrMsg( String& rTitle, String& rMsg,
return bShowError;
}
-BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
+sal_Bool ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
ScFormulaCell* pCell, Window* pParent ) const
{
ScDocument* pDocument = GetDocument();
SfxObjectShell* pDocSh = pDocument->GetDocumentShell();
if ( !pDocSh || !pDocument->CheckMacroWarn() )
- return FALSE;
+ return sal_False;
- BOOL bScriptReturnedFalse = FALSE; // Standard: kein Abbruch
+ sal_Bool bScriptReturnedFalse = sal_False; // Standard: kein Abbruch
// Set up parameters
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aParams(2);
@@ -206,7 +206,7 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
// 1) eingegebener / berechneter Wert
String aValStr = rInput;
double nValue;
- BOOL bIsValue = FALSE;
+ sal_Bool bIsValue = sal_False;
if ( pCell ) // wenn Zelle gesetzt, aus Interpret gerufen
{
bIsValue = pCell->IsValue();
@@ -227,9 +227,9 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
// use link-update flag to prevent closing the document
// while the macro is running
- BOOL bWasInLinkUpdate = pDocument->IsInLinkUpdate();
+ sal_Bool bWasInLinkUpdate = pDocument->IsInLinkUpdate();
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( TRUE );
+ pDocument->SetInLinkUpdate( sal_True );
if ( pCell )
pDocument->LockTable( rPos.Tab() );
@@ -245,17 +245,17 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
pDocument->UnlockTable( rPos.Tab() );
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( FALSE );
+ pDocument->SetInLinkUpdate( sal_False );
// Check the return value from the script
// The contents of the cell get reset if the script returns false
- BOOL bTmp = FALSE;
+ sal_Bool bTmp = sal_False;
if ( eRet == ERRCODE_NONE &&
aRet.getValueType() == getCppuBooleanType() &&
sal_True == ( aRet >>= bTmp ) &&
- bTmp == FALSE )
+ bTmp == sal_False )
{
- bScriptReturnedFalse = TRUE;
+ bScriptReturnedFalse = sal_True;
}
if ( eRet == ERRCODE_BASIC_METHOD_NOT_FOUND && !pCell )
@@ -271,9 +271,9 @@ BOOL ScValidationData::DoScript( const ScAddress& rPos, const String& rInput,
return bScriptReturnedFalse;
}
- // TRUE -> Abbruch
+ // sal_True -> Abbruch
-BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
+sal_Bool ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
ScFormulaCell* pCell, Window* pParent ) const
{
if ( SfxApplication::IsXScriptURL( aErrorTitle ) )
@@ -284,10 +284,10 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
ScDocument* pDocument = GetDocument();
SfxObjectShell* pDocSh = pDocument->GetDocumentShell();
if ( !pDocSh || !pDocument->CheckMacroWarn() )
- return FALSE;
+ return sal_False;
- BOOL bDone = FALSE;
- BOOL bRet = FALSE; // Standard: kein Abbruch
+ sal_Bool bDone = sal_False;
+ sal_Bool bRet = sal_False; // Standard: kein Abbruch
// Wenn das Dok waehrend eines Basic-Calls geladen wurde,
// ist das Sbx-Objekt evtl. nicht angelegt (?)
@@ -338,7 +338,7 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
// 1) eingegebener / berechneter Wert
String aValStr = rInput;
double nValue = 0.0;
- BOOL bIsValue = FALSE;
+ sal_Bool bIsValue = sal_False;
if ( pCell ) // wenn Zelle gesetzt, aus Interpret gerufen
{
bIsValue = pCell->IsValue();
@@ -359,9 +359,9 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
// use link-update flag to prevent closing the document
// while the macro is running
- BOOL bWasInLinkUpdate = pDocument->IsInLinkUpdate();
+ sal_Bool bWasInLinkUpdate = pDocument->IsInLinkUpdate();
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( TRUE );
+ pDocument->SetInLinkUpdate( sal_True );
if ( pCell )
pDocument->LockTable( rPos.Tab() );
@@ -371,12 +371,12 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
pDocument->UnlockTable( rPos.Tab() );
if ( !bWasInLinkUpdate )
- pDocument->SetInLinkUpdate( FALSE );
+ pDocument->SetInLinkUpdate( sal_False );
- // Eingabe abbrechen, wenn Basic-Makro FALSE zurueckgibt
- if ( eRet == ERRCODE_NONE && refRes->GetType() == SbxBOOL && refRes->GetBool() == FALSE )
- bRet = TRUE;
- bDone = TRUE;
+ // Eingabe abbrechen, wenn Basic-Makro sal_False zurueckgibt
+ if ( eRet == ERRCODE_NONE && refRes->GetType() == SbxBOOL && refRes->GetBool() == sal_False )
+ bRet = sal_True;
+ bDone = sal_True;
}
if ( !bDone && !pCell ) // Makro nicht gefunden (nur bei Eingabe)
@@ -397,9 +397,9 @@ void ScValidationData::DoCalcError( ScFormulaCell* pCell ) const
DoMacro( pCell->aPos, EMPTY_STRING, pCell, NULL );
}
- // TRUE -> Abbruch
+ // sal_True -> Abbruch
-BOOL ScValidationData::DoError( Window* pParent, const String& rInput,
+sal_Bool ScValidationData::DoError( Window* pParent, const String& rInput,
const ScAddress& rPos ) const
{
if ( eErrorStyle == SC_VALERR_MACRO )
@@ -436,20 +436,20 @@ BOOL ScValidationData::DoError( Window* pParent, const String& rInput,
}
MessBox aBox( pParent, WinBits(nStyle), aTitle, aMessage );
- USHORT nRet = aBox.Execute();
+ sal_uInt16 nRet = aBox.Execute();
return ( eErrorStyle == SC_VALERR_STOP || nRet == RET_CANCEL );
}
-BOOL ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr& rPattern,
+sal_Bool ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr& rPattern,
const ScAddress& rPos ) const
{
if ( eDataMode == SC_VALID_ANY )
- return TRUE; // alles erlaubt
+ return sal_True; // alles erlaubt
if ( rTest.GetChar(0) == '=' )
- return FALSE; // Formeln sind sonst immer ungueltig
+ return sal_False; // Formeln sind sonst immer ungueltig
if ( !rTest.Len() )
return IsIgnoreBlank(); // leer: wie eingestellt
@@ -461,27 +461,27 @@ BOOL ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr& rP
sal_uInt32 nFormat = rPattern.GetNumberFormat( pFormatter );
double nVal;
- BOOL bIsVal = pFormatter->IsNumberFormat( rTest, nFormat, nVal );
+ sal_Bool bIsVal = pFormatter->IsNumberFormat( rTest, nFormat, nVal );
ScBaseCell* pCell;
if (bIsVal)
pCell = new ScValueCell( nVal );
else
pCell = new ScStringCell( rTest );
- BOOL bRet = IsDataValid( pCell, rPos );
+ sal_Bool bRet = IsDataValid( pCell, rPos );
pCell->Delete();
return bRet;
}
-BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) const
+sal_Bool ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) const
{
if( eDataMode == SC_VALID_LIST )
return IsListValid( pCell, rPos );
double nVal = 0.0;
String aString;
- BOOL bIsVal = TRUE;
+ sal_Bool bIsVal = sal_True;
switch (pCell->GetCellType())
{
@@ -490,11 +490,11 @@ BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) c
break;
case CELLTYPE_STRING:
((ScStringCell*)pCell)->GetString( aString );
- bIsVal = FALSE;
+ bIsVal = sal_False;
break;
case CELLTYPE_EDIT:
((ScEditCell*)pCell)->GetString( aString );
- bIsVal = FALSE;
+ bIsVal = sal_False;
break;
case CELLTYPE_FORMULA:
{
@@ -510,7 +510,7 @@ BOOL ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos ) c
return IsIgnoreBlank(); // wie eingestellt
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
switch (eDataMode)
{
// SC_VALID_ANY schon oben
@@ -603,7 +603,7 @@ const String* ScStringTokenIterator::Next()
// ----------------------------------------------------------------------------
/** Returns the number format of the passed cell, or the standard format. */
-ULONG lclGetCellFormat( ScDocument& rDoc, const ScAddress& rPos )
+sal_uLong lclGetCellFormat( ScDocument& rDoc, const ScAddress& rPos )
{
const ScPatternAttr* pPattern = rDoc.GetPattern( rPos.Col(), rPos.Row(), rPos.Tab() );
if( !pPattern )
@@ -658,7 +658,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
// Use an interim matrix to create the TypedStrData below.
xMatRef = new ScMatrix(1,1);
- USHORT nErrCode = aValidationSrc.GetErrCode();
+ sal_uInt16 nErrCode = aValidationSrc.GetErrCode();
if (nErrCode)
{
/* TODO : to use later in an alert box?
@@ -690,7 +690,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
SCSIZE nCol, nRow, nCols, nRows, n = 0;
pValues->GetDimensions( nCols, nRows );
- BOOL bRef = FALSE;
+ sal_Bool bRef = sal_False;
ScRange aRange;
ScTokenArray* pArr = (ScTokenArray*) &rTokArr;
@@ -703,7 +703,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
if( ScDBData* pDBData = pDocument->GetDBCollection()->FindIndex( t->GetIndex() ) )
{
pDBData->GetArea(aRange);
- bRef = TRUE;
+ bRef = sal_True;
}
}
else if (t->GetOpCode() == ocName)
@@ -711,7 +711,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
ScRangeData* pName = pDocument->GetRangeName()->FindIndex( t->GetIndex() );
if (pName && pName->IsReference(aRange))
{
- bRef = TRUE;
+ bRef = sal_True;
}
}
else if (t->GetType() != svIndex)
@@ -719,7 +719,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
t->CalcAbsIfRel(rPos);
if (pArr->IsValidReference(aRange))
{
- bRef = TRUE;
+ bRef = sal_True;
}
}
}
@@ -754,7 +754,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
}
else
{
- USHORT nErr = pMatVal->GetError();
+ sal_uInt16 nErr = pMatVal->GetError();
if( 0 != nErr )
{
@@ -817,7 +817,7 @@ bool ScValidationData::FillSelectionList( TypedScStrCollection& rStrColl, const
// *** try if formula is a string list ***
bool bSortList = (mnListType == ValidListType::SORTEDASCENDING);
- UINT32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
+ sal_uInt32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
ScStringTokenIterator aIt( *pTokArr );
for( const String* pString = aIt.First(); pString && aIt.Ok(); pString = aIt.Next() )
{
@@ -869,7 +869,7 @@ bool ScValidationData::IsListValid( ScBaseCell* pCell, const ScAddress& rPos ) c
// *** try if formula is a string list ***
- UINT32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
+ sal_uInt32 nFormat = lclGetCellFormat( *GetDocument(), rPos );
ScStringTokenIterator aIt( *pTokArr );
for( const String* pString = aIt.First(); pString && aIt.Ok(); pString = aIt.Next() )
{
@@ -913,9 +913,9 @@ ScValidationDataList::ScValidationDataList(const ScValidationDataList& rList) :
{
// fuer Ref-Undo - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone() );
//! sortierte Eintraege aus rList schneller einfuegen ???
@@ -926,9 +926,9 @@ ScValidationDataList::ScValidationDataList(ScDocument* pNewDoc,
{
// fuer neues Dokument - echte Kopie mit neuen Tokens!
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
InsertNew( rList[i]->Clone(pNewDoc) );
//! sortierte Eintraege aus rList schneller einfuegen ???
@@ -938,8 +938,8 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
{
//! binaer suchen
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
if ((*this)[i]->GetKey() == nKey)
return (*this)[i];
@@ -949,44 +949,44 @@ ScValidationData* ScValidationDataList::GetData( sal_uInt32 nKey )
void ScValidationDataList::CompileXML()
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->CompileXML();
}
void ScValidationDataList::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz);
}
void ScValidationDataList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
(*this)[i]->UpdateMoveTab( nOldPos, nNewPos );
}
bool ScValidationDataList::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
- USHORT nCount = Count();
- for (USHORT i=0; !bAllMarked && i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; !bAllMarked && i<nCount; i++)
bAllMarked = (*this)[i]->MarkUsedExternalReferences();
return bAllMarked;
}
-BOOL ScValidationDataList::operator==( const ScValidationDataList& r ) const
+sal_Bool ScValidationDataList::operator==( const ScValidationDataList& r ) const
{
// fuer Ref-Undo - interne Variablen werden nicht verglichen
- USHORT nCount = Count();
- BOOL bEqual = ( nCount == r.Count() );
- for (USHORT i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
+ sal_uInt16 nCount = Count();
+ sal_Bool bEqual = ( nCount == r.Count() );
+ for (sal_uInt16 i=0; i<nCount && bEqual; i++) // Eintraege sind sortiert
if ( !(*this)[i]->EqualEntries(*r[i]) ) // Eintraege unterschiedlich ?
- bEqual = FALSE;
+ bEqual = sal_False;
return bEqual;
}
diff --git a/sc/source/core/inc/addinlis.hxx b/sc/source/core/inc/addinlis.hxx
index 6c0f98386920..11831701cef1 100644
--- a/sc/source/core/inc/addinlis.hxx
+++ b/sc/source/core/inc/addinlis.hxx
@@ -71,7 +71,7 @@ public:
com::sun::star::sheet::XVolatileResult> xVR );
static void RemoveDocument( ScDocument* pDocument );
- BOOL HasDocument( ScDocument* pDoc ) const { return pDocs->Seek_Entry( pDoc ); }
+ sal_Bool HasDocument( ScDocument* pDoc ) const { return pDocs->Seek_Entry( pDoc ); }
void AddDocument( ScDocument* pDoc ) { pDocs->Insert( pDoc ); }
const com::sun::star::uno::Any& GetResult() const { return aResult; }
diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx
index 4d0997fce63d..46b147eab142 100644
--- a/sc/source/core/inc/adiasync.hxx
+++ b/sc/source/core/inc/adiasync.hxx
@@ -59,32 +59,32 @@ private:
};
ScAddInDocs* pDocs; // Liste der benutzenden Dokumente
FuncData* pFuncData; // Zeiger auf die Daten in der Collection
- ULONG nHandle; // wird von double auf ULONG gecasted
+ sal_uLong nHandle; // wird von double auf sal_uLong gecasted
ParamType eType; // PTR_DOUBLE oder PTR_STRING Ergebnis
- BOOL bValid; // ob Wert gueltig
+ sal_Bool bValid; // ob Wert gueltig
public:
// cTor nur wenn ScAddInAsync::Get fehlschlaegt!
// nIndex: Index aus der FunctionCollection
- ScAddInAsync( ULONG nHandle, USHORT nIndex,
+ ScAddInAsync( sal_uLong nHandle, sal_uInt16 nIndex,
ScDocument* pDoc );
// default-cTor nur fuer das eine globale aSeekObj !!!
ScAddInAsync();
virtual ~ScAddInAsync();
- static ScAddInAsync* Get( ULONG nHandle );
- static void CallBack( ULONG nHandle, void* pData );
+ static ScAddInAsync* Get( sal_uLong nHandle );
+ static void CallBack( sal_uLong nHandle, void* pData );
static void RemoveDocument( ScDocument* pDocument );
- BOOL IsValid() const { return bValid; }
+ sal_Bool IsValid() const { return bValid; }
ParamType GetType() const { return eType; }
double GetValue() const { return nVal; }
const String& GetString() const { return *pStr; }
- BOOL HasDocument( ScDocument* pDoc ) const
+ sal_Bool HasDocument( ScDocument* pDoc ) const
{ return pDocs->Seek_Entry( pDoc ); }
void AddDocument( ScDocument* pDoc ) { pDocs->Insert( pDoc ); }
// Vergleichsoperatoren fuer PtrArrSort
- BOOL operator < ( const ScAddInAsync& r ) { return nHandle < r.nHandle; }
- BOOL operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
+ sal_Bool operator < ( const ScAddInAsync& r ) { return nHandle < r.nHandle; }
+ sal_Bool operator ==( const ScAddInAsync& r ) { return nHandle == r.nHandle; }
};
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 13384b033628..a912a8c6e550 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -47,13 +47,13 @@ private:
ScBroadcastArea* pUpdateChainNext;
SvtBroadcaster aBroadcaster;
ScRange aRange;
- ULONG nRefCount;
- BOOL bInUpdateChain;
+ sal_uLong nRefCount;
+ sal_Bool bInUpdateChain;
public:
ScBroadcastArea( const ScRange& rRange )
: pUpdateChainNext( NULL ), aRange( rRange ),
- nRefCount( 0 ), bInUpdateChain( FALSE ) {}
+ nRefCount( 0 ), bInUpdateChain( sal_False ) {}
inline SvtBroadcaster& GetBroadcaster() { return aBroadcaster; }
inline const SvtBroadcaster& GetBroadcaster() const { return aBroadcaster; }
inline void UpdateRange( const ScRange& rNewRange )
@@ -62,12 +62,12 @@ public:
inline const ScAddress& GetStart() const { return aRange.aStart; }
inline const ScAddress& GetEnd() const { return aRange.aEnd; }
inline void IncRef() { ++nRefCount; }
- inline ULONG DecRef() { return nRefCount ? --nRefCount : 0; }
- inline ULONG GetRef() { return nRefCount; }
+ inline sal_uLong DecRef() { return nRefCount ? --nRefCount : 0; }
+ inline sal_uLong GetRef() { return nRefCount; }
inline ScBroadcastArea* GetUpdateChainNext() const { return pUpdateChainNext; }
inline void SetUpdateChainNext( ScBroadcastArea* p ) { pUpdateChainNext = p; }
- inline BOOL IsInUpdateChain() const { return bInUpdateChain; }
- inline void SetInUpdateChain( BOOL b ) { bInUpdateChain = b; }
+ inline sal_Bool IsInUpdateChain() const { return bInUpdateChain; }
+ inline void SetInUpdateChain( sal_Bool b ) { bInUpdateChain = b; }
/** Equalness of this or range. */
inline bool operator==( const ScBroadcastArea & rArea ) const;
@@ -139,7 +139,7 @@ private:
whether there would be an overflow when adding an area, setting the
proper state if so.
- @return TRUE if a HardRecalcState is effective and area is not to be
+ @return sal_True if a HardRecalcState is effective and area is not to be
added.
*/
bool CheckHardRecalcStateCondition() const;
@@ -165,7 +165,7 @@ public:
as InsertListeningArea(), so use that instead.
@return
- TRUE if rpArea passed was NULL and ScBroadcastArea is newly
+ sal_True if rpArea passed was NULL and ScBroadcastArea is newly
created.
*/
bool StartListeningArea( const ScRange& rRange,
@@ -181,9 +181,9 @@ public:
void EndListeningArea( const ScRange& rRange,
SvtListener* pListener,
ScBroadcastArea*& rpArea );
- BOOL AreaBroadcast( const ScHint& rHint ) const;
- /// @return TRUE if at least one broadcast occurred.
- BOOL AreaBroadcastInRange( const ScRange& rRange,
+ sal_Bool AreaBroadcast( const ScHint& rHint ) const;
+ /// @return sal_True if at least one broadcast occurred.
+ sal_Bool AreaBroadcastInRange( const ScRange& rRange,
const ScHint& rHint ) const;
void DelBroadcastAreasInRange( const ScRange& rRange );
void UpdateRemove( UpdateRefMode eUpdateRefMode,
@@ -245,7 +245,7 @@ private:
ScDocument *pDoc;
ScBroadcastArea *pUpdateChain;
ScBroadcastArea *pEOUpdateChain;
- ULONG nInBulkBroadcast;
+ sal_uLong nInBulkBroadcast;
inline SCSIZE ComputeSlotOffset( const ScAddress& rAddress ) const;
void ComputeAreaPoints( const ScRange& rRange,
@@ -259,9 +259,9 @@ public:
SvtListener* pListener );
void EndListeningArea( const ScRange& rRange,
SvtListener* pListener );
- BOOL AreaBroadcast( const ScHint& rHint ) const;
+ sal_Bool AreaBroadcast( const ScHint& rHint ) const;
// return: at least one broadcast occurred
- BOOL AreaBroadcastInRange( const ScRange& rRange, const ScHint& rHint ) const;
+ sal_Bool AreaBroadcastInRange( const ScRange& rRange, const ScHint& rHint ) const;
void DelBroadcastAreasInRange( const ScRange& rRange );
void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
const ScRange& rRange,
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index 4f0652753e65..c2f7d9b4497b 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -41,16 +41,16 @@ class SvStream;
class ScDdeLink : public ::sfx2::SvBaseLink, public SvtBroadcaster
{
private:
-static BOOL bIsInUpdate;
+static sal_Bool bIsInUpdate;
ScDocument* pDoc;
String aAppl; // Verbindungsdaten
String aTopic;
String aItem;
- BYTE nMode; // Zahlformat-Modus
+ sal_uInt8 nMode; // Zahlformat-Modus
- BOOL bNeedUpdate; // wird gesetzt, wenn Update nicht moeglich war
+ sal_Bool bNeedUpdate; // wird gesetzt, wenn Update nicht moeglich war
ScMatrixRef pResult; // Ergebnis
@@ -59,7 +59,7 @@ public:
ScDdeLink( ScDocument* pD,
const String& rA, const String& rT, const String& rI,
- BYTE nM );
+ sal_uInt8 nM );
ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr );
ScDdeLink( ScDocument* pD, const ScDdeLink& rOther );
virtual ~ScDdeLink();
@@ -84,14 +84,14 @@ public:
const String& GetAppl() const { return aAppl; }
const String& GetTopic() const { return aTopic; }
const String& GetItem() const { return aItem; }
- BYTE GetMode() const { return nMode; }
+ sal_uInt8 GetMode() const { return nMode; }
void ResetValue(); // Wert zuruecksetzen
void TryUpdate();
- BOOL NeedsUpdate() const { return bNeedUpdate; }
+ sal_Bool NeedsUpdate() const { return bNeedUpdate; }
- static BOOL IsInUpdate() { return bIsInUpdate; }
+ static sal_Bool IsInUpdate() { return bIsInUpdate; }
};
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index edecaadb39f0..926c44c06317 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -53,14 +53,14 @@ struct ScCompare
{
double nVal[2];
String* pVal[2];
- BOOL bVal[2];
- BOOL bEmpty[2];
+ sal_Bool bVal[2];
+ sal_Bool bEmpty[2];
ScCompare( String* p1, String* p2 )
{
pVal[ 0 ] = p1;
pVal[ 1 ] = p2;
- bEmpty[0] = FALSE;
- bEmpty[1] = FALSE;
+ bEmpty[0] = sal_False;
+ bEmpty[1] = sal_False;
}
};
@@ -125,9 +125,9 @@ public:
/// Could string be a regular expression?
/// If pDoc!=NULL the document options are taken into account and if
- /// RegularExpressions are disabled the function returns FALSE regardless
+ /// RegularExpressions are disabled the function returns sal_False regardless
/// of the string content.
- static BOOL MayBeRegExp( const String& rStr, const ScDocument* pDoc );
+ static sal_Bool MayBeRegExp( const String& rStr, const ScDocument* pDoc );
/// Fail safe division, returning an errDivisionByZero coded into a double
/// if denominator is 0.0
@@ -136,7 +136,7 @@ public:
ScMatrixRef GetNewMat(SCSIZE nC, SCSIZE nR);
private:
static ScTokenStack* pGlobalStack;
- static BOOL bGlobalStackInUse;
+ static sal_Bool bGlobalStackInUse;
formula::FormulaTokenIterator aCode;
ScAddress aPos;
@@ -153,26 +153,26 @@ private:
String aTempStr; // for GetString()
ScTokenStack* pStackObj; // contains the stacks
formula::FormulaToken** pStack; // the current stack
- USHORT nGlobalError; // global (local to this formula expression) error
- USHORT sp; // stack pointer
- USHORT maxsp; // the maximal used stack pointer
- ULONG nFuncFmtIndex; // NumberFormatIndex of a function
- ULONG nCurFmtIndex; // current NumberFormatIndex
- ULONG nRetFmtIndex; // NumberFormatIndex of an expression, if any
+ sal_uInt16 nGlobalError; // global (local to this formula expression) error
+ sal_uInt16 sp; // stack pointer
+ sal_uInt16 maxsp; // the maximal used stack pointer
+ sal_uLong nFuncFmtIndex; // NumberFormatIndex of a function
+ sal_uLong nCurFmtIndex; // current NumberFormatIndex
+ sal_uLong nRetFmtIndex; // NumberFormatIndex of an expression, if any
short nFuncFmtType; // NumberFormatType of a function
short nCurFmtType; // current NumberFormatType
short nRetFmtType; // NumberFormatType of an expression
- USHORT mnStringNoValueError; // the error set in ConvertStringToValue() if no value
- BOOL glSubTotal; // flag for subtotal functions
- BYTE cPar; // current count of parameters
- BOOL bCalcAsShown; // precision as shown
- BOOL bMatrixFormula; // formula cell is a matrix formula
+ sal_uInt16 mnStringNoValueError; // the error set in ConvertStringToValue() if no value
+ sal_Bool glSubTotal; // flag for subtotal functions
+ sal_uInt8 cPar; // current count of parameters
+ sal_Bool bCalcAsShown; // precision as shown
+ sal_Bool bMatrixFormula; // formula cell is a matrix formula
//---------------------------------Funktionen in interpre.cxx---------
// nMust <= nAct <= nMax ? ok : PushError
-inline BOOL MustHaveParamCount( short nAct, short nMust );
-inline BOOL MustHaveParamCount( short nAct, short nMust, short nMax );
-inline BOOL MustHaveParamCountMin( short nAct, short nMin );
+inline sal_Bool MustHaveParamCount( short nAct, short nMust );
+inline sal_Bool MustHaveParamCount( short nAct, short nMust, short nMax );
+inline sal_Bool MustHaveParamCountMin( short nAct, short nMin );
void PushParameterExpected();
void PushIllegalParameter();
void PushIllegalArgument();
@@ -183,8 +183,8 @@ void PushNA();
//-------------------------------------------------------------------------
void ReplaceCell( ScAddress& ); // for TableOp
void ReplaceCell( SCCOL& rCol, SCROW& rRow, SCTAB& rTab ); // for TableOp
-BOOL IsTableOpInRange( const ScRange& );
-ULONG GetCellNumberFormat( const ScAddress&, const ScBaseCell* );
+sal_Bool IsTableOpInRange( const ScRange& );
+sal_uLong GetCellNumberFormat( const ScAddress&, const ScBaseCell* );
double ConvertStringToValue( const String& );
double GetCellValue( const ScAddress&, const ScBaseCell* );
double GetCellValueOrZero( const ScAddress&, const ScBaseCell* );
@@ -192,26 +192,26 @@ double GetValueCellValue( const ScAddress&, const ScValueCell* );
ScBaseCell* GetCell( const ScAddress& rPos )
{ return pDok->GetCell( rPos ); }
void GetCellString( String& rStr, const ScBaseCell* pCell );
-inline USHORT GetCellErrCode( const ScBaseCell* pCell )
+inline sal_uInt16 GetCellErrCode( const ScBaseCell* pCell )
{ return pCell ? pCell->GetErrorCode() : 0; }
inline CellType GetCellType( const ScBaseCell* pCell )
{ return pCell ? pCell->GetCellType() : CELLTYPE_NONE; }
/// Really empty or inherited emptiness.
-inline BOOL HasCellEmptyData( const ScBaseCell* pCell )
- { return pCell ? pCell->HasEmptyData() : TRUE; }
+inline sal_Bool HasCellEmptyData( const ScBaseCell* pCell )
+ { return pCell ? pCell->HasEmptyData() : sal_True; }
/// This includes inherited emptiness, which usually is regarded as value!
-inline BOOL HasCellValueData( const ScBaseCell* pCell )
- { return pCell ? pCell->HasValueData() : FALSE; }
+inline sal_Bool HasCellValueData( const ScBaseCell* pCell )
+ { return pCell ? pCell->HasValueData() : sal_False; }
/// Not empty and not value.
-inline BOOL HasCellStringData( const ScBaseCell* pCell )
- { return pCell ? pCell->HasStringData() : FALSE; }
+inline sal_Bool HasCellStringData( const ScBaseCell* pCell )
+ { return pCell ? pCell->HasStringData() : sal_False; }
-BOOL CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
-BOOL CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
-BOOL CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr);
+sal_Bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
+sal_Bool CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
+sal_Bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
//-----------------------------------------------------------------------------
// Stack operations
@@ -266,7 +266,7 @@ inline bool IfErrorPushError()
result. Also obtain number format and type if _both_, type and index
pointer, are not NULL. */
void PushCellResultToken( bool bDisplayEmptyAsString, const ScAddress & rAddress,
- short * pRetTypeExpr, ULONG * pRetIndexExpr );
+ short * pRetTypeExpr, sal_uLong * pRetIndexExpr );
formula::FormulaTokenRef PopToken();
void Pop();
@@ -279,7 +279,7 @@ void ValidateRef( const ScRefList & rRefList );
void SingleRefToVars( const ScSingleRefData & rRef, SCCOL & rCol, SCROW & rRow, SCTAB & rTab );
void PopSingleRef( ScAddress& );
void PopSingleRef(SCCOL& rCol, SCROW &rRow, SCTAB& rTab);
-void DoubleRefToRange( const ScComplexRefData&, ScRange&, BOOL bDontCheckForTableOp = FALSE );
+void DoubleRefToRange( const ScComplexRefData&, ScRange&, sal_Bool bDontCheckForTableOp = sal_False );
/** If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of
ScComplexRefData.
Else if StackVar svRefList return values of the ScComplexRefData where
@@ -289,26 +289,26 @@ void DoubleRefToRange( const ScComplexRefData&, ScRange&, BOOL bDontCheckForTabl
while(nParamCount--) PopDoubleRef(aRange,nParamCount,nRefInList);
*/
void PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRefInList );
-void PopDoubleRef( ScRange&, BOOL bDontCheckForTableOp = FALSE );
+void PopDoubleRef( ScRange&, sal_Bool bDontCheckForTableOp = sal_False );
void DoubleRefToVars( const ScToken* p,
SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp = FALSE );
+ sal_Bool bDontCheckForTableOp = sal_False );
ScDBRangeBase* PopDoubleRef();
void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp = FALSE );
-BOOL PopDoubleRefOrSingleRef( ScAddress& rAdr );
+ sal_Bool bDontCheckForTableOp = sal_False );
+sal_Bool PopDoubleRefOrSingleRef( ScAddress& rAdr );
void PopDoubleRefPushMatrix();
// If MatrixFormula: convert formula::svDoubleRef to svMatrix, create JumpMatrix.
// Else convert area reference parameters marked as ForceArray to array.
-// Returns TRUE if JumpMatrix created.
+// Returns sal_True if JumpMatrix created.
bool ConvertMatrixParameters();
inline void MatrixDoubleRefToMatrix(); // if MatrixFormula: PopDoubleRefPushMatrix
// If MatrixFormula or ForceArray: ConvertMatrixParameters()
inline bool MatrixParameterConversion();
ScMatrixRef PopMatrix();
-//void PushByte(BYTE nVal);
+//void PushByte(sal_uInt8 nVal);
void PushDouble(double nVal);
void PushInt( int nVal );
void PushStringBuffer( const sal_Unicode* pString );
@@ -317,20 +317,20 @@ void PushSingleRef(SCCOL nCol, SCROW nRow, SCTAB nTab);
void PushDoubleRef(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2);
void PushMatrix(ScMatrix* pMat);
-void PushError( USHORT nError );
+void PushError( sal_uInt16 nError );
/// Raw stack type without default replacements.
formula::StackVar GetRawStackType();
/// Stack type with replacement of defaults, e.g. svMissing and formula::svEmptyCell will result in formula::svDouble.
formula::StackVar GetStackType();
// peek StackType of Parameter, Parameter 1 == TOS, 2 == TOS-1, ...
-formula::StackVar GetStackType( BYTE nParam );
-BYTE GetByte() { return cPar; }
+formula::StackVar GetStackType( sal_uInt8 nParam );
+sal_uInt8 GetByte() { return cPar; }
// generiert aus DoubleRef positionsabhaengige SingleRef
-BOOL DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr );
+sal_Bool DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr );
double GetDouble();
double GetDoubleWithDefault(double nDefault);
-BOOL IsMissing();
-BOOL GetBool() { return GetDouble() != 0.0; }
+sal_Bool IsMissing();
+sal_Bool GetBool() { return GetDouble() != 0.0; }
const String& GetString();
// pop matrix and obtain one element, upper left or according to jump matrix
ScMatValType GetDoubleOrStringFromMatrix( double& rDouble, String& rString );
@@ -344,15 +344,15 @@ void ScTableOp(); // Mehrfachoperationen
void ScErrCell(); // Sonderbehandlung
// Fehlerzelle
//-----------------------------allgemeine Hilfsfunktionen
-void SetMaxIterationCount(USHORT n);
+void SetMaxIterationCount(sal_uInt16 n);
inline void CurFmtToFuncFmt()
{ nFuncFmtType = nCurFmtType; nFuncFmtIndex = nCurFmtIndex; }
// Check for String overflow of rResult+rAdd and set error and erase rResult
-// if so. Return TRUE if ok, FALSE if overflow
-inline BOOL CheckStringResultLen( String& rResult, const String& rAdd );
+// if so. Return sal_True if ok, sal_False if overflow
+inline sal_Bool CheckStringResultLen( String& rResult, const String& rAdd );
// Set error according to rVal, and set rVal to 0.0 if there was an error.
inline void TreatDoubleError( double& rVal );
-// Lookup using ScLookupCache, @returns TRUE if found and result address
+// Lookup using ScLookupCache, @returns sal_True if found and result address
bool LookupQueryWithCache( ScAddress & o_rResultPos,
const ScQueryParam & rParam ) const;
@@ -449,20 +449,20 @@ void ScJis();
void ScAsc();
void ScUnicode();
void ScUnichar();
-void ScMin( BOOL bTextAsZero = FALSE );
-void ScMax( BOOL bTextAsZero = FALSE );
-double IterateParameters( ScIterFunc, BOOL bTextAsZero = FALSE );
+void ScMin( sal_Bool bTextAsZero = sal_False );
+void ScMax( sal_Bool bTextAsZero = sal_False );
+double IterateParameters( ScIterFunc, sal_Bool bTextAsZero = sal_False );
void ScSumSQ();
void ScSum();
void ScProduct();
-void ScAverage( BOOL bTextAsZero = FALSE );
+void ScAverage( sal_Bool bTextAsZero = sal_False );
void ScCount();
void ScCount2();
-void GetStVarParams( double& rVal, double& rValCount, BOOL bTextAsZero = FALSE );
-void ScVar( BOOL bTextAsZero = FALSE );
-void ScVarP( BOOL bTextAsZero = FALSE );
-void ScStDev( BOOL bTextAsZero = FALSE );
-void ScStDevP( BOOL bTextAsZero = FALSE );
+void GetStVarParams( double& rVal, double& rValCount, sal_Bool bTextAsZero = sal_False );
+void ScVar( sal_Bool bTextAsZero = sal_False );
+void ScVarP( sal_Bool bTextAsZero = sal_False );
+void ScStDev( sal_Bool bTextAsZero = sal_False );
+void ScStDevP( sal_Bool bTextAsZero = sal_False );
void ScColumns();
void ScRows();
void ScTables();
@@ -478,13 +478,13 @@ void ScHLookup();
void ScVLookup();
void ScSubTotal();
-// If upon call rMissingField==TRUE then the database field parameter may be
+// If upon call rMissingField==sal_True then the database field parameter may be
// missing (Xcl DCOUNT() syntax), or may be faked as missing by having the
// value 0.0 or being exactly the entire database range reference (old SO
-// compatibility). If this was the case then rMissingField is set to TRUE upon
-// return. If rMissingField==FALSE upon call all "missing cases" are considered
+// compatibility). If this was the case then rMissingField is set to sal_True upon
+// return. If rMissingField==sal_False upon call all "missing cases" are considered
// to be an error.
-ScDBQueryParamBase* GetDBParams( BOOL& rMissingField );
+ScDBQueryParamBase* GetDBParams( sal_Bool& rMissingField );
void DBIterator( ScIterFunc );
void ScDBSum();
@@ -522,8 +522,8 @@ void ScConcat();
void ScExternal();
void ScMissing();
void ScMacro();
-BOOL SetSbxVariable( SbxVariable* pVar, const ScAddress& );
-BOOL SetSbxVariable( SbxVariable* pVar, SCCOL nCol, SCROW nRow, SCTAB nTab );
+sal_Bool SetSbxVariable( SbxVariable* pVar, const ScAddress& );
+sal_Bool SetSbxVariable( SbxVariable* pVar, SCCOL nCol, SCROW nRow, SCTAB nTab );
void ScErrorType();
void ScDBArea();
void ScColRowNameAuto();
@@ -537,13 +537,13 @@ void ScTTT();
/** Obtain the date serial number for a given date.
@param bStrict
- If FALSE, nYear < 100 takes the two-digit year setting into account,
+ If sal_False, nYear < 100 takes the two-digit year setting into account,
and rollover of invalid calendar dates takes place, e.g. 1999-02-31 =>
1999-03-03.
- If TRUE, the date passed must be a valid Gregorian calendar date. No
+ If sal_True, the date passed must be a valid Gregorian calendar date. No
two-digit expanding or rollover is done.
*/
-double GetDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, bool bStrict );
+double GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict );
void ScGetActDate();
void ScGetActTime();
@@ -653,28 +653,28 @@ void ScSumX2DY2();
void ScSumXMY2();
void ScGrowth();
// multiple Regression: Varianzen der Koeffizienten
-BOOL RGetVariances( ScMatrix* pV, ScMatrix* pX, SCSIZE nC, SCSIZE nR,
- BOOL bSwapColRow, BOOL bZeroConstant );
-void Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,BOOL bConstant,SCSIZE N,SCSIZE M,BYTE nCase);
-ScMatrixRef Calculate2(const BOOL bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,BYTE nCase);
+sal_Bool RGetVariances( ScMatrix* pV, ScMatrix* pX, SCSIZE nC, SCSIZE nR,
+ sal_Bool bSwapColRow, sal_Bool bZeroConstant );
+void Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,sal_Bool bConstant,SCSIZE N,SCSIZE M,sal_uInt8 nCase);
+ScMatrixRef Calculate2(const sal_Bool bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,sal_uInt8 nCase);
bool Calculate3(const SCSIZE M ,ScMatrixRef& pQ);
-bool Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,BOOL bConstant,SCSIZE N,SCSIZE M);
+bool Calculate4(sal_Bool _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,sal_Bool bConstant,SCSIZE N,SCSIZE M);
bool CalculateSkew(double& fSum,double& fCount,double& vSum,std::vector<double>& values);
-void CalculateSlopeIntercept(BOOL bSlope);
-void CalculateSmallLarge(BOOL bSmall);
-void CalculatePearsonCovar(BOOL _bPearson,BOOL _bStexy);
-bool CalculateTest( BOOL _bTemplin
+void CalculateSlopeIntercept(sal_Bool bSlope);
+void CalculateSmallLarge(sal_Bool bSmall);
+void CalculatePearsonCovar(sal_Bool _bPearson,sal_Bool _bStexy);
+bool CalculateTest( sal_Bool _bTemplin
,const SCSIZE nC1, const SCSIZE nC2,const SCSIZE nR1,const SCSIZE nR2
,const ScMatrixRef& pMat1,const ScMatrixRef& pMat2
,double& fT,double& fF);
-void CalculateLookup(BOOL HLookup);
+void CalculateLookup(sal_Bool HLookup);
bool FillEntry(ScQueryEntry& rEntry);
-void CalculateAddSub(BOOL _bSub);
-void CalculateTrendGrowth(BOOL _bGrowth);
-void CalulateRGPRKP(BOOL _bRKP);
-void CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2);
+void CalculateAddSub(sal_Bool _bSub);
+void CalculateTrendGrowth(sal_Bool _bGrowth);
+void CalulateRGPRKP(sal_Bool _bRKP);
+void CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2);
void CalculateMatrixValue(const ScMatrix* pMat,SCSIZE nC,SCSIZE nR);
-bool CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY);
+bool CheckMatrix(sal_Bool _bLOG,sal_Bool _bTrendGrowth,sal_uInt8& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY);
void ScRGP();
void ScRKP();
@@ -685,7 +685,7 @@ void ScBadName();
// Statistik:
double phi(double x);
double integralPhi(double x);
-double taylor(double* pPolynom, USHORT nMax, double x);
+double taylor(double* pPolynom, sal_uInt16 nMax, double x);
double gauss(double x);
double gaussinv(double x);
double GetBetaDist(double x, double alpha, double beta); //cumulative distribution function
@@ -744,8 +744,8 @@ void ScSkew();
void ScMedian();
double GetMedian( ::std::vector<double> & rArray );
double GetPercentile( ::std::vector<double> & rArray, double fPercentile );
-void GetNumberSequenceArray( BYTE nParamCount, ::std::vector<double>& rArray );
-void GetSortArray(BYTE nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
+void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector<double>& rArray );
+void GetSortArray(sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
void ScModalValue();
void ScAveDev();
@@ -796,17 +796,17 @@ public:
formula::StackVar Interpret();
- void SetError(USHORT nError)
+ void SetError(sal_uInt16 nError)
{ if (nError && !nGlobalError) nGlobalError = nError; }
- USHORT GetError() const { return nGlobalError; }
+ sal_uInt16 GetError() const { return nGlobalError; }
formula::StackVar GetResultType() const { return xResult->GetType(); }
const String& GetStringResult() const { return xResult->GetString(); }
double GetNumResult() const { return xResult->GetDouble(); }
formula::FormulaTokenRef
GetResultToken() const { return xResult; }
short GetRetFormatType() const { return nRetFmtType; }
- ULONG GetRetFormatIndex() const { return nRetFmtIndex; }
+ sal_uLong GetRetFormatIndex() const { return nRetFmtIndex; }
};
@@ -836,48 +836,48 @@ inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap()
}
-inline BOOL ScInterpreter::MustHaveParamCount( short nAct, short nMust )
+inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust )
{
if ( nAct == nMust )
- return TRUE;
+ return sal_True;
if ( nAct < nMust )
PushParameterExpected();
else
PushIllegalParameter();
- return FALSE;
+ return sal_False;
}
-inline BOOL ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax )
+inline sal_Bool ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax )
{
if ( nMust <= nAct && nAct <= nMax )
- return TRUE;
+ return sal_True;
if ( nAct < nMust )
PushParameterExpected();
else
PushIllegalParameter();
- return FALSE;
+ return sal_False;
}
-inline BOOL ScInterpreter::MustHaveParamCountMin( short nAct, short nMin )
+inline sal_Bool ScInterpreter::MustHaveParamCountMin( short nAct, short nMin )
{
if ( nAct >= nMin )
- return TRUE;
+ return sal_True;
PushParameterExpected();
- return FALSE;
+ return sal_False;
}
-inline BOOL ScInterpreter::CheckStringResultLen( String& rResult, const String& rAdd )
+inline sal_Bool ScInterpreter::CheckStringResultLen( String& rResult, const String& rAdd )
{
- if ( (ULONG) rResult.Len() + rAdd.Len() > STRING_MAXLEN )
+ if ( (sal_uLong) rResult.Len() + rAdd.Len() > STRING_MAXLEN )
{
SetError( errStringOverflow );
rResult.Erase();
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -885,7 +885,7 @@ inline void ScInterpreter::TreatDoubleError( double& rVal )
{
if ( !::rtl::math::isFinite( rVal ) )
{
- USHORT nErr = GetDoubleErrorValue( rVal );
+ sal_uInt16 nErr = GetDoubleErrorValue( rVal );
if ( nErr )
SetError( nErr );
else
diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx
index 8089d6653730..667a8918a2f6 100644
--- a/sc/source/core/inc/jumpmatrix.hxx
+++ b/sc/source/core/inc/jumpmatrix.hxx
@@ -122,7 +122,7 @@ public:
short nStart, short nNext,
short nStop = SHRT_MAX )
{
- pJump[ (ULONG)nCol * nRows + nRow ].
+ pJump[ (sal_uLong)nCol * nRows + nRow ].
SetJump( fBool, nStart, nNext, nStop);
}
void GetJump( SCSIZE nCol, SCSIZE nRow, double& rBool,
@@ -144,15 +144,15 @@ public:
nCol = 0;
nRow = 0;
}
- pJump[ (ULONG)nCol * nRows + nRow ].
+ pJump[ (sal_uLong)nCol * nRows + nRow ].
GetJump( rBool, rStart, rNext, rStop);
}
void SetAllJumps( double fBool,
short nStart, short nNext,
short nStop = SHRT_MAX )
{
- ULONG n = (ULONG)nCols * nRows;
- for ( ULONG j=0; j<n; ++j )
+ sal_uLong n = (sal_uLong)nCols * nRows;
+ for ( sal_uLong j=0; j<n; ++j )
{
pJump[ j ].SetJump( fBool, nStart,
nNext, nStop);
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index 39844de7ae22..24887ea08290 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -88,7 +88,7 @@ public:
@param nParameter
Which parameter, 0-based */
static Type GetParameterType( const formula::FormulaToken* pToken,
- USHORT nParameter);
+ sal_uInt16 nParameter);
/** Whether OpCode has a parameter of type
ForceArray or ReferenceOrForceArray. */
@@ -124,7 +124,7 @@ private:
struct RunData
{
CommonData aData;
- BYTE nMinParams; // fix or minimum, or repeat start
+ sal_uInt8 nMinParams; // fix or minimum, or repeat start
bool bHasForceArray;
};
@@ -133,7 +133,7 @@ private:
// ocExternal AddIns
static Type GetExternalParameterType(
- const formula::FormulaToken* pToken, USHORT nParameter);
+ const formula::FormulaToken* pToken, sal_uInt16 nParameter);
#if OSL_DEBUG_LEVEL > 1
// Generate documentation to stdout if environment variable
@@ -151,14 +151,14 @@ private:
/** Minimum number of parameters, or fix number
of parameters if HasRepeatParameters()
- returns FALSE. For opcodes not specified in
+ returns sal_False. For opcodes not specified in
the implementation a parameter count of 1
is assumed, for opcodes out of range 0 is
assumed. If HasRepeatParameters() returns
- TRUE, information is NOT related to whether
+ sal_True, information is NOT related to whether
any parameters are optional, only the type
of parameters is significant. */
- static inline BYTE GetMinimumParameters( OpCode eOp)
+ static inline sal_uInt8 GetMinimumParameters( OpCode eOp)
{
if ( eOp <= SC_OPCODE_LAST_OPCODE_ID )
return pData[eOp].aData.nParam[0]
diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx
index 17da3bf5e635..e32bfd47561c 100644
--- a/sc/source/core/inc/refupdat.hxx
+++ b/sc/source/core/inc/refupdat.hxx
@@ -63,7 +63,7 @@ public:
static ScRefUpdateRes Update( UpdateRefMode eUpdateRefMode,
const ScBigRange& rWhere,
- INT32 nDx, INT32 nDy, INT32 nDz,
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz,
ScBigRange& rWhat );
/// Before calling, the absolute references must be up-to-date!
@@ -76,7 +76,7 @@ public:
/// Before calling, the absolute references must be up-to-date!
static ScRefUpdateRes Move( ScDocument* pDoc, const ScAddress& rPos,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute );
+ ScComplexRefData& rRef, sal_Bool bWrap, sal_Bool bAbsolute );
static void MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow, ScComplexRefData& rRef );
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index aadd3e101d02..5c4f4dc33550 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -83,7 +83,7 @@ using namespace com::sun::star;
ScUnoAddInFuncData::ScUnoAddInFuncData( const String& rNam, const String& rLoc,
const String& rDesc,
- USHORT nCat, const rtl::OString& sHelp,
+ sal_uInt16 nCat, const rtl::OString& sHelp,
const uno::Reference<reflection::XIdlMethod>& rFunc,
const uno::Any& rO,
long nAC, const ScAddInArgDesc* pAD,
@@ -99,7 +99,7 @@ ScUnoAddInFuncData::ScUnoAddInFuncData( const String& rNam, const String& rLoc,
nCallerPos( nCP ),
nCategory( nCat ),
sHelpId( sHelp ),
- bCompInitialized( FALSE )
+ bCompInitialized( sal_False )
{
if ( nArgCount )
{
@@ -152,7 +152,7 @@ const uno::Sequence<sheet::LocalizedName>& ScUnoAddInFuncData::GetCompNames() co
}
}
- bCompInitialized = TRUE; // also if not successful
+ bCompInitialized = sal_True; // also if not successful
}
return aCompNames;
}
@@ -179,10 +179,10 @@ void ScUnoAddInFuncData::SetCompNames( const uno::Sequence< sheet::LocalizedName
}
}
- bCompInitialized = TRUE;
+ bCompInitialized = sal_True;
}
-BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcelName ) const
+sal_Bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcelName ) const
{
const uno::Sequence<sheet::LocalizedName>& rSequence = GetCompNames();
long nSeqLen = rSequence.getLength();
@@ -203,7 +203,7 @@ BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcel
pArray[i].Locale.Country == aUserCountry )
{
rRetExcelName = pArray[i].Name;
- return TRUE;
+ return sal_True;
}
// second: check only language
@@ -212,7 +212,7 @@ BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcel
if ( pArray[i].Locale.Language == aUserLang )
{
rRetExcelName = pArray[i].Name;
- return TRUE;
+ return sal_True;
}
// third: #i57772# fall-back to en-US
@@ -223,9 +223,9 @@ BOOL ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, String& rRetExcel
// forth: use first (default) entry
rRetExcelName = pArray[0].Name;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void ScUnoAddInFuncData::SetFunction( const uno::Reference< reflection::XIdlMethod>& rNewFunc, const uno::Any& rNewObj )
@@ -262,7 +262,7 @@ ScUnoAddInCollection::ScUnoAddInCollection() :
pExactHashMap( NULL ),
pNameHashMap( NULL ),
pLocalHashMap( NULL ),
- bInitialized( FALSE )
+ bInitialized( sal_False )
{
}
@@ -285,7 +285,7 @@ void ScUnoAddInCollection::Clear()
ppFuncData = NULL;
nFuncCount = 0;
- bInitialized = FALSE;
+ bInitialized = sal_False;
}
uno::Reference<uno::XComponentContext> getContext(uno::Reference<lang::XMultiServiceFactory> xMSF)
@@ -358,11 +358,11 @@ void ScUnoAddInCollection::Initialize()
// when argument information is needed).
ReadConfiguration();
- bInitialized = TRUE; // with or without functions
+ bInitialized = sal_True; // with or without functions
}
// -----------------------------------------------------------------------------
-USHORT lcl_GetCategory( const String& rName )
+sal_uInt16 lcl_GetCategory( const String& rName )
{
static const sal_Char* aFuncNames[SC_FUNCGROUP_COUNT] =
{
@@ -380,7 +380,7 @@ USHORT lcl_GetCategory( const String& rName )
"Text", // ID_FUNCTION_GRP_TEXT
"Add-In" // ID_FUNCTION_GRP_ADDINS
};
- for (USHORT i=0; i<SC_FUNCGROUP_COUNT; i++)
+ for (sal_uInt16 i=0; i<SC_FUNCGROUP_COUNT; i++)
if ( rName.EqualsAscii( aFuncNames[i] ) )
return i+1; // IDs start at 1
@@ -474,7 +474,7 @@ void ScUnoAddInCollection::ReadConfiguration()
{
rtl::OUString aLocalName;
rtl::OUString aDescription;
- USHORT nCategory = ID_FUNCTION_GRP_ADDINS;
+ sal_uInt16 nCategory = ID_FUNCTION_GRP_ADDINS;
// get direct information on the function
@@ -588,7 +588,7 @@ void ScUnoAddInCollection::ReadConfiguration()
ScAddInArgDesc aDesc;
aDesc.eType = SC_ADDINARG_NONE; // arg type is not in configuration
- aDesc.bOptional = FALSE;
+ aDesc.bOptional = sal_False;
nVisibleCount = nArgumentCount;
pVisibleArgs = new ScAddInArgDesc[nVisibleCount];
@@ -660,16 +660,16 @@ void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData )
}
}
-BOOL ScUnoAddInCollection::GetExcelName( const String& rCalcName,
+sal_Bool ScUnoAddInCollection::GetExcelName( const String& rCalcName,
LanguageType eDestLang, String& rRetExcelName )
{
const ScUnoAddInFuncData* pFuncData = GetFuncData( rCalcName );
if ( pFuncData )
return pFuncData->GetExcelName( eDestLang, rRetExcelName);
- return FALSE;
+ return sal_False;
}
-BOOL ScUnoAddInCollection::GetCalcName( const String& rExcelName, String& rRetCalcName )
+sal_Bool ScUnoAddInCollection::GetCalcName( const String& rExcelName, String& rRetCalcName )
{
if (!bInitialized)
Initialize();
@@ -694,24 +694,24 @@ BOOL ScUnoAddInCollection::GetCalcName( const String& rExcelName, String& rRetCa
// use the first function that has this name for any language
rRetCalcName = pFuncData->GetOriginalName();
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
-inline BOOL IsTypeName( const rtl::OUString& rName, const uno::Type& rType )
+inline sal_Bool IsTypeName( const rtl::OUString& rName, const uno::Type& rType )
{
return rName == rType.getTypeName();
}
-BOOL lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
+sal_Bool lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
{
// this must match with ScUnoAddInCall::SetResult
- if ( !xClass.is() ) return FALSE;
+ if ( !xClass.is() ) return sal_False;
switch (xClass->getTypeClass())
{
@@ -730,7 +730,7 @@ BOOL lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
case uno::TypeClass_FLOAT:
case uno::TypeClass_DOUBLE:
case uno::TypeClass_STRING:
- return TRUE; // values or string
+ return sal_True; // values or string
case uno::TypeClass_INTERFACE:
{
@@ -750,13 +750,13 @@ BOOL lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClass )
rtl::OUString sName = xClass->getName();
return (
- IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<INT32> >*)0) ) ||
+ IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<sal_Int32> >*)0) ) ||
IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<double> >*)0) ) ||
IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<rtl::OUString> >*)0) ) ||
IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<uno::Any> >*)0) ) );
}
}
- return FALSE;
+ return sal_False;
}
ScAddInArgumentType lcl_GetArgType( const uno::Reference<reflection::XIdlClass>& xClass )
@@ -778,7 +778,7 @@ ScAddInArgumentType lcl_GetArgType( const uno::Reference<reflection::XIdlClass>&
//! XIdlClass needs getType() method!
rtl::OUString sName = xClass->getName();
- if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<INT32> >*)0) ))
+ if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<sal_Int32> >*)0) ))
return SC_ADDINARG_INTEGER_ARRAY;
if (IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<double> >*)0) ))
@@ -873,7 +873,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
// leave out internal functions
uno::Reference<reflection::XIdlClass> xClass =
xFunc->getDeclaringClass();
- BOOL bSkip = TRUE;
+ sal_Bool bSkip = sal_True;
if ( xClass.is() )
{
//! XIdlClass needs getType() method!
@@ -895,7 +895,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
uno::Reference<reflection::XIdlClass> xReturn =
xFunc->getReturnType();
if ( !lcl_ValidReturnType( xReturn ) )
- bSkip = TRUE;
+ bSkip = sal_True;
}
if (!bSkip)
{
@@ -906,7 +906,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aFuncName += '.';
aFuncName += String( aFuncU );
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
long nVisibleCount = 0;
long nCallerPos = SC_CALLERPOS_NONE;
@@ -918,12 +918,12 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
for (nParamPos=0; nParamPos<nParamCount; nParamPos++)
{
if ( pParArr[nParamPos].aMode != reflection::ParamMode_IN )
- bValid = FALSE;
+ bValid = sal_False;
uno::Reference<reflection::XIdlClass> xParClass =
pParArr[nParamPos].aType;
ScAddInArgumentType eArgType = lcl_GetArgType( xParClass );
if ( eArgType == SC_ADDINARG_NONE )
- bValid = FALSE;
+ bValid = sal_False;
else if ( eArgType == SC_ADDINARG_CALLER )
nCallerPos = nParamPos;
else
@@ -931,7 +931,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
}
if (bValid)
{
- USHORT nCategory = lcl_GetCategory(
+ sal_uInt16 nCategory = lcl_GetCategory(
String(
xAddIn->getProgrammaticCategoryName(
aFuncU ) ) );
@@ -996,7 +996,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aArgName = rtl::OUString::createFromAscii( "###" );
}
- BOOL bOptional =
+ sal_Bool bOptional =
( eArgType == SC_ADDINARG_VALUE_OR_ARRAY ||
eArgType == SC_ADDINARG_VARARGS );
@@ -1050,8 +1050,8 @@ void lcl_UpdateFunctionList( ScFunctionList& rFunctionList, const ScUnoAddInFunc
{
String aCompare = rFuncData.GetUpperLocal(); // as used in FillFunctionDescFromData
- ULONG nCount = rFunctionList.GetCount();
- for (ULONG nPos=0; nPos<nCount; nPos++)
+ sal_uLong nCount = rFunctionList.GetCount();
+ for (sal_uLong nPos=0; nPos<nCount; nPos++)
{
const ScFuncDesc* pDesc = rFunctionList.GetFunction( nPos );
if ( pDesc && pDesc->pFuncName && *pDesc->pFuncName == aCompare )
@@ -1132,7 +1132,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
// Local names and descriptions from pOldData are looked up using the
// internal argument name.
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
long nVisibleCount = 0;
long nCallerPos = SC_CALLERPOS_NONE;
@@ -1144,12 +1144,12 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
for (nParamPos=0; nParamPos<nParamCount; nParamPos++)
{
if ( pParArr[nParamPos].aMode != reflection::ParamMode_IN )
- bValid = FALSE;
+ bValid = sal_False;
uno::Reference<reflection::XIdlClass> xParClass =
pParArr[nParamPos].aType;
ScAddInArgumentType eArgType = lcl_GetArgType( xParClass );
if ( eArgType == SC_ADDINARG_NONE )
- bValid = FALSE;
+ bValid = sal_False;
else if ( eArgType == SC_ADDINARG_CALLER )
nCallerPos = nParamPos;
else
@@ -1180,7 +1180,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
else
aDesc.aName = aDesc.aDescription = String::CreateFromAscii( "###" );
- BOOL bOptional =
+ sal_Bool bOptional =
( eArgType == SC_ADDINARG_VALUE_OR_ARRAY ||
eArgType == SC_ADDINARG_VARARGS );
@@ -1212,7 +1212,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
}
}
-String ScUnoAddInCollection::FindFunction( const String& rUpperName, BOOL bLocalFirst )
+String ScUnoAddInCollection::FindFunction( const String& rUpperName, sal_Bool bLocalFirst )
{
if (!bInitialized)
Initialize();
@@ -1307,13 +1307,13 @@ long ScUnoAddInCollection::GetFuncCount()
return nFuncCount;
}
-BOOL ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
+sal_Bool ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
{
if (!bInitialized)
Initialize();
if (nFunc >= nFuncCount || !ppFuncData[nFunc])
- return FALSE;
+ return sal_False;
const ScUnoAddInFuncData& rFuncData = *ppFuncData[nFunc];
@@ -1321,15 +1321,15 @@ BOOL ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
}
// static
-BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc )
+sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc )
{
rDesc.Clear();
- BOOL bIncomplete = !rFuncData.GetFunction().is(); //! extra flag?
+ sal_Bool bIncomplete = !rFuncData.GetFunction().is(); //! extra flag?
long nArgCount = rFuncData.GetArgumentCount();
if ( nArgCount > USHRT_MAX )
- return FALSE;
+ return sal_False;
if ( bIncomplete )
nArgCount = 0; // if incomplete, fill without argument info (no wrong order)
@@ -1347,10 +1347,10 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
// AddInArgumentType_CALLER is already left out in FuncData
- rDesc.nArgCount = (USHORT)nArgCount;
+ rDesc.nArgCount = (sal_uInt16)nArgCount;
if ( nArgCount )
{
- BOOL bMultiple = FALSE;
+ sal_Bool bMultiple = sal_False;
const ScAddInArgDesc* pArgs = rFuncData.GetArguments();
rDesc.ppDefArgNames = new String*[nArgCount];
@@ -1373,7 +1373,7 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
// last argument repeated?
if ( nArg+1 == nArgCount && ( pArgs[nArg].eType == SC_ADDINARG_VARARGS ) )
- bMultiple = TRUE;
+ bMultiple = sal_True;
}
if ( bMultiple )
@@ -1382,7 +1382,7 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
rDesc.bIncomplete = bIncomplete;
- return TRUE;
+ return sal_True;
}
@@ -1390,9 +1390,9 @@ BOOL ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const String& rName,
long nParamCount ) :
- bValidCount( FALSE ),
+ bValidCount( sal_False ),
nErrCode( errNoCode ), // before function was called
- bHasString( TRUE ),
+ bHasString( sal_True ),
fValue( 0.0 ),
xMatrix( NULL )
{
@@ -1409,15 +1409,15 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const String& rName
{
long nVarCount = nParamCount - ( nDescCount - 1 ); // size of last argument
aVarArg.realloc( nVarCount );
- bValidCount = TRUE;
+ bValidCount = sal_True;
}
else if ( nParamCount <= nDescCount )
{
// all args behind nParamCount must be optional
- bValidCount = TRUE;
+ bValidCount = sal_True;
for (long i=nParamCount; i<nDescCount; i++)
if ( !pArgs[i].bOptional )
- bValidCount = FALSE;
+ bValidCount = sal_False;
}
// else invalid (too many arguments)
@@ -1431,7 +1431,7 @@ ScUnoAddInCall::~ScUnoAddInCall()
// pFuncData is deleted with ScUnoAddInCollection
}
-BOOL ScUnoAddInCall::ValidParamCount()
+sal_Bool ScUnoAddInCall::ValidParamCount()
{
return bValidCount;
}
@@ -1453,7 +1453,7 @@ ScAddInArgumentType ScUnoAddInCall::GetArgType( long nPos )
return SC_ADDINARG_VALUE_OR_ARRAY; //! error code !!!!
}
-BOOL ScUnoAddInCall::NeedsCaller() const
+sal_Bool ScUnoAddInCall::NeedsCaller() const
{
return pFuncData && pFuncData->GetCallerPos() != SC_CALLERPOS_NONE;
}
@@ -1628,7 +1628,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
{
uno::TypeClass eMyClass;
ScApiTypeConversion::ConvertAnyToDouble( fValue, eMyClass, rNewRes);
- bHasString = FALSE;
+ bHasString = sal_False;
}
break;
@@ -1637,7 +1637,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
rtl::OUString aUStr;
rNewRes >>= aUStr;
aString = String( aUStr );
- bHasString = TRUE;
+ bHasString = sal_True;
}
break;
@@ -1655,19 +1655,19 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
break;
default:
- if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence<INT32> > *)0 ) ) )
+ if ( aType.equals( getCppuType( (uno::Sequence< uno::Sequence<sal_Int32> > *)0 ) ) )
{
- const uno::Sequence< uno::Sequence<INT32> >* pRowSeq = NULL;
+ const uno::Sequence< uno::Sequence<sal_Int32> >* pRowSeq = NULL;
//! use pointer from any!
- uno::Sequence< uno::Sequence<INT32> > aSequence;
+ uno::Sequence< uno::Sequence<sal_Int32> > aSequence;
if ( rNewRes >>= aSequence )
pRowSeq = &aSequence;
if ( pRowSeq )
{
long nRowCount = pRowSeq->getLength();
- const uno::Sequence<INT32>* pRowArr = pRowSeq->getConstArray();
+ const uno::Sequence<sal_Int32>* pRowArr = pRowSeq->getConstArray();
long nMaxColCount = 0;
long nCol, nRow;
for (nRow=0; nRow<nRowCount; nRow++)
@@ -1685,7 +1685,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
for (nRow=0; nRow<nRowCount; nRow++)
{
long nColCount = pRowArr[nRow].getLength();
- const INT32* pColArr = pRowArr[nRow].getConstArray();
+ const sal_Int32* pColArr = pRowArr[nRow].getConstArray();
for (nCol=0; nCol<nColCount; nCol++)
pMatrix->PutDouble( pColArr[nCol],
static_cast<SCSIZE>(nCol),
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index ad6b60073ccb..c43702c4ae1e 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -87,8 +87,8 @@ ScAddInListener* ScAddInListener::Get( uno::Reference<sheet::XVolatileResult> xV
{
sheet::XVolatileResult* pComp = xVR.get();
- ULONG nCount = aAllListeners.Count();
- for (ULONG nPos=0; nPos<nCount; nPos++)
+ sal_uLong nCount = aAllListeners.Count();
+ for (sal_uLong nPos=0; nPos<nCount; nPos++)
{
ScAddInListener* pLst = (ScAddInListener*)aAllListeners.GetObject(nPos);
if ( pComp == (sheet::XVolatileResult*)pLst->xVolRes.get() )
@@ -101,14 +101,14 @@ ScAddInListener* ScAddInListener::Get( uno::Reference<sheet::XVolatileResult> xV
// static
void ScAddInListener::RemoveDocument( ScDocument* pDocumentP )
{
- ULONG nPos = aAllListeners.Count();
+ sal_uLong nPos = aAllListeners.Count();
while (nPos)
{
// loop backwards because elements are removed
--nPos;
ScAddInListener* pLst = (ScAddInListener*)aAllListeners.GetObject(nPos);
ScAddInDocs* p = pLst->pDocs;
- USHORT nFoundPos;
+ sal_uInt16 nFoundPos;
if ( p->Seek_Entry( pDocumentP, &nFoundPos ) )
{
p->Remove( nFoundPos );
@@ -158,8 +158,8 @@ void SAL_CALL ScAddInListener::modified( const ::com::sun::star::sheet::ResultEv
Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
const ScDocument** ppDoc = (const ScDocument**) pDocs->GetData();
- USHORT nCount = pDocs->Count();
- for ( USHORT j=0; j<nCount; j++, ppDoc++ )
+ sal_uInt16 nCount = pDocs->Count();
+ for ( sal_uInt16 j=0; j<nCount; j++, ppDoc++ )
{
ScDocument* pDoc = (ScDocument*)*ppDoc;
pDoc->TrackFormulas();
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index ccbecd52d9f2..26a194b731ef 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -162,7 +162,7 @@ const sal_Unicode* lcl_eatWhiteSpace( const sal_Unicode* p )
*/
static bool lcl_ScRange_External_TabSpan(
ScRange & rRange,
- USHORT & rFlags,
+ sal_uInt16 & rFlags,
ScAddress::ExternalInfo* pExtInfo,
const String & rExternDocName,
const String & rStartTabName,
@@ -271,7 +271,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start,
}
else
{
- bool only_digits = TRUE;
+ bool only_digits = sal_True;
/*
* Valid: Normal!a1
@@ -299,7 +299,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start,
p = start;
break;
}
- only_digits = FALSE;
+ only_digits = sal_False;
p++;
}
else if( CharClass::isAsciiDigit( uc ))
@@ -341,12 +341,12 @@ const sal_Unicode* ScRange::Parse_XL_Header(
String& rExternDocName,
String& rStartTabName,
String& rEndTabName,
- USHORT& nFlags,
+ sal_uInt16& nFlags,
bool bOnlyAcceptSingle,
const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
{
const sal_Unicode* startTabs, *start = p;
- USHORT nSaveFlags = nFlags;
+ sal_uInt16 nSaveFlags = nFlags;
// Is this an external reference ?
rStartTabName.Erase();
@@ -536,7 +536,7 @@ const sal_Unicode* ScRange::Parse_XL_Header(
static const sal_Unicode*
lcl_r1c1_get_col( const sal_Unicode* p,
const ScAddress::Details& rDetails,
- ScAddress* pAddr, USHORT* nFlags )
+ ScAddress* pAddr, sal_uInt16* nFlags )
{
const sal_Unicode *pEnd;
long int n;
@@ -581,7 +581,7 @@ lcl_r1c1_get_col( const sal_Unicode* p,
static inline const sal_Unicode*
lcl_r1c1_get_row( const sal_Unicode* p,
const ScAddress::Details& rDetails,
- ScAddress* pAddr, USHORT* nFlags )
+ ScAddress* pAddr, sal_uInt16* nFlags )
{
const sal_Unicode *pEnd;
long int n;
@@ -624,7 +624,7 @@ lcl_r1c1_get_row( const sal_Unicode* p,
return pEnd;
}
-static USHORT
+static sal_uInt16
lcl_ScRange_Parse_XL_R1C1( ScRange& r,
const sal_Unicode* p,
ScDocument* pDoc,
@@ -634,9 +634,9 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
{
const sal_Unicode* pTmp = NULL;
String aExternDocName, aStartTabName, aEndTabName;
- USHORT nFlags = SCA_VALID | SCA_VALID_TAB;
+ sal_uInt16 nFlags = SCA_VALID | SCA_VALID_TAB;
// Keep in mind that nFlags2 gets left-shifted by 4 bits before being merged.
- USHORT nFlags2 = SCA_VALID_TAB;
+ sal_uInt16 nFlags2 = SCA_VALID_TAB;
#if 0
{
@@ -767,7 +767,7 @@ failed :
}
static inline const sal_Unicode*
-lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
+lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, sal_uInt16* nFlags )
{
SCCOL nCol;
@@ -790,7 +790,7 @@ lcl_a1_get_col( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
}
static inline const sal_Unicode*
-lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
+lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, sal_uInt16* nFlags )
{
const sal_Unicode *pEnd;
long int n;
@@ -808,7 +808,7 @@ lcl_a1_get_row( const sal_Unicode* p, ScAddress* pAddr, USHORT* nFlags )
return pEnd;
}
-static USHORT
+static sal_uInt16
lcl_ScRange_Parse_XL_A1( ScRange& r,
const sal_Unicode* p,
ScDocument* pDoc,
@@ -818,7 +818,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
{
const sal_Unicode* tmp1, *tmp2;
String aExternDocName, aStartTabName, aEndTabName; // for external link table
- USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
+ sal_uInt16 nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
#if 0
{
@@ -947,11 +947,11 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
used in conjunction with pExtInfo to determine the tab span
of a 3D reference.
*/
-static USHORT
+static sal_uInt16
lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
ScAddress::ExternalInfo* pExtInfo = NULL, ScRange* pRange = NULL )
{
- USHORT nRes = 0;
+ sal_uInt16 nRes = 0;
String aDocName; // der pure Dokumentenname
String aTab;
bool bExtDoc = false;
@@ -980,7 +980,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
SCCOL nCol = 0;
SCROW nRow = 0;
SCTAB nTab = 0;
- USHORT nBits = SCA_VALID_TAB;
+ sal_uInt16 nBits = SCA_VALID_TAB;
const sal_Unicode* q;
if ( ScGlobal::FindUnquoted( p, '.') )
{
@@ -1137,7 +1137,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
nRes = 0;
else
{
- USHORT nFlags = nRes | SCA_VALID_TAB2;
+ sal_uInt16 nFlags = nRes | SCA_VALID_TAB2;
if (!lcl_ScRange_External_TabSpan( *pRange, nFlags,
pExtInfo, aDocName,
pExtInfo->maTabName, aTab, pDoc))
@@ -1166,7 +1166,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
}
if( !*p )
{
- USHORT nMask = nRes & ( SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_TAB );
+ sal_uInt16 nMask = nRes & ( SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_TAB );
if( nMask == ( SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_TAB ) )
nRes |= SCA_VALID;
}
@@ -1175,7 +1175,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
return nRes;
}
-static USHORT
+static sal_uInt16
lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo = NULL,
@@ -1196,7 +1196,7 @@ lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
case formula::FormulaGrammar::CONV_XL_OOX:
{
ScRange r = rAddr;
- USHORT nFlags = lcl_ScRange_Parse_XL_A1( r, p, pDoc, true, pExtInfo,
+ sal_uInt16 nFlags = lcl_ScRange_Parse_XL_A1( r, p, pDoc, true, pExtInfo,
(rDetails.eConv == formula::FormulaGrammar::CONV_XL_OOX ? pExternalLinks : NULL) );
rAddr = r.aStart;
return nFlags;
@@ -1204,7 +1204,7 @@ lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
case formula::FormulaGrammar::CONV_XL_R1C1:
{
ScRange r = rAddr;
- USHORT nFlags = lcl_ScRange_Parse_XL_R1C1( r, p, pDoc, rDetails, true, pExtInfo );
+ sal_uInt16 nFlags = lcl_ScRange_Parse_XL_R1C1( r, p, pDoc, rDetails, true, pExtInfo );
rAddr = r.aStart;
return nFlags;
}
@@ -1221,7 +1221,7 @@ bool ConvertSingleRef( ScDocument* pDoc, const String& rRefString,
if (pExtInfo || (ScGlobal::FindUnquoted( rRefString, SC_COMPILER_FILE_TAB_SEP) == STRING_NOTFOUND))
{
ScAddress aAddr( 0, 0, nDefTab );
- USHORT nRes = aAddr.Parse( rRefString, pDoc, rDetails, pExtInfo);
+ sal_uInt16 nRes = aAddr.Parse( rRefString, pDoc, rDetails, pExtInfo);
if ( nRes & SCA_VALID )
{
rRefAddress.Set( aAddr,
@@ -1244,7 +1244,7 @@ bool ConvertDoubleRef( ScDocument* pDoc, const String& rRefString, SCTAB nDefTab
if (pExtInfo || (ScGlobal::FindUnquoted( rRefString, SC_COMPILER_FILE_TAB_SEP) == STRING_NOTFOUND))
{
ScRange aRange( ScAddress( 0, 0, nDefTab));
- USHORT nRes = aRange.Parse( rRefString, pDoc, rDetails, pExtInfo);
+ sal_uInt16 nRes = aRange.Parse( rRefString, pDoc, rDetails, pExtInfo);
if ( nRes & SCA_VALID )
{
rStartRefAddress.Set( aRange.aStart,
@@ -1262,7 +1262,7 @@ bool ConvertDoubleRef( ScDocument* pDoc, const String& rRefString, SCTAB nDefTab
}
-USHORT ScAddress::Parse( const String& r, ScDocument* pDoc,
+sal_uInt16 ScAddress::Parse( const String& r, ScDocument* pDoc,
const Details& rDetails,
ExternalInfo* pExtInfo,
const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
@@ -1316,10 +1316,10 @@ void ScRange::ExtendTo( const ScRange& rRange )
*this = rRange;
}
-static USHORT
+static sal_uInt16
lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAddress::ExternalInfo* pExtInfo = NULL )
{
- USHORT nRes1 = 0, nRes2 = 0;
+ sal_uInt16 nRes1 = 0, nRes2 = 0;
xub_StrLen nPos = ScGlobal::FindUnquoted( r, ':');
if (nPos != STRING_NOTFOUND)
{
@@ -1332,7 +1332,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAdd
if ( (nRes2 = lcl_ScAddress_Parse_OOo( p + nPos+ 1, pDoc, aRange.aEnd, pExtInfo, &aRange ) ) != 0 )
{
// PutInOrder / Justify
- USHORT nMask, nBits1, nBits2;
+ sal_uInt16 nMask, nBits1, nBits2;
SCCOL nTempCol;
if ( aRange.aEnd.Col() < (nTempCol = aRange.aStart.Col()) )
{
@@ -1378,7 +1378,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAdd
return nRes1;
}
-USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
+sal_uInt16 ScRange::Parse( const String& r, ScDocument* pDoc,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo,
const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
@@ -1404,11 +1404,11 @@ USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
// Accept a full range, or an address
-USHORT ScRange::ParseAny( const String& r, ScDocument* pDoc,
+sal_uInt16 ScRange::ParseAny( const String& r, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
- USHORT nRet = Parse( r, pDoc, rDetails );
- const USHORT nValid = SCA_VALID | SCA_VALID_COL2 | SCA_VALID_ROW2 |
+ sal_uInt16 nRet = Parse( r, pDoc, rDetails );
+ const sal_uInt16 nValid = SCA_VALID | SCA_VALID_COL2 | SCA_VALID_ROW2 |
SCA_VALID_TAB2;
if ( (nRet & nValid) != nValid )
@@ -1422,11 +1422,11 @@ USHORT ScRange::ParseAny( const String& r, ScDocument* pDoc,
}
// Parse only full row references
-USHORT ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
+sal_uInt16 ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
const sal_Unicode* p = rStr.GetBuffer();
- USHORT nRes = 0, ignored = 0;
+ sal_uInt16 nRes = 0, ignored = 0;
if( NULL == p )
return 0;
@@ -1481,11 +1481,11 @@ USHORT ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
}
// Parse only full row references
-USHORT ScRange::ParseRows( const String& rStr, ScDocument* pDoc,
+sal_uInt16 ScRange::ParseRows( const String& rStr, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
const sal_Unicode* p = rStr.GetBuffer();
- USHORT nRes = 0, ignored = 0;
+ sal_uInt16 nRes = 0, ignored = 0;
if( NULL == p )
return 0;
@@ -1627,7 +1627,7 @@ getFileNameFromDoc( const ScDocument* pDoc )
return sFileName;
}
-void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+void ScAddress::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc,
const Details& rDetails) const
{
r.Erase();
@@ -1716,7 +1716,7 @@ void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
static void
lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
const ScAddress::Details& rDetails,
- USHORT nFlags,
+ sal_uInt16 nFlags,
String& rTabName, String& rDocName )
{
pDoc->GetName( nTab, rTabName );
@@ -1752,7 +1752,7 @@ lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
static void
lcl_ScRange_Format_XL_Header( String& r, const ScRange& rRange,
- USHORT nFlags, ScDocument* pDoc,
+ sal_uInt16 nFlags, ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
if( nFlags & SCA_TAB_3D )
@@ -1779,7 +1779,7 @@ lcl_ScRange_Format_XL_Header( String& r, const ScRange& rRange,
}
}
-void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+void ScRange::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc,
const ScAddress::Details& rDetails ) const
{
r.Erase();
@@ -1793,7 +1793,7 @@ void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
switch( rDetails.eConv ) {
default :
case formula::FormulaGrammar::CONV_OOO: {
- BOOL bOneTab = (aStart.Tab() == aEnd.Tab());
+ sal_Bool bOneTab = (aStart.Tab() == aEnd.Tab());
if ( !bOneTab )
nFlags |= SCA_TAB_3D;
aStart.Format( r, nFlags, pDoc, rDetails );
@@ -1889,19 +1889,19 @@ bool ScAddress::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* pDoc )
dx = Col() + dx;
dy = Row() + dy;
dz = Tab() + dz;
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
if( dx < 0 )
- dx = 0, bValid = FALSE;
+ dx = 0, bValid = sal_False;
else if( dx > MAXCOL )
- dx = MAXCOL, bValid =FALSE;
+ dx = MAXCOL, bValid =sal_False;
if( dy < 0 )
- dy = 0, bValid = FALSE;
+ dy = 0, bValid = sal_False;
else if( dy > MAXROW )
- dy = MAXROW, bValid =FALSE;
+ dy = MAXROW, bValid =sal_False;
if( dz < 0 )
- dz = 0, bValid = FALSE;
+ dz = 0, bValid = sal_False;
else if( dz >= nMaxTab )
- dz = nMaxTab-1, bValid =FALSE;
+ dz = nMaxTab-1, bValid =sal_False;
Set( dx, dy, dz );
return bValid;
}
@@ -1955,7 +1955,7 @@ String ScRefAddress::GetRefString( ScDocument* pDoc, SCTAB nActTab,
return ScGlobal::GetRscString( STR_NOREF_STR );
String aString;
- USHORT nFlags = SCA_VALID;
+ sal_uInt16 nFlags = SCA_VALID;
if ( nActTab != Tab() )
{
nFlags |= SCA_TAB_3D;
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 4f19a043a34d..37f760b615ac 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -55,7 +55,7 @@ SV_IMPL_PTRARR_SORT( ScAddInDocs, ScAddInDocPtr );
extern "C" {
void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData )
{
- ScAddInAsync::CallBack( ULONG( nHandle ), pData );
+ ScAddInAsync::CallBack( sal_uLong( nHandle ), pData );
}
}
@@ -69,11 +69,11 @@ ScAddInAsync::ScAddInAsync() :
-ScAddInAsync::ScAddInAsync( ULONG nHandleP, USHORT nIndex, ScDocument* pDoc ) :
+ScAddInAsync::ScAddInAsync( sal_uLong nHandleP, sal_uInt16 nIndex, ScDocument* pDoc ) :
SvtBroadcaster(),
pStr( NULL ),
nHandle( nHandleP ),
- bValid( FALSE )
+ bValid( sal_False )
{
pDocs = new ScAddInDocs( 1, 1 );
pDocs->Insert( pDoc );
@@ -99,9 +99,9 @@ ScAddInAsync::~ScAddInAsync()
-ScAddInAsync* ScAddInAsync::Get( ULONG nHandleP )
+ScAddInAsync* ScAddInAsync::Get( sal_uLong nHandleP )
{
- USHORT nPos;
+ sal_uInt16 nPos;
ScAddInAsync* pRet = 0;
aSeekObj.nHandle = nHandleP;
if ( theAddInAsyncTbl.Seek_Entry( &aSeekObj, &nPos ) )
@@ -112,7 +112,7 @@ ScAddInAsync* ScAddInAsync::Get( ULONG nHandleP )
-void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
+void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
{
ScAddInAsync* p;
if ( (p = Get( nHandleP )) == NULL )
@@ -140,12 +140,12 @@ void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
DBG_ERROR( "unbekannter AsyncType" );
return;
}
- p->bValid = TRUE;
+ p->bValid = sal_True;
p->Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
const ScDocument** ppDoc = (const ScDocument**) p->pDocs->GetData();
- USHORT nCount = p->pDocs->Count();
- for ( USHORT j=0; j<nCount; j++, ppDoc++ )
+ sal_uInt16 nCount = p->pDocs->Count();
+ for ( sal_uInt16 j=0; j<nCount; j++, ppDoc++ )
{
ScDocument* pDoc = (ScDocument*)*ppDoc;
pDoc->TrackFormulas();
@@ -158,7 +158,7 @@ void ScAddInAsync::CallBack( ULONG nHandleP, void* pData )
void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
{
- USHORT nPos = theAddInAsyncTbl.Count();
+ sal_uInt16 nPos = theAddInAsyncTbl.Count();
if ( nPos )
{
const ScAddInAsync** ppAsync =
@@ -166,7 +166,7 @@ void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
for ( ; nPos-- >0; ppAsync-- )
{ // rueckwaerts wg. Pointer-Aufrueckerei im Array
ScAddInDocs* p = ((ScAddInAsync*)*ppAsync)->pDocs;
- USHORT nFoundPos;
+ sal_uInt16 nFoundPos;
if ( p->Seek_Entry( pDocumentP, &nFoundPos ) )
{
p->Remove( nFoundPos );
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 857efd972886..4ff3b20f14b2 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -53,7 +53,7 @@ using namespace com::sun::star::uno;
// STATIC DATA -----------------------------------------------------------
-#define SC_VERSION ((USHORT)304)
+#define SC_VERSION ((sal_uInt16)304)
//========================================================================
// ScAppOptions - Applikations-Optionen
@@ -89,13 +89,13 @@ void ScAppOptions::SetDefaults()
nZoom = 100;
eZoomType = SVX_ZOOM_PERCENT;
- bSynchronizeZoom = TRUE;
+ bSynchronizeZoom = sal_True;
nStatusFunc = SUBTOTAL_FUNC_SUM;
- bAutoComplete = TRUE;
- bDetectiveAuto = TRUE;
+ bAutoComplete = sal_True;
+ bDetectiveAuto = sal_True;
delete [] pLRUList;
- pLRUList = new USHORT[5]; // sinnvoll vorbelegen
+ pLRUList = new sal_uInt16[5]; // sinnvoll vorbelegen
pLRUList[0] = SC_OPCODE_SUM;
pLRUList[1] = SC_OPCODE_AVERAGE;
pLRUList[2] = SC_OPCODE_MIN;
@@ -140,7 +140,7 @@ const ScAppOptions& ScAppOptions::operator=( const ScAppOptions& rCpy )
//------------------------------------------------------------------------
-void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount )
+void ScAppOptions::SetLRUFuncList( const sal_uInt16* pList, const sal_uInt16 nCount )
{
delete [] pLRUList;
@@ -148,9 +148,9 @@ void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount )
if ( nLRUFuncCount > 0 )
{
- pLRUList = new USHORT[nLRUFuncCount];
+ pLRUList = new sal_uInt16[nLRUFuncCount];
- for ( USHORT i=0; i<nLRUFuncCount; i++ )
+ for ( sal_uInt16 i=0; i<nLRUFuncCount; i++ )
pLRUList[i] = pList[i];
}
else
@@ -170,11 +170,11 @@ void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
if ( nCount < USHRT_MAX )
{
const sal_Int32* pArray = aSeq.getConstArray();
- USHORT* pUShorts = new USHORT[nCount];
+ sal_uInt16* pUShorts = new sal_uInt16[nCount];
for (long i=0; i<nCount; i++)
- pUShorts[i] = (USHORT) pArray[i];
+ pUShorts[i] = (sal_uInt16) pArray[i];
- rOpt.SetLRUFuncList( pUShorts, sal::static_int_cast<USHORT>(nCount) );
+ rOpt.SetLRUFuncList( pUShorts, sal::static_int_cast<sal_uInt16>(nCount) );
delete[] pUShorts;
}
@@ -184,7 +184,7 @@ void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
void lcl_GetLastFunctions( Any& rDest, const ScAppOptions& rOpt )
{
long nCount = rOpt.GetLRUFuncListCount();
- USHORT* pUShorts = rOpt.GetLRUFuncList();
+ sal_uInt16* pUShorts = rOpt.GetLRUFuncList();
if ( nCount && pUShorts )
{
Sequence<sal_Int32> aSeq( nCount );
@@ -208,7 +208,7 @@ void lcl_SetSortList( const Any& rValue )
// if setting is "default", keep default values from ScUserList ctor
//! mark "default" in a safe way
- BOOL bDefault = ( nCount == 1 &&
+ sal_Bool bDefault = ( nCount == 1 &&
pArray[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NULL" ) ) );
if (!bDefault)
@@ -236,7 +236,7 @@ void lcl_GetSortList( Any& rDest )
Sequence<OUString> aSeq( nCount );
OUString* pArray = aSeq.getArray();
for (long i=0; i<nCount; i++)
- pArray[i] = (*pUserList)[sal::static_int_cast<USHORT>(i)]->GetString();
+ pArray[i] = (*pUserList)[sal::static_int_cast<sal_uInt16>(i)]->GetString();
rDest <<= aSeq;
}
else
@@ -419,10 +419,10 @@ ScAppCfg::ScAppCfg() :
if (pValues[nProp] >>= nIntVal) SetAppMetric( (FieldUnit) nIntVal );
break;
case SCLAYOUTOPT_STATUSBAR:
- if (pValues[nProp] >>= nIntVal) SetStatusFunc( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetStatusFunc( (sal_uInt16) nIntVal );
break;
case SCLAYOUTOPT_ZOOMVAL:
- if (pValues[nProp] >>= nIntVal) SetZoom( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetZoom( (sal_uInt16) nIntVal );
break;
case SCLAYOUTOPT_ZOOMTYPE:
if (pValues[nProp] >>= nIntVal) SetZoomType( (SvxZoomType) nIntVal );
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 5a7f117e75d9..85447b6a8730 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -61,43 +61,43 @@ const sal_Char *linker_dummy = "";
static const sal_Char __FAR_DATA sAutoTblFmtName[] = "autotbl.fmt";
// bis SO5PF
-const USHORT AUTOFORMAT_ID_X = 9501;
-const USHORT AUTOFORMAT_ID_358 = 9601;
-const USHORT AUTOFORMAT_DATA_ID_X = 9502;
+const sal_uInt16 AUTOFORMAT_ID_X = 9501;
+const sal_uInt16 AUTOFORMAT_ID_358 = 9601;
+const sal_uInt16 AUTOFORMAT_DATA_ID_X = 9502;
// ab SO5
//! in nachfolgenden Versionen muss der Betrag dieser IDs groesser sein
-const USHORT AUTOFORMAT_ID_504 = 9801;
-const USHORT AUTOFORMAT_DATA_ID_504 = 9802;
+const sal_uInt16 AUTOFORMAT_ID_504 = 9801;
+const sal_uInt16 AUTOFORMAT_DATA_ID_504 = 9802;
-const USHORT AUTOFORMAT_ID_552 = 9901;
-const USHORT AUTOFORMAT_DATA_ID_552 = 9902;
+const sal_uInt16 AUTOFORMAT_ID_552 = 9901;
+const sal_uInt16 AUTOFORMAT_DATA_ID_552 = 9902;
// --- from 641 on: CJK and CTL font settings
-const USHORT AUTOFORMAT_ID_641 = 10001;
-const USHORT AUTOFORMAT_DATA_ID_641 = 10002;
+const sal_uInt16 AUTOFORMAT_ID_641 = 10001;
+const sal_uInt16 AUTOFORMAT_DATA_ID_641 = 10002;
// --- from 680/dr14 on: diagonal frame lines
-const USHORT AUTOFORMAT_ID_680DR14 = 10011;
-const USHORT AUTOFORMAT_DATA_ID_680DR14 = 10012;
+const sal_uInt16 AUTOFORMAT_ID_680DR14 = 10011;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR14 = 10012;
// --- from 680/dr25 on: #21549# store strings as UTF-8
-const USHORT AUTOFORMAT_ID_680DR25 = 10021;
-const USHORT AUTOFORMAT_DATA_ID_680DR25 = 10022;
+const sal_uInt16 AUTOFORMAT_ID_680DR25 = 10021;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR25 = 10022;
// --- from DEV300/overline2 on: #5991# overline support
-const USHORT AUTOFORMAT_ID_300OVRLN = 10031;
-const USHORT AUTOFORMAT_DATA_ID_300OVRLN = 10032;
+const sal_uInt16 AUTOFORMAT_ID_300OVRLN = 10031;
+const sal_uInt16 AUTOFORMAT_DATA_ID_300OVRLN = 10032;
// aktuelle Version
-const USHORT AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
-const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
#ifdef READ_OLDVERS
-const USHORT AUTOFORMAT_OLD_ID_OLD = 4201;
-const USHORT AUTOFORMAT_OLD_DATA_ID = 4202;
-const USHORT AUTOFORMAT_OLD_ID_NEW = 4203;
+const sal_uInt16 AUTOFORMAT_OLD_ID_OLD = 4201;
+const sal_uInt16 AUTOFORMAT_OLD_DATA_ID = 4202;
+const sal_uInt16 AUTOFORMAT_OLD_ID_NEW = 4203;
#endif
@@ -106,34 +106,34 @@ const USHORT AUTOFORMAT_OLD_ID_NEW = 4203;
struct ScAfVersions
{
public:
- USHORT nFontVersion;
- USHORT nFontHeightVersion;
- USHORT nWeightVersion;
- USHORT nPostureVersion;
- USHORT nUnderlineVersion;
- USHORT nOverlineVersion;
- USHORT nCrossedOutVersion;
- USHORT nContourVersion;
- USHORT nShadowedVersion;
- USHORT nColorVersion;
- USHORT nBoxVersion;
- USHORT nLineVersion;
- USHORT nBrushVersion;
-
- USHORT nAdjustVersion;
-
- USHORT nHorJustifyVersion;
- USHORT nVerJustifyVersion;
- USHORT nOrientationVersion;
- USHORT nMarginVersion;
- USHORT nBoolVersion;
- USHORT nInt32Version;
- USHORT nRotateModeVersion;
-
- USHORT nNumFmtVersion;
+ sal_uInt16 nFontVersion;
+ sal_uInt16 nFontHeightVersion;
+ sal_uInt16 nWeightVersion;
+ sal_uInt16 nPostureVersion;
+ sal_uInt16 nUnderlineVersion;
+ sal_uInt16 nOverlineVersion;
+ sal_uInt16 nCrossedOutVersion;
+ sal_uInt16 nContourVersion;
+ sal_uInt16 nShadowedVersion;
+ sal_uInt16 nColorVersion;
+ sal_uInt16 nBoxVersion;
+ sal_uInt16 nLineVersion;
+ sal_uInt16 nBrushVersion;
+
+ sal_uInt16 nAdjustVersion;
+
+ sal_uInt16 nHorJustifyVersion;
+ sal_uInt16 nVerJustifyVersion;
+ sal_uInt16 nOrientationVersion;
+ sal_uInt16 nMarginVersion;
+ sal_uInt16 nBoolVersion;
+ sal_uInt16 nInt32Version;
+ sal_uInt16 nRotateModeVersion;
+
+ sal_uInt16 nNumFmtVersion;
ScAfVersions();
- void Load( SvStream& rStream, USHORT nVer );
+ void Load( SvStream& rStream, sal_uInt16 nVer );
static void Write(SvStream& rStream);
};
@@ -163,7 +163,7 @@ ScAfVersions::ScAfVersions() :
{
}
-void ScAfVersions::Load( SvStream& rStream, USHORT nVer )
+void ScAfVersions::Load( SvStream& rStream, sal_uInt16 nVer )
{
rStream >> nFontVersion;
rStream >> nFontHeightVersion;
@@ -220,7 +220,7 @@ void ScAfVersions::Write(SvStream& rStream)
rStream << SfxInt32Item(ATTR_ROTATE_VALUE).GetVersion(SOFFICE_FILEFORMAT_40);
rStream << SvxRotateModeItem(SVX_ROTATE_MODE_STANDARD,0).GetVersion(SOFFICE_FILEFORMAT_40);
- rStream << (USHORT)0; // Num-Format
+ rStream << (sal_uInt16)0; // Num-Format
}
// ---------------------------------------------------------------------------
@@ -312,7 +312,7 @@ void ScAutoFormatDataField::SetAdjust( const SvxAdjustItem& rAdjust )
aItem = *(ItemType*)pNew; \
delete pNew;
-BOOL ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersions, USHORT nVer )
+sal_Bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersions, sal_uInt16 nVer )
{
SfxPoolItem* pNew;
SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0 );
@@ -396,7 +396,7 @@ BOOL ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersio
}
#ifdef READ_OLDVERS
-BOOL ScAutoFormatDataField::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
+sal_Bool ScAutoFormatDataField::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
{
SfxPoolItem* pNew;
SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0 );
@@ -429,7 +429,7 @@ BOOL ScAutoFormatDataField::LoadOld( SvStream& rStream, const ScAfVersions& rVer
}
#endif
-BOOL ScAutoFormatDataField::Save( SvStream& rStream )
+sal_Bool ScAutoFormatDataField::Save( SvStream& rStream )
{
SvxOrientationItem aOrientation( aRotateAngle.GetValue(), aStacked.GetValue(), 0 );
@@ -491,10 +491,10 @@ ScAutoFormatData::ScAutoFormatData()
bIncludeJustify =
bIncludeFrame =
bIncludeBackground =
- bIncludeWidthHeight = TRUE;
+ bIncludeWidthHeight = sal_True;
ppDataField = new ScAutoFormatDataField*[ 16 ];
- for( USHORT nIndex = 0; nIndex < 16; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < 16; ++nIndex )
ppDataField[ nIndex ] = new ScAutoFormatDataField;
}
@@ -510,32 +510,32 @@ ScAutoFormatData::ScAutoFormatData( const ScAutoFormatData& rData ) :
bIncludeWidthHeight( rData.bIncludeWidthHeight )
{
ppDataField = new ScAutoFormatDataField*[ 16 ];
- for( USHORT nIndex = 0; nIndex < 16; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < 16; ++nIndex )
ppDataField[ nIndex ] = new ScAutoFormatDataField( rData.GetField( nIndex ) );
}
ScAutoFormatData::~ScAutoFormatData()
{
- for( USHORT nIndex = 0; nIndex < 16; ++nIndex )
+ for( sal_uInt16 nIndex = 0; nIndex < 16; ++nIndex )
delete ppDataField[ nIndex ];
delete[] ppDataField;
}
-ScAutoFormatDataField& ScAutoFormatData::GetField( USHORT nIndex )
+ScAutoFormatDataField& ScAutoFormatData::GetField( sal_uInt16 nIndex )
{
DBG_ASSERT( nIndex < 16, "ScAutoFormatData::GetField - illegal index" );
DBG_ASSERT( ppDataField && ppDataField[ nIndex ], "ScAutoFormatData::GetField - no data" );
return *ppDataField[ nIndex ];
}
-const ScAutoFormatDataField& ScAutoFormatData::GetField( USHORT nIndex ) const
+const ScAutoFormatDataField& ScAutoFormatData::GetField( sal_uInt16 nIndex ) const
{
DBG_ASSERT( nIndex < 16, "ScAutoFormatData::GetField - illegal index" );
DBG_ASSERT( ppDataField && ppDataField[ nIndex ], "ScAutoFormatData::GetField - no data" );
return *ppDataField[ nIndex ];
}
-const SfxPoolItem* ScAutoFormatData::GetItem( USHORT nIndex, USHORT nWhich ) const
+const SfxPoolItem* ScAutoFormatData::GetItem( sal_uInt16 nIndex, sal_uInt16 nWhich ) const
{
const ScAutoFormatDataField& rField = GetField( nIndex );
switch( nWhich )
@@ -573,7 +573,7 @@ const SfxPoolItem* ScAutoFormatData::GetItem( USHORT nIndex, USHORT nWhich ) con
return NULL;
}
-void ScAutoFormatData::PutItem( USHORT nIndex, const SfxPoolItem& rItem )
+void ScAutoFormatData::PutItem( sal_uInt16 nIndex, const SfxPoolItem& rItem )
{
ScAutoFormatDataField& rField = GetField( nIndex );
switch( rItem.Which() )
@@ -610,21 +610,21 @@ void ScAutoFormatData::PutItem( USHORT nIndex, const SfxPoolItem& rItem )
}
}
-void ScAutoFormatData::CopyItem( USHORT nToIndex, USHORT nFromIndex, USHORT nWhich )
+void ScAutoFormatData::CopyItem( sal_uInt16 nToIndex, sal_uInt16 nFromIndex, sal_uInt16 nWhich )
{
const SfxPoolItem* pItem = GetItem( nFromIndex, nWhich );
if( pItem )
PutItem( nToIndex, *pItem );
}
-const ScNumFormatAbbrev& ScAutoFormatData::GetNumFormat( USHORT nIndex ) const
+const ScNumFormatAbbrev& ScAutoFormatData::GetNumFormat( sal_uInt16 nIndex ) const
{
return GetField( nIndex ).GetNumFormat();
}
-BOOL ScAutoFormatData::IsEqualData( USHORT nIndex1, USHORT nIndex2 ) const
+sal_Bool ScAutoFormatData::IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const
{
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
const ScAutoFormatDataField& rField1 = GetField( nIndex1 );
const ScAutoFormatDataField& rField2 = GetField( nIndex2 );
@@ -681,7 +681,7 @@ BOOL ScAutoFormatData::IsEqualData( USHORT nIndex1, USHORT nIndex2 ) const
return bEqual;
}
-void ScAutoFormatData::FillToItemSet( USHORT nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const
+void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const
{
const ScAutoFormatDataField& rField = GetField( nIndex );
@@ -756,7 +756,7 @@ void ScAutoFormatData::FillToItemSet( USHORT nIndex, SfxItemSet& rItemSet, ScDoc
rItemSet.Put( rField.GetBackground() );
}
-void ScAutoFormatData::GetFromItemSet( USHORT nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat )
+void ScAutoFormatData::GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat )
{
ScAutoFormatDataField& rField = GetField( nIndex );
@@ -791,10 +791,10 @@ void ScAutoFormatData::GetFromItemSet( USHORT nIndex, const SfxItemSet& rItemSet
rField.SetRotateMode ( (const SvxRotateModeItem&) rItemSet.Get( ATTR_ROTATE_MODE ) );
}
-BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
+sal_Bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
{
- BOOL bRet = TRUE;
- USHORT nVer = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVer = 0;
rStream >> nVer;
bRet = 0 == rStream.GetError();
if( bRet && (nVer == AUTOFORMAT_DATA_ID_X ||
@@ -806,7 +806,7 @@ BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
if( AUTOFORMAT_DATA_ID_552 <= nVer )
{
rStream >> nStrResId;
- USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
+ sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
if( RID_SVXSTR_TBLAFMT_BEGIN <= nId &&
nId < RID_SVXSTR_TBLAFMT_END )
{
@@ -816,7 +816,7 @@ BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
nStrResId = USHRT_MAX;
}
- BOOL b;
+ sal_Bool b;
rStream >> b; bIncludeFont = b;
rStream >> b; bIncludeJustify = b;
rStream >> b; bIncludeFrame = b;
@@ -825,25 +825,25 @@ BOOL ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
rStream >> b; bIncludeWidthHeight = b;
bRet = 0 == rStream.GetError();
- for( USHORT i = 0; bRet && i < 16; ++i )
+ for( sal_uInt16 i = 0; bRet && i < 16; ++i )
bRet = GetField( i ).Load( rStream, rVersions, nVer );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
#ifdef READ_OLDVERS
-BOOL ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
+sal_Bool ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVersions )
{
- BOOL bRet = TRUE;
- USHORT nVal = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = (rStream.GetError() == 0);
if (bRet && (nVal == AUTOFORMAT_OLD_DATA_ID))
{
rStream.ReadByteString( aName, rStream.GetStreamCharSet() );
- BOOL b;
+ sal_Bool b;
rStream >> b; bIncludeFont = b;
rStream >> b; bIncludeJustify = b;
rStream >> b; bIncludeFrame = b;
@@ -852,19 +852,19 @@ BOOL ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVersions
rStream >> b; bIncludeWidthHeight = b;
bRet = 0 == rStream.GetError();
- for (USHORT i=0; bRet && i < 16; i++)
+ for (sal_uInt16 i=0; bRet && i < 16; i++)
bRet = GetField( i ).LoadOld( rStream, rVersions );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
#endif
-BOOL ScAutoFormatData::Save(SvStream& rStream)
+sal_Bool ScAutoFormatData::Save(SvStream& rStream)
{
- USHORT nVal = AUTOFORMAT_DATA_ID;
- BOOL b;
+ sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
+ sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: #21549# store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
@@ -880,7 +880,7 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
if( 0 != aIniVal.ToInt32() )
{
// check Name for ResId
- for( USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN;
+ for( sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN;
RID_SVXSTR_TBLAFMT_END > nId; ++nId )
{
String s( SVX_RES( nId ) );
@@ -902,8 +902,8 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
rStream << ( b = bIncludeValueFormat );
rStream << ( b = bIncludeWidthHeight );
- BOOL bRet = 0 == rStream.GetError();
- for (USHORT i = 0; bRet && (i < 16); i++)
+ sal_Bool bRet = 0 == rStream.GetError();
+ for (sal_uInt16 i = 0; bRet && (i < 16); i++)
bRet = GetField( i ).Save( rStream );
return bRet;
@@ -912,9 +912,9 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
-ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
+ScAutoFormat::ScAutoFormat(sal_uInt16 nLim, sal_uInt16 nDel, sal_Bool bDup):
ScSortedCollection (nLim, nDel, bDup),
- bSaveLater (FALSE)
+ bSaveLater (sal_False)
{
// create default autoformat
ScAutoFormatData* pData = new ScAutoFormatData;
@@ -960,7 +960,7 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
SvxBrushItem aGray70Back( Color(0x4d, 0x4d, 0x4d), ATTR_BACKGROUND );
SvxBrushItem aGray20Back( Color(0xcc, 0xcc, 0xcc), ATTR_BACKGROUND );
- for (USHORT i=0; i<16; i++)
+ for (sal_uInt16 i=0; i<16; i++)
{
pData->PutItem( i, aBox );
pData->PutItem( i, aFontItem );
@@ -999,7 +999,7 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
ScAutoFormat::ScAutoFormat(const ScAutoFormat& rAutoFormat) :
ScSortedCollection (rAutoFormat),
- bSaveLater (FALSE)
+ bSaveLater (sal_False)
{}
ScAutoFormat::~ScAutoFormat()
@@ -1011,7 +1011,7 @@ ScAutoFormat::~ScAutoFormat()
Save();
}
-void ScAutoFormat::SetSaveLater( BOOL bSet )
+void ScAutoFormat::SetSaveLater( sal_Bool bSet )
{
bSaveLater = bSet;
}
@@ -1030,9 +1030,9 @@ short ScAutoFormat::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
return (short) ScGlobal::GetpTransliteration()->compareString( aStr1, aStr2 );
}
-BOOL ScAutoFormat::Load()
+sal_Bool ScAutoFormat::Load()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
INetURLObject aURL;
SvtPathOptions aPathOpt;
@@ -1040,14 +1040,14 @@ BOOL ScAutoFormat::Load()
aURL.setFinalSlash();
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( sAutoTblFmtName ) ) );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ, sal_True );
SvStream* pStream = aMedium.GetInStream();
bRet = (pStream && pStream->GetError() == 0);
if (bRet)
{
SvStream& rStream = *pStream;
// Achtung hier muss ein allgemeiner Header gelesen werden
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
@@ -1058,13 +1058,13 @@ BOOL ScAutoFormat::Load()
if( nVal == AUTOFORMAT_ID_358 ||
(AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
{
- UINT16 nFileVers = SOFFICE_FILEFORMAT_40;
- BYTE nChrSet, nCnt;
+ sal_uInt16 nFileVers = SOFFICE_FILEFORMAT_40;
+ sal_uInt8 nChrSet, nCnt;
long nPos = rStream.Tell();
rStream >> nCnt >> nChrSet;
// if( 4 <= nCnt )
// rStream >> nFileVers;
- if( rStream.Tell() != ULONG(nPos + nCnt) )
+ if( rStream.Tell() != sal_uLong(nPos + nCnt) )
{
DBG_ERRORFILE( "Der Header enthaelt mehr/neuere Daten" );
rStream.Seek( nPos + nCnt );
@@ -1079,10 +1079,10 @@ BOOL ScAutoFormat::Load()
aVersions.Load( rStream, nVal ); // Item-Versionen
ScAutoFormatData* pData;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
bRet = (rStream.GetError() == 0);
- for (USHORT i=0; bRet && (i < nAnz); i++)
+ for (sal_uInt16 i=0; bRet && (i < nAnz); i++)
{
pData = new ScAutoFormatData();
bRet = pData->Load(rStream, aVersions);
@@ -1116,10 +1116,10 @@ BOOL ScAutoFormat::Load()
AUTOFORMAT_OLD_ID_NEW == nVal )
{
ScAutoFormatData* pData;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
bRet = 0 == rStream.GetError();
- for( USHORT i=0; bRet && (i < nAnz); ++i )
+ for( sal_uInt16 i=0; bRet && (i < nAnz); ++i )
{
pData = new ScAutoFormatData();
bRet = pData->LoadOld( rStream, aVersions );
@@ -1127,18 +1127,18 @@ BOOL ScAutoFormat::Load()
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
#endif
}
}
- bSaveLater = FALSE;
+ bSaveLater = sal_False;
return bRet;
}
-BOOL ScAutoFormat::Save()
+sal_Bool ScAutoFormat::Save()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
INetURLObject aURL;
SvtPathOptions aPathOpt;
@@ -1146,7 +1146,7 @@ BOOL ScAutoFormat::Save()
aURL.setFinalSlash();
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( sAutoTblFmtName ) ) );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE, sal_True );
SvStream* pStream = aMedium.GetOutStream();
bRet = (pStream && pStream->GetError() == 0);
if (bRet)
@@ -1155,35 +1155,35 @@ BOOL ScAutoFormat::Save()
rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
// Achtung hier muss ein allgemeiner Header gespeichert werden
- USHORT nVal = AUTOFORMAT_ID;
+ sal_uInt16 nVal = AUTOFORMAT_ID;
rStream << nVal
- << (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem
- << (BYTE)::GetSOStoreTextEncoding(
- gsl_getSystemTextEncoding(), sal::static_int_cast<USHORT>(rStream.GetVersion()) );
-// << (BYTE)4 // Anzahl von Zeichen des Headers incl. diesem
-// << (BYTE)::GetStoreCharSet(::GetSystemCharSet())
+ << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
+ << (sal_uInt8)::GetSOStoreTextEncoding(
+ gsl_getSystemTextEncoding(), sal::static_int_cast<sal_uInt16>(rStream.GetVersion()) );
+// << (sal_uInt8)4 // Anzahl von Zeichen des Headers incl. diesem
+// << (sal_uInt8)::GetStoreCharSet(::GetSystemCharSet())
// << (UNIT16)SOFFICE_FILEFORMAT_NOW;
ScAfVersions::Write(rStream); // Item-Versionen
bRet = (rStream.GetError() == 0);
//-----------------------------------------------------------
- rStream << (USHORT)(nCount - 1);
+ rStream << (sal_uInt16)(nCount - 1);
bRet = (rStream.GetError() == 0);
- for (USHORT i=1; bRet && (i < nCount); i++)
+ for (sal_uInt16 i=1; bRet && (i < nCount); i++)
bRet = ((ScAutoFormatData*)pItems[i])->Save(rStream);
rStream.Flush();
aMedium.Commit();
}
- bSaveLater = FALSE;
+ bSaveLater = sal_False;
return bRet;
}
-USHORT ScAutoFormat::FindIndexPerName( const String& rName ) const
+sal_uInt16 ScAutoFormat::FindIndexPerName( const String& rName ) const
{
String aName;
- for( USHORT i=0; i<nCount ; i++ )
+ for( sal_uInt16 i=0; i<nCount ; i++ )
{
ScAutoFormatData* pItem = (ScAutoFormatData*)pItems[i];
pItem->GetName( aName );
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index e8e2b28f3f8e..f13420c8733f 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -61,17 +61,17 @@ typedef void (CALLTYPE* ExFuncPtr14)(void*, void*, void*, void*, void*, void*, v
typedef void (CALLTYPE* ExFuncPtr15)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
typedef void (CALLTYPE* ExFuncPtr16)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
-typedef void (CALLTYPE* GetFuncCountPtr)(USHORT& nCount);
+typedef void (CALLTYPE* GetFuncCountPtr)(sal_uInt16& nCount);
typedef void (CALLTYPE* GetFuncDataPtr)
- (USHORT& nNo, sal_Char* pFuncName, USHORT& nParamCount, ParamType* peType, sal_Char* pInternalName);
+ (sal_uInt16& nNo, sal_Char* pFuncName, sal_uInt16& nParamCount, ParamType* peType, sal_Char* pInternalName);
-typedef void (CALLTYPE* SetLanguagePtr)( USHORT& nLanguage );
+typedef void (CALLTYPE* SetLanguagePtr)( sal_uInt16& nLanguage );
typedef void (CALLTYPE* GetParamDesc)
- (USHORT& nNo, USHORT& nParam, sal_Char* pName, sal_Char* pDesc );
+ (sal_uInt16& nNo, sal_uInt16& nParam, sal_Char* pName, sal_Char* pDesc );
-typedef void (CALLTYPE* IsAsync) ( USHORT& nNo,
+typedef void (CALLTYPE* IsAsync) ( sal_uInt16& nNo,
ParamType* peType );
-typedef void (CALLTYPE* Advice) ( USHORT& nNo,
+typedef void (CALLTYPE* Advice) ( sal_uInt16& nNo,
AdvData& pfCallback );
typedef void (CALLTYPE* Unadvice)( double& nHandle );
@@ -110,7 +110,7 @@ FuncData::FuncData(const String& rIName) :
nParamCount (0),
eAsyncType (NONE)
{
- for (USHORT i = 0; i < MAXFUNCPARAM; i++)
+ for (sal_uInt16 i = 0; i < MAXFUNCPARAM; i++)
eParamType[i] = PTR_DOUBLE;
}
@@ -119,8 +119,8 @@ FuncData::FuncData(const String& rIName) :
FuncData::FuncData(const ModuleData*pModule,
const String& rIName,
const String& rFName,
- USHORT nNo,
- USHORT nCount,
+ sal_uInt16 nNo,
+ sal_uInt16 nCount,
const ParamType* peType,
ParamType eType) :
pModuleData (pModule),
@@ -130,7 +130,7 @@ FuncData::FuncData(const ModuleData*pModule,
nParamCount (nCount),
eAsyncType (eType)
{
- for (USHORT i = 0; i < MAXFUNCPARAM; i++)
+ for (sal_uInt16 i = 0; i < MAXFUNCPARAM; i++)
eParamType[i] = peType[i];
}
@@ -145,7 +145,7 @@ FuncData::FuncData(const FuncData& rData) :
nParamCount (rData.nParamCount),
eAsyncType (rData.eAsyncType)
{
- for (USHORT i = 0; i < MAXFUNCPARAM; i++)
+ for (sal_uInt16 i = 0; i < MAXFUNCPARAM; i++)
eParamType[i] = rData.eParamType[i];
}
@@ -159,7 +159,7 @@ short FuncCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
//------------------------------------------------------------------------
-BOOL FuncCollection::SearchFunc( const String& rName, USHORT& rIndex ) const
+sal_Bool FuncCollection::SearchFunc( const String& rName, sal_uInt16& rIndex ) const
{
FuncData aDataObj(rName);
return Search( &aDataObj, rIndex );
@@ -186,13 +186,13 @@ public:
class ModuleCollection : public ScSortedCollection
{
public:
- ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( nLim, nDel, bDup ) {}
+ ModuleCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False) : ScSortedCollection ( nLim, nDel, bDup ) {}
ModuleCollection(const ModuleCollection& rModuleCollection) : ScSortedCollection ( rModuleCollection ) {}
virtual ScDataObject* Clone() const { return new ModuleCollection(*this); }
- ModuleData* operator[]( const USHORT nIndex) const {return (ModuleData*)At(nIndex);}
+ ModuleData* operator[]( const sal_uInt16 nIndex) const {return (ModuleData*)At(nIndex);}
virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
- BOOL SearchModule( const String& rName,
+ sal_Bool SearchModule( const String& rName,
const ModuleData*& rpModule ) const;
};
@@ -208,12 +208,12 @@ short ModuleCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
//------------------------------------------------------------------------
-BOOL ModuleCollection::SearchModule( const String& rName,
+sal_Bool ModuleCollection::SearchModule( const String& rName,
const ModuleData*& rpModule ) const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
ModuleData aSearchModule(rName, 0);
- BOOL bFound = Search( &aSearchModule, nIndex );
+ sal_Bool bFound = Search( &aSearchModule, nIndex );
if (bFound)
rpModule = (ModuleData*)At(nIndex);
else
@@ -223,19 +223,19 @@ BOOL ModuleCollection::SearchModule( const String& rName,
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL InitExternalFunc(const rtl::OUString& rModuleName)
+sal_Bool InitExternalFunc(const rtl::OUString& rModuleName)
{
String aModuleName( rModuleName );
// Module schon geladen?
const ModuleData* pTemp;
if (aModuleCollection.SearchModule(aModuleName, pTemp))
- return FALSE;
+ return sal_False;
rtl::OUString aNP;
aNP = rModuleName;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
osl::Module* pLib = new osl::Module( aNP );
if (pLib->is())
{
@@ -249,7 +249,7 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
if ( fpSetLanguage )
{
LanguageType eLanguage = Application::GetSettings().GetUILanguage();
- USHORT nLanguage = (USHORT) eLanguage;
+ sal_uInt16 nLanguage = (sal_uInt16) eLanguage;
(*((SetLanguagePtr)fpSetLanguage))( nLanguage );
}
@@ -261,20 +261,20 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
AdvData pfCallBack = &ScAddInAsyncCallBack;
FuncData* pFuncData;
FuncCollection* pFuncCol = ScGlobal::GetFuncCollection();
- USHORT nCount;
+ sal_uInt16 nCount;
(*((GetFuncCountPtr)fpGetCount))(nCount);
- for (USHORT i=0; i < nCount; i++)
+ for (sal_uInt16 i=0; i < nCount; i++)
{
sal_Char cFuncName[256];
sal_Char cInternalName[256];
- USHORT nParamCount;
+ sal_uInt16 nParamCount;
ParamType eParamType[MAXFUNCPARAM];
ParamType eAsyncType = NONE;
// #62113# alles initialisieren, falls das AddIn sich schlecht verhaelt
cFuncName[0] = 0;
cInternalName[0] = 0;
nParamCount = 0;
- for ( USHORT j=0; j<MAXFUNCPARAM; j++ )
+ for ( sal_uInt16 j=0; j<MAXFUNCPARAM; j++ )
{
eParamType[j] = NONE;
}
@@ -297,7 +297,7 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
eAsyncType );
pFuncCol->Insert(pFuncData);
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
delete pLib;
@@ -311,8 +311,8 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName)
void ExitExternalFunc()
{
- USHORT nCount = aModuleCollection.GetCount();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = aModuleCollection.GetCount();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ModuleData* pData = aModuleCollection[i];
pData->FreeInstance();
@@ -321,9 +321,9 @@ void ExitExternalFunc()
//------------------------------------------------------------------------
-BOOL FuncData::Call(void** ppParam)
+sal_Bool FuncData::Call(void** ppParam)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(aFuncName);
if (fProc != NULL)
@@ -332,81 +332,81 @@ BOOL FuncData::Call(void** ppParam)
{
case 1 :
(*((ExFuncPtr1)fProc))(ppParam[0]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 2 :
(*((ExFuncPtr2)fProc))(ppParam[0], ppParam[1]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 3 :
(*((ExFuncPtr3)fProc))(ppParam[0], ppParam[1], ppParam[2]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 4 :
(*((ExFuncPtr4)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 5 :
(*((ExFuncPtr5)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 6 :
(*((ExFuncPtr6)fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 7 :
(*((ExFuncPtr7)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 8 :
(*((ExFuncPtr8)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 9 :
(*((ExFuncPtr9)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 10 :
(*((ExFuncPtr10)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 11 :
(*((ExFuncPtr11)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 12:
(*((ExFuncPtr12)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 13:
(*((ExFuncPtr13)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 14 :
(*((ExFuncPtr14)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12], ppParam[13]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 15 :
(*((ExFuncPtr15)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12], ppParam[13], ppParam[14]);
- bRet = TRUE;
+ bRet = sal_True;
break;
case 16 :
(*((ExFuncPtr16)fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5],
ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11],
ppParam[12], ppParam[13], ppParam[14], ppParam[15]);
- bRet = TRUE;
+ bRet = sal_True;
break;
default : break;
}
@@ -416,15 +416,15 @@ BOOL FuncData::Call(void** ppParam)
//------------------------------------------------------------------------
-BOOL FuncData::Unadvice( double nHandle )
+sal_Bool FuncData::Unadvice( double nHandle )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
osl::Module* pLib = pModuleData->GetInstance();
FARPROC fProc = (FARPROC)pLib->getFunctionSymbol(LIBFUNCNAME(UNADVICE));
if (fProc != NULL)
{
((::Unadvice)fProc)(nHandle);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -439,9 +439,9 @@ const String& FuncData::GetModuleName() const
//------------------------------------------------------------------------
-BOOL FuncData::GetParamDesc( String& aName, String& aDesc, USHORT nParam )
+sal_Bool FuncData::GetParamDesc( String& aName, String& aDesc, sal_uInt16 nParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( nParam <= nParamCount )
{
osl::Module* pLib = pModuleData->GetInstance();
@@ -451,11 +451,11 @@ BOOL FuncData::GetParamDesc( String& aName, String& aDesc, USHORT nParam )
sal_Char pcName[256];
sal_Char pcDesc[256];
*pcName = *pcDesc = 0;
- USHORT nFuncNo = nNumber; // nicht per Reference versauen lassen..
+ sal_uInt16 nFuncNo = nNumber; // nicht per Reference versauen lassen..
((::GetParamDesc)fProc)( nFuncNo, nParam, pcName, pcDesc );
aName = String( pcName, osl_getThreadTextEncoding() );
aDesc = String( pcDesc, osl_getThreadTextEncoding() );
- bRet = TRUE;
+ bRet = sal_True;
}
}
if ( !bRet )
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 45d2c4a890bb..e7108d43824f 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -46,10 +46,10 @@ const ScFormulaCell* pLastFormulaTreeTop = 0;
// -----------------------------------------------------------------------
-void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
+void ScCellFormat::GetString( ScBaseCell* pCell, sal_uLong nFormat, String& rString,
Color** ppColor, SvNumberFormatter& rFormatter,
- BOOL bNullVals,
- BOOL bFormula,
+ sal_Bool bNullVals,
+ sal_Bool bFormula,
ScForceTextFmt eForceTextFmt )
{
*ppColor = NULL;
@@ -120,7 +120,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
}
else
{
- USHORT nErrCode = pFCell->GetErrCode();
+ sal_uInt16 nErrCode = pFCell->GetErrCode();
// erst nach dem Interpretieren (GetErrCode) das Zahlformat holen:
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
@@ -155,7 +155,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
}
}
-void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString,
+void ScCellFormat::GetInputString( ScBaseCell* pCell, sal_uLong nFormat, String& rString,
SvNumberFormatter& rFormatter )
{
if (&rFormatter==NULL)
@@ -199,7 +199,7 @@ void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rSt
((ScFormulaCell*)pCell)->GetString( rString );
}
- USHORT nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
+ sal_uInt16 nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
if (nErrCode != 0)
{
rString.Erase();
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 573763141b18..ec48a27fed80 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -84,7 +84,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, SCTAB nTab,
aName( rChartName ),
pDocument( pDoc ),
aPositioner(pDoc, nTab, nStartColP, nStartRowP, nEndColP, nEndRowP),
- bValid( TRUE )
+ bValid( sal_True )
{
}
@@ -93,7 +93,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, const ScRangeListRef& rRangeList,
aName( rChartName ),
pDocument( pDoc ),
aPositioner(pDoc, rRangeList),
- bValid( TRUE )
+ bValid( sal_True )
{
}
@@ -115,7 +115,7 @@ ScDataObject* ScChartArray::Clone() const
return new ScChartArray(*this);
}
-BOOL ScChartArray::operator==(const ScChartArray& rCmp) const
+sal_Bool ScChartArray::operator==(const ScChartArray& rCmp) const
{
return aPositioner == rCmp.aPositioner
&& aName == rCmp.aName;
@@ -128,7 +128,7 @@ BOOL ScChartArray::operator==(const ScChartArray& rCmp) const
ScMemChart* ScChartArray::CreateMemChart()
{
ScRangeListRef aRangeListRef(GetRangeList());
- ULONG nCount = aRangeListRef->Count();
+ sal_uLong nCount = aRangeListRef->Count();
if ( nCount > 1 )
return CreateMemChartMulti();
else if ( nCount == 1 )
@@ -225,16 +225,16 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
nRowCount = 0;
}
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
if ( !nColCount )
{
- bValidData = FALSE;
+ bValidData = sal_False;
nColCount = 1;
aCols.push_back(nStrCol);
}
if ( !nRowCount )
{
- bValidData = FALSE;
+ bValidData = sal_False;
nRowCount = 1;
aRows.push_back(nStrRow);
}
@@ -251,7 +251,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
// pMemChart->SetNumberFormatter( pFormatter );
if ( bValidData )
{
- BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
+ sal_Bool bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
ScBaseCell* pCell;
for (nCol=0; nCol<nColCount; nCol++)
{
@@ -314,7 +314,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
}
pMemChart->SetColText( static_cast<short>(nCol), aString);
-// ULONG nNumberAttr = (nTotalRows ? pDocument->GetNumberFormat(
+// sal_uLong nNumberAttr = (nTotalRows ? pDocument->GetNumberFormat(
// ScAddress( pCols[nCol], nRow1, nTab1)) : 0);
// pMemChart->SetNumFormatIdCol( static_cast<long>(nCol), nNumberAttr );
}
@@ -339,7 +339,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
}
pMemChart->SetRowText( static_cast<short>(nRow), aString);
-// ULONG nNumberAttr = (nTotalCols ? pDocument->GetNumberFormat(
+// sal_uLong nNumberAttr = (nTotalCols ? pDocument->GetNumberFormat(
// ScAddress( nCol1, pRows[nRow], nTab1)) : 0);
// pMemChart->SetNumFormatIdRow( static_cast<long>(nRow), nNumberAttr );
}
@@ -358,7 +358,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
// Zahlen-Typ
//
-// ULONG nNumberAttr = (nTotalCols && nTotalRows ?
+// sal_uLong nNumberAttr = (nTotalCols && nTotalRows ?
// pDocument->GetNumberFormat( ScAddress( nCol1, nRow1, nTab1)) :
// 0);
// if (pFormatter)
@@ -389,15 +389,15 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
nRowCount = 0;
}
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
if ( !nColCount )
{
- bValidData = FALSE;
+ bValidData = sal_False;
nColCount = 1;
}
if ( !nRowCount )
{
- bValidData = FALSE;
+ bValidData = sal_False;
nRowCount = 1;
}
@@ -410,8 +410,8 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
if (pMemChart)
{
// pMemChart->SetNumberFormatter( pDocument->GetFormatTable() );
- BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
- ULONG nIndex = 0;
+ sal_Bool bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown();
+ sal_uLong nIndex = 0;
if (bValidData)
{
for ( nCol = 0; nCol < nColCount; nCol++ )
@@ -431,7 +431,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
nVal = ((ScValueCell*)pCell)->GetValue();
if ( bCalcAsShown && nVal != 0.0 )
{
- ULONG nFormat = pDocument->GetNumberFormat( *pPos );
+ sal_uLong nFormat = pDocument->GetNumberFormat( *pPos );
nVal = pDocument->RoundValueAsShown( nVal, nFormat );
}
}
@@ -464,7 +464,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
nVal = ((ScValueCell*)pCell)->GetValue();
if ( bCalcAsShown && nVal != 0.0 )
{
- ULONG nFormat = pDocument->GetNumberFormat( *pPos );
+ sal_uLong nFormat = pDocument->GetNumberFormat( *pPos );
nVal = pDocument->RoundValueAsShown( nVal, nFormat );
}
}
@@ -509,7 +509,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
}
pMemChart->SetColText( static_cast<short>(nCol), aString);
-// ULONG nNumberAttr = 0;
+// sal_uLong nNumberAttr = 0;
// pPos = GetPositionMap()->GetPosition( nCol, 0 );
// if ( pPos )
// nNumberAttr = pDocument->GetNumberFormat( *pPos );
@@ -542,7 +542,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
}
pMemChart->SetRowText( static_cast<short>(nRow), aString);
-// ULONG nNumberAttr = 0;
+// sal_uLong nNumberAttr = 0;
// pPos = GetPositionMap()->GetPosition( 0, nRow );
// if ( pPos )
// nNumberAttr = pDocument->GetNumberFormat( *pPos );
@@ -566,14 +566,14 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
// SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
// if (pFormatter)
// {
-// ULONG nIndex = 0;
-// ULONG nCount = GetPositionMap()->GetCount();
+// sal_uLong nIndex = 0;
+// sal_uLong nCount = GetPositionMap()->GetCount();
// const ScAddress* pPos;
// do
// {
// pPos = GetPositionMap()->GetPosition( nIndex );
// } while ( !pPos && ++nIndex < nCount );
-// ULONG nFormat = ( pPos ? pDocument->GetNumberFormat( *pPos ) : 0 );
+// sal_uLong nFormat = ( pPos ? pDocument->GetNumberFormat( *pPos ) : 0 );
// pMemChart->SetDataType( pFormatter->GetType( nFormat ) );
// }
@@ -601,15 +601,15 @@ ScDataObject* ScChartCollection::Clone() const
return new ScChartCollection(*this);
}
-BOOL ScChartCollection::operator==(const ScChartCollection& rCmp) const
+sal_Bool ScChartCollection::operator==(const ScChartCollection& rCmp) const
{
if (nCount != rCmp.nCount)
- return FALSE;
+ return sal_False;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (!((*(const ScChartArray*)pItems[i]) == (*(const ScChartArray*)rCmp.pItems[i])))
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 6c091250c80d..a2db16dff690 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -52,16 +52,16 @@ namespace
{
-USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts )
+sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
return 0;
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
- USHORT nPageCount = pModel->GetPageCount();
- for (USHORT nPageNo=0; nPageNo<nPageCount; nPageNo++)
+ sal_uInt16 nPageCount = pModel->GetPageCount();
+ for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++)
{
SdrPage* pPage = pModel->GetPage(nPageNo);
DBG_ASSERT(pPage,"Page ?");
@@ -73,12 +73,12 @@ USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCha
if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) )
{
String aName = ((SdrOle2Obj*)pObject)->GetPersistName();
- BOOL bHit = TRUE;
+ sal_Bool bHit = sal_True;
if ( !bAllCharts )
{
ScRangeList aRanges;
- BOOL bColHeaders = FALSE;
- BOOL bRowHeaders = FALSE;
+ sal_Bool bColHeaders = sal_False;
+ sal_Bool bRowHeaders = sal_False;
pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders );
bHit = aRanges.In( rPos );
}
@@ -94,31 +94,31 @@ USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCha
return nFound;
}
-BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount )
+sal_Bool lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount )
{
//! if multiple sheets are copied, update references into the other copied sheets?
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
- ULONG nCount = rRanges.Count();
- for (ULONG i=0; i<nCount; i++)
+ sal_uLong nCount = rRanges.Count();
+ for (sal_uLong i=0; i<nCount; i++)
{
ScRange* pRange = rRanges.GetObject(i);
if ( pRange->aStart.Tab() == nSourceTab && pRange->aEnd.Tab() == nSourceTab )
{
pRange->aStart.SetTab( nDestTab );
pRange->aEnd.SetTab( nDestTab );
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( pRange->aStart.Tab() >= nTabCount )
{
pRange->aStart.SetTab( nTabCount > 0 ? ( nTabCount - 1 ) : 0 );
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( pRange->aEnd.Tab() >= nTabCount )
{
pRange->aEnd.SetTab( nTabCount > 0 ? ( nTabCount - 1 ) : 0 );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -130,15 +130,15 @@ BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, S
// === ScChartHelper ======================================
//static
-USHORT ScChartHelper::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc )
+sal_uInt16 ScChartHelper::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc )
{
- return lcl_DoUpdateCharts( rPos, pDoc, FALSE );
+ return lcl_DoUpdateCharts( rPos, pDoc, sal_False );
}
//static
-USHORT ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc )
+sal_uInt16 ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc )
{
- return lcl_DoUpdateCharts( ScAddress(), pDoc, TRUE );
+ return lcl_DoUpdateCharts( ScAddress(), pDoc, sal_True );
}
//static
@@ -318,7 +318,7 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
::rtl::OUString aChartName = pSdrOle2Obj->GetPersistName();
ScRange aEmptyRange;
ScChartListener aSearcher( aChartName, pDocument, aEmptyRange );
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
ScChartListenerCollection* pCollection = pDocument->GetChartListenerCollection();
if ( pCollection && pCollection->Search( &aSearcher, nIndex ) )
{
@@ -408,7 +408,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, Sd
{
ScRange aEmptyRange;
ScChartListener aSearcher( aChartName, pDoc, aEmptyRange );
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection();
if ( pCollection && !pCollection->Search( &aSearcher, nIndex ) )
{
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index b729ce0b30b5..411d5d6c72e8 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -131,9 +131,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP,
mpTokens(new vector<ScSharedTokenRef>),
pUnoData( NULL ),
pDoc( pDocP ),
- bUsed( FALSE ),
- bDirty( FALSE ),
- bSeriesRangesScheduled( FALSE )
+ bUsed( sal_False ),
+ bDirty( sal_False ),
+ bSeriesRangesScheduled( sal_False )
{
SetRangeList( rRange );
}
@@ -146,9 +146,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP,
mpTokens(new vector<ScSharedTokenRef>),
pUnoData( NULL ),
pDoc( pDocP ),
- bUsed( FALSE ),
- bDirty( FALSE ),
- bSeriesRangesScheduled( FALSE )
+ bUsed( sal_False ),
+ bDirty( sal_False ),
+ bSeriesRangesScheduled( sal_False )
{
ScRefTokenHelper::getTokensFromRangeList(*mpTokens, *rRangeList);
}
@@ -160,9 +160,9 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, vector
mpTokens(pTokens),
pUnoData( NULL ),
pDoc( pDocP ),
- bUsed( FALSE ),
- bDirty( FALSE ),
- bSeriesRangesScheduled( FALSE )
+ bUsed( sal_False ),
+ bDirty( sal_False ),
+ bSeriesRangesScheduled( sal_False )
{
}
@@ -173,7 +173,7 @@ ScChartListener::ScChartListener( const ScChartListener& r ) :
mpTokens(new vector<ScSharedTokenRef>(*r.mpTokens)),
pUnoData( NULL ),
pDoc( r.pDoc ),
- bUsed( FALSE ),
+ bUsed( sal_False ),
bDirty( r.bDirty ),
bSeriesRangesScheduled( r.bSeriesRangesScheduled )
{
@@ -260,7 +260,7 @@ void ScChartListener::Update()
}
if ( pUnoData )
{
- bDirty = FALSE;
+ bDirty = sal_False;
//! irgendwann mal erkennen, was sich innerhalb des Charts geaendert hat
chart::ChartDataChangeEvent aEvent( pUnoData->GetSource(),
chart::ChartDataChangeType_ALL,
@@ -269,7 +269,7 @@ void ScChartListener::Update()
}
else if ( pDoc->GetAutoCalc() )
{
- bDirty = FALSE;
+ bDirty = sal_False;
pDoc->UpdateChart( GetString());
}
}
@@ -381,13 +381,13 @@ void ScChartListener::EndListeningTo()
void ScChartListener::ChangeListening( const ScRangeListRef& rRangeListRef,
- BOOL bDirtyP )
+ sal_Bool bDirtyP )
{
EndListeningTo();
SetRangeList( rRangeListRef );
StartListeningTo();
if ( bDirtyP )
- SetDirty( TRUE );
+ SetDirty( sal_True );
}
@@ -395,7 +395,7 @@ void ScChartListener::UpdateScheduledSeriesRanges()
{
if ( bSeriesRangesScheduled )
{
- bSeriesRangesScheduled = FALSE;
+ bSeriesRangesScheduled = sal_False;
UpdateSeriesRanges();
}
}
@@ -435,7 +435,7 @@ void ScChartListener::SetUpdateQueue()
pDoc->GetChartListenerCollection()->StartTimer();
}
-BOOL ScChartListener::operator==( const ScChartListener& r )
+sal_Bool ScChartListener::operator==( const ScChartListener& r )
{
bool b1 = (mpTokens.get() && !mpTokens->empty());
bool b2 = (r.mpTokens.get() && !r.mpTokens->empty());
@@ -471,7 +471,7 @@ ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& r
}
ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
- ScStrCollection( 4, 4, FALSE ),
+ ScStrCollection( 4, 4, sal_False ),
pDoc( pDocP )
{
aTimer.SetTimeoutHdl( LINK( this, ScChartListenerCollection, TimerHdl ) );
@@ -502,18 +502,18 @@ ScDataObject* ScChartListenerCollection::Clone() const
void ScChartListenerCollection::StartAllListeners()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
((ScChartListener*) pItems[ nIndex ])->StartListeningTo();
}
}
void ScChartListenerCollection::ChangeListening( const String& rName,
- const ScRangeListRef& rRangeListRef, BOOL bDirty )
+ const ScRangeListRef& rRangeListRef, sal_Bool bDirty )
{
ScChartListener aCLSearcher( rName, pDoc, rRangeListRef );
ScChartListener* pCL;
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( Search( &aCLSearcher, nIndex ) )
{
pCL = (ScChartListener*) pItems[ nIndex ];
@@ -527,13 +527,13 @@ void ScChartListenerCollection::ChangeListening( const String& rName,
}
pCL->StartListeningTo();
if ( bDirty )
- pCL->SetDirty( TRUE );
+ pCL->SetDirty( sal_True );
}
void ScChartListenerCollection::FreeUnused()
{
// rueckwaerts wg. Pointer-Aufrueckerei im Array
- for ( USHORT nIndex = nCount; nIndex-- >0; )
+ for ( sal_uInt16 nIndex = nCount; nIndex-- >0; )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
// Uno-Charts nicht rauskicken
@@ -541,7 +541,7 @@ void ScChartListenerCollection::FreeUnused()
if ( !pCL->IsUno() )
{
if ( pCL->IsUsed() )
- pCL->SetUsed( FALSE );
+ pCL->SetUsed( sal_False );
else
Free( pCL );
}
@@ -552,7 +552,7 @@ void ScChartListenerCollection::FreeUno( const uno::Reference< chart::XChartData
const uno::Reference< chart::XChartData >& rSource )
{
// rueckwaerts wg. Pointer-Aufrueckerei im Array
- for ( USHORT nIndex = nCount; nIndex-- >0; )
+ for ( sal_uInt16 nIndex = nCount; nIndex-- >0; )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
if ( pCL->IsUno() &&
@@ -584,7 +584,7 @@ IMPL_LINK( ScChartListenerCollection, TimerHdl, Timer*, EMPTYARG )
void ScChartListenerCollection::UpdateDirtyCharts()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
if ( pCL->IsDirty() )
@@ -597,24 +597,24 @@ void ScChartListenerCollection::UpdateDirtyCharts()
void ScChartListenerCollection::SetDirty()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
- pCL->SetDirty( TRUE );
+ pCL->SetDirty( sal_True );
}
StartTimer();
}
void ScChartListenerCollection::SetDiffDirty(
- const ScChartListenerCollection& rCmp, BOOL bSetChartRangeLists )
+ const ScChartListenerCollection& rCmp, sal_Bool bSetChartRangeLists )
{
- BOOL bDirty = FALSE;
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ sal_Bool bDirty = sal_False;
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
- USHORT nFound;
- BOOL bFound = rCmp.Search( pCL, nFound );
+ sal_uInt16 nFound;
+ sal_Bool bFound = rCmp.Search( pCL, nFound );
if ( !bFound || (*pCL != *((const ScChartListener*) rCmp.pItems[ nFound ])) )
{
if ( bSetChartRangeLists )
@@ -624,16 +624,16 @@ void ScChartListenerCollection::SetDiffDirty(
const ScRangeListRef& rList1 = pCL->GetRangeList();
const ScRangeListRef& rList2 =
((const ScChartListener*) rCmp.pItems[ nFound ])->GetRangeList();
- BOOL b1 = rList1.Is();
- BOOL b2 = rList2.Is();
+ sal_Bool b1 = rList1.Is();
+ sal_Bool b2 = rList2.Is();
if ( b1 != b2 || (b1 && b2 && (*rList1 != *rList2)) )
pDoc->SetChartRangeList( pCL->GetString(), rList1 );
}
else
pDoc->SetChartRangeList( pCL->GetString(), pCL->GetRangeList() );
}
- bDirty = TRUE;
- pCL->SetDirty( TRUE );
+ bDirty = sal_True;
+ pCL->SetDirty( sal_True );
}
}
if ( bDirty )
@@ -643,15 +643,15 @@ void ScChartListenerCollection::SetDiffDirty(
void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
{
- BOOL bDirty = FALSE;
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ sal_Bool bDirty = sal_False;
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
const ScRangeListRef& rList = pCL->GetRangeList();
if ( rList.Is() && rList->Intersects( rRange ) )
{
- bDirty = TRUE;
- pCL->SetDirty( TRUE );
+ bDirty = sal_True;
+ pCL->SetDirty( sal_True );
}
}
if ( bDirty )
@@ -669,7 +669,7 @@ void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
void ScChartListenerCollection::UpdateScheduledSeriesRanges()
{
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
pCL->UpdateScheduledSeriesRanges();
@@ -680,7 +680,7 @@ void ScChartListenerCollection::UpdateScheduledSeriesRanges()
void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab )
{
ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ];
pCL->UpdateChartIntersecting( aRange );
@@ -688,19 +688,19 @@ void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab )
}
-BOOL ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
+sal_Bool ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
{
// hier nicht ScStrCollection::operator==() verwenden, der umstaendlich via
// IsEqual und Compare laeuft, stattdessen ScChartListener::operator==()
if ( pDoc != r.pDoc || nCount != r.nCount )
- return FALSE;
- for ( USHORT nIndex = 0; nIndex < nCount; nIndex++ )
+ return sal_False;
+ for ( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
{
if ( *((ScChartListener*) pItems[ nIndex ]) !=
*((ScChartListener*) r.pItems[ nIndex ]) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScChartListenerCollection::StartListeningHiddenRange( const ScRange& rRange, ScChartHiddenRangeListener* pListener )
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 53c3ae266f89..e80e0f2188e5 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -60,9 +60,9 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, SCTAB nTab,
eGlue( SC_CHARTGLUE_NA ),
nStartCol(0),
nStartRow(0),
- bColHeaders( FALSE ),
- bRowHeaders( FALSE ),
- bDummyUpperLeft( FALSE )
+ bColHeaders( sal_False ),
+ bRowHeaders( sal_False ),
+ bDummyUpperLeft( sal_False )
{
SetRangeList( ScRange( nStartColP, nStartRowP, nTab, nEndColP, nEndRowP, nTab ) );
CheckColRowHeaders();
@@ -75,9 +75,9 @@ ScChartPositioner::ScChartPositioner( ScDocument* pDoc, const ScRangeListRef& rR
eGlue( SC_CHARTGLUE_NA ),
nStartCol(0),
nStartRow(0),
- bColHeaders( FALSE ),
- bRowHeaders( FALSE ),
- bDummyUpperLeft( FALSE )
+ bColHeaders( sal_False ),
+ bRowHeaders( sal_False ),
+ bDummyUpperLeft( sal_False )
{
if ( aRangeListRef.Is() )
CheckColRowHeaders();
@@ -101,7 +101,7 @@ ScChartPositioner::~ScChartPositioner()
delete pPositionMap;
}
-BOOL ScChartPositioner::operator==(const ScChartPositioner& rCmp) const
+sal_Bool ScChartPositioner::operator==(const ScChartPositioner& rCmp) const
{
return bColHeaders == rCmp.bColHeaders
&& bRowHeaders == rCmp.bRowHeaders
@@ -119,7 +119,7 @@ void ScChartPositioner::GlueState()
{
if ( eGlue != SC_CHARTGLUE_NA )
return;
- bDummyUpperLeft = FALSE;
+ bDummyUpperLeft = sal_False;
ScRangePtr pR;
if ( aRangeListRef->Count() <= 1 )
{
@@ -140,7 +140,7 @@ void ScChartPositioner::GlueState()
}
return;
}
-// ULONG nOldPos = aRangeListRef->GetCurPos();
+// sal_uLong nOldPos = aRangeListRef->GetCurPos();
pR = aRangeListRef->First();
nStartCol = pR->aStart.Col();
@@ -177,7 +177,7 @@ void ScChartPositioner::GlueState()
eGlue = SC_CHARTGLUE_COLS;
return;
}
- ULONG nCR = (ULONG)nC * nR;
+ sal_uLong nCR = (sal_uLong)nC * nR;
//2do:
/*
Erstmal simpel ohne Bitmaskiererei, maximal koennten so 8MB alloziert
@@ -187,13 +187,13 @@ void ScChartPositioner::GlueState()
Zeilen/Spalten abzulegen, wuerde aber ein weiteres durchlaufen der
RangeList und indirekten Zugriff auf das Array bedeuten.
*/
- const BYTE nHole = 0;
- const BYTE nOccu = 1;
- const BYTE nFree = 2;
- const BYTE nGlue = 3;
- BYTE* p;
- BYTE* pA = new BYTE[ nCR ];
- memset( pA, 0, nCR * sizeof(BYTE) );
+ const sal_uInt8 nHole = 0;
+ const sal_uInt8 nOccu = 1;
+ const sal_uInt8 nFree = 2;
+ const sal_uInt8 nGlue = 3;
+ sal_uInt8* p;
+ sal_uInt8* pA = new sal_uInt8[ nCR ];
+ memset( pA, 0, nCR * sizeof(sal_uInt8) );
SCCOL nCol, nCol1, nCol2;
SCROW nRow, nRow1, nRow2;
@@ -205,17 +205,17 @@ void ScChartPositioner::GlueState()
nRow2 = pR->aEnd.Row() - nStartRow;
for ( nCol = nCol1; nCol <= nCol2; nCol++ )
{
- p = pA + (ULONG)nCol * nR + nRow1;
+ p = pA + (sal_uLong)nCol * nR + nRow1;
for ( nRow = nRow1; nRow <= nRow2; nRow++, p++ )
*p = nOccu;
}
}
- BOOL bGlue = TRUE;
+ sal_Bool bGlue = sal_True;
- BOOL bGlueCols = FALSE;
+ sal_Bool bGlueCols = sal_False;
for ( nCol = 0; bGlue && nCol < nC; nCol++ )
{ // Spalten probieren durchzugehen und als frei markieren
- p = pA + (ULONG)nCol * nR;
+ p = pA + (sal_uLong)nCol * nR;
for ( nRow = 0; bGlue && nRow < nR; nRow++, p++ )
{
if ( *p == nOccu )
@@ -223,21 +223,21 @@ void ScChartPositioner::GlueState()
// moeglich. Am Rand koennte ok sein, wenn in dieser Spalte
// in jeder belegten Zeile einer belegt ist.
if ( nRow > 0 && nCol > 0 )
- bGlue = FALSE; // nCol==0 kann DummyUpperLeft sein
+ bGlue = sal_False; // nCol==0 kann DummyUpperLeft sein
else
nRow = nR;
}
else
*p = nFree;
}
- if ( bGlue && *(p = (pA + ((((ULONG)nCol+1) * nR) - 1))) == nFree )
+ if ( bGlue && *(p = (pA + ((((sal_uLong)nCol+1) * nR) - 1))) == nFree )
{ // Spalte als komplett frei markieren
*p = nGlue;
- bGlueCols = TRUE; // mindestens eine freie Spalte
+ bGlueCols = sal_True; // mindestens eine freie Spalte
}
}
- BOOL bGlueRows = FALSE;
+ sal_Bool bGlueRows = sal_False;
for ( nRow = 0; bGlue && nRow < nR; nRow++ )
{ // Zeilen probieren durchzugehen und als frei markieren
p = pA + nRow;
@@ -246,28 +246,28 @@ void ScChartPositioner::GlueState()
if ( *p == nOccu )
{
if ( nCol > 0 && nRow > 0 )
- bGlue = FALSE; // nRow==0 kann DummyUpperLeft sein
+ bGlue = sal_False; // nRow==0 kann DummyUpperLeft sein
else
nCol = nC;
}
else
*p = nFree;
}
- if ( bGlue && *(p = (pA + ((((ULONG)nC-1) * nR) + nRow))) == nFree )
+ if ( bGlue && *(p = (pA + ((((sal_uLong)nC-1) * nR) + nRow))) == nFree )
{ // Zeile als komplett frei markieren
*p = nGlue;
- bGlueRows = TRUE; // mindestens eine freie Zeile
+ bGlueRows = sal_True; // mindestens eine freie Zeile
}
}
// n=1: die linke obere Ecke koennte bei Beschriftung automagisch
// hinzugezogen werden
p = pA + 1;
- for ( ULONG n = 1; bGlue && n < nCR; n++, p++ )
+ for ( sal_uLong n = 1; bGlue && n < nCR; n++, p++ )
{ // ein unberuehrtes Feld heisst, dass es weder spaltenweise noch
// zeilenweise zu erreichen war, also nichts zusamenzufassen
if ( *p == nHole )
- bGlue = FALSE;
+ bGlue = sal_False;
}
if ( bGlue )
{
@@ -278,7 +278,7 @@ void ScChartPositioner::GlueState()
else
eGlue = SC_CHARTGLUE_COLS;
if ( *pA != nOccu )
- bDummyUpperLeft = TRUE;
+ bDummyUpperLeft = sal_True;
}
else
{
@@ -294,37 +294,37 @@ void ScChartPositioner::CheckColRowHeaders()
SCROW nRow1, nRow2, iRow;
SCTAB nTab1, nTab2;
- BOOL bColStrings = TRUE;
- BOOL bRowStrings = TRUE;
+ sal_Bool bColStrings = sal_True;
+ sal_Bool bRowStrings = sal_True;
GlueState();
if ( aRangeListRef->Count() == 1 )
{
aRangeListRef->First()->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
if ( nCol1 > nCol2 || nRow1 > nRow2 )
- bColStrings = bRowStrings = FALSE;
+ bColStrings = bRowStrings = sal_False;
else
{
for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++)
{
if (lcl_hasValueDataButNoDates( pDocument, iCol, nRow1, nTab1 ))
- bColStrings = FALSE;
+ bColStrings = sal_False;
}
for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++)
{
if (lcl_hasValueDataButNoDates( pDocument, nCol1, iRow, nTab1 ))
- bRowStrings = FALSE;
+ bRowStrings = sal_False;
}
}
}
else
{
- BOOL bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS);
+ sal_Bool bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS);
for ( ScRangePtr pR = aRangeListRef->First();
pR && (bColStrings || bRowStrings);
pR = aRangeListRef->Next() )
{
pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
- BOOL bTopRow = (nRow1 == nStartRow);
+ sal_Bool bTopRow = (nRow1 == nStartRow);
if ( bRowStrings && (bVert || nCol1 == nStartCol) )
{ // NONE oder ROWS: RowStrings in jeder Selektion moeglich
// COLS oder BOTH: nur aus der ersten Spalte
@@ -332,7 +332,7 @@ void ScChartPositioner::CheckColRowHeaders()
for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++)
{
if (lcl_hasValueDataButNoDates( pDocument, nCol1, iRow, nTab1 ))
- bRowStrings = FALSE;
+ bRowStrings = sal_False;
}
}
if ( bColStrings && bTopRow )
@@ -341,7 +341,7 @@ void ScChartPositioner::CheckColRowHeaders()
for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++)
{
if (lcl_hasValueDataButNoDates( pDocument, iCol, nRow1, nTab1 ))
- bColStrings = FALSE;
+ bColStrings = sal_False;
}
}
}
@@ -384,7 +384,7 @@ void ScChartPositioner::CreatePositionMap()
GlueState();
- BOOL bNoGlue = (eGlue == SC_CHARTGLUE_NONE);
+ sal_Bool bNoGlue = (eGlue == SC_CHARTGLUE_NONE);
Table* pCols = new Table;
Table* pNewRowTable = new Table;
ScAddress* pNewAddress = new ScAddress;
@@ -398,8 +398,8 @@ void ScChartPositioner::CreatePositionMap()
for ( nTab = nTab1; nTab <= nTab2; nTab++ )
{
// nTab im ColKey, um gleiche Col/Row in anderer Table haben zu koennen
- ULONG nInsCol = (static_cast<ULONG>(nTab) << 16) | (bNoGlue ? 0 :
- static_cast<ULONG>(nCol1));
+ sal_uLong nInsCol = (static_cast<sal_uLong>(nTab) << 16) | (bNoGlue ? 0 :
+ static_cast<sal_uLong>(nCol1));
for ( nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol )
{
if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS )
@@ -423,7 +423,7 @@ void ScChartPositioner::CreatePositionMap()
}
// bei anderer Tabelle wurde bereits neuer ColKey erzeugt,
// die Zeilen muessen fuer's Dummy fuellen gleich sein!
- ULONG nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
+ sal_uLong nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
for ( nRow = nRow1; nRow <= nRow2; nRow++, nInsRow++ )
{
if ( pCol->Insert( nInsRow, pNewAddress ) )
@@ -486,11 +486,11 @@ void ScChartPositioner::CreatePositionMap()
if ( bNoGlue )
{ // Luecken mit Dummies fuellen, erste Spalte ist Master
Table* pFirstCol = (Table*) pCols->First();
- ULONG nCount = pFirstCol->Count();
+ sal_uLong nCount = pFirstCol->Count();
pFirstCol->First();
- for ( ULONG n = 0; n < nCount; n++, pFirstCol->Next() )
+ for ( sal_uLong n = 0; n < nCount; n++, pFirstCol->Next() )
{
- ULONG nKey = pFirstCol->GetCurKey();
+ sal_uLong nKey = pFirstCol->GetCurKey();
pCols->First();
while ( (pCol = (Table*) pCols->Next())!=NULL )
pCol->Insert( nKey, (void*)0 ); // keine Daten
@@ -515,7 +515,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
ppData( new ScAddress* [ nChartCols * nChartRows ] ),
ppColHeader( new ScAddress* [ nChartCols ] ),
ppRowHeader( new ScAddress* [ nChartRows ] ),
- nCount( (ULONG) nChartCols * nChartRows ),
+ nCount( (sal_uLong) nChartCols * nChartRows ),
nColCount( nChartCols ),
nRowCount( nChartRows )
{
@@ -551,7 +551,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
pCol = (Table*) rCols.Next();
// Daten spaltenweise und Spalten-Header
- ULONG nIndex = 0;
+ sal_uLong nIndex = 0;
for ( nCol = 0; nCol < nColCount; nCol++ )
{
if ( pCol )
@@ -585,7 +585,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
ScChartPositionMap::~ScChartPositionMap()
{
- for ( ULONG nIndex=0; nIndex < nCount; nIndex++ )
+ for ( sal_uLong nIndex=0; nIndex < nCount; nIndex++ )
{
delete ppData[nIndex];
}
@@ -611,8 +611,8 @@ ScChartPositionMap::~ScChartPositionMap()
//UNUSED2009-05 ScRangeListRef xRangeList = new ScRangeList;
//UNUSED2009-05 if ( nChartCol < nColCount )
//UNUSED2009-05 {
-//UNUSED2009-05 ULONG nStop = GetIndex( nChartCol, nRowCount );
-//UNUSED2009-05 for ( ULONG nIndex = GetIndex( nChartCol, 0 ); nIndex < nStop; nIndex++ )
+//UNUSED2009-05 sal_uLong nStop = GetIndex( nChartCol, nRowCount );
+//UNUSED2009-05 for ( sal_uLong nIndex = GetIndex( nChartCol, 0 ); nIndex < nStop; nIndex++ )
//UNUSED2009-05 {
//UNUSED2009-05 if ( ppData[ nIndex ] )
//UNUSED2009-05 xRangeList->Join( *ppData[ nIndex ] );
@@ -627,8 +627,8 @@ ScChartPositionMap::~ScChartPositionMap()
//UNUSED2009-05 ScRangeListRef xRangeList = new ScRangeList;
//UNUSED2009-05 if ( nChartRow < nRowCount )
//UNUSED2009-05 {
-//UNUSED2009-05 ULONG nStop = GetIndex( nColCount, nChartRow );
-//UNUSED2009-05 for ( ULONG nIndex = GetIndex( 0, nChartRow ); nIndex < nStop;
+//UNUSED2009-05 sal_uLong nStop = GetIndex( nColCount, nChartRow );
+//UNUSED2009-05 for ( sal_uLong nIndex = GetIndex( 0, nChartRow ); nIndex < nStop;
//UNUSED2009-05 nIndex += nRowCount )
//UNUSED2009-05 {
//UNUSED2009-05 if ( ppData[ nIndex ] )
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index ba3f3e47bfb7..3cabca7b7647 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -61,10 +61,10 @@
DECLARE_STACK( ScChangeActionStack, ScChangeAction* )
-const USHORT nMemPoolChangeActionCellListEntry = (0x2000 - 64) / sizeof(ScChangeActionCellListEntry);
+const sal_uInt16 nMemPoolChangeActionCellListEntry = (0x2000 - 64) / sizeof(ScChangeActionCellListEntry);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionCellListEntry, nMemPoolChangeActionCellListEntry, nMemPoolChangeActionCellListEntry )
-const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActionLinkEntry);
+const sal_uInt16 nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActionLinkEntry);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionLinkEntry, nMemPoolChangeActionLinkEntry, nMemPoolChangeActionLinkEntry )
// loaded MSB > eigenes => inkompatibel
@@ -115,7 +115,7 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& rRange
}
ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRange,
- const ULONG nTempAction, const ULONG nTempRejectAction,
+ const sal_uLong nTempAction, const sal_uLong nTempRejectAction,
const ScChangeActionState eTempState, const DateTime& aTempDateTime,
const String& aTempUser, const String& aTempComment)
:
@@ -137,7 +137,7 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRa
}
ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRange,
- const ULONG nTempAction)
+ const sal_uLong nTempAction)
:
aBigRange( rRange ),
pNext( NULL ),
@@ -161,45 +161,45 @@ ScChangeAction::~ScChangeAction()
}
-BOOL ScChangeAction::IsVisible() const
+sal_Bool ScChangeAction::IsVisible() const
{
//! sequence order of execution is significant
if ( IsRejected() || GetType() == SC_CAT_DELETE_TABS || IsDeletedIn() )
- return FALSE;
+ return sal_False;
if ( GetType() == SC_CAT_CONTENT )
return ((ScChangeActionContent*)this)->IsTopContent();
- return TRUE;
+ return sal_True;
}
-BOOL ScChangeAction::IsTouchable() const
+sal_Bool ScChangeAction::IsTouchable() const
{
//! sequence order of execution is significant
if ( IsRejected() || GetType() == SC_CAT_REJECT || IsDeletedIn() )
- return FALSE;
+ return sal_False;
// content may reject and be touchable if on top
if ( GetType() == SC_CAT_CONTENT )
return ((ScChangeActionContent*)this)->IsTopContent();
if ( IsRejecting() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL ScChangeAction::IsClickable() const
+sal_Bool ScChangeAction::IsClickable() const
{
//! sequence order of execution is significant
if ( !IsVirgin() )
- return FALSE;
+ return sal_False;
if ( IsDeletedIn() )
- return FALSE;
+ return sal_False;
if ( GetType() == SC_CAT_CONTENT )
{
ScChangeActionContentCellType eCCT =
ScChangeActionContent::GetContentCellType(
((ScChangeActionContent*)this)->GetNewCell() );
if ( eCCT == SC_CACCT_MATREF )
- return FALSE;
+ return sal_False;
if ( eCCT == SC_CACCT_MATORG )
{ // no Accept-Select if one of the references is in a deleted col/row
const ScChangeActionLinkEntry* pL =
@@ -208,101 +208,101 @@ BOOL ScChangeAction::IsClickable() const
{
ScChangeAction* p = (ScChangeAction*) pL->GetAction();
if ( p && p->IsDeletedIn() )
- return FALSE;
+ return sal_False;
pL = pL->GetNext();
}
}
- return TRUE; // for Select() a content doesn't have to be touchable
+ return sal_True; // for Select() a content doesn't have to be touchable
}
return IsTouchable(); // Accept()/Reject() only on touchables
}
-BOOL ScChangeAction::IsRejectable() const
+sal_Bool ScChangeAction::IsRejectable() const
{
//! sequence order of execution is significant
if ( !IsClickable() )
- return FALSE;
+ return sal_False;
if ( GetType() == SC_CAT_CONTENT )
{
if ( ((ScChangeActionContent*)this)->IsOldMatrixReference() )
- return FALSE;
+ return sal_False;
ScChangeActionContent* pNextContent =
((ScChangeActionContent*)this)->GetNextContent();
if ( pNextContent == NULL )
- return TRUE; // *this is TopContent
+ return sal_True; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
}
return IsTouchable();
}
-BOOL ScChangeAction::IsInternalRejectable() const
+sal_Bool ScChangeAction::IsInternalRejectable() const
{
//! sequence order of execution is significant
if ( !IsVirgin() )
- return FALSE;
+ return sal_False;
if ( IsDeletedIn() )
- return FALSE;
+ return sal_False;
if ( GetType() == SC_CAT_CONTENT )
{
ScChangeActionContent* pNextContent =
((ScChangeActionContent*)this)->GetNextContent();
if ( pNextContent == NULL )
- return TRUE; // *this is TopContent
+ return sal_True; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
}
return IsTouchable();
}
-BOOL ScChangeAction::IsDialogRoot() const
+sal_Bool ScChangeAction::IsDialogRoot() const
{
return IsInternalRejectable(); // only rejectables in root
}
-BOOL ScChangeAction::IsDialogParent() const
+sal_Bool ScChangeAction::IsDialogParent() const
{
//! sequence order of execution is significant
if ( GetType() == SC_CAT_CONTENT )
{
if ( !IsDialogRoot() )
- return FALSE;
+ return sal_False;
if ( ((ScChangeActionContent*)this)->IsMatrixOrigin() && HasDependent() )
- return TRUE;
+ return sal_True;
ScChangeActionContent* pPrevContent =
((ScChangeActionContent*)this)->GetPrevContent();
return pPrevContent && pPrevContent->IsVirgin();
}
if ( HasDependent() )
- return IsDeleteType() ? TRUE : !IsDeletedIn();
+ return IsDeleteType() ? sal_True : !IsDeletedIn();
if ( HasDeleted() )
{
if ( IsDeleteType() )
{
if ( IsDialogRoot() )
- return TRUE;
+ return sal_True;
ScChangeActionLinkEntry* pL = pLinkDeleted;
while ( pL )
{
ScChangeAction* p = pL->GetAction();
if ( p && p->GetType() != eType )
- return TRUE;
+ return sal_True;
pL = pL->GetNext();
}
}
else
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScChangeAction::IsMasterDelete() const
+sal_Bool ScChangeAction::IsMasterDelete() const
{
if ( !IsDeleteType() )
- return FALSE;
+ return sal_False;
ScChangeActionDel* pDel = (ScChangeActionDel*) this;
return pDel->IsMultiDelete() && (pDel->IsTopDelete() || pDel->IsRejectable());
}
@@ -324,9 +324,9 @@ void ScChangeAction::RemoveAllAnyLinks()
}
-BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
+sal_Bool ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
{
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = sal_False;
ScChangeActionLinkEntry* pL = GetDeletedIn();
while ( pL )
{
@@ -334,7 +334,7 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
if ( pL->GetAction() == p )
{
delete pL;
- bRemoved = TRUE;
+ bRemoved = sal_True;
}
pL = pNextLink;
}
@@ -342,16 +342,16 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
}
-BOOL ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const
+sal_Bool ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const
{
ScChangeActionLinkEntry* pL = GetDeletedIn();
while ( pL )
{
if ( pL->GetAction() == p )
- return TRUE;
+ return sal_True;
pL = pL->GetNext();
}
- return FALSE;
+ return sal_False;
}
@@ -363,7 +363,7 @@ void ScChangeAction::RemoveAllDeletedIn()
}
-BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
+sal_Bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
{
ScChangeAction* p;
ScChangeActionLinkEntry* pL = GetDeletedIn();
@@ -389,11 +389,11 @@ BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const
{
if ( (p = pL->GetAction()) != NULL &&
(p->GetType() == eDelType || p->GetType() == eInsType) )
- return TRUE;
+ return sal_True;
pL = pL->GetNext();
}
}
- return FALSE;
+ return sal_False;
}
@@ -433,14 +433,14 @@ DateTime ScChangeAction::GetDateTime() const
void ScChangeAction::UpdateReference( const ScChangeTrack* /* pTrack */,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDx, INT32 nDy, INT32 nDz )
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
{
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, GetBigRange() );
}
void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */,
- BOOL /* bSplitRange */, bool bWarning ) const
+ sal_Bool /* bSplitRange */, bool bWarning ) const
{
if ( IsRejecting() && bWarning )
{
@@ -483,7 +483,7 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */,
else if (pReject->HasDependent())
{
ScChangeActionTable aTable;
- pCT->GetDependents( pReject, aTable, FALSE, TRUE );
+ pCT->GetDependents( pReject, aTable, sal_False, sal_True );
for ( const ScChangeAction* p = aTable.First(); p;
p = aTable.Next() )
{
@@ -511,10 +511,10 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */,
String ScChangeAction::GetRefString( const ScBigRange& rRange,
- ScDocument* pDoc, BOOL bFlag3D ) const
+ ScDocument* pDoc, sal_Bool bFlag3D ) const
{
String aStr;
- USHORT nFlags = ( rRange.IsValid( pDoc ) ? SCA_VALID : 0 );
+ sal_uInt16 nFlags = ( rRange.IsValid( pDoc ) ? SCA_VALID : 0 );
if ( !nFlags )
aStr = ScGlobal::GetRscString( STR_NOREF_STR );
else
@@ -560,7 +560,7 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
void ScChangeAction::GetRefString( String& rStr, ScDocument* pDoc,
- BOOL bFlag3D ) const
+ sal_Bool bFlag3D ) const
{
rStr = GetRefString( GetBigRange(), pDoc, bFlag3D );
}
@@ -603,7 +603,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
}
}
SetState( SC_CAS_REJECTED ); // vor UpdateReference fuer Move
- pTrack->UpdateReference( this, TRUE ); // LinkDeleted freigeben
+ pTrack->UpdateReference( this, sal_True ); // LinkDeleted freigeben
DBG_ASSERT( !pLinkDeleted, "ScChangeAction::RejectRestoreContents: pLinkDeleted != NULL" );
// Liste der Contents abarbeiten und loeschen
ScDocument* pDoc = pTrack->GetDocument();
@@ -622,7 +622,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
}
-void ScChangeAction::SetDeletedInThis( ULONG nActionNumber,
+void ScChangeAction::SetDeletedInThis( sal_uLong nActionNumber,
const ScChangeTrack* pTrack )
{
if ( nActionNumber )
@@ -635,7 +635,7 @@ void ScChangeAction::SetDeletedInThis( ULONG nActionNumber,
}
-void ScChangeAction::AddDependent( ULONG nActionNumber,
+void ScChangeAction::AddDependent( sal_uLong nActionNumber,
const ScChangeTrack* pTrack )
{
if ( nActionNumber )
@@ -687,14 +687,14 @@ String ScChangeAction::ToString( ScDocument* pDoc ) const
}
String aReference;
- GetRefString( aReference, pDoc, TRUE );
+ GetRefString( aReference, pDoc, sal_True );
String aAuthor = GetUser();
DateTime aDT = GetDateTime();
String aDate = ScGlobal::pLocaleData->getDate( aDT );
aDate += ' ';
- aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE );
+ aDate += ScGlobal::pLocaleData->getTime( aDT, sal_False, sal_False );
String aDescription;
GetDescription( aDescription, pDoc );
@@ -823,7 +823,7 @@ ScChangeActionIns::ScChangeActionIns( const ScRange& rRange )
}
-ScChangeActionIns::ScChangeActionIns(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionIns::ScChangeActionIns(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment,
const ScChangeActionType eTypeP)
:
@@ -837,11 +837,11 @@ ScChangeActionIns::~ScChangeActionIns()
void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
- USHORT nWhatId;
+ sal_uInt16 nWhatId;
switch ( GetType() )
{
case SC_CAT_INSERT_COLS :
@@ -864,15 +864,15 @@ void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionIns::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionIns::Reject( ScDocument* pDoc )
{
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return sal_False;
ScRange aRange( aBigRange.MakeRange() );
if ( !pDoc->IsBlockEditable( aRange.aStart.Tab(), aRange.aStart.Col(),
aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ) )
- return FALSE;
+ return sal_False;
switch ( GetType() )
{
@@ -892,7 +892,7 @@ BOOL ScChangeActionIns::Reject( ScDocument* pDoc )
}
SetState( SC_CAS_REJECTED );
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
@@ -936,7 +936,7 @@ ScChangeActionDel::ScChangeActionDel( const ScRange& rRange,
}
-ScChangeActionDel::ScChangeActionDel(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionDel::ScChangeActionDel(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String &sComment,
const ScChangeActionType eTypeP, const SCsCOLROW nD, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type
:
@@ -976,40 +976,40 @@ void ScChangeActionDel::DeleteCellEntries()
}
-BOOL ScChangeActionDel::IsBaseDelete() const
+sal_Bool ScChangeActionDel::IsBaseDelete() const
{
return !GetDx() && !GetDy();
}
-BOOL ScChangeActionDel::IsTopDelete() const
+sal_Bool ScChangeActionDel::IsTopDelete() const
{
const ScChangeAction* p = GetNext();
if ( !p || p->GetType() != GetType() )
- return TRUE;
+ return sal_True;
return ((ScChangeActionDel*)p)->IsBaseDelete();
}
-BOOL ScChangeActionDel::IsMultiDelete() const
+sal_Bool ScChangeActionDel::IsMultiDelete() const
{
if ( GetDx() || GetDy() )
- return TRUE;
+ return sal_True;
const ScChangeAction* p = GetNext();
if ( !p || p->GetType() != GetType() )
- return FALSE;
+ return sal_False;
const ScChangeActionDel* pDel = (const ScChangeActionDel*) p;
if ( (pDel->GetDx() > GetDx() || pDel->GetDy() > GetDy()) &&
pDel->GetBigRange() == aBigRange )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL ScChangeActionDel::IsTabDeleteCol() const
+sal_Bool ScChangeActionDel::IsTabDeleteCol() const
{
if ( GetType() != SC_CAT_DELETE_COLS )
- return FALSE;
+ return sal_False;
const ScChangeAction* p = this;
while ( p && p->GetType() == SC_CAT_DELETE_COLS &&
!((const ScChangeActionDel*)p)->IsTopDelete() )
@@ -1020,7 +1020,7 @@ BOOL ScChangeActionDel::IsTabDeleteCol() const
void ScChangeActionDel::UpdateReference( const ScChangeTrack* /* pTrack */,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDxP, INT32 nDyP, INT32 nDz )
+ sal_Int32 nDxP, sal_Int32 nDyP, sal_Int32 nDz )
{
ScRefUpdate::Update( eMode, rRange, nDxP, nDyP, nDz, GetBigRange() );
if ( !IsDeletedIn() )
@@ -1066,11 +1066,11 @@ ScBigRange ScChangeActionDel::GetOverAllRange() const
void ScChangeActionDel::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
- USHORT nWhatId;
+ sal_uInt16 nWhatId;
switch ( GetType() )
{
case SC_CAT_DELETE_COLS :
@@ -1105,12 +1105,12 @@ void ScChangeActionDel::GetDescription( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionDel::Reject( ScDocument* pDoc )
{
if ( !aBigRange.IsValid( pDoc ) && GetType() != SC_CAT_DELETE_TABS )
- return FALSE;
+ return sal_False;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if ( IsTopDelete() )
{ // den kompletten Bereich in einem Rutsch restaurieren
@@ -1120,30 +1120,30 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
if ( GetType() == SC_CAT_DELETE_TABS )
{ // wird Tab angehaengt?
if ( aTmpRange.aStart.Tab() > pDoc->GetMaxTableNumber() )
- bOk = FALSE;
+ bOk = sal_False;
}
else
- bOk = FALSE;
+ bOk = sal_False;
}
if ( bOk )
{
ScRange aRange( aTmpRange.MakeRange() );
// InDelete... fuer Formel UpdateReference in Document
pTrack->SetInDeleteRange( aRange );
- pTrack->SetInDeleteTop( TRUE );
- pTrack->SetInDeleteUndo( TRUE );
- pTrack->SetInDelete( TRUE );
+ pTrack->SetInDeleteTop( sal_True );
+ pTrack->SetInDeleteUndo( sal_True );
+ pTrack->SetInDelete( sal_True );
switch ( GetType() )
{
case SC_CAT_DELETE_COLS :
if ( !(aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL) )
{ // nur wenn nicht TabDelete
- if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != FALSE )
+ if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != sal_False )
bOk = pDoc->InsertCol( aRange );
}
break;
case SC_CAT_DELETE_ROWS :
- if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != FALSE )
+ if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != sal_False )
bOk = pDoc->InsertRow( aRange );
break;
case SC_CAT_DELETE_TABS :
@@ -1151,7 +1151,7 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
//2do: Tabellennamen merken?
String aName;
pDoc->CreateValidTabName( aName );
- if ( ( bOk = pDoc->ValidNewTabName( aName ) ) != FALSE )
+ if ( ( bOk = pDoc->ValidNewTabName( aName ) ) != sal_False )
bOk = pDoc->InsertTab( aRange.aStart.Tab(), aName );
}
break;
@@ -1160,13 +1160,13 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
// added to avoid warnings
}
}
- pTrack->SetInDelete( FALSE );
- pTrack->SetInDeleteUndo( FALSE );
+ pTrack->SetInDelete( sal_False );
+ pTrack->SetInDeleteUndo( sal_False );
}
if ( !bOk )
{
- pTrack->SetInDeleteTop( FALSE );
- return FALSE;
+ pTrack->SetInDeleteTop( sal_False );
+ return sal_False;
}
// InDeleteTop fuer UpdateReference-Undo behalten
}
@@ -1174,9 +1174,9 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc )
// setzt rejected und ruft UpdateReference-Undo und DeleteCellEntries
RejectRestoreContents( pTrack, GetDx(), GetDy() );
- pTrack->SetInDeleteTop( FALSE );
+ pTrack->SetInDeleteTop( sal_False );
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
@@ -1264,7 +1264,7 @@ void ScChangeActionDel::UndoCutOffInsert()
// --- ScChangeActionMove --------------------------------------------------
-ScChangeActionMove::ScChangeActionMove(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionMove::ScChangeActionMove(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aToBigRange, const String& aUserP, const DateTime& aDateTimeP, const String &sComment,
const ScBigRange& aFromBigRange, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type
:
@@ -1299,14 +1299,14 @@ void ScChangeActionMove::DeleteCellEntries()
void ScChangeActionMove::UpdateReference( const ScChangeTrack* /* pTrack */,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDx, INT32 nDy, INT32 nDz )
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
{
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, aFromRange );
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, GetBigRange() );
}
-void ScChangeActionMove::GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const
+void ScChangeActionMove::GetDelta( sal_Int32& nDx, sal_Int32& nDy, sal_Int32& nDz ) const
{
const ScBigAddress& rToPos = GetBigRange().aStart;
const ScBigAddress& rFromPos = GetFromRange().aStart;
@@ -1317,11 +1317,11 @@ void ScChangeActionMove::GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const
void ScChangeActionMove::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
- BOOL bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() );
+ sal_Bool bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() );
String aRsc( ScGlobal::GetRscString( STR_CHANGED_MOVE ) );
@@ -1343,7 +1343,7 @@ void ScChangeActionMove::GetDescription( String& rStr, ScDocument* pDoc,
void ScChangeActionMove::GetRefString( String& rStr, ScDocument* pDoc,
- BOOL bFlag3D ) const
+ sal_Bool bFlag3D ) const
{
if ( !bFlag3D )
bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() );
@@ -1354,15 +1354,15 @@ void ScChangeActionMove::GetRefString( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionMove::Reject( ScDocument* pDoc )
{
if ( !(aBigRange.IsValid( pDoc ) && aFromRange.IsValid( pDoc )) )
- return FALSE;
+ return sal_False;
ScRange aToRange( aBigRange.MakeRange() );
ScRange aFrmRange( aFromRange.MakeRange() );
- BOOL bOk = pDoc->IsBlockEditable( aToRange.aStart.Tab(),
+ sal_Bool bOk = pDoc->IsBlockEditable( aToRange.aStart.Tab(),
aToRange.aStart.Col(), aToRange.aStart.Row(),
aToRange.aEnd.Col(), aToRange.aEnd.Row() );
if ( bOk )
@@ -1370,7 +1370,7 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
aFrmRange.aStart.Col(), aFrmRange.aStart.Row(),
aFrmRange.aEnd.Col(), aFrmRange.aEnd.Row() );
if ( !bOk )
- return FALSE;
+ return sal_False;
pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // zu movende Contents
@@ -1412,17 +1412,17 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc )
}
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
// --- ScChangeActionContent -----------------------------------------------
-const USHORT nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent);
+const sal_uInt16 nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent);
IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionContent, nMemPoolChangeActionContent, nMemPoolChangeActionContent )
-ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
- const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
+ const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP,
const DateTime& aDateTimeP, const String& sComment,
ScBaseCell* pTempOldCell, ScDocument* pDoc, const String& sOldValue )
@@ -1443,7 +1443,7 @@ ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
aOldValue = sOldValue; // set again, because SetCell removes it
}
-ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber,
+ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
ScBaseCell* pTempNewCell, const ScBigRange& aBigRangeP,
ScDocument* pDoc, const String& sNewValue )
:
@@ -1508,7 +1508,7 @@ ScChangeActionLinkEntry** ScChangeActionContent::GetDeletedInAddress()
void ScChangeActionContent::SetOldValue( const ScBaseCell* pCell,
- const ScDocument* pFromDoc, ScDocument* pToDoc, ULONG nFormat )
+ const ScDocument* pFromDoc, ScDocument* pToDoc, sal_uLong nFormat )
{
ScChangeActionContent::SetValue( aOldValue, pOldCell,
nFormat, pCell, pFromDoc, pToDoc );
@@ -1532,8 +1532,8 @@ void ScChangeActionContent::SetNewValue( const ScBaseCell* pCell,
void ScChangeActionContent::SetOldNewCells( ScBaseCell* pOldCellP,
- ULONG nOldFormat, ScBaseCell* pNewCellP,
- ULONG nNewFormat, ScDocument* pDoc )
+ sal_uLong nOldFormat, ScBaseCell* pNewCellP,
+ sal_uLong nNewFormat, ScDocument* pDoc )
{
pOldCell = pOldCellP;
pNewCell = pNewCellP;
@@ -1565,7 +1565,7 @@ void ScChangeActionContent::SetValueString( String& rValue, ScBaseCell*& pCell,
rValue.Erase();
pCell = new ScFormulaCell(
pDoc, aBigRange.aStart.MakeAddress(), rStr, formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::CONV_OOO );
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
+ ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True );
}
else
rValue = rStr;
@@ -1597,7 +1597,7 @@ void ScChangeActionContent::GetNewString( String& rStr ) const
void ScChangeActionContent::GetDescription( String& rStr, ScDocument* pDoc,
- BOOL bSplitRange, bool bWarning ) const
+ sal_Bool bSplitRange, bool bWarning ) const
{
ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
@@ -1632,9 +1632,9 @@ void ScChangeActionContent::GetDescription( String& rStr, ScDocument* pDoc,
void ScChangeActionContent::GetRefString( String& rStr, ScDocument* pDoc,
- BOOL bFlag3D ) const
+ sal_Bool bFlag3D ) const
{
- USHORT nFlags = ( GetBigRange().IsValid( pDoc ) ? SCA_VALID : 0 );
+ sal_uInt16 nFlags = ( GetBigRange().IsValid( pDoc ) ? SCA_VALID : 0 );
if ( nFlags )
{
const ScBaseCell* pCell = GetNewCell();
@@ -1666,25 +1666,25 @@ void ScChangeActionContent::GetRefString( String& rStr, ScDocument* pDoc,
}
-BOOL ScChangeActionContent::Reject( ScDocument* pDoc )
+sal_Bool ScChangeActionContent::Reject( ScDocument* pDoc )
{
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return sal_False;
PutOldValueToDoc( pDoc, 0, 0 );
SetState( SC_CAS_REJECTED );
RemoveAllLinks();
- return TRUE;
+ return sal_True;
}
-BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
- BOOL bOldest, Stack* pRejectActions )
+sal_Bool ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
+ sal_Bool bOldest, Stack* pRejectActions )
{
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return sal_False;
ScChangeActionContent* pContent = this;
// accept previous contents
@@ -1739,7 +1739,7 @@ BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack,
else
SetState( SC_CAS_ACCEPTED );
- return TRUE;
+ return sal_True;
}
@@ -1761,7 +1761,7 @@ void ScChangeActionContent::GetStringOfCell( String& rStr,
// static
void ScChangeActionContent::GetStringOfCell( String& rStr,
- const ScBaseCell* pCell, const ScDocument* pDoc, ULONG nFormat )
+ const ScBaseCell* pCell, const ScDocument* pDoc, sal_uLong nFormat )
{
if ( ScChangeActionContent::GetContentCellType( pCell ) )
{
@@ -1829,7 +1829,7 @@ ScChangeActionContentCellType ScChangeActionContent::GetContentCellType( const S
// static
-BOOL ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell )
+sal_Bool ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell )
{
return pCell && pCell->GetCellType() == CELLTYPE_VALUE;
}
@@ -1840,14 +1840,14 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
const ScAddress& rPos, const ScBaseCell* pOrgCell,
const ScDocument* pFromDoc, ScDocument* pToDoc )
{
- ULONG nFormat = NeedsNumberFormat( pOrgCell ) ? pFromDoc->GetNumberFormat( rPos ) : 0;
+ sal_uLong nFormat = NeedsNumberFormat( pOrgCell ) ? pFromDoc->GetNumberFormat( rPos ) : 0;
SetValue( rStr, pCell, nFormat, pOrgCell, pFromDoc, pToDoc );
}
// static
void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
- ULONG nFormat, const ScBaseCell* pOrgCell,
+ sal_uLong nFormat, const ScBaseCell* pOrgCell,
const ScDocument* pFromDoc, ScDocument* pToDoc )
{
rStr.Erase();
@@ -1866,7 +1866,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
}
break;
case CELLTYPE_FORMULA :
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
+ ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True );
break;
default:
{
@@ -1881,7 +1881,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell,
// static
void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell,
- ULONG nFormat, const ScDocument* pDoc )
+ sal_uLong nFormat, const ScDocument* pDoc )
{
rStr.Erase();
if ( pCell )
@@ -1896,7 +1896,7 @@ void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell,
}
break;
case CELLTYPE_FORMULA :
- ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE );
+ ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True );
break;
default:
{
@@ -2035,19 +2035,19 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
{
rRef1.nCol = SCCOL_MAX;
rRef1.nRelCol = SCCOL_MAX;
- rRef1.SetColDeleted( TRUE );
+ rRef1.SetColDeleted( sal_True );
}
if ( rPos.Row() < 0 || MAXROW < rPos.Row() )
{
rRef1.nRow = SCROW_MAX;
rRef1.nRelRow = SCROW_MAX;
- rRef1.SetRowDeleted( TRUE );
+ rRef1.SetRowDeleted( sal_True );
}
if ( rPos.Tab() < 0 || MAXTAB < rPos.Tab() )
{
rRef1.nTab = SCTAB_MAX;
rRef1.nRelTab = SCTAB_MAX;
- rRef1.SetTabDeleted( TRUE );
+ rRef1.SetTabDeleted( sal_True );
}
if ( rTok.GetType() == formula::svDoubleRef )
{
@@ -2056,19 +2056,19 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
{
rRef2.nCol = SCCOL_MAX;
rRef2.nRelCol = SCCOL_MAX;
- rRef2.SetColDeleted( TRUE );
+ rRef2.SetColDeleted( sal_True );
}
if ( rPos.Row() < 0 || MAXROW < rPos.Row() )
{
rRef2.nRow = SCROW_MAX;
rRef2.nRelRow = SCROW_MAX;
- rRef2.SetRowDeleted( TRUE );
+ rRef2.SetRowDeleted( sal_True );
}
if ( rPos.Tab() < 0 || MAXTAB < rPos.Tab() )
{
rRef2.nTab = SCTAB_MAX;
rRef2.nRelTab = SCTAB_MAX;
- rRef2.SetTabDeleted( TRUE );
+ rRef2.SetTabDeleted( sal_True );
}
}
}
@@ -2076,7 +2076,7 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
UpdateRefMode eMode, const ScBigRange& rRange,
- INT32 nDx, INT32 nDy, INT32 nDz )
+ sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
{
SCSIZE nOldSlot = ScChangeTrack::ComputeContentSlot( aBigRange.aStart.Row() );
ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, aBigRange );
@@ -2090,8 +2090,8 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
if ( pTrack->IsInDelete() && !pTrack->IsInDeleteTop() )
return ; // Formeln nur kompletten Bereich updaten
- BOOL bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA );
- BOOL bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA );
+ sal_Bool bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA );
+ sal_Bool bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA );
if ( bOldFormula || bNewFormula )
{ // via ScFormulaCell UpdateReference anpassen (dort)
if ( pTrack->IsInDelete() )
@@ -2195,7 +2195,7 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack,
// --- ScChangeActionReject ------------------------------------------------
-ScChangeActionReject::ScChangeActionReject(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber,
+ScChangeActionReject::ScChangeActionReject(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment)
:
ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment)
@@ -2269,13 +2269,13 @@ void ScChangeTrack::Init()
nLastMerge = 0;
eMergeState = SC_CTMS_NONE;
nLoadedFileFormatVersion = SC_CHGTRACK_FILEFORMAT;
- bLoadSave = FALSE;
- bInDelete = FALSE;
- bInDeleteTop = FALSE;
- bInDeleteUndo = FALSE;
- bInPasteCut = FALSE;
- bUseFixDateTime = FALSE;
- bTime100thSeconds = TRUE;
+ bLoadSave = sal_False;
+ bInDelete = sal_False;
+ bInDeleteTop = sal_False;
+ bInDeleteUndo = sal_False;
+ bInPasteCut = sal_False;
+ bUseFixDateTime = sal_False;
+ bTime100thSeconds = sal_True;
const SvtUserOptions& rUserOpt = SC_MOD()->GetUserOptions();
aUser = rUserOpt.GetFirstName();
@@ -2342,7 +2342,7 @@ void __EXPORT ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster
if ( !pDoc->IsInDtorClear() )
{
const SvtUserOptions& rUserOptions = SC_MOD()->GetUserOptions();
- USHORT nOldCount = aUserCollection.GetCount();
+ sal_uInt16 nOldCount = aUserCollection.GetCount();
String aStr( rUserOptions.GetFirstName() );
aStr += ' ';
@@ -2377,7 +2377,7 @@ void ScChangeTrack::SetUser( const String& rUser )
void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType,
- ULONG nStartAction )
+ sal_uLong nStartAction )
{
if ( aModifiedLink.IsSet() )
{
@@ -2390,7 +2390,7 @@ void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType,
}
-void ScChangeTrack::EndBlockModify( ULONG nEndAction )
+void ScChangeTrack::EndBlockModify( sal_uLong nEndAction )
{
if ( aModifiedLink.IsSet() )
{
@@ -2408,12 +2408,12 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction )
}
if ( !pBlockModifyMsg )
{
- BOOL bNew = FALSE;
+ sal_Bool bNew = sal_False;
ScChangeTrackMsgInfo* pMsg;
while ( ( pMsg = aMsgStackFinal.Pop() ) != NULL )
{
aMsgQueue.Put( pMsg );
- bNew = TRUE;
+ bNew = sal_True;
}
if ( bNew )
aModifiedLink.Call( this );
@@ -2423,7 +2423,7 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction )
void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType,
- ULONG nStartAction, ULONG nEndAction )
+ sal_uLong nStartAction, sal_uLong nEndAction )
{
if ( aModifiedLink.IsSet() )
{
@@ -2510,7 +2510,7 @@ void ScChangeTrack::AppendLoaded( ScChangeAction* pAppend )
}
-void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
+void ScChangeTrack::Append( ScChangeAction* pAppend, sal_uLong nAction )
{
if ( nActionMax < nAction )
nActionMax = nAction;
@@ -2524,7 +2524,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
// UpdateReference auch wenn pLast==NULL, weil pAppend ein Delete sein
// kann, dass DelContents generiert haben kann
if ( pAppend->IsInsertType() && !pAppend->IsRejecting() )
- UpdateReference( pAppend, FALSE );
+ UpdateReference( pAppend, sal_False );
if ( !pLast )
pFirst = pLast = pAppend;
else
@@ -2539,7 +2539,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
// ToRange nicht deleten.
if ( !pAppend->IsInsertType() &&
!(pAppend->GetType() == SC_CAT_MOVE && pAppend->IsRejecting()) )
- UpdateReference( pAppend, FALSE );
+ UpdateReference( pAppend, sal_False );
MasterLinks( pAppend );
if ( aModifiedLink.IsSet() )
@@ -2550,7 +2550,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction )
ScChangeActionContent* pContent = (ScChangeActionContent*) pAppend;
if ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
- ULONG nMod = pContent->GetActionNumber();
+ sal_uLong nMod = pContent->GetActionNumber();
NotifyModified( SC_CTM_CHANGE, nMod, nMod );
}
}
@@ -2568,7 +2568,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend )
void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
- ScDocument* pRefDoc, ULONG& nStartAction, ULONG& nEndAction, SCsTAB nDz )
+ ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, SCsTAB nDz )
{
nStartAction = GetActionMax() + 1;
AppendDeleteRange( rRange, pRefDoc, nDz, 0 );
@@ -2577,7 +2577,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
- ScDocument* pRefDoc, SCsTAB nDz, ULONG nRejectingInsert )
+ ScDocument* pRefDoc, SCsTAB nDz, sal_uLong nRejectingInsert )
{
SetInDeleteRange( rRange );
StartBlockModify( SC_CTM_APPEND, GetActionMax() + 1 );
@@ -2603,7 +2603,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
aRange.aStart.SetCol( nCol );
aRange.aEnd.SetCol( nCol );
if ( nCol == nCol2 )
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
AppendOneDeleteRange( aRange, pRefDoc, nCol-nCol1, 0,
nTab-nTab1 + nDz, nRejectingInsert );
}
@@ -2619,7 +2619,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
aRange.aStart.SetRow( nRow );
aRange.aEnd.SetRow( nRow );
if ( nRow == nRow2 )
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
AppendOneDeleteRange( aRange, pRefDoc, 0, nRow-nRow1,
0, nRejectingInsert );
}
@@ -2633,7 +2633,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
aRange.aStart.SetCol( nCol );
aRange.aEnd.SetCol( nCol );
if ( nCol == nCol2 )
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
AppendOneDeleteRange( aRange, pRefDoc, nCol-nCol1, 0,
0, nRejectingInsert );
}
@@ -2642,7 +2642,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
{
DBG_ERROR( "ScChangeTrack::AppendDeleteRange: Block not supported!" );
}
- SetInDeleteTop( FALSE );
+ SetInDeleteTop( sal_False );
}
}
EndBlockModify( GetActionMax() );
@@ -2651,7 +2651,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange,
void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange,
ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ULONG nRejectingInsert )
+ sal_uLong nRejectingInsert )
{
ScRange aTrackRange( rOrgRange );
if ( nDx )
@@ -2726,7 +2726,7 @@ void ScChangeTrack::AppendMove( const ScRange& rFromRange,
// static
-BOOL ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell,
+sal_Bool ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell,
const ScBaseCell* pNewCell )
{
SCCOL nC1, nC2;
@@ -2761,7 +2761,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos,
void ScChangeTrack::AppendContent( const ScAddress& rPos,
- const ScBaseCell* pOldCell, ULONG nOldFormat, ScDocument* pRefDoc )
+ const ScBaseCell* pOldCell, sal_uLong nOldFormat, ScDocument* pRefDoc )
{
if ( !pRefDoc )
pRefDoc = pDoc;
@@ -2835,7 +2835,7 @@ void ScChangeTrack::SetLastCutMoveRange( const ScRange& rRange,
void ScChangeTrack::AppendContentRange( const ScRange& rRange,
- ScDocument* pRefDoc, ULONG& nStartAction, ULONG& nEndAction,
+ ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction,
ScChangeActionClipMode eClipMode )
{
if ( eClipMode == SC_CACM_CUT )
@@ -2851,11 +2851,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
SCROW nRow2;
SCTAB nTab2;
rRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
- BOOL bDoContents;
+ sal_Bool bDoContents;
if ( eClipMode == SC_CACM_PASTE && HasLastCut() )
{
- bDoContents = FALSE;
- SetInPasteCut( TRUE );
+ bDoContents = sal_False;
+ SetInPasteCut( sal_True );
// Paste und Cut abstimmen, Paste kann groesserer Range sein
ScRange aRange( rRange );
ScBigRange& r = pLastCutMove->GetBigRange();
@@ -2864,21 +2864,21 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
{
aRange.aEnd.SetCol( aRange.aStart.Col() + nTmpCol );
nCol1 += nTmpCol + 1;
- bDoContents = TRUE;
+ bDoContents = sal_True;
}
SCROW nTmpRow;
if ( (nTmpRow = (SCROW) (r.aEnd.Row() - r.aStart.Row())) != (nRow2 - nRow1) )
{
aRange.aEnd.SetRow( aRange.aStart.Row() + nTmpRow );
nRow1 += nTmpRow + 1;
- bDoContents = TRUE;
+ bDoContents = sal_True;
}
SCTAB nTmpTab;
if ( (nTmpTab = (SCTAB) (r.aEnd.Tab() - r.aStart.Tab())) != (nTab2 - nTab1) )
{
aRange.aEnd.SetTab( aRange.aStart.Tab() + nTmpTab );
nTab1 += nTmpTab + 1;
- bDoContents = TRUE;
+ bDoContents = sal_True;
}
r = aRange;
Undo( nStartLastCut, nEndLastCut ); // hier werden sich die Cuts gemerkt
@@ -2892,11 +2892,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
Append( pLastCutMove );
pLastCutMove = NULL;
ResetLastCut();
- SetInPasteCut( FALSE );
+ SetInPasteCut( sal_False );
}
else
{
- bDoContents = TRUE;
+ bDoContents = sal_True;
nStartAction = GetActionMax() + 1;
StartBlockModify( SC_CTM_APPEND, nStartAction );
}
@@ -2928,7 +2928,7 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc,
- ULONG& nStartAction, ULONG& nEndAction )
+ sal_uLong& nStartAction, sal_uLong& nEndAction )
{
ScDocumentIterator aIter( pRefDoc, 0, MAXTAB );
if ( aIter.GetFirst() )
@@ -2956,7 +2956,7 @@ void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc,
ScChangeActionContent* ScChangeTrack::AppendContentOnTheFly(
const ScAddress& rPos, ScBaseCell* pOldCell, ScBaseCell* pNewCell,
- ULONG nOldFormat, ULONG nNewFormat )
+ sal_uLong nOldFormat, sal_uLong nNewFormat )
{
ScRange aRange( rPos );
ScChangeActionContent* pAct = new ScChangeActionContent( aRange );
@@ -3016,7 +3016,7 @@ ScChangeActionContent* ScChangeTrack::GenerateDelContent(
void ScChangeTrack::DeleteGeneratedDelContent( ScChangeActionContent* pContent )
{
- ULONG nAct = pContent->GetActionNumber();
+ sal_uLong nAct = pContent->GetActionNumber();
aGeneratedTable.Remove( nAct );
if ( pFirstGeneratedDelContent == pContent )
pFirstGeneratedDelContent = (ScChangeActionContent*) pContent->pNext;
@@ -3057,7 +3057,7 @@ void ScChangeTrack::AddDependentWithNotify( ScChangeAction* pParent,
pDependent->AddLink( pParent, pLink );
if ( aModifiedLink.IsSet() )
{
- ULONG nMod = pParent->GetActionNumber();
+ sal_uLong nMod = pParent->GetActionNumber();
NotifyModified( SC_CTM_PARENT, nMod, nMod );
}
}
@@ -3117,10 +3117,10 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
// also genau richtig
const ScBigRange& rRange = pAct->GetBigRange();
- BOOL bActNoInsert = !pAct->IsInsertType();
- BOOL bActColDel = ( eActType == SC_CAT_DELETE_COLS );
- BOOL bActRowDel = ( eActType == SC_CAT_DELETE_ROWS );
- BOOL bActTabDel = ( eActType == SC_CAT_DELETE_TABS );
+ sal_Bool bActNoInsert = !pAct->IsInsertType();
+ sal_Bool bActColDel = ( eActType == SC_CAT_DELETE_COLS );
+ sal_Bool bActRowDel = ( eActType == SC_CAT_DELETE_ROWS );
+ sal_Bool bActTabDel = ( eActType == SC_CAT_DELETE_TABS );
if ( pLinkInsertCol && (eActType == SC_CAT_INSERT_COLS ||
(bActNoInsert && !bActRowDel && !bActTabDel)) )
@@ -3214,7 +3214,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
void ScChangeTrack::Remove( ScChangeAction* pRemove )
{
// aus Track ausklinken
- ULONG nAct = pRemove->GetActionNumber();
+ sal_uLong nAct = pRemove->GetActionNumber();
aTable.Remove( nAct );
if ( nAct == nActionMax )
--nActionMax;
@@ -3243,7 +3243,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
ScChangeActionContent* pContent = (ScChangeActionContent*) pRemove;
if ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
- ULONG nMod = pContent->GetActionNumber();
+ sal_uLong nMod = pContent->GetActionNumber();
NotifyModified( SC_CTM_CHANGE, nMod, nMod );
}
}
@@ -3263,7 +3263,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
}
-void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
+void ScChangeTrack::Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge )
{
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
if ( bMerge )
@@ -3281,7 +3281,7 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
!IsInPasteCut() )
ResetLastCut();
StartBlockModify( SC_CTM_REMOVE, nStartAction );
- for ( ULONG j = nEndAction; j >= nStartAction; --j )
+ for ( sal_uLong j = nEndAction; j >= nStartAction; --j )
{ // rueckwaerts um evtl. nActionMax zu recyclen und schnelleren
// Zugriff via pLast, Deletes in richtiger Reihenfolge
ScChangeAction* pAct = ( (j == nActionMax && pLast &&
@@ -3293,13 +3293,13 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
if ( j == nEndAction || (pAct != pLast &&
((ScChangeActionDel*)pAct)->IsTopDelete()) )
{
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
SetInDeleteRange( ((ScChangeActionDel*)pAct)->
GetOverAllRange().MakeRange() );
}
}
- UpdateReference( pAct, TRUE );
- SetInDeleteTop( FALSE );
+ UpdateReference( pAct, sal_True );
+ SetInDeleteTop( sal_False );
Remove( pAct );
if ( IsInPasteCut() )
aPasteCutTable.Insert( pAct->GetActionNumber(), pAct );
@@ -3308,14 +3308,14 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
if ( j == nStartAction && pAct->GetType() == SC_CAT_MOVE )
{
ScChangeActionMove* pMove = (ScChangeActionMove*) pAct;
- ULONG nStart = pMove->GetStartLastCut();
- ULONG nEnd = pMove->GetEndLastCut();
+ sal_uLong nStart = pMove->GetStartLastCut();
+ sal_uLong nEnd = pMove->GetEndLastCut();
if ( nStart && nStart <= nEnd )
{ // LastCut wiederherstellen
//! Links vor Cut-Append aufloesen
pMove->RemoveAllLinks();
StartBlockModify( SC_CTM_APPEND, nStart );
- for ( ULONG nCut = nStart; nCut <= nEnd; nCut++ )
+ for ( sal_uLong nCut = nStart; nCut <= nEnd; nCut++ )
{
ScChangeAction* pCut = aPasteCutTable.Remove( nCut );
if ( pCut )
@@ -3356,22 +3356,22 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge )
// static
-BOOL ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, ULONG nFirstMerge )
+sal_Bool ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, sal_uLong nFirstMerge )
{
if ( rAction.IsRejected() )
- return TRUE; // da kommt noch eine passende Reject-Action
+ return sal_True; // da kommt noch eine passende Reject-Action
if ( rAction.IsRejecting() && rAction.GetRejectAction() >= nFirstMerge )
- return TRUE; // da ist sie
+ return sal_True; // da ist sie
- return FALSE; // alles andere
+ return sal_False; // alles andere
}
void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
{
SetMergeState( SC_CTMS_PREPARE );
- ULONG nFirstMerge = pFirstMerge->GetActionNumber();
+ sal_uLong nFirstMerge = pFirstMerge->GetActionNumber();
ScChangeAction* pAct = GetLast();
if ( pAct )
{
@@ -3385,13 +3385,13 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
{
if ( ((ScChangeActionDel*)pAct)->IsTopDelete() )
{
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
SetInDeleteRange( ((ScChangeActionDel*)pAct)->
GetOverAllRange().MakeRange() );
}
}
- UpdateReference( pAct, TRUE );
- SetInDeleteTop( FALSE );
+ UpdateReference( pAct, sal_True );
+ SetInDeleteTop( sal_False );
pAct->DeleteCellEntries(); // sonst GPF bei Track Clear()
}
pAct = ( pAct == pFirstMerge ? NULL : pAct->GetPrev() );
@@ -3401,7 +3401,7 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
}
-void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bShared )
+void ScChangeTrack::MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool bShared )
{
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
if ( bShared || !ScChangeTrack::MergeIgnore( *pAct, nFirstMerge ) )
@@ -3411,45 +3411,45 @@ void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bSha
{
if ( ((ScChangeActionDel*)pAct)->IsTopDelete() )
{
- SetInDeleteTop( TRUE );
+ SetInDeleteTop( sal_True );
SetInDeleteRange( ((ScChangeActionDel*)pAct)->
GetOverAllRange().MakeRange() );
}
}
- UpdateReference( pAct, FALSE );
- SetInDeleteTop( FALSE );
+ UpdateReference( pAct, sal_False );
+ SetInDeleteTop( sal_False );
SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther
}
}
-void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo )
+void ScChangeTrack::UpdateReference( ScChangeAction* pAct, sal_Bool bUndo )
{
ScChangeActionType eActType = pAct->GetType();
if ( eActType == SC_CAT_CONTENT || eActType == SC_CAT_REJECT )
return ;
//! Formelzellen haengen nicht im Dokument
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE );
- BOOL bOldNoListening = pDoc->GetNoListening();
- pDoc->SetNoListening( TRUE );
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( sal_False );
+ sal_Bool bOldNoListening = pDoc->GetNoListening();
+ pDoc->SetNoListening( sal_True );
//! Formelzellen ExpandRefs synchronisiert zu denen im Dokument
- BOOL bOldExpandRefs = pDoc->IsExpandRefs();
+ sal_Bool bOldExpandRefs = pDoc->IsExpandRefs();
if ( (!bUndo && pAct->IsInsertType()) || (bUndo && pAct->IsDeleteType()) )
pDoc->SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() );
if ( pAct->IsDeleteType() )
{
SetInDeleteUndo( bUndo );
- SetInDelete( TRUE );
+ SetInDelete( sal_True );
}
else if ( GetMergeState() == SC_CTMS_OWN )
{
// Referenzen von Formelzellen wiederherstellen,
// vorheriges MergePrepare war bei einem Insert wie ein Delete
if ( pAct->IsInsertType() )
- SetInDeleteUndo( TRUE );
+ SetInDeleteUndo( sal_True );
}
//! erst die generated, als waeren sie vorher getrackt worden
@@ -3458,8 +3458,8 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo )
bUndo );
UpdateReference( &pFirst, pAct, bUndo );
- SetInDelete( FALSE );
- SetInDeleteUndo( FALSE );
+ SetInDelete( sal_False );
+ SetInDeleteUndo( sal_False );
pDoc->SetExpandRefs( bOldExpandRefs );
pDoc->SetNoListening( bOldNoListening );
@@ -3468,18 +3468,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo )
void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
- ScChangeAction* pAct, BOOL bUndo )
+ ScChangeAction* pAct, sal_Bool bUndo )
{
ScChangeActionType eActType = pAct->GetType();
- BOOL bGeneratedDelContents =
+ sal_Bool bGeneratedDelContents =
( ppFirstAction == (ScChangeAction**)&pFirstGeneratedDelContent );
const ScBigRange& rOrgRange = pAct->GetBigRange();
ScBigRange aRange( rOrgRange );
ScBigRange aDelRange( rOrgRange );
- INT32 nDx, nDy, nDz;
+ sal_Int32 nDx, nDy, nDz;
nDx = nDy = nDz = 0;
UpdateRefMode eMode = URM_INSDEL;
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
switch ( eActType )
{
case SC_CAT_INSERT_COLS :
@@ -3498,19 +3498,19 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
aRange.aEnd.SetCol( nInt32Max );
nDx = -(rOrgRange.aEnd.Col() - rOrgRange.aStart.Col() + 1);
aDelRange.aEnd.SetCol( aDelRange.aStart.Col() - nDx - 1 );
- bDel = TRUE;
+ bDel = sal_True;
break;
case SC_CAT_DELETE_ROWS :
aRange.aEnd.SetRow( nInt32Max );
nDy = -(rOrgRange.aEnd.Row() - rOrgRange.aStart.Row() + 1);
aDelRange.aEnd.SetRow( aDelRange.aStart.Row() - nDy - 1 );
- bDel = TRUE;
+ bDel = sal_True;
break;
case SC_CAT_DELETE_TABS :
aRange.aEnd.SetTab( nInt32Max );
nDz = -(rOrgRange.aEnd.Tab() - rOrgRange.aStart.Tab() + 1);
aDelRange.aEnd.SetTab( aDelRange.aStart.Tab() - nDz - 1 );
- bDel = TRUE;
+ bDel = sal_True;
break;
case SC_CAT_MOVE :
eMode = URM_MOVE;
@@ -3552,7 +3552,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
{
if ( p == pAct )
continue; // for
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( GetMergeState() == SC_CTMS_OTHER &&
p->GetActionNumber() <= GetLastMerge() )
{ // Delete in mergendem Dokument, Action im zu mergenden
@@ -3562,7 +3562,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// das Insert nicht schneidet.
if ( !aDelRange.Intersects( p->GetBigRange() ) )
p->UpdateReference( this, eMode, aRange, nDx, nDy, nDz );
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
else if ( p->GetType() == SC_CAT_CONTENT &&
p->IsDeletedInDelType( eInsType ) )
@@ -3570,7 +3570,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// Nicht anpassen, wenn dieses Delete in dem
// Insert-"Delete" sein wuerde (ist nur verschoben).
if ( aDelRange.In( p->GetBigRange().aStart ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
else
{
const ScChangeActionLinkEntry* pLink = p->GetDeletedIn();
@@ -3579,7 +3579,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
const ScChangeAction* pDel = pLink->GetAction();
if ( pDel && pDel->GetType() == eInsType &&
pDel->GetBigRange().In( aDelRange ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pLink = pLink->GetNext();
}
}
@@ -3600,7 +3600,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( bGeneratedDelContents )
pActDel->AddContent( (ScChangeActionContent*) p );
}
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
else
{
@@ -3765,7 +3765,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
{
if ( p == pAct )
continue; // for
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( aDelRange.In( p->GetBigRange() ) )
{
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
@@ -3790,18 +3790,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// geloescht wird in DeleteCellEntries
}
}
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
else if ( eActType != SC_CAT_DELETE_TABS &&
p->IsDeletedInDelType( SC_CAT_DELETE_TABS ) )
{ // in geloeschten Tabellen nicht updaten,
// ausser wenn Tabelle verschoben wird
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
if ( p->GetType() == eActType && pActDel->IsDeletedIn( p ) )
{
pActDel->RemoveDeletedIn( p ); // "druntergerutscht"
- bUpdate = TRUE;
+ bUpdate = sal_True;
}
}
if ( bUpdate )
@@ -3817,7 +3817,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
else if ( eActType == SC_CAT_MOVE )
{
ScChangeActionMove* pActMove = (ScChangeActionMove*) pAct;
- BOOL bLastCutMove = ( pActMove == pLastCutMove );
+ sal_Bool bLastCutMove = ( pActMove == pLastCutMove );
const ScBigRange& rTo = pActMove->GetBigRange();
const ScBigRange& rFrom = pActMove->GetFromRange();
if ( !bUndo )
@@ -3867,7 +3867,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
}
else
{ // Undo Move
- BOOL bActRejected = pActMove->IsRejected();
+ sal_Bool bActRejected = pActMove->IsRejected();
for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() )
{
if ( p == pAct )
@@ -4026,13 +4026,13 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
void ScChangeTrack::GetDependents( ScChangeAction* pAct,
- ScChangeActionTable& rTable, BOOL bListMasterDelete, BOOL bAllFlat ) const
+ ScChangeActionTable& rTable, sal_Bool bListMasterDelete, sal_Bool bAllFlat ) const
{
//! bAllFlat==TRUE: intern aus Accept oder Reject gerufen,
//! => Generated werden nicht aufgenommen
- BOOL bIsDelete = pAct->IsDeleteType();
- BOOL bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() );
+ sal_Bool bIsDelete = pAct->IsDeleteType();
+ sal_Bool bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() );
const ScChangeAction* pCur = pAct;
ScChangeActionStack* pStack = new ScChangeActionStack;
@@ -4048,7 +4048,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bAllFlat )
{
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDependent() )
pStack->Push( p );
@@ -4095,7 +4095,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
if ( bAllFlat )
{
// nur ein TopContent einer Kette ist in LinkDeleted
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDeleted() ||
p->GetType() == SC_CAT_CONTENT )
@@ -4144,7 +4144,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bAllFlat )
{
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDependent() || p->HasDeleted() )
pStack->Push( p );
@@ -4188,7 +4188,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bAllFlat )
{
- ULONG n = p->GetActionNumber();
+ sal_uLong n = p->GetActionNumber();
if ( !IsGenerated( n ) && rTable.Insert( n, p ) )
if ( p->HasDependent() )
pStack->Push( p );
@@ -4214,10 +4214,10 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
}
-BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest )
+sal_Bool ScChangeTrack::SelectContent( ScChangeAction* pAct, sal_Bool bOldest )
{
if ( pAct->GetType() != SC_CAT_CONTENT )
- return FALSE;
+ return sal_False;
ScChangeActionContent* pContent = (ScChangeActionContent*) pAct;
if ( bOldest )
@@ -4230,7 +4230,7 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest )
}
if ( !pContent->IsClickable() )
- return FALSE;
+ return sal_False;
ScBigRange aBigRange( pContent->GetBigRange() );
const ScBaseCell* pCell = (bOldest ? pContent->GetOldCell() :
@@ -4245,16 +4245,16 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest )
}
if ( !aBigRange.IsValid( pDoc ) )
- return FALSE;
+ return sal_False;
ScRange aRange( aBigRange.MakeRange() );
if ( !pDoc->IsBlockEditable( aRange.aStart.Tab(), aRange.aStart.Col(),
aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ) )
- return FALSE;
+ return sal_False;
if ( pContent->HasDependent() )
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
Stack aRejectActions;
const ScChangeActionLinkEntry* pL = pContent->GetFirstDependentEntry();
while ( pL )
@@ -4302,28 +4302,28 @@ void ScChangeTrack::AcceptAll()
}
-BOOL ScChangeTrack::Accept( ScChangeAction* pAct )
+sal_Bool ScChangeTrack::Accept( ScChangeAction* pAct )
{
if ( !pAct->IsClickable() )
- return FALSE;
+ return sal_False;
if ( pAct->IsDeleteType() || pAct->GetType() == SC_CAT_CONTENT )
{
ScChangeActionTable aActionTable;
- GetDependents( pAct, aActionTable, FALSE, TRUE );
+ GetDependents( pAct, aActionTable, sal_False, sal_True );
for ( ScChangeAction* p = aActionTable.First(); p; p = aActionTable.Next() )
{
p->Accept();
}
}
pAct->Accept();
- return TRUE;
+ return sal_True;
}
-BOOL ScChangeTrack::RejectAll()
+sal_Bool ScChangeTrack::RejectAll()
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for ( ScChangeAction* p = GetLast(); p && bOk; p = p->GetPrev() )
{ //! rueckwaerts, weil abhaengige hinten und RejectActions angehaengt
if ( p->IsInternalRejectable() )
@@ -4333,7 +4333,7 @@ BOOL ScChangeTrack::RejectAll()
}
-BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared )
+sal_Bool ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared )
{
// #i100895# When collaboration changes are reversed, it must be possible
// to reject a deleted row above another deleted row.
@@ -4341,29 +4341,29 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared )
pAct->RemoveAllDeletedIn();
if ( !pAct->IsRejectable() )
- return FALSE;
+ return sal_False;
ScChangeActionTable* pTable = NULL;
if ( pAct->HasDependent() )
{
pTable = new ScChangeActionTable;
- GetDependents( pAct, *pTable, FALSE, TRUE );
+ GetDependents( pAct, *pTable, sal_False, sal_True );
}
- BOOL bRejected = Reject( pAct, pTable, FALSE );
+ sal_Bool bRejected = Reject( pAct, pTable, sal_False );
if ( pTable )
delete pTable;
return bRejected;
}
-BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
- BOOL bRecursion )
+sal_Bool ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
+ sal_Bool bRecursion )
{
if ( !pAct->IsInternalRejectable() )
- return FALSE;
+ return sal_False;
- BOOL bOk = TRUE;
- BOOL bRejected = FALSE;
+ sal_Bool bOk = sal_True;
+ sal_Bool bRejected = sal_False;
if ( pAct->IsInsertType() )
{
if ( pAct->HasDependent() && !bRecursion )
@@ -4377,10 +4377,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
else if ( p->IsDeleteType() )
p->Accept(); // geloeschtes ins Nirvana
else
- bOk = Reject( p, NULL, TRUE ); //! rekursiv
+ bOk = Reject( p, NULL, sal_True ); //! rekursiv
}
}
- if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE )
+ if ( bOk && (bRejected = pAct->Reject( pDoc )) != sal_False )
{
// pRefDoc NULL := geloeschte Zellen nicht speichern
AppendDeleteRange( pAct->GetBigRange().MakeRange(), NULL, (short) 0,
@@ -4391,11 +4391,11 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
{
DBG_ASSERT( !pTable, "ScChangeTrack::Reject: Delete mit Table" );
ScBigRange aDelRange;
- ULONG nRejectAction = pAct->GetActionNumber();
- BOOL bTabDel, bTabDelOk;
+ sal_uLong nRejectAction = pAct->GetActionNumber();
+ sal_Bool bTabDel, bTabDelOk;
if ( pAct->GetType() == SC_CAT_DELETE_TABS )
{
- bTabDel = TRUE;
+ bTabDel = sal_True;
aDelRange = pAct->GetBigRange();
bOk = bTabDelOk = pAct->Reject( pDoc );
if ( bOk )
@@ -4405,14 +4405,14 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
}
else
- bTabDel = bTabDelOk = FALSE;
+ bTabDel = bTabDelOk = sal_False;
ScChangeActionDel* pDel = (ScChangeActionDel*) pAct;
if ( bOk )
{
aDelRange = pDel->GetOverAllRange();
bOk = aDelRange.IsValid( pDoc );
}
- BOOL bOneOk = FALSE;
+ sal_Bool bOneOk = sal_False;
if ( bOk )
{
ScChangeActionType eActType = pAct->GetType();
@@ -4433,7 +4433,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
}
ScChangeAction* p = pAct;
- BOOL bLoop = TRUE;
+ sal_Bool bLoop = sal_True;
do
{
pDel = (ScChangeActionDel*) p;
@@ -4460,10 +4460,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
}
else
- bOneOk = TRUE;
+ bOneOk = sal_True;
}
if ( pDel->IsBaseDelete() )
- bLoop = FALSE;
+ bLoop = sal_False;
else
p = p->GetPrev();
} while ( bOk && bLoop && p && p->GetType() == eActType &&
@@ -4487,10 +4487,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
DBG_ASSERT( pTable, "ScChangeTrack::Reject: Move ohne Table" );
for ( ScChangeAction* p = pTable->Last(); p && bOk; p = pTable->Prev() )
{
- bOk = Reject( p, NULL, TRUE ); //! rekursiv
+ bOk = Reject( p, NULL, sal_True ); //! rekursiv
}
}
- if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE )
+ if ( bOk && (bRejected = pAct->Reject( pDoc )) != sal_False )
{
ScChangeActionMove* pReject = new ScChangeActionMove(
pAct->GetBigRange().MakeRange(),
@@ -4512,7 +4512,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
pReject = new ScChangeActionContent( aRange );
pReject->SetOldValue( pDoc->GetCell( aRange.aStart ), pDoc, pDoc );
}
- if ( (bRejected = pAct->Reject( pDoc )) != FALSE && !bRecursion )
+ if ( (bRejected = pAct->Reject( pDoc )) != sal_False && !bRecursion )
{
pReject->SetNewValue( pDoc->GetCell( aRange.aStart ), pDoc );
pReject->SetRejectAction( pAct->GetActionNumber() );
@@ -4531,7 +4531,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable,
}
-ULONG ScChangeTrack::AddLoadedGenerated(ScBaseCell* pNewCell, const ScBigRange& aBigRange, const String& sNewValue )
+sal_uLong ScChangeTrack::AddLoadedGenerated(ScBaseCell* pNewCell, const ScBigRange& aBigRange, const String& sNewValue )
{
ScChangeActionContent* pAct = new ScChangeActionContent( --nGeneratedMin, pNewCell, aBigRange, pDoc, sNewValue );
if ( pAct )
@@ -4733,7 +4733,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
{
if ( pAction->HasDeleted() )
{
- ::std::stack< ULONG > aStack;
+ ::std::stack< sal_uLong > aStack;
const ScChangeActionLinkEntry* pL = pAction->GetFirstDeletedEntry();
while ( pL )
{
@@ -4767,7 +4767,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
{
if ( pAction->HasDependent() )
{
- ::std::stack< ULONG > aStack;
+ ::std::stack< sal_uLong > aStack;
const ScChangeActionLinkEntry* pL = pAction->GetFirstDependentEntry();
while ( pL )
{
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index ac587db2bd12..a1fad7dcfeb1 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -90,16 +90,16 @@ ScChangeViewSettings& ScChangeViewSettings::operator=( const ScChangeViewSetting
return *this;
}
-BOOL ScChangeViewSettings::IsValidComment(const String* pCommentStr) const
+sal_Bool ScChangeViewSettings::IsValidComment(const String* pCommentStr) const
{
- BOOL nTheFlag=TRUE;
+ sal_Bool nTheFlag=sal_True;
if(pCommentSearcher!=NULL)
{
xub_StrLen nStartPos = 0;
xub_StrLen nEndPos = pCommentStr->Len();
- nTheFlag=sal::static_int_cast<BOOL>(pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos));
+ nTheFlag=sal::static_int_cast<sal_Bool>(pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos));
}
return nTheFlag;
}
@@ -116,7 +116,7 @@ void ScChangeViewSettings::SetTheComment(const String& rString)
if(rString.Len()>0)
{
utl::SearchParam aSearchParam( rString,
- utl::SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE );
+ utl::SearchParam::SRCH_REGEXP,sal_False,sal_False,sal_False );
pCommentSearcher = new utl::TextSearch( aSearchParam, *ScGlobal::pCharClass );
}
diff --git a/sc/source/core/tool/collect.cxx b/sc/source/core/tool/collect.cxx
index c7aa72343fbb..ec91244aaa34 100644
--- a/sc/source/core/tool/collect.cxx
+++ b/sc/source/core/tool/collect.cxx
@@ -48,17 +48,17 @@ ScDataObject::~ScDataObject()
// Collection
//------------------------------------------------------------------------
-void lcl_DeleteScDataObjects( ScDataObject** p, USHORT nCount )
+void lcl_DeleteScDataObjects( ScDataObject** p, sal_uInt16 nCount )
{
if ( p )
{
- for (USHORT i = 0; i < nCount; i++) delete p[i];
+ for (sal_uInt16 i = 0; i < nCount; i++) delete p[i];
delete[] p;
p = NULL;
}
}
-ScCollection::ScCollection(USHORT nLim, USHORT nDel) :
+ScCollection::ScCollection(sal_uInt16 nLim, sal_uInt16 nDel) :
nCount ( 0 ),
nLimit ( nLim ),
nDelta ( nDel ),
@@ -93,8 +93,8 @@ ScCollection::~ScCollection()
}
//------------------------------------------------------------------------
-USHORT ScCollection::GetCount() const { return nCount; }
-void ScCollection::AtFree(USHORT nIndex)
+sal_uInt16 ScCollection::GetCount() const { return nCount; }
+void ScCollection::AtFree(sal_uInt16 nIndex)
{
if ((pItems) && (nIndex < nCount))
{
@@ -123,7 +123,7 @@ void ScCollection::FreeAll()
//------------------------------------------------------------------------
-BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
+sal_Bool ScCollection::AtInsert(sal_uInt16 nIndex, ScDataObject* pScDataObject)
{
if ((nCount < MAXCOLLECTIONSIZE) && (nIndex <= nCount) && pItems)
{
@@ -131,8 +131,8 @@ BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
{
ScDataObject** pNewItems = new ScDataObject*[nLimit + nDelta];
if (!pNewItems)
- return FALSE;
- nLimit = sal::static_int_cast<USHORT>( nLimit + nDelta );
+ return sal_False;
+ nLimit = sal::static_int_cast<sal_uInt16>( nLimit + nDelta );
memmove(pNewItems, pItems, nCount * sizeof(ScDataObject*));
delete[] pItems;
pItems = pNewItems;
@@ -141,21 +141,21 @@ BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
memmove(&pItems[nIndex + 1], &pItems[nIndex], (nCount - nIndex) * sizeof(ScDataObject*));
pItems[nIndex] = pScDataObject;
nCount++;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
-BOOL ScCollection::Insert(ScDataObject* pScDataObject)
+sal_Bool ScCollection::Insert(ScDataObject* pScDataObject)
{
return AtInsert(nCount, pScDataObject);
}
//------------------------------------------------------------------------
-ScDataObject* ScCollection::At(USHORT nIndex) const
+ScDataObject* ScCollection::At(sal_uInt16 nIndex) const
{
if (nIndex < nCount)
return pItems[nIndex];
@@ -165,10 +165,10 @@ ScDataObject* ScCollection::At(USHORT nIndex) const
//------------------------------------------------------------------------
-USHORT ScCollection::IndexOf(ScDataObject* pScDataObject) const
+sal_uInt16 ScCollection::IndexOf(ScDataObject* pScDataObject) const
{
- USHORT nIndex = 0xffff;
- for (USHORT i = 0; ((i < nCount) && (nIndex == 0xffff)); i++)
+ sal_uInt16 nIndex = 0xffff;
+ for (sal_uInt16 i = 0; ((i < nCount) && (nIndex == 0xffff)); i++)
{
if (pItems[i] == pScDataObject) nIndex = i;
}
@@ -185,7 +185,7 @@ ScCollection& ScCollection::operator=( const ScCollection& r )
nLimit = r.nLimit;
nDelta = r.nDelta;
pItems = new ScDataObject*[nLimit];
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
pItems[i] = r.pItems[i]->Clone();
return *this;
@@ -202,7 +202,7 @@ ScDataObject* ScCollection::Clone() const
// ScSortedCollection
//------------------------------------------------------------------------
-ScSortedCollection::ScSortedCollection(USHORT nLim, USHORT nDel, BOOL bDup) :
+ScSortedCollection::ScSortedCollection(sal_uInt16 nLim, sal_uInt16 nDel, sal_Bool bDup) :
ScCollection (nLim, nDel),
bDuplicates ( bDup)
{
@@ -210,9 +210,9 @@ ScSortedCollection::ScSortedCollection(USHORT nLim, USHORT nDel, BOOL bDup) :
//------------------------------------------------------------------------
-USHORT ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
+sal_uInt16 ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (Search(pScDataObject, nIndex))
return nIndex;
else
@@ -221,10 +221,10 @@ USHORT ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
//------------------------------------------------------------------------
-BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) const
+sal_Bool ScSortedCollection::Search(ScDataObject* pScDataObject, sal_uInt16& rIndex) const
{
rIndex = nCount;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
short nLo = 0;
short nHi = nCount - 1;
short nIndex;
@@ -240,7 +240,7 @@ BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) con
nHi = nIndex - 1;
if (nCompare == 0)
{
- bFound = TRUE;
+ bFound = sal_True;
nLo = nIndex;
}
}
@@ -251,16 +251,16 @@ BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) con
//------------------------------------------------------------------------
-BOOL ScSortedCollection::Insert(ScDataObject* pScDataObject)
+sal_Bool ScSortedCollection::Insert(ScDataObject* pScDataObject)
{
- USHORT nIndex;
- BOOL bFound = Search(pScDataObject, nIndex);
+ sal_uInt16 nIndex;
+ sal_Bool bFound = Search(pScDataObject, nIndex);
if (bFound)
{
if (bDuplicates)
return AtInsert(nIndex, pScDataObject);
else
- return FALSE;
+ return sal_False;
}
else
return AtInsert(nIndex, pScDataObject);
@@ -268,15 +268,15 @@ BOOL ScSortedCollection::Insert(ScDataObject* pScDataObject)
//------------------------------------------------------------------------
-BOOL ScSortedCollection::InsertPos(ScDataObject* pScDataObject, USHORT& nIndex)
+sal_Bool ScSortedCollection::InsertPos(ScDataObject* pScDataObject, sal_uInt16& nIndex)
{
- BOOL bFound = Search(pScDataObject, nIndex);
+ sal_Bool bFound = Search(pScDataObject, nIndex);
if (bFound)
{
if (bDuplicates)
return AtInsert(nIndex, pScDataObject);
else
- return FALSE;
+ return sal_False;
}
else
return AtInsert(nIndex, pScDataObject);
@@ -284,21 +284,21 @@ BOOL ScSortedCollection::InsertPos(ScDataObject* pScDataObject, USHORT& nIndex)
//------------------------------------------------------------------------
-BOOL ScSortedCollection::operator==(const ScSortedCollection& rCmp) const
+sal_Bool ScSortedCollection::operator==(const ScSortedCollection& rCmp) const
{
if ( nCount != rCmp.nCount )
- return FALSE;
- for (USHORT i=0; i<nCount; i++)
+ return sal_False;
+ for (sal_uInt16 i=0; i<nCount; i++)
if ( !IsEqual(pItems[i],rCmp.pItems[i]) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
//------------------------------------------------------------------------
// IsEqual - komplette Inhalte vergleichen
-BOOL ScSortedCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
+sal_Bool ScSortedCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return ( Compare(pKey1, pKey2) == 0 ); // Default: nur Index vergleichen
}
@@ -335,7 +335,7 @@ ScDataObject* ScStrCollection::Clone() const
//------------------------------------------------------------------------
//UNUSED2008-05 TypedStrData::TypedStrData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
-//UNUSED2008-05 BOOL bAllStrings )
+//UNUSED2008-05 sal_Bool bAllStrings )
//UNUSED2008-05 {
//UNUSED2008-05 if ( pDoc->HasValueData( nCol, nRow, nTab ) )
//UNUSED2008-05 {
@@ -358,10 +358,10 @@ ScDataObject* TypedStrData::Clone() const
return new TypedStrData(*this);
}
-TypedScStrCollection::TypedScStrCollection( USHORT nLim , USHORT nDel , BOOL bDup )
+TypedScStrCollection::TypedScStrCollection( sal_uInt16 nLim , sal_uInt16 nDel , sal_Bool bDup )
: ScSortedCollection( nLim, nDel, bDup )
{
- bCaseSensitive = FALSE;
+ bCaseSensitive = sal_False;
}
TypedScStrCollection::~TypedScStrCollection()
@@ -371,12 +371,12 @@ ScDataObject* TypedScStrCollection::Clone() const
return new TypedScStrCollection(*this);
}
-TypedStrData* TypedScStrCollection::operator[]( const USHORT nIndex) const
+TypedStrData* TypedScStrCollection::operator[]( const sal_uInt16 nIndex) const
{
return (TypedStrData*)At(nIndex);
}
-void TypedScStrCollection::SetCaseSensitive( BOOL bSet )
+void TypedScStrCollection::SetCaseSensitive( sal_Bool bSet )
{
bCaseSensitive = bSet;
}
@@ -423,13 +423,13 @@ short TypedScStrCollection::Compare( ScDataObject* pKey1, ScDataObject* pKey2 )
return nResult;
}
-BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
- USHORT& rPos, BOOL bBack ) const
+sal_Bool TypedScStrCollection::FindText( const String& rStart, String& rResult,
+ sal_uInt16& rPos, sal_Bool bBack ) const
{
// Die Collection ist nach String-Vergleichen sortiert, darum muss hier
// alles durchsucht werden
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
String aOldResult;
if ( rPos != SCPOS_INVALID && rPos < nCount )
@@ -441,11 +441,11 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
if ( bBack ) // rueckwaerts
{
- USHORT nStartPos = nCount;
+ sal_uInt16 nStartPos = nCount;
if ( rPos != SCPOS_INVALID )
nStartPos = rPos; // weitersuchen...
- for ( USHORT i=nStartPos; i>0; )
+ for ( sal_uInt16 i=nStartPos; i>0; )
{
--i;
TypedStrData* pData = (TypedStrData*) pItems[i];
@@ -461,7 +461,7 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
{
rResult = pData->aStrValue;
rPos = i;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -470,11 +470,11 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
}
else // vorwaerts
{
- USHORT nStartPos = 0;
+ sal_uInt16 nStartPos = 0;
if ( rPos != SCPOS_INVALID )
nStartPos = rPos + 1; // weitersuchen...
- for ( USHORT i=nStartPos; i<nCount; i++ )
+ for ( sal_uInt16 i=nStartPos; i<nCount; i++ )
{
TypedStrData* pData = (TypedStrData*) pItems[i];
if (pData->nStrType)
@@ -489,7 +489,7 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
{
rResult = pData->aStrValue;
rPos = i;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -502,20 +502,20 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
// Gross-/Kleinschreibung anpassen
-BOOL TypedScStrCollection::GetExactMatch( String& rString ) const
+sal_Bool TypedScStrCollection::GetExactMatch( String& rString ) const
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
TypedStrData* pData = (TypedStrData*) pItems[i];
if ( pData->nStrType && ScGlobal::GetpTransliteration()->isEqual(
pData->aStrValue, rString ) )
{
rString = pData->aStrValue; // String anpassen
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 1015e94180f3..3dd25801532f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -244,16 +244,16 @@ void dbg_call_generateMappingDiff()
FormulaLanguage::ODFF);
ScCompiler::OpCodeMapPtr xENUS = ScCompiler::GetOpCodeMap(
FormulaLanguage::ENGLISH);
- USHORT nPODF = xPODF->getSymbolCount();
- USHORT nODFF = xODFF->getSymbolCount();
- USHORT nENUS = xENUS->getSymbolCount();
+ sal_uInt16 nPODF = xPODF->getSymbolCount();
+ sal_uInt16 nODFF = xODFF->getSymbolCount();
+ sal_uInt16 nENUS = xENUS->getSymbolCount();
printf( "%s\n", "This is a semicolon separated file, you may import it as such to Calc.");
printf( "%s\n", "Spreadsheet functions name differences between PODF (ODF < 1.2) and ODFF (ODF >= 1.2), plus English UI names.");
printf( "\nInternal OpCodes; PODF: %d; ODFF: %d; ENUS: %d\n",
(int)nPODF, (int)nODFF, (int)nENUS);
- USHORT nMax = ::std::max( ::std::max( nPODF, nODFF), nENUS);
+ sal_uInt16 nMax = ::std::max( ::std::max( nPODF, nODFF), nENUS);
#define out(rStr) (ByteString( rStr, RTL_TEXTENCODING_UTF8).GetBuffer())
- for (USHORT i=0; i < nMax; ++i)
+ for (sal_uInt16 i=0; i < nMax; ++i)
{
const String& rPODF = xPODF->getSymbol(static_cast<OpCode>(i));
const String& rODFF = xODFF->getSymbol(static_cast<OpCode>(i));
@@ -308,14 +308,14 @@ bool ScCompiler::IsEnglishSymbol( const String& rName )
return true;
}
// 2. old add in functions
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) )
{
return true;
}
// 3. new (uno) add in functions
- String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE ));
+ String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, sal_False ));
if (aIntName.Len())
{
return true;
@@ -413,9 +413,9 @@ void ScCompiler::SetGrammarAndRefConvention(
SetRefConvention( eConv );
}
-String ScCompiler::FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const
+String ScCompiler::FindAddInFunction( const String& rUpperName, sal_Bool bLocalFirst ) const
{
- return ScGlobal::GetAddInCollection()->FindFunction(rUpperName, bLocalFirst); // bLocalFirst=FALSE for english
+ return ScGlobal::GetAddInCollection()->FindFunction(rUpperName, bLocalFirst); // bLocalFirst=sal_False for english
}
@@ -441,7 +441,7 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv )
meConv( eConv )
{
int i;
- ULONG *t= new ULONG [128];
+ sal_uLong *t= new sal_uLong [128];
ScCompiler::pConventions[ meConv ] = this;
mpCharTable = t;
@@ -613,7 +613,7 @@ static bool lcl_parseExternalName(
// indexed external document names.
ScRange aRange;
String aStartTabName, aEndTabName;
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
p = aRange.Parse_XL_Header( p, pDoc, aTmpFile, aStartTabName,
aEndTabName, nFlags, true, pExternalLinks );
if (!p || p == pStart)
@@ -968,7 +968,7 @@ struct ConventionOOO_A1 : public Convention_A1
void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, false);
}
@@ -1155,7 +1155,7 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, true);
}
@@ -1412,7 +1412,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
void MakeRefStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
ScComplexRefData aRef( rRef );
@@ -1614,7 +1614,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
void MakeRefStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
const ScComplexRefData& rRef,
- BOOL bSingleRef ) const
+ sal_Bool bSingleRef ) const
{
ScComplexRefData aRef( rRef );
@@ -1896,7 +1896,7 @@ void ScCompiler::SetRefConvention( const ScCompiler::Convention *pConvP )
"ScCompiler::SetRefConvention: unsupported grammar resulting");
}
-void ScCompiler::SetError(USHORT nError)
+void ScCompiler::SetError(sal_uInt16 nError)
{
if( !pArr->GetCodeError() )
pArr->SetCodeError( nError);
@@ -1982,7 +1982,7 @@ xub_StrLen ScCompiler::NextSymbol(bool bInArray)
while ((c != 0) && (eState != ssStop) )
{
pSrc++;
- ULONG nMask = GetCharTableFlags( c );
+ sal_uLong nMask = GetCharTableFlags( c );
// The parameter separator and the array column and row separators end
// things unconditionally if not in string or reference.
if (c == cSep || (bInArray && (c == cArrayColSep || c == cArrayRowSep)))
@@ -2417,7 +2417,7 @@ Label_MaskStateMachine:
nSrcPos = sal::static_int_cast<xub_StrLen>( nSrcPos + nSpaces );
String aSymbol;
mnRangeOpPosInSymbol = -1;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
do
{
bi18n = false;
@@ -2486,10 +2486,10 @@ Label_MaskStateMachine:
// Convert symbol to token
//---------------------------------------------------------------------------
-BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
+sal_Bool ScCompiler::IsOpCode( const String& rName, bool bInArray )
{
OpCodeHashMap::const_iterator iLook( mxSymbols->getHashMap()->find( rName));
- BOOL bFound = (iLook != mxSymbols->getHashMap()->end());
+ sal_Bool bFound = (iLook != mxSymbols->getHashMap()->end());
if (bFound)
{
ScRawToken aToken;
@@ -2532,7 +2532,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
ScRawToken aToken;
aToken.SetOpCode( aOdffAliases[i].eOp);
pRawToken = aToken.Clone();
- bFound = TRUE;
+ bFound = sal_True;
break; // for
}
}
@@ -2556,13 +2556,13 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
// last resort by just falling through to FindFunction(), but
// it shouldn't happen if the map was setup correctly. Don't
// waste time and bail out.
- return FALSE;
+ return sal_False;
}
}
if (!aIntName.Len())
{
// Old (deprecated) addins first for legacy.
- USHORT nIndex;
+ sal_uInt16 nIndex;
bFound = ScGlobal::GetFuncCollection()->SearchFunc( cSymbol, nIndex);
if (bFound)
{
@@ -2571,7 +2571,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
pRawToken = aToken.Clone();
}
else
- // bLocalFirst=FALSE for (English) upper full original name
+ // bLocalFirst=sal_False for (English) upper full original name
// (service.function)
aIntName = ScGlobal::GetAddInCollection()->FindFunction(
rName, !mxSymbols->isEnglish());
@@ -2581,7 +2581,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
ScRawToken aToken;
aToken.SetExternal( aIntName.GetBuffer() ); // international name
pRawToken = aToken.Clone();
- bFound = TRUE;
+ bFound = sal_True;
}
}
OpCode eOp;
@@ -2601,10 +2601,10 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
return bFound;
}
-BOOL ScCompiler::IsOpCode2( const String& rName )
+sal_Bool ScCompiler::IsOpCode2( const String& rName )
{
- BOOL bFound = FALSE;
- USHORT i;
+ sal_Bool bFound = sal_False;
+ sal_uInt16 i;
for( i = ocInternalBegin; i <= ocInternalEnd && !bFound; i++ )
bFound = rName.EqualsAscii( pInternal[ i-ocInternalBegin ] );
@@ -2618,16 +2618,16 @@ BOOL ScCompiler::IsOpCode2( const String& rName )
return bFound;
}
-BOOL ScCompiler::IsValue( const String& rSym )
+sal_Bool ScCompiler::IsValue( const String& rSym )
{
double fVal;
sal_uInt32 nIndex = ( mxSymbols->isEnglish() ?
pDoc->GetFormatTable()->GetStandardIndex( LANGUAGE_ENGLISH_US ) : 0 );
-// ULONG nIndex = 0;
-//// ULONG nIndex = pDoc->GetFormatTable()->GetStandardIndex(ScGlobal::eLnge);
+// sal_uLong nIndex = 0;
+//// sal_uLong nIndex = pDoc->GetFormatTable()->GetStandardIndex(ScGlobal::eLnge);
if (pDoc->GetFormatTable()->IsNumberFormat( rSym, nIndex, fVal ) )
{
- USHORT nType = pDoc->GetFormatTable()->GetType(nIndex);
+ sal_uInt16 nType = pDoc->GetFormatTable()->GetType(nIndex);
// Don't accept 3:3 as time, it is a reference to entire row 3 instead.
// Dates should never be entered directly and automatically converted
@@ -2635,7 +2635,7 @@ BOOL ScCompiler::IsValue( const String& rSym )
// Usually it wouldn't be accepted anyway because the date separator
// clashed with other separators or operators.
if (nType & (NUMBERFORMAT_TIME | NUMBERFORMAT_DATE))
- return FALSE;
+ return sal_False;
if (nType == NUMBERFORMAT_LOGICAL)
{
@@ -2643,12 +2643,12 @@ BOOL ScCompiler::IsValue( const String& rSym )
while( *p == ' ' )
p++;
if (*p == '(')
- return FALSE; // Boolean function instead.
+ return sal_False; // Boolean function instead.
}
if( aFormula.GetChar(nSrcPos) == '.' )
// numerical sheet name?
- return FALSE;
+ return sal_False;
if( nType == NUMBERFORMAT_TEXT )
// HACK: number too big!
@@ -2656,23 +2656,23 @@ BOOL ScCompiler::IsValue( const String& rSym )
ScRawToken aToken;
aToken.SetDouble( fVal );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL ScCompiler::IsString()
+sal_Bool ScCompiler::IsString()
{
register const sal_Unicode* p = cSymbol;
while ( *p )
p++;
xub_StrLen nLen = sal::static_int_cast<xub_StrLen>( p - cSymbol - 1 );
- BOOL bQuote = ((cSymbol[0] == '"') && (cSymbol[nLen] == '"'));
+ sal_Bool bQuote = ((cSymbol[0] == '"') && (cSymbol[nLen] == '"'));
if ((bQuote ? nLen-2 : nLen) > MAXSTRLEN-1)
{
SetError(errStringOverflow);
- return FALSE;
+ return sal_False;
}
if ( bQuote )
{
@@ -2680,13 +2680,13 @@ BOOL ScCompiler::IsString()
ScRawToken aToken;
aToken.SetString( cSymbol+1 );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScCompiler::IsPredetectedReference( const String& rName )
+sal_Bool ScCompiler::IsPredetectedReference( const String& rName )
{
// Speedup documents with lots of broken references, e.g. sheet deleted.
xub_StrLen nPos = rName.SearchAscii( "#REF!");
@@ -2738,12 +2738,12 @@ BOOL ScCompiler::IsPredetectedReference( const String& rName )
}
-BOOL ScCompiler::IsDoubleReference( const String& rName )
+sal_Bool ScCompiler::IsDoubleReference( const String& rName )
{
ScRange aRange( aPos, aPos );
const ScAddress::Details aDetails( pConv->meConv, aPos );
ScAddress::ExternalInfo aExtInfo;
- USHORT nFlags = aRange.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
+ sal_uInt16 nFlags = aRange.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
if( nFlags & SCA_VALID )
{
ScRawToken aToken;
@@ -2753,13 +2753,13 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
aRef.Ref1.SetRowRel( (nFlags & SCA_ROW_ABSOLUTE) == 0 );
aRef.Ref1.SetTabRel( (nFlags & SCA_TAB_ABSOLUTE) == 0 );
if ( !(nFlags & SCA_VALID_TAB) )
- aRef.Ref1.SetTabDeleted( TRUE ); // #REF!
+ aRef.Ref1.SetTabDeleted( sal_True ); // #REF!
aRef.Ref1.SetFlag3D( ( nFlags & SCA_TAB_3D ) != 0 );
aRef.Ref2.SetColRel( (nFlags & SCA_COL2_ABSOLUTE) == 0 );
aRef.Ref2.SetRowRel( (nFlags & SCA_ROW2_ABSOLUTE) == 0 );
aRef.Ref2.SetTabRel( (nFlags & SCA_TAB2_ABSOLUTE) == 0 );
if ( !(nFlags & SCA_VALID_TAB2) )
- aRef.Ref2.SetTabDeleted( TRUE ); // #REF!
+ aRef.Ref2.SetTabDeleted( sal_True ); // #REF!
aRef.Ref2.SetFlag3D( ( nFlags & SCA_TAB2_3D ) != 0 );
aRef.CalcRelFromAbs( aPos );
if (aExtInfo.mbExternal)
@@ -2780,12 +2780,12 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
}
-BOOL ScCompiler::IsSingleReference( const String& rName )
+sal_Bool ScCompiler::IsSingleReference( const String& rName )
{
ScAddress aAddr( aPos );
const ScAddress::Details aDetails( pConv->meConv, aPos );
ScAddress::ExternalInfo aExtInfo;
- USHORT nFlags = aAddr.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
+ sal_uInt16 nFlags = aAddr.Parse( rName, pDoc, aDetails, &aExtInfo, &maExternalLinks );
// Something must be valid in order to recognize Sheet1.blah or blah.a1
// as a (wrong) reference.
if( nFlags & ( SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB ) )
@@ -2826,14 +2826,14 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
}
-BOOL ScCompiler::IsReference( const String& rName )
+sal_Bool ScCompiler::IsReference( const String& rName )
{
// Has to be called before IsValue
sal_Unicode ch1 = rName.GetChar(0);
sal_Unicode cDecSep = ( mxSymbols->isEnglish() ? '.' :
ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0) );
if ( ch1 == cDecSep )
- return FALSE;
+ return sal_False;
// Who was that imbecile introducing '.' as the sheet name separator!?!
if ( CharClass::isAsciiNumeric( ch1 ) )
{
@@ -2848,12 +2848,12 @@ BOOL ScCompiler::IsReference( const String& rName )
{
if (ScGlobal::FindUnquoted( rName, ':') != STRING_NOTFOUND)
break; // may be 3:3, continue as usual
- return FALSE;
+ return sal_False;
}
sal_Unicode const * const pTabSep = rName.GetBuffer() + nPos;
sal_Unicode ch2 = pTabSep[1]; // maybe a column identifier
if ( !(ch2 == '$' || CharClass::isAsciiAlpha( ch2 )) )
- return FALSE;
+ return sal_False;
if ( cDecSep == '.' && (ch2 == 'E' || ch2 == 'e') // E + - digit
&& (GetCharTableFlags( pTabSep[2] ) & SC_COMPILER_C_VALUE_EXP) )
{ // #91053#
@@ -2870,7 +2870,7 @@ BOOL ScCompiler::IsReference( const String& rName )
String aTabName( rName.Copy( 0, nPos ) );
SCTAB nTab;
if ( !pDoc->GetTable( aTabName, nTab ) )
- return FALSE;
+ return sal_False;
// If sheet "1" exists and the expression is 1.E+2 continue as
// usual, the ScRange/ScAddress parser will take care of it.
}
@@ -2918,7 +2918,7 @@ BOOL ScCompiler::IsReference( const String& rName )
return false;
}
-BOOL ScCompiler::IsMacro( const String& rName )
+sal_Bool ScCompiler::IsMacro( const String& rName )
{
String aName( rName);
StarBASIC* pObj = 0;
@@ -2941,27 +2941,27 @@ BOOL ScCompiler::IsMacro( const String& rName )
SbxMethod* pMeth = (SbxMethod*) pObj->Find( aName, SbxCLASS_METHOD );
if( !pMeth )
{
- return FALSE;
+ return sal_False;
}
// It really should be a BASIC function!
if( pMeth->GetType() == SbxVOID
|| ( pMeth->IsFixed() && pMeth->GetType() == SbxEMPTY )
|| !pMeth->ISA(SbMethod) )
{
- return FALSE;
+ return sal_False;
}
ScRawToken aToken;
aToken.SetExternal( aName.GetBuffer() );
aToken.eOp = ocMacro;
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
-BOOL ScCompiler::IsNamedRange( const String& rUpperName )
+sal_Bool ScCompiler::IsNamedRange( const String& rUpperName )
{
// IsNamedRange is called only from NextNewToken, with an upper-case string
- USHORT n;
+ sal_uInt16 n;
ScRangeName* pRangeName = pDoc->GetRangeName();
if (pRangeName->SearchNameUpper( rUpperName, n ) )
{
@@ -2969,10 +2969,10 @@ BOOL ScCompiler::IsNamedRange( const String& rUpperName )
ScRawToken aToken;
aToken.SetName( pData->GetIndex() );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
bool ScCompiler::IsExternalNamedRange( const String& rSymbol )
@@ -3012,9 +3012,9 @@ bool ScCompiler::IsExternalNamedRange( const String& rSymbol )
#endif
}
-BOOL ScCompiler::IsDBRange( const String& rName )
+sal_Bool ScCompiler::IsDBRange( const String& rName )
{
- USHORT n;
+ sal_uInt16 n;
ScDBCollection* pDBColl = pDoc->GetDBCollection();
if (pDBColl->SearchName( rName, n ) )
{
@@ -3023,16 +3023,16 @@ BOOL ScCompiler::IsDBRange( const String& rName )
aToken.SetName( pData->GetIndex() );
aToken.eOp = ocDBArea;
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL ScCompiler::IsColRowName( const String& rName )
+sal_Bool ScCompiler::IsColRowName( const String& rName )
{
- BOOL bInList = FALSE;
- BOOL bFound = FALSE;
+ sal_Bool bInList = sal_False;
+ sal_Bool bFound = sal_False;
ScSingleRefData aRef;
String aName( rName );
DeQuote( aName );
@@ -3062,10 +3062,10 @@ BOOL ScCompiler::IsColRowName( const String& rName )
// recursive..
// Furthermore, *this* cell won't be touched, since no RPN exists yet.
CellType eType = pCell->GetCellType();
- BOOL bOk = sal::static_int_cast<BOOL>( (eType == CELLTYPE_FORMULA ?
+ sal_Bool bOk = sal::static_int_cast<sal_Bool>( (eType == CELLTYPE_FORMULA ?
((ScFormulaCell*)pCell)->GetCode()->GetCodeLen() > 0
&& ((ScFormulaCell*)pCell)->aPos != aPos // noIter
- : TRUE ) );
+ : sal_True ) );
if ( bOk && pCell->HasStringData() )
{
String aStr;
@@ -3097,11 +3097,11 @@ BOOL ScCompiler::IsColRowName( const String& rName )
aRef.nRow = aIter.GetRow();
aRef.nTab = aIter.GetTab();
if ( !jRow )
- aRef.SetColRel( TRUE ); // ColName
+ aRef.SetColRel( sal_True ); // ColName
else
- aRef.SetRowRel( TRUE ); // RowName
+ aRef.SetRowRel( sal_True ); // RowName
aRef.CalcRelFromAbs( aPos );
- bInList = bFound = TRUE;
+ bInList = bFound = sal_True;
}
}
}
@@ -3113,7 +3113,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
long nDistance = 0, nMax = 0;
long nMyCol = (long) aPos.Col();
long nMyRow = (long) aPos.Row();
- BOOL bTwo = FALSE;
+ sal_Bool bTwo = sal_False;
ScAddress aOne( 0, 0, aPos.Tab() );
ScAddress aTwo( MAXCOL, MAXROW, aPos.Tab() );
@@ -3153,7 +3153,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
{
if ( nC < 0 || nR < 0 )
{ // right or below
- bTwo = TRUE;
+ bTwo = sal_True;
aTwo.Set( nCol, nRow, aAddress.Tab() );
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
nDistance = nD;
@@ -3163,7 +3163,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
// upper left, only if not further up than the
// current entry and nMyRow is below (CellIter
// runs column-wise)
- bTwo = FALSE;
+ bTwo = sal_False;
aOne.Set( nCol, nRow, aAddress.Tab() );
nMax = Max( nMyCol + nC, nMyRow + nR );
nDistance = nD;
@@ -3176,7 +3176,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
nDistance = nC * nC + nR * nR;
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
}
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -3191,10 +3191,10 @@ BOOL ScCompiler::IsColRowName( const String& rName )
break; // aIter
}
CellType eType = pCell->GetCellType();
- BOOL bOk = sal::static_int_cast<BOOL>( (eType == CELLTYPE_FORMULA ?
+ sal_Bool bOk = sal::static_int_cast<sal_Bool>( (eType == CELLTYPE_FORMULA ?
((ScFormulaCell*)pCell)->GetCode()->GetCodeLen() > 0
&& ((ScFormulaCell*)pCell)->aPos != aPos // noIter
- : TRUE ) );
+ : sal_True ) );
if ( bOk && pCell->HasStringData() )
{
String aStr;
@@ -3232,7 +3232,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
{
if ( nC < 0 || nR < 0 )
{ // right or below
- bTwo = TRUE;
+ bTwo = sal_True;
aTwo.Set( nCol, nRow, aIter.GetTab() );
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
nDistance = nD;
@@ -3242,7 +3242,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
// upper left, only if not further up than the
// current entry and nMyRow is below (CellIter
// runs column-wise)
- bTwo = FALSE;
+ bTwo = sal_False;
aOne.Set( nCol, nRow, aIter.GetTab() );
nMax = Max( nMyCol + nC, nMyRow + nR );
nDistance = nD;
@@ -3255,7 +3255,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
nDistance = nC * nC + nR * nR;
nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
}
- bFound = TRUE;
+ bFound = sal_True;
}
}
}
@@ -3297,9 +3297,9 @@ BOOL ScCompiler::IsColRowName( const String& rName )
aRef.nCol, aRef.nRow + 1, aRef.nTab ))
|| (aRef.nRow != 0 && pDoc->HasStringData(
aRef.nCol, aRef.nRow - 1, aRef.nTab )) )
- aRef.SetRowRel( TRUE ); // RowName
+ aRef.SetRowRel( sal_True ); // RowName
else
- aRef.SetColRel( TRUE ); // ColName
+ aRef.SetColRel( sal_True ); // ColName
aRef.CalcRelFromAbs( aPos );
}
}
@@ -3309,13 +3309,13 @@ BOOL ScCompiler::IsColRowName( const String& rName )
aToken.SetSingleReference( aRef );
aToken.eOp = ocColRowName;
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL ScCompiler::IsBoolean( const String& rName )
+sal_Bool ScCompiler::IsBoolean( const String& rName )
{
OpCodeHashMap::const_iterator iLook( mxSymbols->getHashMap()->find( rName ) );
if( iLook != mxSymbols->getHashMap()->end() &&
@@ -3325,10 +3325,10 @@ BOOL ScCompiler::IsBoolean( const String& rName )
ScRawToken aToken;
aToken.SetOpCode( (*iLook).second );
pRawToken = aToken.Clone();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
//---------------------------------------------------------------------------
@@ -3356,17 +3356,17 @@ void ScCompiler::AutoCorrectParsedSymbol()
aCorrectedSymbol.SetChar( nPos, cQuote ); // '"' the 255th character
else
aCorrectedSymbol.Insert( cQuote, nPos + 1 );
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
else if ( c1 != cQuote && c2 == cQuote )
{ // ..."
aCorrectedSymbol.Insert( cQuote, 0 );
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
else if ( nPos == 0 && (c1 == cx || c1 == cX) )
{ // x => *
aCorrectedSymbol = mxSymbols->getSymbol(ocMul);
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
else if ( (GetCharTableFlags( c1 ) & SC_COMPILER_C_CHAR_VALUE)
&& (GetCharTableFlags( c2 ) & SC_COMPILER_C_CHAR_VALUE) )
@@ -3379,7 +3379,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
while ( (nIndex = aCorrectedSymbol.SearchAndReplace(
cx, c, nIndex )) != STRING_NOTFOUND )
nIndex++;
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
if ( (nXcount = aCorrectedSymbol.GetTokenCount( cX )) > 1 )
{ // X => *
@@ -3388,7 +3388,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
while ( (nIndex = aCorrectedSymbol.SearchAndReplace(
cX, c, nIndex )) != STRING_NOTFOUND )
nIndex++;
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
}
else
@@ -3403,16 +3403,16 @@ void ScCompiler::AutoCorrectParsedSymbol()
aSymbol.Erase( 0, nPosition + 2 );
}
xub_StrLen nRefs = aSymbol.GetTokenCount( ':' );
- BOOL bColons;
+ sal_Bool bColons;
if ( nRefs > 2 )
{ // duplicated or too many ':'? B:2::C10 => B2:C10
- bColons = TRUE;
+ bColons = sal_True;
xub_StrLen nIndex = 0;
String aTmp1( aSymbol.GetToken( 0, ':', nIndex ) );
xub_StrLen nLen1 = aTmp1.Len();
String aSym, aTmp2;
- BOOL bLastAlp, bNextNum;
- bLastAlp = bNextNum = TRUE;
+ sal_Bool bLastAlp, bNextNum;
+ bLastAlp = bNextNum = sal_True;
xub_StrLen nStrip = 0;
xub_StrLen nCount = nRefs;
for ( xub_StrLen j=1; j<nCount; j++ )
@@ -3466,7 +3466,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
aSymbol += aTmp1;
}
else
- bColons = FALSE;
+ bColons = sal_False;
if ( nRefs && nRefs <= 2 )
{ // reference twisted? 4A => A4 etc.
String aTab[2], aRef[2];
@@ -3479,9 +3479,9 @@ void ScCompiler::AutoCorrectParsedSymbol()
else
aRef[0] = aSymbol;
- BOOL bChanged = FALSE;
- BOOL bOk = TRUE;
- USHORT nMask = SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bOk = sal_True;
+ sal_uInt16 nMask = SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW;
for ( int j=0; j<nRefs; j++ )
{
xub_StrLen nTmp = 0;
@@ -3502,7 +3502,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
aRef[j] += aStr2;
if ( bColons || aRef[j] != aOld )
{
- bChanged = TRUE;
+ bChanged = sal_True;
ScAddress aAdr;
bOk &= ((aAdr.Parse( aRef[j], pDoc, aDetails ) & nMask) == nMask);
}
@@ -3518,7 +3518,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
aCorrectedSymbol += aTab[1];
aCorrectedSymbol += aRef[1];
}
- bCorrected = TRUE;
+ bCorrected = sal_True;
}
}
}
@@ -3542,7 +3542,7 @@ inline bool lcl_UpperAsciiOrI18n( String& rUpper, const String& rOrg, FormulaGra
}
}
-BOOL ScCompiler::NextNewToken( bool bInArray )
+sal_Bool ScCompiler::NextNewToken( bool bInArray )
{
bool bAllowBooleans = bInArray;
xub_StrLen nSpaces = NextSymbol(bInArray);
@@ -3559,7 +3559,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
{
ScRawToken aToken;
aToken.SetOpCode( ocSpaces );
- aToken.sbyte.cByte = (BYTE) ( nSpaces > 255 ? 255 : nSpaces );
+ aToken.sbyte.cByte = (sal_uInt8) ( nSpaces > 255 ? 255 : nSpaces );
if( !static_cast<ScTokenArray*>(pArr)->AddRawToken( aToken ) )
{
SetError(errCodeOverflow);
@@ -3589,7 +3589,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
if ( (cSymbol[0] == '#' || cSymbol[0] == '$') && cSymbol[1] == 0 &&
!bAutoCorrect )
{ // #101100# special case to speed up broken [$]#REF documents
- /* FIXME: ISERROR(#REF!) would be valid and TRUE and the formula to
+ /* FIXME: ISERROR(#REF!) would be valid and sal_True and the formula to
* be processed as usual. That would need some special treatment,
* also in NextSymbol() because of possible combinations of
* #REF!.#REF!#REF! parts. In case of reading ODF that is all
@@ -3716,7 +3716,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
void ScCompiler::CreateStringFromXMLTokenArray( String& rFormula, String& rFormulaNmsp )
{
bool bExternal = GetGrammar() == FormulaGrammar::GRAM_EXTERNAL;
- USHORT nExpectedCount = bExternal ? 2 : 1;
+ sal_uInt16 nExpectedCount = bExternal ? 2 : 1;
DBG_ASSERT( pArr->GetLen() == nExpectedCount, "ScCompiler::CreateStringFromXMLTokenArray - wrong number of tokens" );
if( pArr->GetLen() == nExpectedCount )
{
@@ -3746,13 +3746,13 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
aFormula.EraseLeadingChars();
aFormula.EraseTrailingChars();
nSrcPos = 0;
- bCorrected = FALSE;
+ bCorrected = sal_False;
if ( bAutoCorrect )
{
aCorrectedFormula.Erase();
aCorrectedSymbol.Erase();
}
- BYTE nForced = 0; // ==formula forces recalc even if cell is not visible
+ sal_uInt8 nForced = 0; // ==formula forces recalc even if cell is not visible
if( aFormula.GetChar(nSrcPos) == '=' )
{
nSrcPos++;
@@ -3807,7 +3807,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
SetError( errPairExpected );
if ( bAutoCorrect )
{
- bCorrected = TRUE;
+ bCorrected = sal_True;
aCorrectedSymbol.Erase();
}
}
@@ -3849,7 +3849,7 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula )
SetError( errPairExpected );
if ( bAutoCorrect )
{
- bCorrected = TRUE;
+ bCorrected = sal_True;
aCorrectedSymbol.Erase();
}
}
@@ -3969,12 +3969,12 @@ ScTokenArray* ScCompiler::CompileString( const String& rFormula, const String& r
}
-BOOL ScCompiler::HandleRange()
+sal_Bool ScCompiler::HandleRange()
{
ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex( pToken->GetIndex() );
if (pRangeData)
{
- USHORT nErr = pRangeData->GetErrCode();
+ sal_uInt16 nErr = pRangeData->GetErrCode();
if( nErr )
SetError( errNoName );
else if ( !bCompileForFAP )
@@ -3990,18 +3990,18 @@ BOOL ScCompiler::HandleRange()
FormulaToken* p2 = pArr->PeekNextNoSpaces();
OpCode eOp1 = (p1 ? p1->GetOpCode() : static_cast<OpCode>( ocSep ) );
OpCode eOp2 = (p2 ? p2->GetOpCode() : static_cast<OpCode>( ocSep ) );
- BOOL bBorder1 = (eOp1 == ocSep || eOp1 == ocOpen);
- BOOL bBorder2 = (eOp2 == ocSep || eOp2 == ocClose);
- BOOL bAddPair = !(bBorder1 && bBorder2);
+ sal_Bool bBorder1 = (eOp1 == ocSep || eOp1 == ocOpen);
+ sal_Bool bBorder2 = (eOp2 == ocSep || eOp2 == ocClose);
+ sal_Bool bAddPair = !(bBorder1 && bBorder2);
if ( bAddPair )
{
pNew = new ScTokenArray();
pNew->AddOpCode( ocClose );
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
}
pNew = pRangeData->GetCode()->Clone();
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
if( pRangeData->HasReferences() )
{
SetRelNameReference();
@@ -4012,7 +4012,7 @@ BOOL ScCompiler::HandleRange()
{
pNew = new ScTokenArray();
pNew->AddOpCode( ocOpen );
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
}
return GetToken();
@@ -4020,10 +4020,10 @@ BOOL ScCompiler::HandleRange()
}
else
SetError(errNoName);
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
+sal_Bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
{
// Handle external range names.
switch (_aToken.GetType())
@@ -4064,9 +4064,9 @@ BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
}
default:
DBG_ERROR("Wrong type for external reference!");
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -4088,7 +4088,7 @@ BOOL ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
//-----------------------------------------------------------------------------
-BOOL ScCompiler::HasModifiedRange()
+sal_Bool ScCompiler::HasModifiedRange()
{
pArr->Reset();
for ( FormulaToken* t = pArr->Next(); t; t = pArr->Next() )
@@ -4099,24 +4099,24 @@ BOOL ScCompiler::HasModifiedRange()
ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex(t->GetIndex());
if (pRangeData && pRangeData->IsModified())
- return TRUE;
+ return sal_True;
}
else if ( eOpCode == ocDBArea )
{
ScDBData* pDBData = pDoc->GetDBCollection()->FindIndex(t->GetIndex());
if (pDBData && pDBData->IsModified())
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//---------------------------------------------------------------------------
template< typename T, typename S >
-S lcl_adjval( S& n, T pos, T max, BOOL bRel )
+S lcl_adjval( S& n, T pos, T max, sal_Bool bRel )
{
max++;
if( bRel )
@@ -4140,12 +4140,12 @@ void ScCompiler::SetRelNameReference()
{
ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() )
- rRef1.SetRelName( TRUE );
+ rRef1.SetRelName( sal_True );
if ( t->GetType() == svDoubleRef )
{
ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() )
- rRef2.SetRelName( TRUE );
+ rRef2.SetRelName( sal_True );
}
}
}
@@ -4185,9 +4185,9 @@ void ScCompiler::MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddr
ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
const ScAddress& rOldPos, const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- BOOL& rChanged, BOOL& rRefSizeChanged )
+ sal_Bool& rChanged, sal_Bool& rRefSizeChanged )
{
- rChanged = rRefSizeChanged = FALSE;
+ rChanged = rRefSizeChanged = sal_False;
if ( eUpdateRefMode == URM_COPY )
{ // Normally nothing has to be done here since RelRefs are used, also
// SharedFormulas don't need any special handling, except if they
@@ -4209,7 +4209,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
SingleDoubleRefModifier( rRef ).Ref() )
!= UR_NOTHING
)
- rChanged = TRUE;
+ rChanged = sal_True;
}
}
// Check for SharedFormulas.
@@ -4234,14 +4234,14 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
for( t = static_cast<ScToken*>(pArr->GetNextReferenceRPN()); t && !pRangeData;
t = static_cast<ScToken*>(pArr->GetNextReferenceRPN()) )
{
- BOOL bRelName = (t->GetType() == svSingleRef ?
+ sal_Bool bRelName = (t->GetType() == svSingleRef ?
t->GetSingleRef().IsRelName() :
(t->GetDoubleRef().Ref1.IsRelName() ||
t->GetDoubleRef().Ref2.IsRelName()));
if (bRelName)
{
t->CalcAbsIfRel( rOldPos);
- BOOL bValid = (t->GetType() == svSingleRef ?
+ sal_Bool bValid = (t->GetType() == svSingleRef ?
t->GetSingleRef().Valid() :
t->GetDoubleRef().Valid());
// If the reference isn't valid, copying the formula
@@ -4249,7 +4249,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if (!bValid)
{
pRangeData = pName;
- rChanged = TRUE;
+ rChanged = sal_True;
}
}
}
@@ -4278,7 +4278,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
{
pRangeData = pName; // maybe need a replacement of shared with own code
#if ! SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- rChanged = TRUE;
+ rChanged = sal_True;
#endif
}
}
@@ -4303,7 +4303,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
SingleDoubleRefModifier(
t->GetSingleRef()).Ref())
!= UR_NOTHING)
- rChanged = TRUE;
+ rChanged = sal_True;
}
break;
default:
@@ -4316,23 +4316,23 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
aPos, r, nDx, nDy, nDz,
t->GetDoubleRef()) != UR_NOTHING)
{
- rChanged = TRUE;
+ rChanged = sal_True;
if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols ||
rRef.Ref2.nRow - rRef.Ref1.nRow != nRows ||
rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs)
- rRefSizeChanged = TRUE;
+ rRefSizeChanged = sal_True;
}
}
}
}
}
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- BOOL bEasyShared, bPosInRange;
+ sal_Bool bEasyShared, bPosInRange;
if ( !pRangeData )
- bEasyShared = bPosInRange = FALSE;
+ bEasyShared = bPosInRange = sal_False;
else
{
- bEasyShared = TRUE;
+ bEasyShared = sal_True;
bPosInRange = r.In( eUpdateRefMode == URM_MOVE ? aPos : rOldPos );
}
#endif
@@ -4342,7 +4342,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( t->GetRef() != 1 )
{
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- bEasyShared = FALSE;
+ bEasyShared = sal_False;
#endif
}
else
@@ -4354,7 +4354,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( rRef.IsRelName() )
{
ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, aMod.Ref() );
- rChanged = TRUE;
+ rChanged = sal_True;
}
else
{
@@ -4363,7 +4363,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
r, nDx, nDy, nDz, aMod.Ref() )
!= UR_NOTHING
)
- rChanged = TRUE;
+ rChanged = sal_True;
}
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
if ( bEasyShared )
@@ -4371,7 +4371,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
const ScSingleRefData& rSRD = aMod.Ref().Ref1;
ScAddress aRef( rSRD.nCol, rSRD.nRow, rSRD.nTab );
if ( r.In( aRef ) != bPosInRange )
- bEasyShared = FALSE;
+ bEasyShared = sal_False;
}
#endif
}
@@ -4384,7 +4384,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( rRef.Ref1.IsRelName() || rRef.Ref2.IsRelName() )
{
ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, rRef );
- rChanged = TRUE;
+ rChanged = sal_True;
}
else
{
@@ -4393,14 +4393,14 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
!= UR_NOTHING
)
{
- rChanged = TRUE;
+ rChanged = sal_True;
if (rRef.Ref2.nCol - rRef.Ref1.nCol != nCols ||
rRef.Ref2.nRow - rRef.Ref1.nRow != nRows ||
rRef.Ref2.nTab - rRef.Ref1.nTab != nTabs)
{
- rRefSizeChanged = TRUE;
+ rRefSizeChanged = sal_True;
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
- bEasyShared = FALSE;
+ bEasyShared = sal_False;
#endif
}
}
@@ -4412,7 +4412,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
rRef.Ref1.nTab, rRef.Ref2.nCol, rRef.Ref2.nRow,
rRef.Ref2.nTab );
if ( r.In( aRef ) != bPosInRange )
- bEasyShared = FALSE;
+ bEasyShared = sal_False;
}
#endif
}
@@ -4424,7 +4424,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
if ( bEasyShared )
pRangeData = 0;
else
- rChanged = TRUE;
+ rChanged = sal_True;
}
#endif
#undef SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
@@ -4432,13 +4432,13 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
}
}
-BOOL ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
+sal_Bool ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- BOOL& rChanged, BOOL bSharedFormula)
+ sal_Bool& rChanged, sal_Bool bSharedFormula)
{
- BOOL bRelRef = FALSE; // set if relative reference
- rChanged = FALSE;
+ sal_Bool bRelRef = sal_False; // set if relative reference
+ rChanged = sal_False;
pArr->Reset();
ScToken* t;
while ( (t = static_cast<ScToken*>(pArr->GetNextReference())) != NULL )
@@ -4472,7 +4472,7 @@ BOOL ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
if (ScRefUpdate::Update( pDoc, eUpdateRefMode, aPos, r,
nDx, nDy, nDz, rRef, ScRefUpdate::ABSOLUTE)
!= UR_NOTHING )
- rChanged = TRUE;
+ rChanged = sal_True;
}
}
return bRelRef;
@@ -4548,12 +4548,12 @@ void ScCompiler::UpdateSharedFormulaReference( UpdateRefMode eUpdateRefMode,
}
-ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
+ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, sal_Bool bIsName )
{
ScRangeData* pRangeData = NULL;
SCTAB nPosTab = aPos.Tab(); // _after_ incremented!
SCTAB nOldPosTab = ((nPosTab > nTable) ? (nPosTab - 1) : nPosTab);
- BOOL bIsRel = FALSE;
+ sal_Bool bIsRel = sal_False;
ScToken* t;
pArr->Reset();
if (bIsName)
@@ -4587,7 +4587,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
if ( t->GetType() == svDoubleRef )
{
if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
@@ -4604,7 +4604,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
}
if ( bIsName && bIsRel )
pRangeData = (ScRangeData*) this; // not dereferenced in rangenam
@@ -4656,15 +4656,15 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
return pRangeData;
}
-ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL bIsName,
- BOOL& rChanged)
+ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, sal_Bool /* bIsMove */, sal_Bool bIsName,
+ sal_Bool& rChanged)
{
ScRangeData* pRangeData = NULL;
SCTAB nTab, nTab2;
SCTAB nPosTab = aPos.Tab(); // _after_ decremented!
SCTAB nOldPosTab = ((nPosTab >= nTable) ? (nPosTab + 1) : nPosTab);
- rChanged = FALSE;
- BOOL bIsRel = FALSE;
+ rChanged = sal_False;
+ sal_Bool bIsRel = sal_False;
ScToken* t;
pArr->Reset();
if (bIsName)
@@ -4681,7 +4681,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if (pName && pName->HasType(RT_SHAREDMOD))
pRangeData = pName;
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if( t->GetType() != svIndex ) // it may be a DB area!!!
{
@@ -4695,7 +4695,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4710,7 +4710,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
|| (nTab+1) >= pDoc->GetTableCount() )
{
rRef.nTab = MAXTAB+1;
- rRef.SetTabDeleted( TRUE );
+ rRef.SetTabDeleted( sal_True );
}
// else: nTab later points to what's nTable+1 now
// => area shrunk
@@ -4718,14 +4718,14 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef.nTab = MAXTAB+1;
- rRef.SetTabDeleted( TRUE );
+ rRef.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
if ( t->GetType() == svDoubleRef )
{
if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
@@ -4738,7 +4738,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4747,14 +4747,14 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef.nTab = MAXTAB+1;
- rRef.SetTabDeleted( TRUE );
+ rRef.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef.nRelTab = rRef.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
}
if ( bIsName && bIsRel )
pRangeData = (ScRangeData*) this; // not dereferenced in rangenam
@@ -4781,7 +4781,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef1.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4796,7 +4796,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
|| (nTab+1) >= pDoc->GetTableCount() )
{
rRef1.nTab = MAXTAB+1;
- rRef1.SetTabDeleted( TRUE );
+ rRef1.SetTabDeleted( sal_True );
}
// else: nTab later points to what's nTable+1 now
// => area shrunk
@@ -4804,9 +4804,9 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef1.nTab = MAXTAB+1;
- rRef1.SetTabDeleted( TRUE );
+ rRef1.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef1.nRelTab = rRef1.nTab - nPosTab;
}
@@ -4822,7 +4822,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
if ( nTable < nTab )
{
rRef2.nTab = nTab - 1;
- rChanged = TRUE;
+ rChanged = sal_True;
}
else if ( nTable == nTab )
{
@@ -4831,9 +4831,9 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
else
{
rRef2.nTab = MAXTAB+1;
- rRef2.SetTabDeleted( TRUE );
+ rRef2.SetTabDeleted( sal_True );
}
- rChanged = TRUE;
+ rChanged = sal_True;
}
rRef2.nRelTab = rRef2.nTab - nPosTab;
}
@@ -4846,7 +4846,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
// aPos.Tab() must be already adjusted!
ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
- BOOL bIsName )
+ sal_Bool bIsName )
{
ScRangeData* pRangeData = NULL;
SCsTAB nTab;
@@ -4874,7 +4874,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
else
nOldPosTab = nPosTab - nDir; // moved by one
- BOOL bIsRel = FALSE;
+ sal_Bool bIsRel = sal_False;
ScToken* t;
pArr->Reset();
if (bIsName)
@@ -4908,7 +4908,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
rRef1.nRelTab = rRef1.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
if ( t->GetType() == svDoubleRef )
{
ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
@@ -4925,7 +4925,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
rRef2.nRelTab = rRef2.nTab - nPosTab;
}
else
- bIsRel = TRUE;
+ bIsRel = sal_True;
SCsTAB nTab1, nTab2;
if ( rRef1.IsTabRel() )
nTab1 = rRef1.nRelTab + nPosTab;
@@ -5089,7 +5089,7 @@ void ScCompiler::CreateStringFromMatrix( rtl::OUStringBuffer& rBuffer,
AppendBoolean( rBuffer, pVal->GetBoolean() );
else
{
- USHORT nErr = pVal->GetError();
+ sal_uInt16 nErr = pVal->GetError();
if( nErr )
rBuffer.append( ScGlobal::GetErrorString( nErr ) );
else
@@ -5124,16 +5124,16 @@ void ScCompiler::CreateStringFromSingleRef(rtl::OUStringBuffer& rBuffer,FormulaT
else
{
rBuffer.append(ScGlobal::GetRscString(STR_NO_NAME_REF));
- pConv->MakeRefStr (rBuffer, *this, aRef, TRUE );
+ pConv->MakeRefStr (rBuffer, *this, aRef, sal_True );
}
}
else
- pConv->MakeRefStr( rBuffer, *this, aRef, TRUE );
+ pConv->MakeRefStr( rBuffer, *this, aRef, sal_True );
}
// -----------------------------------------------------------------------------
void ScCompiler::CreateStringFromDoubleRef(rtl::OUStringBuffer& rBuffer,FormulaToken* _pTokenP)
{
- pConv->MakeRefStr( rBuffer, *this, static_cast<ScToken*>(_pTokenP)->GetDoubleRef(), FALSE );
+ pConv->MakeRefStr( rBuffer, *this, static_cast<ScToken*>(_pTokenP)->GetDoubleRef(), sal_False );
}
// -----------------------------------------------------------------------------
void ScCompiler::CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,FormulaToken* _pTokenP)
@@ -5175,19 +5175,19 @@ void ScCompiler::LocalizeString( String& rName )
ScGlobal::GetAddInCollection()->LocalizeString( rName );
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::IsImportingXML() const
+sal_Bool ScCompiler::IsImportingXML() const
{
return pDoc->IsImportingXML();
}
// Put quotes around string if non-alphanumeric characters are contained,
// quote characters contained within are escaped by '\\'.
-BOOL ScCompiler::EnQuote( String& rStr )
+sal_Bool ScCompiler::EnQuote( String& rStr )
{
sal_Int32 nType = ScGlobal::pCharClass->getStringType( rStr, 0, rStr.Len() );
if ( !CharClass::isNumericType( nType )
&& CharClass::isAlphaNumericType( nType ) )
- return FALSE;
+ return sal_False;
xub_StrLen nPos = 0;
while ( (nPos = rStr.Search( '\'', nPos)) != STRING_NOTFOUND )
@@ -5197,7 +5197,7 @@ BOOL ScCompiler::EnQuote( String& rStr )
}
rStr.Insert( '\'', 0 );
rStr += '\'';
- return TRUE;
+ return sal_True;
}
sal_Unicode ScCompiler::GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const
@@ -5235,24 +5235,24 @@ void ScCompiler::fillAddInToken(::std::vector< ::com::sun::star::sheet::FormulaO
// FIXME: what about those old non-UNO AddIns?
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::HandleSingleRef()
+sal_Bool ScCompiler::HandleSingleRef()
{
ScSingleRefData& rRef = static_cast<ScToken*>((FormulaToken*)pToken)->GetSingleRef();
rRef.CalcAbsIfRel( aPos );
if ( !rRef.Valid() )
{
SetError( errNoRef );
- return TRUE;
+ return sal_True;
}
SCCOL nCol = rRef.nCol;
SCROW nRow = rRef.nRow;
SCTAB nTab = rRef.nTab;
ScAddress aLook( nCol, nRow, nTab );
- BOOL bColName = rRef.IsColRel();
+ sal_Bool bColName = rRef.IsColRel();
SCCOL nMyCol = aPos.Col();
SCROW nMyRow = aPos.Row();
- BOOL bInList = FALSE;
- BOOL bValidName = FALSE;
+ sal_Bool bInList = sal_False;
+ sal_Bool bValidName = sal_False;
ScRangePairList* pRL = (bColName ?
pDoc->GetColNameRanges() : pDoc->GetRowNameRanges());
ScRange aRange;
@@ -5260,7 +5260,7 @@ BOOL ScCompiler::HandleSingleRef()
{
if ( pR->GetRange(0).In( aLook ) )
{
- bInList = bValidName = TRUE;
+ bInList = bValidName = sal_True;
aRange = pR->GetRange(1);
if ( bColName )
{
@@ -5277,12 +5277,12 @@ BOOL ScCompiler::HandleSingleRef()
}
if ( !bInList && pDoc->GetDocOptions().IsLookUpColRowNames() )
{ // automagically or created by copying and NamePos isn't in list
- BOOL bString = pDoc->HasStringData( nCol, nRow, nTab );
+ sal_Bool bString = pDoc->HasStringData( nCol, nRow, nTab );
if ( !bString && !pDoc->GetCell( aLook ) )
- bString = TRUE; // empty cell is ok
+ bString = sal_True; // empty cell is ok
if ( bString )
{ //! coresponds with ScInterpreter::ScColRowNameAuto()
- bValidName = TRUE;
+ bValidName = sal_True;
if ( bColName )
{ // ColName
SCROW nStartRow = nRow + 1;
@@ -5358,10 +5358,10 @@ BOOL ScCompiler::HandleSingleRef()
// generated. A ocColRowName or ocIntersect as a neighbor results
// in a range. Special case: if label is valid for a single cell, a
// position independent SingleRef is generated.
- BOOL bSingle = (aRange.aStart == aRange.aEnd);
- BOOL bFound;
+ sal_Bool bSingle = (aRange.aStart == aRange.aEnd);
+ sal_Bool bFound;
if ( bSingle )
- bFound = TRUE;
+ bFound = sal_True;
else
{
FormulaToken* p1 = pArr->PeekPrevNoSpaces();
@@ -5374,7 +5374,7 @@ BOOL ScCompiler::HandleSingleRef()
{
if ( (SC_OPCODE_START_BIN_OP <= eOp1 && eOp1 < SC_OPCODE_STOP_BIN_OP) ||
(SC_OPCODE_START_BIN_OP <= eOp2 && eOp2 < SC_OPCODE_STOP_BIN_OP))
- bSingle = TRUE;
+ bSingle = sal_True;
}
if ( bSingle )
{ // column and/or row must match range
@@ -5394,7 +5394,7 @@ BOOL ScCompiler::HandleSingleRef()
}
}
else
- bFound = TRUE;
+ bFound = sal_True;
}
if ( !bFound )
SetError(errNoRef);
@@ -5406,9 +5406,9 @@ BOOL ScCompiler::HandleSingleRef()
ScSingleRefData aRefData;
aRefData.InitAddress( aRange.aStart );
if ( bColName )
- aRefData.SetColRel( TRUE );
+ aRefData.SetColRel( sal_True );
else
- aRefData.SetRowRel( TRUE );
+ aRefData.SetRowRel( sal_True );
aRefData.CalcRelFromAbs( aPos );
pNew->AddSingleReference( aRefData );
}
@@ -5418,13 +5418,13 @@ BOOL ScCompiler::HandleSingleRef()
aRefData.InitRange( aRange );
if ( bColName )
{
- aRefData.Ref1.SetColRel( TRUE );
- aRefData.Ref2.SetColRel( TRUE );
+ aRefData.Ref1.SetColRel( sal_True );
+ aRefData.Ref2.SetColRel( sal_True );
}
else
{
- aRefData.Ref1.SetRowRel( TRUE );
- aRefData.Ref2.SetRowRel( TRUE );
+ aRefData.Ref1.SetRowRel( sal_True );
+ aRefData.Ref2.SetRowRel( sal_True );
}
aRefData.CalcRelFromAbs( aPos );
if ( bInList )
@@ -5434,17 +5434,17 @@ BOOL ScCompiler::HandleSingleRef()
pNew->Add( new ScDoubleRefToken( aRefData, ocColRowNameAuto ) );
}
}
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
return GetToken();
}
}
else
SetError(errNoName);
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ScCompiler::HandleDbData()
+sal_Bool ScCompiler::HandleDbData()
{
ScDBData* pDBData = pDoc->GetDBCollection()->FindIndex( pToken->GetIndex() );
if ( !pDBData )
@@ -5462,11 +5462,11 @@ BOOL ScCompiler::HandleDbData()
aRefData.CalcRelFromAbs( aPos );
ScTokenArray* pNew = new ScTokenArray();
pNew->AddDoubleReference( aRefData );
- PushTokenArray( pNew, TRUE );
+ PushTokenArray( pNew, sal_True );
pNew->Reset();
return GetToken();
}
- return TRUE;
+ return sal_True;
}
String GetScCompilerNativeSymbol( OpCode eOp )
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index addd92082cfd..565a469de9f4 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -50,7 +50,7 @@
// STATIC DATA -----------------------------------------------------------
/* Strings bei Gelegenheit ganz raus...
-static USHORT nFuncRes[] = { // Reihenfolge wie bei enum ScSubTotalFunc
+static sal_uInt16 nFuncRes[] = { // Reihenfolge wie bei enum ScSubTotalFunc
0, // none
STR_PIVOTFUNC_AVG,
STR_PIVOTFUNC_COUNT,
@@ -122,10 +122,10 @@ void lcl_AddString( String**& pData, T& nCount, const String& rInsert )
ScConsData::ScConsData() :
eFunction(SUBTOTAL_FUNC_SUM),
- bReference(FALSE),
- bColByName(FALSE),
- bRowByName(FALSE),
- bSubTitles(FALSE),
+ bReference(sal_False),
+ bColByName(sal_False),
+ bRowByName(sal_False),
+ bSubTitles(sal_False),
nColCount(0),
nRowCount(0),
ppUsed(NULL),
@@ -139,7 +139,7 @@ ScConsData::ScConsData() :
nTitleCount(0),
ppTitles(NULL),
ppTitlePos(NULL),
- bCornerUsed(FALSE)
+ bCornerUsed(sal_False)
{
}
@@ -151,7 +151,7 @@ ScConsData::~ScConsData()
#define DELETEARR(ppArray,nCount) \
{ \
- ULONG i; \
+ sal_uLong i; \
if (ppArray) \
for(i=0; i<nCount; i++) \
delete[] ppArray[i]; \
@@ -161,7 +161,7 @@ ScConsData::~ScConsData()
#define DELETESTR(ppArray,nCount) \
{ \
- ULONG i; \
+ sal_uLong i; \
if (ppArray) \
for(i=0; i<nCount; i++) \
delete ppArray[i]; \
@@ -200,14 +200,14 @@ void ScConsData::DeleteData()
if (bColByName) nColCount = 0; // sonst stimmt ppColHeaders nicht
if (bRowByName) nRowCount = 0;
- bCornerUsed = FALSE;
+ bCornerUsed = sal_False;
aCornerText.Erase();
}
#undef DELETEARR
#undef DELETESTR
-void ScConsData::InitData( BOOL bDelete )
+void ScConsData::InitData( sal_Bool bDelete )
{
if (bDelete)
DeleteData();
@@ -233,11 +233,11 @@ void ScConsData::InitData( BOOL bDelete )
if (nColCount && !ppUsed)
{
- ppUsed = new BOOL*[nColCount];
+ ppUsed = new sal_Bool*[nColCount];
for (SCSIZE i=0; i<nColCount; i++)
{
- ppUsed[i] = new BOOL[nRowCount];
- memset( ppUsed[i], 0, nRowCount * sizeof(BOOL) );
+ ppUsed[i] = new sal_Bool[nRowCount];
+ memset( ppUsed[i], 0, nRowCount * sizeof(sal_Bool) );
}
}
@@ -256,7 +256,7 @@ void ScConsData::InitData( BOOL bDelete )
void ScConsData::DoneFields()
{
- InitData(FALSE);
+ InitData(sal_False);
}
void ScConsData::SetSize( SCCOL nCols, SCROW nRows )
@@ -272,7 +272,7 @@ void ScConsData::GetSize( SCCOL& rCols, SCROW& rRows ) const
rRows = static_cast<SCROW>(nRowCount);
}
-void ScConsData::SetFlags( ScSubTotalFunc eFunc, BOOL bColName, BOOL bRowName, BOOL bRef )
+void ScConsData::SetFlags( ScSubTotalFunc eFunc, sal_Bool bColName, sal_Bool bRowName, sal_Bool bRef )
{
DeleteData();
bReference = bRef;
@@ -302,10 +302,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
pSrcDoc->GetString( nCol, nRow1, nTab, aTitle );
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (SCSIZE i=0; i<nColCount && !bFound; i++)
if ( *ppColHeaders[i] == aTitle )
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
lcl_AddString( ppColHeaders, nColCount, aTitle );
}
@@ -319,10 +319,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
pSrcDoc->GetString( nCol1, nRow, nTab, aTitle );
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (SCSIZE i=0; i<nRowCount && !bFound; i++)
if ( *ppRowHeaders[i] == aTitle )
- bFound = TRUE;
+ bFound = sal_True;
if (!bFound)
lcl_AddString( ppRowHeaders, nRowCount, aTitle );
}
@@ -352,7 +352,7 @@ void ScConsData::AddName( const String& rName )
{
if (!ppUsed[nArrX][nArrY])
{
- ppUsed[nArrX][nArrY] = TRUE;
+ ppUsed[nArrX][nArrY] = sal_True;
ppRefs[nArrX][nArrY].Init();
}
ppRefs[nArrX][nArrY].SetFullSize(nMax);
@@ -407,7 +407,7 @@ void lcl_UpdateArray( ScSubTotalFunc eFunc,
case SUBTOTAL_FUNC_VAR:
case SUBTOTAL_FUNC_VARP:
{
- BOOL bOk = SubTotal::SafePlus(rSum, nVal);
+ sal_Bool bOk = SubTotal::SafePlus(rSum, nVal);
bOk = bOk && SubTotal::SafeMult(nVal, nVal);
bOk = bOk && SubTotal::SafePlus(rSumSqr, nVal);
if (!bOk)
@@ -442,7 +442,7 @@ void lcl_InitArray( ScSubTotalFunc eFunc,
case SUBTOTAL_FUNC_VARP:
{
rSum = nVal;
- BOOL bOk = SubTotal::SafeMult(nVal, nVal);
+ sal_Bool bOk = SubTotal::SafeMult(nVal, nVal);
if (bOk)
rSumSqr = nVal;
else
@@ -553,7 +553,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
else
{
aCornerText = aThisCorner;
- bCornerUsed = TRUE;
+ bCornerUsed = sal_True;
}
}
@@ -575,12 +575,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
SCCOL nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (SCSIZE i=0; i<nColCount && !bFound; i++)
if ( *ppColHeaders[i] == aTitle )
{
nPos = static_cast<SCCOL>(i);
- bFound = TRUE;
+ bFound = sal_True;
}
DBG_ASSERT(bFound, "Spalte nicht gefunden");
}
@@ -596,12 +596,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
SCROW nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for (SCSIZE i=0; i<nRowCount && !bFound; i++)
if ( *ppRowHeaders[i] == aTitle )
{
nPos = static_cast<SCROW>(i);
- bFound = TRUE;
+ bFound = sal_True;
}
DBG_ASSERT(bFound, "Zeile nicht gefunden");
}
@@ -613,7 +613,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
// Daten
- BOOL bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 );
+ sal_Bool bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 );
for (nCol=nCol1; nCol<=nCol2; nCol++)
{
SCCOL nArrX = nCol-nCol1;
@@ -634,7 +634,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
ppRefs[nArrX][nArrY].AddEntry( nCol, nRow, nTab );
else
{
- ppUsed[nArrX][nArrY] = TRUE;
+ ppUsed[nArrX][nArrY] = sal_True;
ppRefs[nArrX][nArrY].Init();
ppRefs[nArrX][nArrY].AddEntry( nCol, nRow, nTab );
}
@@ -649,7 +649,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
nVal);
else
{
- ppUsed[nArrX][nArrY] = TRUE;
+ ppUsed[nArrX][nArrY] = sal_True;
lcl_InitArray( eFunction, ppCount[nArrX][nArrY],
ppSum[nArrX][nArrY],
ppSumSqr[nArrX][nArrY], nVal );
@@ -745,12 +745,12 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
ScSingleRefData aSRef; // Daten fuer Referenz-Formelzellen
aSRef.InitFlags();
- aSRef.SetFlag3D(TRUE);
+ aSRef.SetFlag3D(sal_True);
ScComplexRefData aCRef; // Daten fuer Summen-Zellen
aCRef.InitFlags();
- aCRef.Ref1.SetColRel(TRUE); aCRef.Ref1.SetRowRel(TRUE); aCRef.Ref1.SetTabRel(TRUE);
- aCRef.Ref2.SetColRel(TRUE); aCRef.Ref2.SetRowRel(TRUE); aCRef.Ref2.SetTabRel(TRUE);
+ aCRef.Ref1.SetColRel(sal_True); aCRef.Ref1.SetRowRel(sal_True); aCRef.Ref1.SetTabRel(sal_True);
+ aCRef.Ref2.SetColRel(sal_True); aCRef.Ref2.SetRowRel(sal_True); aCRef.Ref2.SetTabRel(sal_True);
for (nArrY=0; nArrY<nRowCount; nArrY++)
{
@@ -815,14 +815,14 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
// Gliederung einfuegen
- ScOutlineArray* pOutArr = pDestDoc->GetOutlineTable( nTab, TRUE )->GetRowArray();
+ ScOutlineArray* pOutArr = pDestDoc->GetOutlineTable( nTab, sal_True )->GetRowArray();
SCROW nOutStart = nRow+nArrY;
SCROW nOutEnd = nRow+nArrY+nNeeded-1;
- BOOL bSize = FALSE;
+ sal_Bool bSize = sal_False;
pOutArr->Insert( nOutStart, nOutEnd, bSize );
for (SCROW nOutRow=nOutStart; nOutRow<=nOutEnd; nOutRow++)
- pDestDoc->ShowRow( nOutRow, nTab, FALSE );
- pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, FALSE );
+ pDestDoc->ShowRow( nOutRow, nTab, sal_False );
+ pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, sal_False );
// Zwischentitel
@@ -832,10 +832,10 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
for (SCSIZE nPos=0; nPos<nDataCount; nPos++)
{
SCSIZE nTPos = ppTitlePos[nArrY][nPos];
- BOOL bDo = TRUE;
+ sal_Bool bDo = sal_True;
if (nPos+1<nDataCount)
if (ppTitlePos[nArrY][nPos+1] == nTPos)
- bDo = FALSE; // leer
+ bDo = sal_False; // leer
if ( bDo && nTPos < nNeeded )
{
aString = *ppRowHeaders[nArrY];
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index 7f94cb64c827..800716bef3b6 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -46,7 +46,7 @@
ScDBData::ScDBData( const String& rName,
SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- BOOL bByR, BOOL bHasH) :
+ sal_Bool bByR, sal_Bool bHasH) :
aName (rName),
nTable (nTab),
nStartCol (nCol1),
@@ -55,16 +55,16 @@ ScDBData::ScDBData( const String& rName,
nEndRow (nRow2),
bByRow (bByR),
bHasHeader (bHasH),
- bDoSize (FALSE),
- bKeepFmt (FALSE),
- bStripData (FALSE),
- bIsAdvanced (FALSE),
- bDBSelection(FALSE),
+ bDoSize (sal_False),
+ bKeepFmt (sal_False),
+ bStripData (sal_False),
+ bIsAdvanced (sal_False),
+ bDBSelection(sal_False),
nIndex (0),
- bAutoFilter (FALSE),
- bModified (FALSE)
+ bAutoFilter (sal_False),
+ bModified (sal_False)
{
- USHORT i;
+ sal_uInt16 i;
ScSortParam aSortParam;
ScQueryParam aQueryParam;
@@ -140,8 +140,8 @@ ScDBData::ScDBData( const ScDBData& rData ) :
bAutoFilter (rData.bAutoFilter),
bModified (rData.bModified)
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
for (i=0; i<MAXSORT; i++)
{
@@ -180,8 +180,8 @@ ScDBData::ScDBData( const ScDBData& rData ) :
ScDBData& ScDBData::operator= (const ScDBData& rData)
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
ScRefreshTimer::operator=( rData );
aName = rData.aName;
@@ -272,7 +272,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
return *this;
}
-BOOL ScDBData::operator== (const ScDBData& rData) const
+sal_Bool ScDBData::operator== (const ScDBData& rData) const
{
// Daten, die nicht in den Params sind
@@ -285,42 +285,42 @@ BOOL ScDBData::operator== (const ScDBData& rData) const
// bAutoFilter!= rData.bAutoFilter||
ScRefreshTimer::operator!=( rData )
)
- return FALSE;
+ return sal_False;
if ( bIsAdvanced && aAdvSource != rData.aAdvSource )
- return FALSE;
+ return sal_False;
ScSortParam aSort1, aSort2;
GetSortParam(aSort1);
rData.GetSortParam(aSort2);
if (!(aSort1 == aSort2))
- return FALSE;
+ return sal_False;
ScQueryParam aQuery1, aQuery2;
GetQueryParam(aQuery1);
rData.GetQueryParam(aQuery2);
if (!(aQuery1 == aQuery2))
- return FALSE;
+ return sal_False;
ScSubTotalParam aSubTotal1, aSubTotal2;
GetSubTotalParam(aSubTotal1);
rData.GetSubTotalParam(aSubTotal2);
if (!(aSubTotal1 == aSubTotal2))
- return FALSE;
+ return sal_False;
ScImportParam aImport1, aImport2;
GetImportParam(aImport1);
rData.GetImportParam(aImport2);
if (!(aImport1 == aImport2))
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
ScDBData::~ScDBData()
{
StopRefreshTimer();
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<MAXQUERY; i++)
delete pQueryStr[i];
@@ -331,7 +331,7 @@ ScDBData::~ScDBData()
}
}
-//UNUSED2008-05 BOOL ScDBData::IsBeyond(SCROW nMaxRow) const
+//UNUSED2008-05 sal_Bool ScDBData::IsBeyond(SCROW nMaxRow) const
//UNUSED2008-05 {
//UNUSED2008-05 return ( nStartRow > nMaxRow ||
//UNUSED2008-05 nEndRow > nMaxRow ||
@@ -401,7 +401,7 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW
void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
{
- USHORT i;
+ sal_uInt16 i;
long nDifX = ((long) nCol1) - ((long) nStartCol);
long nDifY = ((long) nRow1) - ((long) nStartRow);
@@ -414,7 +414,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
if (nSortField[i] > nSortEnd)
{
nSortField[i] = 0;
- bDoSort[i] = FALSE;
+ bDoSort[i] = sal_False;
}
}
for (i=0; i<MAXQUERY; i++)
@@ -423,7 +423,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
if (nQueryField[i] > nCol2)
{
nQueryField[i] = 0;
- bDoQuery[i] = FALSE;
+ bDoQuery[i] = sal_False;
}
}
for (i=0; i<MAXSUBTOTAL; i++)
@@ -432,7 +432,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
if (nSubField[i] > nCol2)
{
nSubField[i] = 0;
- bDoSubTotal[i] = FALSE;
+ bDoSubTotal[i] = sal_False;
}
}
@@ -455,7 +455,7 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const
rSortParam.bIncludePattern = bIncludePattern;
rSortParam.bUserDef = bSortUserDef;
rSortParam.nUserIndex = nSortUserIndex;
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
rSortParam.bDoSort[i] = bDoSort[i];
rSortParam.nField[i] = nSortField[i];
@@ -475,7 +475,7 @@ void ScDBData::SetSortParam( const ScSortParam& rSortParam )
nSortDestRow = rSortParam.nDestRow;
bSortUserDef = rSortParam.bUserDef;
nSortUserIndex = rSortParam.nUserIndex;
- for (USHORT i=0; i<MAXSORT; i++)
+ for (sal_uInt16 i=0; i<MAXSORT; i++)
{
bDoSort[i] = rSortParam.bDoSort[i];
nSortField[i] = rSortParam.nField[i];
@@ -527,9 +527,9 @@ void ScDBData::SetQueryParam(const ScQueryParam& rQueryParam)
!rQueryParam.GetEntry(MAXQUERY).bDoQuery,
"zuviele Eintraege bei ScDBData::SetQueryParam" );
- // set bIsAdvanced to FALSE for everything that is not from the
+ // set bIsAdvanced to sal_False for everything that is not from the
// advanced filter dialog
- bIsAdvanced = FALSE;
+ bIsAdvanced = sal_False;
bQueryInplace = rQueryParam.bInplace;
bQueryCaseSens = rQueryParam.bCaseSens;
@@ -558,13 +558,13 @@ void ScDBData::SetAdvancedQuerySource(const ScRange* pSource)
if (pSource)
{
aAdvSource = *pSource;
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
}
else
- bIsAdvanced = FALSE;
+ bIsAdvanced = sal_False;
}
-BOOL ScDBData::GetAdvancedQuerySource(ScRange& rSource) const
+sal_Bool ScDBData::GetAdvancedQuerySource(ScRange& rSource) const
{
rSource = aAdvSource;
return bIsAdvanced;
@@ -572,8 +572,8 @@ BOOL ScDBData::GetAdvancedQuerySource(ScRange& rSource) const
void ScDBData::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
rSubTotalParam.nCol1 = nStartCol;
rSubTotalParam.nRow1 = nStartRow;
@@ -612,8 +612,8 @@ void ScDBData::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const
void ScDBData::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
{
- USHORT i;
- USHORT j;
+ sal_uInt16 i;
+ sal_uInt16 j;
bSubRemoveOnly = rSubTotalParam.bRemoveOnly;
bSubReplace = rSubTotalParam.bReplace;
@@ -669,7 +669,7 @@ void ScDBData::SetImportParam(const ScImportParam& rImportParam)
nDBType = rImportParam.nType;
}
-BOOL ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const
+sal_Bool ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const
{
if (nTab == nTable)
{
@@ -680,12 +680,12 @@ BOOL ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly)
nRow >= nStartRow && nRow <= nEndRow );
}
- return FALSE;
+ return sal_False;
}
-BOOL ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
+sal_Bool ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
{
- return (BOOL)((nTab == nTable)
+ return (sal_Bool)((nTab == nTable)
&& (nCol1 == nStartCol) && (nRow1 == nStartRow)
&& (nCol2 == nEndCol) && (nRow2 == nEndRow));
}
@@ -708,19 +708,19 @@ short ScDBCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
// IsEqual - alles gleich
-BOOL ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
+sal_Bool ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return *(ScDBData*)pKey1 == *(ScDBData*)pKey2;
}
-ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const
+ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const
{
ScDBData* pNoNameData = NULL;
if (pItems)
{
const String& rNoName = ScGlobal::GetRscString( STR_DB_NONAME );
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
if (((ScDBData*)pItems[i])->IsDBAtCursor(nCol, nRow, nTab, bStartOnly))
{
ScDBData* pDB = (ScDBData*)pItems[i];
@@ -740,7 +740,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
{
const String& rNoName = ScGlobal::GetRscString( STR_DB_NONAME );
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
if (((ScDBData*)pItems[i])->IsDBAtArea(nTab, nCol1, nRow1, nCol2, nRow2))
{
ScDBData* pDB = (ScDBData*)pItems[i];
@@ -753,7 +753,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden
}
-BOOL ScDBCollection::SearchName( const String& rName, USHORT& rIndex ) const
+sal_Bool ScDBCollection::SearchName( const String& rName, sal_uInt16& rIndex ) const
{
ScDBData aDataObj( rName, 0,0,0,0,0 );
return Search( &aDataObj, rIndex );
@@ -761,7 +761,7 @@ BOOL ScDBCollection::SearchName( const String& rName, USHORT& rIndex ) const
void ScDBCollection::DeleteOnTab( SCTAB nTab )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < nCount )
{
// look for output positions on the deleted sheet
@@ -782,7 +782,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
SCCOL theCol1;
SCROW theRow1;
@@ -793,7 +793,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
((ScDBData*)pItems[i])->GetArea( theTab1, theCol1, theRow1, theCol2, theRow2 );
theTab2 = theTab1;
- BOOL bDoUpdate = ScRefUpdate::Update( pDoc, eUpdateRefMode,
+ sal_Bool bDoUpdate = ScRefUpdate::Update( pDoc, eUpdateRefMode,
nCol1,nRow1,nTab1, nCol2,nRow2,nTab2, nDx,nDy,nDz,
theCol1,theRow1,theTab1, theCol2,theRow2,theTab2 ) != UR_NOTHING;
if (bDoUpdate)
@@ -811,7 +811,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode,
aAdvSource.aEnd.Set( theCol2,theRow2,theTab2 );
((ScDBData*)pItems[i])->SetAdvancedQuerySource( &aAdvSource );
- bDoUpdate = TRUE; // DBData is modified
+ bDoUpdate = sal_True; // DBData is modified
}
}
@@ -826,7 +826,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
{
// wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScRange aRange;
ScDBData* pData = (ScDBData*)pItems[i];
@@ -848,7 +848,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
++nTab;
}
- BOOL bChanged = ( nTab != aRange.aStart.Tab() );
+ sal_Bool bChanged = ( nTab != aRange.aStart.Tab() );
if (bChanged)
pData->SetArea( nTab, aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(),aRange.aEnd .Row() );
@@ -860,9 +860,9 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
}
-ScDBData* ScDBCollection::FindIndex(USHORT nIndex)
+ScDBData* ScDBCollection::FindIndex(sal_uInt16 nIndex)
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (i < nCount)
{
if ((*this)[i]->GetIndex() == nIndex)
@@ -872,12 +872,12 @@ ScDBData* ScDBCollection::FindIndex(USHORT nIndex)
return NULL;
}
-BOOL ScDBCollection::Insert(ScDataObject* pScDataObject)
+sal_Bool ScDBCollection::Insert(ScDataObject* pScDataObject)
{
ScDBData* pData = (ScDBData*) pScDataObject;
if (!pData->GetIndex()) // schon gesetzt?
pData->SetIndex(nEntryIndex++);
- BOOL bInserted = ScSortedCollection::Insert(pScDataObject);
+ sal_Bool bInserted = ScSortedCollection::Insert(pScDataObject);
if ( bInserted && pData->HasImportParam() && !pData->HasImportSelection() )
{
pData->SetRefreshHandler( GetRefreshHandler() );
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 977161760eb0..ae4cd2b92d72 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -50,19 +50,19 @@ TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster);
#define DDE_TXT_ENCODING gsl_getSystemTextEncoding()
-BOOL ScDdeLink::bIsInUpdate = FALSE;
+sal_Bool ScDdeLink::bIsInUpdate = sal_False;
//------------------------------------------------------------------------
ScDdeLink::ScDdeLink( ScDocument* pD, const String& rA, const String& rT, const String& rI,
- BYTE nM ) :
+ sal_uInt8 nM ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING),
pDoc( pD ),
aAppl( rA ),
aTopic( rT ),
aItem( rI ),
nMode( nM ),
- bNeedUpdate( FALSE ),
+ bNeedUpdate( sal_False ),
pResult( NULL )
{
}
@@ -81,7 +81,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) :
aTopic ( rOther.aTopic ),
aItem ( rOther.aItem ),
nMode ( rOther.nMode ),
- bNeedUpdate( FALSE ),
+ bNeedUpdate( sal_False ),
pResult ( NULL )
{
if (rOther.pResult)
@@ -91,7 +91,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) :
ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING),
pDoc( pD ),
- bNeedUpdate( FALSE ),
+ bNeedUpdate( sal_False ),
pResult( NULL )
{
rHdr.StartEntry();
@@ -101,7 +101,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r
rStream.ReadByteString( aTopic, eCharSet );
rStream.ReadByteString( aItem, eCharSet );
- BOOL bHasValue;
+ sal_Bool bHasValue;
rStream >> bHasValue;
if ( bHasValue )
pResult = new ScMatrix( rStream );
@@ -123,7 +123,7 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const
rStream.WriteByteString( aTopic, eCharSet );
rStream.WriteByteString( aItem, eCharSet );
- BOOL bHasValue = ( pResult != NULL );
+ sal_Bool bHasValue = ( pResult != NULL );
rStream << bHasValue;
if (bHasValue)
pResult->Store( rStream );
@@ -180,7 +180,7 @@ void __EXPORT ScDdeLink::DataChanged( const String& rMimeType,
// SC_DDE_DEFAULT - Zahlformat aus Zellvorlage "Standard"
// SC_DDE_ENGLISH - Standard-Zahlformat fuer English/US
// SC_DDE_TEXT - ohne NumberFormatter direkt als String
- ULONG nStdFormat = 0;
+ sal_uLong nStdFormat = 0;
if ( nMode == SC_DDE_DEFAULT )
{
ScPatternAttr* pDefPattern = pDoc->GetDefPattern(); // enthaelt Standard-Vorlage
@@ -242,8 +242,8 @@ void ScDdeLink::ResetValue()
void __EXPORT ScDdeLink::ListenersGone()
{
- BOOL bWas = bIsInUpdate;
- bIsInUpdate = TRUE; // Remove() kann Reschedule ausloesen??!?
+ sal_Bool bWas = bIsInUpdate;
+ bIsInUpdate = sal_True; // Remove() kann Reschedule ausloesen??!?
ScDocument* pStackDoc = pDoc; // member pDoc can't be used after removing the link
@@ -263,16 +263,16 @@ void __EXPORT ScDdeLink::ListenersGone()
void ScDdeLink::TryUpdate()
{
if (bIsInUpdate)
- bNeedUpdate = TRUE; // kann jetzt nicht ausgefuehrt werden
+ bNeedUpdate = sal_True; // kann jetzt nicht ausgefuehrt werden
else
{
- bIsInUpdate = TRUE;
+ bIsInUpdate = sal_True;
//Application::Reschedule(); //! OS/2-Simulation
pDoc->IncInDdeLinkUpdate();
Update();
pDoc->DecInDdeLinkUpdate();
- bIsInUpdate = FALSE;
- bNeedUpdate = FALSE;
+ bIsInUpdate = sal_False;
+ bNeedUpdate = sal_False;
}
}
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index a1add9ca6939..cf6de00ec008 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -46,17 +46,17 @@ SV_IMPL_PTRARR( ScDetOpArr_Impl, ScDetOpDataPtr );
ScDetOpList::ScDetOpList(const ScDetOpList& rList) :
ScDetOpArr_Impl(),
- bHasAddError( FALSE )
+ bHasAddError( sal_False )
{
- USHORT nCount = rList.Count();
+ sal_uInt16 nCount = rList.Count();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
Append( new ScDetOpData(*rList[i]) );
}
void ScDetOpList::DeleteOnTab( SCTAB nTab )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < Count() )
{
// look for operations on the deleted sheet
@@ -71,8 +71,8 @@ void ScDetOpList::DeleteOnTab( SCTAB nTab )
void ScDetOpList::UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- USHORT nCount = Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScAddress aPos = (*this)[i]->GetPos();
SCCOL nCol1 = aPos.Col();
@@ -95,21 +95,21 @@ void ScDetOpList::UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMod
void ScDetOpList::Append( ScDetOpData* pDetOpData )
{
if ( pDetOpData->GetOperation() == SCDETOP_ADDERROR )
- bHasAddError = TRUE;
+ bHasAddError = sal_True;
Insert( pDetOpData, Count() );
}
-BOOL ScDetOpList::operator==( const ScDetOpList& r ) const
+sal_Bool ScDetOpList::operator==( const ScDetOpList& r ) const
{
// fuer Ref-Undo
- USHORT nCount = Count();
- BOOL bEqual = ( nCount == r.Count() );
- for (USHORT i=0; i<nCount && bEqual; i++) // Reihenfolge muss auch gleich sein
+ sal_uInt16 nCount = Count();
+ sal_Bool bEqual = ( nCount == r.Count() );
+ for (sal_uInt16 i=0; i<nCount && bEqual; i++) // Reihenfolge muss auch gleich sein
if ( !(*(*this)[i] == *r[i]) ) // Eintraege unterschiedlich ?
- bEqual = FALSE;
+ bEqual = sal_False;
return bEqual;
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index e86bb22646c8..fc420a83367c 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -103,7 +103,7 @@ private:
SfxItemSet aToTabSet;
SfxItemSet aFromTabSet;
SfxItemSet aCircleSet; //! einzeln ?
- USHORT nMaxLevel;
+ sal_uInt16 nMaxLevel;
public:
ScDetectiveData( SdrModel* pModel );
@@ -114,8 +114,8 @@ public:
SfxItemSet& GetFromTabSet() { return aFromTabSet; }
SfxItemSet& GetCircleSet() { return aCircleSet; }
- void SetMaxLevel( USHORT nVal ) { nMaxLevel = nVal; }
- USHORT GetMaxLevel() const { return nMaxLevel; }
+ void SetMaxLevel( sal_uInt16 nVal ) { nMaxLevel = nVal; }
+ sal_uInt16 GetMaxLevel() const { return nMaxLevel; }
};
class ScCommentData
@@ -135,11 +135,11 @@ private:
ColorData ScDetectiveFunc::nArrowColor = 0;
ColorData ScDetectiveFunc::nErrorColor = 0;
ColorData ScDetectiveFunc::nCommentColor = 0;
-BOOL ScDetectiveFunc::bColorsInitialized = FALSE;
+sal_Bool ScDetectiveFunc::bColorsInitialized = sal_False;
//------------------------------------------------------------------------
-BOOL lcl_HasThickLine( SdrObject& rObj )
+sal_Bool lcl_HasThickLine( SdrObject& rObj )
{
// thin lines get width 0 -> everything greater 0 is a thick line
@@ -183,28 +183,28 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
aArrowSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) );
aArrowSet.Put( XLineStartWidthItem( 200 ) );
- aArrowSet.Put( XLineStartCenterItem( TRUE ) );
+ aArrowSet.Put( XLineStartCenterItem( sal_True ) );
aArrowSet.Put( XLineEndItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
aArrowSet.Put( XLineEndWidthItem( 200 ) );
- aArrowSet.Put( XLineEndCenterItem( FALSE ) );
+ aArrowSet.Put( XLineEndCenterItem( sal_False ) );
aToTabSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) );
aToTabSet.Put( XLineStartWidthItem( 200 ) );
- aToTabSet.Put( XLineStartCenterItem( TRUE ) );
+ aToTabSet.Put( XLineStartCenterItem( sal_True ) );
aToTabSet.Put( XLineEndItem( aName, basegfx::B2DPolyPolygon(aSquare) ) );
aToTabSet.Put( XLineEndWidthItem( 300 ) );
- aToTabSet.Put( XLineEndCenterItem( FALSE ) );
+ aToTabSet.Put( XLineEndCenterItem( sal_False ) );
aFromTabSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aSquare) ) );
aFromTabSet.Put( XLineStartWidthItem( 300 ) );
- aFromTabSet.Put( XLineStartCenterItem( TRUE ) );
+ aFromTabSet.Put( XLineStartCenterItem( sal_True ) );
aFromTabSet.Put( XLineEndItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
aFromTabSet.Put( XLineEndWidthItem( 200 ) );
- aFromTabSet.Put( XLineEndCenterItem( FALSE ) );
+ aFromTabSet.Put( XLineEndCenterItem( sal_False ) );
aCircleSet.Put( XLineColorItem( String(), Color( ScDetectiveFunc::GetErrorColor() ) ) );
aCircleSet.Put( XFillStyleItem( XFILL_NONE ) );
- USHORT nWidth = 55; // 54 = 1 Pixel
+ sal_uInt16 nWidth = 55; // 54 = 1 Pixel
aCircleSet.Put( XLineWidthItem( nWidth ) );
}
@@ -221,16 +221,16 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
aCaptionSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
aCaptionSet.Put( XLineStartWidthItem( 200 ) );
- aCaptionSet.Put( XLineStartCenterItem( FALSE ) );
+ aCaptionSet.Put( XLineStartCenterItem( sal_False ) );
aCaptionSet.Put( XFillStyleItem( XFILL_SOLID ) );
Color aYellow( ScDetectiveFunc::GetCommentColor() );
aCaptionSet.Put( XFillColorItem( String(), aYellow ) );
// shadow
- // SdrShadowItem has FALSE, instead the shadow is set for the rectangle
+ // SdrShadowItem has sal_False, instead the shadow is set for the rectangle
// only with SetSpecialTextBoxShadow when the object is created
// (item must be set to adjust objects from older files)
- aCaptionSet.Put( SdrShadowItem( FALSE ) );
+ aCaptionSet.Put( SdrShadowItem( sal_False ) );
aCaptionSet.Put( SdrShadowXDistItem( 100 ) );
aCaptionSet.Put( SdrShadowYDistItem( 100 ) );
@@ -240,8 +240,8 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
aCaptionSet.Put( SdrTextUpperDistItem( 100 ) );
aCaptionSet.Put( SdrTextLowerDistItem( 100 ) );
- aCaptionSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aCaptionSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aCaptionSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aCaptionSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
// #78943# do use the default cell style, so the user has a chance to
// modify the font for the annotations
@@ -258,9 +258,9 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet )
SfxWhichIter aWhichIter( rItemSet );
const SfxPoolItem* pPoolItem = 0;
- for( USHORT nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() )
+ for( sal_uInt16 nWhich = aWhichIter.FirstWhich(); nWhich > 0; nWhich = aWhichIter.NextWhich() )
{
- if(rItemSet.GetItemState(nWhich, FALSE, &pPoolItem) == SFX_ITEM_SET)
+ if(rItemSet.GetItemState(nWhich, sal_False, &pPoolItem) == SFX_ITEM_SET)
{
switch(nWhich)
{
@@ -290,20 +290,20 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet )
void ScDetectiveFunc::Modified()
{
if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, FALSE);
+ pDoc->SetStreamValid(nTab, sal_False);
}
-inline BOOL Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1,
+inline sal_Bool Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1,
SCCOL nStartCol2, SCROW nStartRow2, SCCOL nEndCol2, SCROW nEndRow2 )
{
return nEndCol1 >= nStartCol2 && nEndCol2 >= nStartCol1 &&
nEndRow1 >= nStartRow2 && nEndRow2 >= nStartRow1;
}
-BOOL ScDetectiveFunc::HasError( const ScRange& rRange, ScAddress& rErrPos )
+sal_Bool ScDetectiveFunc::HasError( const ScRange& rRange, ScAddress& rErrPos )
{
rErrPos = rRange.aStart;
- USHORT nError = 0;
+ sal_uInt16 nError = 0;
ScCellIterator aCellIter( pDoc, rRange);
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -384,7 +384,7 @@ Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const
return GetDrawRect( nCol, nRow, nCol, nRow );
}
-BOOL lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
+sal_Bool lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
{
// test if rPolygon is the line end for "other table" (rectangle)
if(1L == rPolyPolygon.count())
@@ -402,16 +402,16 @@ BOOL lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon )
return false;
}
-BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
+sal_Bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab )
{
- BOOL bStartAlien = ( rStart.Tab() != nTab );
- BOOL bEndAlien = ( nEndTab != nTab );
+ sal_Bool bStartAlien = ( rStart.Tab() != nTab );
+ sal_Bool bEndAlien = ( nEndTab != nTab );
if (bStartAlien && bEndAlien)
{
DBG_ERROR("bStartAlien && bEndAlien");
- return TRUE;
+ return sal_True;
}
Rectangle aStartRect;
@@ -425,7 +425,7 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
while (pObject && !bFound)
@@ -435,18 +435,18 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
{
const SfxItemSet& rSet = pObject->GetMergedItemSet();
- BOOL bObjStartAlien =
+ sal_Bool bObjStartAlien =
lcl_IsOtherTab( ((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
- BOOL bObjEndAlien =
+ sal_Bool bObjEndAlien =
lcl_IsOtherTab( ((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
- BOOL bStartHit = bStartAlien ? bObjStartAlien :
+ sal_Bool bStartHit = bStartAlien ? bObjStartAlien :
( !bObjStartAlien && aStartRect.IsInside(pObject->GetPoint(0)) );
- BOOL bEndHit = bEndAlien ? bObjEndAlien :
+ sal_Bool bEndHit = bEndAlien ? bObjEndAlien :
( !bObjEndAlien && aEndRect.IsInside(pObject->GetPoint(1)) );
if ( bStartHit && bEndHit )
- bFound = TRUE;
+ bFound = sal_True;
}
pObject = aIter.Next();
}
@@ -454,38 +454,38 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart,
return bFound;
}
-BOOL ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static
+sal_Bool ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static
{
if ( pObject->GetLayer()==SC_LAYER_INTERN &&
pObject->IsPolyObj() && pObject->GetPointCount()==2 )
{
const SfxItemSet& rSet = pObject->GetMergedItemSet();
- BOOL bObjStartAlien =
+ sal_Bool bObjStartAlien =
lcl_IsOtherTab( ((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
- BOOL bObjEndAlien =
+ sal_Bool bObjEndAlien =
lcl_IsOtherTab( ((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
return !bObjStartAlien && !bObjEndAlien;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
// InsertXXX: called from DrawEntry/DrawAlienEntry and InsertObject
-BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
+sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
SCCOL nRefStartCol, SCROW nRefStartRow,
SCCOL nRefEndCol, SCROW nRefEndRow,
- BOOL bFromOtherTab, BOOL bRed,
+ sal_Bool bFromOtherTab, sal_Bool bRed,
ScDetectiveData& rData )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
- BOOL bArea = ( nRefStartCol != nRefEndCol || nRefStartRow != nRefEndRow );
+ sal_Bool bArea = ( nRefStartCol != nRefEndCol || nRefStartRow != nRefEndRow );
if (bArea && !bFromOtherTab)
{
// insert the rectangle before the arrow - this is relied on in FindFrameForObject
@@ -500,7 +500,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pPage->InsertObject( pBox );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, sal_True );
pData->maStart.Set( nRefStartCol, nRefStartRow, nTab);
pData->maEnd.Set( nRefEndCol, nRefEndRow, nTab);
}
@@ -510,7 +510,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
if (bFromOtherTab)
{
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
long nPageSign = bNegativePage ? -1 : 1;
aStartPos = Point( aEndPos.X() - 1000 * nPageSign, aEndPos.Y() - 1000 );
@@ -542,7 +542,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pPage->InsertObject( pArrow );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, sal_True );
if (bFromOtherTab)
pData->maStart.SetInvalid();
else
@@ -551,17 +551,17 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pData->maEnd.Set( nCol, nRow, nTab);
Modified();
- return TRUE;
+ return sal_True;
}
-BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, BOOL bRed,
+sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, sal_Bool bRed,
ScDetectiveData& rData )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
- BOOL bArea = ( nStartCol != nEndCol || nStartRow != nEndRow );
+ sal_Bool bArea = ( nStartCol != nEndCol || nStartRow != nEndRow );
if (bArea)
{
Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow );
@@ -574,12 +574,12 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pPage->InsertObject( pBox );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, sal_True );
pData->maStart.Set( nStartCol, nStartRow, nTab);
pData->maEnd.Set( nEndCol, nEndRow, nTab);
}
- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+ sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
long nPageSign = bNegativePage ? -1 : 1;
Point aStartPos = GetDrawPos( nStartCol, nStartRow, DRAWPOS_DETARROW );
@@ -609,12 +609,12 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pPage->InsertObject( pArrow );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, sal_True );
pData->maStart.Set( nStartCol, nStartRow, nTab);
pData->maEnd.SetInvalid();
Modified();
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -626,16 +626,16 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
// return FALSE: da war schon ein Pfeil
-BOOL ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
+sal_Bool ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
const ScRange& rRef,
ScDetectiveData& rData )
{
if ( HasArrow( rRef.aStart, nCol, nRow, nTab ) )
- return FALSE;
+ return sal_False;
ScAddress aErrorPos;
- BOOL bError = HasError( rRef, aErrorPos );
- BOOL bAlien = ( rRef.aEnd.Tab() < nTab || rRef.aStart.Tab() > nTab );
+ sal_Bool bError = HasError( rRef, aErrorPos );
+ sal_Bool bAlien = ( rRef.aEnd.Tab() < nTab || rRef.aStart.Tab() > nTab );
return InsertArrow( nCol, nRow,
rRef.aStart.Col(), rRef.aStart.Row(),
@@ -643,14 +643,14 @@ BOOL ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow,
bAlien, bError, rData );
}
-BOOL ScDetectiveFunc::DrawAlienEntry( const ScRange& rRef,
+sal_Bool ScDetectiveFunc::DrawAlienEntry( const ScRange& rRef,
ScDetectiveData& rData )
{
if ( HasArrow( rRef.aStart, 0, 0, nTab+1 ) )
- return FALSE;
+ return sal_False;
ScAddress aErrorPos;
- BOOL bError = HasError( rRef, aErrorPos );
+ sal_Bool bError = HasError( rRef, aErrorPos );
return InsertToOtherTab( rRef.aStart.Col(), rRef.aStart.Row(),
rRef.aEnd.Col(), rRef.aEnd.Row(),
@@ -678,14 +678,14 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData
pPage->InsertObject( pCircle );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pCircle ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pCircle, TRUE );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pCircle, sal_True );
pData->maStart.Set( nCol, nRow, nTab);
pData->maEnd.SetInvalid();
Modified();
}
-void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt )
+void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, sal_Bool bDestPnt )
{
Rectangle aRect = GetDrawRect( nCol, nRow );
@@ -696,7 +696,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt )
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
SdrObject** ppObj = new SdrObject*[nObjCount];
@@ -732,7 +732,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt )
#define SC_DET_TOLERANCE 50
-inline BOOL RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
+inline sal_Bool RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
return rRect.Left() >= rStart.X() - SC_DET_TOLERANCE
&& rRect.Left() <= rStart.X() + SC_DET_TOLERANCE
@@ -771,7 +771,7 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
SdrObject** ppObj = new SdrObject*[nObjCount];
@@ -807,10 +807,10 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
//------------------------------------------------------------------------
-USHORT ScDetectiveFunc::InsertPredLevelArea( const ScRange& rRef,
- ScDetectiveData& rData, USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertPredLevelArea( const ScRange& rRef,
+ ScDetectiveData& rData, sal_uInt16 nLevel )
{
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScCellIterator aCellIter( pDoc, rRef);
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -838,8 +838,8 @@ USHORT ScDetectiveFunc::InsertPredLevelArea( const ScRange& rRef,
return nResult;
}
-USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
- USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
+ sal_uInt16 nLevel )
{
ScBaseCell* pCell;
pDoc->GetCell( nCol, nRow, nTab, pCell );
@@ -854,9 +854,9 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
@@ -872,8 +872,8 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData
if ( nLevel < rData.GetMaxLevel() )
{
- USHORT nSubResult;
- BOOL bArea = (aRef.aStart != aRef.aEnd);
+ sal_uInt16 nSubResult;
+ sal_Bool bArea = (aRef.aStart != aRef.aEnd);
if (bArea)
nSubResult = InsertPredLevelArea( aRef, rData, nLevel+1 );
else
@@ -902,15 +902,15 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData
}
}
- pFCell->SetRunning(FALSE);
+ pFCell->SetRunning(sal_False);
return nResult;
}
-USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
- USHORT nLevel, USHORT nDeleteLevel )
+sal_uInt16 ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
+ sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
{
- USHORT nResult = nLevel;
+ sal_uInt16 nResult = nLevel;
ScCellIterator aCellIter( pDoc, rRef);
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -918,7 +918,7 @@ USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
{
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- USHORT nTemp = FindPredLevel( aCellIter.GetCol(), aCellIter.GetRow(), nLevel, nDeleteLevel );
+ sal_uInt16 nTemp = FindPredLevel( aCellIter.GetCol(), aCellIter.GetRow(), nLevel, nDeleteLevel );
if (nTemp > nResult)
nResult = nTemp;
}
@@ -930,7 +930,7 @@ USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef,
// nDeleteLevel != 0 -> loeschen
-USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, USHORT nDeleteLevel )
+sal_uInt16 ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
{
DBG_ASSERT( nLevel<1000, "Level" );
@@ -947,21 +947,21 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
- USHORT nResult = nLevel;
- BOOL bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
+ sal_uInt16 nResult = nLevel;
+ sal_Bool bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
if ( bDelete )
{
- DeleteArrowsAt( nCol, nRow, TRUE ); // Pfeile, die hierher zeigen
+ DeleteArrowsAt( nCol, nRow, sal_True ); // Pfeile, die hierher zeigen
}
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
while ( aIter.GetNextRef( aRef) )
{
- BOOL bArea = ( aRef.aStart != aRef.aEnd );
+ sal_Bool bArea = ( aRef.aStart != aRef.aEnd );
if ( bDelete ) // Rahmen loeschen ?
{
@@ -974,7 +974,7 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US
{
if ( HasArrow( aRef.aStart, nCol,nRow,nTab ) )
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
if (bArea)
nTemp = FindPredLevelArea( aRef, nLevel+1, nDeleteLevel );
else
@@ -986,15 +986,15 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US
}
}
- pFCell->SetRunning(FALSE);
+ pFCell->SetRunning(sal_False);
return nResult;
}
//------------------------------------------------------------------------
-USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
- USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveData& rData,
+ sal_uInt16 nLevel )
{
ScBaseCell* pCell;
pDoc->GetCell( nCol, nRow, nTab, pCell );
@@ -1009,19 +1009,19 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
ScAddress aErrorPos;
- BOOL bHasError = FALSE;
+ sal_Bool bHasError = sal_False;
while ( aIter.GetNextRef( aRef ) )
{
if (HasError( aRef, aErrorPos ))
{
- bHasError = TRUE;
+ bHasError = sal_True;
if (DrawEntry( nCol, nRow, ScRange( aErrorPos), rData ))
nResult = DET_INS_INSERTED;
@@ -1036,7 +1036,7 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat
}
}
- pFCell->SetRunning(FALSE);
+ pFCell->SetRunning(sal_False);
// Blaetter ?
if (!bHasError)
@@ -1048,12 +1048,12 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat
//------------------------------------------------------------------------
-USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- ScDetectiveData& rData, USHORT nLevel )
+sal_uInt16 ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ ScDetectiveData& rData, sal_uInt16 nLevel )
{
// ueber ganzes Dokument
- USHORT nResult = DET_INS_EMPTY;
+ sal_uInt16 nResult = DET_INS_EMPTY;
// ScCellIterator aCellIter( pDoc, 0,0, nTab, MAXCOL,MAXROW, nTab );
ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // alle Tabellen
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -1062,11 +1062,11 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
- BOOL bRunning = pFCell->IsRunning();
+ sal_Bool bRunning = pFCell->IsRunning();
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
@@ -1078,8 +1078,8 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
aRef.aStart.Col(),aRef.aStart.Row(),
aRef.aEnd.Col(),aRef.aEnd.Row() ))
{
- BOOL bAlien = ( aCellIter.GetTab() != nTab );
- BOOL bDrawRet;
+ sal_Bool bAlien = ( aCellIter.GetTab() != nTab );
+ sal_Bool bDrawRet;
if (bAlien)
bDrawRet = DrawAlienEntry( aRef, rData );
else
@@ -1102,7 +1102,7 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
if ( nLevel < rData.GetMaxLevel() )
{
- USHORT nSubResult = InsertSuccLevel(
+ sal_uInt16 nSubResult = InsertSuccLevel(
aCellIter.GetCol(), aCellIter.GetRow(),
aCellIter.GetCol(), aCellIter.GetRow(),
rData, nLevel+1 );
@@ -1138,13 +1138,13 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
return nResult;
}
-USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- USHORT nLevel, USHORT nDeleteLevel )
+sal_uInt16 ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ sal_uInt16 nLevel, sal_uInt16 nDeleteLevel )
{
DBG_ASSERT( nLevel<1000, "Level" );
- USHORT nResult = nLevel;
- BOOL bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
+ sal_uInt16 nResult = nLevel;
+ sal_Bool bDelete = ( nDeleteLevel && nLevel == nDeleteLevel-1 );
ScCellIterator aCellIter( pDoc, 0,0, nTab, MAXCOL,MAXROW, nTab );
ScBaseCell* pCell = aCellIter.GetFirst();
@@ -1153,11 +1153,11 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
- BOOL bRunning = pFCell->IsRunning();
+ sal_Bool bRunning = pFCell->IsRunning();
if (pFCell->GetDirty())
pFCell->Interpret(); // nach SetRunning geht's nicht mehr!
- pFCell->SetRunning(TRUE);
+ pFCell->SetRunning(sal_True);
ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
ScRange aRef;
@@ -1176,13 +1176,13 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC
DeleteBox( aRef.aStart.Col(), aRef.aStart.Row(),
aRef.aEnd.Col(), aRef.aEnd.Row() );
}
- DeleteArrowsAt( aRef.aStart.Col(), aRef.aStart.Row(), FALSE );
+ DeleteArrowsAt( aRef.aStart.Col(), aRef.aStart.Row(), sal_False );
}
else if ( !bRunning &&
HasArrow( aRef.aStart,
aCellIter.GetCol(),aCellIter.GetRow(),aCellIter.GetTab() ) )
{
- USHORT nTemp = FindSuccLevel( aCellIter.GetCol(), aCellIter.GetRow(),
+ sal_uInt16 nTemp = FindSuccLevel( aCellIter.GetCol(), aCellIter.GetRow(),
aCellIter.GetCol(), aCellIter.GetRow(),
nLevel+1, nDeleteLevel );
if (nTemp > nResult)
@@ -1205,16 +1205,16 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC
// --------------------------------------------------------------------------------
//
-BOOL ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
ScDetectiveData aData( pModel );
- USHORT nMaxLevel = 0;
- USHORT nResult = DET_INS_CONTINUE;
+ sal_uInt16 nMaxLevel = 0;
+ sal_uInt16 nResult = DET_INS_CONTINUE;
while (nResult == DET_INS_CONTINUE && nMaxLevel < 1000)
{
aData.SetMaxLevel( nMaxLevel );
@@ -1225,16 +1225,16 @@ BOOL ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow )
return ( nResult == DET_INS_INSERTED );
}
-BOOL ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
ScDetectiveData aData( pModel );
- USHORT nMaxLevel = 0;
- USHORT nResult = DET_INS_CONTINUE;
+ sal_uInt16 nMaxLevel = 0;
+ sal_uInt16 nResult = DET_INS_CONTINUE;
while (nResult == DET_INS_CONTINUE && nMaxLevel < 1000)
{
aData.SetMaxLevel( nMaxLevel );
@@ -1245,56 +1245,56 @@ BOOL ScDetectiveFunc::ShowSucc( SCCOL nCol, SCROW nRow )
return ( nResult == DET_INS_INSERTED );
}
-BOOL ScDetectiveFunc::ShowError( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::ShowError( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
ScRange aRange( nCol, nRow, nTab );
ScAddress aErrPos;
if ( !HasError( aRange,aErrPos ) )
- return FALSE;
+ return sal_False;
ScDetectiveData aData( pModel );
aData.SetMaxLevel( 1000 );
- USHORT nResult = InsertErrorLevel( nCol, nRow, aData, 0 );
+ sal_uInt16 nResult = InsertErrorLevel( nCol, nRow, aData, 0 );
return ( nResult == DET_INS_INSERTED );
}
-BOOL ScDetectiveFunc::DeleteSucc( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::DeleteSucc( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
- USHORT nLevelCount = FindSuccLevel( nCol, nRow, nCol, nRow, 0, 0 );
+ sal_uInt16 nLevelCount = FindSuccLevel( nCol, nRow, nCol, nRow, 0, 0 );
if ( nLevelCount )
FindSuccLevel( nCol, nRow, nCol, nRow, 0, nLevelCount ); // loeschen
return ( nLevelCount != 0 );
}
-BOOL ScDetectiveFunc::DeletePred( SCCOL nCol, SCROW nRow )
+sal_Bool ScDetectiveFunc::DeletePred( SCCOL nCol, SCROW nRow )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
- USHORT nLevelCount = FindPredLevel( nCol, nRow, 0, 0 );
+ sal_uInt16 nLevelCount = FindPredLevel( nCol, nRow, 0, 0 );
if ( nLevelCount )
FindPredLevel( nCol, nRow, 0, nLevelCount ); // loeschen
return ( nLevelCount != 0 );
}
-BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
+sal_Bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
@@ -1302,7 +1302,7 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
pPage->RecalcObjOrdNums();
long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
if (nObjCount)
{
SdrObject** ppObj = new SdrObject*[nObjCount];
@@ -1313,11 +1313,11 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
{
if ( pObject->GetLayer() == SC_LAYER_INTERN )
{
- BOOL bDoThis = TRUE;
+ sal_Bool bDoThis = sal_True;
if ( eWhat != SC_DET_ALL )
{
- BOOL bCircle = ( pObject->ISA(SdrCircObj) );
- BOOL bCaption = ScDrawLayer::IsNoteCaption( pObject );
+ sal_Bool bCircle = ( pObject->ISA(SdrCircObj) );
+ sal_Bool bCaption = ScDrawLayer::IsNoteCaption( pObject );
if ( eWhat == SC_DET_DETECTIVE ) // Detektiv, aus Menue
bDoThis = !bCaption; // auch Kreise
else if ( eWhat == SC_DET_CIRCLES ) // Kreise, wenn neue erzeugt werden
@@ -1351,14 +1351,14 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
return ( nDelCount != 0 );
}
-BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
+sal_Bool ScDetectiveFunc::MarkInvalid(sal_Bool& rOverflow)
{
- rOverflow = FALSE;
+ rOverflow = sal_False;
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel)
- return FALSE;
+ return sal_False;
- BOOL bDeleted = DeleteAll( SC_DET_CIRCLES ); // nur die Kreise
+ sal_Bool bDeleted = DeleteAll( SC_DET_CIRCLES ); // nur die Kreise
ScDetectiveData aData( pModel );
long nInsCount = 0;
@@ -1372,7 +1372,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
const ScPatternAttr* pPattern = aAttrIter.GetNext( nCol, nRow1, nRow2 );
while ( pPattern && nInsCount < SC_DET_MAXCIRCLE )
{
- ULONG nIndex = ((const SfxUInt32Item&)pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
+ sal_uLong nIndex = ((const SfxUInt32Item&)pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
if (nIndex)
{
const ScValidationData* pData = pDoc->GetValidationEntry( nIndex );
@@ -1380,7 +1380,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
{
// Zellen in dem Bereich durchgehen
- BOOL bMarkEmpty = !pData->IsIgnoreBlank();
+ sal_Bool bMarkEmpty = !pData->IsIgnoreBlank();
SCROW nNextRow = nRow1;
SCROW nRow;
ScCellIterator aCellIter( pDoc, nCol,nRow1,nTab, nCol,nRow2,nTab );
@@ -1415,7 +1415,7 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
}
if ( nInsCount >= SC_DET_MAXCIRCLE )
- rOverflow = TRUE;
+ rOverflow = sal_True;
return ( bDeleted || nInsCount != 0 );
}
@@ -1484,12 +1484,12 @@ void ScDetectiveFunc::UpdateAllArrowColors()
{
if ( pObject->GetLayer() == SC_LAYER_INTERN )
{
- BOOL bArrow = FALSE;
- BOOL bError = FALSE;
+ sal_Bool bArrow = sal_False;
+ sal_Bool bError = sal_False;
ScAddress aPos;
ScRange aSource;
- BOOL bDummy;
+ sal_Bool bDummy;
ScDetectiveObjType eType = GetDetectiveObjectType( pObject, nObjTab, aPos, aSource, bDummy );
if ( eType == SC_DETOBJ_ARROW || eType == SC_DETOBJ_TOOTHERTAB )
{
@@ -1497,9 +1497,9 @@ void ScDetectiveFunc::UpdateAllArrowColors()
ScAddress aErrPos;
if ( HasError( aSource, aErrPos ) )
- bError = TRUE;
+ bError = sal_True;
else
- bArrow = TRUE;
+ bArrow = sal_True;
}
else if ( eType == SC_DETOBJ_FROMOTHERTAB )
{
@@ -1509,15 +1509,15 @@ void ScDetectiveFunc::UpdateAllArrowColors()
ScAddress aErrPos;
if ( HasError( ScRange( aPos), aErrPos ) )
- bError = TRUE;
+ bError = sal_True;
else
- bArrow = TRUE;
+ bArrow = sal_True;
}
else if ( eType == SC_DETOBJ_CIRCLE )
{
// circles (error marks) are always red
- bError = TRUE;
+ bError = sal_True;
}
else if ( eType == SC_DETOBJ_NONE )
{
@@ -1525,7 +1525,7 @@ void ScDetectiveFunc::UpdateAllArrowColors()
if ( pObject->ISA( SdrRectObj ) && !pObject->ISA( SdrCaptionObj ) )
{
- bArrow = TRUE;
+ bArrow = sal_True;
}
}
@@ -1545,17 +1545,17 @@ void ScDetectiveFunc::UpdateAllArrowColors()
}
}
-BOOL ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
+sal_Bool ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
{
// find the rectangle for an arrow (always the object directly before the arrow)
// rRange must be initialized to the source cell of the arrow (start of area)
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- if (!pModel) return FALSE;
+ if (!pModel) return sal_False;
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
DBG_ASSERT(pPage,"Page ?");
- if (!pPage) return FALSE;
+ if (!pPage) return sal_False;
// test if the object is a direct page member
if( pObject && pObject->GetPage() && (pObject->GetPage() == pObject->GetObjList()) )
@@ -1573,18 +1573,18 @@ BOOL ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
if ( pPrevData && pPrevData->maStart.IsValid() && pPrevData->maEnd.IsValid() && (pPrevData->maStart == rRange.aStart) )
{
rRange.aEnd = pPrevData->maEnd;
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject, SCTAB nObjTab,
- ScAddress& rPosition, ScRange& rSource, BOOL& rRedLine )
+ ScAddress& rPosition, ScRange& rSource, sal_Bool& rRedLine )
{
- rRedLine = FALSE;
+ rRedLine = sal_False;
ScDetectiveObjType eType = SC_DETOBJ_NONE;
if ( pObject && pObject->GetLayer() == SC_LAYER_INTERN )
@@ -1617,7 +1617,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
ColorData nObjColor = ((const XLineColorItem&)pObject->GetMergedItem(XATTR_LINECOLOR)).GetColorValue().GetColor();
if ( nObjColor == GetErrorColor() && nObjColor != GetArrowColor() )
- rRedLine = TRUE;
+ rRedLine = sal_True;
}
else if ( pObject->ISA(SdrCircObj) )
{
@@ -1637,7 +1637,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
void ScDetectiveFunc::InsertObject( ScDetectiveObjType eType,
const ScAddress& rPosition, const ScRange& rSource,
- BOOL bRedLine )
+ sal_Bool bRedLine )
{
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (!pModel) return;
@@ -1701,11 +1701,11 @@ void ScDetectiveFunc::InitializeColors()
nErrorColor = rColorCfg.GetColorValue(svtools::CALCDETECTIVEERROR).nColor;
nCommentColor = rColorCfg.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor;
- bColorsInitialized = TRUE;
+ bColorsInitialized = sal_True;
}
// static
-BOOL ScDetectiveFunc::IsColorsInitialized()
+sal_Bool ScDetectiveFunc::IsColorsInitialized()
{
return bColorsInitialized;
}
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 95ce357b3217..1591779909e2 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -49,7 +49,7 @@ using namespace com::sun::star::uno;
//------------------------------------------------------------------------
-#define SC_VERSION ((USHORT)251)
+#define SC_VERSION ((sal_uInt16)251)
TYPEINIT1(ScTpCalcItem, SfxPoolItem);
@@ -63,7 +63,7 @@ inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) *
//------------------------------------------------------------------------
-USHORT lcl_GetDefaultTabDist()
+sal_uInt16 lcl_GetDefaultTabDist()
{
if ( ScOptionsUtil::IsMetricSystem() )
return 709; // 1,25 cm
@@ -111,8 +111,8 @@ ScDocOptions::~ScDocOptions()
void ScDocOptions::ResetDocOptions()
{
- bIsIgnoreCase = FALSE;
- bIsIter = FALSE;
+ bIsIgnoreCase = sal_False;
+ bIsIter = sal_False;
nIterCount = 100;
fIterEps = 1.0E-3;
nPrecStandardFormat = SvNumberFormatter::UNLIMITED_PRECISION;
@@ -121,24 +121,24 @@ void ScDocOptions::ResetDocOptions()
nYear = 1899;
nYear2000 = SvNumberFormatter::GetYear2000Default();
nTabDistance = lcl_GetDefaultTabDist();
- bCalcAsShown = FALSE;
- bMatchWholeCell = TRUE;
- bDoAutoSpell = FALSE;
- bLookUpColRowNames = TRUE;
- bFormulaRegexEnabled= TRUE;
+ bCalcAsShown = sal_False;
+ bMatchWholeCell = sal_True;
+ bDoAutoSpell = sal_False;
+ bLookUpColRowNames = sal_True;
+ bFormulaRegexEnabled= sal_True;
}
//========================================================================
// ScTpCalcItem - Daten fuer die CalcOptions-TabPage
//========================================================================
-//UNUSED2008-05 ScTpCalcItem::ScTpCalcItem( USHORT nWhichP ) : SfxPoolItem( nWhichP )
+//UNUSED2008-05 ScTpCalcItem::ScTpCalcItem( sal_uInt16 nWhichP ) : SfxPoolItem( nWhichP )
//UNUSED2008-05 {
//UNUSED2008-05 }
//------------------------------------------------------------------------
-ScTpCalcItem::ScTpCalcItem( USHORT nWhichP, const ScDocOptions& rOpt )
+ScTpCalcItem::ScTpCalcItem( sal_uInt16 nWhichP, const ScDocOptions& rOpt )
: SfxPoolItem ( nWhichP ),
theOptions ( rOpt )
{
@@ -263,7 +263,7 @@ ScDocCfg::ScDocCfg() :
Sequence<Any> aValues;
const Any* pValues = NULL;
- USHORT nDateDay, nDateMonth, nDateYear;
+ sal_uInt16 nDateDay, nDateMonth, nDateYear;
GetDate( nDateDay, nDateMonth, nDateYear );
aNames = GetCalcPropertyNames();
@@ -284,22 +284,22 @@ ScDocCfg::ScDocCfg() :
SetIter( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
break;
case SCCALCOPT_ITER_STEPS:
- if (pValues[nProp] >>= nIntVal) SetIterCount( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetIterCount( (sal_uInt16) nIntVal );
break;
case SCCALCOPT_ITER_MINCHG:
if (pValues[nProp] >>= fDoubleVal) SetIterEps( fDoubleVal );
break;
case SCCALCOPT_DATE_DAY:
- if (pValues[nProp] >>= nIntVal) nDateDay = (USHORT) nIntVal;
+ if (pValues[nProp] >>= nIntVal) nDateDay = (sal_uInt16) nIntVal;
break;
case SCCALCOPT_DATE_MONTH:
- if (pValues[nProp] >>= nIntVal) nDateMonth = (USHORT) nIntVal;
+ if (pValues[nProp] >>= nIntVal) nDateMonth = (sal_uInt16) nIntVal;
break;
case SCCALCOPT_DATE_YEAR:
- if (pValues[nProp] >>= nIntVal) nDateYear = (USHORT) nIntVal;
+ if (pValues[nProp] >>= nIntVal) nDateYear = (sal_uInt16) nIntVal;
break;
case SCCALCOPT_DECIMALS:
- if (pValues[nProp] >>= nIntVal) SetStdPrecision( (USHORT) nIntVal );
+ if (pValues[nProp] >>= nIntVal) SetStdPrecision( (sal_uInt16) nIntVal );
break;
case SCCALCOPT_CASESENSITIVE:
// content is reversed
@@ -342,7 +342,7 @@ ScDocCfg::ScDocCfg() :
case SCDOCLAYOUTOPT_TABSTOP:
// TabDistance in ScDocOptions is in twips
if (pValues[nProp] >>= nIntVal)
- SetTabDistance( (USHORT) HMMToTwips( nIntVal ) );
+ SetTabDistance( (sal_uInt16) HMMToTwips( nIntVal ) );
break;
}
}
@@ -357,7 +357,7 @@ IMPL_LINK( ScDocCfg, CalcCommitHdl, void *, EMPTYARG )
Sequence<Any> aValues(aNames.getLength());
Any* pValues = aValues.getArray();
- USHORT nDateDay, nDateMonth, nDateYear;
+ sal_uInt16 nDateDay, nDateMonth, nDateYear;
GetDate( nDateDay, nDateMonth, nDateYear );
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 740413ea8533..7af5a17125ee 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -68,8 +68,8 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if (pQueryRef->getColSize() < 4)
return false;
- BOOL bValid;
- BOOL bFound;
+ sal_Bool bValid;
+ sal_Bool bFound;
OUString aCellStr;
SCSIZE nIndex = 0;
SCROW nRow = 0;
@@ -81,7 +81,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
{
ScQueryEntry& rEntry = pParam->GetEntry(nIndex);
- bValid = FALSE;
+ bValid = sal_False;
if (nIndex > 0)
{
@@ -91,19 +91,19 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_UND)) )
{
rEntry.eConnect = SC_AND;
- bValid = TRUE;
+ bValid = sal_True;
}
else if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_ODER)) )
{
rEntry.eConnect = SC_OR;
- bValid = TRUE;
+ bValid = sal_True;
}
}
if ((nIndex < 1) || bValid)
{
// field name in the 2nd column.
- bFound = FALSE;
+ bFound = sal_False;
aCellStr = pQueryRef->getString(1, nRow);
SCCOL nField = pDBRef->findFieldColumn(aCellStr); // TODO: must be case insensitive comparison.
if (ValidCol(nField))
@@ -118,7 +118,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if (bValid)
{
// equality, non-equality operator in the 3rd column.
- bFound = FALSE;
+ bFound = sal_False;
aCellStr = pQueryRef->getString(2, nRow);
lcl_toUpper(aCellStr);
const sal_Unicode* p = aCellStr.getStr();
@@ -147,7 +147,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
{
// Finally, the right-hand-side value in the 4th column.
*rEntry.pStr = pQueryRef->getString(3, nRow);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
}
nIndex++;
nRow++;
@@ -177,7 +177,7 @@ bool lcl_createExcelQuery(
if (bValid)
{
-// ULONG nVisible = 0;
+// sal_uLong nVisible = 0;
// for ( nCol=nCol1; nCol<=nCol2; nCol++ )
// nVisible += aCol[nCol].VisibleCount( nRow1+1, nRow2 );
@@ -214,7 +214,7 @@ bool lcl_createExcelQuery(
pParam->GetEntry(nIndex).eConnect = SC_AND;
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
nCol++;
}
@@ -380,7 +380,7 @@ sal_uInt16 ScDBInternalRange::getCellString(OUString& rStr, ScBaseCell* pCell) c
if (pFCell->IsValue())
{
double fVal = pFCell->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -392,7 +392,7 @@ sal_uInt16 ScDBInternalRange::getCellString(OUString& rStr, ScBaseCell* pCell) c
case CELLTYPE_VALUE:
{
double fVal = ((ScValueCell*) pCell)->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aStr);
@@ -419,9 +419,9 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr)
SCCOL nDBCol2 = e.Col();
SCCOL nField = nDBCol1;
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
- bFound = FALSE;
+ bFound = sal_False;
OUString aCellStr;
ScAddress aLook( nDBCol1, nDBRow1, nDBTab1 );
while (!bFound && (aLook.Col() <= nDBCol2))
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 483f0cea6b57..13ea3a9437b3 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -84,8 +84,8 @@ String ScEditUtil::ModifyDelimiters( const String& rOld )
static String lcl_GetDelimitedString( const EditEngine& rEngine, const sal_Char c )
{
String aRet;
- USHORT nParCount = rEngine.GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ sal_uInt16 nParCount = rEngine.GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
if (nPar > 0)
aRet += c;
@@ -106,17 +106,17 @@ String ScEditUtil::GetMultilineString( const EditEngine& rEngine )
//------------------------------------------------------------------------
-Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToTop )
+Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, sal_Bool bForceToTop )
{
// bForceToTop = always align to top, for editing
- // (FALSE for querying URLs etc.)
+ // (sal_False for querying URLs etc.)
if (!pPattern)
pPattern = pDoc->GetPattern( nCol, nRow, nTab );
Point aStartPos = aScrPos;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
const ScMergeAttr* pMerge = (const ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
@@ -135,7 +135,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
}
const SvxMarginItem* pMargin = (const SvxMarginItem*)&pPattern->GetItem(ATTR_MARGIN);
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
if ( ((const SvxHorJustifyItem&)pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue() ==
SVX_HOR_JUSTIFY_LEFT )
nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue();
@@ -151,7 +151,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
GetItem(ATTR_VER_JUSTIFY)).GetValue();
// asian vertical is always edited top-aligned
- BOOL bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() &&
+ sal_Bool bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() &&
((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( eJust == SVX_VER_JUSTIFY_TOP ||
@@ -163,7 +163,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
pDev->SetMapMode( MAP_PIXEL );
long nTextHeight = pDoc->GetNeededSize( nCol, nRow, nTab,
- pDev, nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ pDev, nPPTX, nPPTY, aZoomX, aZoomY, sal_False );
if (!nTextHeight)
{ // leere Zelle
Font aFont;
@@ -202,12 +202,12 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT
ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
pEngine( pEng ),
pEditAttrs( NULL ),
- bNeedsObject( FALSE ),
- bNeedsCellAttr( FALSE )
+ bNeedsObject( sal_False ),
+ bNeedsCellAttr( sal_False )
{
if ( pEngine->GetParagraphCount() > 1 )
{
- bNeedsObject = TRUE; //! Zellatribute finden ?
+ bNeedsObject = sal_True; //! Zellatribute finden ?
}
else
{
@@ -216,11 +216,11 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
ESelection(0,0,0,pEngine->GetTextLen(0)), EditEngineAttribs_OnlyHard ) );
const SfxItemSet& rEditDefaults = pEngine->GetDefaults();
- for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++)
+ for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++)
{
- SfxItemState eState = pEditAttrs->GetItemState( nId, FALSE, &pItem );
+ SfxItemState eState = pEditAttrs->GetItemState( nId, sal_False, &pItem );
if (eState == SFX_ITEM_DONTCARE)
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
else if (eState == SFX_ITEM_SET)
{
if ( nId == EE_CHAR_ESCAPEMENT || nId == EE_CHAR_PAIRKERNING ||
@@ -232,27 +232,27 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
// from "user attributes applied to the cell".
if ( *pItem != rEditDefaults.Get(nId) )
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
}
else
if (!bNeedsCellAttr)
if ( *pItem != rEditDefaults.Get(nId) )
- bNeedsCellAttr = TRUE;
+ bNeedsCellAttr = sal_True;
// rEditDefaults contains the defaults from the cell format
}
}
// Feldbefehle enthalten?
- SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, FALSE );
+ SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, sal_False );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
// not converted characters?
- SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, FALSE );
+ SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, sal_False );
if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET )
- bNeedsObject = TRUE;
+ bNeedsObject = sal_True;
}
}
@@ -265,12 +265,12 @@ ScEditAttrTester::~ScEditAttrTester()
//------------------------------------------------------------------------
ScEnginePoolHelper::ScEnginePoolHelper( SfxItemPool* pEnginePoolP,
- BOOL bDeleteEnginePoolP )
+ sal_Bool bDeleteEnginePoolP )
:
pEnginePool( pEnginePoolP ),
pDefaults( NULL ),
bDeleteEnginePool( bDeleteEnginePoolP ),
- bDeleteDefaults( FALSE )
+ bDeleteDefaults( sal_False )
{
}
@@ -280,7 +280,7 @@ ScEnginePoolHelper::ScEnginePoolHelper( const ScEnginePoolHelper& rOrg )
pEnginePool( rOrg.bDeleteEnginePool ? rOrg.pEnginePool->Clone() : rOrg.pEnginePool ),
pDefaults( NULL ),
bDeleteEnginePool( rOrg.bDeleteEnginePool ),
- bDeleteDefaults( FALSE )
+ bDeleteDefaults( sal_False )
{
}
@@ -297,7 +297,7 @@ ScEnginePoolHelper::~ScEnginePoolHelper()
//------------------------------------------------------------------------
ScEditEngineDefaulter::ScEditEngineDefaulter( SfxItemPool* pEnginePoolP,
- BOOL bDeleteEnginePoolP )
+ sal_Bool bDeleteEnginePoolP )
:
ScEnginePoolHelper( pEnginePoolP, bDeleteEnginePoolP ),
EditEngine( pEnginePoolP )
@@ -323,41 +323,41 @@ ScEditEngineDefaulter::~ScEditEngineDefaulter()
}
-void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, BOOL bRememberCopy )
+void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, sal_Bool bRememberCopy )
{
if ( bRememberCopy )
{
if ( bDeleteDefaults )
delete pDefaults;
pDefaults = new SfxItemSet( rSet );
- bDeleteDefaults = TRUE;
+ bDeleteDefaults = sal_True;
}
const SfxItemSet& rNewSet = bRememberCopy ? *pDefaults : rSet;
- BOOL bUndo = IsUndoEnabled();
- EnableUndo( FALSE );
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUndo = IsUndoEnabled();
+ EnableUndo( sal_False );
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
- USHORT nPara = GetParagraphCount();
- for ( USHORT j=0; j<nPara; j++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nPara = GetParagraphCount();
+ for ( sal_uInt16 j=0; j<nPara; j++ )
{
SetParaAttribs( j, rNewSet );
}
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
if ( bUndo )
- EnableUndo( TRUE );
+ EnableUndo( sal_True );
}
-void ScEditEngineDefaulter::SetDefaults( SfxItemSet* pSet, BOOL bTakeOwnership )
+void ScEditEngineDefaulter::SetDefaults( SfxItemSet* pSet, sal_Bool bTakeOwnership )
{
if ( bDeleteDefaults )
delete pDefaults;
pDefaults = pSet;
bDeleteDefaults = bTakeOwnership;
if ( pDefaults )
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, sal_False );
}
@@ -366,10 +366,10 @@ void ScEditEngineDefaulter::SetDefaultItem( const SfxPoolItem& rItem )
if ( !pDefaults )
{
pDefaults = new SfxItemSet( GetEmptyItemSet() );
- bDeleteDefaults = TRUE;
+ bDeleteDefaults = sal_True;
}
pDefaults->Put( rItem );
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, sal_False );
}
const SfxItemSet& ScEditEngineDefaulter::GetDefaults()
@@ -377,90 +377,90 @@ const SfxItemSet& ScEditEngineDefaulter::GetDefaults()
if ( !pDefaults )
{
pDefaults = new SfxItemSet( GetEmptyItemSet() );
- bDeleteDefaults = TRUE;
+ bDeleteDefaults = sal_True;
}
return *pDefaults;
}
void ScEditEngineDefaulter::SetText( const EditTextObject& rTextObject )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
EditEngine::SetText( rTextObject );
if ( pDefaults )
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, sal_False );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObject,
- const SfxItemSet& rSet, BOOL bRememberCopy )
+ const SfxItemSet& rSet, sal_Bool bRememberCopy )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
EditEngine::SetText( rTextObject );
SetDefaults( rSet, bRememberCopy );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObject,
- SfxItemSet* pSet, BOOL bTakeOwnership )
+ SfxItemSet* pSet, sal_Bool bTakeOwnership )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
EditEngine::SetText( rTextObject );
SetDefaults( pSet, bTakeOwnership );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetText( const String& rText )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
EditEngine::SetText( rText );
if ( pDefaults )
- SetDefaults( *pDefaults, FALSE );
+ SetDefaults( *pDefaults, sal_False );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const String& rText,
- const SfxItemSet& rSet, BOOL bRememberCopy )
+ const SfxItemSet& rSet, sal_Bool bRememberCopy )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
EditEngine::SetText( rText );
SetDefaults( rSet, bRememberCopy );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::SetTextNewDefaults( const String& rText,
- SfxItemSet* pSet, BOOL bTakeOwnership )
+ SfxItemSet* pSet, sal_Bool bTakeOwnership )
{
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
EditEngine::SetText( rText );
SetDefaults( pSet, bTakeOwnership );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
void ScEditEngineDefaulter::RepeatDefaults()
{
if ( pDefaults )
{
- USHORT nPara = GetParagraphCount();
- for ( USHORT j=0; j<nPara; j++ )
+ sal_uInt16 nPara = GetParagraphCount();
+ for ( sal_uInt16 j=0; j<nPara; j++ )
SetParaAttribs( j, *pDefaults );
}
}
@@ -468,18 +468,18 @@ void ScEditEngineDefaulter::RepeatDefaults()
void ScEditEngineDefaulter::RemoveParaAttribs()
{
SfxItemSet* pCharItems = NULL;
- BOOL bUpdateMode = GetUpdateMode();
+ sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
- USHORT nParCount = GetParagraphCount();
- for (USHORT nPar=0; nPar<nParCount; nPar++)
+ SetUpdateMode( sal_False );
+ sal_uInt16 nParCount = GetParagraphCount();
+ for (sal_uInt16 nPar=0; nPar<nParCount; nPar++)
{
const SfxItemSet& rParaAttribs = GetParaAttribs( nPar );
- USHORT nWhich;
+ sal_uInt16 nWhich;
for (nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich ++)
{
const SfxPoolItem* pParaItem;
- if ( rParaAttribs.GetItemState( nWhich, FALSE, &pParaItem ) == SFX_ITEM_SET )
+ if ( rParaAttribs.GetItemState( nWhich, sal_False, &pParaItem ) == SFX_ITEM_SET )
{
// if defaults are set, use only items that are different from default
if ( !pDefaults || *pParaItem != pDefaults->Get(nWhich) )
@@ -499,11 +499,11 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
// loop through the portions of the paragraph, and set only those items
// that are not overridden by existing character attributes
- USHORT nPCount = aPortions.Count();
- USHORT nStart = 0;
- for ( USHORT nPos=0; nPos<nPCount; nPos++ )
+ sal_uInt16 nPCount = aPortions.Count();
+ sal_uInt16 nStart = 0;
+ for ( sal_uInt16 nPos=0; nPos<nPCount; nPos++ )
{
- USHORT nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
ESelection aSel( nPar, nStart, nPar, nEnd );
SfxItemSet aOldCharAttrs = GetAttribs( aSel );
SfxItemSet aNewCharAttrs = *pCharItems;
@@ -512,7 +512,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
// Clear those items that are different from existing character attributes.
// Where no character attributes are set, GetAttribs returns the paragraph attributes.
const SfxPoolItem* pItem;
- if ( aNewCharAttrs.GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET &&
+ if ( aNewCharAttrs.GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET &&
*pItem != aOldCharAttrs.Get(nWhich) )
{
aNewCharAttrs.ClearItem(nWhich);
@@ -536,7 +536,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
}
}
if ( bUpdateMode )
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
//------------------------------------------------------------------------
@@ -640,13 +640,13 @@ ScHeaderFieldData::ScHeaderFieldData()
eNumType = SVX_ARABIC;
}
-ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP, BOOL bDeleteEnginePoolP )
+ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP, sal_Bool bDeleteEnginePoolP )
: ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP )
{
}
String __EXPORT ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT /* nPara */, USHORT /* nPos */,
+ sal_uInt16 /* nPara */, sal_uInt16 /* nPos */,
Color*& /* rTxtColor */, Color*& /* rFldColor */ )
{
String aRet;
@@ -699,10 +699,10 @@ String __EXPORT ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
//------------------------------------------------------------------------
ScFieldEditEngine::ScFieldEditEngine( SfxItemPool* pEnginePoolP,
- SfxItemPool* pTextObjectPool, BOOL bDeleteEnginePoolP )
+ SfxItemPool* pTextObjectPool, sal_Bool bDeleteEnginePoolP )
:
ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
- bExecuteURL( TRUE )
+ bExecuteURL( sal_True )
{
if ( pTextObjectPool )
SetEditTextObjectPool( pTextObjectPool );
@@ -712,7 +712,7 @@ ScFieldEditEngine::ScFieldEditEngine( SfxItemPool* pEnginePoolP,
}
String __EXPORT ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- USHORT /* nPara */, USHORT /* nPos */,
+ sal_uInt16 /* nPara */, sal_uInt16 /* nPos */,
Color*& rTxtColor, Color*& /* rFldColor */ )
{
String aRet;
@@ -755,7 +755,7 @@ String __EXPORT ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
return aRet;
}
-void __EXPORT ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, USHORT, USHORT )
+void __EXPORT ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, sal_uInt16, sal_uInt16 )
{
const SvxFieldData* pFld = rField.GetField();
@@ -769,7 +769,7 @@ void __EXPORT ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, USHOR
//------------------------------------------------------------------------
ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP,
- SfxItemPool* pTextObjectPool, BOOL bDeleteEnginePoolP ) :
+ SfxItemPool* pTextObjectPool, sal_Bool bDeleteEnginePoolP ) :
ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP )
{
if ( pTextObjectPool )
diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx
index 7ac3d710b420..c3aa2d93febc 100644
--- a/sc/source/core/tool/filtopt.cxx
+++ b/sc/source/core/tool/filtopt.cxx
@@ -71,7 +71,7 @@ Sequence<OUString> ScFilterOptions::GetPropertyNames()
ScFilterOptions::ScFilterOptions() :
ConfigItem( OUString::createFromAscii( CFGPATH_FILTER ) ),
- bWK3Flag( FALSE ),
+ bWK3Flag( sal_False ),
fExcelColScale( 0 ),
fExcelRowScale( 0 )
{
diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx
index b2a8266705c7..18bf2e6cccbe 100644
--- a/sc/source/core/tool/hints.cxx
+++ b/sc/source/core/tool/hints.cxx
@@ -46,10 +46,10 @@ TYPEINIT1(ScDataPilotModifiedHint, SfxHint);
// ScPaintHint - Angabe, was neu gezeichnet werden muss
// -----------------------------------------------------------------------
-ScPaintHint::ScPaintHint( const ScRange& rRng, USHORT nPaint ) :
+ScPaintHint::ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint ) :
aRange( rRng ),
nParts( nPaint ),
- bPrint( TRUE )
+ bPrint( sal_True )
{
}
@@ -79,7 +79,7 @@ ScUpdateRefHint::~ScUpdateRefHint()
// ScPointerChangedHint - Pointer ist ungueltig geworden
// -----------------------------------------------------------------------
-//UNUSED2008-05 ScPointerChangedHint::ScPointerChangedHint( USHORT nF ) :
+//UNUSED2008-05 ScPointerChangedHint::ScPointerChangedHint( sal_uInt16 nF ) :
//UNUSED2008-05 nFlags( nF )
//UNUSED2008-05 {
//UNUSED2008-05 }
@@ -109,7 +109,7 @@ void ScLinkRefreshedHint::SetSheetLink( const String& rSourceUrl )
}
void ScLinkRefreshedHint::SetDdeLink(
- const String& rA, const String& rT, const String& rI, BYTE nM )
+ const String& rA, const String& rT, const String& rI, sal_uInt8 nM )
{
nLinkType = SC_LINKREFTYPE_DDE;
aDdeAppl = rA;
@@ -129,7 +129,7 @@ void ScLinkRefreshedHint::SetAreaLink( const ScAddress& rPos )
// -----------------------------------------------------------------------
ScAutoStyleHint::ScAutoStyleHint( const ScRange& rR, const String& rSt1,
- ULONG nT, const String& rSt2 ) :
+ sal_uLong nT, const String& rSt2 ) :
aRange( rR ),
aStyle1( rSt1 ),
aStyle2( rSt2 ),
diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx
index ed5a74582348..70aa722c0c90 100644
--- a/sc/source/core/tool/inputopt.cxx
+++ b/sc/source/core/tool/inputopt.cxx
@@ -52,7 +52,7 @@ using namespace com::sun::star::uno;
//------------------------------------------------------------------
// Version, ab der das Item kompatibel ist
-#define SC_VERSION ((USHORT)351)
+#define SC_VERSION ((sal_uInt16)351)
//========================================================================
@@ -82,15 +82,15 @@ ScInputOptions::~ScInputOptions()
void ScInputOptions::SetDefaults()
{
nMoveDir = DIR_BOTTOM;
- bMoveSelection = TRUE;
- bEnterEdit = FALSE;
- bExtendFormat = FALSE;
- bRangeFinder = TRUE;
- bExpandRefs = FALSE;
- bMarkHeader = TRUE;
- bUseTabCol = FALSE;
- bTextWysiwyg = FALSE;
- bReplCellsWarn = TRUE;
+ bMoveSelection = sal_True;
+ bEnterEdit = sal_False;
+ bExtendFormat = sal_False;
+ bRangeFinder = sal_True;
+ bExpandRefs = sal_False;
+ bMarkHeader = sal_True;
+ bUseTabCol = sal_False;
+ bTextWysiwyg = sal_False;
+ bReplCellsWarn = sal_True;
}
//------------------------------------------------------------------------
@@ -174,7 +174,7 @@ ScInputCfg::ScInputCfg() :
{
case SCINPUTOPT_MOVEDIR:
if ( pValues[nProp] >>= nIntVal )
- SetMoveDir( (USHORT)nIntVal );
+ SetMoveDir( (sal_uInt16)nIntVal );
break;
case SCINPUTOPT_MOVESEL:
SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fcc7a24e7a42..23c13331db26 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -80,7 +80,7 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScTokenStack, 8, 4 )
IMPL_FIXEDMEMPOOL_NEWDEL( ScInterpreter, 32, 16 )
ScTokenStack* ScInterpreter::pGlobalStack = NULL;
-BOOL ScInterpreter::bGlobalStackInUse = FALSE;
+sal_Bool ScInterpreter::bGlobalStackInUse = sal_False;
using namespace formula;
using ::std::auto_ptr;
@@ -270,7 +270,7 @@ void ScInterpreter::ScChoseJump()
fVal = ::rtl::math::approxFloor( fVal);
if ( (fVal < 1) || (fVal >= nJumpCount))
{
- bIsValue = FALSE;
+ bIsValue = sal_False;
fVal = CreateDoubleError(
errIllegalArgument);
}
@@ -458,11 +458,11 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
// Do not modify the original range because we use it
// to adjust the size of the result matrix if necessary.
ScAddress aAdr( aRange.aStart);
- ULONG nCol = (ULONG)aAdr.Col() + nC;
- ULONG nRow = (ULONG)aAdr.Row() + nR;
- if ((nCol > static_cast<ULONG>(aRange.aEnd.Col()) &&
+ sal_uLong nCol = (sal_uLong)aAdr.Col() + nC;
+ sal_uLong nRow = (sal_uLong)aAdr.Row() + nR;
+ if ((nCol > static_cast<sal_uLong>(aRange.aEnd.Col()) &&
aRange.aEnd.Col() != aRange.aStart.Col())
- || (nRow > static_cast<ULONG>(aRange.aEnd.Row()) &&
+ || (nRow > static_cast<sal_uLong>(aRange.aEnd.Row()) &&
aRange.aEnd.Row() != aRange.aStart.Row()))
{
fVal = CreateDoubleError( NOTAVAILABLE );
@@ -584,7 +584,7 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
{ // push all results that have no jump path
if ( pResMat )
{
- // a FALSE without path results in an empty path value
+ // a sal_False without path results in an empty path value
if ( fBool == 0.0 )
pResMat->PutEmptyPath( nC, nR );
else
@@ -783,16 +783,16 @@ double ScInterpreter::Compare()
{
case svEmptyCell:
Pop();
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
break;
case svMissing:
case svDouble:
aComp.nVal[ i ] = GetDouble();
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
break;
case svString:
*aComp.pVal[ i ] = GetString();
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = sal_False;
break;
case svDoubleRef :
case svSingleRef :
@@ -802,16 +802,16 @@ double ScInterpreter::Compare()
break;
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellEmptyData( pCell))
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
else if (HasCellStringData( pCell))
{
GetCellString( *aComp.pVal[ i ], pCell);
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = sal_False;
}
else
{
aComp.nVal[ i ] = GetCellValue( aAdr, pCell );
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
}
}
break;
@@ -840,32 +840,32 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
{
case svEmptyCell:
Pop();
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
break;
case svMissing:
case svDouble:
aComp.nVal[ i ] = GetDouble();
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
break;
case svString:
*aComp.pVal[ i ] = GetString();
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = sal_False;
break;
case svSingleRef:
{
PopSingleRef( aAdr );
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellEmptyData( pCell))
- aComp.bEmpty[ i ] = TRUE;
+ aComp.bEmpty[ i ] = sal_True;
else if (HasCellStringData( pCell))
{
GetCellString( *aComp.pVal[ i ], pCell);
- aComp.bVal[ i ] = FALSE;
+ aComp.bVal[ i ] = sal_False;
}
else
{
aComp.nVal[ i ] = GetCellValue( aAdr, pCell );
- aComp.bVal[ i ] = TRUE;
+ aComp.bVal[ i ] = sal_True;
}
}
break;
@@ -909,15 +909,15 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
{
if ( pMat[i]->IsString(j,k) )
{
- aComp.bVal[i] = FALSE;
+ aComp.bVal[i] = sal_False;
*aComp.pVal[i] = pMat[i]->GetString(j,k);
aComp.bEmpty[i] = pMat[i]->IsEmpty(j,k);
}
else
{
- aComp.bVal[i] = TRUE;
+ aComp.bVal[i] = sal_True;
aComp.nVal[i] = pMat[i]->GetDouble(j,k);
- aComp.bEmpty[i] = FALSE;
+ aComp.bEmpty[i] = sal_False;
}
}
pResMat->PutDouble( CompareFunc( aComp, pOptions ), j,k );
@@ -940,13 +940,13 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
{
if ( pMat[i]->IsValue(j) )
{
- aComp.bVal[i] = TRUE;
+ aComp.bVal[i] = sal_True;
aComp.nVal[i] = pMat[i]->GetDouble(j);
- aComp.bEmpty[i] = FALSE;
+ aComp.bEmpty[i] = sal_False;
}
else
{
- aComp.bVal[i] = FALSE;
+ aComp.bVal[i] = sal_False;
*aComp.pVal[i] = pMat[i]->GetString(j);
aComp.bEmpty[i] = pMat[i]->IsEmpty(j);
}
@@ -1126,8 +1126,8 @@ void ScInterpreter::ScAnd()
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
- BOOL bHaveValue = FALSE;
- short nRes = TRUE;
+ sal_Bool bHaveValue = sal_False;
+ short nRes = sal_True;
size_t nRefInList = 0;
while( nParamCount-- > 0)
{
@@ -1136,7 +1136,7 @@ void ScInterpreter::ScAnd()
switch ( GetStackType() )
{
case svDouble :
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes &= ( PopDouble() != 0.0 );
break;
case svString :
@@ -1152,7 +1152,7 @@ void ScInterpreter::ScAnd()
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes &= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
// else: Xcl setzt hier keinen Fehler
@@ -1167,11 +1167,11 @@ void ScInterpreter::ScAnd()
if ( !nGlobalError )
{
double fVal;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
do
{
nRes &= ( fVal != 0.0 );
@@ -1187,13 +1187,13 @@ void ScInterpreter::ScAnd()
ScMatrixRef pMat = GetMatrix();
if ( pMat )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
double fVal = pMat->And();
- USHORT nErr = GetDoubleErrorValue( fVal );
+ sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
- nRes = FALSE;
+ nRes = sal_False;
}
else
nRes &= (fVal != 0.0);
@@ -1224,8 +1224,8 @@ void ScInterpreter::ScOr()
short nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 1 ) )
{
- BOOL bHaveValue = FALSE;
- short nRes = FALSE;
+ sal_Bool bHaveValue = sal_False;
+ short nRes = sal_False;
size_t nRefInList = 0;
while( nParamCount-- > 0)
{
@@ -1234,7 +1234,7 @@ void ScInterpreter::ScOr()
switch ( GetStackType() )
{
case svDouble :
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes |= ( PopDouble() != 0.0 );
break;
case svString :
@@ -1250,7 +1250,7 @@ void ScInterpreter::ScOr()
ScBaseCell* pCell = GetCell( aAdr );
if ( HasCellValueData( pCell ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
nRes |= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
// else: Xcl setzt hier keinen Fehler
@@ -1265,11 +1265,11 @@ void ScInterpreter::ScOr()
if ( !nGlobalError )
{
double fVal;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
ScValueIterator aValIter( pDok, aRange );
if ( aValIter.GetFirst( fVal, nErr ) )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
do
{
nRes |= ( fVal != 0.0 );
@@ -1282,17 +1282,17 @@ void ScInterpreter::ScOr()
break;
case svMatrix:
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
ScMatrixRef pMat = GetMatrix();
if ( pMat )
{
- bHaveValue = TRUE;
+ bHaveValue = sal_True;
double fVal = pMat->Or();
- USHORT nErr = GetDoubleErrorValue( fVal );
+ sal_uInt16 nErr = GetDoubleErrorValue( fVal );
if ( nErr )
{
SetError( nErr );
- nRes = FALSE;
+ nRes = sal_False;
}
else
nRes |= (fVal != 0.0);
@@ -1363,7 +1363,7 @@ void ScInterpreter::ScPercentSign()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPercentSign" );
nFuncFmtType = NUMBERFORMAT_PERCENT;
const FormulaToken* pSaveCur = pCur;
- BYTE nSavePar = cPar;
+ sal_uInt8 nSavePar = cPar;
PushInt( 100 );
cPar = 2;
FormulaByteToken aDivOp( ocDiv, cPar );
@@ -1641,7 +1641,7 @@ void ScInterpreter::ScIsEmpty()
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
nRes = pMat->IsEmpty( nC, nR);
- // else: FALSE, not empty (which is what Xcl does)
+ // else: sal_False, not empty (which is what Xcl does)
}
}
break;
@@ -1745,7 +1745,7 @@ void ScInterpreter::ScIsLogical()
{
if (HasCellValueData(pCell))
{
- ULONG nFormat = GetCellNumberFormat( aAdr, pCell );
+ sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell );
nRes = ( pFormatter->GetType(nFormat)
== NUMBERFORMAT_LOGICAL);
}
@@ -1794,7 +1794,7 @@ void ScInterpreter::ScType()
break;
case CELLTYPE_VALUE :
{
- ULONG nFormat = GetCellNumberFormat( aAdr, pCell );
+ sal_uLong nFormat = GetCellNumberFormat( aAdr, pCell );
if (pFormatter->GetType(nFormat)
== NUMBERFORMAT_LOGICAL)
nType = 4;
@@ -1849,13 +1849,13 @@ void ScInterpreter::ScType()
}
-inline BOOL lcl_FormatHasNegColor( const SvNumberformat* pFormat )
+inline sal_Bool lcl_FormatHasNegColor( const SvNumberformat* pFormat )
{
return pFormat && pFormat->GetColor( 1 );
}
-inline BOOL lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
+inline sal_Bool lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
{
return pFormat && (pFormat->GetFormatstring().Search( '(' ) != STRING_NOTFOUND);
}
@@ -1863,11 +1863,11 @@ inline BOOL lcl_FormatHasOpenPar( const SvNumberformat* pFormat )
void ScInterpreter::ScCell()
{ // ATTRIBUTE ; [REF]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if( MustHaveParamCount( nParamCount, 1, 2 ) )
{
ScAddress aCellPos( aPos );
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
if( nParamCount == 2 )
bError = !PopDoubleRefOrSingleRef( aCellPos );
String aInfoType( GetString() );
@@ -1895,7 +1895,7 @@ void ScInterpreter::ScCell()
}
else if( aInfoType.EqualsAscii( "ADDRESS" ) )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
- USHORT nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
+ sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
aCellPos.Format( aFuncResult, nFlags, pDok, pDok->GetAddressConvention() );
PushString( aFuncResult );
}
@@ -2000,10 +2000,10 @@ void ScInterpreter::ScCell()
// *** FORMATTING ***
else if( aInfoType.EqualsAscii( "FORMAT" ) )
{ // specific format code for standard formats
- ULONG nFormat = pDok->GetNumberFormat( aCellPos );
- BOOL bAppendPrec = TRUE;
- USHORT nPrec, nLeading;
- BOOL bThousand, bIsRed;
+ sal_uLong nFormat = pDok->GetNumberFormat( aCellPos );
+ sal_Bool bAppendPrec = sal_True;
+ sal_uInt16 nPrec, nLeading;
+ sal_Bool bThousand, bIsRed;
pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, nLeading );
switch( pFormatter->GetType( nFormat ) )
@@ -2014,7 +2014,7 @@ void ScInterpreter::ScCell()
case NUMBERFORMAT_PERCENT: aFuncResult = 'P'; break;
default:
{
- bAppendPrec = FALSE;
+ bAppendPrec = sal_False;
switch( pFormatter->GetIndexTableOffset( nFormat ) )
{
case NF_DATE_SYSTEM_SHORT:
@@ -2240,7 +2240,7 @@ void ScInterpreter::ScIsNV()
else
{
ScBaseCell* pCell = GetCell( aAdr );
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
nRes = (nErr == NOTAVAILABLE);
}
}
@@ -2289,7 +2289,7 @@ void ScInterpreter::ScIsErr()
else
{
ScBaseCell* pCell = GetCell( aAdr );
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
nRes = (nErr && nErr != NOTAVAILABLE);
}
}
@@ -2301,7 +2301,7 @@ void ScInterpreter::ScIsErr()
nRes = ((nGlobalError && nGlobalError != NOTAVAILABLE) || !pMat);
else if ( !pJumpMatrix )
{
- USHORT nErr = pMat->GetErrorIfNotString( 0 );
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( 0 );
nRes = (nErr && nErr != NOTAVAILABLE);
}
else
@@ -2311,7 +2311,7 @@ void ScInterpreter::ScIsErr()
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
{
- USHORT nErr = pMat->GetErrorIfNotString( nC, nR);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( nC, nR);
nRes = (nErr && nErr != NOTAVAILABLE);
}
}
@@ -2394,7 +2394,7 @@ short ScInterpreter::IsEven()
if ( !PopDoubleRefOrSingleRef( aAdr ) )
break;
ScBaseCell* pCell = GetCell( aAdr );
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
if (nErr != 0)
SetError(nErr);
else
@@ -2479,11 +2479,11 @@ void ScInterpreter::ScIsOdd()
void ScInterpreter::ScN()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScN" );
- USHORT nErr = nGlobalError;
+ sal_uInt16 nErr = nGlobalError;
nGlobalError = 0;
// Temporarily override the ConvertStringToValue() error for
// GetCellValue() / GetCellValueOrZero()
- USHORT nSErr = mnStringNoValueError;
+ sal_uInt16 nSErr = mnStringNoValueError;
mnStringNoValueError = errCellNoValue;
double fVal = GetDouble();
mnStringNoValueError = nSErr;
@@ -2586,14 +2586,14 @@ void ScInterpreter::ScT()
PushInt(0);
return ;
}
- BOOL bValue = FALSE;
+ sal_Bool bValue = sal_False;
ScBaseCell* pCell = GetCell( aAdr );
if ( GetCellErrCode( pCell ) == 0 )
{
switch ( GetCellType( pCell ) )
{
case CELLTYPE_VALUE :
- bValue = TRUE;
+ bValue = sal_True;
break;
case CELLTYPE_FORMULA :
bValue = ((ScFormulaCell*)pCell)->IsValue();
@@ -2704,7 +2704,7 @@ void ScInterpreter::ScValue()
//2do: this should be a proper unicode string method
-inline BOOL lcl_ScInterpreter_IsPrintable( sal_Unicode c )
+inline sal_Bool lcl_ScInterpreter_IsPrintable( sal_Unicode c )
{
return 0x20 <= c && c != 0x7f;
}
@@ -2762,7 +2762,7 @@ static ::rtl::OUString lcl_convertIntoHalfWidth( const ::rtl::OUString & rStr )
bFirstASCCall = false;
}
- return aTrans.transliterate( rStr, 0, USHORT( rStr.getLength() ), NULL );
+ return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
}
@@ -2777,7 +2777,7 @@ static ::rtl::OUString lcl_convertIntoFullWidth( const ::rtl::OUString & rStr )
bFirstJISCall = false;
}
- return aTrans.transliterate( rStr, 0, USHORT( rStr.getLength() ), NULL );
+ return aTrans.transliterate( rStr, 0, sal_uInt16( rStr.getLength() ), NULL );
}
@@ -2846,7 +2846,7 @@ void ScInterpreter::ScUnichar()
}
-void ScInterpreter::ScMin( BOOL bTextAsZero )
+void ScInterpreter::ScMin( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMin" );
short nParamCount = GetByte();
@@ -2888,7 +2888,7 @@ void ScInterpreter::ScMin( BOOL bTextAsZero )
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(nVal, nErr))
@@ -2967,7 +2967,7 @@ void ScInterpreter::ScMin( BOOL bTextAsZero )
PushDouble(nMin);
}
-void ScInterpreter::ScMax( BOOL bTextAsZero )
+void ScInterpreter::ScMax( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" );
short nParamCount = GetByte();
@@ -3009,7 +3009,7 @@ void ScInterpreter::ScMax( BOOL bTextAsZero )
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(nVal, nErr))
@@ -3088,15 +3088,15 @@ void ScInterpreter::ScMax( BOOL bTextAsZero )
PushDouble(nMax);
}
-double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
+double ScInterpreter::IterateParameters( ScIterFunc eFunc, sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IterateParameters" );
short nParamCount = GetByte();
double fRes = ( eFunc == ifPRODUCT ) ? 1.0 : 0.0;
double fVal = 0.0;
double fMem = 0.0;
- BOOL bNull = TRUE;
- ULONG nCount = 0;
+ sal_Bool bNull = sal_True;
+ sal_uLong nCount = 0;
ScAddress aAdr;
ScRange aRange;
size_t nRefInList = 0;
@@ -3156,7 +3156,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
case ifSUM:
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -3200,7 +3200,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
case ifSUM:
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -3230,7 +3230,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
if ( nGlobalError && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT ) )
{
@@ -3272,7 +3272,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
SetError(nErr);
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -3323,7 +3323,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
nFuncFmtType = NUMBERFORMAT_NUMBER;
pMat->GetDimensions(nC, nR);
if( eFunc == ifCOUNT2 )
- nCount += (ULONG) nC * nR;
+ nCount += (sal_uLong) nC * nR;
else
{
for (SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++)
@@ -3340,7 +3340,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
case ifSUM:
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -3392,7 +3392,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
case ifPRODUCT: if ( !nCount ) fRes = 0.0; break;
default: ; // nothing
}
- // Bei Summen etc. macht ein BOOL-Ergebnis keinen Sinn
+ // Bei Summen etc. macht ein sal_Bool-Ergebnis keinen Sinn
// und Anzahl ist immer Number (#38345#)
if( eFunc == ifCOUNT || nFuncFmtType == NUMBERFORMAT_LOGICAL )
nFuncFmtType = NUMBERFORMAT_NUMBER;
@@ -3421,7 +3421,7 @@ void ScInterpreter::ScProduct()
}
-void ScInterpreter::ScAverage( BOOL bTextAsZero )
+void ScInterpreter::ScAverage( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAverage" );
PushDouble( IterateParameters( ifAVERAGE, bTextAsZero ) );
@@ -3443,7 +3443,7 @@ void ScInterpreter::ScCount2()
void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
- BOOL bTextAsZero )
+ sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetStVarParams" );
short nParamCount = GetByte();
@@ -3490,7 +3490,7 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(fVal, nErr))
@@ -3559,7 +3559,7 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount,
}
-void ScInterpreter::ScVar( BOOL bTextAsZero )
+void ScInterpreter::ScVar( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVar" );
double nVal;
@@ -3573,7 +3573,7 @@ void ScInterpreter::ScVar( BOOL bTextAsZero )
}
-void ScInterpreter::ScVarP( BOOL bTextAsZero )
+void ScInterpreter::ScVarP( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVarP" );
double nVal;
@@ -3584,7 +3584,7 @@ void ScInterpreter::ScVarP( BOOL bTextAsZero )
}
-void ScInterpreter::ScStDev( BOOL bTextAsZero )
+void ScInterpreter::ScStDev( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDev" );
double nVal;
@@ -3597,7 +3597,7 @@ void ScInterpreter::ScStDev( BOOL bTextAsZero )
}
-void ScInterpreter::ScStDevP( BOOL bTextAsZero )
+void ScInterpreter::ScStDevP( sal_Bool bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStDevP" );
double nVal;
@@ -3630,8 +3630,8 @@ void ScInterpreter::ScStDevP( BOOL bTextAsZero )
void ScInterpreter::ScColumns()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScColumns" );
- BYTE nParamCount = GetByte();
- ULONG nVal = 0;
+ sal_uInt8 nParamCount = GetByte();
+ sal_uLong nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
@@ -3648,8 +3648,8 @@ void ScInterpreter::ScColumns()
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- nVal += static_cast<ULONG>(nTab2 - nTab1 + 1) *
- static_cast<ULONG>(nCol2 - nCol1 + 1);
+ nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1) *
+ static_cast<sal_uLong>(nCol2 - nCol1 + 1);
break;
case svMatrix:
{
@@ -3674,8 +3674,8 @@ void ScInterpreter::ScColumns()
void ScInterpreter::ScRows()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRows" );
- BYTE nParamCount = GetByte();
- ULONG nVal = 0;
+ sal_uInt8 nParamCount = GetByte();
+ sal_uLong nVal = 0;
SCCOL nCol1;
SCROW nRow1;
SCTAB nTab1;
@@ -3692,8 +3692,8 @@ void ScInterpreter::ScRows()
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- nVal += static_cast<ULONG>(nTab2 - nTab1 + 1) *
- static_cast<ULONG>(nRow2 - nRow1 + 1);
+ nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1) *
+ static_cast<sal_uLong>(nRow2 - nRow1 + 1);
break;
case svMatrix:
{
@@ -3717,8 +3717,8 @@ void ScInterpreter::ScRows()
void ScInterpreter::ScTables()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTables" );
- BYTE nParamCount = GetByte();
- ULONG nVal;
+ sal_uInt8 nParamCount = GetByte();
+ sal_uLong nVal;
if ( nParamCount == 0 )
nVal = pDok->GetTableCount();
else
@@ -3740,7 +3740,7 @@ void ScInterpreter::ScTables()
break;
case svDoubleRef:
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- nVal += static_cast<ULONG>(nTab2 - nTab1 + 1);
+ nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1);
break;
case svMatrix:
PopError();
@@ -3759,7 +3759,7 @@ void ScInterpreter::ScTables()
void ScInterpreter::ScColumn()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScColumn" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
double nVal = 0;
@@ -3835,7 +3835,7 @@ void ScInterpreter::ScColumn()
void ScInterpreter::ScRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRow" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
double nVal = 0;
@@ -3910,7 +3910,7 @@ void ScInterpreter::ScRow()
void ScInterpreter::ScTable()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTable" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 0, 1 ) )
{
SCTAB nVal = 0;
@@ -4061,7 +4061,7 @@ void ScInterpreter::ScMatch()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMatch" );
ScMatrixRef pMatSrc = NULL;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fTyp;
@@ -4107,10 +4107,10 @@ void ScInterpreter::ScMatch()
rParam.nRow1 = nRow1;
rParam.nCol2 = nCol2;
rParam.nTab = nTab1;
- rParam.bMixedComparison = TRUE;
+ rParam.bMixedComparison = sal_True;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if (fTyp < 0.0)
rEntry.eOp = SC_GREATER_EQUAL;
else if (fTyp > 0.0)
@@ -4120,14 +4120,14 @@ void ScInterpreter::ScMatch()
case svDouble:
{
fVal = GetDouble();
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = fVal;
}
break;
case svString:
{
sStr = GetString();
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
break;
@@ -4144,13 +4144,13 @@ void ScInterpreter::ScMatch()
if (HasCellValueData(pCell))
{
fVal = GetCellValue( aAdr, pCell );
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = fVal;
}
else
{
GetCellString(sStr, pCell);
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
}
@@ -4280,12 +4280,12 @@ void ScInterpreter::ScMatch()
else
{ // search column in row
SCCOL nC;
- rParam.bByRow = FALSE;
+ rParam.bByRow = sal_False;
rParam.nRow2 = nRow1;
rEntry.nField = nCol1;
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False);
// Advance Entry.nField in Iterator if column changed
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( sal_True );
if (fTyp == 0.0)
{ // EQUAL
if ( aCellIter.GetFirst() )
@@ -4320,7 +4320,7 @@ void ScInterpreter::ScCountEmptyCells()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCountEmptyCells" );
if ( MustHaveParamCount( GetByte(), 1 ) )
{
- ULONG nMaxCount = 0, nCount = 0;
+ sal_uLong nMaxCount = 0, nCount = 0;
CellType eCellType;
switch (GetStackType())
{
@@ -4344,9 +4344,9 @@ void ScInterpreter::ScCountEmptyCells()
{
PopDoubleRef( aRange, nParam, nRefInList);
nMaxCount +=
- static_cast<ULONG>(aRange.aEnd.Row() - aRange.aStart.Row() + 1) *
- static_cast<ULONG>(aRange.aEnd.Col() - aRange.aStart.Col() + 1) *
- static_cast<ULONG>(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1);
+ static_cast<sal_uLong>(aRange.aEnd.Row() - aRange.aStart.Row() + 1) *
+ static_cast<sal_uLong>(aRange.aEnd.Col() - aRange.aStart.Col() + 1) *
+ static_cast<sal_uLong>(aRange.aEnd.Tab() - aRange.aStart.Tab() + 1);
ScBaseCell* pCell;
ScCellIterator aDocIter( pDok, aRange, glSubTotal);
if ( (pCell = aDocIter.GetFirst()) != NULL )
@@ -4375,7 +4375,7 @@ void ScInterpreter::ScCountIf()
{
String rString;
double fVal = 0.0;
- BOOL bIsString = TRUE;
+ sal_Bool bIsString = sal_True;
switch ( GetStackType() )
{
case svDoubleRef :
@@ -4392,13 +4392,13 @@ void ScInterpreter::ScCountIf()
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
- bIsString = FALSE;
+ bIsString = sal_False;
break;
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
- bIsString = FALSE;
+ bIsString = sal_False;
}
else
GetCellString(rString, pCell);
@@ -4409,7 +4409,7 @@ void ScInterpreter::ScCountIf()
break;
default:
fVal = 0.0;
- bIsString = FALSE;
+ bIsString = sal_False;
}
}
break;
@@ -4426,7 +4426,7 @@ void ScInterpreter::ScCountIf()
default:
{
fVal = GetDouble();
- bIsString = FALSE;
+ bIsString = sal_False;
}
}
double fSum = 0.0;
@@ -4496,10 +4496,10 @@ void ScInterpreter::ScCountIf()
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if (!bIsString)
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = fVal;
rEntry.eOp = SC_EQUAL;
}
@@ -4537,9 +4537,9 @@ void ScInterpreter::ScCountIf()
}
else
{
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False);
// Entry.nField im Iterator bei Spaltenwechsel weiterschalten
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( sal_True );
if ( aCellIter.GetFirst() )
{
do
@@ -4563,7 +4563,7 @@ void ScInterpreter::ScCountIf()
void ScInterpreter::ScSumIf()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumIf" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
SCCOL nCol3 = 0;
@@ -4606,7 +4606,7 @@ void ScInterpreter::ScSumIf()
}
String rString;
double fVal = 0.0;
- BOOL bIsString = TRUE;
+ sal_Bool bIsString = sal_True;
switch ( GetStackType() )
{
case svDoubleRef :
@@ -4623,13 +4623,13 @@ void ScInterpreter::ScSumIf()
{
case CELLTYPE_VALUE :
fVal = GetCellValue( aAdr, pCell );
- bIsString = FALSE;
+ bIsString = sal_False;
break;
case CELLTYPE_FORMULA :
if( ((ScFormulaCell*)pCell)->IsValue() )
{
fVal = GetCellValue( aAdr, pCell );
- bIsString = FALSE;
+ bIsString = sal_False;
}
else
GetCellString(rString, pCell);
@@ -4640,7 +4640,7 @@ void ScInterpreter::ScSumIf()
break;
default:
fVal = 0.0;
- bIsString = FALSE;
+ bIsString = sal_False;
}
}
break;
@@ -4657,13 +4657,13 @@ void ScInterpreter::ScSumIf()
default:
{
fVal = GetDouble();
- bIsString = FALSE;
+ bIsString = sal_False;
}
}
double fSum = 0.0;
double fMem = 0.0;
- BOOL bNull = TRUE;
+ sal_Bool bNull = sal_True;
short nParam = 1;
size_t nRefInList = 0;
while (nParam-- > 0)
@@ -4779,10 +4779,10 @@ void ScInterpreter::ScSumIf()
rParam.nRow2 = nRow2;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if (!bIsString)
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = fVal;
rEntry.eOp = SC_EQUAL;
}
@@ -4830,7 +4830,7 @@ void ScInterpreter::ScSumIf()
fVal = pSumExtraMatrix->GetDouble( nC, nR);
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -4856,7 +4856,7 @@ void ScInterpreter::ScSumIf()
fVal = GetCellValue( aAdr, pCell );
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -4869,9 +4869,9 @@ void ScInterpreter::ScSumIf()
}
else
{
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False);
// Increment Entry.nField in iterator when switching to next column.
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( sal_True );
if ( aCellIter.GetFirst() )
{
if (pSumExtraMatrix)
@@ -4885,7 +4885,7 @@ void ScInterpreter::ScSumIf()
fVal = pSumExtraMatrix->GetDouble( nC, nR);
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -4905,7 +4905,7 @@ void ScInterpreter::ScSumIf()
fVal = GetCellValue( aAdr, pCell );
if ( bNull && fVal != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = fVal;
}
else
@@ -4930,7 +4930,7 @@ void ScInterpreter::ScSumIf()
void ScInterpreter::ScLookup()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLookup" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return ;
@@ -5345,13 +5345,13 @@ void ScInterpreter::ScLookup()
aParam.bByRow = bVertical;
aParam.bMixedComparison = true;
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
rEntry.eOp = SC_LESS_EQUAL;
rEntry.nField = nCol1;
if ( rEntry.bQueryByString )
aParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok );
- ScQueryCellIterator aCellIter(pDok, nTab1, aParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, aParam, sal_False);
SCCOL nC;
SCROW nR;
// Advance Entry.nField in iterator upon switching columns if
@@ -5476,19 +5476,19 @@ void ScInterpreter::ScLookup()
void ScInterpreter::ScHLookup()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScHLookup" );
- CalculateLookup(TRUE);
+ CalculateLookup(sal_True);
}
-void ScInterpreter::CalculateLookup(BOOL HLookup)
+void ScInterpreter::CalculateLookup(sal_Bool HLookup)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateLookup" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
- BOOL bSorted;
+ sal_Bool bSorted;
if (nParamCount == 4)
bSorted = GetBool();
else
- bSorted = TRUE;
+ bSorted = sal_True;
double fIndex = ::rtl::math::approxFloor( GetDouble() ) - 1.0;
ScMatrixRef pMat = NULL;
SCSIZE nC = 0, nR = 0;
@@ -5546,7 +5546,7 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
{
rParam.nCol2 = nCol2;
rParam.nRow2 = nRow1; // nur in der ersten Zeile suchen
- rParam.bByRow = FALSE;
+ rParam.bByRow = sal_False;
} // if ( HLookup )
else
{
@@ -5554,10 +5554,10 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
rParam.nRow2 = nRow2;
rParam.nTab = nTab1;
}
- rParam.bMixedComparison = TRUE;
+ rParam.bMixedComparison = sal_True;
ScQueryEntry& rEntry = rParam.GetEntry(0);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
if ( bSorted )
rEntry.eOp = SC_LESS_EQUAL;
if ( !FillEntry(rEntry) )
@@ -5659,16 +5659,16 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
else
{
rEntry.nField = nCol1;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SCCOL nCol = 0;
SCROW nRow = 0;
if ( bSorted )
rEntry.eOp = SC_LESS_EQUAL;
if ( HLookup )
{
- ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
+ ScQueryCellIterator aCellIter(pDok, nTab1, rParam, sal_False);
// advance Entry.nField in Iterator upon switching columns
- aCellIter.SetAdvanceQueryParamEntryField( TRUE );
+ aCellIter.SetAdvanceQueryParamEntryField( sal_True );
if ( bSorted )
{
SCROW nRow1_temp;
@@ -5676,7 +5676,7 @@ void ScInterpreter::CalculateLookup(BOOL HLookup)
}
else if ( aCellIter.GetFirst() )
{
- bFound = TRUE;
+ bFound = sal_True;
nCol = aCellIter.GetCol();
}
nRow = nZIndex;
@@ -5709,14 +5709,14 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
{
case svDouble:
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = GetDouble();
}
break;
case svString:
{
const String sStr = GetString();
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
break;
@@ -5732,21 +5732,21 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
ScBaseCell* pCell = GetCell( aAdr );
if (HasCellValueData(pCell))
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = GetCellValue( aAdr, pCell );
}
else
{
if ( GetCellType( pCell ) == CELLTYPE_NOTE )
{
- rEntry.bQueryByString = FALSE;
+ rEntry.bQueryByString = sal_False;
rEntry.nVal = 0.0;
}
else
{
String sStr;
GetCellString(sStr, pCell);
- rEntry.bQueryByString = TRUE;
+ rEntry.bQueryByString = sal_True;
*rEntry.pStr = sStr;
}
}
@@ -5769,13 +5769,13 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
void ScInterpreter::ScVLookup()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVLookup" );
- CalculateLookup(FALSE);
+ CalculateLookup(sal_False);
}
void ScInterpreter::ScSubTotal()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubTotal" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCountMin( nParamCount, 2 ) )
{
// We must fish the 1st parameter deep from the stack! And push it on top.
@@ -5787,7 +5787,7 @@ void ScInterpreter::ScSubTotal()
else
{
cPar = nParamCount - 1;
- glSubTotal = TRUE;
+ glSubTotal = sal_True;
switch( nFunc )
{
case SUBTOTAL_FUNC_AVE : ScAverage(); break;
@@ -5803,7 +5803,7 @@ void ScInterpreter::ScSubTotal()
case SUBTOTAL_FUNC_VARP : ScVarP(); break;
default : PushIllegalArgument(); break;
}
- glSubTotal = FALSE;
+ glSubTotal = sal_False;
}
// Get rid of the 1st (fished) parameter.
double nVal = GetDouble();
@@ -5812,14 +5812,14 @@ void ScInterpreter::ScSubTotal()
}
}
-ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
+ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDBParams" );
- BOOL bAllowMissingField = FALSE;
+ sal_Bool bAllowMissingField = sal_False;
if ( rMissingField )
{
- bAllowMissingField = TRUE;
- rMissingField = FALSE;
+ bAllowMissingField = sal_True;
+ rMissingField = sal_False;
}
if ( GetByte() == 3 )
{
@@ -5828,20 +5828,20 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
if (!pQueryRef.get())
return NULL;
- BOOL bByVal = TRUE;
+ sal_Bool bByVal = sal_True;
double nVal = 0.0;
String aStr;
ScRange aMissingRange;
- BOOL bRangeFake = FALSE;
+ sal_Bool bRangeFake = sal_False;
switch (GetStackType())
{
case svDouble :
nVal = ::rtl::math::approxFloor( GetDouble() );
if ( bAllowMissingField && nVal == 0.0 )
- rMissingField = TRUE; // fake missing parameter
+ rMissingField = sal_True; // fake missing parameter
break;
case svString :
- bByVal = FALSE;
+ bByVal = sal_False;
aStr = GetString();
break;
case svSingleRef :
@@ -5853,7 +5853,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
nVal = GetCellValue( aAdr, pCell );
else
{
- bByVal = FALSE;
+ bByVal = sal_False;
GetCellString(aStr, pCell);
}
}
@@ -5861,7 +5861,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
case svDoubleRef :
if ( bAllowMissingField )
{ // fake missing parameter for old SO compatibility
- bRangeFake = TRUE;
+ bRangeFake = sal_True;
PopDoubleRef( aMissingRange );
}
else
@@ -5873,7 +5873,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
case svMissing :
PopError();
if ( bAllowMissingField )
- rMissingField = TRUE;
+ rMissingField = sal_True;
else
SetError( errIllegalParameter );
break;
@@ -5891,7 +5891,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
{
// range parameter must match entire database range
if (pDBRef->isRangeEqual(aMissingRange))
- rMissingField = TRUE;
+ rMissingField = sal_True;
else
SetError( errIllegalParameter );
}
@@ -5952,9 +5952,9 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DBIterator" );
double nErg = 0.0;
double fMem = 0.0;
- BOOL bNull = TRUE;
- ULONG nCount = 0;
- BOOL bMissingField = FALSE;
+ sal_Bool bNull = sal_True;
+ sal_uLong nCount = 0;
+ sal_Bool bMissingField = sal_False;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
@@ -5978,7 +5978,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
case ifSUM:
if ( bNull && aValue.mfValue != 0.0 )
{
- bNull = FALSE;
+ bNull = sal_False;
fMem = aValue.mfValue;
}
else
@@ -6018,11 +6018,11 @@ void ScInterpreter::ScDBSum()
void ScInterpreter::ScDBCount()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount" );
- BOOL bMissingField = TRUE;
+ sal_Bool bMissingField = sal_True;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
if ( bMissingField && pQueryParam->GetType() == ScDBQueryParamBase::INTERNAL )
{ // count all matching records
// TODO: currently the QueryIterators only return cell pointers of
@@ -6072,11 +6072,11 @@ void ScInterpreter::ScDBCount()
void ScInterpreter::ScDBCount2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount2" );
- BOOL bMissingField = TRUE;
+ sal_Bool bMissingField = sal_True;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
pQueryParam->mbSkipString = false;
ScDBQueryDataIterator aValIter( pDok, pQueryParam.release());
ScDBQueryDataIterator::Value aValue;
@@ -6133,7 +6133,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount )
rValCount = 0.0;
double fSum = 0.0;
- BOOL bMissingField = FALSE;
+ sal_Bool bMissingField = sal_False;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam.get())
{
@@ -6248,7 +6248,7 @@ ScTokenArray* lcl_CreateExternalRefTokenArray( const ScAddress& rPos, ScDocument
void ScInterpreter::ScIndirect()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndirect" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
bool bTryXlA1 = true; // whether to try XL_A1 style as well.
@@ -6311,7 +6311,7 @@ void ScInterpreter::ScIndirect()
if (!pNames)
break;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if (!pNames->SearchName( sRefStr, nPos))
break;
@@ -6359,7 +6359,7 @@ void ScInterpreter::ScAddressFunc()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAddressFunc" );
String sTabStr;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if( !MustHaveParamCount( nParamCount, 2, 5 ) )
return;
@@ -6370,10 +6370,10 @@ void ScInterpreter::ScAddressFunc()
if( nParamCount >= 4 && 0.0 == ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0)))
eConv = FormulaGrammar::CONV_XL_R1C1;
- USHORT nFlags = SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE; // default
+ sal_uInt16 nFlags = SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE; // default
if( nParamCount >= 3 )
{
- USHORT n = (USHORT) ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0));
+ sal_uInt16 n = (sal_uInt16) ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0));
switch ( n )
{
default :
@@ -6432,7 +6432,7 @@ void ScInterpreter::ScAddressFunc()
void ScInterpreter::ScOffset()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScOffset" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 5 ) )
{
long nColNew = -1, nRowNew = -1, nColPlus, nRowPlus;
@@ -6508,7 +6508,7 @@ void ScInterpreter::ScOffset()
void ScInterpreter::ScIndex()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndex" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 4 ) )
{
long nArea;
@@ -6547,7 +6547,7 @@ void ScInterpreter::ScIndex()
{
if (nArea != 1)
SetError(errIllegalArgument);
- USHORT nOldSp = sp;
+ sal_uInt16 nOldSp = sp;
ScMatrixRef pMat = GetMatrix();
if (pMat)
{
@@ -6645,7 +6645,7 @@ void ScInterpreter::ScIndex()
SCCOL nCol2 = 0;
SCROW nRow2 = 0;
SCTAB nTab2 = 0;
- BOOL bRowArray = FALSE;
+ sal_Bool bRowArray = sal_False;
if (GetStackType() == svRefList)
{
FormulaTokenRef xRef = PopToken();
@@ -6658,13 +6658,13 @@ void ScInterpreter::ScIndex()
DoubleRefToRange( (*(static_cast<ScToken*>(xRef.get())->GetRefList()))[nArea-1], aRange);
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if ( nParamCount == 2 && nRow1 == nRow2 )
- bRowArray = TRUE;
+ bRowArray = sal_True;
}
else
{
PopDoubleRef( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
if ( nParamCount == 2 && nRow1 == nRow2 )
- bRowArray = TRUE;
+ bRowArray = sal_True;
}
if ( nTab1 != nTab2 ||
(nCol > 0 && nCol1+nCol-1 > nCol2) ||
@@ -6715,7 +6715,7 @@ void ScInterpreter::ScMultiArea()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMultiArea" );
// Legacy support, convert to RefList
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (MustHaveParamCountMin( nParamCount, 1))
{
while (!nGlobalError && nParamCount-- > 1)
@@ -6729,7 +6729,7 @@ void ScInterpreter::ScMultiArea()
void ScInterpreter::ScAreas()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAreas" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (MustHaveParamCount( nParamCount, 1))
{
size_t nCount = 0;
@@ -6767,7 +6767,7 @@ void ScInterpreter::ScAreas()
void ScInterpreter::ScCurrency()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCurrency" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
String aStr;
@@ -6796,18 +6796,18 @@ void ScInterpreter::ScCurrency()
Color* pColor = NULL;
if ( fDec < 0.0 )
fDec = 0.0;
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_CURRENCY,
ScGlobal::eLnge);
- if ( (USHORT) fDec != pFormatter->GetFormatPrecision( nIndex ) )
+ if ( (sal_uInt16) fDec != pFormatter->GetFormatPrecision( nIndex ) )
{
String sFormatString;
pFormatter->GenerateFormat(sFormatString,
nIndex,
ScGlobal::eLnge,
- TRUE, // mit Tausenderpunkt
- FALSE, // nicht rot
- (USHORT) fDec,// Nachkommastellen
+ sal_True, // mit Tausenderpunkt
+ sal_False, // nicht rot
+ (sal_uInt16) fDec,// Nachkommastellen
1); // 1 Vorkommanull
if (!pFormatter->GetPreviewString(sFormatString,
fVal,
@@ -6858,16 +6858,16 @@ void ScInterpreter::ScReplace()
void ScInterpreter::ScFixed()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFixed" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 3 ) )
{
String aStr;
double fDec;
- BOOL bThousand;
+ sal_Bool bThousand;
if (nParamCount == 3)
bThousand = !GetBool(); // Param TRUE: keine Tausenderpunkte
else
- bThousand = TRUE;
+ bThousand = sal_True;
if (nParamCount >= 2)
{
fDec = ::rtl::math::approxFloor(GetDoubleWithDefault( 2.0 ));
@@ -6893,15 +6893,15 @@ void ScInterpreter::ScFixed()
String sFormatString;
if (fDec < 0.0)
fDec = 0.0;
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GenerateFormat(sFormatString,
nIndex,
ScGlobal::eLnge,
bThousand, // mit Tausenderpunkt
- FALSE, // nicht rot
- (USHORT) fDec,// Nachkommastellen
+ sal_False, // nicht rot
+ (sal_uInt16) fDec,// Nachkommastellen
1); // 1 Vorkommanull
if (!pFormatter->GetPreviewString(sFormatString,
fVal,
@@ -6918,7 +6918,7 @@ void ScInterpreter::ScFixed()
void ScInterpreter::ScFind()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFind" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
double fAnz;
@@ -6957,7 +6957,7 @@ void ScInterpreter::ScExact()
void ScInterpreter::ScLeft()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLeft" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
xub_StrLen n;
@@ -6984,7 +6984,7 @@ void ScInterpreter::ScLeft()
void ScInterpreter::ScRight()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRight" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
xub_StrLen n;
@@ -7013,7 +7013,7 @@ void ScInterpreter::ScSearch()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSearch" );
double fAnz;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
if (nParamCount == 3)
@@ -7038,7 +7038,7 @@ void ScInterpreter::ScSearch()
utl::SearchParam::SearchType eSearchType =
(MayBeRegExp( SearchStr, pDok ) ?
utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL);
- utl::SearchParam sPar(SearchStr, eSearchType, FALSE, FALSE, FALSE);
+ utl::SearchParam sPar(SearchStr, eSearchType, sal_False, sal_False, sal_False);
utl::TextSearch sT( sPar, *ScGlobal::pCharClass );
int nBool = sT.SearchFrwrd(sStr, &nPos, &nEndPos);
if (!nBool)
@@ -7091,7 +7091,7 @@ void ScInterpreter::ScText()
PushTempToken( xTok);
// Temporarily override the ConvertStringToValue()
// error for GetCellValue() / GetCellValueOrZero()
- USHORT nSErr = mnStringNoValueError;
+ sal_uInt16 nSErr = mnStringNoValueError;
mnStringNoValueError = errNotNumericString;
fVal = GetDouble();
mnStringNoValueError = nSErr;
@@ -7144,7 +7144,7 @@ void ScInterpreter::ScText()
void ScInterpreter::ScSubstitute()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubstitute" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
xub_StrLen nAnz;
@@ -7168,7 +7168,7 @@ void ScInterpreter::ScSubstitute()
xub_StrLen nCount = 0;
xub_StrLen nNewLen = sNewStr.Len();
xub_StrLen nOldLen = sOldStr.Len();
- while( TRUE )
+ while( sal_True )
{
nPos = sStr.Search( sOldStr, nPos );
if (nPos != STRING_NOTFOUND)
@@ -7232,7 +7232,7 @@ void ScInterpreter::ScRept()
void ScInterpreter::ScConcat()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScConcat" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
String aRes;
while( nParamCount-- > 0)
{
@@ -7246,8 +7246,8 @@ void ScInterpreter::ScConcat()
void ScInterpreter::ScErrorType()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScErrorType" );
- USHORT nErr;
- USHORT nOldError = nGlobalError;
+ sal_uInt16 nErr;
+ sal_uInt16 nOldError = nGlobalError;
nGlobalError = 0;
switch ( GetStackType() )
{
@@ -7325,13 +7325,13 @@ void ScInterpreter::ScErrorType()
}
-BOOL ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc )
+sal_Bool ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::MayBeRegExp" );
if ( pDoc && !pDoc->GetDocOptions().IsFormulaRegexEnabled() )
- return FALSE;
+ return sal_False;
if ( !rStr.Len() || (rStr.Len() == 1 && rStr.GetChar(0) != '.') )
- return FALSE; // einzelnes Metazeichen kann keine RegExp sein
+ return sal_False; // einzelnes Metazeichen kann keine RegExp sein
static const sal_Unicode cre[] = { '.','*','+','?','[',']','^','$','\\','<','>','(',')','|', 0 };
const sal_Unicode* p1 = rStr.GetBuffer();
sal_Unicode c1;
@@ -7341,17 +7341,17 @@ BOOL ScInterpreter::MayBeRegExp( const String& rStr, const ScDocument* pDoc )
while ( *p2 )
{
if ( c1 == *p2++ )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
static bool lcl_LookupQuery( ScAddress & o_rResultPos, ScDocument * pDoc,
const ScQueryParam & rParam, const ScQueryEntry & rEntry )
{
bool bFound = false;
- ScQueryCellIterator aCellIter( pDoc, rParam.nTab, rParam, FALSE);
+ ScQueryCellIterator aCellIter( pDoc, rParam.nTab, rParam, sal_False);
if (rEntry.eOp != SC_EQUAL)
{
// range lookup <= or >=
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 404eaf763a51..c13cb5c924c4 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -66,14 +66,14 @@ using namespace formula;
// Datum und Zeit
//-----------------------------------------------------------------------------
-double ScInterpreter::GetDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, bool bStrict )
+double ScInterpreter::GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDateSerial" );
if ( nYear < 100 && !bStrict )
nYear = pFormatter->ExpandTwoDigitYear( nYear );
// Do not use a default Date ctor here because it asks system time with a
// performance penalty.
- INT16 nY, nM, nD;
+ sal_Int16 nY, nM, nD;
if (bStrict)
nY = nYear, nM = nMonth, nD = nDay;
else
@@ -201,7 +201,7 @@ void ScInterpreter::ScGetDateValue()
void ScInterpreter::ScGetDayOfWeek()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGetDayOfWeek" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
short nFlag;
@@ -245,8 +245,8 @@ void ScInterpreter::ScEasterSunday()
nFuncFmtType = NUMBERFORMAT_DATE;
if ( MustHaveParamCount( GetByte(), 1 ) )
{
- INT16 nDay, nMonth, nYear;
- nYear = (INT16) ::rtl::math::approxFloor( GetDouble() );
+ sal_Int16 nDay, nMonth, nYear;
+ nYear = (sal_Int16) ::rtl::math::approxFloor( GetDouble() );
if ( nYear < 100 )
nYear = pFormatter->ExpandTwoDigitYear( nYear );
// don't worry, be happy :)
@@ -264,8 +264,8 @@ void ScInterpreter::ScEasterSunday()
L = (32 + 2 * E + 2 * I - H - K) % 7;
M = int((N + 11 * H + 22 * L) / 451);
O = H + L - 7 * M + 114;
- nDay = sal::static_int_cast<INT16>( O % 31 + 1 );
- nMonth = sal::static_int_cast<INT16>( int(O / 31) );
+ nDay = sal::static_int_cast<sal_Int16>( O % 31 + 1 );
+ nMonth = sal::static_int_cast<sal_Int16>( int(O / 31) );
PushDouble( GetDateSerial( nYear, nMonth, nDay, true ) );
}
}
@@ -276,9 +276,9 @@ void ScInterpreter::ScGetDate()
nFuncFmtType = NUMBERFORMAT_DATE;
if ( MustHaveParamCount( GetByte(), 3 ) )
{
- INT16 nDay = (INT16) ::rtl::math::approxFloor(GetDouble());
- INT16 nMonth = (INT16) ::rtl::math::approxFloor(GetDouble());
- INT16 nYear = (INT16) ::rtl::math::approxFloor(GetDouble());
+ sal_Int16 nDay = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
+ sal_Int16 nMonth = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
+ sal_Int16 nYear = (sal_Int16) ::rtl::math::approxFloor(GetDouble());
if (nYear < 0)
PushIllegalArgument();
else
@@ -340,14 +340,14 @@ void ScInterpreter::ScGetDiffDate360()
* In Calc the result is 419 respectively -419. I consider the -418 a bug in Excel.
*/
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- BOOL bFlag;
+ sal_Bool bFlag;
if (nParamCount == 3)
bFlag = GetBool();
else
- bFlag = FALSE;
+ bFlag = sal_False;
double nDate2 = GetDouble();
double nDate1 = GetDouble();
double fSign;
@@ -371,7 +371,7 @@ void ScInterpreter::ScGetDiffDate360()
Date aDate2 = *(pFormatter->GetNullDate());
aDate2 += (long) ::rtl::math::approxFloor(nDate2);
if (aDate1.GetDay() == 31)
- aDate1 -= (ULONG) 1;
+ aDate1 -= (sal_uLong) 1;
else if (!bFlag)
{
if (aDate1.GetMonth() == 2)
@@ -393,7 +393,7 @@ void ScInterpreter::ScGetDiffDate360()
if (!bFlag )
{
if (aDate1.GetDay() == 30)
- aDate2 -= (ULONG) 1;
+ aDate2 -= (sal_uLong) 1;
}
else
aDate2.SetDay(30);
@@ -457,7 +457,7 @@ void ScInterpreter::ScInt()
void ScInterpreter::RoundNumber( rtl_math_RoundingMode eMode )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::RoundNumber" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double fVal = 0.0;
@@ -465,7 +465,7 @@ void ScInterpreter::RoundNumber( rtl_math_RoundingMode eMode )
fVal = ::rtl::math::round( GetDouble(), 0, eMode );
else
{
- INT32 nDec = (INT32) ::rtl::math::approxFloor(GetDouble());
+ sal_Int32 nDec = (sal_Int32) ::rtl::math::approxFloor(GetDouble());
if( nDec < -20 || nDec > 20 )
PushIllegalArgument();
else
@@ -496,10 +496,10 @@ void ScInterpreter::ScRoundUp()
void ScInterpreter::ScCeil()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCeil" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- BOOL bAbs = ( nParamCount == 3 ? GetBool() : FALSE );
+ sal_Bool bAbs = ( nParamCount == 3 ? GetBool() : sal_False );
double fDec = GetDouble();
double fVal = GetDouble();
if ( fDec == 0.0 )
@@ -519,10 +519,10 @@ void ScInterpreter::ScCeil()
void ScInterpreter::ScFloor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScFloor" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
- BOOL bAbs = ( nParamCount == 3 ? GetBool() : FALSE );
+ sal_Bool bAbs = ( nParamCount == 3 ? GetBool() : sal_False );
double fDec = GetDouble();
double fVal = GetDouble();
if ( fDec == 0.0 )
@@ -582,7 +582,7 @@ void ScInterpreter::ScArcTan2()
void ScInterpreter::ScLog()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLog" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double nBase;
@@ -657,7 +657,7 @@ void ScInterpreter::ScNPV()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nCellVal;
PopDoubleRef( aRange, nParamCount, nRefInList);
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -687,14 +687,14 @@ void ScInterpreter::ScIRR()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIRR" );
double fSchaetzwert;
nFuncFmtType = NUMBERFORMAT_PERCENT;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 2 ) )
return;
if (nParamCount == 2)
fSchaetzwert = GetDouble();
else
fSchaetzwert = 0.1;
- USHORT sPos = sp; // Stack-Position merken
+ sal_uInt16 sPos = sp; // Stack-Position merken
double fEps = 1.0;
double x, xNeu, fWert, fZaehler, fNenner, nCount;
if (fSchaetzwert == -1.0)
@@ -711,8 +711,8 @@ void ScInterpreter::ScIRR()
return;
}
}
- const USHORT nIterationsMax = 20;
- USHORT nItCount = 0;
+ const sal_uInt16 nIterationsMax = 20;
+ sal_uInt16 nItCount = 0;
ScRange aRange;
while (fEps > SCdEpsilon && nItCount < nIterationsMax)
{ // Newton-Verfahren:
@@ -720,7 +720,7 @@ void ScInterpreter::ScIRR()
nCount = 0.0;
fZaehler = 0.0;
fNenner = 0.0;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange );
ScValueIterator aValIter(pDok, aRange, glSubTotal);
if (aValIter.GetFirst(fWert, nErr))
@@ -771,10 +771,10 @@ void ScInterpreter::ScMIRR()
{
ScValueIterator aValIter( pDok, aRange, glSubTotal );
double fCellValue;
- ULONG nCount = 0;
- USHORT nIterError = 0;
+ sal_uLong nCount = 0;
+ sal_uInt16 nIterError = 0;
- BOOL bLoop = aValIter.GetFirst( fCellValue, nIterError );
+ sal_Bool bLoop = aValIter.GetFirst( fCellValue, nIterError );
while( bLoop )
{
if( fCellValue > 0.0 ) // reinvestments
@@ -842,7 +842,7 @@ void ScInterpreter::ScBW()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBW" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
double nRmz, nZzr, nZins, nZw = 0, nFlag = 0;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -902,7 +902,7 @@ void ScInterpreter::ScGDA()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGDA" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 4, 5 ) )
{
double nFaktor;
@@ -926,7 +926,7 @@ void ScInterpreter::ScGDA2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGDA2" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 5 ) )
return ;
double nMonate;
@@ -955,8 +955,8 @@ void ScInterpreter::ScGDA2()
double nSummAbRate = nErsteAbRate;
double nMin = nDauer;
if (nMin > nPeriode) nMin = nPeriode;
- USHORT iMax = (USHORT)::rtl::math::approxFloor(nMin);
- for (USHORT i = 2; i <= iMax; i++)
+ sal_uInt16 iMax = (sal_uInt16)::rtl::math::approxFloor(nMin);
+ for (sal_uInt16 i = 2; i <= iMax; i++)
{
nGda2 = (nWert - nSummAbRate) * nAbRate;
nSummAbRate += nGda2;
@@ -974,14 +974,14 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScInterVDB" );
double fVdb=0;
double fIntEnd = ::rtl::math::approxCeil(fPeriode);
- ULONG nLoopEnd = (ULONG) fIntEnd;
+ sal_uLong nLoopEnd = (sal_uLong) fIntEnd;
double fTerm, fLia;
double fRestwert = fWert - fRest;
- BOOL bNowLia = FALSE;
+ sal_Bool bNowLia = sal_False;
double fGda;
- ULONG i;
+ sal_uLong i;
fLia=0;
for ( i = 1; i <= nLoopEnd; i++)
{
@@ -993,7 +993,7 @@ double ScInterpreter::ScInterVDB(double fWert,double fRest,double fDauer,
if (fLia > fGda)
{
fTerm = fLia;
- bNowLia = TRUE;
+ bNowLia = sal_True;
}
else
{
@@ -1024,15 +1024,15 @@ void ScInterpreter::ScVDB()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScVDB" );
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 5, 7 ) )
{
double fWert, fRest, fDauer, fAnfang, fEnde, fFaktor, fVdb = 0.0;
- BOOL bFlag;
+ sal_Bool bFlag;
if (nParamCount == 7)
bFlag = GetBool();
else
- bFlag = FALSE;
+ bFlag = sal_False;
if (nParamCount >= 6)
fFaktor = GetDouble();
else
@@ -1049,13 +1049,13 @@ void ScInterpreter::ScVDB()
{
double fIntStart = ::rtl::math::approxFloor(fAnfang);
double fIntEnd = ::rtl::math::approxCeil(fEnde);
- ULONG nLoopStart = (ULONG) fIntStart;
- ULONG nLoopEnd = (ULONG) fIntEnd;
+ sal_uLong nLoopStart = (sal_uLong) fIntStart;
+ sal_uLong nLoopEnd = (sal_uLong) fIntEnd;
fVdb = 0.0;
if (bFlag)
{
- for (ULONG i = nLoopStart + 1; i <= nLoopEnd; i++)
+ for (sal_uLong i = nLoopStart + 1; i <= nLoopEnd; i++)
{
double fTerm = ScGetGDA(fWert, fRest, fDauer, (double) i, fFaktor);
@@ -1147,7 +1147,7 @@ void ScInterpreter::ScRMZ()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRMZ" );
double nZins, nZzr, nBw, nZw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -1196,7 +1196,7 @@ void ScInterpreter::ScZW()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZW" );
double nZins, nZzr, nRmz, nBw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -1213,7 +1213,7 @@ void ScInterpreter::ScZZR()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZZR" );
double nZins, nRmz, nBw, nZw = 0, nFlag = 0;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
if (nParamCount == 5)
@@ -1244,8 +1244,8 @@ bool ScInterpreter::RateIteration( double fNper, double fPayment, double fPv,
bool bValid = true, bFound = false;
double fX, fXnew, fTerm, fTermDerivation;
double fGeoSeries, fGeoSeriesDerivation;
- const USHORT nIterationsMax = 150;
- USHORT nCount = 0;
+ const sal_uInt16 nIterationsMax = 150;
+ sal_uInt16 nCount = 0;
const double fEpsilonSmall = 1.0E-14;
// convert any fPayType situation to fPayType == zero situation
fFv = fFv - fPayment * fPayType;
@@ -1335,7 +1335,7 @@ void ScInterpreter::ScZins()
double fFv = 0, fPayType = 0, fGuess = 0.1;
bool bValid = true;
nFuncFmtType = NUMBERFORMAT_PERCENT;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 6 ) )
return;
if (nParamCount == 6)
@@ -1390,7 +1390,7 @@ void ScInterpreter::ScZinsZ()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZinsZ" );
double nZins, nZr, nRmz, nZzr, nBw, nZw = 0, nFlag = 0;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 6 ) )
return;
if (nParamCount == 6)
@@ -1412,7 +1412,7 @@ void ScInterpreter::ScKapz()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScKapz" );
double nZins, nZr, nZzr, nBw, nZw = 0, nFlag = 0, nRmz, nZinsz;
nFuncFmtType = NUMBERFORMAT_CURRENCY;
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 4, 6 ) )
return;
if (nParamCount == 6)
@@ -1450,8 +1450,8 @@ void ScInterpreter::ScKumZinsZ()
PushIllegalArgument();
else
{
- ULONG nAnfang = (ULONG) fAnfang;
- ULONG nEnde = (ULONG) fEnde ;
+ sal_uLong nAnfang = (sal_uLong) fAnfang;
+ sal_uLong nEnde = (sal_uLong) fEnde ;
fRmz = ScGetRmz(fZins, fZzr, fBw, 0.0, fF);
fZinsZ = 0.0;
if (nAnfang == 1)
@@ -1460,7 +1460,7 @@ void ScInterpreter::ScKumZinsZ()
fZinsZ = -fBw;
nAnfang++;
}
- for (ULONG i = nAnfang; i <= nEnde; i++)
+ for (sal_uLong i = nAnfang; i <= nEnde; i++)
{
if (fF > 0.0)
fZinsZ += ScGetZw(fZins, (double)(i-2), fRmz, fBw, 1.0) - fRmz;
@@ -1493,8 +1493,8 @@ void ScInterpreter::ScKumKapZ()
{
fRmz = ScGetRmz(fZins, fZzr, fBw, 0.0, fF);
fKapZ = 0.0;
- ULONG nAnfang = (ULONG) fAnfang;
- ULONG nEnde = (ULONG) fEnde;
+ sal_uLong nAnfang = (sal_uLong) fAnfang;
+ sal_uLong nEnde = (sal_uLong) fEnde;
if (nAnfang == 1)
{
if (fF <= 0.0)
@@ -1503,7 +1503,7 @@ void ScInterpreter::ScKumKapZ()
fKapZ = fRmz;
nAnfang++;
}
- for (ULONG i = nAnfang; i <= nEnde; i++)
+ for (sal_uLong i = nAnfang; i <= nEnde; i++)
{
if (fF > 0.0)
fKapZ += fRmz - (ScGetZw(fZins, (double)(i-2), fRmz, fBw, 1.0) - fRmz) * fZins;
@@ -1594,7 +1594,7 @@ void ScInterpreter::ScBackSolver()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBackSolver" );
if ( MustHaveParamCount( GetByte(), 3 ) )
{
- BOOL bDoneIteration = FALSE;
+ sal_Bool bDoneIteration = sal_False;
ScAddress aValueAdr, aFormulaAdr;
double fTargetVal = GetDouble();
PopSingleRef( aFormulaAdr );
@@ -1604,7 +1604,7 @@ void ScInterpreter::ScBackSolver()
{
ScBaseCell* pVCell = GetCell( aValueAdr );
// CELLTYPE_NOTE: kein Value aber von Formel referiert
- BOOL bTempCell = (!pVCell || pVCell->GetCellType() == CELLTYPE_NOTE);
+ sal_Bool bTempCell = (!pVCell || pVCell->GetCellType() == CELLTYPE_NOTE);
ScBaseCell* pFCell = GetCell( aFormulaAdr );
if ( ((pVCell && pVCell->GetCellType() == CELLTYPE_VALUE) || bTempCell)
@@ -1624,7 +1624,7 @@ void ScInterpreter::ScBackSolver()
else
fSaveVal = GetCellValue( aValueAdr, pVCell );
- const USHORT nMaxIter = 100;
+ const sal_uInt16 nMaxIter = 100;
const double fEps = 1E-10;
const double fDelta = 1E-6;
@@ -1636,22 +1636,22 @@ void ScInterpreter::ScBackSolver()
ScValueCell* pValue = (ScValueCell*) pVCell;
pFormula->Interpret();
- BOOL bError = ( pFormula->GetErrCode() != 0 );
+ sal_Bool bError = ( pFormula->GetErrCode() != 0 );
// bError always corresponds with fF
fFPrev = pFormula->GetValue() - fTargetVal;
fBestF = fabs( fFPrev );
if ( fBestF < fDelta )
- bDoneIteration = TRUE;
+ bDoneIteration = sal_True;
double fX = fXPrev + fEps;
double fF = fFPrev;
double fSlope;
- USHORT nIter = 0;
+ sal_uInt16 nIter = 0;
- BOOL bHorMoveError = FALSE;
+ sal_Bool bHorMoveError = sal_False;
// Nach der Regula Falsi Methode
while ( !bDoneIteration && ( nIter++ < nMaxIter ) )
{
@@ -1669,18 +1669,18 @@ void ScInterpreter::ScBackSolver()
// may become zero which ultimately causes the goal seek operation
// to fail. #i28955#
- USHORT nHorIter = 0;
+ sal_uInt16 nHorIter = 0;
const double fHorStepAngle = 5.0;
const double fHorMaxAngle = 80.0;
int nHorMaxIter = static_cast<int>( fHorMaxAngle / fHorStepAngle );
- BOOL bDoneHorMove = FALSE;
+ sal_Bool bDoneHorMove = sal_False;
while ( !bDoneHorMove && !bHorMoveError && nHorIter++ < nHorMaxIter )
{
double fHorAngle = fHorStepAngle * static_cast<double>( nHorIter );
double fHorTangent = ::rtl::math::tan( fHorAngle * F_PI / 180 );
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( nIdx++ < 2 && !bDoneHorMove )
{
double fHorX;
@@ -1700,12 +1700,12 @@ void ScInterpreter::ScBackSolver()
if ( fF != fFPrev )
{
fX = fHorX;
- bDoneHorMove = TRUE;
+ bDoneHorMove = sal_True;
}
}
}
if ( !bDoneHorMove )
- bHorMoveError = TRUE;
+ bHorMoveError = sal_True;
}
if ( bError )
@@ -1722,7 +1722,7 @@ void ScInterpreter::ScBackSolver()
{
// converged to root
fBestX = fX;
- bDoneIteration = TRUE;
+ bDoneIteration = sal_True;
}
else
{
@@ -2054,7 +2054,7 @@ void ScInterpreter::ScCurrent()
void ScInterpreter::ScStyle()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScStyle" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (nParamCount >= 1 && nParamCount <= 3)
{
String aStyle2; // Vorlage nach Timer
@@ -2092,10 +2092,10 @@ void ScInterpreter::ScStyle()
}
ScDdeLink* lcl_GetDdeLink( sfx2::LinkManager* pLinkMgr,
- const String& rA, const String& rT, const String& rI, BYTE nM )
+ const String& rA, const String& rT, const String& rI, sal_uInt8 nM )
{
- USHORT nCount = pLinkMgr->GetLinks().Count();
- for (USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pLinkMgr->GetLinks().Count();
+ for (sal_uInt16 i=0; i<nCount; i++ )
{
::sfx2::SvBaseLink* pBase = *pLinkMgr->GetLinks()[i];
if (pBase->ISA(ScDdeLink))
@@ -2118,12 +2118,12 @@ void ScInterpreter::ScDde()
// Applikation, Datei, Bereich
// Application, Topic, Item
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 4 ) )
{
- BYTE nMode = SC_DDE_DEFAULT;
+ sal_uInt8 nMode = SC_DDE_DEFAULT;
if (nParamCount == 4)
- nMode = (BYTE) ::rtl::math::approxFloor(GetDouble());
+ nMode = (sal_uInt8) ::rtl::math::approxFloor(GetDouble());
String aItem = GetString();
String aTopic = GetString();
String aAppl = GetString();
@@ -2149,8 +2149,8 @@ void ScInterpreter::ScDde()
// solange der Link nicht ausgewertet ist, Idle abklemmen
// (um zirkulaere Referenzen zu vermeiden)
- BOOL bOldDis = pDok->IsIdleDisabled();
- pDok->DisableIdle( TRUE );
+ sal_Bool bOldDis = pDok->IsIdleDisabled();
+ pDok->DisableIdle( sal_True );
// Link-Objekt holen / anlegen
@@ -2159,7 +2159,7 @@ void ScInterpreter::ScDde()
//! Dde-Links (zusaetzlich) effizienter am Dokument speichern !!!!!
// ScDdeLink* pLink = pDok->GetDdeLink( aAppl, aTopic, aItem );
- BOOL bWasError = ( pMyFormulaCell->GetRawError() != 0 );
+ sal_Bool bWasError = ( pMyFormulaCell->GetRawError() != 0 );
if (!pLink)
{
@@ -2215,7 +2215,7 @@ void ScInterpreter::ScDde()
void ScInterpreter::ScBase()
{ // Value, Base [, MinLen]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
static const sal_Unicode __FAR_DATA pDigits[] = {
@@ -2258,10 +2258,10 @@ void ScInterpreter::ScBase()
}
sal_Unicode* p = pBuf + nBuf - 1;
*p = 0;
- if ( fVal <= (ULONG)(~0) )
+ if ( fVal <= (sal_uLong)(~0) )
{
- ULONG nVal = (ULONG) fVal;
- ULONG nBase = (ULONG) fBase;
+ sal_uLong nVal = (sal_uLong) fVal;
+ sal_uLong nBase = (sal_uLong) fBase;
while ( nVal && p > pBuf )
{
*--p = pDigits[ nVal % nBase ];
@@ -2271,7 +2271,7 @@ void ScInterpreter::ScBase()
}
else
{
- BOOL bDirt = FALSE;
+ sal_Bool bDirt = sal_False;
while ( fVal && p > pBuf )
{
//! mit fmod Rundungsfehler ab 2**48
@@ -2301,7 +2301,7 @@ void ScInterpreter::ScBase()
size_t nDig;
if ( fVal < fMult )
{ // da ist was gekippt
- bDirt = TRUE;
+ bDirt = sal_True;
nDig = 0;
}
else
@@ -2309,7 +2309,7 @@ void ScInterpreter::ScBase()
double fDig = ::rtl::math::approxFloor( ::rtl::math::approxSub( fVal, fMult ) );
if ( bDirt )
{
- bDirt = FALSE;
+ bDirt = sal_False;
--fDig;
}
if ( fDig <= 0.0 )
@@ -2422,7 +2422,7 @@ void ScInterpreter::ScConvert()
void ScInterpreter::ScRoman()
{ // Value [Mode]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double fMode = (nParamCount == 2) ? ::rtl::math::approxFloor( GetDouble() ) : 0.0;
@@ -2432,22 +2432,22 @@ void ScInterpreter::ScRoman()
else if( (fMode >= 0.0) && (fMode < 5.0) && (fVal >= 0.0) && (fVal < 4000.0) )
{
static const sal_Unicode pChars[] = { 'M', 'D', 'C', 'L', 'X', 'V', 'I' };
- static const USHORT pValues[] = { 1000, 500, 100, 50, 10, 5, 1 };
- static const USHORT nMaxIndex = (USHORT)(sizeof(pValues) / sizeof(pValues[0]) - 1);
+ static const sal_uInt16 pValues[] = { 1000, 500, 100, 50, 10, 5, 1 };
+ static const sal_uInt16 nMaxIndex = (sal_uInt16)(sizeof(pValues) / sizeof(pValues[0]) - 1);
String aRoman;
- USHORT nVal = (USHORT) fVal;
- USHORT nMode = (USHORT) fMode;
+ sal_uInt16 nVal = (sal_uInt16) fVal;
+ sal_uInt16 nMode = (sal_uInt16) fMode;
- for( UINT16 i = 0; i <= nMaxIndex / 2; i++ )
+ for( sal_uInt16 i = 0; i <= nMaxIndex / 2; i++ )
{
- USHORT nIndex = 2 * i;
- USHORT nDigit = nVal / pValues[ nIndex ];
+ sal_uInt16 nIndex = 2 * i;
+ sal_uInt16 nDigit = nVal / pValues[ nIndex ];
if( (nDigit % 5) == 4 )
{
- USHORT nIndex2 = (nDigit == 4) ? nIndex - 1 : nIndex - 2;
- USHORT nSteps = 0;
+ sal_uInt16 nIndex2 = (nDigit == 4) ? nIndex - 1 : nIndex - 2;
+ sal_uInt16 nSteps = 0;
while( (nSteps < nMode) && (nIndex < nMaxIndex) )
{
nSteps++;
@@ -2458,8 +2458,8 @@ void ScInterpreter::ScRoman()
}
aRoman += pChars[ nIndex ];
aRoman += pChars[ nIndex2 ];
- nVal = sal::static_int_cast<USHORT>( nVal + pValues[ nIndex ] );
- nVal = sal::static_int_cast<USHORT>( nVal - pValues[ nIndex2 ] );
+ nVal = sal::static_int_cast<sal_uInt16>( nVal + pValues[ nIndex ] );
+ nVal = sal::static_int_cast<sal_uInt16>( nVal - pValues[ nIndex2 ] );
}
else
{
@@ -2478,21 +2478,21 @@ void ScInterpreter::ScRoman()
}
-BOOL lcl_GetArabicValue( sal_Unicode cChar, USHORT& rnValue, BOOL& rbIsDec )
+sal_Bool lcl_GetArabicValue( sal_Unicode cChar, sal_uInt16& rnValue, sal_Bool& rbIsDec )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBase" );
switch( cChar )
{
- case 'M': rnValue = 1000; rbIsDec = TRUE; break;
- case 'D': rnValue = 500; rbIsDec = FALSE; break;
- case 'C': rnValue = 100; rbIsDec = TRUE; break;
- case 'L': rnValue = 50; rbIsDec = FALSE; break;
- case 'X': rnValue = 10; rbIsDec = TRUE; break;
- case 'V': rnValue = 5; rbIsDec = FALSE; break;
- case 'I': rnValue = 1; rbIsDec = TRUE; break;
- default: return FALSE;
+ case 'M': rnValue = 1000; rbIsDec = sal_True; break;
+ case 'D': rnValue = 500; rbIsDec = sal_False; break;
+ case 'C': rnValue = 100; rbIsDec = sal_True; break;
+ case 'L': rnValue = 50; rbIsDec = sal_False; break;
+ case 'X': rnValue = 10; rbIsDec = sal_True; break;
+ case 'V': rnValue = 5; rbIsDec = sal_False; break;
+ case 'I': rnValue = 1; rbIsDec = sal_True; break;
+ default: return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -2506,18 +2506,18 @@ void ScInterpreter::ScArabic()
{
aRoman.ToUpperAscii();
- USHORT nValue = 0;
- USHORT nValidRest = 3999;
- USHORT nCharIndex = 0;
- USHORT nCharCount = aRoman.Len();
- BOOL bValid = TRUE;
+ sal_uInt16 nValue = 0;
+ sal_uInt16 nValidRest = 3999;
+ sal_uInt16 nCharIndex = 0;
+ sal_uInt16 nCharCount = aRoman.Len();
+ sal_Bool bValid = sal_True;
while( bValid && (nCharIndex < nCharCount) )
{
- USHORT nDigit1 = 0;
- USHORT nDigit2 = 0;
- BOOL bIsDec1 = FALSE;
- BOOL bIsDec2 = FALSE;
+ sal_uInt16 nDigit1 = 0;
+ sal_uInt16 nDigit2 = 0;
+ sal_Bool bIsDec1 = sal_False;
+ sal_Bool bIsDec2 = sal_False;
bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex ), nDigit1, bIsDec1 );
if( bValid && (nCharIndex + 1 < nCharCount) )
bValid = lcl_GetArabicValue( aRoman.GetChar( nCharIndex + 1 ), nDigit2, bIsDec2 );
@@ -2525,24 +2525,24 @@ void ScInterpreter::ScArabic()
{
if( nDigit1 >= nDigit2 )
{
- nValue = sal::static_int_cast<USHORT>( nValue + nDigit1 );
+ nValue = sal::static_int_cast<sal_uInt16>( nValue + nDigit1 );
nValidRest %= (nDigit1 * (bIsDec1 ? 5 : 2));
bValid = (nValidRest >= nDigit1);
if( bValid )
- nValidRest = sal::static_int_cast<USHORT>( nValidRest - nDigit1 );
+ nValidRest = sal::static_int_cast<sal_uInt16>( nValidRest - nDigit1 );
nCharIndex++;
}
else if( nDigit1 * 2 != nDigit2 )
{
- USHORT nDiff = nDigit2 - nDigit1;
- nValue = sal::static_int_cast<USHORT>( nValue + nDiff );
+ sal_uInt16 nDiff = nDigit2 - nDigit1;
+ nValue = sal::static_int_cast<sal_uInt16>( nValue + nDiff );
bValid = (nValidRest >= nDiff);
if( bValid )
nValidRest = nDigit1 - 1;
nCharIndex += 2;
}
else
- bValid = FALSE;
+ bValid = sal_False;
}
}
if( bValid )
@@ -2556,7 +2556,7 @@ void ScInterpreter::ScArabic()
void ScInterpreter::ScHyperLink()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScHyperLink" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1, 2 ) )
{
double fVal = 0.0;
@@ -2585,7 +2585,7 @@ void ScInterpreter::ScHyperLink()
nResultType = SC_MATVAL_EMPTY;
else
{
- USHORT nErr = GetCellErrCode( pCell );
+ sal_uInt16 nErr = GetCellErrCode( pCell );
if (nErr)
SetError( nErr);
else if (HasCellValueData( pCell))
@@ -2638,7 +2638,7 @@ void ScInterpreter::ScHyperLink()
}
-BOOL lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
+sal_Bool lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
{
struct ConvertInfo
{
@@ -2672,14 +2672,14 @@ BOOL lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
{
rfRate = aConvertTable[i].fRate;
rnDec = aConvertTable[i].nDec;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void ScInterpreter::ScEuroConvert()
{ //Value, FromUnit, ToUnit[, FullPrecision, [TriangulationPrecision]]
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 3, 5 ) )
{
double nPrecision = 0.0;
@@ -2692,7 +2692,7 @@ void ScInterpreter::ScEuroConvert()
return;
}
}
- BOOL bFullPrecision = FALSE;
+ sal_Bool bFullPrecision = sal_False;
if ( nParamCount >= 4 )
bFullPrecision = GetBool();
String aToUnit( GetString() );
@@ -2863,7 +2863,7 @@ void lclAppendBlock( ByteString& rText, sal_Int32 nValue )
void ScInterpreter::ScBahtText()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBahtText" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 1 ) )
{
double fValue = GetDouble();
@@ -2932,7 +2932,7 @@ void ScInterpreter::ScBahtText()
void ScInterpreter::ScGetPivotData()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGetPivotData" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 30 ) )
{
@@ -2959,14 +2959,14 @@ void ScInterpreter::ScGetPivotData()
{
// new syntax: separate name/value pairs
- USHORT nFilterCount = nParamCount / 2 - 1;
+ sal_uInt16 nFilterCount = nParamCount / 2 - 1;
aFilters.resize( nFilterCount );
- USHORT i = nFilterCount;
+ sal_uInt16 i = nFilterCount;
while( i-- > 0 )
{
//! should allow numeric constraint values
- aFilters[i].mbValIsStr = TRUE;
+ aFilters[i].mbValIsStr = sal_True;
aFilters[i].maValStr = GetString();
aFilters[i].maFieldName = GetString();
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index bcea57703d78..dfcce4c06c3f 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -211,7 +211,7 @@ double ScInterpreter::integralPhi(double x)
return 0.5 * ::rtl::math::erfc(-x * 0.7071067811865475); // * 1/sqrt(2)
}
-double ScInterpreter::taylor(double* pPolynom, USHORT nMax, double x)
+double ScInterpreter::taylor(double* pPolynom, sal_uInt16 nMax, double x)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::taylor" );
double nVal = pPolynom[nMax];
@@ -250,7 +250,7 @@ double ScInterpreter::gauss(double x)
double asympt[] = { -1.0, 1.0, -3.0, 15.0, -105.0 };
double xAbs = fabs(x);
- USHORT xShort = (USHORT)::rtl::math::approxFloor(xAbs);
+ sal_uInt16 xShort = (sal_uInt16)::rtl::math::approxFloor(xAbs);
double nVal = 0.0;
if (xShort == 0)
nVal = taylor(t0, 11, (xAbs * xAbs)) * xAbs;
@@ -683,7 +683,7 @@ double ScInterpreter::GetTDist(double T, double fDF)
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetTDist" );
return 0.5 * GetBetaDist(fDF/(fDF+T*T), fDF/2.0, 0.5);
/*
- USHORT DF = (USHORT) fDF;
+ sal_uInt16 DF = (sal_uInt16) fDF;
double A = T / sqrt(DF);
double B = 1.0 + A*A;
double R;
@@ -693,7 +693,7 @@ double ScInterpreter::GetTDist(double T, double fDF)
{
double S0 = A/(2.0 * sqrt(B));
double C0 = S0;
- for (USHORT i = 2; i <= DF-2; i+=2)
+ for (sal_uInt16 i = 2; i <= DF-2; i+=2)
{
C0 *= (1.0 - 1.0/(double)i)/B;
S0 += C0;
@@ -704,7 +704,7 @@ double ScInterpreter::GetTDist(double T, double fDF)
{
double S1 = A / (B * F_PI);
double C1 = S1;
- for (USHORT i = 3; i <= DF-2; i+=2)
+ for (sal_uInt16 i = 3; i <= DF-2; i+=2)
{
C1 *= (1.0 - 1.0/(double)i)/B;
S1 += C1;
@@ -779,7 +779,7 @@ double ScInterpreter::GetChiSqDistPDF(double fX, double fDF)
void ScInterpreter::ScChiSqDist()
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
double fX;
@@ -1069,7 +1069,7 @@ double ScInterpreter::GetBetaDist(double fXin, double fAlpha, double fBeta)
void ScInterpreter::ScBetaDist()
{
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 6 ) ) // expanded, see #i91547#
return;
double fLowerBound, fUpperBound;
@@ -1205,7 +1205,7 @@ void ScInterpreter::ScVariationen()
else
{
double nVal = n;
- for (ULONG i = (ULONG)k-1; i >= 1; i--)
+ for (sal_uLong i = (sal_uLong)k-1; i >= 1; i--)
nVal *= n-(double)i;
PushDouble(nVal);
}
@@ -1229,7 +1229,7 @@ void ScInterpreter::ScVariationen2()
void ScInterpreter::ScB()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScB" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4 ) )
return ;
if (nParamCount == 3)
@@ -1250,16 +1250,16 @@ void ScInterpreter::ScB()
PushNoValue();
else
{
- ULONG max = (ULONG) (n - x);
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) (n - x);
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*q/p;
PushDouble(fFactor);
}
}
else
{
- ULONG max = (ULONG) x;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) x;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*p/q;
PushDouble(fFactor);
}
@@ -1294,16 +1294,16 @@ void ScInterpreter::ScB()
else
{
double fSum = 0.0;
- ULONG max;
- if (xe < (ULONG) n)
- max = (ULONG) (n-xe)-1;
+ sal_uLong max;
+ if (xe < (sal_uLong) n)
+ max = (sal_uLong) (n-xe)-1;
else
max = 0;
- ULONG i;
+ sal_uLong i;
for (i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*q/p;
- if (xs < (ULONG) n)
- max = (ULONG) (n-xs);
+ if (xs < (sal_uLong) n)
+ max = (sal_uLong) (n-xs);
else
fSum = fFactor;
for (; i < max && fFactor > 0.0; i++)
@@ -1316,25 +1316,25 @@ void ScInterpreter::ScB()
}
else
{
- ULONG max;
+ sal_uLong max;
double fSum;
- if ( (ULONG) xs == 0)
+ if ( (sal_uLong) xs == 0)
{
fSum = fFactor;
max = 0;
}
else
{
- max = (ULONG) xs-1;
+ max = (sal_uLong) xs-1;
fSum = 0.0;
}
- ULONG i;
+ sal_uLong i;
for (i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*p/q;
- if ((ULONG)xe == 0) // beide 0
+ if ((sal_uLong)xe == 0) // beide 0
fSum = fFactor;
else
- max = (ULONG) xe;
+ max = (sal_uLong) xe;
for (; i < max && fFactor > 0.0; i++)
{
fFactor *= (n-i)/(i+1)*p/q;
@@ -1383,16 +1383,16 @@ void ScInterpreter::ScBinomDist()
PushNoValue();
else
{
- ULONG max = (ULONG) (n - x);
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) (n - x);
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*q/p;
PushDouble(fFactor);
}
}
else
{
- ULONG max = (ULONG) x;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) x;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
fFactor *= (n-i)/(i+1)*p/q;
PushDouble(fFactor);
}
@@ -1413,8 +1413,8 @@ void ScInterpreter::ScBinomDist()
else
{
fSum = 1.0 - fFactor;
- ULONG max = (ULONG) (n - x) - 1;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) (n - x) - 1;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
{
fFactor *= (n-i)/(i+1)*q/p;
fSum -= fFactor;
@@ -1428,8 +1428,8 @@ void ScInterpreter::ScBinomDist()
else
{
fSum = fFactor;
- ULONG max = (ULONG) x;
- for (ULONG i = 0; i < max && fFactor > 0.0; i++)
+ sal_uLong max = (sal_uLong) x;
+ for (sal_uLong i = 0; i < max && fFactor > 0.0; i++)
{
fFactor *= (n-i)/(i+1)*p/q;
fSum += fFactor;
@@ -1462,8 +1462,8 @@ void ScInterpreter::ScCritBinom()
PushNoValue();
else
{
- double fSum = 1.0 - fFactor; ULONG max = (ULONG) n;
- ULONG i;
+ double fSum = 1.0 - fFactor; sal_uLong max = (sal_uLong) n;
+ sal_uLong i;
for ( i = 0; i < max && fSum >= alpha; i++)
{
@@ -1475,8 +1475,8 @@ void ScInterpreter::ScCritBinom()
}
else
{
- double fSum = fFactor; ULONG max = (ULONG) n;
- ULONG i;
+ double fSum = fFactor; sal_uLong max = (sal_uLong) n;
+ sal_uLong i;
for ( i = 0; i < max && fSum < alpha; i++)
{
@@ -1513,7 +1513,7 @@ void ScInterpreter::ScNegBinomDist()
void ScInterpreter::ScNormDist()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScNormDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4))
return;
bool bCumulative = nParamCount == 4 ? GetBool() : true;
@@ -1534,7 +1534,7 @@ void ScInterpreter::ScNormDist()
void ScInterpreter::ScLogNormDist() //expanded, see #i100119#
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLogNormDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 4))
return;
bool bCumulative = nParamCount == 4 ? GetBool() : true; // cumulative
@@ -1675,7 +1675,7 @@ void ScInterpreter::ScWeibull()
void ScInterpreter::ScPoissonDist()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPoissonDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( MustHaveParamCount( nParamCount, 2, 3 ) )
{
bool bCumulative = (nParamCount == 3 ? GetBool() : true); // default cumulative
@@ -1977,7 +1977,7 @@ void ScInterpreter::ScHypGeomDist()
void ScInterpreter::ScGammaDist()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGammaDist" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4 ) )
return;
double bCumulative;
@@ -2097,7 +2097,7 @@ public:
void ScInterpreter::ScBetaInv()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScBetaInv" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 5 ) )
return;
double fP, fA, fB, fAlpha, fBeta;
@@ -2289,7 +2289,7 @@ void ScInterpreter::ScConfidence()
void ScInterpreter::ScZTest()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScZTest" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
double sigma = 0.0, mue, x;
@@ -2340,7 +2340,7 @@ void ScInterpreter::ScZTest()
while (nParam-- > 0)
{
ScRange aRange;
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParam, nRefInList);
ScValueIterator aValIter(pDok, aRange, glSubTotal);
if (aValIter.GetFirst(fVal, nErr))
@@ -2405,7 +2405,7 @@ void ScInterpreter::ScZTest()
PushDouble(0.5 - gauss((mue-x)*sqrt(rValCount)/sigma));
}
}
-bool ScInterpreter::CalculateTest(BOOL _bTemplin
+bool ScInterpreter::CalculateTest(sal_Bool _bTemplin
,const SCSIZE nC1, const SCSIZE nC2,const SCSIZE nR1,const SCSIZE nR2
,const ScMatrixRef& pMat1,const ScMatrixRef& pMat2
,double& fT,double& fF)
@@ -2538,11 +2538,11 @@ void ScInterpreter::ScTTest()
}
else if (fTyp == 2.0)
{
- CalculateTest(FALSE,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
+ CalculateTest(sal_False,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
}
else if (fTyp == 3.0)
{
- CalculateTest(TRUE,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
+ CalculateTest(sal_True,nC1, nC2,nR1, nR2,pMat1,pMat2,fT,fF);
}
else
@@ -2795,7 +2795,7 @@ void ScInterpreter::ScHarMean()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -2916,7 +2916,7 @@ void ScInterpreter::ScGeoMean()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -3050,7 +3050,7 @@ bool ScInterpreter::CalculateSkew(double& fSum,double& fCount,double& vSum,std::
case svRefList :
{
PopDoubleRef( aRange, nParamCount, nRefInList);
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
ScValueIterator aValIter(pDok, aRange);
if (aValIter.GetFirst(fVal, nErr))
{
@@ -3172,7 +3172,7 @@ double ScInterpreter::GetMedian( vector<double> & rArray )
void ScInterpreter::ScMedian()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMedian" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
vector<double> aArray;
@@ -3246,7 +3246,7 @@ void ScInterpreter::ScQuartile()
void ScInterpreter::ScModalValue()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScModalValue" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
vector<double> aSortArray;
@@ -3289,7 +3289,7 @@ void ScInterpreter::ScModalValue()
}
}
-void ScInterpreter::CalculateSmallLarge(BOOL bSmall)
+void ScInterpreter::CalculateSmallLarge(sal_Bool bSmall)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSmallLarge" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -3323,19 +3323,19 @@ void ScInterpreter::CalculateSmallLarge(BOOL bSmall)
void ScInterpreter::ScLarge()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLarge" );
- CalculateSmallLarge(FALSE);
+ CalculateSmallLarge(sal_False);
}
void ScInterpreter::ScSmall()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSmall" );
- CalculateSmallLarge(TRUE);
+ CalculateSmallLarge(sal_True);
}
void ScInterpreter::ScPercentrank()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPercentrank" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2 ) )
return;
#if 0
@@ -3425,7 +3425,7 @@ void ScInterpreter::ScTrimMean()
PushNoValue();
else
{
- ULONG nIndex = (ULONG) ::rtl::math::approxFloor(alpha*(double)nSize);
+ sal_uLong nIndex = (sal_uLong) ::rtl::math::approxFloor(alpha*(double)nSize);
if (nIndex % 2 != 0)
nIndex--;
nIndex /= 2;
@@ -3437,7 +3437,7 @@ void ScInterpreter::ScTrimMean()
}
}
-void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector<double>& rArray )
+void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double>& rArray )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetSortArray" );
ScAddress aAdr;
@@ -3471,7 +3471,7 @@ void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector<double>& rA
nCellCount *= aRange.aEnd.Row() - aRange.aStart.Row() + 1;
rArray.reserve( rArray.size() + nCellCount);
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double fCellVal;
ScValueIterator aValIter(pDok, aRange);
if (aValIter.GetFirst( fCellVal, nErr))
@@ -3519,7 +3519,7 @@ void ScInterpreter::GetNumberSequenceArray( BYTE nParamCount, vector<double>& rA
PopError();
}
-void ScInterpreter::GetSortArray( BYTE nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder )
+void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder )
{
GetNumberSequenceArray( nParamCount, rSortArray);
@@ -3614,16 +3614,16 @@ void ScInterpreter::QuickSort( vector<double>& rSortArray, vector<long>* pIndexO
void ScInterpreter::ScRank()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRank" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2, 3 ) )
return;
- BOOL bDescending;
+ sal_Bool bDescending;
if (nParamCount == 3)
bDescending = GetBool();
else
- bDescending = FALSE;
+ bDescending = sal_False;
double fCount = 1.0;
- BOOL bValid = FALSE;
+ sal_Bool bValid = sal_False;
switch (GetStackType())
{
case formula::svDouble :
@@ -3631,7 +3631,7 @@ void ScInterpreter::ScRank()
double x = GetDouble();
double fVal = GetDouble();
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
break;
}
case svSingleRef :
@@ -3644,7 +3644,7 @@ void ScInterpreter::ScRank()
{
double x = GetCellValue( aAdr, pCell );
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
}
break;
}
@@ -3656,9 +3656,9 @@ void ScInterpreter::ScRank()
size_t nRefInList = 0;
while (nParam-- > 0)
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
// Preserve stack until all RefList elements are done!
- USHORT nSaveSP = sp;
+ sal_uInt16 nSaveSP = sp;
PopDoubleRef( aRange, nParam, nRefInList);
if (nParam)
--sp; // simulate pop
@@ -3670,7 +3670,7 @@ void ScInterpreter::ScRank()
if (aValIter.GetFirst(nCellVal, nErr))
{
if (nCellVal == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && nCellVal > fVal) ||
(bDescending && nCellVal < fVal) )
fCount++;
@@ -3678,7 +3678,7 @@ void ScInterpreter::ScRank()
while ((nErr == 0) && aValIter.GetNext(nCellVal, nErr))
{
if (nCellVal == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && nCellVal > fVal) ||
(bDescending && nCellVal < fVal) )
fCount++;
@@ -3701,7 +3701,7 @@ void ScInterpreter::ScRank()
{
double x = pMat->GetDouble(i);
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && x > fVal) ||
(bDescending && x < fVal) )
fCount++;
@@ -3714,7 +3714,7 @@ void ScInterpreter::ScRank()
{
double x = pMat->GetDouble(i);
if (x == fVal)
- bValid = TRUE;
+ bValid = sal_True;
else if ((!bDescending && x > fVal) ||
(bDescending && x < fVal) )
fCount++;
@@ -3734,10 +3734,10 @@ void ScInterpreter::ScRank()
void ScInterpreter::ScAveDev()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAveDev" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
- USHORT SaveSP = sp;
+ sal_uInt16 SaveSP = sp;
double nMiddle = 0.0;
double rVal = 0.0;
double rValCount = 0.0;
@@ -3767,7 +3767,7 @@ void ScInterpreter::ScAveDev()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nCellVal;
PopDoubleRef( aRange, nParam, nRefInList);
ScValueIterator aValIter(pDok, aRange);
@@ -3844,7 +3844,7 @@ void ScInterpreter::ScAveDev()
case formula::svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nCellVal;
PopDoubleRef( aRange, nParam, nRefInList);
ScValueIterator aValIter(pDok, aRange);
@@ -3898,7 +3898,7 @@ void ScInterpreter::ScDevSq()
void ScInterpreter::ScProbability()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScProbability" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 3, 4 ) )
return;
double fUp, fLo;
@@ -3930,7 +3930,7 @@ void ScInterpreter::ScProbability()
{
double fSum = 0.0;
double fRes = 0.0;
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
double fP, fW;
SCSIZE nCount1 = nC1 * nR1;
for ( SCSIZE i = 0; i < nCount1 && !bStop; i++ )
@@ -3940,7 +3940,7 @@ void ScInterpreter::ScProbability()
fP = pMatP->GetDouble(i);
fW = pMatW->GetDouble(i);
if (fP < 0.0 || fP > 1.0)
- bStop = TRUE;
+ bStop = sal_True;
else
{
fSum += fP;
@@ -3969,15 +3969,15 @@ void ScInterpreter::ScCorrel()
void ScInterpreter::ScCovar()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCovar" );
- CalculatePearsonCovar(FALSE,FALSE);
+ CalculatePearsonCovar(sal_False,sal_False);
}
void ScInterpreter::ScPearson()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPearson" );
- CalculatePearsonCovar(TRUE,FALSE);
+ CalculatePearsonCovar(sal_True,sal_False);
}
-void ScInterpreter::CalculatePearsonCovar(BOOL _bPearson,BOOL _bStexy)
+void ScInterpreter::CalculatePearsonCovar(sal_Bool _bPearson,sal_Bool _bStexy)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculatePearsonCovar" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -4088,9 +4088,9 @@ void ScInterpreter::ScRSQ()
void ScInterpreter::ScSTEXY()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSTEXY" );
- CalculatePearsonCovar(TRUE,TRUE);
+ CalculatePearsonCovar(sal_True,sal_True);
}
-void ScInterpreter::CalculateSlopeIntercept(BOOL bSlope)
+void ScInterpreter::CalculateSlopeIntercept(sal_Bool bSlope)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSlopeIntercept" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -4165,13 +4165,13 @@ void ScInterpreter::CalculateSlopeIntercept(BOOL bSlope)
void ScInterpreter::ScSlope()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSlope" );
- CalculateSlopeIntercept(TRUE);
+ CalculateSlopeIntercept(sal_True);
}
void ScInterpreter::ScIntercept()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIntercept" );
- CalculateSlopeIntercept(FALSE);
+ CalculateSlopeIntercept(sal_False);
}
void ScInterpreter::ScForecast()
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 899e2cd17e25..7a4ac7ecdac8 100755
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -136,31 +136,31 @@ void ScInterpreter::ReplaceCell( SCCOL& rCol, SCROW& rRow, SCTAB& rTab )
}
-BOOL ScInterpreter::IsTableOpInRange( const ScRange& rRange )
+sal_Bool ScInterpreter::IsTableOpInRange( const ScRange& rRange )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsTableOpInRange" );
if ( rRange.aStart == rRange.aEnd )
- return FALSE; // not considered to be a range in TableOp sense
+ return sal_False; // not considered to be a range in TableOp sense
// we can't replace a single cell in a range
ScInterpreterTableOpParams* pTOp = pDok->aTableOpList.First();
while (pTOp)
{
if ( rRange.In( pTOp->aOld1 ) )
- return TRUE;
+ return sal_True;
if ( rRange.In( pTOp->aOld2 ) )
- return TRUE;
+ return sal_True;
pTOp = pDok->aTableOpList.Next();
}
- return FALSE;
+ return sal_False;
}
-ULONG ScInterpreter::GetCellNumberFormat( const ScAddress& rPos, const ScBaseCell* pCell)
+sal_uLong ScInterpreter::GetCellNumberFormat( const ScAddress& rPos, const ScBaseCell* pCell)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetCellNumberFormat" );
- ULONG nFormat;
- USHORT nErr;
+ sal_uLong nFormat;
+ sal_uInt16 nErr;
if ( pCell )
{
if ( pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -190,7 +190,7 @@ double ScInterpreter::GetValueCellValue( const ScAddress& rPos, const ScValueCel
double fVal = pCell->GetValue();
if ( bCalcAsShown && fVal != 0.0 )
{
- ULONG nFormat = pDok->GetNumberFormat( rPos );
+ sal_uLong nFormat = pDok->GetNumberFormat( rPos );
fVal = pDok->RoundValueAsShown( fVal, nFormat );
}
return fVal;
@@ -382,9 +382,9 @@ double ScInterpreter::ConvertStringToValue( const String& rStr )
::rtl::math::pow10Exp( nUnit[fraction],
static_cast<int>( -ceil( log10( static_cast<double>( nUnit[fraction]))))));
fValue = (bDate ? GetDateSerial(
- sal::static_int_cast<INT16>(nUnit[year]),
- sal::static_int_cast<INT16>(nUnit[month]),
- sal::static_int_cast<INT16>(nUnit[day]),
+ sal::static_int_cast<sal_Int16>(nUnit[year]),
+ sal::static_int_cast<sal_Int16>(nUnit[month]),
+ sal::static_int_cast<sal_Int16>(nUnit[day]),
true) : 0.0);
fValue += ((nUnit[hour] * 3600) + (nUnit[minute] * 60) + nUnit[second] + fFraction) / 86400.0;
}
@@ -404,7 +404,7 @@ double ScInterpreter::ConvertStringToValue( const String& rStr )
double ScInterpreter::GetCellValue( const ScAddress& rPos, const ScBaseCell* pCell )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetCellValue" );
- USHORT nErr = nGlobalError;
+ sal_uInt16 nErr = nGlobalError;
nGlobalError = 0;
double nVal = GetCellValueOrZero( rPos, pCell );
if ( !nGlobalError || nGlobalError == errCellNoValue )
@@ -425,7 +425,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, const ScBaseCel
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = (ScFormulaCell*) pCell;
- USHORT nErr = pFCell->GetErrCode();
+ sal_uInt16 nErr = pFCell->GetErrCode();
if( !nErr )
{
if (pFCell->IsValue())
@@ -492,7 +492,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, const ScBaseCel
void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetCellString" );
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
if (pCell)
{
switch (pCell->GetCellType())
@@ -510,7 +510,7 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
if (pFCell->IsValue())
{
double fVal = pFCell->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, rStr);
@@ -522,7 +522,7 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
case CELLTYPE_VALUE:
{
double fVal = ((ScValueCell*) pCell)->GetValue();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, rStr);
@@ -539,29 +539,29 @@ void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
}
-BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
- SCCOL nCol2, SCROW nRow2, SCTAB nTab2, BYTE* pCellArr)
+sal_Bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateDoubleArr" );
- // Old Add-Ins are hard limited to USHORT values.
+ // Old Add-Ins are hard limited to sal_uInt16 values.
#if MAXCOLCOUNT_DEFINE > USHRT_MAX
#error Add check for columns > USHRT_MAX!
#endif
if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
- return FALSE;
-
- USHORT nCount = 0;
- USHORT* p = (USHORT*) pCellArr;
- *p++ = static_cast<USHORT>(nCol1);
- *p++ = static_cast<USHORT>(nRow1);
- *p++ = static_cast<USHORT>(nTab1);
- *p++ = static_cast<USHORT>(nCol2);
- *p++ = static_cast<USHORT>(nRow2);
- *p++ = static_cast<USHORT>(nTab2);
- USHORT* pCount = p;
+ return sal_False;
+
+ sal_uInt16 nCount = 0;
+ sal_uInt16* p = (sal_uInt16*) pCellArr;
+ *p++ = static_cast<sal_uInt16>(nCol1);
+ *p++ = static_cast<sal_uInt16>(nRow1);
+ *p++ = static_cast<sal_uInt16>(nTab1);
+ *p++ = static_cast<sal_uInt16>(nCol2);
+ *p++ = static_cast<sal_uInt16>(nRow2);
+ *p++ = static_cast<sal_uInt16>(nTab2);
+ sal_uInt16* pCount = p;
*p++ = 0;
- USHORT nPos = 14;
+ sal_uInt16 nPos = 14;
SCTAB nTab = nTab1;
ScAddress aAdr;
while (nTab <= nTab2)
@@ -578,9 +578,9 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScBaseCell* pCell = pDok->GetCell( aAdr );
if (pCell)
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
double nVal = 0.0;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
switch ( pCell->GetCellType() )
{
case CELLTYPE_VALUE :
@@ -593,23 +593,23 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nVal = ((ScFormulaCell*)pCell)->GetValue();
}
else
- bOk = FALSE;
+ bOk = sal_False;
break;
default :
- bOk = FALSE;
+ bOk = sal_False;
break;
}
if (bOk)
{
- if ((nPos + (4 * sizeof(USHORT)) + sizeof(double)) > MAXARRSIZE)
- return FALSE;
- *p++ = static_cast<USHORT>(nCol);
- *p++ = static_cast<USHORT>(nRow);
- *p++ = static_cast<USHORT>(nTab);
+ if ((nPos + (4 * sizeof(sal_uInt16)) + sizeof(double)) > MAXARRSIZE)
+ return sal_False;
+ *p++ = static_cast<sal_uInt16>(nCol);
+ *p++ = static_cast<sal_uInt16>(nRow);
+ *p++ = static_cast<sal_uInt16>(nTab);
*p++ = nErr;
memcpy( p, &nVal, sizeof(double));
nPos += 8 + sizeof(double);
- p = (USHORT*) ( pCellArr + nPos );
+ p = (sal_uInt16*) ( pCellArr + nPos );
nCount++;
}
}
@@ -620,34 +620,34 @@ BOOL ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nTab++;
}
*pCount = nCount;
- return TRUE;
+ return sal_True;
}
-BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+sal_Bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- BYTE* pCellArr)
+ sal_uInt8* pCellArr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateStringArr" );
- // Old Add-Ins are hard limited to USHORT values.
+ // Old Add-Ins are hard limited to sal_uInt16 values.
#if MAXCOLCOUNT_DEFINE > USHRT_MAX
#error Add check for columns > USHRT_MAX!
#endif
if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
- return FALSE;
-
- USHORT nCount = 0;
- USHORT* p = (USHORT*) pCellArr;
- *p++ = static_cast<USHORT>(nCol1);
- *p++ = static_cast<USHORT>(nRow1);
- *p++ = static_cast<USHORT>(nTab1);
- *p++ = static_cast<USHORT>(nCol2);
- *p++ = static_cast<USHORT>(nRow2);
- *p++ = static_cast<USHORT>(nTab2);
- USHORT* pCount = p;
+ return sal_False;
+
+ sal_uInt16 nCount = 0;
+ sal_uInt16* p = (sal_uInt16*) pCellArr;
+ *p++ = static_cast<sal_uInt16>(nCol1);
+ *p++ = static_cast<sal_uInt16>(nRow1);
+ *p++ = static_cast<sal_uInt16>(nTab1);
+ *p++ = static_cast<sal_uInt16>(nCol2);
+ *p++ = static_cast<sal_uInt16>(nRow2);
+ *p++ = static_cast<sal_uInt16>(nTab2);
+ sal_uInt16* pCount = p;
*p++ = 0;
- USHORT nPos = 14;
+ sal_uInt16 nPos = 14;
SCTAB nTab = nTab1;
while (nTab <= nTab2)
{
@@ -662,8 +662,8 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
if (pCell)
{
String aStr;
- USHORT nErr = 0;
- BOOL bOk = TRUE;
+ sal_uInt16 nErr = 0;
+ sal_Bool bOk = sal_True;
switch ( pCell->GetCellType() )
{
case CELLTYPE_STRING :
@@ -679,10 +679,10 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
((ScFormulaCell*)pCell)->GetString(aStr);
}
else
- bOk = FALSE;
+ bOk = sal_False;
break;
default :
- bOk = FALSE;
+ bOk = sal_False;
break;
}
if (bOk)
@@ -690,26 +690,26 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ByteString aTmp( aStr, osl_getThreadTextEncoding() );
// In case the xub_StrLen will be longer than USHORT
// one day, and room for pad byte check.
- if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
- return FALSE;
+ if ( aTmp.Len() > ((sal_uInt16)(~0)) - 2 )
+ return sal_False;
// Append a 0-pad-byte if string length is not even
- //! MUST be USHORT and not xub_StrLen
- USHORT nStrLen = (USHORT) aTmp.Len();
- USHORT nLen = ( nStrLen + 2 ) & ~1;
-
- if (((ULONG)nPos + (5 * sizeof(USHORT)) + nLen) > MAXARRSIZE)
- return FALSE;
- *p++ = static_cast<USHORT>(nCol);
- *p++ = static_cast<USHORT>(nRow);
- *p++ = static_cast<USHORT>(nTab);
+ //! MUST be sal_uInt16 and not xub_StrLen
+ sal_uInt16 nStrLen = (sal_uInt16) aTmp.Len();
+ sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
+
+ if (((sal_uLong)nPos + (5 * sizeof(sal_uInt16)) + nLen) > MAXARRSIZE)
+ return sal_False;
+ *p++ = static_cast<sal_uInt16>(nCol);
+ *p++ = static_cast<sal_uInt16>(nRow);
+ *p++ = static_cast<sal_uInt16>(nTab);
*p++ = nErr;
*p++ = nLen;
memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
nPos += 10 + nStrLen + 1;
- BYTE* q = ( pCellArr + nPos );
+ sal_uInt8* q = ( pCellArr + nPos );
if( !nStrLen & 1 )
*q++ = 0, nPos++;
- p = (USHORT*) ( pCellArr + nPos );
+ p = (sal_uInt16*) ( pCellArr + nPos );
nCount++;
}
}
@@ -720,34 +720,34 @@ BOOL ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nTab++;
}
*pCount = nCount;
- return TRUE;
+ return sal_True;
}
-BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+sal_Bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- BYTE* pCellArr)
+ sal_uInt8* pCellArr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CreateCellArr" );
- // Old Add-Ins are hard limited to USHORT values.
+ // Old Add-Ins are hard limited to sal_uInt16 values.
#if MAXCOLCOUNT_DEFINE > USHRT_MAX
#error Add check for columns > USHRT_MAX!
#endif
if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX)
- return FALSE;
-
- USHORT nCount = 0;
- USHORT* p = (USHORT*) pCellArr;
- *p++ = static_cast<USHORT>(nCol1);
- *p++ = static_cast<USHORT>(nRow1);
- *p++ = static_cast<USHORT>(nTab1);
- *p++ = static_cast<USHORT>(nCol2);
- *p++ = static_cast<USHORT>(nRow2);
- *p++ = static_cast<USHORT>(nTab2);
- USHORT* pCount = p;
+ return sal_False;
+
+ sal_uInt16 nCount = 0;
+ sal_uInt16* p = (sal_uInt16*) pCellArr;
+ *p++ = static_cast<sal_uInt16>(nCol1);
+ *p++ = static_cast<sal_uInt16>(nRow1);
+ *p++ = static_cast<sal_uInt16>(nTab1);
+ *p++ = static_cast<sal_uInt16>(nCol2);
+ *p++ = static_cast<sal_uInt16>(nRow2);
+ *p++ = static_cast<sal_uInt16>(nTab2);
+ sal_uInt16* pCount = p;
*p++ = 0;
- USHORT nPos = 14;
+ sal_uInt16 nPos = 14;
SCTAB nTab = nTab1;
ScAddress aAdr;
while (nTab <= nTab2)
@@ -764,11 +764,11 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScBaseCell* pCell = pDok->GetCell( aAdr );
if (pCell)
{
- USHORT nErr = 0;
- USHORT nType = 0; // 0 = Zahl; 1 = String
+ sal_uInt16 nErr = 0;
+ sal_uInt16 nType = 0; // 0 = Zahl; 1 = String
double nVal = 0.0;
String aStr;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
switch ( pCell->GetCellType() )
{
case CELLTYPE_STRING :
@@ -790,23 +790,23 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
((ScFormulaCell*)pCell)->GetString(aStr);
break;
default :
- bOk = FALSE;
+ bOk = sal_False;
break;
}
if (bOk)
{
- if ((nPos + (5 * sizeof(USHORT))) > MAXARRSIZE)
- return FALSE;
- *p++ = static_cast<USHORT>(nCol);
- *p++ = static_cast<USHORT>(nRow);
- *p++ = static_cast<USHORT>(nTab);
+ if ((nPos + (5 * sizeof(sal_uInt16))) > MAXARRSIZE)
+ return sal_False;
+ *p++ = static_cast<sal_uInt16>(nCol);
+ *p++ = static_cast<sal_uInt16>(nRow);
+ *p++ = static_cast<sal_uInt16>(nTab);
*p++ = nErr;
*p++ = nType;
nPos += 10;
if (nType == 0)
{
if ((nPos + sizeof(double)) > MAXARRSIZE)
- return FALSE;
+ return sal_False;
memcpy( p, &nVal, sizeof(double));
nPos += sizeof(double);
}
@@ -815,23 +815,23 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ByteString aTmp( aStr, osl_getThreadTextEncoding() );
// In case the xub_StrLen will be longer than USHORT
// one day, and room for pad byte check.
- if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
- return FALSE;
+ if ( aTmp.Len() > ((sal_uInt16)(~0)) - 2 )
+ return sal_False;
// Append a 0-pad-byte if string length is not even
- //! MUST be USHORT and not xub_StrLen
- USHORT nStrLen = (USHORT) aTmp.Len();
- USHORT nLen = ( nStrLen + 2 ) & ~1;
- if ( ((ULONG)nPos + 2 + nLen) > MAXARRSIZE)
- return FALSE;
+ //! MUST be sal_uInt16 and not xub_StrLen
+ sal_uInt16 nStrLen = (sal_uInt16) aTmp.Len();
+ sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
+ if ( ((sal_uLong)nPos + 2 + nLen) > MAXARRSIZE)
+ return sal_False;
*p++ = nLen;
memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
nPos += 2 + nStrLen + 1;
- BYTE* q = ( pCellArr + nPos );
+ sal_uInt8* q = ( pCellArr + nPos );
if( !nStrLen & 1 )
*q++ = 0, nPos++;
}
nCount++;
- p = (USHORT*) ( pCellArr + nPos );
+ p = (sal_uInt16*) ( pCellArr + nPos );
}
}
nCol++;
@@ -841,7 +841,7 @@ BOOL ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
nTab++;
}
*pCount = nCount;
- return TRUE;
+ return sal_True;
}
@@ -957,7 +957,7 @@ void ScInterpreter::PushTempToken( const FormulaToken& r )
void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString,
- const ScAddress & rAddress, short * pRetTypeExpr, ULONG * pRetIndexExpr )
+ const ScAddress & rAddress, short * pRetTypeExpr, sal_uLong * pRetIndexExpr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PushCellResultToken" );
ScBaseCell* pCell = pDok->GetCell( rAddress);
@@ -969,7 +969,7 @@ void ScInterpreter::PushCellResultToken( bool bDisplayEmptyAsString,
PushTempToken( new ScEmptyCellToken( bInherited, bDisplayEmptyAsString));
return;
}
- USHORT nErr;
+ sal_uInt16 nErr;
if ((nErr = pCell->GetErrorCode()) != 0)
{
PushError( nErr);
@@ -1219,7 +1219,7 @@ void ScInterpreter::PopSingleRef( ScAddress& rAdr )
void ScInterpreter::DoubleRefToVars( const ScToken* p,
SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp )
+ sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToVars" );
const ScComplexRefData& rCRef = p->GetDoubleRef();
@@ -1272,7 +1272,7 @@ ScDBRangeBase* ScInterpreter::PopDoubleRef()
void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- BOOL bDontCheckForTableOp )
+ sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRef" );
if( sp )
@@ -1298,7 +1298,7 @@ void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
void ScInterpreter::DoubleRefToRange( const ScComplexRefData & rCRef,
- ScRange & rRange, BOOL bDontCheckForTableOp )
+ ScRange & rRange, sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToRange" );
SCCOL nCol;
@@ -1363,7 +1363,7 @@ void ScInterpreter::PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRe
}
-void ScInterpreter::PopDoubleRef( ScRange& rRange, BOOL bDontCheckForTableOp )
+void ScInterpreter::PopDoubleRef( ScRange& rRange, sal_Bool bDontCheckForTableOp )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRef" );
if( sp )
@@ -1387,7 +1387,7 @@ void ScInterpreter::PopDoubleRef( ScRange& rRange, BOOL bDontCheckForTableOp )
}
-BOOL ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr )
+sal_Bool ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PopDoubleRefOrSingleRef" );
switch ( GetStackType() )
@@ -1395,21 +1395,21 @@ BOOL ScInterpreter::PopDoubleRefOrSingleRef( ScAddress& rAdr )
case svDoubleRef :
{
ScRange aRange;
- PopDoubleRef( aRange, TRUE );
+ PopDoubleRef( aRange, sal_True );
return DoubleRefToPosSingleRef( aRange, rAdr );
}
//break;
case svSingleRef :
{
PopSingleRef( rAdr );
- return TRUE;
+ return sal_True;
}
//break;
default:
PopError();
SetError( errNoRef );
}
- return FALSE;
+ return sal_False;
}
@@ -1439,10 +1439,10 @@ ScTokenMatrixMap* ScInterpreter::CreateTokenMatrixMap()
bool ScInterpreter::ConvertMatrixParameters()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ConvertMatrixParameters" );
- USHORT nParams = pCur->GetParamCount();
+ sal_uInt16 nParams = pCur->GetParamCount();
DBG_ASSERT( nParams <= sp, "ConvertMatrixParameters: stack/param count mismatch");
SCSIZE nJumpCols = 0, nJumpRows = 0;
- for ( USHORT i=1; i <= nParams && i <= sp; ++i )
+ for ( sal_uInt16 i=1; i <= nParams && i <= sp; ++i )
{
FormulaToken* p = pStack[ sp - i ];
if ( p->GetOpCode() != ocPush )
@@ -1547,7 +1547,7 @@ bool ScInterpreter::ConvertMatrixParameters()
pJumpMat->SetAllJumps( 1.0, nStart, nNext, nStop);
// pop parameters and store in ScJumpMatrix, push in JumpMatrix()
ScTokenVec* pParams = new ScTokenVec( nParams);
- for ( USHORT i=1; i <= nParams && sp > 0; ++i )
+ for ( sal_uInt16 i=1; i <= nParams && sp > 0; ++i )
{
FormulaToken* p = pStack[ --sp ];
p->IncRef();
@@ -1681,7 +1681,7 @@ void ScInterpreter::PushMatrix(ScMatrix* pMat)
}
-void ScInterpreter::PushError( USHORT nError )
+void ScInterpreter::PushError( sal_uInt16 nError )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::PushError" );
SetError( nError ); // only sets error if not already set
@@ -1723,7 +1723,7 @@ void ScInterpreter::PushNoValue()
}
-BOOL ScInterpreter::IsMissing()
+sal_Bool ScInterpreter::IsMissing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::IsMissing" );
return sp && pStack[sp - 1]->GetType() == svMissing;
@@ -1766,7 +1766,7 @@ StackVar ScInterpreter::GetStackType()
}
-StackVar ScInterpreter::GetStackType( BYTE nParam )
+StackVar ScInterpreter::GetStackType( sal_uInt8 nParam )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetStackType" );
StackVar eRes;
@@ -1782,17 +1782,17 @@ StackVar ScInterpreter::GetStackType( BYTE nParam )
}
-BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr )
+sal_Bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& rAdr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DoubleRefToPosSingleRef" );
// Check for a singleton first - no implicit intersection for them.
if( rRange.aStart == rRange.aEnd )
{
rAdr = rRange.aStart;
- return TRUE;
+ return sal_True;
}
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if ( pJumpMatrix )
{
@@ -1827,13 +1827,13 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
nRow = rRange.aStart.Row();
if ( nRow == rRange.aEnd.Row() )
{
- bOk = TRUE;
+ bOk = sal_True;
nCol = nMyCol;
}
else if ( nTab != nMyTab && nTab == rRange.aEnd.Tab()
&& rRange.aStart.Row() <= nMyRow && nMyRow <= rRange.aEnd.Row() )
{
- bOk = TRUE;
+ bOk = sal_True;
nCol = nMyCol;
nRow = nMyRow;
}
@@ -1843,13 +1843,13 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
nCol = rRange.aStart.Col();
if ( nCol == rRange.aEnd.Col() )
{
- bOk = TRUE;
+ bOk = sal_True;
nRow = nMyRow;
}
else if ( nTab != nMyTab && nTab == rRange.aEnd.Tab()
&& rRange.aStart.Col() <= nMyCol && nMyCol <= rRange.aEnd.Col() )
{
- bOk = TRUE;
+ bOk = sal_True;
nCol = nMyCol;
nRow = nMyRow;
}
@@ -1861,7 +1861,7 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
else if ( nTab <= nMyTab && nMyTab <= rRange.aEnd.Tab() )
nTab = nMyTab;
else
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
rAdr.Set( nCol, nRow, nTab );
}
@@ -1975,7 +1975,7 @@ const String& ScInterpreter::GetString()
case svDouble:
{
double fVal = PopDouble();
- ULONG nIndex = pFormatter->GetStandardFormat(
+ sal_uLong nIndex = pFormatter->GetStandardFormat(
NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
pFormatter->GetInputLineString(fVal, nIndex, aTempStr);
@@ -2102,7 +2102,7 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( double& rDouble,
void ScInterpreter::ScDBGet()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBGet" );
- BOOL bMissingField = FALSE;
+ sal_Bool bMissingField = sal_False;
auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (!pQueryParam.get())
{
@@ -2139,8 +2139,8 @@ void ScInterpreter::ScDBGet()
void ScInterpreter::ScExternal()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScExternal" );
- USHORT nIndex;
- BYTE nParamCount = GetByte();
+ sal_uInt16 nIndex;
+ sal_uInt8 nParamCount = GetByte();
String aUnoName;
String aFuncName( ScGlobal::pCharClass->upper( pCur->GetExternal() ) );
if (ScGlobal::GetFuncCollection()->SearchFunc(aFuncName, nIndex))
@@ -2152,7 +2152,7 @@ void ScInterpreter::ScExternal()
void* ppParam[MAXFUNCPARAM];
double nVal[MAXFUNCPARAM];
sal_Char* pStr[MAXFUNCPARAM];
- BYTE* pCellArr[MAXFUNCPARAM];
+ sal_uInt8* pCellArr[MAXFUNCPARAM];
short i;
for (i = 0; i < MAXFUNCPARAM; i++)
@@ -2197,7 +2197,7 @@ void ScInterpreter::ScExternal()
SCROW nRow2;
SCTAB nTab2;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- pCellArr[i-1] = new BYTE[MAXARRSIZE];
+ pCellArr[i-1] = new sal_uInt8[MAXARRSIZE];
if (!CreateDoubleArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, pCellArr[i-1]))
SetError(errCodeOverflow);
else
@@ -2213,7 +2213,7 @@ void ScInterpreter::ScExternal()
SCROW nRow2;
SCTAB nTab2;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- pCellArr[i-1] = new BYTE[MAXARRSIZE];
+ pCellArr[i-1] = new sal_uInt8[MAXARRSIZE];
if (!CreateStringArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, pCellArr[i-1]))
SetError(errCodeOverflow);
else
@@ -2229,7 +2229,7 @@ void ScInterpreter::ScExternal()
SCROW nRow2;
SCTAB nTab2;
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- pCellArr[i-1] = new BYTE[MAXARRSIZE];
+ pCellArr[i-1] = new sal_uInt8[MAXARRSIZE];
if (!CreateCellArr(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, pCellArr[i-1]))
SetError(errCodeOverflow);
else
@@ -2282,7 +2282,7 @@ void ScInterpreter::ScExternal()
double nErg = 0.0;
ppParam[0] = &nErg;
pFuncData->Call(ppParam);
- ULONG nHandle = ULONG( nErg );
+ sal_uLong nHandle = sal_uLong( nErg );
if ( nHandle >= 65536 )
{
ScAddInAsync* pAs = ScAddInAsync::Get( nHandle );
@@ -2334,9 +2334,9 @@ void ScInterpreter::ScExternal()
PushIllegalParameter();
}
}
- else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, FALSE) ).Len() )
+ else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, sal_False) ).Len() )
{
- // bLocalFirst=FALSE in FindFunction, cFunc should be the stored internal name
+ // bLocalFirst=sal_False in FindFunction, cFunc should be the stored internal name
ScUnoAddInCall aCall( *ScGlobal::GetAddInCollection(), aUnoName, nParamCount );
@@ -2362,7 +2362,7 @@ void ScInterpreter::ScExternal()
--nPar; // 0 .. (nParamCount-1)
ScAddInArgumentType eType = aCall.GetArgType( nPar );
- BYTE nStackType = sal::static_int_cast<BYTE>( GetStackType() );
+ sal_uInt8 nStackType = sal::static_int_cast<sal_uInt8>( GetStackType() );
uno::Any aParam;
switch (eType)
@@ -2373,7 +2373,7 @@ void ScInterpreter::ScExternal()
double fInt = (fVal >= 0.0) ? ::rtl::math::approxFloor( fVal ) :
::rtl::math::approxCeil( fVal );
if ( fInt >= LONG_MIN && fInt <= LONG_MAX )
- aParam <<= (INT32)fInt;
+ aParam <<= (sal_Int32)fInt;
else
SetError(errIllegalArgument);
}
@@ -2399,9 +2399,9 @@ void ScInterpreter::ScExternal()
::rtl::math::approxCeil( fVal );
if ( fInt >= LONG_MIN && fInt <= LONG_MAX )
{
- INT32 nIntVal = (long)fInt;
- uno::Sequence<INT32> aInner( &nIntVal, 1 );
- uno::Sequence< uno::Sequence<INT32> > aOuter( &aInner, 1 );
+ sal_Int32 nIntVal = (long)fInt;
+ uno::Sequence<sal_Int32> aInner( &nIntVal, 1 );
+ uno::Sequence< uno::Sequence<sal_Int32> > aOuter( &aInner, 1 );
aParam <<= aOuter;
}
else
@@ -2695,7 +2695,7 @@ void ScInterpreter::ScMacro()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMacro" );
SbxBase::ResetError();
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
String aMacro( pCur->GetExternal() );
SfxObjectShell* pDocSh = pDok->GetDocumentShell();
@@ -2740,11 +2740,11 @@ void ScInterpreter::ScMacro()
// Parameter-Array zusammenbauen
SbxArrayRef refPar = new SbxArray;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
for( short i = nParamCount; i && bOk ; i-- )
{
- SbxVariable* pPar = refPar->Get( (USHORT) i );
- BYTE nStackType = sal::static_int_cast<BYTE>( GetStackType() );
+ SbxVariable* pPar = refPar->Get( (sal_uInt16) i );
+ sal_uInt8 nStackType = sal::static_int_cast<sal_uInt8>( GetStackType() );
switch( nStackType )
{
case svDouble:
@@ -2772,7 +2772,7 @@ void ScInterpreter::ScMacro()
if( nTab1 != nTab2 )
{
SetError( errIllegalParameter );
- bOk = FALSE;
+ bOk = sal_False;
}
else
{
@@ -2783,7 +2783,7 @@ void ScInterpreter::ScMacro()
for( SCROW nRow = nRow1; bOk && nRow <= nRow2; nRow++ )
{
aAdr.SetRow( nRow );
- INT32 nIdx[ 2 ];
+ sal_Int32 nIdx[ 2 ];
nIdx[ 0 ] = nRow-nRow1+1;
for( SCCOL nCol = nCol1; bOk && nCol <= nCol2; nCol++ )
{
@@ -2805,15 +2805,15 @@ void ScInterpreter::ScMacro()
{
pMat->GetDimensions(nC, nR);
SbxDimArrayRef refArray = new SbxDimArray;
- refArray->AddDim32( 1, static_cast<INT32>(nR) );
- refArray->AddDim32( 1, static_cast<INT32>(nC) );
+ refArray->AddDim32( 1, static_cast<sal_Int32>(nR) );
+ refArray->AddDim32( 1, static_cast<sal_Int32>(nC) );
for( SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++ )
{
- INT32 nIdx[ 2 ];
- nIdx[ 0 ] = static_cast<INT32>(nMatRow+1);
+ sal_Int32 nIdx[ 2 ];
+ nIdx[ 0 ] = static_cast<sal_Int32>(nMatRow+1);
for( SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++ )
{
- nIdx[ 1 ] = static_cast<INT32>(nMatCol+1);
+ nIdx[ 1 ] = static_cast<sal_Int32>(nMatCol+1);
SbxVariable* p = refArray->Get32( nIdx );
if (pMat->IsString(nMatCol, nMatRow))
p->PutString( pMat->GetString(nMatCol, nMatRow) );
@@ -2829,7 +2829,7 @@ void ScInterpreter::ScMacro()
break;
default:
SetError( errIllegalParameter );
- bOk = FALSE;
+ bOk = sal_False;
}
}
if( bOk )
@@ -2855,7 +2855,7 @@ void ScInterpreter::ScMacro()
short nDim = pDimArray->GetDims();
if ( 1 <= nDim && nDim <= 2 )
{
- INT32 nCs, nCe, nRs, nRe;
+ sal_Int32 nCs, nCe, nRs, nRe;
SCSIZE nC, nR;
SCCOL nColIdx;
SCROW nRowIdx;
@@ -2884,13 +2884,13 @@ void ScInterpreter::ScMacro()
SbxDataType eType;
for ( SCSIZE j=0; j < nR; j++ )
{
- INT32 nIdx[ 2 ];
+ sal_Int32 nIdx[ 2 ];
// bei eindimensionalem array( cols ) wird nIdx[1]
// von SbxDimArray::Get ignoriert
- nIdx[ nRowIdx ] = nRs + static_cast<INT32>(j);
+ nIdx[ nRowIdx ] = nRs + static_cast<sal_Int32>(j);
for ( SCSIZE i=0; i < nC; i++ )
{
- nIdx[ nColIdx ] = nCs + static_cast<INT32>(i);
+ nIdx[ nColIdx ] = nCs + static_cast<sal_Int32>(i);
pV = pDimArray->Get32( nIdx );
eType = pV->GetType();
if ( eType >= SbxINTEGER && eType <= SbxDOUBLE )
@@ -2913,14 +2913,14 @@ void ScInterpreter::ScMacro()
}
-BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
+sal_Bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::SetSbxVariable" );
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
ScBaseCell* pCell = pDok->GetCell( rPos );
if (pCell)
{
- USHORT nErr;
+ sal_uInt16 nErr;
double nVal;
switch( pCell->GetCellType() )
{
@@ -2959,7 +2959,7 @@ BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
}
}
else
- SetError( nErr ), bOk = FALSE;
+ SetError( nErr ), bOk = sal_False;
break;
default :
pVar->PutDouble( 0.0 );
@@ -2974,7 +2974,7 @@ BOOL ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
void ScInterpreter::ScTableOp()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTableOp" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if (nParamCount != 3 && nParamCount != 5)
{
PushIllegalParameter();
@@ -2990,15 +2990,15 @@ void ScInterpreter::ScTableOp()
PopSingleRef( pTableOp->aOld1 );
PopSingleRef( pTableOp->aFormulaPos );
- pTableOp->bValid = TRUE;
+ pTableOp->bValid = sal_True;
pDok->aTableOpList.Insert( pTableOp );
pDok->IncInterpreterTableOpLevel();
- BOOL bReuseLastParams = (pDok->aLastTableOpParams == *pTableOp);
+ sal_Bool bReuseLastParams = (pDok->aLastTableOpParams == *pTableOp);
if ( bReuseLastParams )
{
pTableOp->aNotifiedFormulaPos = pDok->aLastTableOpParams.aNotifiedFormulaPos;
- pTableOp->bRefresh = TRUE;
+ pTableOp->bRefresh = sal_True;
for ( ::std::vector< ScAddress >::const_iterator iBroadcast(
pTableOp->aNotifiedFormulaPos.begin() );
iBroadcast != pTableOp->aNotifiedFormulaPos.end();
@@ -3015,7 +3015,7 @@ void ScInterpreter::ScTableOp()
if ( nParamCount == 5 )
pDok->SetTableOpDirty( pTableOp->aOld2 );
}
- pTableOp->bCollectNotifications = FALSE;
+ pTableOp->bCollectNotifications = sal_False;
ScBaseCell* pFCell = pDok->GetCell( pTableOp->aFormulaPos );
if ( pFCell && pFCell->GetCellType() == CELLTYPE_FORMULA )
@@ -3071,7 +3071,7 @@ void ScInterpreter::ScErrCell()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScErrCell" );
double fErrNum = GetDouble();
- PushError((USHORT) fErrNum);
+ PushError((sal_uInt16) fErrNum);
}
*/
@@ -3120,7 +3120,7 @@ void ScInterpreter::ScColRowNameAuto()
(SCROW&) aRefData.Ref1.nRow,
(SCCOL&) aRefData.Ref2.nCol,
(SCROW&) aRefData.Ref2.nRow,
- TRUE, false );
+ sal_True, false );
// DataArea im Ursprung begrenzen
aRefData.Ref1.nCol = nStartCol;
aRefData.Ref1.nRow = nStartRow;
@@ -3260,7 +3260,7 @@ void ScInterpreter::ScExternalRef()
void ScInterpreter::ScTTT()
{ // Temporaerer Test-Tanz, zum auspropieren von Funktionen etc.
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
// do something, nParamCount bei Pops runterzaehlen!
// Stack aufraeumen
@@ -3287,11 +3287,11 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTTT" );
// pStack = new ScToken*[ MAXSTACK ];
- BYTE cMatFlag = pMyFormulaCell->GetMatrixFlag();
+ sal_uInt8 cMatFlag = pMyFormulaCell->GetMatrixFlag();
bMatrixFormula = ( cMatFlag == MM_FORMULA || cMatFlag == MM_FAKE );
if (!bGlobalStackInUse)
{
- bGlobalStackInUse = TRUE;
+ bGlobalStackInUse = sal_True;
if (!pGlobalStack)
pGlobalStack = new ScTokenStack;
pStackObj = pGlobalStack;
@@ -3308,7 +3308,7 @@ ScInterpreter::~ScInterpreter()
// delete pStack;
if ( pStackObj == pGlobalStack )
- bGlobalStackInUse = FALSE;
+ bGlobalStackInUse = sal_False;
else
delete pStackObj;
if (pTokenMatrixMap)
@@ -3328,10 +3328,10 @@ StackVar ScInterpreter::Interpret()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Interpret" );
short nRetTypeExpr = NUMBERFORMAT_UNDEFINED;
- ULONG nRetIndexExpr = 0;
- USHORT nErrorFunction = 0;
- USHORT nErrorFunctionCount = 0;
- USHORT nStackBase;
+ sal_uLong nRetIndexExpr = 0;
+ sal_uInt16 nErrorFunction = 0;
+ sal_uInt16 nErrorFunctionCount = 0;
+ sal_uInt16 nStackBase;
nGlobalError = 0;
nStackBase = sp = maxsp = 0;
@@ -3340,7 +3340,7 @@ StackVar ScInterpreter::Interpret()
nFuncFmtIndex = nCurFmtIndex = nRetFmtIndex = 0;
xResult = NULL;
pJumpMatrix = NULL;
- glSubTotal = FALSE;
+ glSubTotal = sal_False;
ScTokenMatrixMap::const_iterator aTokenMatrixMapIter;
// Once upon a time we used to have FP exceptions on, and there was a
@@ -3532,28 +3532,28 @@ StackVar ScInterpreter::Interpret()
case ocGetTime : ScGetTime(); break;
case ocGetDiffDate : ScGetDiffDate(); break;
case ocGetDiffDate360 : ScGetDiffDate360(); break;
- case ocMin : ScMin( FALSE ); break;
- case ocMinA : ScMin( TRUE ); break;
- case ocMax : ScMax( FALSE ); break;
- case ocMaxA : ScMax( TRUE ); break;
+ case ocMin : ScMin( sal_False ); break;
+ case ocMinA : ScMin( sal_True ); break;
+ case ocMax : ScMax( sal_False ); break;
+ case ocMaxA : ScMax( sal_True ); break;
case ocSum : ScSum(); break;
case ocProduct : ScProduct(); break;
case ocNPV : ScNPV(); break;
case ocIRR : ScIRR(); break;
case ocMIRR : ScMIRR(); break;
case ocISPMT : ScISPMT(); break;
- case ocAverage : ScAverage( FALSE ); break;
- case ocAverageA : ScAverage( TRUE ); break;
+ case ocAverage : ScAverage( sal_False ); break;
+ case ocAverageA : ScAverage( sal_True ); break;
case ocCount : ScCount(); break;
case ocCount2 : ScCount2(); break;
- case ocVar : ScVar( FALSE ); break;
- case ocVarA : ScVar( TRUE ); break;
- case ocVarP : ScVarP( FALSE ); break;
- case ocVarPA : ScVarP( TRUE ); break;
- case ocStDev : ScStDev( FALSE ); break;
- case ocStDevA : ScStDev( TRUE ); break;
- case ocStDevP : ScStDevP( FALSE ); break;
- case ocStDevPA : ScStDevP( TRUE ); break;
+ case ocVar : ScVar( sal_False ); break;
+ case ocVarA : ScVar( sal_True ); break;
+ case ocVarP : ScVarP( sal_False ); break;
+ case ocVarPA : ScVarP( sal_True ); break;
+ case ocStDev : ScStDev( sal_False ); break;
+ case ocStDevA : ScStDev( sal_True ); break;
+ case ocStDevP : ScStDevP( sal_False ); break;
+ case ocStDevPA : ScStDevP( sal_True ); break;
case ocBW : ScBW(); break;
case ocDIA : ScDIA(); break;
case ocGDA : ScGDA(); break;
@@ -3760,7 +3760,7 @@ StackVar ScInterpreter::Interpret()
do
{
bGotResult = false;
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
if ( GetStackType( ++nLevel ) == svJumpMatrix )
; // nothing
else if ( GetStackType( ++nLevel ) == svJumpMatrix )
@@ -3890,7 +3890,7 @@ StackVar ScInterpreter::Interpret()
if (ScMatrix::IsNonValueType( nMatValType))
{
if ( xMat->IsEmptyPath( 0, 0))
- { // result of empty FALSE jump path
+ { // result of empty sal_False jump path
FormulaTokenRef xRes = new FormulaDoubleToken( 0.0);
PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
nRetTypeExpr = NUMBERFORMAT_LOGICAL;
@@ -3905,7 +3905,7 @@ StackVar ScInterpreter::Interpret()
}
else
{
- USHORT nErr = GetDoubleErrorValue( pMatVal->fVal);
+ sal_uInt16 nErr = GetDoubleErrorValue( pMatVal->fVal);
FormulaTokenRef xRes;
if (nErr)
xRes = new FormulaErrorToken( nErr);
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 73794cf15b2d..cf22b23e69ef 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -152,7 +152,7 @@ void ScInterpreter::ScGCD()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -241,7 +241,7 @@ void ScInterpreter:: ScLCM()
case svDoubleRef :
case svRefList :
{
- USHORT nErr = 0;
+ sal_uInt16 nErr = 0;
PopDoubleRef( aRange, nParamCount, nRefInList);
double nCellVal;
ScValueIterator aValIter(pDok, aRange, glSubTotal);
@@ -547,7 +547,7 @@ void ScInterpreter::ScMatValue()
ScBaseCell* pCell = GetCell( aAdr );
if (pCell && pCell->GetCellType() == CELLTYPE_FORMULA)
{
- USHORT nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
+ sal_uInt16 nErrCode = ((ScFormulaCell*)pCell)->GetErrCode();
if (nErrCode != 0)
PushError( nErrCode);
else
@@ -846,7 +846,7 @@ void ScInterpreter::ScMatDet()
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
- if ( nC != nR || nC == 0 || (ULONG) nC * nC > ScMatrix::GetElementsMax() )
+ if ( nC != nR || nC == 0 || (sal_uLong) nC * nC > ScMatrix::GetElementsMax() )
PushIllegalArgument();
else
{
@@ -893,7 +893,7 @@ void ScInterpreter::ScMatInv()
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
- if ( nC != nR || nC == 0 || (ULONG) nC * nC > ScMatrix::GetElementsMax() )
+ if ( nC != nR || nC == 0 || (sal_uLong) nC * nC > ScMatrix::GetElementsMax() )
PushIllegalArgument();
else
{
@@ -1118,7 +1118,7 @@ ScMatrixRef ScInterpreter::MatConcat(ScMatrix* pMat1, ScMatrix* pMat2)
{
for (j = 0; j < nMinR; j++)
{
- USHORT nErr = pMat1->GetErrorIfNotString( i, j);
+ sal_uInt16 nErr = pMat1->GetErrorIfNotString( i, j);
if (!nErr)
nErr = pMat2->GetErrorIfNotString( i, j);
if (nErr)
@@ -1167,9 +1167,9 @@ void lcl_GetDiffDateTimeFmtType( short& nFuncFmt, short nFmt1, short nFmt2 )
void ScInterpreter::ScAdd()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScAdd" );
- CalculateAddSub(FALSE);
+ CalculateAddSub(sal_False);
}
-void ScInterpreter::CalculateAddSub(BOOL _bSub)
+void ScInterpreter::CalculateAddSub(sal_Bool _bSub)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateAddSub" );
ScMatrixRef pMat1 = NULL;
@@ -1178,7 +1178,7 @@ void ScInterpreter::CalculateAddSub(BOOL _bSub)
short nFmt1, nFmt2;
nFmt1 = nFmt2 = NUMBERFORMAT_UNDEFINED;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtPercentType = nCurFmtType;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1244,18 +1244,18 @@ void ScInterpreter::CalculateAddSub(BOOL _bSub)
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = sal_False; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1329,18 +1329,18 @@ void ScInterpreter::ScAmpersand()
else if (pMat1 || pMat2)
{
String sStr;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
sStr = sStr1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
sStr = sStr2;
- bFlag = FALSE; // Matrix - double
+ bFlag = sal_False; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1357,7 +1357,7 @@ void ScInterpreter::ScAmpersand()
{
for ( SCSIZE i = 0; i < nCount; i++ )
{
- USHORT nErr = pMat->GetErrorIfNotString( i);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( i);
if (nErr)
pResMat->PutError( nErr, i);
else
@@ -1372,7 +1372,7 @@ void ScInterpreter::ScAmpersand()
{
for ( SCSIZE i = 0; i < nCount; i++ )
{
- USHORT nErr = pMat->GetErrorIfNotString( i);
+ sal_uInt16 nErr = pMat->GetErrorIfNotString( i);
if (nErr)
pResMat->PutError( nErr, i);
else
@@ -1399,7 +1399,7 @@ void ScInterpreter::ScAmpersand()
void ScInterpreter::ScSub()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSub" );
- CalculateAddSub(TRUE);
+ CalculateAddSub(sal_True);
}
void ScInterpreter::ScMul()
@@ -1409,7 +1409,7 @@ void ScInterpreter::ScMul()
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
else
@@ -1488,7 +1488,7 @@ void ScInterpreter::ScDiv()
ScMatrixRef pMat2 = NULL;
double fVal1 = 0.0, fVal2 = 0.0;
short nFmtCurrencyType = nCurFmtType;
- ULONG nFmtCurrencyIndex = nCurFmtIndex;
+ sal_uLong nFmtCurrencyIndex = nCurFmtIndex;
short nFmtCurrencyType2 = NUMBERFORMAT_UNDEFINED;
if ( GetStackType() == svMatrix )
pMat2 = GetMatrix();
@@ -1523,18 +1523,18 @@ void ScInterpreter::ScDiv()
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = sal_False; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1605,18 +1605,18 @@ void ScInterpreter::ScPow()
else if (pMat1 || pMat2)
{
double fVal;
- BOOL bFlag;
+ sal_Bool bFlag;
ScMatrixRef pMat = pMat1;
if (!pMat)
{
fVal = fVal1;
pMat = pMat2;
- bFlag = TRUE; // double - Matrix
+ bFlag = sal_True; // double - Matrix
}
else
{
fVal = fVal2;
- bFlag = FALSE; // Matrix - double
+ bFlag = sal_False; // Matrix - double
}
SCSIZE nC, nR;
pMat->GetDimensions(nC, nR);
@@ -1650,7 +1650,7 @@ void ScInterpreter::ScPow()
void ScInterpreter::ScSumProduct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumProduct" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 30 ) )
return;
@@ -1668,7 +1668,7 @@ void ScInterpreter::ScSumProduct()
pMat2->GetDimensions(nC, nR);
pMat = pMat2;
MatrixMul aMul;
- for (USHORT i = 1; i < nParamCount; i++)
+ for (sal_uInt16 i = 1; i < nParamCount; i++)
{
pMat1 = GetMatrix();
if (!pMat1)
@@ -1704,9 +1704,9 @@ void ScInterpreter::ScSumProduct()
void ScInterpreter::ScSumX2MY2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2MY2" );
- CalculateSumX2MY2SumX2DY2(FALSE);
+ CalculateSumX2MY2SumX2DY2(sal_False);
}
-void ScInterpreter::CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2)
+void ScInterpreter::CalculateSumX2MY2SumX2DY2(sal_Bool _bSumX2DY2)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateSumX2MY2SumX2DY2" );
if ( !MustHaveParamCount( GetByte(), 2 ) )
@@ -1750,7 +1750,7 @@ void ScInterpreter::CalculateSumX2MY2SumX2DY2(BOOL _bSumX2DY2)
void ScInterpreter::ScSumX2DY2()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSumX2DY2" );
- CalculateSumX2MY2SumX2DY2(TRUE);
+ CalculateSumX2MY2SumX2DY2(sal_True);
}
void ScInterpreter::ScSumXMY2()
@@ -1852,15 +1852,15 @@ void ScInterpreter::ScFrequency()
PushMatrix(pResMat);
}
-BOOL ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX,
- SCSIZE nC, SCSIZE nR, BOOL bSwapColRow, BOOL bZeroConstant )
+sal_Bool ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX,
+ SCSIZE nC, SCSIZE nR, sal_Bool bSwapColRow, sal_Bool bZeroConstant )
{ // multiple Regression: Varianzen der Koeffizienten
- // bSwapColRow==TRUE : Koeffizienten in Zeilen statt Spalten angeordnet
+ // bSwapColRow==sal_True : Koeffizienten in Zeilen statt Spalten angeordnet
SCSIZE i, j, k;
double sum;
ScMatrixRef pC = GetNewMat(nC, nC);
if ( !pC )
- return FALSE;
+ return sal_False;
// X transformiert mit X multipziert, X'X Matrix
if ( !bZeroConstant )
{ // in der X-Designmatrix existiert ein gedachtes X0j==1
@@ -1931,17 +1931,17 @@ BOOL ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX,
}
}
// X'X Inverse
- BOOL bOk = TRUE;
- USHORT nErr = nGlobalError;
+ sal_Bool bOk = sal_True;
+ sal_uInt16 nErr = nGlobalError;
PushMatrix(pC);
- BYTE nTmp = cPar;
+ sal_uInt8 nTmp = cPar;
cPar = 1;
ScMatInv();
cPar = nTmp;
if ( nGlobalError )
{
nGlobalError = nErr;
- bOk = FALSE;
+ bOk = sal_False;
}
else
{
@@ -1957,7 +1957,7 @@ BOOL ScInterpreter::RGetVariances( ScMatrix* pV, ScMatrix* pX,
return bOk;
}
// -----------------------------------------------------------------------------
-void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,BOOL bConstant,SCSIZE N,SCSIZE M,BYTE nCase)
+void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef& pQ,ScMatrixRef& pV,ScMatrixRef& pMatX,sal_Bool bConstant,SCSIZE N,SCSIZE M,sal_uInt8 nCase)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::RGetVariances" );
// pE[0] := Sigma i=1...n (Yi)
@@ -2000,7 +2000,7 @@ void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef&
pResMat->PutDouble(sqrt(fSE2), 1, 2);
// sen...se1 (Standardfehler der Koeffizienten mn...m1)
// seb (Standardfehler der Konstanten b)
- if ( RGetVariances( pV, pMatX, M+1, N, nCase != 2, FALSE ) )
+ if ( RGetVariances( pV, pMatX, M+1, N, nCase != 2, sal_False ) )
{
for (i = 0; i < M+1; i++)
pResMat->PutDouble( sqrt(fSE2 * pV->GetDouble(i)), M-i, 1 );
@@ -2031,7 +2031,7 @@ void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef&
{
double fSE2 = fSQR/(N-M);
pResMat->PutDouble(sqrt(fSE2), 1, 2);
- if ( RGetVariances( pV, pMatX, M, N, nCase != 2, TRUE ) )
+ if ( RGetVariances( pV, pMatX, M, N, nCase != 2, sal_True ) )
{
for (i = 0; i < M; i++)
pResMat->PutDouble( sqrt(fSE2 * pV->GetDouble(i)), M-i-1, 1 );
@@ -2054,9 +2054,9 @@ void ScInterpreter::Calculate(ScMatrixRef& pResMat,ScMatrixRef& pE,ScMatrixRef&
void ScInterpreter::ScRGP()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRGP" );
- CalulateRGPRKP(FALSE);
+ CalulateRGPRKP(sal_False);
}
-bool ScInterpreter::CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY)
+bool ScInterpreter::CheckMatrix(sal_Bool _bLOG,sal_Bool _bTrendGrowth,sal_uInt8& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY)
{
nCX = 0;
nCY = 0;
@@ -2154,21 +2154,21 @@ bool ScInterpreter::CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE
}
return true;
}
-void ScInterpreter::CalulateRGPRKP(BOOL _bRKP)
+void ScInterpreter::CalulateRGPRKP(sal_Bool _bRKP)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CheckMatrix" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 4 ) )
return;
- BOOL bConstant, bStats;
+ sal_Bool bConstant, bStats;
if (nParamCount == 4)
bStats = GetBool();
else
- bStats = FALSE;
+ bStats = sal_False;
if (nParamCount >= 3)
bConstant = GetBool();
else
- bConstant = TRUE;
+ bConstant = sal_True;
ScMatrixRef pMatX;
ScMatrixRef pMatY;
if (nParamCount >= 2)
@@ -2181,11 +2181,11 @@ void ScInterpreter::CalulateRGPRKP(BOOL _bRKP)
PushIllegalParameter();
return;
} // if (!pMatY)
- BYTE nCase; // 1 = normal, 2,3 = mehrfach
+ sal_uInt8 nCase; // 1 = normal, 2,3 = mehrfach
SCSIZE nCX, nCY;
SCSIZE nRX, nRY;
SCSIZE M = 0, N = 0;
- if ( !CheckMatrix(_bRKP,FALSE,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) )
+ if ( !CheckMatrix(_bRKP,sal_False,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) )
return;
ScMatrixRef pResMat;
@@ -2356,10 +2356,10 @@ void ScInterpreter::CalulateRGPRKP(BOOL _bRKP)
void ScInterpreter::ScRKP()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScRKP" );
- CalulateRGPRKP(TRUE);
+ CalulateRGPRKP(sal_True);
}
// -----------------------------------------------------------------------------
-bool ScInterpreter::Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,BOOL bConstant,SCSIZE N,SCSIZE M)
+bool ScInterpreter::Calculate4(sal_Bool _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,sal_Bool bConstant,SCSIZE N,SCSIZE M)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Calculate4" );
pQ->PutDouble((double)N, 0, 0);
@@ -2412,7 +2412,7 @@ bool ScInterpreter::Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,B
return true;
}
-ScMatrixRef ScInterpreter::Calculate2(const BOOL bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,BYTE nCase)
+ScMatrixRef ScInterpreter::Calculate2(const sal_Bool bConstant,const SCSIZE M ,const SCSIZE N,ScMatrixRef& pMatX,ScMatrixRef& pMatY,sal_uInt8 nCase)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::Calculate2" );
SCSIZE i, j, k;
@@ -2553,19 +2553,19 @@ bool ScInterpreter::Calculate3(const SCSIZE M ,ScMatrixRef& pQ)
void ScInterpreter::ScTrend()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTrend" );
- CalculateTrendGrowth(FALSE);
+ CalculateTrendGrowth(sal_False);
}
-void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth)
+void ScInterpreter::CalculateTrendGrowth(sal_Bool _bGrowth)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculateTrendGrowth" );
- BYTE nParamCount = GetByte();
+ sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 4 ) )
return;
- BOOL bConstant;
+ sal_Bool bConstant;
if (nParamCount == 4)
bConstant = GetBool();
else
- bConstant = TRUE;
+ bConstant = sal_True;
ScMatrixRef pMatX;
ScMatrixRef pMatY;
ScMatrixRef pMatNewX;
@@ -2584,11 +2584,11 @@ void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth)
return;
} // if (!pMatY)
- BYTE nCase; // 1 = normal, 2,3 = mehrfach
+ sal_uInt8 nCase; // 1 = normal, 2,3 = mehrfach
SCSIZE nCX, nCY;
SCSIZE nRX, nRY;
SCSIZE M = 0, N = 0;
- if ( !CheckMatrix(_bGrowth,TRUE,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) )
+ if ( !CheckMatrix(_bGrowth,sal_True,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) )
return;
@@ -2719,7 +2719,7 @@ void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth)
void ScInterpreter::ScGrowth()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScGrowth" );
- CalculateTrendGrowth(TRUE);
+ CalculateTrendGrowth(sal_True);
}
void ScInterpreter::ScMatRef()
@@ -2748,7 +2748,7 @@ void ScInterpreter::ScMatRef()
if (ScMatrix::IsNonValueType( nMatValType))
{
if (ScMatrix::IsEmptyPathType( nMatValType))
- { // result of empty FALSE jump path
+ { // result of empty sal_False jump path
nFuncFmtType = NUMBERFORMAT_LOGICAL;
PushInt(0);
}
@@ -2772,7 +2772,7 @@ void ScInterpreter::ScMatRef()
else
{
// If not a result matrix, obtain the cell value.
- USHORT nErr = pCell->GetErrCode();
+ sal_uInt16 nErr = pCell->GetErrCode();
if (nErr)
PushError( nErr );
else if( pCell->IsValue() )
diff --git a/sc/source/core/tool/navicfg.cxx b/sc/source/core/tool/navicfg.cxx
index 0991071774ed..56a4aed1ab3a 100644
--- a/sc/source/core/tool/navicfg.cxx
+++ b/sc/source/core/tool/navicfg.cxx
@@ -50,7 +50,7 @@ ScNavipiCfg::ScNavipiCfg() :
//------------------------------------------------------------------------
-void ScNavipiCfg::SetListMode(USHORT nNew)
+void ScNavipiCfg::SetListMode(sal_uInt16 nNew)
{
if ( nListMode != nNew )
{
@@ -59,7 +59,7 @@ void ScNavipiCfg::SetListMode(USHORT nNew)
}
}
-void ScNavipiCfg::SetDragMode(USHORT nNew)
+void ScNavipiCfg::SetDragMode(sal_uInt16 nNew)
{
if ( nDragMode != nNew )
{
@@ -68,7 +68,7 @@ void ScNavipiCfg::SetDragMode(USHORT nNew)
}
}
-void ScNavipiCfg::SetRootType(USHORT nNew)
+void ScNavipiCfg::SetRootType(sal_uInt16 nNew)
{
if ( nRootType != nNew )
{
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index dc63c7819eff..9fdd42637762 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -39,7 +39,7 @@
//------------------------------------------------------------------
// static
-BOOL ScOptionsUtil::IsMetricSystem()
+sal_Bool ScOptionsUtil::IsMetricSystem()
{
//! which language should be used here - system language or installed office language?
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index a863bc0a68c2..77a92ff0cef2 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -239,7 +239,7 @@ void ScParameterClassification::Init()
if ( pRun->aData.nParam[j] )
{
eLast = pRun->aData.nParam[j];
- pRun->nMinParams = sal::static_int_cast<BYTE>( j+1 );
+ pRun->nMinParams = sal::static_int_cast<sal_uInt8>( j+1 );
}
else
pRun->aData.nParam[j] = eLast;
@@ -252,7 +252,7 @@ void ScParameterClassification::Init()
if ( !pRun->aData.nParam[j] )
{
if ( j == 0 || pRun->aData.nParam[j-1] != Bounds )
- pRun->nMinParams = sal::static_int_cast<BYTE>( j );
+ pRun->nMinParams = sal::static_int_cast<sal_uInt8>( j );
pRun->aData.nParam[j] = Bounds;
}
}
@@ -285,7 +285,7 @@ void ScParameterClassification::Exit()
ScParameterClassification::Type ScParameterClassification::GetParameterType(
- const formula::FormulaToken* pToken, USHORT nParameter)
+ const formula::FormulaToken* pToken, sal_uInt16 nParameter)
{
OpCode eOp = pToken->GetOpCode();
switch ( eOp )
@@ -319,11 +319,11 @@ ScParameterClassification::Type ScParameterClassification::GetParameterType(
ScParameterClassification::Type
ScParameterClassification::GetExternalParameterType( const formula::FormulaToken* pToken,
- USHORT nParameter)
+ sal_uInt16 nParameter)
{
Type eRet = Unknown;
// similar to ScInterpreter::ScExternal()
- USHORT nIndex;
+ sal_uInt16 nIndex;
String aUnoName;
String aFuncName( ScGlobal::pCharClass->upper( pToken->GetExternal()));
if ( ScGlobal::GetFuncCollection()->SearchFunc( aFuncName, nIndex) )
@@ -347,7 +347,7 @@ ScParameterClassification::GetExternalParameterType( const formula::FormulaToken
}
}
else if ( (aUnoName = ScGlobal::GetAddInCollection()->FindFunction(
- aFuncName, FALSE)).Len() )
+ aFuncName, sal_False)).Len() )
{
// the relevant parts of ScUnoAddInCall without having to create one
const ScUnoAddInFuncData* pFuncData =
@@ -405,7 +405,7 @@ void ScParameterClassification::MergeArgumentsFromFunctionResource()
continue; // not an internal opcode or already done
RunData* pRun = &pData[ pDesc->nFIndex ];
- USHORT nArgs = pDesc->GetSuppressedArgCount();
+ sal_uInt16 nArgs = pDesc->GetSuppressedArgCount();
if ( nArgs >= VAR_ARGS )
{
nArgs -= VAR_ARGS - 1;
@@ -419,7 +419,7 @@ void ScParameterClassification::MergeArgumentsFromFunctionResource()
nArgs = CommonData::nMaxParams;
pRun->aData.bRepeatLast = true;
}
- pRun->nMinParams = static_cast< BYTE >( nArgs );
+ pRun->nMinParams = static_cast< sal_uInt8 >( nArgs );
for ( size_t j=0; j < nArgs; ++j )
{
pRun->aData.nParam[j] = Value;
@@ -464,7 +464,7 @@ void ScParameterClassification::GenerateDocumentation()
ByteString aStr( xMap->getSymbol(eOp), RTL_TEXTENCODING_UTF8);
aStr += "(";
formula::FormulaByteToken aToken( eOp);
- BYTE nParams = GetMinimumParameters( eOp);
+ sal_uInt8 nParams = GetMinimumParameters( eOp);
// preset parameter count according to opcode value, with some
// special handling
if ( eOp < SC_OPCODE_STOP_DIV )
@@ -515,7 +515,7 @@ void ScParameterClassification::GenerateDocumentation()
if ( nParams != aToken.GetParamCount() )
fprintf( stdout, "(parameter count differs, token ParamCount: %d classification: %d) ",
aToken.GetParamCount(), nParams);
- for ( USHORT j=0; j < nParams; ++j )
+ for ( sal_uInt16 j=0; j < nParams; ++j )
{
if ( j > 0 )
aStr += ",";
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index c701c558310b..5d96ba3e0dad 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -63,8 +63,8 @@ ScPrintOptions::~ScPrintOptions()
void ScPrintOptions::SetDefaults()
{
- bSkipEmpty = TRUE;
- bAllSheets = FALSE;
+ bSkipEmpty = sal_True;
+ bAllSheets = sal_False;
}
const ScPrintOptions& ScPrintOptions::operator=( const ScPrintOptions& rCpy )
@@ -87,11 +87,11 @@ int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const
// -----------------------------------------------------------------------
-//UNUSED2008-05 ScTpPrintItem::ScTpPrintItem( USHORT nWhichP ) : SfxPoolItem( nWhichP )
+//UNUSED2008-05 ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP ) : SfxPoolItem( nWhichP )
//UNUSED2008-05 {
//UNUSED2008-05 }
-ScTpPrintItem::ScTpPrintItem( USHORT nWhichP, const ScPrintOptions& rOpt ) :
+ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP, const ScPrintOptions& rOpt ) :
SfxPoolItem ( nWhichP ),
theOptions ( rOpt )
{
diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx
index b432f585e854..091148d7bb1d 100644
--- a/sc/source/core/tool/prnsave.cxx
+++ b/sc/source/core/tool/prnsave.cxx
@@ -49,7 +49,7 @@
ScPrintSaverTab::ScPrintSaverTab() :
mpRepeatCol(NULL),
mpRepeatRow(NULL),
- mbEntireSheet(FALSE)
+ mbEntireSheet(sal_False)
{
}
@@ -59,7 +59,7 @@ ScPrintSaverTab::~ScPrintSaverTab()
delete mpRepeatRow;
}
-void ScPrintSaverTab::SetAreas( const ScRangeVec& rRanges, BOOL bEntireSheet )
+void ScPrintSaverTab::SetAreas( const ScRangeVec& rRanges, sal_Bool bEntireSheet )
{
maPrintRanges = rRanges;
mbEntireSheet = bEntireSheet;
@@ -73,12 +73,12 @@ void ScPrintSaverTab::SetRepeat( const ScRange* pCol, const ScRange* pRow )
mpRepeatRow = pRow ? new ScRange(*pRow) : NULL;
}
-inline BOOL PtrEqual( const ScRange* p1, const ScRange* p2 )
+inline sal_Bool PtrEqual( const ScRange* p1, const ScRange* p2 )
{
return ( !p1 && !p2 ) || ( p1 && p2 && *p1 == *p2 );
}
-BOOL ScPrintSaverTab::operator==( const ScPrintSaverTab& rCmp ) const
+sal_Bool ScPrintSaverTab::operator==( const ScPrintSaverTab& rCmp ) const
{
return
PtrEqual( mpRepeatCol, rCmp.mpRepeatCol ) &&
@@ -117,14 +117,14 @@ const ScPrintSaverTab& ScPrintRangeSaver::GetTabData(SCTAB nTab) const
return pData[nTab];
}
-BOOL ScPrintRangeSaver::operator==( const ScPrintRangeSaver& rCmp ) const
+sal_Bool ScPrintRangeSaver::operator==( const ScPrintRangeSaver& rCmp ) const
{
- BOOL bEqual = ( nTabCount == rCmp.nTabCount );
+ sal_Bool bEqual = ( nTabCount == rCmp.nTabCount );
if (bEqual)
for (SCTAB i=0; i<nTabCount; i++)
if (!(pData[i]==rCmp.pData[i]))
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
return bEqual;
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index d36f4d431fdf..3b94a9b7ed80 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -51,18 +51,18 @@ using namespace com::sun::star;
static ScProgress theDummyInterpretProgress;
SfxProgress* ScProgress::pGlobalProgress = NULL;
-ULONG ScProgress::nGlobalRange = 0;
-ULONG ScProgress::nGlobalPercent = 0;
-BOOL ScProgress::bGlobalNoUserBreak = TRUE;
+sal_uLong ScProgress::nGlobalRange = 0;
+sal_uLong ScProgress::nGlobalPercent = 0;
+sal_Bool ScProgress::bGlobalNoUserBreak = sal_True;
ScProgress* ScProgress::pInterpretProgress = &theDummyInterpretProgress;
ScProgress* ScProgress::pOldInterpretProgress = NULL;
-ULONG ScProgress::nInterpretProgress = 0;
-BOOL ScProgress::bAllowInterpretProgress = TRUE;
+sal_uLong ScProgress::nInterpretProgress = 0;
+sal_Bool ScProgress::bAllowInterpretProgress = sal_True;
ScDocument* ScProgress::pInterpretDoc;
-BOOL ScProgress::bIdleWasDisabled = FALSE;
+sal_Bool ScProgress::bIdleWasDisabled = sal_False;
-BOOL lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
+sal_Bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
{
if (pObjSh)
{
@@ -71,12 +71,12 @@ BOOL lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
{
SfxItemSet* pSet = pMed->GetItemSet();
const SfxPoolItem* pItem;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_HIDDEN, TRUE, &pItem ) &&
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_HIDDEN, sal_True, &pItem ) &&
((const SfxBoolItem*)pItem)->GetValue() )
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
bool lcl_HasControllersLocked( SfxObjectShell& rObjSh )
@@ -88,7 +88,7 @@ bool lcl_HasControllersLocked( SfxObjectShell& rObjSh )
}
ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText,
- ULONG nRange, BOOL bAllDocs, BOOL bWait )
+ sal_uLong nRange, sal_Bool bAllDocs, sal_Bool bWait )
{
if ( pGlobalProgress || SfxProgress::GetActiveProgress( NULL ) )
@@ -128,7 +128,7 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText,
pGlobalProgress = pProgress;
nGlobalRange = nRange;
nGlobalPercent = 0;
- bGlobalNoUserBreak = TRUE;
+ bGlobalNoUserBreak = sal_True;
}
}
@@ -147,13 +147,13 @@ ScProgress::~ScProgress()
pGlobalProgress = NULL;
nGlobalRange = 0;
nGlobalPercent = 0;
- bGlobalNoUserBreak = TRUE;
+ bGlobalNoUserBreak = sal_True;
}
}
// static
-void ScProgress::CreateInterpretProgress( ScDocument* pDoc, BOOL bWait )
+void ScProgress::CreateInterpretProgress( ScDocument* pDoc, sal_Bool bWait )
{
if ( bAllowInterpretProgress )
{
@@ -163,14 +163,14 @@ void ScProgress::CreateInterpretProgress( ScDocument* pDoc, BOOL bWait )
{
nInterpretProgress = 1;
bIdleWasDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( TRUE );
+ pDoc->DisableIdle( sal_True );
// Interpreter may be called in many circumstances, also if another
// progress bar is active, for example while adapting row heights.
// Keep the dummy interpret progress.
if ( !pGlobalProgress )
pInterpretProgress = new ScProgress( pDoc->GetDocumentShell(),
ScGlobal::GetRscString( STR_PROGRESS_CALCULATING ),
- pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, FALSE, bWait );
+ pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, sal_False, bWait );
pInterpretDoc = pDoc;
}
}
diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx
index 5b3b92f78ee4..3e755ed10d1e 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -42,7 +42,7 @@ using ::std::vector;
ScQueryParamBase::ScQueryParamBase()
{
Resize( MAXQUERY );
- for (USHORT i=0; i<MAXQUERY; i++)
+ for (sal_uInt16 i=0; i<MAXQUERY; i++)
maEntries[i].Clear();
}
@@ -108,7 +108,7 @@ void ScQueryParamBase::FillInExcelSyntax(String& aCellStr, SCSIZE nIndex)
ScQueryEntry& rEntry = GetEntry(nIndex);
- rEntry.bDoQuery = TRUE;
+ rEntry.bDoQuery = sal_True;
// Operatoren herausfiltern
if (aCellStr.GetChar(0) == '<')
{
@@ -213,11 +213,11 @@ void ScQueryParam::Clear()
nCol1=nCol2 = 0;
nRow1=nRow2 = 0;
nTab = SCTAB_MAX;
- bHasHeader = bCaseSens = bRegExp = bMixedComparison = FALSE;
- bInplace = bByRow = bDuplicate = TRUE;
+ bHasHeader = bCaseSens = bRegExp = bMixedComparison = sal_False;
+ bInplace = bByRow = bDuplicate = sal_True;
Resize( MAXQUERY );
- for (USHORT i=0; i<MAXQUERY; i++)
+ for (sal_uInt16 i=0; i<MAXQUERY; i++)
maEntries[i].Clear();
ClearDestParams();
@@ -259,9 +259,9 @@ ScQueryParam& ScQueryParam::operator=( const ScQueryParam& r )
//------------------------------------------------------------------------
-BOOL ScQueryParam::operator==( const ScQueryParam& rOther ) const
+sal_Bool ScQueryParam::operator==( const ScQueryParam& rOther ) const
{
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = sal_False;
// Anzahl der Queries gleich?
SCSIZE nUsed = 0;
@@ -291,7 +291,7 @@ BOOL ScQueryParam::operator==( const ScQueryParam& rOther ) const
&& (nDestCol == rOther.nDestCol)
&& (nDestRow == rOther.nDestRow) )
{
- bEqual = TRUE;
+ bEqual = sal_True;
for ( SCSIZE i=0; i<nUsed && bEqual; i++ )
bEqual = maEntries[i] == rOther.maEntries[i];
}
@@ -317,7 +317,7 @@ void ScQueryParam::MoveToDest()
for (size_t i=0; i<n; i++)
maEntries[i].nField += nDifX;
- bInplace = TRUE;
+ bInplace = sal_True;
}
else
{
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 1ab978866c67..d1f22a3cb257 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -58,7 +58,7 @@ void ScRangeList::RemoveAll()
Clear();
}
-USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
+sal_uInt16 ScRangeList::Parse( const String& rStr, ScDocument* pDoc, sal_uInt16 nMask,
formula::FormulaGrammar::AddressConvention eConv,
sal_Unicode cDelimiter )
{
@@ -68,7 +68,7 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
nMask |= SCA_VALID; // falls das jemand vergessen sollte
- USHORT nResult = (USHORT)~0; // alle Bits setzen
+ sal_uInt16 nResult = (sal_uInt16)~0; // alle Bits setzen
ScRange aRange;
String aOne;
SCTAB nTab = 0;
@@ -79,8 +79,8 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
}
else
nTab = 0;
- USHORT nTCount = rStr.GetTokenCount( cDelimiter );
- for ( USHORT i=0; i<nTCount; i++ )
+ sal_uInt16 nTCount = rStr.GetTokenCount( cDelimiter );
+ for ( sal_uInt16 i=0; i<nTCount; i++ )
{
aOne = rStr.GetToken( i, cDelimiter );
// FIXME : broken for Lotus
@@ -91,7 +91,7 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
aOne += aStrTmp;
}
aRange.aStart.SetTab( nTab ); // Default Tab wenn nicht angegeben
- USHORT nRes = aRange.Parse( aOne, pDoc, eConv );
+ sal_uInt16 nRes = aRange.Parse( aOne, pDoc, eConv );
if ( (nRes & nMask) == nMask )
Append( aRange );
nResult &= nRes; // alle gemeinsamen Bits bleiben erhalten
@@ -103,7 +103,7 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
}
-void ScRangeList::Format( String& rStr, USHORT nFlags, ScDocument* pDoc,
+void ScRangeList::Format( String& rStr, sal_uInt16 nFlags, ScDocument* pDoc,
formula::FormulaGrammar::AddressConvention eConv,
sal_Unicode cDelimiter ) const
{
@@ -112,8 +112,8 @@ void ScRangeList::Format( String& rStr, USHORT nFlags, ScDocument* pDoc,
if (!cDelimiter)
cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
- ULONG nCnt = Count();
- for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ )
+ sal_uLong nCnt = Count();
+ for ( sal_uLong nIdx = 0; nIdx < nCnt; nIdx++ )
{
String aStr;
GetObject( nIdx )->Format( aStr, nFlags, pDoc, eConv );
@@ -124,7 +124,7 @@ void ScRangeList::Format( String& rStr, USHORT nFlags, ScDocument* pDoc,
}
-void ScRangeList::Join( const ScRange& r, BOOL bIsInList )
+void ScRangeList::Join( const ScRange& r, sal_Bool bIsInList )
{
if ( !Count() )
{
@@ -138,31 +138,31 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList )
SCROW nRow2 = r.aEnd.Row();
SCTAB nTab2 = r.aEnd.Tab();
ScRangePtr pOver = (ScRangePtr) &r; // fies aber wahr wenn bInList
- ULONG nOldPos = 0;
+ sal_uLong nOldPos = 0;
if ( bIsInList )
{ // merken um ggbf. zu loeschen bzw. wiederherzustellen
nOldPos = GetPos( pOver );
}
- BOOL bJoinedInput = FALSE;
+ sal_Bool bJoinedInput = sal_False;
for ( ScRangePtr p = First(); p && pOver; p = Next() )
{
if ( p == pOver )
continue; // derselbe, weiter mit dem naechsten
- BOOL bJoined = FALSE;
+ sal_Bool bJoined = sal_False;
if ( p->In( r ) )
{ // Range r in Range p enthalten oder identisch
if ( bIsInList )
- bJoined = TRUE; // weg mit Range r
+ bJoined = sal_True; // weg mit Range r
else
{ // das war's dann
- bJoinedInput = TRUE; // nicht anhaengen
+ bJoinedInput = sal_True; // nicht anhaengen
break; // for
}
}
else if ( r.In( *p ) )
{ // Range p in Range r enthalten, r zum neuen Range machen
*p = r;
- bJoined = TRUE;
+ bJoined = sal_True;
}
if ( !bJoined && p->aStart.Tab() == nTab1 && p->aEnd.Tab() == nTab2 )
{ // 2D
@@ -171,12 +171,12 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList )
if ( p->aStart.Row() == nRow2+1 )
{ // oben
p->aStart.SetRow( nRow1 );
- bJoined = TRUE;
+ bJoined = sal_True;
}
else if ( p->aEnd.Row() == nRow1-1 )
{ // unten
p->aEnd.SetRow( nRow2 );
- bJoined = TRUE;
+ bJoined = sal_True;
}
}
else if ( p->aStart.Row() == nRow1 && p->aEnd.Row() == nRow2 )
@@ -184,12 +184,12 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList )
if ( p->aStart.Col() == nCol2+1 )
{ // links
p->aStart.SetCol( nCol1 );
- bJoined = TRUE;
+ bJoined = sal_True;
}
else if ( p->aEnd.Col() == nCol1-1 )
{ // rechts
p->aEnd.SetCol( nCol2 );
- bJoined = TRUE;
+ bJoined = sal_True;
}
}
}
@@ -203,8 +203,8 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList )
if ( nOldPos )
nOldPos--; // Seek richtig aufsetzen
}
- bJoinedInput = TRUE;
- Join( *p, TRUE ); // rekursiv!
+ bJoinedInput = sal_True;
+ Join( *p, sal_True ); // rekursiv!
}
}
if ( bIsInList )
@@ -214,31 +214,31 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList )
}
-BOOL ScRangeList::operator==( const ScRangeList& r ) const
+sal_Bool ScRangeList::operator==( const ScRangeList& r ) const
{
if ( this == &r )
- return TRUE; // identische Referenz
+ return sal_True; // identische Referenz
if ( Count() != r.Count() )
- return FALSE;
- ULONG nCnt = Count();
- for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ )
+ return sal_False;
+ sal_uLong nCnt = Count();
+ for ( sal_uLong nIdx = 0; nIdx < nCnt; nIdx++ )
{
if ( *GetObject( nIdx ) != *r.GetObject( nIdx ) )
- return FALSE; // auch andere Reihenfolge ist ungleich
+ return sal_False; // auch andere Reihenfolge ist ungleich
}
- return TRUE;
+ return sal_True;
}
-BOOL ScRangeList::operator!=( const ScRangeList& r ) const
+sal_Bool ScRangeList::operator!=( const ScRangeList& r ) const
{
return !operator==( r );
}
-BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode,
+sal_Bool ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode,
ScDocument* pDoc, const ScRange& rWhere,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if ( Count() )
{
SCCOL nCol1;
@@ -263,7 +263,7 @@ BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode,
theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 )
!= UR_NOTHING )
{
- bChanged = TRUE;
+ bChanged = sal_True;
pR->aStart.Set( theCol1, theRow1, theTab1 );
pR->aEnd.Set( theCol2, theRow2, theTab2 );
}
@@ -275,8 +275,8 @@ BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode,
ScRange* ScRangeList::Find( const ScAddress& rAdr ) const
{
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
{
ScRange* pR = GetObject( j );
if ( pR->In( rAdr ) )
@@ -290,8 +290,8 @@ ScRangeList::ScRangeList( const ScRangeList& rList ) :
ScRangeListBase(),
SvRefBase()
{
- ULONG nListCount = rList.Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = rList.Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
Append( *rList.GetObject( j ) );
}
@@ -300,46 +300,46 @@ ScRangeList& ScRangeList::operator=(const ScRangeList& rList)
{
RemoveAll();
- ULONG nListCount = rList.Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = rList.Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
Append( *rList.GetObject( j ) );
return *this;
}
-BOOL ScRangeList::Intersects( const ScRange& rRange ) const
+sal_Bool ScRangeList::Intersects( const ScRange& rRange ) const
{
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
if ( GetObject(j)->Intersects( rRange ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL ScRangeList::In( const ScRange& rRange ) const
+sal_Bool ScRangeList::In( const ScRange& rRange ) const
{
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
if ( GetObject(j)->In( rRange ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-ULONG ScRangeList::GetCellCount() const
+sal_uLong ScRangeList::GetCellCount() const
{
- ULONG nCellCount = 0;
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nCellCount = 0;
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
{
ScRange* pR = GetObject( j );
- nCellCount += ULONG(pR->aEnd.Col() - pR->aStart.Col() + 1)
- * ULONG(pR->aEnd.Row() - pR->aStart.Row() + 1)
- * ULONG(pR->aEnd.Tab() - pR->aStart.Tab() + 1);
+ nCellCount += sal_uLong(pR->aEnd.Col() - pR->aStart.Col() + 1)
+ * sal_uLong(pR->aEnd.Row() - pR->aStart.Row() + 1)
+ * sal_uLong(pR->aEnd.Tab() - pR->aStart.Tab() + 1);
}
return nCellCount;
}
@@ -354,7 +354,7 @@ ScRangePairList::~ScRangePairList()
}
-void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
+void ScRangePairList::Join( const ScRangePair& r, sal_Bool bIsInList )
{
if ( !Count() )
{
@@ -370,17 +370,17 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
SCROW nRow2 = r1.aEnd.Row();
SCTAB nTab2 = r1.aEnd.Tab();
ScRangePair* pOver = (ScRangePair*) &r; // fies aber wahr wenn bInList
- ULONG nOldPos = 0;
+ sal_uLong nOldPos = 0;
if ( bIsInList )
{ // merken um ggbf. zu loeschen bzw. wiederherzustellen
nOldPos = GetPos( pOver );
}
- BOOL bJoinedInput = FALSE;
+ sal_Bool bJoinedInput = sal_False;
for ( ScRangePair* p = First(); p && pOver; p = Next() )
{
if ( p == pOver )
continue; // derselbe, weiter mit dem naechsten
- BOOL bJoined = FALSE;
+ sal_Bool bJoined = sal_False;
ScRange& rp1 = p->GetRange(0);
ScRange& rp2 = p->GetRange(1);
if ( rp2 == r2 )
@@ -388,17 +388,17 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
if ( rp1.In( r1 ) )
{ // RangePair r in RangePair p enthalten oder identisch
if ( bIsInList )
- bJoined = TRUE; // weg mit RangePair r
+ bJoined = sal_True; // weg mit RangePair r
else
{ // das war's dann
- bJoinedInput = TRUE; // nicht anhaengen
+ bJoinedInput = sal_True; // nicht anhaengen
break; // for
}
}
else if ( r1.In( rp1 ) )
{ // RangePair p in RangePair r enthalten, r zum neuen RangePair machen
*p = r;
- bJoined = TRUE;
+ bJoined = sal_True;
}
}
if ( !bJoined && rp1.aStart.Tab() == nTab1 && rp1.aEnd.Tab() == nTab2
@@ -414,14 +414,14 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
{ // oben
rp1.aStart.SetRow( nRow1 );
rp2.aStart.SetRow( r2.aStart.Row() );
- bJoined = TRUE;
+ bJoined = sal_True;
}
else if ( rp1.aEnd.Row() == nRow1-1
&& rp2.aEnd.Row() == r2.aStart.Row()-1 )
{ // unten
rp1.aEnd.SetRow( nRow2 );
rp2.aEnd.SetRow( r2.aEnd.Row() );
- bJoined = TRUE;
+ bJoined = sal_True;
}
}
else if ( rp1.aStart.Row() == nRow1 && rp1.aEnd.Row() == nRow2
@@ -433,14 +433,14 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
{ // links
rp1.aStart.SetCol( nCol1 );
rp2.aStart.SetCol( r2.aStart.Col() );
- bJoined = TRUE;
+ bJoined = sal_True;
}
else if ( rp1.aEnd.Col() == nCol1-1
&& rp2.aEnd.Col() == r2.aEnd.Col()-1 )
{ // rechts
rp1.aEnd.SetCol( nCol2 );
rp2.aEnd.SetCol( r2.aEnd.Col() );
- bJoined = TRUE;
+ bJoined = sal_True;
}
}
}
@@ -454,8 +454,8 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
if ( nOldPos )
nOldPos--; // Seek richtig aufsetzen
}
- bJoinedInput = TRUE;
- Join( *p, TRUE ); // rekursiv!
+ bJoinedInput = sal_True;
+ Join( *p, sal_True ); // rekursiv!
}
}
if ( bIsInList )
@@ -465,27 +465,27 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList )
}
-BOOL ScRangePairList::operator==( const ScRangePairList& r ) const
+sal_Bool ScRangePairList::operator==( const ScRangePairList& r ) const
{
if ( this == &r )
- return TRUE; // identische Referenz
+ return sal_True; // identische Referenz
if ( Count() != r.Count() )
- return FALSE;
- ULONG nCnt = Count();
- for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ )
+ return sal_False;
+ sal_uLong nCnt = Count();
+ for ( sal_uLong nIdx = 0; nIdx < nCnt; nIdx++ )
{
if ( *GetObject( nIdx ) != *r.GetObject( nIdx ) )
- return FALSE; // auch andere Reihenfolge ist ungleich
+ return sal_False; // auch andere Reihenfolge ist ungleich
}
- return TRUE;
+ return sal_True;
}
-BOOL ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
+sal_Bool ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
ScDocument* pDoc, const ScRange& rWhere,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if ( Count() )
{
SCCOL nCol1;
@@ -497,7 +497,7 @@ BOOL ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
rWhere.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
for ( ScRangePair* pR = First(); pR; pR = Next() )
{
- for ( USHORT j=0; j<2; j++ )
+ for ( sal_uInt16 j=0; j<2; j++ )
{
ScRange& rRange = pR->GetRange(j);
SCCOL theCol1;
@@ -513,7 +513,7 @@ BOOL ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 )
!= UR_NOTHING )
{
- bChanged = TRUE;
+ bChanged = sal_True;
rRange.aStart.Set( theCol1, theRow1, theTab1 );
rRange.aEnd.Set( theCol2, theRow2, theTab2 );
}
@@ -528,8 +528,8 @@ void ScRangePairList::DeleteOnTab( SCTAB nTab )
{
// Delete entries that have the labels (first range) on nTab
- ULONG nListCount = Count();
- ULONG nPos = 0;
+ sal_uLong nListCount = Count();
+ sal_uLong nPos = 0;
while ( nPos < nListCount )
{
ScRangePair* pR = GetObject( nPos );
@@ -548,8 +548,8 @@ void ScRangePairList::DeleteOnTab( SCTAB nTab )
ScRangePair* ScRangePairList::Find( const ScAddress& rAdr ) const
{
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
{
ScRangePair* pR = GetObject( j );
if ( pR->GetRange(0).In( rAdr ) )
@@ -561,8 +561,8 @@ ScRangePair* ScRangePairList::Find( const ScAddress& rAdr ) const
ScRangePair* ScRangePairList::Find( const ScRange& rRange ) const
{
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
{
ScRangePair* pR = GetObject( j );
if ( pR->GetRange(0) == rRange )
@@ -575,8 +575,8 @@ ScRangePair* ScRangePairList::Find( const ScRange& rRange ) const
ScRangePairList* ScRangePairList::Clone() const
{
ScRangePairList* pNew = new ScRangePairList;
- ULONG nListCount = Count();
- for ( ULONG j = 0; j < nListCount; j++ )
+ sal_uLong nListCount = Count();
+ for ( sal_uLong j = 0; j < nListCount; j++ )
{
pNew->Append( *GetObject( j ) );
}
@@ -670,15 +670,15 @@ ScRangePairList_QsortNameCompare( const void* p1, const void* p2 )
}
-ScRangePair** ScRangePairList::CreateNameSortedArray( ULONG& nListCount,
+ScRangePair** ScRangePairList::CreateNameSortedArray( sal_uLong& nListCount,
ScDocument* pDoc ) const
{
nListCount = Count();
DBG_ASSERT( nListCount * sizeof(ScRangePairNameSort) <= (size_t)~0x1F,
"ScRangePairList::CreateNameSortedArray nListCount * sizeof(ScRangePairNameSort) > (size_t)~0x1F" );
ScRangePairNameSort* pSortArray = (ScRangePairNameSort*)
- new BYTE [ nListCount * sizeof(ScRangePairNameSort) ];
- ULONG j;
+ new sal_uInt8 [ nListCount * sizeof(ScRangePairNameSort) ];
+ sal_uLong j;
for ( j=0; j < nListCount; j++ )
{
pSortArray[j].pPair = GetObject( j );
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index e81f1f3bd94d..cfd1b1135bec 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -55,8 +55,8 @@ using namespace formula;
// Interner ctor fuer das Suchen nach einem Index
-ScRangeData::ScRangeData( USHORT n )
- : pCode( NULL ), nIndex( n ), bModified( FALSE ), mnMaxRow(-1), mnMaxCol(-1)
+ScRangeData::ScRangeData( sal_uInt16 n )
+ : pCode( NULL ), nIndex( n ), bModified( sal_False ), mnMaxRow(-1), mnMaxCol(-1)
{}
ScRangeData::ScRangeData( ScDocument* pDok,
@@ -72,7 +72,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
eType ( nType ),
pDoc ( pDok ),
nIndex ( 0 ),
- bModified ( FALSE ),
+ bModified ( sal_False ),
mnMaxRow (-1),
mnMaxCol (-1)
{
@@ -120,7 +120,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
eType ( nType ),
pDoc ( pDok ),
nIndex ( 0 ),
- bModified ( FALSE ),
+ bModified ( sal_False ),
mnMaxRow (-1),
mnMaxCol (-1)
{
@@ -157,13 +157,13 @@ ScRangeData::ScRangeData( ScDocument* pDok,
eType ( RT_NAME ),
pDoc ( pDok ),
nIndex ( 0 ),
- bModified ( FALSE ),
+ bModified ( sal_False ),
mnMaxRow (-1),
mnMaxCol (-1)
{
ScSingleRefData aRefData;
aRefData.InitAddress( rTarget );
- aRefData.SetFlag3D( TRUE );
+ aRefData.SetFlag3D( sal_True );
pCode->AddSingleReference( aRefData );
ScCompiler aComp( pDoc, aPos, *pCode );
aComp.SetGrammar(pDoc->GetGrammar());
@@ -259,15 +259,15 @@ void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
pCode->Reset();
if( pCode->GetNextReference() )
{
- BOOL bSharedFormula = ((eType & RT_SHARED) == RT_SHARED);
+ sal_Bool bSharedFormula = ((eType & RT_SHARED) == RT_SHARED);
ScCompiler aComp( pDoc, aPos, *pCode );
aComp.SetGrammar(pDoc->GetGrammar());
- const BOOL bRelRef = aComp.UpdateNameReference( eUpdateRefMode, r,
+ const sal_Bool bRelRef = aComp.UpdateNameReference( eUpdateRefMode, r,
nDx, nDy, nDz,
bChanged, bSharedFormula);
if (bSharedFormula)
@@ -285,7 +285,7 @@ void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode,
void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
ScToken* t;
pCode->Reset();
@@ -303,7 +303,7 @@ void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDes
(!rRef.Ref2.IsFlag3D() || !rRef.Ref2.IsTabRel()))))
{
if ( ScRefUpdate::UpdateTranspose( pDoc, rSource, rDest, rRef ) != UR_NOTHING )
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -313,7 +313,7 @@ void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDes
void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
ScToken* t;
pCode->Reset();
@@ -331,7 +331,7 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
(!rRef.Ref2.IsFlag3D() || !rRef.Ref2.IsTabRel()))))
{
if ( ScRefUpdate::UpdateGrow( rArea,nGrowX,nGrowY, rRef ) != UR_NOTHING )
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -339,29 +339,29 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
bModified = bChanged; // muss direkt hinterher ausgewertet werden
}
-BOOL ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo
+sal_Bool ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo
{
if ( nIndex != rData.nIndex ||
aName != rData.aName ||
aPos != rData.aPos ||
- eType != rData.eType ) return FALSE;
+ eType != rData.eType ) return sal_False;
- USHORT nLen = pCode->GetLen();
- if ( nLen != rData.pCode->GetLen() ) return FALSE;
+ sal_uInt16 nLen = pCode->GetLen();
+ if ( nLen != rData.pCode->GetLen() ) return sal_False;
FormulaToken** ppThis = pCode->GetArray();
FormulaToken** ppOther = rData.pCode->GetArray();
- for ( USHORT i=0; i<nLen; i++ )
+ for ( sal_uInt16 i=0; i<nLen; i++ )
if ( ppThis[i] != ppOther[i] && !(*ppThis[i] == *ppOther[i]) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
-//UNUSED2009-05 BOOL ScRangeData::IsRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const
+//UNUSED2009-05 sal_Bool ScRangeData::IsRangeAtCursor( const ScAddress& rPos, sal_Bool bStartOnly ) const
//UNUSED2009-05 {
-//UNUSED2009-05 BOOL bRet = FALSE;
+//UNUSED2009-05 sal_Bool bRet = sal_False;
//UNUSED2009-05 ScRange aRange;
//UNUSED2009-05 if ( IsReference(aRange) )
//UNUSED2009-05 {
@@ -373,24 +373,24 @@ BOOL ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo
//UNUSED2009-05 return bRet;
//UNUSED2009-05 }
-BOOL ScRangeData::IsRangeAtBlock( const ScRange& rBlock ) const
+sal_Bool ScRangeData::IsRangeAtBlock( const ScRange& rBlock ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ScRange aRange;
if ( IsReference(aRange) )
bRet = ( rBlock == aRange );
return bRet;
}
-BOOL ScRangeData::IsReference( ScRange& rRange ) const
+sal_Bool ScRangeData::IsReference( ScRange& rRange ) const
{
if ( (eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS )) && pCode )
return pCode->IsReference( rRange );
- return FALSE;
+ return sal_False;
}
-BOOL ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
+sal_Bool ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
{
if ( (eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS ) ) && pCode )
{
@@ -401,37 +401,37 @@ BOOL ScRangeData::IsReference( ScRange& rRange, const ScAddress& rPos ) const
return pTemp->IsReference( rRange );
}
- return FALSE;
+ return sal_False;
}
-BOOL ScRangeData::IsValidReference( ScRange& rRange ) const
+sal_Bool ScRangeData::IsValidReference( ScRange& rRange ) const
{
if ( (eType & ( RT_ABSAREA | RT_REFAREA | RT_ABSPOS ) ) && pCode )
return pCode->IsValidReference( rRange );
- return FALSE;
+ return sal_False;
}
-void ScRangeData::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable)
+void ScRangeData::UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable)
{
pCode->Reset();
if( pCode->GetNextReference() )
{
ScRangeData* pRangeData = NULL; // must not be dereferenced
- BOOL bChanged;
+ sal_Bool bChanged;
ScCompiler aComp( pDoc, aPos, *pCode);
aComp.SetGrammar(pDoc->GetGrammar());
switch (nFlag)
{
case 1: // einfache InsertTab (doc.cxx)
- pRangeData = aComp.UpdateInsertTab(nOldTable, TRUE ); // und CopyTab (doc2.cxx)
+ pRangeData = aComp.UpdateInsertTab(nOldTable, sal_True ); // und CopyTab (doc2.cxx)
break;
case 2: // einfaches delete (doc.cxx)
- pRangeData = aComp.UpdateDeleteTab(nOldTable, FALSE, TRUE, bChanged);
+ pRangeData = aComp.UpdateDeleteTab(nOldTable, sal_False, sal_True, bChanged);
break;
case 3: // move (doc2.cxx)
{
- pRangeData = aComp.UpdateMoveTab(nOldTable, nNewTable, TRUE );
+ pRangeData = aComp.UpdateMoveTab(nOldTable, nNewTable, sal_True );
}
break;
default:
@@ -494,18 +494,18 @@ void ScRangeData::MakeValidName( String& rName ) // static
}
}
-BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
+sal_Bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
{
/* XXX If changed, sc/source/filter/ftools/ftools.cxx
* ScfTools::ConvertToScDefinedName needs to be changed too. */
xub_StrLen nPos = 0;
xub_StrLen nLen = rName.Len();
if ( !nLen || !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_CHAR_NAME ) )
- return FALSE;
+ return sal_False;
while ( nPos < nLen )
{
if ( !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_NAME ) )
- return FALSE;
+ return sal_False;
}
ScAddress aAddr;
ScRange aRange;
@@ -515,9 +515,9 @@ BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
if (aRange.Parse( rName, pDoc, details) || aAddr.Parse( rName, pDoc, details))
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void ScRangeData::SetMaxRow(SCROW nRow)
@@ -541,15 +541,15 @@ SCCOL ScRangeData::GetMaxCol() const
}
-USHORT ScRangeData::GetErrCode()
+sal_uInt16 ScRangeData::GetErrCode()
{
return pCode ? pCode->GetCodeError() : 0;
}
-BOOL ScRangeData::HasReferences() const
+sal_Bool ScRangeData::HasReferences() const
{
pCode->Reset();
- return BOOL( pCode->GetNextReference() != NULL );
+ return sal_Bool( pCode->GetNextReference() != NULL );
}
// bei TransferTab von einem in ein anderes Dokument anpassen,
@@ -690,7 +690,7 @@ ScRangeName::ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument)
pDoc ( pDocument ),
nSharedMaxIndex (rScRangeName.nSharedMaxIndex)
{
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
((ScRangeData*)At(i))->SetDocument(pDocument);
((ScRangeData*)At(i))->SetIndex(((ScRangeData*)rScRangeName.At(i))->GetIndex());
@@ -699,63 +699,63 @@ ScRangeName::ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument)
short ScRangeName::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
- USHORT i1 = ((ScRangeData*)pKey1)->GetIndex();
- USHORT i2 = ((ScRangeData*)pKey2)->GetIndex();
+ sal_uInt16 i1 = ((ScRangeData*)pKey1)->GetIndex();
+ sal_uInt16 i2 = ((ScRangeData*)pKey2)->GetIndex();
return (short) i1 - (short) i2;
}
-BOOL ScRangeName::SearchNameUpper( const String& rUpperName, USHORT& rIndex ) const
+sal_Bool ScRangeName::SearchNameUpper( const String& rUpperName, sal_uInt16& rIndex ) const
{
// SearchNameUpper must be called with an upper-case search string
- USHORT i = 0;
+ sal_uInt16 i = 0;
while (i < nCount)
{
if ( ((*this)[i])->GetUpperName() == rUpperName )
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
i++;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScRangeName::SearchName( const String& rName, USHORT& rIndex ) const
+sal_Bool ScRangeName::SearchName( const String& rName, sal_uInt16& rIndex ) const
{
if ( nCount > 0 )
return SearchNameUpper( ScGlobal::pCharClass->upper( rName ), rIndex );
else
- return FALSE;
+ return sal_False;
}
void ScRangeName::UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
((ScRangeData*)pItems[i])->UpdateReference(eUpdateRefMode, rRange,
nDx, nDy, nDz);
}
void ScRangeName::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
((ScRangeData*)pItems[i])->UpdateTranspose( rSource, rDest );
}
void ScRangeName::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
((ScRangeData*)pItems[i])->UpdateGrow( rArea, nGrowX, nGrowY );
}
-BOOL ScRangeName::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
+sal_Bool ScRangeName::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return *(ScRangeData*)pKey1 == *(ScRangeData*)pKey2;
}
-BOOL ScRangeName::Insert(ScDataObject* pScDataObject)
+sal_Bool ScRangeName::Insert(ScDataObject* pScDataObject)
{
if (!((ScRangeData*)pScDataObject)->GetIndex()) // schon gesetzt?
{
@@ -767,12 +767,12 @@ BOOL ScRangeName::Insert(ScDataObject* pScDataObject)
// Suche nach einem freien Index
-USHORT ScRangeName::GetEntryIndex()
+sal_uInt16 ScRangeName::GetEntryIndex()
{
- USHORT nLast = 0;
- for ( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nLast = 0;
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
- USHORT nIdx = ((ScRangeData*)pItems[i])->GetIndex();
+ sal_uInt16 nIdx = ((ScRangeData*)pItems[i])->GetIndex();
if( nIdx > nLast )
{
nLast = nIdx;
@@ -781,21 +781,21 @@ USHORT ScRangeName::GetEntryIndex()
return nLast + 1;
}
-ScRangeData* ScRangeName::FindIndex( USHORT nIndex )
+ScRangeData* ScRangeName::FindIndex( sal_uInt16 nIndex )
{
ScRangeData aDataObj( nIndex );
- USHORT n;
+ sal_uInt16 n;
if( Search( &aDataObj, n ) )
return (*this)[ n ];
else
return NULL;
}
-//UNUSED2009-05 ScRangeData* ScRangeName::GetRangeAtCursor( const ScAddress& rPos, BOOL bStartOnly ) const
+//UNUSED2009-05 ScRangeData* ScRangeName::GetRangeAtCursor( const ScAddress& rPos, sal_Bool bStartOnly ) const
//UNUSED2009-05 {
//UNUSED2009-05 if ( pItems )
//UNUSED2009-05 {
-//UNUSED2009-05 for ( USHORT i = 0; i < nCount; i++ )
+//UNUSED2009-05 for ( sal_uInt16 i = 0; i < nCount; i++ )
//UNUSED2009-05 if ( ((ScRangeData*)pItems[i])->IsRangeAtCursor( rPos, bStartOnly ) )
//UNUSED2009-05 return (ScRangeData*)pItems[i];
//UNUSED2009-05 }
@@ -806,16 +806,16 @@ ScRangeData* ScRangeName::GetRangeAtBlock( const ScRange& rBlock ) const
{
if ( pItems )
{
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
if ( ((ScRangeData*)pItems[i])->IsRangeAtBlock( rBlock ) )
return (ScRangeData*)pItems[i];
}
return NULL;
}
-void ScRangeName::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable)
+void ScRangeName::UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable)
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
((ScRangeData*)pItems[i])->UpdateTabRef(nOldTable, nFlag, nNewTable);
}
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index 5584fb1c37e2..ac1934302b6e 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -56,7 +56,7 @@ long lcl_DoubleToLong( double fVal )
return 0; // out of range
}
-BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
+sal_Bool ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -64,12 +64,12 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const S
long nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
- uno::Sequence< uno::Sequence<INT32> > aRowSeq( nRowCount );
- uno::Sequence<INT32>* pRowAry = aRowSeq.getArray();
+ uno::Sequence< uno::Sequence<sal_Int32> > aRowSeq( nRowCount );
+ uno::Sequence<sal_Int32>* pRowAry = aRowSeq.getArray();
for (long nRow = 0; nRow < nRowCount; nRow++)
{
- uno::Sequence<INT32> aColSeq( nColCount );
- INT32* pColAry = aColSeq.getArray();
+ uno::Sequence<sal_Int32> aColSeq( nColCount );
+ sal_Int32* pColAry = aColSeq.getArray();
for (long nCol = 0; nCol < nColCount; nCol++)
pColAry[nCol] = lcl_DoubleToLong( pDoc->GetValue(
ScAddress( (SCCOL)(nStartCol+nCol), (SCROW)(nStartRow+nRow), nTab ) ) );
@@ -78,25 +78,25 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const S
}
rAny <<= aRowSeq;
- return TRUE; //! check for errors
+ return sal_True; //! check for errors
}
-BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, const ScMatrix* pMatrix )
+sal_Bool ScRangeToSequence::FillLongArray( uno::Any& rAny, const ScMatrix* pMatrix )
{
if (!pMatrix)
- return FALSE;
+ return sal_False;
SCSIZE nColCount;
SCSIZE nRowCount;
pMatrix->GetDimensions( nColCount, nRowCount );
- uno::Sequence< uno::Sequence<INT32> > aRowSeq( static_cast<sal_Int32>(nRowCount) );
- uno::Sequence<INT32>* pRowAry = aRowSeq.getArray();
+ uno::Sequence< uno::Sequence<sal_Int32> > aRowSeq( static_cast<sal_Int32>(nRowCount) );
+ uno::Sequence<sal_Int32>* pRowAry = aRowSeq.getArray();
for (SCSIZE nRow = 0; nRow < nRowCount; nRow++)
{
- uno::Sequence<INT32> aColSeq( static_cast<sal_Int32>(nColCount) );
- INT32* pColAry = aColSeq.getArray();
+ uno::Sequence<sal_Int32> aColSeq( static_cast<sal_Int32>(nColCount) );
+ sal_Int32* pColAry = aColSeq.getArray();
for (SCSIZE nCol = 0; nCol < nColCount; nCol++)
if ( pMatrix->IsString( nCol, nRow ) )
pColAry[nCol] = 0;
@@ -107,12 +107,12 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, const ScMatrix* pMatrix )
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
+sal_Bool ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -134,14 +134,14 @@ BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const
}
rAny <<= aRowSeq;
- return TRUE; //! check for errors
+ return sal_True; //! check for errors
}
-BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, const ScMatrix* pMatrix )
+sal_Bool ScRangeToSequence::FillDoubleArray( uno::Any& rAny, const ScMatrix* pMatrix )
{
if (!pMatrix)
- return FALSE;
+ return sal_False;
SCSIZE nColCount;
SCSIZE nRowCount;
@@ -163,12 +163,12 @@ BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, const ScMatrix* pMatrix
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
+sal_Bool ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -193,15 +193,15 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const
}
rAny <<= aRowSeq;
- return TRUE; //! check for errors
+ return sal_True; //! check for errors
}
-BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix,
+sal_Bool ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix,
SvNumberFormatter* pFormatter )
{
if (!pMatrix)
- return FALSE;
+ return sal_False;
SCSIZE nColCount;
SCSIZE nRowCount;
@@ -234,7 +234,7 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -253,8 +253,8 @@ double lcl_GetValueFromCell( ScBaseCell& rCell )
return 0;
}
-BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange,
- BOOL bAllowNV )
+sal_Bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange,
+ sal_Bool bAllowNV )
{
SCTAB nTab = rRange.aStart.Tab();
SCCOL nStartCol = rRange.aStart.Col();
@@ -263,7 +263,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const
long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
String aDocStr;
- BOOL bHasErrors = FALSE;
+ sal_Bool bHasErrors = sal_False;
uno::Sequence< uno::Sequence<uno::Any> > aRowSeq( nRowCount );
uno::Sequence<uno::Any>* pRowAry = aRowSeq.getArray();
@@ -283,7 +283,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const
((ScFormulaCell*)pCell)->GetErrCode() != 0 )
{
// if NV is allowed, leave empty for errors
- bHasErrors = TRUE;
+ bHasErrors = sal_True;
}
else if ( pCell->HasValueData() )
rElement <<= (double) lcl_GetValueFromCell( *pCell );
@@ -301,10 +301,10 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const
}
-BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix, bool bDataTypes )
+sal_Bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix, bool bDataTypes )
{
if (!pMatrix)
- return FALSE;
+ return sal_False;
SCSIZE nColCount;
SCSIZE nRowCount;
@@ -339,7 +339,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMatrix,
}
rAny <<= aRowSeq;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -458,7 +458,7 @@ ScMatrixRef ScSequenceToMatrix::CreateMixedMatrix( const com::sun::star::uno::An
//------------------------------------------------------------------------
-BOOL ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
+sal_Bool ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
sal_uInt16 nEncoding )
{
uno::Sequence<sal_Int8> aSeq;
@@ -467,9 +467,9 @@ BOOL ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
rString = String( (const sal_Char*)aSeq.getConstArray(),
(xub_StrLen)aSeq.getLength(), nEncoding );
rString.EraseTrailingChars( (sal_Unicode) 0 );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 9f6526a54cf6..c6fc8c79ccf6 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -52,7 +52,7 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-BOOL ScRangeUtil::MakeArea( const String& rAreaStr,
+sal_Bool ScRangeUtil::MakeArea( const String& rAreaStr,
ScArea& rArea,
ScDocument* pDoc,
SCTAB nTab,
@@ -63,9 +63,9 @@ BOOL ScRangeUtil::MakeArea( const String& rAreaStr,
// BROKEN BROKEN BROKEN
// but it is only used in the consolidate dialog. Ignore for now.
- BOOL nSuccess = FALSE;
- USHORT nPointPos = rAreaStr.Search('.');
- USHORT nColonPos = rAreaStr.Search(':');
+ sal_Bool nSuccess = sal_False;
+ sal_uInt16 nPointPos = rAreaStr.Search('.');
+ sal_uInt16 nColonPos = rAreaStr.Search(':');
String aStrArea( rAreaStr );
ScRefAddress startPos;
ScRefAddress endPos;
@@ -96,7 +96,7 @@ void ScRangeUtil::CutPosString( const String& theAreaStr,
// BROKEN BROKEN BROKEN
// but it is only used in the consolidate dialog. Ignore for now.
- USHORT nColonPos = theAreaStr.Search(':');
+ sal_uInt16 nColonPos = theAreaStr.Search(':');
if ( nColonPos != STRING_NOTFOUND )
aPosStr = theAreaStr.Copy( 0, nColonPos ); // ':' nicht mitkopieren
@@ -108,16 +108,16 @@ void ScRangeUtil::CutPosString( const String& theAreaStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
+sal_Bool ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
ScDocument* pDoc,
ScArea*** pppAreas,
- USHORT* pAreaCount,
- BOOL /* bAcceptCellRef */,
+ sal_uInt16* pAreaCount,
+ sal_Bool /* bAcceptCellRef */,
ScAddress::Details const & rDetails ) const
{
DBG_ASSERT( pDoc, "Kein Dokument uebergeben!" );
if ( !pDoc )
- return FALSE;
+ return sal_False;
// BROKEN BROKEN BROKEN
// but it is only used in the consolidate dialog. Ignore for now.
@@ -125,7 +125,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
/*
* Erwartet wird ein String der Form
* "$Tabelle1.$A$1:$Tabelle3.$D$17"
- * Wenn bAcceptCellRef == TRUE ist, wird auch ein String der Form
+ * Wenn bAcceptCellRef == sal_True ist, wird auch ein String der Form
* "$Tabelle1.$A$1"
* akzeptiert.
*
@@ -134,7 +134,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
* wieder geloescht werden muss!
*/
- BOOL bStrOk = FALSE;
+ sal_Bool bStrOk = sal_False;
String aTempAreaStr(rAreaStr);
String aStartPosStr;
String aEndPosStr;
@@ -145,7 +145,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
aTempAreaStr.Append(rAreaStr);
}
- USHORT nColonPos = aTempAreaStr.Search(':');
+ sal_uInt16 nColonPos = aTempAreaStr.Search(':');
if ( STRING_NOTFOUND != nColonPos
&& STRING_NOTFOUND != aTempAreaStr.Search('.') )
@@ -160,23 +160,23 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
{
if ( ConvertSingleRef( pDoc, aEndPosStr, aStartPos.Tab(), aEndPos, rDetails ) )
{
- aStartPos.SetRelCol( FALSE );
- aStartPos.SetRelRow( FALSE );
- aStartPos.SetRelTab( FALSE );
- aEndPos.SetRelCol( FALSE );
- aEndPos.SetRelRow( FALSE );
- aEndPos.SetRelTab( FALSE );
+ aStartPos.SetRelCol( sal_False );
+ aStartPos.SetRelRow( sal_False );
+ aStartPos.SetRelTab( sal_False );
+ aEndPos.SetRelCol( sal_False );
+ aEndPos.SetRelRow( sal_False );
+ aEndPos.SetRelTab( sal_False );
- bStrOk = TRUE;
+ bStrOk = sal_True;
if ( pppAreas && pAreaCount ) // Array zurueckgegeben?
{
SCTAB nStartTab = aStartPos.Tab();
SCTAB nEndTab = aEndPos.Tab();
- USHORT nTabCount = static_cast<USHORT>(nEndTab-nStartTab+1);
+ sal_uInt16 nTabCount = static_cast<sal_uInt16>(nEndTab-nStartTab+1);
ScArea** theAreas = new ScArea*[nTabCount];
SCTAB nTab = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
ScArea theArea( 0, aStartPos.Col(), aStartPos.Row(),
aEndPos.Col(), aEndPos.Row() );
@@ -199,7 +199,7 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
+sal_Bool ScRangeUtil::IsAbsArea( const String& rAreaStr,
ScDocument* pDoc,
SCTAB nTab,
String* pCompleteStr,
@@ -207,7 +207,7 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
ScRefAddress* pEndPos,
ScAddress::Details const & rDetails ) const
{
- BOOL bIsAbsArea = FALSE;
+ sal_Bool bIsAbsArea = sal_False;
ScRefAddress startPos;
ScRefAddress endPos;
@@ -215,12 +215,12 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
if ( bIsAbsArea )
{
- startPos.SetRelCol( FALSE );
- startPos.SetRelRow( FALSE );
- startPos.SetRelTab( FALSE );
- endPos .SetRelCol( FALSE );
- endPos .SetRelRow( FALSE );
- endPos .SetRelTab( FALSE );
+ startPos.SetRelCol( sal_False );
+ startPos.SetRelRow( sal_False );
+ startPos.SetRelTab( sal_False );
+ endPos .SetRelCol( sal_False );
+ endPos .SetRelRow( sal_False );
+ endPos .SetRelTab( sal_False );
if ( pCompleteStr )
{
@@ -241,20 +241,20 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::IsAbsPos( const String& rPosStr,
+sal_Bool ScRangeUtil::IsAbsPos( const String& rPosStr,
ScDocument* pDoc,
SCTAB nTab,
String* pCompleteStr,
ScRefAddress* pPosTripel,
ScAddress::Details const & rDetails ) const
{
- BOOL bIsAbsPos = FALSE;
+ sal_Bool bIsAbsPos = sal_False;
ScRefAddress thePos;
bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails );
- thePos.SetRelCol( FALSE );
- thePos.SetRelRow( FALSE );
- thePos.SetRelTab( FALSE );
+ thePos.SetRelCol( sal_False );
+ thePos.SetRelRow( sal_False );
+ thePos.SetRelTab( sal_False );
if ( bIsAbsPos )
{
@@ -269,7 +269,7 @@ BOOL ScRangeUtil::IsAbsPos( const String& rPosStr,
//------------------------------------------------------------------------
-BOOL ScRangeUtil::MakeRangeFromName (
+sal_Bool ScRangeUtil::MakeRangeFromName (
const String& rName,
ScDocument* pDoc,
SCTAB nCurTab,
@@ -277,7 +277,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
RutlNameScope eScope,
ScAddress::Details const & rDetails ) const
{
- BOOL bResult=FALSE;
+ sal_Bool bResult=sal_False;
ScRangeUtil aRangeUtil;
SCTAB nTab = 0;
SCCOL nColStart = 0;
@@ -288,7 +288,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
if( eScope==RUTL_NAMES )
{
ScRangeName& rRangeNames = *(pDoc->GetRangeName());
- USHORT nAt = 0;
+ sal_uInt16 nAt = 0;
if ( rRangeNames.SearchName( rName, nAt ) )
{
@@ -307,7 +307,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
nRowStart = aStartPos.Row();
nColEnd = aEndPos.Col();
nRowEnd = aEndPos.Row();
- bResult = TRUE;
+ bResult = sal_True;
}
else
{
@@ -319,7 +319,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
nTab = aStartPos.Tab();
nColStart = nColEnd = aStartPos.Col();
nRowStart = nRowEnd = aStartPos.Row();
- bResult = TRUE;
+ bResult = sal_True;
}
}
}
@@ -327,7 +327,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
else if( eScope==RUTL_DBASE )
{
ScDBCollection& rDbNames = *(pDoc->GetDBCollection());
- USHORT nAt = 0;
+ sal_uInt16 nAt = 0;
if ( rDbNames.SearchName( rName, nAt ) )
{
@@ -335,7 +335,7 @@ BOOL ScRangeUtil::MakeRangeFromName (
pData->GetArea( nTab, nColStart, nRowStart,
nColEnd, nRowEnd );
- bResult = TRUE;
+ bResult = sal_True;
}
}
else
@@ -910,7 +910,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
ScAddress::ExternalInfo aExtInfo1, aExtInfo2;
ScAddress aCell1, aCell2;
rtl::OUString aBuf;
- USHORT nRet = aCell1.Parse(aBeginCell, pDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
+ sal_uInt16 nRet = aCell1.Parse(aBeginCell, pDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
if ((nRet & SCA_VALID) != SCA_VALID)
// first cell is invalid.
continue;
@@ -938,7 +938,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
// Chart always saves ranges using CONV_OOO convention.
ScAddress::ExternalInfo aExtInfo;
ScAddress aCell;
- USHORT nRet = aCell.Parse(aToken, pDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
+ sal_uInt16 nRet = aCell.Parse(aToken, pDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
if ((nRet & SCA_VALID) != SCA_VALID)
continue;
@@ -990,7 +990,7 @@ ScArea& ScArea::operator=( const ScArea& r )
//------------------------------------------------------------------------
-BOOL ScArea::operator==( const ScArea& r ) const
+sal_Bool ScArea::operator==( const ScArea& r ) const
{
return ( (nTab == r.nTab)
&& (nColStart == r.nColStart)
@@ -1007,10 +1007,10 @@ ScAreaNameIterator::ScAreaNameIterator( ScDocument* pDoc ) :
pRangeName = pDoc->GetRangeName();
pDBCollection = pDoc->GetDBCollection();
nPos = 0;
- bFirstPass = TRUE;
+ bFirstPass = sal_True;
}
-BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
+sal_Bool ScAreaNameIterator::Next( String& rName, ScRange& rRange )
{
for (;;)
{
@@ -1022,12 +1022,12 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
if ( pData && pData->IsValidReference(rRange) )
{
rName = pData->GetName();
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
}
else
{
- bFirstPass = FALSE;
+ bFirstPass = sal_False;
nPos = 0;
}
}
@@ -1040,11 +1040,11 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
{
pData->GetArea( rRange );
rName = pData->GetName();
- return TRUE; // gefunden
+ return sal_True; // gefunden
}
}
else
- return FALSE; // gibt nichts mehr
+ return sal_False; // gibt nichts mehr
}
}
}
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 6da946463697..0adc477b7992 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -46,12 +46,12 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nDataSize;
rStream >> nDataSize;
- ULONG nDataPos = rStream.Tell();
+ sal_uLong nDataPos = rStream.Tell();
nTotalEnd = nDataPos + nDataSize;
nEntryEnd = nTotalEnd;
rStream.SeekRel(nDataSize);
- USHORT nID;
+ sal_uInt16 nID;
rStream >> nID;
if (nID != SCID_SIZES)
{
@@ -67,7 +67,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nSizeTableLen;
rStream >> nSizeTableLen;
- pBuf = new BYTE[nSizeTableLen];
+ pBuf = new sal_uInt8[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
pMemStream = new SvMemoryStream( (char*)pBuf, nSizeTableLen, STREAM_READ );
}
@@ -92,7 +92,7 @@ ScMultipleReadHeader::~ScMultipleReadHeader()
void ScMultipleReadHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" );
if ( nPos != nEntryEnd )
{
@@ -106,7 +106,7 @@ void ScMultipleReadHeader::EndEntry()
void ScMultipleReadHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
sal_uInt32 nEntrySize;
(*pMemStream) >> nEntrySize;
@@ -114,9 +114,9 @@ void ScMultipleReadHeader::StartEntry()
DBG_ASSERT( nEntryEnd <= nTotalEnd, "zuviele Eintraege gelesen" );
}
-ULONG ScMultipleReadHeader::BytesLeft() const
+sal_uLong ScMultipleReadHeader::BytesLeft() const
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
if (nReadEnd <= nEntryEnd)
return nEntryEnd-nReadEnd;
@@ -139,16 +139,16 @@ ScMultipleWriteHeader::ScMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nD
ScMultipleWriteHeader::~ScMultipleWriteHeader()
{
- ULONG nDataEnd = rStream.Tell();
+ sal_uLong nDataEnd = rStream.Tell();
- rStream << (USHORT) SCID_SIZES;
+ rStream << (sal_uInt16) SCID_SIZES;
rStream << static_cast<sal_uInt32>(aMemStream.Tell());
rStream.Write( aMemStream.GetData(), aMemStream.Tell() );
if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen?
{
nDataSize = nDataEnd - nDataPos;
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek(nDataPos-sizeof(sal_uInt32));
rStream << nDataSize; // Groesse am Anfang eintragen
rStream.Seek(nPos);
@@ -157,13 +157,13 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader()
void ScMultipleWriteHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
aMemStream << static_cast<sal_uInt32>(nPos - nEntryStart);
}
void ScMultipleWriteHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
nEntryStart = nPos;
}
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index 47774d348044..389b00859a26 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -66,19 +66,19 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
{
nCol = nRelCol + rPos.Col();
if ( !VALIDCOL( nCol ) )
- Flags.bColDeleted = TRUE;
+ Flags.bColDeleted = sal_True;
}
if ( Flags.bRowRel )
{
nRow = nRelRow + rPos.Row();
if ( !VALIDROW( nRow ) )
- Flags.bRowDeleted = TRUE;
+ Flags.bRowDeleted = sal_True;
}
if ( Flags.bTabRel )
{
nTab = nRelTab + rPos.Tab();
if ( !VALIDTAB( nTab ) )
- Flags.bTabDeleted = TRUE;
+ Flags.bTabDeleted = sal_True;
}
}
@@ -87,62 +87,62 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 switch ( rBools.bRelCol )
//UNUSED2008-05 {
//UNUSED2008-05 case SR_DELETED :
-//UNUSED2008-05 Flags.bColRel = TRUE; // der war verlorengegangen
-//UNUSED2008-05 Flags.bColDeleted = TRUE;
+//UNUSED2008-05 Flags.bColRel = sal_True; // der war verlorengegangen
+//UNUSED2008-05 Flags.bColDeleted = sal_True;
//UNUSED2008-05 break;
//UNUSED2008-05 case SR_ABSOLUTE :
-//UNUSED2008-05 Flags.bColRel = FALSE;
-//UNUSED2008-05 Flags.bColDeleted = FALSE;
+//UNUSED2008-05 Flags.bColRel = sal_False;
+//UNUSED2008-05 Flags.bColDeleted = sal_False;
//UNUSED2008-05 break;
//UNUSED2008-05 case SR_RELABS :
//UNUSED2008-05 case SR_RELATIVE :
//UNUSED2008-05 default:
-//UNUSED2008-05 Flags.bColRel = TRUE;
-//UNUSED2008-05 Flags.bColDeleted = FALSE;
+//UNUSED2008-05 Flags.bColRel = sal_True;
+//UNUSED2008-05 Flags.bColDeleted = sal_False;
//UNUSED2008-05 }
//UNUSED2008-05 switch ( rBools.bRelRow )
//UNUSED2008-05 {
//UNUSED2008-05 case SR_DELETED :
-//UNUSED2008-05 Flags.bRowRel = TRUE; // der war verlorengegangen
-//UNUSED2008-05 Flags.bRowDeleted = TRUE;
+//UNUSED2008-05 Flags.bRowRel = sal_True; // der war verlorengegangen
+//UNUSED2008-05 Flags.bRowDeleted = sal_True;
//UNUSED2008-05 break;
//UNUSED2008-05 case SR_ABSOLUTE :
-//UNUSED2008-05 Flags.bRowRel = FALSE;
-//UNUSED2008-05 Flags.bRowDeleted = FALSE;
+//UNUSED2008-05 Flags.bRowRel = sal_False;
+//UNUSED2008-05 Flags.bRowDeleted = sal_False;
//UNUSED2008-05 break;
//UNUSED2008-05 case SR_RELABS :
//UNUSED2008-05 case SR_RELATIVE :
//UNUSED2008-05 default:
-//UNUSED2008-05 Flags.bRowRel = TRUE;
-//UNUSED2008-05 Flags.bRowDeleted = FALSE;
+//UNUSED2008-05 Flags.bRowRel = sal_True;
+//UNUSED2008-05 Flags.bRowDeleted = sal_False;
//UNUSED2008-05 }
//UNUSED2008-05 switch ( rBools.bRelTab )
//UNUSED2008-05 {
//UNUSED2008-05 case SR_DELETED :
-//UNUSED2008-05 Flags.bTabRel = TRUE; // der war verlorengegangen
-//UNUSED2008-05 Flags.bTabDeleted = TRUE;
+//UNUSED2008-05 Flags.bTabRel = sal_True; // der war verlorengegangen
+//UNUSED2008-05 Flags.bTabDeleted = sal_True;
//UNUSED2008-05 break;
//UNUSED2008-05 case SR_ABSOLUTE :
-//UNUSED2008-05 Flags.bTabRel = FALSE;
-//UNUSED2008-05 Flags.bTabDeleted = FALSE;
+//UNUSED2008-05 Flags.bTabRel = sal_False;
+//UNUSED2008-05 Flags.bTabDeleted = sal_False;
//UNUSED2008-05 break;
//UNUSED2008-05 case SR_RELABS :
//UNUSED2008-05 case SR_RELATIVE :
//UNUSED2008-05 default:
-//UNUSED2008-05 Flags.bTabRel = TRUE;
-//UNUSED2008-05 Flags.bTabDeleted = FALSE;
+//UNUSED2008-05 Flags.bTabRel = sal_True;
+//UNUSED2008-05 Flags.bTabDeleted = sal_False;
//UNUSED2008-05 }
-//UNUSED2008-05 Flags.bFlag3D = (rBools.bOldFlag3D & SRF_3D ? TRUE : FALSE);
-//UNUSED2008-05 Flags.bRelName = (rBools.bOldFlag3D & SRF_RELNAME ? TRUE : FALSE);
+//UNUSED2008-05 Flags.bFlag3D = (rBools.bOldFlag3D & SRF_3D ? sal_True : sal_False);
+//UNUSED2008-05 Flags.bRelName = (rBools.bOldFlag3D & SRF_RELNAME ? sal_True : sal_False);
//UNUSED2008-05 if ( !Flags.bFlag3D )
-//UNUSED2008-05 Flags.bTabRel = TRUE; // ist bei einigen aelteren Dokumenten nicht gesetzt
+//UNUSED2008-05 Flags.bTabRel = sal_True; // ist bei einigen aelteren Dokumenten nicht gesetzt
//UNUSED2008-05 }
//UNUSED2008-05
//UNUSED2008-05
//UNUSED2008-05 /*
//UNUSED2008-05 bis Release 3.1 sah Store so aus
//UNUSED2008-05
-//UNUSED2008-05 BYTE n = ( ( r.bOldFlag3D & 0x03 ) << 6 ) // RelName, 3D
+//UNUSED2008-05 sal_uInt8 n = ( ( r.bOldFlag3D & 0x03 ) << 6 ) // RelName, 3D
//UNUSED2008-05 | ( ( r.bRelTab & 0x03 ) << 4 ) // Relative, RelAbs
//UNUSED2008-05 | ( ( r.bRelRow & 0x03 ) << 2 )
//UNUSED2008-05 | ( r.bRelCol & 0x03 );
@@ -160,9 +160,9 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 Aber immer noch nCol > MAXCOL und gut sollte sein..
//UNUSED2008-05 */
//UNUSED2008-05
-//UNUSED2008-05 BYTE ScSingleRefData::CreateStoreByteFromFlags() const
+//UNUSED2008-05 sal_uInt8 ScSingleRefData::CreateStoreByteFromFlags() const
//UNUSED2008-05 {
-//UNUSED2008-05 return (BYTE)(
+//UNUSED2008-05 return (sal_uInt8)(
//UNUSED2008-05 ( (Flags.bRelName & 0x01) << 7 )
//UNUSED2008-05 | ( (Flags.bFlag3D & 0x01) << 6 )
//UNUSED2008-05 | ( (Flags.bTabDeleted & 0x01) << 5 )
@@ -175,7 +175,7 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 }
//UNUSED2008-05
//UNUSED2008-05
-//UNUSED2008-05 void ScSingleRefData::CreateFlagsFromLoadByte( BYTE n )
+//UNUSED2008-05 void ScSingleRefData::CreateFlagsFromLoadByte( sal_uInt8 n )
//UNUSED2008-05 {
//UNUSED2008-05 Flags.bColRel = (n & 0x01 );
//UNUSED2008-05 Flags.bColDeleted = ( (n >> 1) & 0x01 );
@@ -188,7 +188,7 @@ void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 }
-BOOL ScSingleRefData::operator==( const ScSingleRefData& r ) const
+sal_Bool ScSingleRefData::operator==( const ScSingleRefData& r ) const
{
return bFlags == r.bFlags &&
(Flags.bColRel ? nRelCol == r.nRelCol : nCol == r.nCol) &&
@@ -206,8 +206,8 @@ static void lcl_putInOrder( ScSingleRefData & rRef1, ScSingleRefData & rRef2 )
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
SCTAB nTab1, nTab2;
- BOOL bTmp;
- BYTE nRelState1, nRelState2;
+ sal_Bool bTmp;
+ sal_uInt8 nRelState1, nRelState2;
if ( rRef1.Flags.bRelName )
nRelState1 =
((rRef1.Flags.bTabRel & 0x01) << 2)
@@ -288,8 +288,8 @@ static void lcl_putInOrder( ScSingleRefData & rRef1, ScSingleRefData & rRef2 )
rRef1.Flags.bTabDeleted = rRef2.Flags.bTabDeleted;
rRef2.Flags.bTabDeleted = bTmp;
}
- rRef1.Flags.bRelName = ( nRelState1 ? TRUE : FALSE );
- rRef2.Flags.bRelName = ( nRelState2 ? TRUE : FALSE );
+ rRef1.Flags.bRelName = ( nRelState1 ? sal_True : sal_False );
+ rRef2.Flags.bRelName = ( nRelState2 ? sal_True : sal_False );
}
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index cdb5962b2b9c..831fcf5c0623 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -48,20 +48,20 @@ const sal_Unicode __FAR_DATA ScRefFinder::pDelimiters[] = {
// =======================================================================
-inline BOOL IsText( sal_Unicode c )
+inline sal_Bool IsText( sal_Unicode c )
{
return !ScGlobal::UnicodeStrChr( ScRefFinder::pDelimiters, c );
}
-inline BOOL IsText( BOOL& bQuote, sal_Unicode c )
+inline sal_Bool IsText( sal_Bool& bQuote, sal_Unicode c )
{
if ( c == '\'' )
{
bQuote = !bQuote;
- return TRUE;
+ return sal_True;
}
if ( bQuote )
- return TRUE;
+ return sal_True;
return IsText( c );
}
@@ -78,9 +78,9 @@ ScRefFinder::~ScRefFinder()
{
}
-USHORT lcl_NextFlags( USHORT nOld )
+sal_uInt16 lcl_NextFlags( sal_uInt16 nOld )
{
- USHORT nNew = nOld & 7; // die drei Abs-Flags
+ sal_uInt16 nNew = nOld & 7; // die drei Abs-Flags
nNew = ( nNew - 1 ) & 7; // weiterzaehlen
if (!(nOld & SCA_TAB_3D))
@@ -124,7 +124,7 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos )
while ( nEStart <= nEndPos && !IsText(pSource[nEStart]) )
++nEStart;
- BOOL bQuote = FALSE;
+ sal_Bool bQuote = sal_False;
xub_StrLen nEEnd = nEStart;
while ( nEEnd <= nEndPos && IsText(bQuote,pSource[nEEnd]) )
++nEEnd;
@@ -134,10 +134,10 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos )
// Test, ob aExpr eine Referenz ist
- USHORT nResult = aAddr.Parse( aExpr, pDoc, pDoc->GetAddressConvention() );
+ sal_uInt16 nResult = aAddr.Parse( aExpr, pDoc, pDoc->GetAddressConvention() );
if ( nResult & SCA_VALID )
{
- USHORT nFlags = lcl_NextFlags( nResult );
+ sal_uInt16 nFlags = lcl_NextFlags( nResult );
aAddr.Format( aExpr, nFlags, pDoc, pDoc->GetAddressConvention() );
xub_StrLen nAbsStart = nStartPos+aResult.Len()+aSep.Len();
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index 5520aac6d6eb..220bdee8d260 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -39,7 +39,7 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const
{
if ( ppControl && *ppControl )
{
- (*ppControl)->SetAllowRefresh( FALSE );
+ (*ppControl)->SetAllowRefresh( sal_False );
// wait for any running refresh in another thread to finnish
::vos::OGuard aGuard( (*ppControl)->GetMutex() );
}
@@ -54,9 +54,9 @@ ScRefreshTimer::~ScRefreshTimer()
}
-void ScRefreshTimer::SetRefreshDelay( ULONG nSeconds )
+void ScRefreshTimer::SetRefreshDelay( sal_uLong nSeconds )
{
- BOOL bActive = IsActive();
+ sal_Bool bActive = IsActive();
if ( bActive && !nSeconds )
Stop();
SetTimeout( nSeconds * 1000 );
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index f4976a914c39..64580b094cf2 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -71,7 +71,7 @@ void ScRefTokenHelper::compileRangeRepresentation(
// There MUST be exactly one reference per range token and nothing
// else, and it MUST be a valid reference, not some #REF!
- USHORT nLen = pArray->GetLen();
+ sal_uInt16 nLen = pArray->GetLen();
if (!nLen)
continue; // Should a missing range really be allowed?
if (nLen != 1)
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index ad11190be75d..5dd077ed042f 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -41,9 +41,9 @@
//------------------------------------------------------------------------
template< typename R, typename S, typename U >
-BOOL lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask )
+sal_Bool lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = sal_False;
if ( rRef >= nStart )
rRef = sal::static_int_cast<R>( rRef + nDelta );
else if ( nDelta < 0 && rRef >= nStart + nDelta )
@@ -51,20 +51,20 @@ BOOL lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask )
if ( rRef < 0 )
{
rRef = 0;
- bCut = TRUE;
+ bCut = sal_True;
}
else if ( rRef > nMask )
{
rRef = nMask;
- bCut = TRUE;
+ bCut = sal_True;
}
return bCut;
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask )
+sal_Bool lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = sal_False;
if ( rRef >= nStart )
rRef = sal::static_int_cast<R>( rRef + nDelta );
else if ( nDelta < 0 && rRef >= nStart + nDelta )
@@ -72,23 +72,23 @@ BOOL lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask )
if ( rRef < 0 )
{
rRef = 0;
- bCut = TRUE;
+ bCut = sal_True;
}
else if ( rRef > nMask )
{
rRef = nMask;
- bCut = TRUE;
+ bCut = sal_True;
}
return bCut;
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
+sal_Bool lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
{
if ( rRef >= nStart && rRef <= nEnd )
{
rRef = sal::static_int_cast<R>( rRef + nDelta );
- return TRUE;
+ return sal_True;
}
if ( nDelta > 0 ) // nach hinten schieben
@@ -99,7 +99,7 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
rRef = sal::static_int_cast<R>( rRef + nDelta ); // in the moved range
else
rRef -= nEnd - nStart + 1; // nachruecken
- return TRUE;
+ return sal_True;
}
}
else // nach vorne schieben
@@ -110,27 +110,27 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta )
rRef = sal::static_int_cast<R>( rRef + nDelta ); // in the moved range
else
rRef += nEnd - nStart + 1; // nachruecken
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveItCut( R& rRef, S nDelta, U nMask )
+sal_Bool lcl_MoveItCut( R& rRef, S nDelta, U nMask )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = sal_False;
rRef = sal::static_int_cast<R>( rRef + nDelta );
if ( rRef < 0 )
{
rRef = 0;
- bCut = TRUE;
+ bCut = sal_True;
}
else if ( rRef > nMask )
{
rRef = nMask;
- bCut = TRUE;
+ bCut = sal_True;
}
return bCut;
}
@@ -146,14 +146,14 @@ void lcl_MoveItWrap( R& rRef, S nDelta, U nMask )
}
template< typename R, typename S, typename U >
-BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1,
- R& rRef2Val, BOOL& rRef2Del, BOOL bDo2,
+sal_Bool lcl_MoveRefPart( R& rRef1Val, sal_Bool& rRef1Del, sal_Bool bDo1,
+ R& rRef2Val, sal_Bool& rRef2Del, sal_Bool bDo2,
U nStart, U nEnd, S nDelta, U nMask )
{
if ( nDelta )
{
- BOOL bDel, bCut1, bCut2;
- bDel = bCut1 = bCut2 = FALSE;
+ sal_Bool bDel, bCut1, bCut2;
+ bDel = bCut1 = bCut2 = sal_False;
S n;
if (bDo1 && bDo2)
{
@@ -162,14 +162,14 @@ BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1,
n = nStart + nDelta;
if ( n <= rRef1Val && rRef1Val < nStart
&& n <= rRef2Val && rRef2Val < nStart )
- bDel = TRUE;
+ bDel = sal_True;
}
else
{
n = nEnd + nDelta;
if ( nEnd < rRef1Val && rRef1Val <= n
&& nEnd < rRef2Val && rRef2Val <= n )
- bDel = TRUE;
+ bDel = sal_True;
}
}
if ( bDel )
@@ -195,15 +195,15 @@ BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1,
}
}
if ( bDel || (bCut1 && bCut2) )
- rRef1Del = rRef2Del = TRUE;
+ rRef1Del = rRef2Del = sal_True;
return bDel || bCut1 || bCut2 || rRef1Del || rRef2Del;
}
else
- return FALSE;
+ return sal_False;
}
template< typename R, typename S, typename U >
-BOOL IsExpand( R n1, R n2, U nStart, S nD )
+sal_Bool IsExpand( R n1, R n2, U nStart, S nD )
{ //! vor normalem Move...
return
nD > 0 // Insert
@@ -217,7 +217,7 @@ BOOL IsExpand( R n1, R n2, U nStart, S nD )
template< typename R, typename S, typename U >
void Expand( R& n1, R& n2, U nStart, S nD )
-{ //! nach normalem Move..., nur wenn IsExpand vorher TRUE war!
+{ //! nach normalem Move..., nur wenn IsExpand vorher sal_True war!
//! erst das Ende
if ( n2 + 1 == nStart )
{ // am Ende
@@ -229,19 +229,19 @@ void Expand( R& n1, R& n2, U nStart, S nD )
}
-BOOL lcl_IsWrapBig( INT32 nRef, INT32 nDelta )
+sal_Bool lcl_IsWrapBig( sal_Int32 nRef, sal_Int32 nDelta )
{
if ( nRef > 0 && nDelta > 0 )
return nRef + nDelta <= 0;
else if ( nRef < 0 && nDelta < 0 )
return nRef + nDelta >= 0;
- return FALSE;
+ return sal_False;
}
-BOOL lcl_MoveBig( INT32& rRef, INT32 nStart, INT32 nDelta )
+sal_Bool lcl_MoveBig( sal_Int32& rRef, sal_Int32 nStart, sal_Int32 nDelta )
{
- BOOL bCut = FALSE;
+ sal_Bool bCut = sal_False;
if ( rRef >= nStart )
{
if ( nDelta > 0 )
@@ -254,9 +254,9 @@ BOOL lcl_MoveBig( INT32& rRef, INT32 nStart, INT32 nDelta )
return bCut;
}
-BOOL lcl_MoveItCutBig( INT32& rRef, INT32 nDelta )
+sal_Bool lcl_MoveItCutBig( sal_Int32& rRef, sal_Int32 nDelta )
{
- BOOL bCut = lcl_IsWrapBig( rRef, nDelta );
+ sal_Bool bCut = lcl_IsWrapBig( rRef, nDelta );
rRef += nDelta;
return bCut;
}
@@ -278,15 +278,15 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
SCROW oldRow2 = theRow2;
SCTAB oldTab2 = theTab2;
- BOOL bCut1, bCut2;
+ sal_Bool bCut1, bCut2;
if (eUpdateRefMode == URM_INSDEL)
{
- BOOL bExpand = pDoc->IsExpandRefs();
+ sal_Bool bExpand = pDoc->IsExpandRefs();
if ( nDx && (theRow1 >= nRow1) && (theRow2 <= nRow2) &&
(theTab1 >= nTab1) && (theTab2 <= nTab2) )
{
- BOOL bExp = (bExpand && IsExpand( theCol1, theCol2, nCol1, nDx ));
+ sal_Bool bExp = (bExpand && IsExpand( theCol1, theCol2, nCol1, nDx ));
bCut1 = lcl_MoveStart( theCol1, nCol1, nDx, MAXCOL );
bCut2 = lcl_MoveEnd( theCol2, nCol1, nDx, MAXCOL );
if ( theCol2 < theCol1 )
@@ -305,7 +305,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
if ( nDy && (theCol1 >= nCol1) && (theCol2 <= nCol2) &&
(theTab1 >= nTab1) && (theTab2 <= nTab2) )
{
- BOOL bExp = (bExpand && IsExpand( theRow1, theRow2, nRow1, nDy ));
+ sal_Bool bExp = (bExpand && IsExpand( theRow1, theRow2, nRow1, nDy ));
bCut1 = lcl_MoveStart( theRow1, nRow1, nDy, MAXROW );
bCut2 = lcl_MoveEnd( theRow2, nRow1, nDy, MAXROW );
if ( theRow2 < theRow1 )
@@ -326,7 +326,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
{
SCsTAB nMaxTab = pDoc->GetTableCount() - 1;
nMaxTab = sal::static_int_cast<SCsTAB>(nMaxTab + nDz); // adjust to new count
- BOOL bExp = (bExpand && IsExpand( theTab1, theTab2, nTab1, nDz ));
+ sal_Bool bExp = (bExpand && IsExpand( theTab1, theTab2, nTab1, nDz ));
bCut1 = lcl_MoveStart( theTab1, nTab1, nDz, static_cast<SCTAB>(nMaxTab) );
bCut2 = lcl_MoveEnd( theTab2, nTab1, nDz, static_cast<SCTAB>(nMaxTab) );
if ( theTab2 < theTab1 )
@@ -406,18 +406,18 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo
// Referenzen koennen auch ausserhalb des Dokuments liegen!
// Ganze Spalten/Zeilen (nInt32Min..nInt32Max) bleiben immer solche!
ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode,
- const ScBigRange& rWhere, INT32 nDx, INT32 nDy, INT32 nDz,
+ const ScBigRange& rWhere, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz,
ScBigRange& rWhat )
{
ScRefUpdateRes eRet = UR_NOTHING;
const ScBigRange aOldRange( rWhat );
- INT32 nCol1, nRow1, nTab1, nCol2, nRow2, nTab2;
- INT32 theCol1, theRow1, theTab1, theCol2, theRow2, theTab2;
+ sal_Int32 nCol1, nRow1, nTab1, nCol2, nRow2, nTab2;
+ sal_Int32 theCol1, theRow1, theTab1, theCol2, theRow2, theTab2;
rWhere.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
rWhat.GetVars( theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 );
- BOOL bCut1, bCut2;
+ sal_Bool bCut1, bCut2;
if (eUpdateRefMode == URM_INSDEL)
{
@@ -512,11 +512,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
if( eMode == URM_INSDEL )
{
- BOOL bExpand = pDoc->IsExpandRefs();
+ sal_Bool bExpand = pDoc->IsExpandRefs();
const ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- BOOL bInDeleteUndo =
- ( pChangeTrack ? pChangeTrack->IsInDeleteUndo() : FALSE );
+ sal_Bool bInDeleteUndo =
+ ( pChangeTrack ? pChangeTrack->IsInDeleteUndo() : sal_False );
SCCOL oldCol1 = rRef.Ref1.nCol;
SCROW oldRow1 = rRef.Ref1.nRow;
@@ -525,12 +525,12 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
SCROW oldRow2 = rRef.Ref2.nRow;
SCTAB oldTab2 = rRef.Ref2.nTab;
- BOOL bRef1ColDel = rRef.Ref1.IsColDeleted();
- BOOL bRef2ColDel = rRef.Ref2.IsColDeleted();
- BOOL bRef1RowDel = rRef.Ref1.IsRowDeleted();
- BOOL bRef2RowDel = rRef.Ref2.IsRowDeleted();
- BOOL bRef1TabDel = rRef.Ref1.IsTabDeleted();
- BOOL bRef2TabDel = rRef.Ref2.IsTabDeleted();
+ sal_Bool bRef1ColDel = rRef.Ref1.IsColDeleted();
+ sal_Bool bRef2ColDel = rRef.Ref2.IsColDeleted();
+ sal_Bool bRef1RowDel = rRef.Ref1.IsRowDeleted();
+ sal_Bool bRef2RowDel = rRef.Ref2.IsRowDeleted();
+ sal_Bool bRef1TabDel = rRef.Ref1.IsTabDeleted();
+ sal_Bool bRef2TabDel = rRef.Ref2.IsTabDeleted();
if( nDx &&
((rRef.Ref1.nRow >= nRow1
@@ -540,11 +540,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nTab <= nTab2) || (bRef1TabDel || bRef2TabDel))
)
{
- BOOL bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nCol,
+ sal_Bool bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nCol,
rRef.Ref2.nCol, nCol1, nDx ));
- BOOL bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref1.IsColRel()));
- BOOL bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref2.IsColRel()));
if ( lcl_MoveRefPart( rRef.Ref1.nCol, bRef1ColDel, bDo1,
rRef.Ref2.nCol, bRef2ColDel, bDo2,
@@ -555,17 +555,17 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
{
if ( bRef1ColDel && nCol1 <= rRef.Ref1.nCol &&
rRef.Ref1.nCol <= nCol1 + nDx )
- rRef.Ref1.SetColDeleted( FALSE );
+ rRef.Ref1.SetColDeleted( sal_False );
if ( bRef2ColDel && nCol1 <= rRef.Ref2.nCol &&
rRef.Ref2.nCol <= nCol1 + nDx )
- rRef.Ref2.SetColDeleted( FALSE );
+ rRef.Ref2.SetColDeleted( sal_False );
}
else
{
if ( bRef1ColDel )
- rRef.Ref1.SetColDeleted( TRUE );
+ rRef.Ref1.SetColDeleted( sal_True );
if ( bRef2ColDel )
- rRef.Ref2.SetColDeleted( TRUE );
+ rRef.Ref2.SetColDeleted( sal_True );
}
}
if ( bExp )
@@ -582,11 +582,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nTab <= nTab2) || (bRef1TabDel || bRef2TabDel))
)
{
- BOOL bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nRow,
+ sal_Bool bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nRow,
rRef.Ref2.nRow, nRow1, nDy ));
- BOOL bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref1.IsRowRel()));
- BOOL bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref2.IsRowRel()));
if ( lcl_MoveRefPart( rRef.Ref1.nRow, bRef1RowDel, bDo1,
rRef.Ref2.nRow, bRef2RowDel, bDo2,
@@ -597,17 +597,17 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
{
if ( bRef1RowDel && nRow1 <= rRef.Ref1.nRow &&
rRef.Ref1.nRow <= nRow1 + nDy )
- rRef.Ref1.SetRowDeleted( FALSE );
+ rRef.Ref1.SetRowDeleted( sal_False );
if ( bRef2RowDel && nRow1 <= rRef.Ref2.nRow &&
rRef.Ref2.nRow <= nRow1 + nDy )
- rRef.Ref2.SetRowDeleted( FALSE );
+ rRef.Ref2.SetRowDeleted( sal_False );
}
else
{
if ( bRef1RowDel )
- rRef.Ref1.SetRowDeleted( TRUE );
+ rRef.Ref1.SetRowDeleted( sal_True );
if ( bRef2RowDel )
- rRef.Ref2.SetRowDeleted( TRUE );
+ rRef.Ref2.SetRowDeleted( sal_True );
}
}
if ( bExp )
@@ -624,12 +624,12 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nRow <= nRow2) || (bRef1RowDel || bRef2RowDel))
)
{
- BOOL bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nTab,
+ sal_Bool bExp = (bExpand && !bInDeleteUndo && IsExpand( rRef.Ref1.nTab,
rRef.Ref2.nTab, nTab1, nDz ));
SCTAB nMaxTab = pDoc->GetTableCount() - 1;
- BOOL bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo1 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref1.IsTabRel()));
- BOOL bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
+ sal_Bool bDo2 = (eWhat == ScRefUpdate::ALL || (eWhat ==
ScRefUpdate::ABSOLUTE && !rRef.Ref2.IsTabRel()));
if ( lcl_MoveRefPart( rRef.Ref1.nTab, bRef1TabDel, bDo1,
rRef.Ref2.nTab, bRef2TabDel, bDo2,
@@ -640,17 +640,17 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
{
if ( bRef1TabDel && nTab1 <= rRef.Ref1.nTab &&
rRef.Ref1.nTab <= nTab1 + nDz )
- rRef.Ref1.SetTabDeleted( FALSE );
+ rRef.Ref1.SetTabDeleted( sal_False );
if ( bRef2TabDel && nTab1 <= rRef.Ref2.nTab &&
rRef.Ref2.nTab <= nTab1 + nDz )
- rRef.Ref2.SetTabDeleted( FALSE );
+ rRef.Ref2.SetTabDeleted( sal_False );
}
else
{
if ( bRef1TabDel )
- rRef.Ref1.SetTabDeleted( TRUE );
+ rRef.Ref1.SetTabDeleted( sal_True );
if ( bRef2TabDel )
- rRef.Ref2.SetTabDeleted( TRUE );
+ rRef.Ref2.SetTabDeleted( sal_True );
}
}
if ( bExp )
@@ -684,12 +684,12 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
&& rRef.Ref2.nRow <= nRow2-nDy
&& rRef.Ref2.nTab <= nTab2-nDz )
{
- eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, TRUE ); // immer verschieben
+ eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, sal_False, sal_True ); // immer verschieben
}
else if ( nDz && r.In( rPos ) )
{
- rRef.Ref1.SetFlag3D( TRUE );
- rRef.Ref2.SetFlag3D( TRUE );
+ rRef.Ref1.SetFlag3D( sal_True );
+ rRef.Ref2.SetFlag3D( sal_True );
eRet = UR_UPDATED;
if (eWhat != ScRefUpdate::ABSOLUTE)
rRef.CalcRelFromAbs( rPos );
@@ -698,7 +698,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
rRef.CalcRelFromAbs( rPos );
}
else if( eMode == URM_COPY && r.In( rPos ) )
- eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, FALSE ); // nur relative
+ eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, sal_False, sal_False ); // nur relative
// sollte nicht mehr verwendet werden muessen
else if (eWhat != ScRefUpdate::ABSOLUTE)
rRef.CalcRelFromAbs( rPos );
@@ -709,7 +709,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute )
+ ScComplexRefData& rRef, sal_Bool bWrap, sal_Bool bAbsolute )
{
ScRefUpdateRes eRet = UR_NOTHING;
@@ -720,10 +720,10 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
SCROW oldRow2 = rRef.Ref2.nRow;
SCTAB oldTab2 = rRef.Ref2.nTab;
- BOOL bCut1, bCut2;
+ sal_Bool bCut1, bCut2;
if ( nDx )
{
- bCut1 = bCut2 = FALSE;
+ bCut1 = bCut2 = sal_False;
if( bAbsolute || rRef.Ref1.IsColRel() )
{
if( bWrap )
@@ -742,13 +742,13 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
eRet = UR_UPDATED;
if ( bCut1 && bCut2 )
{
- rRef.Ref1.SetColDeleted( TRUE );
- rRef.Ref2.SetColDeleted( TRUE );
+ rRef.Ref1.SetColDeleted( sal_True );
+ rRef.Ref2.SetColDeleted( sal_True );
}
}
if ( nDy )
{
- bCut1 = bCut2 = FALSE;
+ bCut1 = bCut2 = sal_False;
if( bAbsolute || rRef.Ref1.IsRowRel() )
{
if( bWrap )
@@ -767,13 +767,13 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
eRet = UR_UPDATED;
if ( bCut1 && bCut2 )
{
- rRef.Ref1.SetRowDeleted( TRUE );
- rRef.Ref2.SetRowDeleted( TRUE );
+ rRef.Ref1.SetRowDeleted( sal_True );
+ rRef.Ref2.SetRowDeleted( sal_True );
}
}
if ( nDz )
{
- bCut1 = bCut2 = FALSE;
+ bCut1 = bCut2 = sal_False;
SCsTAB nMaxTab = (SCsTAB) pDoc->GetTableCount() - 1;
if( bAbsolute || rRef.Ref1.IsTabRel() )
{
@@ -795,8 +795,8 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
eRet = UR_UPDATED;
if ( bCut1 && bCut2 )
{
- rRef.Ref1.SetTabDeleted( TRUE );
- rRef.Ref2.SetTabDeleted( TRUE );
+ rRef.Ref1.SetTabDeleted( sal_True );
+ rRef.Ref2.SetTabDeleted( sal_True );
}
}
@@ -912,11 +912,11 @@ ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCRO
// in Y-Richtung darf die Ref auch eine Zeile weiter unten anfangen,
// falls ein Bereich Spaltenkoepfe enthaelt
- BOOL bUpdateX = ( nGrowX &&
+ sal_Bool bUpdateX = ( nGrowX &&
rRef.Ref1.nCol == rArea.aStart.Col() && rRef.Ref2.nCol == rArea.aEnd.Col() &&
rRef.Ref1.nRow >= rArea.aStart.Row() && rRef.Ref2.nRow <= rArea.aEnd.Row() &&
rRef.Ref1.nTab >= rArea.aStart.Tab() && rRef.Ref2.nTab <= rArea.aEnd.Tab() );
- BOOL bUpdateY = ( nGrowY &&
+ sal_Bool bUpdateY = ( nGrowY &&
rRef.Ref1.nCol >= rArea.aStart.Col() && rRef.Ref2.nCol <= rArea.aEnd.Col() &&
( rRef.Ref1.nRow == rArea.aStart.Row() || rRef.Ref1.nRow == rArea.aStart.Row()+1 ) &&
rRef.Ref2.nRow == rArea.aEnd.Row() &&
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 2ecc20f53405..fea4ea06ba50 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -100,15 +100,15 @@ ScMatrix* ScMatrix::CloneAndExtend( SCSIZE nNewCols, SCSIZE nNewRows ) const
return pScMat;
}
-void ScMatrix::SetErrorAtInterpreter( USHORT nError ) const
+void ScMatrix::SetErrorAtInterpreter( sal_uInt16 nError ) const
{
if ( pErrorInterpreter )
pErrorInterpreter->SetError( nError);
}
//
-// File format: USHORT columns, USHORT rows, (columns*rows) entries:
-// BYTE type ( CELLTYPE_NONE, CELLTYPE_VALUE, CELLTYPE_STRING ); nothing, double or String
+// File format: sal_uInt16 columns, sal_uInt16 rows, (columns*rows) entries:
+// sal_uInt8 type ( CELLTYPE_NONE, CELLTYPE_VALUE, CELLTYPE_STRING ); nothing, double or String
//
ScMatrix::ScMatrix(SvStream& /* rStream */)
@@ -117,8 +117,8 @@ ScMatrix::ScMatrix(SvStream& /* rStream */)
{
#if SC_ROWLIMIT_STREAM_ACCESS
#error address types changed!
- USHORT nC;
- USHORT nR;
+ sal_uInt16 nC;
+ sal_uInt16 nR;
rStream >> nC;
rStream >> nR;
@@ -133,7 +133,7 @@ ScMatrix::ScMatrix(SvStream& /* rStream */)
SCSIZE nReadCount = (SCSIZE) nC * nR;
for (SCSIZE i=0; i<nReadCount; i++)
{
- BYTE nType;
+ sal_uInt8 nType;
rStream >> nType;
if ( nType == CELLTYPE_VALUE )
{
@@ -173,34 +173,34 @@ void ScMatrix::Store(SvStream& /* rStream */) const
#if SC_ROWLIMIT_STREAM_ACCESS
#error address types changed!
SCSIZE nCount = nColCount * nRowCount;
- // Don't store matrix with more than USHORT max elements, old versions
- // might get confused in loops for(USHORT i=0; i<nC*nR; i++)
- if ( !pMat || nCount > ((USHORT)(~0)) )
+ // Don't store matrix with more than sal_uInt16 max elements, old versions
+ // might get confused in loops for(sal_uInt16 i=0; i<nC*nR; i++)
+ if ( !pMat || nCount > ((sal_uInt16)(~0)) )
{
DBG_ASSERT( pMat, "ScMatrix::Store: pMat == NULL" );
// We can't store a 0 dimension because old versions rely on some
// matrix being present, e.g. DDE link results, and old versions didn't
// create a matrix if dimension was 0. Store an error result.
- rStream << (USHORT) 1;
- rStream << (USHORT) 1;
- rStream << (BYTE) CELLTYPE_VALUE;
+ rStream << (sal_uInt16) 1;
+ rStream << (sal_uInt16) 1;
+ rStream << (sal_uInt8) CELLTYPE_VALUE;
double fVal;
::rtl::math::setNan( &fVal );
rStream << fVal;
return;
}
- rStream << (USHORT) nColCount;
+ rStream << (sal_uInt16) nColCount;
#if SC_ROWLIMIT_MORE_THAN_32K
#error row32k
#endif
- rStream << (USHORT) nRowCount;
+ rStream << (sal_uInt16) nRowCount;
String aMatStr;
rtl_TextEncoding eCharSet = rStream.GetStreamCharSet();
for (SCSIZE i=0; i<nCount; i++)
{
- BYTE nType = CELLTYPE_VALUE;
+ sal_uInt8 nType = CELLTYPE_VALUE;
if ( mnValType && IsNonValueType( mnValType[i]))
{
if ( pMat[i].pS )
@@ -234,8 +234,8 @@ void ScMatrix::ResetIsString()
}
}
else
- mnValType = new BYTE[nCount];
- memset( mnValType, 0, nCount * sizeof( BYTE ) );
+ mnValType = new sal_uInt8[nCount];
+ memset( mnValType, 0, nCount * sizeof( sal_uInt8 ) );
mnNonValue = 0;
}
@@ -289,7 +289,7 @@ void ScMatrix::PutString(const String& rStr, SCSIZE nIndex)
mnValType[nIndex] = SC_MATVAL_STRING;
}
-void ScMatrix::PutStringEntry( const String* pStr, BYTE bFlag, SCSIZE nIndex )
+void ScMatrix::PutStringEntry( const String* pStr, sal_uInt8 bFlag, SCSIZE nIndex )
{
DBG_ASSERT( bFlag, "ScMatrix::PutStringEntry: bFlag == 0" );
if (mnValType == NULL)
@@ -299,7 +299,7 @@ void ScMatrix::PutStringEntry( const String* pStr, BYTE bFlag, SCSIZE nIndex )
String* pS = pMat[nIndex].pS;
pMat[nIndex].fVal = 0.0;
// An EMPTY or EMPTYPATH entry must not have a string pointer therefor.
- DBG_ASSERT( (((bFlag & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY) && !pStr) || TRUE,
+ DBG_ASSERT( (((bFlag & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY) && !pStr) || sal_True,
"ScMatrix::PutStringEntry: pStr passed through EMPTY entry");
if ( IsNonValueType( mnValType[nIndex]) && pS )
{
@@ -398,7 +398,7 @@ void ScMatrix::PutBoolean( bool bVal, SCSIZE nIndex)
pMat[nIndex].fVal = bVal ? 1. : 0.;
}
-USHORT ScMatrix::GetError( SCSIZE nC, SCSIZE nR) const
+sal_uInt16 ScMatrix::GetError( SCSIZE nC, SCSIZE nR) const
{
if (ValidColRowOrReplicated( nC, nR ))
return GetError( CalcOffset( nC, nR) );
@@ -446,8 +446,8 @@ String ScMatrix::GetString( SvNumberFormatter& rFormatter, SCSIZE nIndex) const
if (IsString( nIndex))
{
if (IsEmptyPath( nIndex))
- { // result of empty FALSE jump path
- ULONG nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_LOGICAL,
+ { // result of empty sal_False jump path
+ sal_uLong nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_LOGICAL,
ScGlobal::eLnge);
String aStr;
Color* pColor = NULL;
@@ -457,7 +457,7 @@ String ScMatrix::GetString( SvNumberFormatter& rFormatter, SCSIZE nIndex) const
return GetString( nIndex );
}
- USHORT nError = GetError( nIndex);
+ sal_uInt16 nError = GetError( nIndex);
if (nError)
{
SetErrorAtInterpreter( nError);
@@ -465,7 +465,7 @@ String ScMatrix::GetString( SvNumberFormatter& rFormatter, SCSIZE nIndex) const
}
double fVal= GetDouble( nIndex);
- ULONG nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_NUMBER,
+ sal_uLong nKey = rFormatter.GetStandardFormat( NUMBERFORMAT_NUMBER,
ScGlobal::eLnge);
String aStr;
rFormatter.GetInputLineString( fVal, nKey, aStr);
diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx
index 077b5a9d9751..dbcfc6b24b78 100644
--- a/sc/source/core/tool/subtotal.cxx
+++ b/sc/source/core/tool/subtotal.cxx
@@ -36,14 +36,14 @@
// -----------------------------------------------------------------------
-BOOL SubTotal::SafePlus(double& fVal1, double fVal2)
+sal_Bool SubTotal::SafePlus(double& fVal1, double fVal2)
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SAL_MATH_FPEXCEPTIONS_OFF();
fVal1 += fVal2;
if (!::rtl::math::isFinite(fVal1))
{
- bOk = FALSE;
+ bOk = sal_False;
if (fVal2 > 0.0)
fVal1 = DBL_MAX;
else
@@ -53,28 +53,28 @@ BOOL SubTotal::SafePlus(double& fVal1, double fVal2)
}
-BOOL SubTotal::SafeMult(double& fVal1, double fVal2)
+sal_Bool SubTotal::SafeMult(double& fVal1, double fVal2)
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SAL_MATH_FPEXCEPTIONS_OFF();
fVal1 *= fVal2;
if (!::rtl::math::isFinite(fVal1))
{
- bOk = FALSE;
+ bOk = sal_False;
fVal1 = DBL_MAX;
}
return bOk;
}
-BOOL SubTotal::SafeDiv(double& fVal1, double fVal2)
+sal_Bool SubTotal::SafeDiv(double& fVal1, double fVal2)
{
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
SAL_MATH_FPEXCEPTIONS_OFF();
fVal1 /= fVal2;
if (!::rtl::math::isFinite(fVal1))
{
- bOk = FALSE;
+ bOk = sal_False;
fVal1 = DBL_MAX;
}
return bOk;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 81862c49fd21..a270969e100c 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -119,19 +119,19 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ImpTokenIterator, 32, 16 )
// ScRawToken size is FixMembers + MAXSTRLEN + ~4 ~= 1036
IMPL_FIXEDMEMPOOL_NEWDEL( ScRawToken, 8, 4 )
// Some ScDoubleRawToken, FixMembers + sizeof(double) ~= 16
-const USHORT nMemPoolDoubleRawToken = 0x0400 / sizeof(ScDoubleRawToken);
+const sal_uInt16 nMemPoolDoubleRawToken = 0x0400 / sizeof(ScDoubleRawToken);
IMPL_FIXEDMEMPOOL_NEWDEL( ScDoubleRawToken, nMemPoolDoubleRawToken, nMemPoolDoubleRawToken )
// Need a whole bunch of ScSingleRefToken
-const USHORT nMemPoolSingleRefToken = (0x4000 - 64) / sizeof(ScSingleRefToken);
+const sal_uInt16 nMemPoolSingleRefToken = (0x4000 - 64) / sizeof(ScSingleRefToken);
IMPL_FIXEDMEMPOOL_NEWDEL( ScSingleRefToken, nMemPoolSingleRefToken, nMemPoolSingleRefToken )
// Need quite a lot of ScDoubleRefToken
-const USHORT nMemPoolDoubleRefToken = (0x2000 - 64) / sizeof(ScDoubleRefToken);
+const sal_uInt16 nMemPoolDoubleRefToken = (0x2000 - 64) / sizeof(ScDoubleRefToken);
IMPL_FIXEDMEMPOOL_NEWDEL( ScDoubleRefToken, nMemPoolDoubleRefToken, nMemPoolDoubleRefToken )
// --- helpers --------------------------------------------------------------
-inline BOOL lcl_IsReference( OpCode eOp, StackVar eType )
+inline sal_Bool lcl_IsReference( OpCode eOp, StackVar eType )
{
return
(eOp == ocPush && (eType == svSingleRef || eType == svDoubleRef))
@@ -230,7 +230,7 @@ void ScRawToken::SetDouble(double rVal)
nRefCnt = 0;
}
-void ScRawToken::SetName( USHORT n )
+void ScRawToken::SetName( sal_uInt16 n )
{
eOp = ocName;
eType = svIndex;
@@ -323,13 +323,13 @@ void ScRawToken::SetExternal( const sal_Unicode* pStr )
nRefCnt = 0;
}
-USHORT lcl_ScRawTokenOffset()
+sal_uInt16 lcl_ScRawTokenOffset()
{
// offset of sbyte in ScRawToken
// offsetof(ScRawToken, sbyte) gives a warning with gcc, because ScRawToken is no POD
ScRawToken aToken;
- return static_cast<USHORT>( reinterpret_cast<char*>(&aToken.sbyte) - reinterpret_cast<char*>(&aToken) );
+ return static_cast<sal_uInt16>( reinterpret_cast<char*>(&aToken.sbyte) - reinterpret_cast<char*>(&aToken) );
}
ScRawToken* ScRawToken::Clone() const
@@ -344,8 +344,8 @@ ScRawToken* ScRawToken::Clone() const
}
else
{
- static USHORT nOffset = lcl_ScRawTokenOffset(); // offset of sbyte
- USHORT n = nOffset;
+ static sal_uInt16 nOffset = lcl_ScRawTokenOffset(); // offset of sbyte
+ sal_uInt16 n = nOffset;
if (eOp == ocExternalRef)
{
@@ -367,24 +367,24 @@ ScRawToken* ScRawToken::Clone() const
case svSep: break;
case svByte: n += sizeof(ScRawToken::sbyte); break;
case svDouble: n += sizeof(double); break;
- case svString: n = sal::static_int_cast<USHORT>( n + GetStrLenBytes( cStr ) + GetStrLenBytes( 1 ) ); break;
+ case svString: n = sal::static_int_cast<sal_uInt16>( n + GetStrLenBytes( cStr ) + GetStrLenBytes( 1 ) ); break;
case svSingleRef:
case svDoubleRef: n += sizeof(aRef); break;
case svMatrix: n += sizeof(ScMatrix*); break;
- case svIndex: n += sizeof(USHORT); break;
+ case svIndex: n += sizeof(sal_uInt16); break;
case svJump: n += nJump[ 0 ] * 2 + 2; break;
- case svExternal: n = sal::static_int_cast<USHORT>( n + GetStrLenBytes( cStr+1 ) + GetStrLenBytes( 2 ) ); break;
+ case svExternal: n = sal::static_int_cast<sal_uInt16>( n + GetStrLenBytes( cStr+1 ) + GetStrLenBytes( 2 ) ); break;
default:
{
DBG_ERROR1( "unknown ScRawToken::Clone() type %d", int(eType));
}
}
}
- p = (ScRawToken*) new BYTE[ n ];
- memcpy( p, this, n * sizeof(BYTE) );
+ p = (ScRawToken*) new sal_uInt8[ n ];
+ memcpy( p, this, n * sizeof(sal_uInt8) );
}
p->nRefCnt = 0;
- p->bRaw = FALSE;
+ p->bRaw = sal_False;
return p;
}
@@ -473,7 +473,7 @@ void ScRawToken::Delete()
delete (ScDoubleRawToken*) this; // FixedMemPool ScDoubleRawToken
break;
default:
- delete [] (BYTE*) this;
+ delete [] (sal_uInt8*) this;
}
}
}
@@ -501,14 +501,14 @@ ScToken::~ScToken()
}
// TextEqual: if same formula entered (for optimization in sort)
-BOOL ScToken::TextEqual( const FormulaToken& _rToken ) const
+sal_Bool ScToken::TextEqual( const FormulaToken& _rToken ) const
{
if ( eType == svSingleRef || eType == svDoubleRef )
{
// in relative Refs only compare relative parts
if ( eType != _rToken.GetType() || GetOpCode() != _rToken.GetOpCode() )
- return FALSE;
+ return sal_False;
const ScToken& rToken = static_cast<const ScToken&>(_rToken);
ScComplexRefData aTemp1;
@@ -549,24 +549,24 @@ BOOL ScToken::TextEqual( const FormulaToken& _rToken ) const
}
-BOOL ScToken::Is3DRef() const
+sal_Bool ScToken::Is3DRef() const
{
switch ( eType )
{
case svDoubleRef :
if ( GetSingleRef2().IsFlag3D() )
- return TRUE;
+ return sal_True;
//! fallthru
case svSingleRef :
if ( GetSingleRef().IsFlag3D() )
- return TRUE;
+ return sal_True;
break;
default:
{
// added to avoid warnings
}
}
- return FALSE;
+ return sal_False;
}
// static
@@ -791,7 +791,7 @@ void ScSingleRefToken::CalcAbsIfRel( const ScAddress& rPos )
{ aSingleRef.CalcAbsIfRel( rPos ); }
void ScSingleRefToken::CalcRelFromAbs( const ScAddress& rPos )
{ aSingleRef.CalcRelFromAbs( rPos ); }
-BOOL ScSingleRefToken::operator==( const FormulaToken& r ) const
+sal_Bool ScSingleRefToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && aSingleRef == static_cast<const ScToken&>(r).GetSingleRef();
}
@@ -807,7 +807,7 @@ void ScDoubleRefToken::CalcAbsIfRel( const ScAddress& rPos )
{ aDoubleRef.CalcAbsIfRel( rPos ); }
void ScDoubleRefToken::CalcRelFromAbs( const ScAddress& rPos )
{ aDoubleRef.CalcRelFromAbs( rPos ); }
-BOOL ScDoubleRefToken::operator==( const FormulaToken& r ) const
+sal_Bool ScDoubleRefToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && aDoubleRef == static_cast<const ScToken&>(r).GetDoubleRef();
}
@@ -825,7 +825,7 @@ void ScRefListToken::CalcRelFromAbs( const ScAddress& rPos )
for (ScRefList::iterator it( aRefList.begin()); it != aRefList.end(); ++it)
(*it).CalcRelFromAbs( rPos);
}
-BOOL ScRefListToken::operator==( const FormulaToken& r ) const
+sal_Bool ScRefListToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && &aRefList == static_cast<const ScToken&>(r).GetRefList();
}
@@ -833,7 +833,7 @@ BOOL ScRefListToken::operator==( const FormulaToken& r ) const
const ScMatrix* ScMatrixToken::GetMatrix() const { return pMatrix; }
ScMatrix* ScMatrixToken::GetMatrix() { return pMatrix; }
-BOOL ScMatrixToken::operator==( const FormulaToken& r ) const
+sal_Bool ScMatrixToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && pMatrix == static_cast<const ScToken&>(r).GetMatrix();
}
@@ -860,7 +860,7 @@ ScExternalSingleRefToken::~ScExternalSingleRefToken()
{
}
-USHORT ScExternalSingleRefToken::GetIndex() const
+sal_uInt16 ScExternalSingleRefToken::GetIndex() const
{
return mnFileId;
}
@@ -890,7 +890,7 @@ void ScExternalSingleRefToken::CalcRelFromAbs( const ScAddress& rPos )
maSingleRef.CalcRelFromAbs( rPos );
}
-BOOL ScExternalSingleRefToken::operator ==( const FormulaToken& r ) const
+sal_Bool ScExternalSingleRefToken::operator ==( const FormulaToken& r ) const
{
if (!FormulaToken::operator==(r))
return false;
@@ -926,7 +926,7 @@ ScExternalDoubleRefToken::~ScExternalDoubleRefToken()
{
}
-USHORT ScExternalDoubleRefToken::GetIndex() const
+sal_uInt16 ScExternalDoubleRefToken::GetIndex() const
{
return mnFileId;
}
@@ -976,7 +976,7 @@ void ScExternalDoubleRefToken::CalcRelFromAbs( const ScAddress& rPos )
maDoubleRef.CalcRelFromAbs( rPos );
}
-BOOL ScExternalDoubleRefToken::operator ==( const FormulaToken& r ) const
+sal_Bool ScExternalDoubleRefToken::operator ==( const FormulaToken& r ) const
{
if (!ScToken::operator==(r))
return false;
@@ -1008,7 +1008,7 @@ ScExternalNameToken::ScExternalNameToken( const ScExternalNameToken& r ) :
ScExternalNameToken::~ScExternalNameToken() {}
-USHORT ScExternalNameToken::GetIndex() const
+sal_uInt16 ScExternalNameToken::GetIndex() const
{
return mnFileId;
}
@@ -1018,7 +1018,7 @@ const String& ScExternalNameToken::GetString() const
return maName;
}
-BOOL ScExternalNameToken::operator==( const FormulaToken& r ) const
+sal_Bool ScExternalNameToken::operator==( const FormulaToken& r ) const
{
if ( !FormulaToken::operator==(r) )
return false;
@@ -1044,7 +1044,7 @@ BOOL ScExternalNameToken::operator==( const FormulaToken& r ) const
// ============================================================================
ScJumpMatrix* ScJumpMatrixToken::GetJumpMatrix() const { return pJumpMatrix; }
-BOOL ScJumpMatrixToken::operator==( const FormulaToken& r ) const
+sal_Bool ScJumpMatrixToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) && pJumpMatrix == static_cast<const ScToken&>(r).GetJumpMatrix();
}
@@ -1059,7 +1059,7 @@ const String & ScEmptyCellToken::GetString() const
static String aDummyString;
return aDummyString;
}
-BOOL ScEmptyCellToken::operator==( const FormulaToken& r ) const
+sal_Bool ScEmptyCellToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) &&
bInherited == static_cast< const ScEmptyCellToken & >(r).IsInherited() &&
@@ -1076,7 +1076,7 @@ ScMatrix* ScMatrixCellResultToken::GetMatrix()
{
return const_cast<ScMatrix*>(xMatrix.operator->());
}
-BOOL ScMatrixCellResultToken::operator==( const FormulaToken& r ) const
+sal_Bool ScMatrixCellResultToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) &&
xUpperLeft == static_cast<const ScMatrixCellResultToken &>(r).xUpperLeft &&
@@ -1084,7 +1084,7 @@ BOOL ScMatrixCellResultToken::operator==( const FormulaToken& r ) const
}
-BOOL ScMatrixFormulaCellToken::operator==( const FormulaToken& r ) const
+sal_Bool ScMatrixFormulaCellToken::operator==( const FormulaToken& r ) const
{
const ScMatrixFormulaCellToken* p = dynamic_cast<const ScMatrixFormulaCellToken*>(&r);
return p && ScMatrixCellResultToken::operator==( r ) &&
@@ -1136,7 +1136,7 @@ void ScMatrixFormulaCellToken::SetUpperLeftDouble( double f )
double ScHybridCellToken::GetDouble() const { return fDouble; }
const String & ScHybridCellToken::GetString() const { return aString; }
-BOOL ScHybridCellToken::operator==( const FormulaToken& r ) const
+sal_Bool ScHybridCellToken::operator==( const FormulaToken& r ) const
{
return FormulaToken::operator==( r ) &&
fDouble == r.GetDouble() && aString == r.GetString() &&
@@ -1270,9 +1270,9 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a
}
return bError;
}
-BOOL ScTokenArray::ImplGetReference( ScRange& rRange, BOOL bValidOnly ) const
+sal_Bool ScTokenArray::ImplGetReference( ScRange& rRange, sal_Bool bValidOnly ) const
{
- BOOL bIs = FALSE;
+ sal_Bool bIs = sal_False;
if ( pCode && nLen == 1 )
{
const FormulaToken* pToken = pCode[0];
@@ -1298,14 +1298,14 @@ BOOL ScTokenArray::ImplGetReference( ScRange& rRange, BOOL bValidOnly ) const
return bIs;
}
-BOOL ScTokenArray::IsReference( ScRange& rRange ) const
+sal_Bool ScTokenArray::IsReference( ScRange& rRange ) const
{
- return ImplGetReference( rRange, FALSE );
+ return ImplGetReference( rRange, sal_False );
}
-BOOL ScTokenArray::IsValidReference( ScRange& rRange ) const
+sal_Bool ScTokenArray::IsValidReference( ScRange& rRange ) const
{
- return ImplGetReference( rRange, TRUE );
+ return ImplGetReference( rRange, sal_True );
}
////////////////////////////////////////////////////////////////////////////
@@ -1345,7 +1345,7 @@ ScTokenArray* ScTokenArray::Clone() const
{
pp = p->pCode = new FormulaToken*[ nLen ];
memcpy( pp, pCode, nLen * sizeof( ScToken* ) );
- for( USHORT i = 0; i < nLen; i++, pp++ )
+ for( sal_uInt16 i = 0; i < nLen; i++, pp++ )
{
*pp = (*pp)->Clone();
(*pp)->IncRef();
@@ -1355,14 +1355,14 @@ ScTokenArray* ScTokenArray::Clone() const
{
pp = p->pRPN = new FormulaToken*[ nRPN ];
memcpy( pp, pRPN, nRPN * sizeof( ScToken* ) );
- for( USHORT i = 0; i < nRPN; i++, pp++ )
+ for( sal_uInt16 i = 0; i < nRPN; i++, pp++ )
{
FormulaToken* t = *pp;
if( t->GetRef() > 1 )
{
FormulaToken** p2 = pCode;
- USHORT nIdx = 0xFFFF;
- for( USHORT j = 0; j < nLen; j++, p2++ )
+ sal_uInt16 nIdx = 0xFFFF;
+ for( sal_uInt16 j = 0; j < nLen; j++, p2++ )
{
if( *p2 == t )
{
@@ -1569,7 +1569,7 @@ FormulaToken* ScTokenArray::MergeArray( )
pCode[i] = NULL;
t->DecRef();
}
- nLen = USHORT( nStart );
+ nLen = sal_uInt16( nStart );
return AddMatrix( pArray );
}
@@ -1578,7 +1578,7 @@ FormulaToken* ScTokenArray::MergeRangeReference( const ScAddress & rPos )
{
if (!pCode || !nLen)
return NULL;
- USHORT nIdx = nLen;
+ sal_uInt16 nIdx = nLen;
FormulaToken *p1, *p2, *p3; // ref, ocRange, ref
// The actual types are checked in ExtendRangeReference().
if (((p3 = PeekPrev(nIdx)) != 0) &&
@@ -1647,7 +1647,7 @@ FormulaToken* ScTokenArray::AddColRowName( const ScSingleRefData& rRef )
return Add( new ScSingleRefToken( rRef, ocColRowName ) );
}
-BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
+sal_Bool ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
const ScAddress& rPos, ScDirection eDir )
{
SCCOL nCol = 0;
@@ -1658,40 +1658,40 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
if ( rPos.Row() < MAXROW )
nRow = (nExtend = rPos.Row()) + 1;
else
- return FALSE;
+ return sal_False;
break;
case DIR_RIGHT :
if ( rPos.Col() < MAXCOL )
nCol = static_cast<SCCOL>(nExtend = rPos.Col()) + 1;
else
- return FALSE;
+ return sal_False;
break;
case DIR_TOP :
if ( rPos.Row() > 0 )
nRow = (nExtend = rPos.Row()) - 1;
else
- return FALSE;
+ return sal_False;
break;
case DIR_LEFT :
if ( rPos.Col() > 0 )
nCol = static_cast<SCCOL>(nExtend = rPos.Col()) - 1;
else
- return FALSE;
+ return sal_False;
break;
default:
DBG_ERRORFILE( "unknown Direction" );
- return FALSE;
+ return sal_False;
}
if ( pRPN && nRPN )
{
FormulaToken* t = pRPN[nRPN-1];
if ( t->GetType() == svByte )
{
- BYTE nParamCount = t->GetByte();
+ sal_uInt8 nParamCount = t->GetByte();
if ( nParamCount && nRPN > nParamCount )
{
- BOOL bRet = FALSE;
- USHORT nParam = nRPN - nParamCount - 1;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nParam = nRPN - nParamCount - 1;
for ( ; nParam < nRPN-1; nParam++ )
{
FormulaToken* p = pRPN[nParam];
@@ -1708,7 +1708,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.nRow > nExtend )
{
nExtend = rRef.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_RIGHT :
@@ -1717,7 +1717,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
> nExtend )
{
nExtend = rRef.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_TOP :
@@ -1725,7 +1725,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.nRow < nExtend )
{
nExtend = rRef.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_LEFT :
@@ -1734,7 +1734,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
< nExtend )
{
nExtend = rRef.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
@@ -1751,7 +1751,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.Ref2.nRow > nExtend )
{
nExtend = rRef.Ref2.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_RIGHT :
@@ -1760,7 +1760,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
> nExtend )
{
nExtend = rRef.Ref2.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_TOP :
@@ -1768,7 +1768,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
&& rRef.Ref1.nRow < nExtend )
{
nExtend = rRef.Ref1.nRow;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case DIR_LEFT :
@@ -1777,7 +1777,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
< nExtend )
{
nExtend = rRef.Ref1.nCol;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
@@ -1793,14 +1793,14 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
}
}
}
- return FALSE;
+ return sal_False;
}
void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
const ScAddress& rNewPos )
{
- for ( USHORT j=0; j<nLen; ++j )
+ for ( sal_uInt16 j=0; j<nLen; ++j )
{
switch ( pCode[j]->GetType() )
{
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 21f80cb1c628..9b4a7ef772d0 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -102,8 +102,8 @@ void ScUnitConverterData::BuildIndexString( String& rStr,
#define CFGSTR_UNIT_TO "ToUnit"
#define CFGSTR_UNIT_FACTOR "Factor"
-ScUnitConverter::ScUnitConverter( USHORT nInit, USHORT nDeltaP ) :
- ScStrCollection( nInit, nDeltaP, FALSE )
+ScUnitConverter::ScUnitConverter( sal_uInt16 nInit, sal_uInt16 nDeltaP ) :
+ ScStrCollection( nInit, nDeltaP, sal_False )
{
// read from configuration - "convert.ini" is no longer used
//! config item as member to allow change of values
@@ -161,18 +161,18 @@ ScUnitConverter::ScUnitConverter( USHORT nInit, USHORT nDeltaP ) :
}
}
-BOOL ScUnitConverter::GetValue( double& fValue, const String& rFromUnit,
+sal_Bool ScUnitConverter::GetValue( double& fValue, const String& rFromUnit,
const String& rToUnit ) const
{
ScUnitConverterData aSearch( rFromUnit, rToUnit );
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( Search( &aSearch, nIndex ) )
{
fValue = ((const ScUnitConverterData*)(At( nIndex )))->GetValue();
- return TRUE;
+ return sal_True;
}
fValue = 1.0;
- return FALSE;
+ return sal_False;
}
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index 08609eeff940..a107599a9960 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -49,12 +49,12 @@
void ScUserListData::InitTokens()
{
sal_Unicode cSep = ScGlobal::cListDelimiter;
- nTokenCount = (USHORT) aStr.GetTokenCount(cSep);
+ nTokenCount = (sal_uInt16) aStr.GetTokenCount(cSep);
if (nTokenCount)
{
pSubStrings = new String[nTokenCount];
pUpperSub = new String[nTokenCount];
- for (USHORT i=0; i<nTokenCount; i++)
+ for (sal_uInt16 i=0; i<nTokenCount; i++)
{
pUpperSub[i] = pSubStrings[i] = aStr.GetToken((xub_StrLen)i,cSep);
ScGlobal::pCharClass->toUpper(pUpperSub[i]);
@@ -92,19 +92,19 @@ void ScUserListData::SetString( const String& rStr )
InitTokens();
}
-USHORT ScUserListData::GetSubCount() const
+sal_uInt16 ScUserListData::GetSubCount() const
{
return nTokenCount;
}
-BOOL ScUserListData::GetSubIndex(const String& rSubStr, USHORT& rIndex) const
+sal_Bool ScUserListData::GetSubIndex(const String& rSubStr, sal_uInt16& rIndex) const
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<nTokenCount; i++)
if (rSubStr == pSubStrings[i])
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
String aUpStr = rSubStr;
@@ -113,13 +113,13 @@ BOOL ScUserListData::GetSubIndex(const String& rSubStr, USHORT& rIndex) const
if (aUpStr == pUpperSub[i])
{
rIndex = i;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-String ScUserListData::GetSubStr(USHORT nIndex) const
+String ScUserListData::GetSubStr(sal_uInt16 nIndex) const
{
if (nIndex < nTokenCount)
return pSubStrings[nIndex];
@@ -129,10 +129,10 @@ String ScUserListData::GetSubStr(USHORT nIndex) const
StringCompare ScUserListData::Compare(const String& rSubStr1, const String& rSubStr2) const
{
- USHORT nIndex1;
- USHORT nIndex2;
- BOOL bFound1 = GetSubIndex(rSubStr1, nIndex1);
- BOOL bFound2 = GetSubIndex(rSubStr2, nIndex2);
+ sal_uInt16 nIndex1;
+ sal_uInt16 nIndex2;
+ sal_Bool bFound1 = GetSubIndex(rSubStr1, nIndex1);
+ sal_Bool bFound2 = GetSubIndex(rSubStr2, nIndex2);
if (bFound1)
{
if (bFound2)
@@ -155,10 +155,10 @@ StringCompare ScUserListData::Compare(const String& rSubStr1, const String& rSub
StringCompare ScUserListData::ICompare(const String& rSubStr1, const String& rSubStr2) const
{
- USHORT nIndex1;
- USHORT nIndex2;
- BOOL bFound1 = GetSubIndex(rSubStr1, nIndex1);
- BOOL bFound2 = GetSubIndex(rSubStr2, nIndex2);
+ sal_uInt16 nIndex1;
+ sal_uInt16 nIndex2;
+ sal_Bool bFound1 = GetSubIndex(rSubStr1, nIndex1);
+ sal_Bool bFound2 = GetSubIndex(rSubStr2, nIndex2);
if (bFound1)
{
if (bFound2)
@@ -179,7 +179,7 @@ StringCompare ScUserListData::ICompare(const String& rSubStr1, const String& rSu
return (StringCompare) ScGlobal::GetpTransliteration()->compareString( rSubStr1, rSubStr2 );
}
-ScUserList::ScUserList(USHORT nLim, USHORT nDel) :
+ScUserList::ScUserList(sal_uInt16 nLim, sal_uInt16 nDel) :
ScCollection ( nLim, nDel )
{
using namespace ::com::sun::star;
@@ -253,24 +253,24 @@ ScDataObject* ScUserList::Clone() const
ScUserListData* ScUserList::GetData(const String& rSubStr) const
{
- USHORT nIndex;
- USHORT i = 0;
+ sal_uInt16 nIndex;
+ sal_uInt16 i = 0;
for (i=0; i < nCount; i++)
if (((ScUserListData*)pItems[i])->GetSubIndex(rSubStr, nIndex))
return (ScUserListData*)pItems[i];
return NULL;
}
-BOOL ScUserList::operator==( const ScUserList& r ) const
+sal_Bool ScUserList::operator==( const ScUserList& r ) const
{
- BOOL bEqual = (nCount == r.nCount);
+ sal_Bool bEqual = (nCount == r.nCount);
if ( bEqual )
{
ScUserListData* pMyData = NULL;
ScUserListData* pOtherData = NULL;
- for ( USHORT i=0; i<nCount && bEqual; i++)
+ for ( sal_uInt16 i=0; i<nCount && bEqual; i++)
{
pMyData = (ScUserListData*)At(i);
pOtherData = (ScUserListData*)r.At(i);
@@ -284,14 +284,14 @@ BOOL ScUserList::operator==( const ScUserList& r ) const
}
-BOOL ScUserList::HasEntry( const String& rStr ) const
+sal_Bool ScUserList::HasEntry( const String& rStr ) const
{
- for ( USHORT i=0; i<nCount; i++)
+ for ( sal_uInt16 i=0; i<nCount; i++)
{
const ScUserListData* pMyData = (ScUserListData*) At(i);
if ( pMyData->aStr == rStr )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 7dc36bc1b548..29854e1fd549 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -52,7 +52,7 @@ using namespace com::sun::star::uno;
TYPEINIT1(ScTpViewItem, SfxPoolItem);
-#define SC_VERSION ((USHORT)302)
+#define SC_VERSION ((sal_uInt16)302)
//========================================================================
@@ -151,7 +151,7 @@ void ScViewOptions::SetDefaults()
aOptArr[ VOPT_FORMULAS ] =
aOptArr[ VOPT_SYNTAX ] =
aOptArr[ VOPT_HELPLINES ] =
- aOptArr[ VOPT_BIGHANDLES ] = FALSE;
+ aOptArr[ VOPT_BIGHANDLES ] = sal_False;
aOptArr[ VOPT_NOTES ] =
aOptArr[ VOPT_NULLVALS ] =
aOptArr[ VOPT_VSCROLL ] =
@@ -163,7 +163,7 @@ void ScViewOptions::SetDefaults()
aOptArr[ VOPT_ANCHOR ] =
aOptArr[ VOPT_PAGEBREAKS ] =
aOptArr[ VOPT_SOLIDHANDLES] =
- aOptArr[ VOPT_CLIPMARKS ] = TRUE;
+ aOptArr[ VOPT_CLIPMARKS ] = sal_True;
aModeArr[VOBJ_TYPE_OLE ] =
aModeArr[VOBJ_TYPE_CHART] =
@@ -189,7 +189,7 @@ Color ScViewOptions::GetGridColor( String* pStrName ) const
const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy )
{
- USHORT i;
+ sal_uInt16 i;
for ( i=0; i<MAX_OPT; i++ ) aOptArr [i] = rCpy.aOptArr[i];
for ( i=0; i<MAX_TYPE; i++ ) aModeArr[i] = rCpy.aModeArr[i];
@@ -205,8 +205,8 @@ const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy )
int ScViewOptions::operator==( const ScViewOptions& rOpt ) const
{
- BOOL bEqual = TRUE;
- USHORT i;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16 i;
for ( i=0; i<MAX_OPT && bEqual; i++ ) bEqual = (aOptArr [i] == rOpt.aOptArr[i]);
for ( i=0; i<MAX_TYPE && bEqual; i++ ) bEqual = (aModeArr[i] == rOpt.aModeArr[i]);
@@ -220,7 +220,7 @@ int ScViewOptions::operator==( const ScViewOptions& rOpt ) const
//------------------------------------------------------------------------
-SvxGridItem* ScViewOptions::CreateGridItem( USHORT nId /* = SID_ATTR_GRID_OPTIONS */ ) const
+SvxGridItem* ScViewOptions::CreateGridItem( sal_uInt16 nId /* = SID_ATTR_GRID_OPTIONS */ ) const
{
SvxGridItem* pItem = new SvxGridItem( nId );
@@ -242,13 +242,13 @@ SvxGridItem* ScViewOptions::CreateGridItem( USHORT nId /* = SID_ATTR_GRID_OPTION
// ScTpViewItem - Daten fuer die ViewOptions-TabPage
//========================================================================
-//UNUSED2008-05 ScTpViewItem::ScTpViewItem( USHORT nWhichP ) : SfxPoolItem( nWhichP )
+//UNUSED2008-05 ScTpViewItem::ScTpViewItem( sal_uInt16 nWhichP ) : SfxPoolItem( nWhichP )
//UNUSED2008-05 {
//UNUSED2008-05 }
//------------------------------------------------------------------------
-ScTpViewItem::ScTpViewItem( USHORT nWhichP, const ScViewOptions& rOpt )
+ScTpViewItem::ScTpViewItem( sal_uInt16 nWhichP, const ScViewOptions& rOpt )
: SfxPoolItem ( nWhichP ),
theOptions ( rOpt )
{
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index b505e5a5051c..b751b6ef56db 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -54,7 +54,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat) :
{
}
-ScNumFormatAbbrev::ScNumFormatAbbrev(ULONG nFormat,
+ScNumFormatAbbrev::ScNumFormatAbbrev(sal_uLong nFormat,
SvNumberFormatter& rFormatter)
{
PutFormatIndex(nFormat, rFormatter);
@@ -62,7 +62,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(ULONG nFormat,
void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
{
- USHORT nSysLang, nLang;
+ sal_uInt16 nSysLang, nLang;
rStream.ReadByteString( sFormatstring, eByteStrSet );
rStream >> nSysLang >> nLang;
eLnge = (LanguageType) nLang;
@@ -74,10 +74,10 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
void ScNumFormatAbbrev::Save( SvStream& rStream, CharSet eByteStrSet ) const
{
rStream.WriteByteString( sFormatstring, eByteStrSet );
- rStream << (USHORT) eSysLnge << (USHORT) eLnge;
+ rStream << (sal_uInt16) eSysLnge << (sal_uInt16) eLnge;
}
-void ScNumFormatAbbrev::PutFormatIndex(ULONG nFormat,
+void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat,
SvNumberFormatter& rFormatter)
{
const SvNumberformat* pFormat = rFormatter.GetEntry(nFormat);
@@ -96,10 +96,10 @@ void ScNumFormatAbbrev::PutFormatIndex(ULONG nFormat,
}
}
-ULONG ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
+sal_uLong ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
{
short nType;
- BOOL bNewInserted;
+ sal_Bool bNewInserted;
xub_StrLen nCheckPos;
return rFormatter.GetIndexPuttingAndConverting( sFormatstring, eLnge,
eSysLnge, nType, bNewInserted, nCheckPos);