bool improvements

Change-Id: I7020537797b181b0fcbf78de3d7b962b96744895
This commit is contained in:
Stephan Bergmann 2014-01-28 19:58:32 +01:00
parent b4c2496f44
commit 9d1c20259f
12 changed files with 31 additions and 31 deletions

View File

@ -50,9 +50,9 @@ public:
// first check the two lengths // first check the two lengths
if (nLengthLeft < nLengthRight) if (nLengthLeft < nLengthRight)
return sal_True; return true;
if (nLengthLeft > nLengthRight) if (nLengthLeft > nLengthRight)
return sal_False; return false;
// both sequences have the same length -> check the type names // both sequences have the same length -> check the type names
const ::com::sun::star::uno::Type* pTypesLeft = lhs.getConstArray(); const ::com::sun::star::uno::Type* pTypesLeft = lhs.getConstArray();
@ -61,13 +61,13 @@ public:
{ {
sal_Int32 nTypeNameCompare = pTypesLeft->getTypeName().compareTo(pTypesRight->getTypeName()); sal_Int32 nTypeNameCompare = pTypesLeft->getTypeName().compareTo(pTypesRight->getTypeName());
if (nTypeNameCompare < 0) if (nTypeNameCompare < 0)
return sal_True; return true;
if (nTypeNameCompare > 0) if (nTypeNameCompare > 0)
return sal_False; return false;
} }
// both sequences are equal ... // both sequences are equal ...
return sal_False; return false;
} }
}; };

View File

@ -79,7 +79,7 @@ public:
}; };
UcbLockBytesHandler() UcbLockBytesHandler()
: m_bActive( sal_True ) : m_bActive( true )
{} {}
virtual void Handle( LoadHandlerItem nWhich, UcbLockBytesRef xLockBytes ) = 0; virtual void Handle( LoadHandlerItem nWhich, UcbLockBytesRef xLockBytes ) = 0;
@ -182,7 +182,7 @@ public:
} }
void setDontClose_Impl() void setDontClose_Impl()
{ m_bDontClose = sal_True; } { m_bDontClose = true; }
void SetContentType_Impl( const OUString& rType ) { m_aContentType = rType; } void SetContentType_Impl( const OUString& rType ) { m_aContentType = rType; }
void SetRealURL_Impl( const OUString& rURL ) { m_aRealURL = rURL; } void SetRealURL_Impl( const OUString& rURL ) { m_aRealURL = rURL; }

View File

@ -36,8 +36,8 @@
#include "tools/getprocessworkingdir.hxx" #include "tools/getprocessworkingdir.hxx"
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
// #define this to a non-zero value, if remembering defaults is not supported properly // #define this to true, if remembering defaults is not supported properly
#define RTL_BOOTSTRAP_DEFAULTS_BROKEN 1 #define RTL_BOOTSTRAP_DEFAULTS_BROKEN true
#define BOOTSTRAP_ITEM_PRODUCT_KEY "ProductKey" #define BOOTSTRAP_ITEM_PRODUCT_KEY "ProductKey"
#define BOOTSTRAP_ITEM_VERSIONFILE "Location" #define BOOTSTRAP_ITEM_VERSIONFILE "Location"

View File

@ -315,7 +315,7 @@ sal_Bool SvtCommandOptions_Impl::Lookup( SvtCommandOptions::CmdOption eCmdOption
return m_aDisabledCommands.Lookup( aCommand ); return m_aDisabledCommands.Lookup( aCommand );
} }
default: default:
DBG_ASSERT( sal_False, "SvtCommandOptions_Impl::Lookup()\nUnknown option type given!\n" ); DBG_ASSERT( false, "SvtCommandOptions_Impl::Lookup()\nUnknown option type given!\n" );
} }
return sal_False; return sal_False;

View File

