From cfa6f852429f96cf5bf5e9f7c03a9dacd320f4ba Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Tue, 4 Sep 2012 18:42:23 +0900 Subject: sal_Bool to bool Change-Id: Iebed1c159606ab695b049032da5a3509e468fb91 --- basic/inc/basic/sbxvar.hxx | 4 ++-- basic/source/runtime/methods1.cxx | 2 +- basic/source/sbx/sbxconv.hxx | 8 ++++---- basic/source/sbx/sbxdbl.cxx | 2 +- basic/source/sbx/sbxscan.cxx | 32 ++++++++++++++++---------------- basic/source/sbx/sbxstr.cxx | 4 ++-- basic/source/sbx/sbxvalue.cxx | 8 ++++---- 7 files changed, 30 insertions(+), 30 deletions(-) (limited to 'basic') diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx index 63f5e21dc3cd..d3c47f1e8555 100644 --- a/basic/inc/basic/sbxvar.hxx +++ b/basic/inc/basic/sbxvar.hxx @@ -134,7 +134,7 @@ public: sal_Bool IspChar() const { return sal_Bool( GetType() == SbxLPSTR ); } sal_Bool IsNumeric() const; sal_Bool IsNumericRTL() const; // #41692 Interface for Basic - sal_Bool ImpIsNumeric( sal_Bool bOnlyIntntl ) const; // Implementation + sal_Bool ImpIsNumeric( bool bOnlyIntntl ) const; // Implementation virtual SbxClassType GetClass() const; virtual SbxDataType GetType() const; @@ -194,7 +194,7 @@ public: sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); sal_Bool PutCurrency( const sal_Int64& ); // Interface for CDbl in Basic - static SbxError ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle = sal_False ); + static SbxError ScanNumIntnl( const String& rSrc, double& nVal, bool bSingle = false ); sal_Bool PutObject( SbxBase* ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 1b80eec60316..3e1d94900f76 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -384,7 +384,7 @@ RTLFUNC(CSng) // JSM // #41690 double dVal = 0.0; String aScanStr = pSbxVariable->GetString(); - SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/sal_True ); + SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/true ); if( SbxBase::GetError() == SbxERR_OK && Error != SbxERR_OK ) StarBASIC::Error( Error ); nVal = (float)dVal; diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx index e97338d5e826..4b369ce70768 100644 --- a/basic/source/sbx/sbxconv.hxx +++ b/basic/source/sbx/sbxconv.hxx @@ -25,13 +25,13 @@ class SbxArray; // SBXSCAN.CXX -extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreString=sal_False ); +extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreString=false ); extern SbxError ImpScan ( const ::rtl::OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, - sal_Bool bAllowIntntl=sal_False, sal_Bool bOnlyIntntl=sal_False ); + bool bAllowIntntl=false, bool bOnlyIntntl=false ); // with advanced evaluation (International, "TRUE"/"FALSE") -extern sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ); +extern bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ); void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ); @@ -64,7 +64,7 @@ void ImpPutSingle( SbxValues*, float ); // SBXDBL.CXX double ImpGetDouble( const SbxValues* ); -void ImpPutDouble( SbxValues*, double, sal_Bool bCoreString=sal_False ); +void ImpPutDouble( SbxValues*, double, bool bCoreString=false ); // SBXCURR.CXX diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index 7cab04f2c875..5fa87d437686 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -134,7 +134,7 @@ double ImpGetDouble( const SbxValues* p ) return nRes; } -void ImpPutDouble( SbxValues* p, double n, sal_Bool bCoreString ) +void ImpPutDouble( SbxValues* p, double n, bool bCoreString ) { SbxValues aTmp; start: diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index f89b28cfed49..bc235236d785 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -59,7 +59,7 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ) // conversion error if data type is fixed and it doesn't fit SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType, - sal_uInt16* pLen, sal_Bool bAllowIntntl, sal_Bool bOnlyIntntl ) + sal_uInt16* pLen, bool bAllowIntntl, bool bOnlyIntntl ) { ::rtl::OString aBStr( ::rtl::OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) ); @@ -228,12 +228,12 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType } // port for CDbl in the Basic -SbxError SbxValue::ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle ) +SbxError SbxValue::ScanNumIntnl( const String& rSrc, double& nVal, bool bSingle ) { SbxDataType t; sal_uInt16 nLen = 0; SbxError nRetError = ImpScan( rSrc, nVal, t, &nLen, - /*bAllowIntntl*/sal_False, /*bOnlyIntntl*/sal_True ); + /*bAllowIntntl*/false, /*bOnlyIntntl*/true ); // read completely? if( nRetError == SbxERR_OK && nLen != rSrc.Len() ) nRetError = SbxERR_CONVERSION; @@ -373,7 +373,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, #pragma warning(disable: 4748) // "... because optimizations are disabled ..." #endif -void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreString ) +void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreString ) { char *q; char cBuf[ 40 ], *p = cBuf; @@ -404,9 +404,9 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreS #pragma optimize( "", on ) #endif -sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) +bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) { - sal_Bool bChanged = sal_False; + bool bChanged = false; ::rtl::OUString aNewString; // only special cases are handled, nothing on default @@ -430,7 +430,7 @@ sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) { sal_Unicode* pStr = (sal_Unicode*)aNewString.getStr(); pStr[nPos] = (sal_Unicode)'.'; - bChanged = sal_True; + bChanged = true; } } break; @@ -442,13 +442,13 @@ sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) if( rSrc.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ) { aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxTRUE ); - bChanged = sal_True; + bChanged = true; } else if( rSrc.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) ) { aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxFALSE ); - bChanged = sal_True; + bChanged = true; } break; } @@ -478,9 +478,9 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW short nWidth = 0; // number range completely short nLen; // length of converted number bool bPoint = false; // true: with 1000 seperators - sal_Bool bTrail = sal_False; // sal_True, if following minus - sal_Bool bSign = sal_False; // sal_True: always with leading sign - sal_Bool bNeg = sal_False; // sal_True: number is negative + bool bTrail = false; // true, if following minus + bool bSign = false; // true: always with leading sign + bool bNeg = false; // true: number is negative char cBuf [1024]; // number buffer char * p; const char* pFmt = rFmt; @@ -496,7 +496,7 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW case 0: break; case '+': - bSign = sal_True; nWidth++; break; + bSign = true; nWidth++; break; case '*': nWidth++; cFill = '*'; if( *pFmt == '$' ) nWidth++, pFmt++, cPre = '$'; @@ -529,11 +529,11 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW pFmt++, nExpDig++, nWidth++; // following minus if( !bSign && *pFmt == '-' ) - pFmt++, bTrail = sal_True; + pFmt++, bTrail = true; // convert number if( nPrec > 15 ) nPrec = 15; - if( nNum < 0.0 ) nNum = -nNum, bNeg = sal_True; + if( nNum < 0.0 ) nNum = -nNum, bNeg = true; p = cBuf; if( bSign ) *p++ = bNeg ? '-' : '+'; myftoa( nNum, p, nPrec, nExpDig, bPoint, false ); @@ -922,7 +922,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const // #45355 converting if numeric if( IsNumericRTL() ) { - ScanNumIntnl( GetString(), d, /*bSingle*/sal_False ); + ScanNumIntnl( GetString(), d, /*bSingle*/false ); goto cvt2; } else diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx index 9576afe8e5f2..a17cb1690fb6 100644 --- a/basic/source/sbx/sbxstr.cxx +++ b/basic/source/sbx/sbxstr.cxx @@ -138,9 +138,9 @@ aTmp.eType = SbxSTRING; aTmp.pOUString = &aRes; if( p->eType == SbxDOUBLE ) - ImpPutDouble( &aTmp, p->nDouble, sal_True ); // true = bCoreString + ImpPutDouble( &aTmp, p->nDouble, true ); // true = bCoreString else - ImpPutDouble( &aTmp, *p->pDouble, sal_True ); // true = bCoreString + ImpPutDouble( &aTmp, *p->pDouble, true ); // true = bCoreString return aRes; } else diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 89bb4e0006c2..5d7f5179ad6c 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -724,15 +724,15 @@ sal_Bool SbxValue::IsFixed() const // #41692, implement it for RTL and Basic-Core seperably sal_Bool SbxValue::IsNumeric() const { - return ImpIsNumeric( /*bOnlyIntntl*/sal_False ); + return ImpIsNumeric( /*bOnlyIntntl*/false ); } sal_Bool SbxValue::IsNumericRTL() const { - return ImpIsNumeric( /*bOnlyIntntl*/sal_True ); + return ImpIsNumeric( /*bOnlyIntntl*/true ); } -sal_Bool SbxValue::ImpIsNumeric( sal_Bool bOnlyIntntl ) const +sal_Bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const { if( !CanRead() ) @@ -751,7 +751,7 @@ sal_Bool SbxValue::ImpIsNumeric( sal_Bool bOnlyIntntl ) const double n; SbxDataType t2; sal_uInt16 nLen = 0; - if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/sal_False, bOnlyIntntl ) == SbxERR_OK ) + if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/false, bOnlyIntntl ) == SbxERR_OK ) return sal_Bool( nLen == s.getLength() ); } return sal_False; -- cgit