loplugin:simplifybool

Change-Id: Ifaae5adf238dd24438cc321202271e898fd01543
This commit is contained in:
Stephan Bergmann
2015-07-16 13:49:48 +02:00
parent 5456d59651
commit 7cc9ebcaee
3 changed files with 12 additions and 12 deletions

View File

@@ -83,7 +83,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
case XML_TOK_SUPPRESS_VERSION_COLUMNS: case XML_TOK_SUPPRESS_VERSION_COLUMNS:
try try
{ {
xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(sValue == s_sTRUE ? sal_True : sal_False)); xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(sValue == s_sTRUE));
bFoundSuppressVersionColumns = true; bFoundSuppressVersionColumns = true;
} }
catch(const Exception&) catch(const Exception&)
@@ -99,15 +99,15 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break; break;
case XML_TOK_IS_FIRST_ROW_HEADER_LINE: case XML_TOK_IS_FIRST_ROW_HEADER_LINE:
aProperty.Name = INFO_TEXTFILEHEADER; aProperty.Name = INFO_TEXTFILEHEADER;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
break; break;
case XML_TOK_SHOW_DELETED: case XML_TOK_SHOW_DELETED:
aProperty.Name = INFO_SHOWDELETEDROWS; aProperty.Name = INFO_SHOWDELETEDROWS;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
break; break;
case XML_TOK_IS_TABLE_NAME_LENGTH_LIMITED: case XML_TOK_IS_TABLE_NAME_LENGTH_LIMITED:
aProperty.Name = INFO_ALLOWLONGTABLENAMES; aProperty.Name = INFO_ALLOWLONGTABLENAMES;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
bFoundTableNameLengthLimited = true; bFoundTableNameLengthLimited = true;
break; break;
case XML_TOK_SYSTEM_DRIVER_SETTINGS: case XML_TOK_SYSTEM_DRIVER_SETTINGS:
@@ -115,21 +115,21 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break; break;
case XML_TOK_ENABLE_SQL92_CHECK: case XML_TOK_ENABLE_SQL92_CHECK:
aProperty.Name = PROPERTY_ENABLESQL92CHECK; aProperty.Name = PROPERTY_ENABLESQL92CHECK;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
break; break;
case XML_TOK_APPEND_TABLE_ALIAS_NAME: case XML_TOK_APPEND_TABLE_ALIAS_NAME:
aProperty.Name = INFO_APPEND_TABLE_ALIAS; aProperty.Name = INFO_APPEND_TABLE_ALIAS;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
bFoundAppendTableAliasName = true; bFoundAppendTableAliasName = true;
break; break;
case XML_TOK_PARAMETER_NAME_SUBSTITUTION: case XML_TOK_PARAMETER_NAME_SUBSTITUTION:
aProperty.Name = INFO_PARAMETERNAMESUBST; aProperty.Name = INFO_PARAMETERNAMESUBST;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
bFoundParamNameSubstitution = true; bFoundParamNameSubstitution = true;
break; break;
case XML_TOK_IGNORE_DRIVER_PRIVILEGES: case XML_TOK_IGNORE_DRIVER_PRIVILEGES:
aProperty.Name = INFO_IGNOREDRIVER_PRIV; aProperty.Name = INFO_IGNOREDRIVER_PRIV;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
break; break;
case XML_TOK_BOOLEAN_COMPARISON_MODE: case XML_TOK_BOOLEAN_COMPARISON_MODE:
aProperty.Name = PROPERTY_BOOLEANCOMPARISONMODE; aProperty.Name = PROPERTY_BOOLEANCOMPARISONMODE;
@@ -144,7 +144,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
break; break;
case XML_TOK_USE_CATALOG: case XML_TOK_USE_CATALOG:
aProperty.Name = INFO_USECATALOG; aProperty.Name = INFO_USECATALOG;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
break; break;
case XML_TOK_BASE_DN: case XML_TOK_BASE_DN:
aProperty.Name = INFO_CONN_LDAP_BASEDN; aProperty.Name = INFO_CONN_LDAP_BASEDN;

View File

@@ -78,7 +78,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
case XML_TOK_IS_PASSWORD_REQUIRED: case XML_TOK_IS_PASSWORD_REQUIRED:
try try
{ {
xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,makeAny((sValue == s_sTRUE ? sal_True : sal_False))); xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,makeAny(sValue == s_sTRUE));
} }
catch(const Exception&) catch(const Exception&)
{ {
@@ -91,7 +91,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
bUserFound = true; bUserFound = true;
PropertyValue aProperty; PropertyValue aProperty;
aProperty.Name = "UseSystemUser"; aProperty.Name = "UseSystemUser";
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False); aProperty.Value <<= (sValue == s_sTRUE);
rImport.addInfo(aProperty); rImport.addInfo(aProperty);
} }
break; break;

View File

@@ -143,7 +143,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
const TColumnVector* pList, const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap, const OTypeInfoMap* _pInfoMap,
SvStream& _rInputStream) SvStream& _rInputStream)
:m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers() == sal_True) :m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
,m_xConnection(_rxConnection) ,m_xConnection(_rxConnection)
,m_xFormatter(_rxNumberF) ,m_xFormatter(_rxNumberF)
,m_xContext(_rxContext) ,m_xContext(_rxContext)