Kaydet (Commit) fda8ac2d authored tarafından Noel Grandin's avatar Noel Grandin

scaddins: sal_Bool->bool

Change-Id: I8cea3bb0c407eba7928cb44d9ce00016ff890a41
üst 81076cb3
......@@ -82,7 +82,7 @@ class AnalysisResourcePublisher : public Resource
{
public:
AnalysisResourcePublisher( const AnalysisResId& rId ) : Resource( rId ) {}
sal_Bool IsAvailableRes( const ResId& rId ) const { return Resource::IsAvailableRes( rId ); }
bool IsAvailableRes( const ResId& rId ) const { return Resource::IsAvailableRes( rId ); }
void FreeResource() { Resource::FreeResource(); }
};
......@@ -192,7 +192,7 @@ double AnalysisAddIn::FactDouble( sal_Int32 nNum ) throw( uno::RuntimeException,
pFactDoubles[ 1 ] = fOdd;
pFactDoubles[ 2 ] = fEven;
sal_Bool bOdd = sal_True;
bool bOdd = true;
for( sal_uInt16 nCnt = 3 ; nCnt <= MAXFACTDOUBLE ; nCnt++ )
{
......@@ -457,7 +457,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getWorkday( const uno::Reference< beans::XProp
SortedIndividualInt32List aSrtLst;
aSrtLst.InsertHolidayList( aAnyConv, xOptions, aHDay, nNullDate, sal_False );
aSrtLst.InsertHolidayList( aAnyConv, xOptions, aHDay, nNullDate, false );
sal_Int32 nActDate = nDate + nNullDate;
......@@ -565,7 +565,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getNetworkdays( const uno::Reference< beans::X
SortedIndividualInt32List aSrtLst;
aSrtLst.InsertHolidayList( aAnyConv, xOpt, aHDay, nNullDate, sal_False );
aSrtLst.InsertHolidayList( aAnyConv, xOpt, aHDay, nNullDate, false );
sal_Int32 nActDate = nStartDate + nNullDate;
sal_Int32 nStopDate = nEndDate + nNullDate;
......@@ -797,7 +797,7 @@ OUString SAL_CALL AnalysisAddIn::getBin2Oct( const uno::Reference< beans::XPrope
{
double fVal = ConvertToDec( aNum, 2, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fVal, SCA_MIN8, SCA_MAX8, 8, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
......@@ -811,7 +811,7 @@ OUString SAL_CALL AnalysisAddIn::getBin2Hex( const uno::Reference< beans::XPrope
{
double fVal = ConvertToDec( aNum, 2, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fVal, SCA_MIN16, SCA_MAX16, 16, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
......@@ -819,7 +819,7 @@ OUString SAL_CALL AnalysisAddIn::getOct2Bin( const uno::Reference< beans::XPrope
{
double fVal = ConvertToDec( aNum, 8, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fVal, SCA_MIN2, SCA_MAX2, 2, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
......@@ -833,28 +833,28 @@ OUString SAL_CALL AnalysisAddIn::getOct2Hex( const uno::Reference< beans::XPrope
{
double fVal = ConvertToDec( aNum, 8, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fVal, SCA_MIN16, SCA_MAX16, 16, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
OUString SAL_CALL AnalysisAddIn::getDec2Bin( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception )
{
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( nNum, SCA_MIN2, SCA_MAX2, 2, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
OUString SAL_CALL AnalysisAddIn::getDec2Oct( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception )
{
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( nNum, SCA_MIN8, SCA_MAX8, 8, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
OUString SAL_CALL AnalysisAddIn::getDec2Hex( const uno::Reference< beans::XPropertySet >& xOpt, double fNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception )
{
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fNum, SCA_MIN16, SCA_MAX16, 16, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
......@@ -862,7 +862,7 @@ OUString SAL_CALL AnalysisAddIn::getHex2Bin( const uno::Reference< beans::XPrope
{
double fVal = ConvertToDec( aNum, 16, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fVal, SCA_MIN2, SCA_MAX2, 2, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
......@@ -876,7 +876,7 @@ OUString SAL_CALL AnalysisAddIn::getHex2Oct( const uno::Reference< beans::XPrope
{
double fVal = ConvertToDec( aNum, 16, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
return ConvertFromDec( fVal, SCA_MIN8, SCA_MAX8, 8, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
......@@ -888,7 +888,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getDelta( const uno::Reference< beans::XProper
double SAL_CALL AnalysisAddIn::getErf( const uno::Reference< beans::XPropertySet >& xOpt, double fLL, const uno::Any& rUL ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception )
{
double fUL, fRet;
sal_Bool bContainsValue = aAnyConv.getDouble( fUL, xOpt, rUL );
bool bContainsValue = aAnyConv.getDouble( fUL, xOpt, rUL );
fRet = bContainsValue ? (Erf( fUL ) - Erf( fLL )) : Erf( fLL );
RETURN_FINITE( fRet );
......@@ -1142,12 +1142,12 @@ OUString SAL_CALL AnalysisAddIn::getImcsch( const OUString& aNum ) throw( uno::R
OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::Any& rSuff ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception )
{
sal_Bool bi;
bool bi;
switch( rSuff.getValueTypeClass() )
{
case uno::TypeClass_VOID:
bi = sal_True;
bi = true;
break;
case uno::TypeClass_STRING:
{
......
......@@ -348,7 +348,7 @@ double SAL_CALL AnalysisAddIn::getTbilleq( const css::uno::Reference< css::beans
{
nMat++;
sal_Int32 nDiff = GetDiffDate360( xOpt, nSettle, nMat, sal_True );
sal_Int32 nDiff = GetDiffDate360( xOpt, nSettle, nMat, true );
if( fDisc <= 0.0 || nSettle >= nMat || nDiff > 360 )
throw css::lang::IllegalArgumentException();
......@@ -380,7 +380,7 @@ double SAL_CALL AnalysisAddIn::getTbillprice( const css::uno::Reference< css::be
double SAL_CALL AnalysisAddIn::getTbillyield( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice )
throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception )
{
sal_Int32 nDiff = GetDiffDate360( xOpt, nSettle, nMat, sal_True );
sal_Int32 nDiff = GetDiffDate360( xOpt, nSettle, nMat, true );
nDiff++;
if( fPrice <= 0.0 || nSettle >= nMat || nDiff > 360 )
......
......@@ -74,10 +74,10 @@ ScaResId::ScaResId( sal_uInt16 nId, ResMgr& rResMgr ) :
{
}
#define UNIQUE sal_False // function name does not exist in Calc
#define UNIQUE false // function name does not exist in Calc
#define STDPAR sal_False // all parameters are described
#define INTPAR sal_True // first parameter is internal
#define STDPAR false // all parameters are described
#define INTPAR true // first parameter is internal
#define FUNCDATA( FuncName, ParamCount, Category, Double, IntPar ) \
{ "get" #FuncName, DATE_FUNCNAME_##FuncName, DATE_FUNCDESC_##FuncName, DATE_DEFFUNCNAME_##FuncName, ParamCount, Category, Double, IntPar }
......@@ -469,7 +469,7 @@ uno::Sequence< sheet::LocalizedName > SAL_CALL ScaDateAddIn::getCompatibilityNam
namespace {
// auxiliary functions
sal_Bool IsLeapYear( sal_uInt16 nYear )
bool IsLeapYear( sal_uInt16 nYear )
{
return ((((nYear % 4) == 0) && ((nYear % 100) != 0)) || ((nYear % 400) == 0));
}
......@@ -529,7 +529,7 @@ void DaysToDate( sal_Int32 nDays,
sal_Int32 nTempDays;
sal_Int32 i = 0;
sal_Bool bCalc;
bool bCalc;
do
{
......@@ -537,11 +537,11 @@ void DaysToDate( sal_Int32 nDays,
rYear = (sal_uInt16)((nTempDays / 365) - i);
nTempDays -= ((sal_Int32) rYear -1) * 365;
nTempDays -= (( rYear -1) / 4) - (( rYear -1) / 100) + ((rYear -1) / 400);
bCalc = sal_False;
bCalc = false;
if ( nTempDays < 1 )
{
i++;
bCalc = sal_True;
bCalc = true;
}
else
{
......@@ -550,7 +550,7 @@ void DaysToDate( sal_Int32 nDays,
if ( (nTempDays != 366) || !IsLeapYear( rYear ) )
{
i--;
bCalc = sal_True;
bCalc = true;
}
}
}
......
......@@ -174,7 +174,7 @@ class ScaResPublisher : public Resource
public:
inline ScaResPublisher( const ScaResId& rResId ) : Resource( rResId ) {}
inline sal_Bool IsAvailableRes( const ResId& rResId ) const
inline bool IsAvailableRes( const ResId& rResId ) const
{ return Resource::IsAvailableRes( rResId ); }
inline void FreeResource()
{ Resource::FreeResource(); }
......@@ -207,8 +207,8 @@ struct ScaFuncDataBase
sal_uInt16 nCompListID; // resource ID to list of valid names
sal_uInt16 nParamCount; // number of named / described parameters
ScaCategory eCat; // function category
sal_Bool bDouble; // name already exist in Calc
sal_Bool bWithOpt; // first parameter is internal
bool bDouble; // name already exist in Calc
bool bWithOpt; // first parameter is internal
};
class ScaFuncData
......@@ -221,8 +221,8 @@ private:
sal_uInt16 nParamCount; // num of parameters
ScaStringList aCompList; // list of all valid names
ScaCategory eCat; // function category
sal_Bool bDouble; // name already exist in Calc
sal_Bool bWithOpt; // first parameter is internal
bool bDouble; // name already exist in Calc
bool bWithOpt; // first parameter is internal
public:
ScaFuncData( const ScaFuncDataBase& rBaseData, ResMgr& rRscMgr );
......@@ -231,11 +231,11 @@ public:
inline sal_uInt16 GetUINameID() const { return nUINameID; }
inline sal_uInt16 GetDescrID() const { return nDescrID; }
inline ScaCategory GetCategory() const { return eCat; }
inline sal_Bool IsDouble() const { return bDouble; }
inline sal_Bool HasIntParam() const { return bWithOpt; }
inline bool IsDouble() const { return bDouble; }
inline bool HasIntParam() const { return bWithOpt; }
sal_uInt16 GetStrIndex( sal_uInt16 nParam ) const;
inline sal_Bool Is( const OUString& rCompare ) const
inline bool Is( const OUString& rCompare ) const
{ return aIntName == rCompare; }
inline const ScaStringList& GetCompNameList() const { return aCompList; }
......
......@@ -83,9 +83,9 @@ ScaResId::ScaResId( sal_uInt16 nId, ResMgr& rResMgr ) :
{
}
#define UNIQUE sal_False // function name does not exist in Calc
#define UNIQUE false // function name does not exist in Calc
#define STDPAR sal_False // all parameters are described
#define STDPAR false // all parameters are described
#define FUNCDATA( FuncName, ParamCount, Category, Double, IntPar ) \
{ "get" #FuncName, PRICING_FUNCNAME_##FuncName, PRICING_FUNCDESC_##FuncName, PRICING_DEFFUNCNAME_##FuncName, ParamCount, Category, Double, IntPar }
......
......@@ -186,7 +186,7 @@ class ScaResPublisher : public Resource
public:
inline ScaResPublisher( const ScaResId& rResId ) : Resource( rResId ) {}
inline sal_Bool IsAvailableRes( const ResId& rResId ) const
inline bool IsAvailableRes( const ResId& rResId ) const
{ return Resource::IsAvailableRes( rResId ); }
inline void FreeResource()
{ Resource::FreeResource(); }
......@@ -219,8 +219,8 @@ struct ScaFuncDataBase
sal_uInt16 nCompListID; // resource ID to list of valid names
sal_uInt16 nParamCount; // number of named / described parameters
ScaCategory eCat; // function category
sal_Bool bDouble; // name already exist in Calc
sal_Bool bWithOpt; // first parameter is internal
bool bDouble; // name already exist in Calc
bool bWithOpt; // first parameter is internal
};
class ScaFuncData
......@@ -233,8 +233,8 @@ private:
sal_uInt16 nParamCount; // num of parameters
ScaStringList aCompList; // list of all valid names
ScaCategory eCat; // function category
sal_Bool bDouble; // name already exist in Calc
sal_Bool bWithOpt; // first parameter is internal
bool bDouble; // name already exist in Calc
bool bWithOpt; // first parameter is internal
public:
ScaFuncData( const ScaFuncDataBase& rBaseData, ResMgr& rRscMgr );
......@@ -243,11 +243,11 @@ public:
inline sal_uInt16 GetUINameID() const { return nUINameID; }
inline sal_uInt16 GetDescrID() const { return nDescrID; }
inline ScaCategory GetCategory() const { return eCat; }
inline sal_Bool IsDouble() const { return bDouble; }
inline sal_Bool HasIntParam() const { return bWithOpt; }
inline bool IsDouble() const { return bDouble; }
inline bool HasIntParam() const { return bWithOpt; }
sal_uInt16 GetStrIndex( sal_uInt16 nParam ) const;
inline sal_Bool Is( const OUString& rCompare ) const
inline bool Is( const OUString& rCompare ) const
{ return aIntName == rCompare; }
inline const ScaStringList& GetCompNameList() const { return aCompList; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment