diff options
49 files changed, 129 insertions, 129 deletions
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 7f369eee1163..da7d7226b389 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -188,17 +188,17 @@ sal_Bool isCharOk(sal_Unicode c,const OUString& _rSpecials) } -sal_Bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) +bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) { // Test for correct naming (in SQL sense) // This is important for table names for example const sal_Unicode* pStr = rName.getStr(); if (*pStr > 127 || isdigit(*pStr)) - return sal_False; + return false; for (; *pStr; ++pStr ) if(!isCharOk(*pStr,_rSpecials)) - return sal_False; + return false; if ( !rName.isEmpty() && ( (rName.toChar() == '_') @@ -207,13 +207,13 @@ sal_Bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) ) ) ) - return sal_False; + return false; // the SQL-Standard requires the first character to be an alphabetic character, which // isn't easy to decide in UniCode ... // So we just prohibit the characters which already lead to problems .... // 11.04.00 - 74902 - FS - return sal_True; + return true; } // Creates a new name if necessary diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 0bcc9509133f..c5669adf33f4 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; -OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, sal_Bool bQuote, +OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool bQuote, const Reference< XTypeConverter >& _rxTypeConverter) { OUStringBuffer aRet; diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index acf70f219d08..27c7e16dd04b 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -149,7 +149,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const dbtools::qualifiedNameComponents(m_pTable->getMetaData(),m_pTable->getName(),aCatalog,aSchema,aTable,::dbtools::eInDataManipulation); OUString aComposedName; - aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable,sal_True,::dbtools::eInIndexDefinitions); + aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable, true, ::dbtools::eInIndexDefinitions); if (!_rForName.isEmpty() ) { aSql.append( ::dbtools::quoteName( aQuote, _rForName ) ); @@ -230,7 +230,7 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementNam OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::eInIndexDefinitions, false, false, true ); OUString sIndexName,sTemp; - sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), sTemp, aSchema, aName, sal_True, ::dbtools::eInIndexDefinitions ); + sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), sTemp, aSchema, aName, true, ::dbtools::eInIndexDefinitions ); aSql += sIndexName + " ON " + aComposedName; diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index e026f6ce8696..14454ab1570f 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -394,7 +394,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames) if ( pKeyProps.get() ) m_pImpl->m_aKeys.insert(TKeyMap::value_type(sOldFKName,pKeyProps)); - const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,sal_False,::dbtools::eInDataManipulation); + const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::eInDataManipulation); pKeyProps.reset(new sdbcx::KeyProperties(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule)); pKeyProps->m_aKeyColumnNames.push_back(sForeignKeyColumn); _rNames.push_back(sFkName); @@ -517,10 +517,10 @@ void SAL_CALL OTableHelper::rename( const OUString& newName ) throw(SQLException ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); OUString sComposedName; - sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sal_True,::dbtools::eInDataManipulation); + sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,true,::dbtools::eInDataManipulation); sSql += sComposedName + " TO "; - sComposedName = ::dbtools::composeTableName(getMetaData(),sCatalog,sSchema,sTable,sal_True,::dbtools::eInDataManipulation); + sComposedName = ::dbtools::composeTableName(getMetaData(),sCatalog,sSchema,sTable,true,::dbtools::eInDataManipulation); sSql += sComposedName; Reference< XStatement > xStmt = m_pImpl->m_xConnection->createStatement( ); @@ -563,7 +563,7 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference OUString SAL_CALL OTableHelper::getName() throw(RuntimeException, std::exception) { OUString sComposedName; - sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sal_False,::dbtools::eInDataManipulation); + sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,false,::dbtools::eInDataManipulation); return sComposedName; } diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx index d004fa074790..e01f1770acf5 100644 --- a/connectivity/source/commontools/conncleanup.cxx +++ b/connectivity/source/commontools/conncleanup.cxx @@ -45,8 +45,8 @@ namespace dbtools OAutoConnectionDisposer::OAutoConnectionDisposer(const Reference< XRowSet >& _rxRowSet, const Reference< XConnection >& _rxConnection) :m_xRowSet( _rxRowSet ) - ,m_bRSListening( sal_False ) - ,m_bPropertyListening( sal_False ) + ,m_bRSListening( false ) + ,m_bPropertyListening( false ) { Reference< XPropertySet > xProps(_rxRowSet, UNO_QUERY); OSL_ENSURE(xProps.is(), "OAutoConnectionDisposer::OAutoConnectionDisposer: invalid rowset (no XPropertySet)!"); @@ -72,7 +72,7 @@ namespace dbtools try { _rxRowSet->addPropertyChangeListener( getActiveConnectionPropertyName(), this ); - m_bPropertyListening = sal_True; + m_bPropertyListening = true; } catch( const Exception& ) { @@ -92,7 +92,7 @@ namespace dbtools if ( _rxEventSource.is() ) { _rxEventSource->removePropertyChangeListener( getActiveConnectionPropertyName(), this ); - m_bPropertyListening = sal_False; + m_bPropertyListening = false; } } catch( const Exception& ) @@ -114,7 +114,7 @@ namespace dbtools { OSL_FAIL( "OAutoConnectionDisposer::startRowSetListening: caught an exception!" ); } - m_bRSListening = sal_True; + m_bRSListening = true; } @@ -129,7 +129,7 @@ namespace dbtools { OSL_FAIL( "OAutoConnectionDisposer::stopRowSetListening: caught an exception!" ); } - m_bRSListening = sal_False; + m_bRSListening = false; } diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index eddaea17ce2a..99a5b62d8fd4 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -70,9 +70,9 @@ namespace dbtools } - sal_Bool OCharsetMap::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const + bool OCharsetMap::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const { - sal_Bool bIsMimeEncoding = 0 != ( _rInfo.Flags & RTL_TEXTENCODING_INFO_MIME ); + bool bIsMimeEncoding = 0 != ( _rInfo.Flags & RTL_TEXTENCODING_INFO_MIME ); OSL_ENSURE( !bIsMimeEncoding || rtl_getMimeCharsetFromTextEncoding( _eEncoding ), "OCharsetMap::OCharsetMap: inconsistence in rtl!" ); OSL_UNUSED( _eEncoding ); diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index 176239cc4e1c..2056a4435f96 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -158,7 +158,7 @@ void SQLExceptionInfo::implDetermineType() } -sal_Bool SQLExceptionInfo::isKindOf(TYPE _eType) const +bool SQLExceptionInfo::isKindOf(TYPE _eType) const { switch (_eType) { @@ -171,7 +171,7 @@ sal_Bool SQLExceptionInfo::isKindOf(TYPE _eType) const case UNDEFINED: return (m_eType == UNDEFINED); } - return sal_False; + return false; } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 0a4c8c1b9874..a08b85526fd4 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -145,7 +145,7 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType, sal_Int32 _nScale, - sal_Bool _bIsCurrency, + bool _bIsCurrency, const Reference< XNumberFormatTypes >& _xTypes, const Locale& _rLocale) { @@ -808,7 +808,7 @@ namespace static OUString impl_doComposeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName, - sal_Bool _bQuote, EComposeRule _eComposeRule ) + bool _bQuote, EComposeRule _eComposeRule ) { OSL_ENSURE(_rxMetaData.is(), "impl_doComposeTableName : invalid meta data !"); if ( !_rxMetaData.is() ) @@ -861,7 +861,7 @@ OUString quoteTableName(const Reference< XDatabaseMetaData>& _rxMeta { OUString sCatalog, sSchema, sTable; qualifiedNameComponents(_rxMeta,_rName,sCatalog,sSchema,sTable,_eComposeRule); - return impl_doComposeTableName( _rxMeta, sCatalog, sSchema, sTable, sal_True, _eComposeRule ); + return impl_doComposeTableName( _rxMeta, sCatalog, sSchema, sTable, true, _eComposeRule ); } void qualifiedNameComponents(const Reference< XDatabaseMetaData >& _rxConnMetaData, const OUString& _rQualifiedName, OUString& _rCatalog, OUString& _rSchema, OUString& _rName,EComposeRule _eComposeRule) @@ -912,7 +912,7 @@ void qualifiedNameComponents(const Reference< XDatabaseMetaData >& _rxConnMetaDa Reference< XNumberFormatsSupplier> getNumberFormats( const Reference< XConnection>& _rxConn, - sal_Bool _bAlloweDefault, + bool _bAlloweDefault, const Reference< XComponentContext>& _rxContext) { // ask the parent of the connection (should be an DatabaseAccess) @@ -1197,17 +1197,17 @@ catch(const Exception&) } } -sal_Bool canInsert(const Reference< XPropertySet>& _rxCursorSet) +bool canInsert(const Reference< XPropertySet>& _rxCursorSet) { return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0)); } -sal_Bool canUpdate(const Reference< XPropertySet>& _rxCursorSet) +bool canUpdate(const Reference< XPropertySet>& _rxCursorSet) { return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0)); } -sal_Bool canDelete(const Reference< XPropertySet>& _rxCursorSet) +bool canDelete(const Reference< XPropertySet>& _rxCursorSet) { return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0)); } @@ -1302,7 +1302,7 @@ OUString composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName, - sal_Bool _bQuote, + bool _bQuote, EComposeRule _eComposeRule) { return impl_doComposeTableName( _rxMetaData, _rCatalog, _rSchema, _rName, _bQuote, _eComposeRule ); @@ -1311,8 +1311,8 @@ OUString composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName ) { - sal_Bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseCatalogInSelect" ), sal_True ); - sal_Bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseSchemaInSelect" ), sal_True ); + bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseCatalogInSelect" ), true ); + bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseSchemaInSelect" ), true ); return impl_doComposeTableName( _rxConnection->getMetaData(), @@ -1396,7 +1396,7 @@ sal_Int32 getSearchColumnFlag( const Reference< XConnection>& _rxConn,sal_Int32 return nSearchFlag; } -OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& _rBaseName, sal_Bool _bStartWithNumber ) +OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& _rBaseName, bool _bStartWithNumber ) { ::std::set< OUString > aUsedNames; ::std::copy( @@ -1418,7 +1418,7 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& return sName; } -OUString createUniqueName(const Reference<XNameAccess>& _rxContainer,const OUString& _rBaseName,sal_Bool _bStartWithNumber) +OUString createUniqueName(const Reference<XNameAccess>& _rxContainer,const OUString& _rBaseName, bool _bStartWithNumber) { Sequence< OUString > aElementNames; @@ -1933,7 +1933,7 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams, } } -void getBoleanComparisonPredicate( const OUString& _rExpression, const sal_Bool _bValue, const sal_Int32 _nBooleanComparisonMode, +void getBooleanComparisonPredicate( const OUString& _rExpression, const bool _bValue, const sal_Int32 _nBooleanComparisonMode, OUStringBuffer& _out_rSQLPredicate ) { switch ( _nBooleanComparisonMode ) diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 2dd7676dd275..f2fc329a0053 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -216,7 +216,7 @@ OUString createStandardCreateStatement(const Reference< XPropertySet >& descript descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= sSchema; descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= sTable; - sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); if ( sComposedName.isEmpty() ) ::dbtools::throwFunctionSequenceException(_xConnection); @@ -331,7 +331,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor, sSchema, sTable, ::dbtools::eInDataManipulation); - sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); if ( sComposedName.isEmpty() ) @@ -400,10 +400,10 @@ namespace const OUString& _aTable, const OUString& _rQueryName, const OUString& _rName, - sal_Bool _bCase, - sal_Bool _bQueryForInfo, - sal_Bool _bIsAutoIncrement, - sal_Bool _bIsCurrency, + bool _bCase, + bool _bQueryForInfo, + bool _bIsAutoIncrement, + bool _bIsCurrency, sal_Int32 _nDataType) { Reference<XPropertySet> xProp; @@ -525,10 +525,10 @@ namespace Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable, const Reference<XConnection>& _xConnection, const OUString& _rName, - sal_Bool _bCase, - sal_Bool _bQueryForInfo, - sal_Bool _bIsAutoIncrement, - sal_Bool _bIsCurrency, + bool _bCase, + bool _bQueryForInfo, + bool _bIsAutoIncrement, + bool _bIsCurrency, sal_Int32 _nDataType) { Reference<XPropertySet> xProp; @@ -629,9 +629,9 @@ bool getDataSourceSetting( const Reference< XInterface >& _rxDataSource, const s return getDataSourceSetting( _rxDataSource, sAsciiSettingsName,_rSettingsValue ); } -sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const OUString& _sProperty,sal_Bool _bDefault) +bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp, const OUString& _sProperty, bool _bDefault) { - sal_Bool bEnabled = _bDefault; + bool bEnabled = _bDefault; try { Reference< XPropertySet> xProp(findDataSource(_xProp),UNO_QUERY); diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 99ea133d7c5a..d70f014621bc 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -196,7 +196,7 @@ namespace dbtools { // get the number formats supplier of the connection of the form Reference< XConnection > xConnection( getConnection( i_rRowSet ), UNO_QUERY_THROW ); - Reference< XNumberFormatsSupplier > xSupplier( getNumberFormats( xConnection, sal_True, i_rContext ), UNO_SET_THROW ); + Reference< XNumberFormatsSupplier > xSupplier( getNumberFormats( xConnection, true, i_rContext ), UNO_SET_THROW ); // create a number formatter for it xNumberFormatter.set( NumberFormatter::create( i_rContext ), UNO_QUERY_THROW ); diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 8715ad5f32c1..03373a9b6762 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -116,7 +116,7 @@ namespace dbtools ); } - Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats( m_xConnection, sal_True ); + Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats( m_xConnection, true ); if ( !xNumberFormats.is() ) ::comphelper::disposeComponent( m_xFormatter ); else diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 7eea65f0cd8f..ff96a9abe38d 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -315,7 +315,7 @@ OUString OHSQLTable::getAlterTableColumnPart() { OUString sSql( "ALTER TABLE " ); - OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) ); + OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInTableDefinitions ) ); sSql += sComposedName; return sSql; @@ -386,9 +386,9 @@ void SAL_CALL OHSQLTable::rename( const OUString& newName ) throw(SQLException, ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); sSql += - ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInDataManipulation ) + ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInDataManipulation ) + " RENAME TO " - + ::dbtools::composeTableName( getMetaData(), sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ); + + ::dbtools::composeTableName( getMetaData(), sCatalog, sSchema, sTable, true, ::dbtools::eInDataManipulation ); executeStatement(sSql); diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index eed4ffa44d7b..abd6b81f406b 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -138,7 +138,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) aSql += "TABLE "; OUString sComposedName( - ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); + ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInDataManipulation ) ); aSql += sComposedName; Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index 786ee3a0d05e..defc31805a04 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -337,7 +337,7 @@ OUString OMySQLTable::getAlterTableColumnPart() OUString sSql( "ALTER TABLE " ); OUString sComposedName( - ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) ); + ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInTableDefinitions ) ); sSql += sComposedName; return sSql; diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index c48a998eaba7..1ac19ec7ba00 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -143,7 +143,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) aSql += "TABLE "; OUString sComposedName( - ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); + ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInDataManipulation ) ); aSql += sComposedName; Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 656ff23e5c10..d1afe3318db0 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -300,7 +300,7 @@ namespace sCatalog, sSchema, sName, - sal_False, + false, ::dbtools::eInDataManipulation ); } @@ -458,7 +458,7 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ aCatalog.hasValue() ? ::comphelper::getString(aCatalog) : OUString(), aSchema, aTableName, - sal_False, + false, ::dbtools::eInDataManipulation); // if there is no alias for the table name assign the orignal name to it diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx index c8fe7d1bc273..9af5e221e593 100644 --- a/connectivity/source/sdbcx/VCatalog.cxx +++ b/connectivity/source/sdbcx/VCatalog.cxx @@ -198,7 +198,7 @@ OUString OCatalog::buildName(const Reference< XRow >& _xRow) sTable = OUString(); OUString sComposedName( - ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ) ); + ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, false, ::dbtools::eInDataManipulation ) ); return sComposedName; } diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index fd647116518e..29bd8c167bdc 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -107,7 +107,7 @@ OUString SAL_CALL OView::getName() throw(::com::sun::star::uno::RuntimeException { OUString sComposedName; if(m_xMetaData.is()) - sComposedName = ::dbtools::composeTableName( m_xMetaData, m_CatalogName, m_SchemaName, m_Name, sal_False, ::dbtools::eInDataManipulation ); + sComposedName = ::dbtools::composeTableName( m_xMetaData, m_CatalogName, m_SchemaName, m_Name, false, ::dbtools::eInDataManipulation ); else { Any aValue; diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 0baf2d2cf77e..b3b7098e3b3f 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -147,7 +147,7 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL ,comphelper::getString(_xTable->getPropertyValue(PROPERTY_CATALOGNAME)) ,comphelper::getString(_xTable->getPropertyValue(PROPERTY_SCHEMANAME)) ,comphelper::getString(_xTable->getPropertyValue(PROPERTY_NAME)) - ,sal_True + ,true ,::dbtools::eInDataManipulation); } } diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 87f9de9cb37b..25c356b28c20 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -132,7 +132,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto _io_tableInfo.sComposedName = OptionalString( composeTableName( _metaData, *_io_tableInfo.sCatalog, *_io_tableInfo.sSchema, *_io_tableInfo.sName, - sal_False, ::dbtools::eInDataManipulation ) + false, ::dbtools::eInDataManipulation ) ); } } diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 2638f4497442..78f6a3754b45 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -197,7 +197,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, xTableProp->getPropertyValue( PROPERTY_CATALOGNAME )>>= sCatalog; xTableProp->getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema; xTableProp->getPropertyValue( PROPERTY_NAME ) >>= sTable; - sUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ); + sUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, false, ::dbtools::eInDataManipulation ); } ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sUpdateTableName,(*o_pKeyColumnNames),true); diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index d81cb19a3890..b80f9f93bbe8 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1696,7 +1696,7 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw() OUString aComposedUpdateTableName; if ( !m_aUpdateTableName.isEmpty() ) - aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, sal_False, ::dbtools::eInDataManipulation ); + aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::eInDataManipulation ); SAL_INFO("dbaccess", "ORowSet::execute_NoApprove_NoNewConn: creating cache" ); m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName, m_bModified, m_bNew,m_aParameterValueForCache,m_aFilter,m_nMaxRows ); @@ -2382,7 +2382,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw() xQuery->getPropertyValue(PROPERTY_UPDATE_SCHEMANAME) >>= aSchema; xQuery->getPropertyValue(PROPERTY_UPDATE_TABLENAME) >>= aTable; if(!aTable.isEmpty()) - m_aUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), aCatalog, aSchema, aTable, sal_False, ::dbtools::eInDataManipulation ); + m_aUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), aCatalog, aSchema, aTable, false, ::dbtools::eInDataManipulation ); } } else diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 65d862eb8fca..be208be92eb1 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -243,7 +243,7 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc m_aCurrentColumns.resize(4); m_aLocale = m_aParseContext.getPreferredLocale(); - m_xNumberFormatsSupplier = dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext ); + m_xNumberFormatsSupplier = dbtools::getNumberFormats( m_xConnection, true, m_aContext ); Reference< XLocaleData4 > xLocaleData( LocaleData::create(m_aContext) ); LocaleDataItem aData = xLocaleData->getLocaleItem(m_aLocale); m_sDecimalSep = aData.decimalSeparator; @@ -499,7 +499,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc { OUString aCatlog,aSchema,aTable; ::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation); - sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, sal_True, ::dbtools::eInDataManipulation ); + sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::eInDataManipulation ); } else if (!sTableName.isEmpty()) sTableName = ::dbtools::quoteName(aQuote,sTableName); @@ -1337,7 +1337,7 @@ OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet } else { - aComposedName = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, sal_False, ::dbtools::eInDataManipulation ); + aComposedName = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, false, ::dbtools::eInDataManipulation ); // Is this the right case for the table name? // Else, look for it with different case, if applicable. @@ -1370,7 +1370,7 @@ OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet } if(pBegin != pEnd) { - sReturn = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, sal_True, ::dbtools::eInDataManipulation ) + "."; + sReturn = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, true, ::dbtools::eInDataManipulation ) + "."; } } return sReturn; @@ -1595,7 +1595,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert { OUString aCatlog,aSchema,aTable; ::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation); - sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, sal_True, ::dbtools::eInDataManipulation ); + sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::eInDataManipulation ); } else sTableName = ::dbtools::quoteName(aQuote,sTableName); @@ -1630,7 +1630,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert case DataType::VARCHAR: case DataType::CHAR: case DataType::LONGVARCHAR: - aSQL.append( DBTypeConversion::toSQLString( nType, aValue, sal_True, m_xTypeConverter ) ); + aSQL.append( DBTypeConversion::toSQLString( nType, aValue, true, m_xTypeConverter ) ); break; case DataType::CLOB: { @@ -1645,7 +1645,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert } else { - aSQL.append( DBTypeConversion::toSQLString( nType, aValue, sal_True, m_xTypeConverter ) ); + aSQL.append( DBTypeConversion::toSQLString( nType, aValue, true, m_xTypeConverter ) ); } } break; @@ -1681,11 +1681,11 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert m_xTypeConverter->convertToSimpleType(aValue, TypeClass_BOOLEAN) >>= bValue; OUString sColumnExp = aSQL.makeStringAndClear(); - getBoleanComparisonPredicate( sColumnExp, bValue, m_nBoolCompareMode, aSQL ); + getBooleanComparisonPredicate( sColumnExp, bValue, m_nBoolCompareMode, aSQL ); } break; default: - aSQL.append( DBTypeConversion::toSQLString( nType, aValue, sal_True, m_xTypeConverter ) ); + aSQL.append( DBTypeConversion::toSQLString( nType, aValue, true, m_xTypeConverter ) ); break; } } diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index e1cf89c574f3..8c4e8fac59c2 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -237,7 +237,7 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const return NULL; OUString sComposedTableName = ::dbtools::composeTableName( - _rxConnection->getMetaData(), sCatalog, sSchema, sTable, sal_False, ::dbtools::eComplete ); + _rxConnection->getMetaData(), sCatalog, sSchema, sTable, false, ::dbtools::eComplete ); // retrieve the table in question Reference< XTablesSupplier > xSuppTables( _rxConnection, UNO_QUERY_THROW ); diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 083f5d2cb6be..e4feb8c481a5 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -371,7 +371,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) xTable->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema; xTable->getPropertyValue(PROPERTY_NAME) >>= sTable; - sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); OUString sType; xTable->getPropertyValue(PROPERTY_TYPE) >>= sType; diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index ad7047706e0a..270450edba13 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -181,7 +181,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) xTable->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema; xTable->getPropertyValue(PROPERTY_NAME) >>= sTable; - sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); } if(sComposedName.isEmpty()) diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 2fe85a47ad7d..8fde9e336416 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -2152,7 +2152,7 @@ void OApplicationController::renameEntry() OUString sCatalog = aDialog->getCatalog(); OUString sSchema = aDialog->getSchema(); - sNewName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, sal_False, ::dbtools::eInDataManipulation ); + sNewName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, false, ::dbtools::eInDataManipulation ); } else sNewName = aDialog->getName(); diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 104984a04a4a..8decf1d74f80 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -628,7 +628,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc sDefaultName = sDefaultName.getToken( 0, ' ' ); Reference< XNameAccess > xQueries( getQueryDefintions(), UNO_QUERY_THROW ); - sTargetName = ::dbtools::createUniqueName( xQueries, sDefaultName, sal_False ); + sTargetName = ::dbtools::createUniqueName( xQueries, sDefaultName, false ); } } catch(const Exception&) diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 55aa16f81cca..c3dd2ba6e029 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -144,7 +144,7 @@ void OApplicationController::convertToView(const OUString& _sName) OUString sCatalog = aDlg.getCatalog(); OUString sSchema = aDlg.getSchema(); OUString sNewName( - ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, sal_False, ::dbtools::eInTableDefinitions ) ); + ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, false, ::dbtools::eInTableDefinitions ) ); Reference<XPropertySet> xView = ::dbaui::createView(sNewName,xConnection,xSourceObject); if ( !xView.is() ) throw SQLException(OUString(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*this,OUString( "S1000" ) ,0,Any()); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 0f8ec0749257..a7752d017e37 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -684,7 +684,7 @@ void SbaXDataBrowserController::initFormatter() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::initFormatter" ); // create a formatter working with the connections format supplier - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), true, getORB())); if(xSupplier.is()) { @@ -1877,7 +1877,7 @@ void SbaXDataBrowserController::ExecuteSearch() xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(true)); xModelSet->setPropertyValue("CursorColor", makeAny(sal_Int32(COL_LIGHTRED))); - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), true, getORB())); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); AbstractFmSearchDialog* pDialog = NULL; diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 64994cc88ef1..4186ab4bd081 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -761,7 +761,7 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() { - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::dbtools::getNumberFormats(::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)), sal_True, getContext()); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::dbtools::getNumberFormats(::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)), true, getContext()); SvNumberFormatsSupplierObj* pSupplierImpl = SvNumberFormatsSupplierObj::getImplementation( xSupplier ); if ( !pSupplierImpl ) diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 7e08c5df71ae..fc4036bd600d 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -93,7 +93,7 @@ Reference< XNumberFormatter > OColumnControlWindow::GetFormatter() const if ( !m_xFormatter.is() ) try { - Reference< XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(m_xConnection, sal_True, m_xContext)); + Reference< XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(m_xConnection, true, m_xContext)); if ( xSupplier.is() ) { diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 830139fabf44..c79b8bd8cf99 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -579,7 +579,7 @@ OUString OTableTreeListBox::getQualifiedTableName( SvTreeListEntry* _pEntry ) co } sTable = GetEntryText( _pEntry ); - return ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ); + return ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sTable, false, ::dbtools::eInDataManipulation ); } catch( const Exception& ) { diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 59c32bca0747..df32b01ca670 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -122,7 +122,7 @@ OUString TableListFacade::getSelectedName( OUString& _out_rAliasName ) const } aComposedName = ::dbtools::composeTableName( - xMeta, aCatalog, aSchema, aTableName, sal_False, ::dbtools::eInDataManipulation ); + xMeta, aCatalog, aSchema, aTableName, false, ::dbtools::eInDataManipulation ); } catch ( const Exception& ) { diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 59038c2f8297..7067e37f7ede 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -790,7 +790,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(getORB()) ); INetURLObject aURL( _sPath ); OUString sFilename = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - OUString sDatabaseName = ::dbtools::createUniqueName(xDatabaseContext, sFilename,sal_False); + OUString sDatabaseName = ::dbtools::createUniqueName(xDatabaseContext, sFilename, false); xDatabaseContext->registerObject(sDatabaseName, xDatasource); } diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index f67d2b6f4ab6..9f21fbe4e6ca 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -303,7 +303,7 @@ IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton) getCatalog(), getSchema(), sNameToCheck, - sal_False, // no quoting + false, // no quoting ::dbtools::eInDataManipulation ); } diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 417c07d98851..94030cd30039 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -74,7 +74,7 @@ namespace dbaui OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!"); } - Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats(m_xConnection, sal_True); + Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats(m_xConnection, true); if (!xNumberFormats.is()) ::comphelper::disposeComponent(m_xFormatter); else diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 65bab4691e30..d6825305ce9f 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -314,7 +314,7 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom // e.g. <schema>.<table> becomes "<schema>"."<table>" OUString aCatlog,aSchema,aTable; ::dbtools::qualifiedNameComponents( m_xMetaData, sTableName, aCatlog, aSchema, aTable, ::dbtools::eInDataManipulation ); - sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, sal_True, ::dbtools::eInDataManipulation ); + sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::eInDataManipulation ); } } xColumn->getPropertyValue(PROPERTY_REALNAME) >>= _rFilter.Name; diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx index 86b65bba3c2a..68dc816753e3 100644 --- a/dbaccess/source/ui/inc/charsets.hxx +++ b/dbaccess/source/ui/inc/charsets.hxx @@ -58,7 +58,7 @@ namespace dbaui sal_Int32 size() const { return OCharsetDisplay_Base::size(); } protected: - virtual sal_Bool approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const SAL_OVERRIDE; + virtual bool approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const SAL_OVERRIDE; private: using OCharsetDisplay_Base::find; diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 3bbac2950ccd..75c70f93813b 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -695,7 +695,7 @@ OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const { sSchema = _xMetaData->getUserName(); } - sCompsedName = ::dbtools::composeTableName( _xMetaData, sCatalog, sSchema, _sName, sal_False, ::dbtools::eInDataManipulation ); + sCompsedName = ::dbtools::composeTableName( _xMetaData, sCatalog, sSchema, _sName, false, ::dbtools::eInDataManipulation ); sDefaultName = ::dbtools::createUniqueName(_xTables,sCompsedName); } catch(const SQLException&) @@ -1495,7 +1495,7 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >& try { - Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(_rxConnection, sal_True, _rxContext)); + Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(_rxConnection, true, _rxContext)); if ( xSupplier.is() ) { diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index b18fce15e542..4f67b8610165 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -543,7 +543,7 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultN if ( _xSourceConnection == m_xDestConnection ) { Reference< XTablesSupplier > xSup( m_xDestConnection, UNO_QUERY_THROW ); - m_sName = ::dbtools::createUniqueName( xSup->getTables(), sInitialTableName, sal_False ); + m_sName = ::dbtools::createUniqueName( xSup->getTables(), sInitialTableName, false ); } else m_sName = sInitialTableName; @@ -582,7 +582,7 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultN sTable, ::dbtools::eInDataManipulation); - m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,sal_False,::dbtools::eInTableDefinitions); + m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,false,::dbtools::eInTableDefinitions); } OCopyTable* pPage1( new OCopyTable( this ) ); @@ -1564,7 +1564,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName) OUString sName = _sName; Sequence< OUString > aColumnNames( m_rSourceObject.getColumnNames() ); if ( aColumnNames.getLength() ) - sName = ::dbtools::createUniqueName( aColumnNames, sName, sal_False ); + sName = ::dbtools::createUniqueName( aColumnNames, sName, false ); else { if ( m_vSourceColumns.find(sName) != m_vSourceColumns.end()) diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index 593c6fb0f5a5..dd7f90c331ba 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -39,13 +39,13 @@ namespace dbaui } } - sal_Bool OCharsetDisplay::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const + bool OCharsetDisplay::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const { if ( !OCharsetMap::approveEncoding( _eEncoding, _rInfo ) ) - return sal_False; + return false; if ( RTL_TEXTENCODING_DONTKNOW == _eEncoding ) - return sal_True; + return true; return !GetTextString(_eEncoding).isEmpty(); } diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 5117ec3c231e..23d444343d1e 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -124,7 +124,7 @@ namespace frm { // we can create one from the connection, if it's an SDB connection - Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, m_xContext ); + Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, true, m_xContext ); if ( xFormatSupplier.is() ) { @@ -302,7 +302,7 @@ namespace frm bool bSelected = ( rEvent.Selected == TRISTATE_TRUE ); OUString sExpressionMarker( "$expression$" ); - ::dbtools::getBoleanComparisonPredicate( + ::dbtools::getBooleanComparisonPredicate( sExpressionMarker, bSelected, nBooleanComparisonMode, diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 289fc3d418a1..f39db452873e 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -529,7 +529,7 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co Reference< XRowSet > xRowSet( xNextParentForm, UNO_QUERY ); Reference< XNumberFormatsSupplier > xSupplier; if (xRowSet.is()) - xSupplier = getNumberFormats( getConnection(xRowSet), sal_True, getContext() ); + xSupplier = getNumberFormats( getConnection(xRowSet), true, getContext() ); return xSupplier; } diff --git a/include/connectivity/conncleanup.hxx b/include/connectivity/conncleanup.hxx index ea271b308a0d..265f058e25bf 100644 --- a/include/connectivity/conncleanup.hxx +++ b/include/connectivity/conncleanup.hxx @@ -43,8 +43,8 @@ namespace dbtools ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xOriginalConnection; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet; // needed to add as listener - sal_Bool m_bRSListening : 1; // true when we're listening on rowset - sal_Bool m_bPropertyListening : 1; // true when we're listening for property changes + bool m_bRSListening : 1; // true when we're listening on rowset + bool m_bPropertyListening : 1; // true when we're listening for property changes public: /** constructs an object @@ -74,11 +74,11 @@ namespace dbtools void startRowSetListening(); void stopRowSetListening(); - sal_Bool isRowSetListening() const { return m_bRSListening; } + bool isRowSetListening() const { return m_bRSListening; } void startPropertyListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxProps ); void stopPropertyListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxEventSource ); - sal_Bool isPropertyListening() const { return m_bPropertyListening; } + bool isPropertyListening() const { return m_bPropertyListening; } }; diff --git a/include/connectivity/dbcharset.hxx b/include/connectivity/dbcharset.hxx index 09ac780ff0d7..9046686ce0a6 100644 --- a/include/connectivity/dbcharset.hxx +++ b/include/connectivity/dbcharset.hxx @@ -91,7 +91,7 @@ namespace dbtools void lateConstruct(); inline void ensureConstructed( ) const { if ( m_aEncodings.empty() ) const_cast< OCharsetMap* >( this )->lateConstruct(); } - virtual sal_Bool approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const; + virtual bool approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const; }; diff --git a/include/connectivity/dbconversion.hxx b/include/connectivity/dbconversion.hxx index 887147b48048..62ec97f69f3e 100644 --- a/include/connectivity/dbconversion.hxx +++ b/include/connectivity/dbconversion.hxx @@ -142,7 +142,7 @@ namespace dbtools // return the DateTime in the format %04d-%02d-%02d %02d:%02d:%02d.%09d static OUString toDateTimeString(const ::com::sun::star::util::DateTime& _rDateTime); // return the any in an sql standard format - static OUString toSQLString(sal_Int32 eType, const ::com::sun::star::uno::Any& _rVal, sal_Bool bQuote, + static OUString toSQLString(sal_Int32 eType, const ::com::sun::star::uno::Any& _rVal, bool bQuote, const ::com::sun::star::uno::Reference< ::com::sun::star::script::XTypeConverter >& _rxTypeConverter); /** converts a Unicode string into a 8-bit string, using the given encoding diff --git a/include/connectivity/dbexception.hxx b/include/connectivity/dbexception.hxx index 9882d7ef8492..74b548c96289 100644 --- a/include/connectivity/dbexception.hxx +++ b/include/connectivity/dbexception.hxx @@ -127,9 +127,9 @@ public: const SQLExceptionInfo& operator=(const ::com::sun::star::sdb::SQLErrorEvent& _rErrorEvent); const SQLExceptionInfo& operator=(const ::com::sun::star::uno::Any& _rCaughtSQLException); - sal_Bool isKindOf(TYPE _eType) const; + bool isKindOf(TYPE _eType) const; // not just a simple comparisation ! e.g. getType() == SQL_CONTEXT implies isKindOf(SQL_EXCEPTION) == sal_True ! - sal_Bool isValid() const { return m_eType != UNDEFINED; } + bool isValid() const { return m_eType != UNDEFINED; } TYPE getType() const { return m_eType; } operator const ::com::sun::star::sdbc::SQLException* () const; @@ -177,7 +177,7 @@ public: /** determines whether there are more elements in the exception chain */ - sal_Bool hasMoreElements() const { return ( m_pCurrent != NULL ); } + bool hasMoreElements() const { return ( m_pCurrent != NULL ); } /** returns the type of the current element in the exception chain */ diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx index 531a4b5d8a09..2e1a8fadd3f1 100644 --- a/include/connectivity/dbtools.hxx +++ b/include/connectivity/dbtools.hxx @@ -104,7 +104,7 @@ namespace dbtools OOO_DLLPUBLIC_DBTOOLS sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType, sal_Int32 _nScale, - sal_Bool _bIsCurrency, + bool _bIsCurrency, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _xTypes, const ::com::sun::star::lang::Locale& _rLocale); @@ -340,9 +340,9 @@ namespace dbtools instead of spreading this knowledge through all callers. */ OOO_DLLPUBLIC_DBTOOLS - sal_Bool isDataSourcePropertyEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xProp - ,const OUString& _sProperty, - sal_Bool _bDefault = sal_False); + bool isDataSourcePropertyEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xProp, + const OUString& _sProperty, + bool _bDefault = false); /** retrieves a particular indirect data source setting @@ -405,7 +405,7 @@ namespace dbtools */ OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn, - sal_Bool _bAllowDefault = sal_False, + bool _bAllowDefault = false, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>() ); @@ -436,15 +436,15 @@ namespace dbtools /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT @param _rxCursorSet the property set */ - OOO_DLLPUBLIC_DBTOOLS sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet); + OOO_DLLPUBLIC_DBTOOLS bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet); /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE @param _rxCursorSet the property set */ - OOO_DLLPUBLIC_DBTOOLS sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet); + OOO_DLLPUBLIC_DBTOOLS bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet); /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE @param _rxCursorSet the property set */ - OOO_DLLPUBLIC_DBTOOLS sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet); + OOO_DLLPUBLIC_DBTOOLS bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet); /** compose a complete table name from it's up to three parts, regarding to the database meta data composing rules @@ -453,7 +453,7 @@ namespace dbtools const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName, - sal_Bool _bQuote, + bool _bQuote, EComposeRule _eComposeRule); /** composes a table name for usage in a SELECT statement @@ -512,14 +512,14 @@ namespace dbtools OOO_DLLPUBLIC_DBTOOLS OUString createUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxContainer, const OUString& _rBaseName, - sal_Bool _bStartWithNumber = sal_True); + bool _bStartWithNumber = true); /** creates a unique name which is not already used in the given name array */ OOO_DLLPUBLIC_DBTOOLS OUString createUniqueName( const ::com::sun::star::uno::Sequence< OUString >& _rNames, const OUString& _rBaseName, - sal_Bool _bStartWithNumber = sal_True + bool _bStartWithNumber = true ); /** create a name which is a valid SQL 92 identifier name @@ -537,7 +537,7 @@ namespace dbtools @see convertName2SQLName */ - OOO_DLLPUBLIC_DBTOOLS sal_Bool isValidSQLName( const OUString& _rName, const OUString& _rSpecials ); + OOO_DLLPUBLIC_DBTOOLS bool isValidSQLName( const OUString& _rName, const OUString& _rSpecials ); OOO_DLLPUBLIC_DBTOOLS void showError( const SQLExceptionInfo& _rInfo, @@ -714,10 +714,10 @@ namespace dbtools createSDBCXColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, const OUString& _rName, - sal_Bool _bCase, - sal_Bool _bQueryForInfo = sal_True, - sal_Bool _bIsAutoIncrement = sal_False, - sal_Bool _bIsCurrency = sal_False, + bool _bCase, + bool _bQueryForInfo = true, + bool _bIsAutoIncrement = false, + bool _bIsCurrency = false, sal_Int32 _nDataType = com::sun::star::sdbc::DataType::OTHER); /** tries to locate the corresponding DataDefinitionSupplier for the given url and connection @@ -751,7 +751,7 @@ namespace dbtools const OUString& _sSchema, const OUString& _sTable); - typedef ::std::pair<sal_Bool,sal_Bool> TBoolPair; + typedef ::std::pair<bool,bool> TBoolPair; typedef ::std::pair< TBoolPair,sal_Int32 > ColumnInformation; typedef ::std::multimap< OUString, ColumnInformation, ::comphelper::UStringMixLess> ColumnInformationMap; /** collects the information about auto increment, currency and data type for the given column name. @@ -784,9 +784,9 @@ namespace dbtools @param _out_rSQLPredicate the buffer to which the comparison predicate will be appended */ - OOO_DLLPUBLIC_DBTOOLS void getBoleanComparisonPredicate( + OOO_DLLPUBLIC_DBTOOLS void getBooleanComparisonPredicate( const OUString& _rExpression, - const sal_Bool _bValue, + const bool _bValue, const sal_Int32 _nBooleanComparisonMode, OUStringBuffer& _out_rSQLPredicate ); |