@ -457,7 +457,7 @@ void SvtCompatibilityOptions_Impl::SetDefault( OUString sName, bool bValue )
//***************************************************************************************************************** //*****************************************************************************************************************
void SvtCompatibilityOptions_Impl::Notify( const Sequence< OUString >& ) void SvtCompatibilityOptions_Impl::Notify( const Sequence< OUString >& )
{ {
DBG_ASSERT( sal_False, "SvtCompatibilityOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); DBG_ASSERT( false, "SvtCompatibilityOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" );
} }
//***************************************************************************************************************** //*****************************************************************************************************************

View File

@ -467,7 +467,7 @@ SvtDynamicMenuOptions_Impl::~SvtDynamicMenuOptions_Impl()
//***************************************************************************************************************** //*****************************************************************************************************************
void SvtDynamicMenuOptions_Impl::Notify( const Sequence< OUString >& ) void SvtDynamicMenuOptions_Impl::Notify( const Sequence< OUString >& )
{ {
DBG_ASSERT( sal_False, "SvtDynamicMenuOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); DBG_ASSERT( false, "SvtDynamicMenuOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" );
} }
//***************************************************************************************************************** //*****************************************************************************************************************

View File

@ -393,7 +393,7 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const
case UPH_IS_GRAMMAR_AUTO: pbVal = &rOpt.bIsGrammarAuto; break; case UPH_IS_GRAMMAR_AUTO: pbVal = &rOpt.bIsGrammarAuto; break;
case UPH_IS_GRAMMAR_INTERACTIVE: pbVal = &rOpt.bIsGrammarInteractive; break; case UPH_IS_GRAMMAR_INTERACTIVE: pbVal = &rOpt.bIsGrammarInteractive; break;
default : default :
DBG_ASSERT( 0, "unexpected property handle" ); DBG_ASSERT( false, "unexpected property handle" );
} }
if (pbVal) if (pbVal)
@ -494,7 +494,7 @@ sal_Bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::
case UPH_IS_GRAMMAR_AUTO: pbVal = &rOpt.bIsGrammarAuto; break; case UPH_IS_GRAMMAR_AUTO: pbVal = &rOpt.bIsGrammarAuto; break;
case UPH_IS_GRAMMAR_INTERACTIVE: pbVal = &rOpt.bIsGrammarInteractive; break; case UPH_IS_GRAMMAR_INTERACTIVE: pbVal = &rOpt.bIsGrammarInteractive; break;
default : default :
DBG_ASSERT( 0, "unexpected property handle" ); DBG_ASSERT( false, "unexpected property handle" );
} }
if (pbVal) if (pbVal)
@ -656,7 +656,7 @@ sal_Bool SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProp
break; break;
default: default:
DBG_ASSERT( 0, "unexpected case" ); DBG_ASSERT( false, "unexpected case" );
} }
} }
@ -787,7 +787,7 @@ sal_Bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const
case UPH_IS_GRAMMAR_AUTO: bReadOnly = rOpt.bROIsGrammarAuto; break; case UPH_IS_GRAMMAR_AUTO: bReadOnly = rOpt.bROIsGrammarAuto; break;
case UPH_IS_GRAMMAR_INTERACTIVE: bReadOnly = rOpt.bROIsGrammarInteractive; break; case UPH_IS_GRAMMAR_INTERACTIVE: bReadOnly = rOpt.bROIsGrammarInteractive; break;
default : default :
DBG_ASSERT( 0, "unexpected property handle" ); DBG_ASSERT( false, "unexpected property handle" );
} }
return bReadOnly; return bReadOnly;
} }
@ -1148,7 +1148,7 @@ OUString SvtLinguConfig::GetVendorImageUrl_Impl(
} }
catch (uno::Exception &) catch (uno::Exception &)
{ {
DBG_ASSERT( 0, "exception caught. GetVendorImageUrl_Impl failed" ); DBG_ASSERT( false, "exception caught. GetVendorImageUrl_Impl failed" );
} }
return aRes; return aRes;
} }

View File

