diff options
Diffstat (limited to 'connectivity/source/drivers')
7 files changed, 12 insertions, 12 deletions
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index 4c9446348681..7f196bed35e7 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx @@ -40,7 +40,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData() void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) { - static const OUStringLiteral aName = u"Name"; + static constexpr OUStringLiteral aName = u"Name"; for (const auto& rxColumn : *xColumns) { diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 6a247ee8f41e..2fffb76f78e3 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -165,7 +165,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( // check if any type is given // when no types are given then we have to return all tables e.g. TABLE - static const OUStringLiteral aTable = u"TABLE"; + static constexpr OUStringLiteral aTable = u"TABLE"; bool bTableFound = true; sal_Int32 nLength = types.getLength(); diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index 6adeb7207ecf..55e149e9de5c 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -45,11 +45,11 @@ using namespace connectivity::firebird; // Static const variables namespace { -const OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP"; -const OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK"; -const OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG"; +constexpr OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP"; +constexpr OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK"; +constexpr OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG"; #ifdef MACOSX -const OUStringLiteral our_sFirebirdLibVar = u"LIBREOFFICE_FIREBIRD_LIB"; +constexpr OUStringLiteral our_sFirebirdLibVar = u"LIBREOFFICE_FIREBIRD_LIB"; #endif }; diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index cf0b549b11aa..e3cd11cabb90 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -699,7 +699,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass) { - static const OUStringLiteral s_sNodeName + static constexpr OUStringLiteral s_sNodeName = u"org.openoffice.Office.DataAccess/JDBC/DriverClassPaths"; ::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext( m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index bc88b2360bd8..540e333aa639 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -739,7 +739,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) static ODatabaseMetaDataResultSet::ORows aRows = [&] { - static const OUStringLiteral aTable = u"TABLE"; + static constexpr OUStringLiteral aTable = u"TABLE"; ODatabaseMetaDataResultSet::ORows tmp; ODatabaseMetaDataResultSet::ORow aRow(2); aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); @@ -925,7 +925,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( // check whether we have tables in the requested types // for the moment, we answer only the "TABLE" table type // when no types are given at all, we return all the tables - static const OUStringLiteral aTable = u"TABLE"; + static constexpr OUStringLiteral aTable = u"TABLE"; bool bTableFound = false; const OUString* p = types.getConstArray(), * pEnd = p + types.getLength(); diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx index eed17c553a72..d0ed7298f92b 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx @@ -43,7 +43,7 @@ MacabResultSetMetaData::~MacabResultSetMetaData() void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) { - static const OUStringLiteral aName = u"Name"; + static constexpr OUStringLiteral aName = u"Name"; MacabRecords *aRecords; MacabHeader *aHeader; diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 28cb14faa981..777f4712ce96 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -1090,9 +1090,9 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& cat // E.g. psqlodbc up to at least version 09.01.0100 segfaults if (table.empty()) { - static const OUStringLiteral errMsg + static constexpr OUStringLiteral errMsg = u"ODBC: Trying to get special columns of empty table name"; - static const OUStringLiteral SQLState = u"HY009"; + static constexpr OUStringLiteral SQLState = u"HY009"; throw SQLException( errMsg, *this, SQLState, -1, Any() ); } |