summaryrefslogtreecommitdiff
path: root/sc/source/core/tool
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool')
-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
56 files changed, 2753 insertions, 2753 deletions
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);