@ -1337,7 +1337,7 @@ OUString LocaleDataWrapper::getDate( const Date& rDate ) const
sal_uInt16 nYear = rDate.GetYear(); sal_uInt16 nYear = rDate.GetYear();
sal_uInt16 nYearLen; sal_uInt16 nYearLen;
if ( sal_True /* IsDateCentury() */ ) if ( true /* IsDateCentury() */ )
nYearLen = 4; nYearLen = 4;
else else
{ {
@ -1348,25 +1348,25 @@ OUString LocaleDataWrapper::getDate( const Date& rDate ) const
switch ( getDateFormat() ) switch ( getDateFormat() )
{ {
case DMY : case DMY :
pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nDay, true /* IsDateDayLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nMonth, true /* IsDateMonthLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAddUNum( pBuf, nYear, nYearLen ); pBuf = ImplAddUNum( pBuf, nYear, nYearLen );
break; break;
case MDY : case MDY :
pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nMonth, true /* IsDateMonthLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nDay, true /* IsDateDayLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAddUNum( pBuf, nYear, nYearLen ); pBuf = ImplAddUNum( pBuf, nYear, nYearLen );
break; break;
default: default:
pBuf = ImplAddUNum( pBuf, nYear, nYearLen ); pBuf = ImplAddUNum( pBuf, nYear, nYearLen );
pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nMonth, true /* IsDateMonthLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nDay, true /* IsDateDayLeadingZero() */ );
} }
return OUString(aBuf, pBuf-aBuf); return OUString(aBuf, pBuf-aBuf);
@ -1383,7 +1383,7 @@ OUString LocaleDataWrapper::getTime( const Time& rTime, sal_Bool bSec, sal_Bool
nHour %= 24; nHour %= 24;
pBuf = ImplAdd2UNum( pBuf, nHour, sal_True /* IsTimeLeadingZero() */ ); pBuf = ImplAdd2UNum( pBuf, nHour, true /* IsTimeLeadingZero() */ );
pBuf = ImplAddString( pBuf, getTimeSep() ); pBuf = ImplAddString( pBuf, getTimeSep() );
pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), true ); pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), true );
if ( bSec ) if ( bSec )
@ -1456,7 +1456,7 @@ OUString LocaleDataWrapper::getDuration( const Time& rTime, sal_Bool bSec, sal_B
if ( rTime < Time( 0 ) ) if ( rTime < Time( 0 ) )
pBuf = ImplAddString( pBuf, ' ' ); pBuf = ImplAddString( pBuf, ' ' );
if ( sal_True /* IsTimeLeadingZero() */ ) if ( true /* IsTimeLeadingZero() */ )
pBuf = ImplAddUNum( pBuf, rTime.GetHour(), 2 ); pBuf = ImplAddUNum( pBuf, rTime.GetHour(), 2 );
else else
pBuf = ImplAddUNum( pBuf, rTime.GetHour() ); pBuf = ImplAddUNum( pBuf, rTime.GetHour() );

View File

@ -34,7 +34,7 @@ TransliterationWrapper::TransliterationWrapper(
const Reference< XComponentContext > & rxContext, const Reference< XComponentContext > & rxContext,
sal_uInt32 nTyp ) sal_uInt32 nTyp )
: xTrans( Transliteration::create(rxContext) ), : xTrans( Transliteration::create(rxContext) ),
aLanguageTag( LANGUAGE_SYSTEM ), nType( nTyp ), bFirstCall( sal_True ) aLanguageTag( LANGUAGE_SYSTEM ), nType( nTyp ), bFirstCall( true )
{ {
} }

View File

@ -90,7 +90,7 @@ namespace utl
.append(aMgrName) .append(aMgrName)
.append(")!").getStr() ); .append(")!").getStr() );
m_bInitialized = sal_True; m_bInitialized = true;
} }
return m_pResources; return m_pResources;
} }

View File

@ -143,14 +143,14 @@ static SvStream* lcl_CreateStream( const OUString& rFileName, StreamMode eOpenMo
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode, SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,
UcbLockBytesHandler* pHandler ) UcbLockBytesHandler* pHandler )
{ {
return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, sal_True /* bEnsureFileExists */ ); return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, true /* bEnsureFileExists */ );
} }
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode, SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,
Reference < XInteractionHandler > xInteractionHandler, Reference < XInteractionHandler > xInteractionHandler,
UcbLockBytesHandler* pHandler ) UcbLockBytesHandler* pHandler )
{ {
return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, pHandler, sal_True /* bEnsureFileExists */ ); return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, pHandler, true /* bEnsureFileExists */ );
} }
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode, SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,

View File

@ -37,7 +37,7 @@ OTempFileService::OTempFileService(css::uno::Reference< css::uno::XComponentCont
{ {
mpTempFile = new ::utl::TempFile; mpTempFile = new ::utl::TempFile;
mpTempFile->EnableKillingFile ( sal_True ); mpTempFile->EnableKillingFile ( true );
} }
OTempFileService::~OTempFileService () OTempFileService::~OTempFileService ()