diff options
-rw-r--r-- | connectivity/source/commontools/TColumnsHelper.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VCollection.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/HelperCollections.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationController.cxx | 2 | ||||
-rw-r--r-- | include/comphelper/stl_types.hxx | 4 |
12 files changed, 21 insertions, 21 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index b346b5a23236..ed0a5f0e54a9 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -43,7 +43,7 @@ namespace connectivity { public: explicit OColumnsHelperImpl(bool _bCase) - : m_aColumnInfo(_bCase) + : m_aColumnInfo(UStringMixLess(_bCase)) { } ColumnInformationMap m_aColumnInfo; diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 8590878dbcf6..c85a5440238f 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -439,7 +439,7 @@ namespace OUString sQuotedName = ::dbtools::quoteName(sQuote,_rName); OUString sComposedName = composeTableNameForSelect(_xConnection, getString( _aCatalog ), _aSchema, _aTable ); - ColumnInformationMap aInfo(_bCase); + ColumnInformationMap aInfo((UStringMixLess(_bCase))); collectColumnInformation(_xConnection,sComposedName,sQuotedName,aInfo); ColumnInformationMap::const_iterator aIter = aInfo.begin(); if ( aIter != aInfo.end() ) diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index e0db07e9bbe8..626d9cab112b 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -84,8 +84,8 @@ namespace connectivity m_xDatabaseMetaData = m_xConnection->getMetaData(); m_bIsCaseSensitive = m_xDatabaseMetaData.is() && m_xDatabaseMetaData->supportsMixedCaseQuotedIdentifiers(); - m_pTables = std::make_shared<OSQLTables>( m_bIsCaseSensitive ); - m_pSubTables = std::make_shared<OSQLTables>( m_bIsCaseSensitive ); + m_pTables = std::make_shared<OSQLTables>( UStringMixLess(m_bIsCaseSensitive) ); + m_pSubTables = std::make_shared<OSQLTables>( UStringMixLess(m_bIsCaseSensitive) ); m_xTableContainer = _rxTables; diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index e6671d4598a1..2f61b5ef0f3e 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -60,7 +60,7 @@ namespace ObjectMap m_aNameMap; // hold the elements and a name public: OHardRefMap(bool _bCase) - : m_aNameMap(_bCase) + : m_aNameMap(::comphelper::UStringMixLess(_bCase)) { } diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx index 2a04b632a7ce..503c12c93a1b 100644 --- a/dbaccess/source/core/api/HelperCollections.cxx +++ b/dbaccess/source/core/api/HelperCollections.cxx @@ -75,9 +75,9 @@ namespace dbaccess { if ( m_aColumns.is() ) { - ::connectivity::OSQLColumns::Vector::const_iterator aIter = find(m_aColumns->begin(),m_aColumns->end(),_rName,isCaseSensitive()); + ::connectivity::OSQLColumns::Vector::const_iterator aIter = find(m_aColumns->begin(),m_aColumns->end(),_rName,UStringMixEqual(isCaseSensitive())); if(aIter == m_aColumns->end()) - aIter = findRealName(m_aColumns->begin(),m_aColumns->end(),_rName,isCaseSensitive()); + aIter = findRealName(m_aColumns->begin(),m_aColumns->end(),_rName,UStringMixEqual(isCaseSensitive())); if(aIter != m_aColumns->end()) return connectivity::sdbcx::ObjectType(*aIter,UNO_QUERY); diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 0b5455817154..804a400f5067 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -136,10 +136,10 @@ void OKeySet::initColumns() { Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); bool bCase = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(); - m_pKeyColumnNames.reset( new SelectColumnsMetaData(bCase) ); - m_pColumnNames.reset( new SelectColumnsMetaData(bCase) ); - m_pParameterNames.reset( new SelectColumnsMetaData(bCase) ); - m_pForeignColumnNames.reset( new SelectColumnsMetaData(bCase) ); + m_pKeyColumnNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) ); + m_pColumnNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) ); + m_pParameterNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) ); + m_pForeignColumnNames.reset( new SelectColumnsMetaData(comphelper::UStringMixLess(bCase)) ); } void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 946ec3f67a95..bce7454aea8a 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -98,7 +98,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const OU const Reference<XNameAccess> xTables = xTabSup->getTables(); for (auto& tableName : xTables->getElementNames()) { - std::unique_ptr<SelectColumnsMetaData> pKeyColumNames(new SelectColumnsMetaData(bCase)); + std::unique_ptr<SelectColumnsMetaData> pKeyColumNames(new SelectColumnsMetaData(comphelper::UStringMixLess(bCase))); findTableColumnsMatching_throw(xTables->getByName(tableName),tableName,xMeta,xQueryColumns,pKeyColumNames); m_pKeyColumnNames->insert(pKeyColumNames->begin(),pKeyColumNames->end()); } diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 086e7a055201..220d4f6d5b2a 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -203,7 +203,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, { Reference<XNameAccess> xSelColumns = xColSup->getColumns(); Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData(); - SelectColumnsMetaData aColumnNames(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()); + SelectColumnsMetaData aColumnNames(comphelper::UStringMixLess(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers())); ::dbaccess::getColumnPositions(xSelColumns,xPrimaryKeyColumns->getElementNames(),aUpdateTableName,aColumnNames); bAllKeysFound = !aColumnNames.empty() && aColumnNames.size() == o3tl::make_unsigned(xPrimaryKeyColumns->getElementNames().getLength()); } @@ -269,7 +269,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, else { Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData(); - SelectColumnsMetaData aColumnNames(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()); + SelectColumnsMetaData aColumnNames(comphelper::UStringMixLess(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers())); Reference<XColumnsSupplier> xColSup(_xAnalyzer,UNO_QUERY); Reference<XNameAccess> xSelColumns = xColSup->getColumns(); Reference<XNameAccess> xColumns = m_aUpdateTable->getColumns(); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index b1ac9f92885b..b60fe1bb2619 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -76,7 +76,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, bool _bAutoIncrementEnabled, SvStream& _rInputStream) :m_vColumnPositions(std::move(_rColumnPositions)) - ,m_aDestColumns(true) + ,m_aDestColumns(comphelper::UStringMixLess(true)) ,m_xFormatter(_rxNumberF) ,m_xContext(_rxContext) ,m_pFormatter(nullptr) @@ -125,7 +125,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, const Reference< XNumberFormatter >& _rxNumberF, const Reference< css::uno::XComponentContext >& _rxContext, SvStream& _rInputStream) - :m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) + :m_aDestColumns(comphelper::UStringMixLess(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())) ,m_xConnection(_rxConnection) ,m_xFormatter(_rxNumberF) ,m_xContext(_rxContext) diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index c13bb1844712..7825c1af26c8 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -481,7 +481,7 @@ OCopyTableWizard::OCopyTableWizard(weld::Window* pParent, const OUString& _rDefa const Reference< XConnection >& _xConnection, const Reference< XComponentContext >& _rxContext, const Reference< XInteractionHandler>& _xInteractionHandler) : vcl::RoadmapWizardMachine(pParent) - , m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) + , m_mNameMapping(comphelper::UStringMixLess(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())) , m_xDestConnection( _xConnection ) , m_rSourceObject( _rSourceObject ) , m_xFormatter( getNumberFormatter( _xConnection, _rxContext ) ) @@ -584,7 +584,7 @@ OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, OUString _sDefaultNam TypeSelectionPageFactory _pTypeSelectionPageFactory, SvStream& _rTypeSelectionPageArg, const Reference< XComponentContext >& _rxContext ) : vcl::RoadmapWizardMachine(pParent) , m_vSourceColumns(std::move(_rSourceColumns)) - , m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) + , m_mNameMapping(comphelper::UStringMixLess(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())) , m_xDestConnection( _xConnection ) , m_rSourceObject( DummyCopySource::Instance() ) , m_xFormatter(_xFormatter) diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index b4db31b52923..7cab45c54d55 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -254,7 +254,7 @@ namespace ,const Sequence< OUString>& _aTableList ,const sal_Int32 _nStartIndex ,const sal_Int32 _nEndIndex) - :m_aTableData(_xMetaData.is() && _xMetaData->supportsMixedCaseQuotedIdentifiers()) + :m_aTableData(comphelper::UStringMixLess(_xMetaData.is() && _xMetaData->supportsMixedCaseQuotedIdentifiers())) ,m_aTableList(_aTableList) ,m_pParent(_pParent) ,m_xMetaData(_xMetaData) diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx index b44bd6a06bcb..9c7dfd4f08d8 100644 --- a/include/comphelper/stl_types.hxx +++ b/include/comphelper/stl_types.hxx @@ -38,7 +38,7 @@ struct UStringMixLess private: bool m_bCaseSensitive; public: - UStringMixLess(bool bCaseSensitive = true):m_bCaseSensitive(bCaseSensitive){} + explicit UStringMixLess(bool bCaseSensitive = true):m_bCaseSensitive(bCaseSensitive){} bool operator() (std::u16string_view x, std::u16string_view y) const { if (m_bCaseSensitive) @@ -55,7 +55,7 @@ class UStringMixEqual bool const m_bCaseSensitive; public: - UStringMixEqual(bool bCaseSensitive = true):m_bCaseSensitive(bCaseSensitive){} + explicit UStringMixEqual(bool bCaseSensitive = true):m_bCaseSensitive(bCaseSensitive){} bool operator() (std::u16string_view lhs, std::u16string_view rhs) const { return m_bCaseSensitive ? lhs == rhs : o3tl::equalsIgnoreAsciiCase( lhs, rhs ); |