Kaydet (Commit) c763ceb4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:salbool: Automatic rewrite of sal_False/True

Change-Id: I3a3295b538e79186914390b6da73cc8bc25419a5
üst 88338ed6
......@@ -130,7 +130,7 @@ sal_Bool IdlClassImpl::isAssignableFrom( const Reference< XIdlClass > & xType )
TypeClass eAssign = getTypeClass();
if (equals( xType ) || eAssign == TypeClass_ANY) // default shot
{
return sal_True;
return true;
}
else
{
......@@ -141,7 +141,7 @@ sal_Bool IdlClassImpl::isAssignableFrom( const Reference< XIdlClass > & xType )
return s_aAssignableFromTab[eAssign-1][eFrom-1];
}
}
return sal_False;
return false;
}
void IdlClassImpl::createObject( Any & rObj )
......
......@@ -290,7 +290,7 @@ sal_Bool CompoundIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
if (eTC == TypeClass_STRUCT || eTC == TypeClass_EXCEPTION)
{
if (equals( xType ))
return sal_True;
return true;
else
{
const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses();
......@@ -302,7 +302,7 @@ sal_Bool CompoundIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
}
}
}
return sal_False;
return false;
}
Sequence< Reference< XIdlClass > > CompoundIdlClassImpl::getSuperclasses()
......
......@@ -308,7 +308,7 @@ sal_Bool IdlReflectionServiceImpl::hasByHierarchicalName( const OUString & rName
catch (container::NoSuchElementException &)
{
}
return sal_False;
return false;
}
......
......@@ -821,7 +821,7 @@ sal_Bool InterfaceIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
if (xType.is() && xType->getTypeClass() == TypeClass_INTERFACE)
{
if (equals( xType ))
return sal_True;
return true;
else
{
const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses();
......@@ -832,7 +832,7 @@ sal_Bool InterfaceIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
}
}
}
return sal_False;
return false;
}
Uik InterfaceIdlClassImpl::getUik()
......
......@@ -1244,13 +1244,13 @@ sal_Bool SAL_CALL NestedRegistryImpl::isValid( ) throw(RuntimeException, std::e
{
if ( (m_localReg.is() && m_localReg->isValid()) ||
(m_defaultReg.is() && m_defaultReg->isValid()) )
return sal_True;
return true;
}
catch(InvalidRegistryException& )
{
}
return sal_False;
return false;
}
......@@ -1321,7 +1321,7 @@ sal_Bool SAL_CALL NestedRegistryImpl::isReadOnly( )
{
}
return sal_False;
return false;
}
......
......@@ -1610,7 +1610,7 @@ Sequence< OUString > ImplementationRegistration::getImplementations(
{
try
{
xReg->open(OUString() /* in mem */, sal_False, sal_True);
xReg->open(OUString() /* in mem */, false, true);
Reference < XRegistryKey > xImpl;
{ // only necessary for deleting the temporary variable of rootkey
......@@ -1723,7 +1723,7 @@ void ImplementationRegistration::doRegister(
{
try
{
xReg->open(OUString() /* in mem */, sal_False, sal_True);
xReg->open(OUString() /* in mem */, false, true);
{ // only necessary for deleting the temporary variable of rootkey
xSourceKey = xReg->getRootKey()->createKey( spool().slash_IMPLEMENTATIONS );
......
......@@ -490,7 +490,7 @@ sal_Bool Invocation_Impl::hasMethod( const OUString& Name )
return _xDirect->hasMethod( Name );
if( _xIntrospectionAccess.is() )
return _xIntrospectionAccess->hasMethod( Name, MethodConcept::ALL ^ MethodConcept::DANGEROUS );
return sal_False;
return false;
}
......@@ -502,11 +502,11 @@ sal_Bool Invocation_Impl::hasProperty( const OUString& Name )
// PropertySet
if( _xIntrospectionAccess.is()
&& _xIntrospectionAccess->hasProperty( Name, PropertyConcept::ALL ^ PropertyConcept::DANGEROUS ) )
return sal_True;
return true;
// NameAccess
if( _xNameAccess.is() )
return _xNameAccess->hasByName( Name );
return sal_False;
return false;
}
......
......@@ -276,7 +276,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY);
if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
xConfRegistry_simple->open("org.openoffice.Inet", sal_True, sal_False);
xConfRegistry_simple->open("org.openoffice.Inet", true, false);
css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey();
// if ooInetProxyType is not 0 then read the settings
......@@ -370,7 +370,7 @@ void getDefaultLocaleFromConfig(
throw css::uno::RuntimeException(
OUString("javavm.cxx: couldn't get ConfigurationRegistry"), nullptr);
xConfRegistry_simple->open("org.openoffice.Setup", sal_True, sal_False);
xConfRegistry_simple->open("org.openoffice.Setup", true, false);
css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey();
// read locale
......@@ -426,7 +426,7 @@ void getJavaPropsFromSafetySettings(
xConfRegistry_simple->open(
"org.openoffice.Office.Java",
sal_True, sal_False);
true, false);
css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey =
xConfRegistry_simple->getRootKey();
......@@ -791,7 +791,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
jfw::JavaInfoGuard pJavaInfo;
if (JFW_E_NONE == jfw_getSelectedJRE(&pJavaInfo.info))
{
sal_Bool bExist = sal_False;
sal_Bool bExist = false;
if (JFW_E_NONE == jfw_existJRE(pJavaInfo.info, &bExist))
{
if (!bExist
......@@ -916,7 +916,7 @@ sal_Bool SAL_CALL JavaVirtualMachine::isVMEnabled()
// initVMConfiguration(&aJvm, m_xContext->getServiceManager(), m_xContext);
// return aJvm.isEnabled();
//ToDo
sal_Bool bEnabled = sal_False;
sal_Bool bEnabled = false;
if (jfw_getEnabled( & bEnabled) != JFW_E_NONE)
throw css::uno::RuntimeException();
return bEnabled;
......
......@@ -157,7 +157,7 @@ sal_Bool SAL_CALL DllComponentLoader::writeRegistryInfo(
#else
writeSharedLibComponentInfo(
cppu::bootstrap_expandUri(rLibName), OUString(), m_xSMgr, xKey );
return sal_True;
return true;
#endif
}
......
......@@ -234,9 +234,9 @@ sal_Bool PropertySetInfo_Impl::hasPropertyByName( OUString const & name )
for ( sal_Int32 nPos = m_properties.getLength(); nPos--; )
{
if (p[ nPos ].Name.equals( name ))
return sal_True;
return true;
}
return sal_False;
return false;
}
......@@ -1119,7 +1119,7 @@ sal_Bool OServiceManager::has( const Any & Element )
return m_ImplementationNameMap.find( implName ) !=
m_ImplementationNameMap.end();
}
return sal_False;
return false;
}
// XSet
......
......@@ -740,12 +740,12 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
const OUString & aStr = *static_cast<const OUString *>(rVal.getValue());
if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( "false" ))
{
sal_Bool bFalse = sal_False;
sal_Bool bFalse = false;
aRet.setValue( &bFalse, cppu::UnoType<bool>::get() );
}
else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( "true" ))
{
sal_Bool bTrue = sal_True;
sal_Bool bTrue = true;
aRet.setValue( &bTrue, cppu::UnoType<bool>::get() );
}
else
......
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