From 4d97239b7a92c8dc1c1ee9a6474768ed1e744ef5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 6 May 2024 18:31:04 +0200 Subject: loplugin:ostr in connectivity Change-Id: Ice633719b05240ab5a052b62ca4eafe89f97e12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167238 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../qa/connectivity/commontools/FValue_test.cxx | 12 +- .../connectivity/resource/sharedresources_test.cxx | 22 +-- connectivity/source/commontools/BlobHelper.cxx | 4 +- connectivity/source/commontools/CommonTools.cxx | 2 +- .../source/commontools/ConnectionWrapper.cxx | 4 +- connectivity/source/commontools/DateConversion.cxx | 6 +- connectivity/source/commontools/DriversConfig.cxx | 8 +- .../commontools/FDatabaseMetaDataResultSet.cxx | 22 +-- .../FDatabaseMetaDataResultSetMetaData.cxx | 214 ++++++++++----------- .../source/commontools/ParameterSubstitution.cxx | 6 +- .../source/commontools/TDatabaseMetaDataBase.cxx | 2 +- connectivity/source/commontools/TIndexes.cxx | 2 +- connectivity/source/commontools/TKeys.cxx | 2 +- .../source/commontools/TPrivilegesResultSet.cxx | 6 +- connectivity/source/commontools/TTableHelper.cxx | 12 +- connectivity/source/commontools/dbexception.cxx | 24 +-- connectivity/source/commontools/dbmetadata.cxx | 18 +- connectivity/source/commontools/dbtools.cxx | 58 +++--- connectivity/source/commontools/dbtools2.cxx | 22 +-- .../source/commontools/formattedcolumnvalue.cxx | 4 +- connectivity/source/commontools/parameters.cxx | 6 +- connectivity/source/commontools/paramwrapper.cxx | 8 +- connectivity/source/commontools/predicateinput.cxx | 8 +- .../source/commontools/statementcomposer.cxx | 12 +- connectivity/source/cpool/ZConnectionWrapper.cxx | 2 +- connectivity/source/cpool/ZPoolCollection.cxx | 8 +- connectivity/source/drivers/calc/CCatalog.cxx | 2 +- connectivity/source/drivers/calc/CConnection.cxx | 6 +- .../source/drivers/calc/CDatabaseMetaData.cxx | 6 +- connectivity/source/drivers/calc/CDriver.cxx | 2 +- connectivity/source/drivers/calc/CTable.cxx | 10 +- connectivity/source/drivers/calc/CTables.cxx | 2 +- .../source/drivers/component/CDatabaseMetaData.cxx | 16 +- .../drivers/component/CPreparedStatement.cxx | 2 +- .../source/drivers/component/CResultSet.cxx | 6 +- .../source/drivers/component/CStatement.cxx | 4 +- connectivity/source/drivers/dbase/DCatalog.cxx | 2 +- connectivity/source/drivers/dbase/DConnection.cxx | 4 +- .../source/drivers/dbase/DDatabaseMetaData.cxx | 50 ++--- connectivity/source/drivers/dbase/DDriver.cxx | 20 +- connectivity/source/drivers/dbase/DIndex.cxx | 2 +- .../source/drivers/dbase/DPreparedStatement.cxx | 5 +- connectivity/source/drivers/dbase/DResultSet.cxx | 6 +- connectivity/source/drivers/dbase/DStatement.cxx | 2 +- connectivity/source/drivers/dbase/DTable.cxx | 14 +- connectivity/source/drivers/dbase/DTables.cxx | 4 +- connectivity/source/drivers/evoab2/NCatalog.cxx | 4 +- connectivity/source/drivers/evoab2/NConnection.cxx | 16 +- .../source/drivers/evoab2/NDatabaseMetaData.cxx | 20 +- connectivity/source/drivers/evoab2/NDriver.cxx | 2 +- .../source/drivers/evoab2/NPreparedStatement.cxx | 46 ++--- connectivity/source/drivers/evoab2/NResultSet.cxx | 38 ++-- connectivity/source/drivers/evoab2/NStatement.cxx | 4 +- connectivity/source/drivers/evoab2/NTable.cxx | 2 +- connectivity/source/drivers/evoab2/NTables.cxx | 8 +- connectivity/source/drivers/file/FCatalog.cxx | 2 +- connectivity/source/drivers/file/FConnection.cxx | 14 +- .../source/drivers/file/FDatabaseMetaData.cxx | 14 +- connectivity/source/drivers/file/FDriver.cxx | 38 ++-- .../source/drivers/file/FPreparedStatement.cxx | 12 +- connectivity/source/drivers/file/FResultSet.cxx | 4 +- connectivity/source/drivers/file/FStatement.cxx | 2 +- connectivity/source/drivers/file/FTable.cxx | 2 +- connectivity/source/drivers/firebird/Blob.cxx | 6 +- connectivity/source/drivers/firebird/Catalog.cxx | 10 +- connectivity/source/drivers/firebird/Clob.cxx | 12 +- connectivity/source/drivers/firebird/Column.cxx | 2 +- .../source/drivers/firebird/Connection.cxx | 14 +- .../source/drivers/firebird/DatabaseMetaData.cxx | 96 ++++----- connectivity/source/drivers/firebird/Driver.cxx | 6 +- .../source/drivers/firebird/PreparedStatement.cxx | 14 +- connectivity/source/drivers/firebird/ResultSet.cxx | 30 +-- .../source/drivers/firebird/ResultSetMetaData.cxx | 2 +- connectivity/source/drivers/firebird/Statement.cxx | 2 +- connectivity/source/drivers/firebird/Table.cxx | 32 +-- connectivity/source/drivers/firebird/Tables.cxx | 6 +- connectivity/source/drivers/firebird/Util.cxx | 46 ++--- connectivity/source/drivers/firebird/Views.cxx | 2 +- connectivity/source/drivers/flat/ECatalog.cxx | 2 +- connectivity/source/drivers/flat/EConnection.cxx | 4 +- .../source/drivers/flat/EDatabaseMetaData.cxx | 24 +-- connectivity/source/drivers/flat/EDriver.cxx | 32 +-- .../source/drivers/flat/EPreparedStatement.cxx | 5 +- connectivity/source/drivers/flat/EResultSet.cxx | 4 +- connectivity/source/drivers/flat/EStatement.cxx | 2 +- connectivity/source/drivers/flat/ETable.cxx | 2 +- connectivity/source/drivers/flat/ETables.cxx | 2 +- connectivity/source/drivers/hsqldb/HCatalog.cxx | 10 +- connectivity/source/drivers/hsqldb/HColumns.cxx | 2 +- connectivity/source/drivers/hsqldb/HConnection.cxx | 10 +- connectivity/source/drivers/hsqldb/HDriver.cxx | 71 ++++--- connectivity/source/drivers/hsqldb/HStorageMap.cxx | 4 +- connectivity/source/drivers/hsqldb/HTable.cxx | 4 +- connectivity/source/drivers/hsqldb/HTables.cxx | 4 +- connectivity/source/drivers/hsqldb/HUser.cxx | 4 +- connectivity/source/drivers/hsqldb/HUsers.cxx | 2 +- connectivity/source/drivers/hsqldb/HViews.cxx | 2 +- connectivity/source/drivers/jdbc/Blob.cxx | 2 +- .../source/drivers/jdbc/CallableStatement.cxx | 2 +- connectivity/source/drivers/jdbc/Clob.cxx | 2 +- .../source/drivers/jdbc/DatabaseMetaData.cxx | 4 +- connectivity/source/drivers/jdbc/JConnection.cxx | 22 +-- connectivity/source/drivers/jdbc/JDriver.cxx | 74 +++---- connectivity/source/drivers/jdbc/JStatement.cxx | 2 +- .../source/drivers/jdbc/PreparedStatement.cxx | 10 +- connectivity/source/drivers/jdbc/ResultSet.cxx | 6 +- connectivity/source/drivers/jdbc/tools.cxx | 2 +- .../drivers/mozab/bootstrap/MMozillaBootstrap.cxx | 4 +- .../drivers/mozab/bootstrap/MNSINIParser.cxx | 2 +- .../source/drivers/mysql_jdbc/YCatalog.cxx | 9 +- .../source/drivers/mysql_jdbc/YColumns.cxx | 2 +- connectivity/source/drivers/mysql_jdbc/YDriver.cxx | 18 +- connectivity/source/drivers/mysql_jdbc/YTable.cxx | 8 +- connectivity/source/drivers/mysql_jdbc/YTables.cxx | 4 +- connectivity/source/drivers/mysql_jdbc/YUser.cxx | 2 +- connectivity/source/drivers/mysql_jdbc/YUsers.cxx | 4 +- connectivity/source/drivers/mysql_jdbc/YViews.cxx | 4 +- .../source/drivers/mysqlc/mysqlc_catalog.cxx | 6 +- .../source/drivers/mysqlc/mysqlc_column.cxx | 2 +- .../source/drivers/mysqlc/mysqlc_connection.cxx | 12 +- .../drivers/mysqlc/mysqlc_databasemetadata.cxx | 140 ++++++++------ .../source/drivers/mysqlc/mysqlc_driver.cxx | 8 +- .../source/drivers/mysqlc/mysqlc_general.cxx | 89 +++++---- .../drivers/mysqlc/mysqlc_prepared_resultset.cxx | 31 +-- .../drivers/mysqlc/mysqlc_preparedstatement.cxx | 6 +- .../source/drivers/mysqlc/mysqlc_resultset.cxx | 25 +-- .../source/drivers/mysqlc/mysqlc_statement.cxx | 33 ++-- .../source/drivers/mysqlc/mysqlc_table.cxx | 33 ++-- .../source/drivers/mysqlc/mysqlc_tables.cxx | 6 +- connectivity/source/drivers/mysqlc/mysqlc_user.cxx | 2 +- .../source/drivers/mysqlc/mysqlc_users.cxx | 4 +- .../source/drivers/mysqlc/mysqlc_views.cxx | 2 +- connectivity/source/drivers/odbc/OConnection.cxx | 8 +- .../drivers/odbc/ODatabaseMetaDataResultSet.cxx | 14 +- connectivity/source/drivers/odbc/ODriver.cxx | 54 +++--- connectivity/source/drivers/odbc/OFunctions.cxx | 108 +++++------ .../source/drivers/odbc/OPreparedStatement.cxx | 12 +- connectivity/source/drivers/odbc/OResultSet.cxx | 24 +-- connectivity/source/drivers/odbc/OStatement.cxx | 2 +- .../source/drivers/postgresql/pq_array.cxx | 2 +- .../source/drivers/postgresql/pq_baseresultset.cxx | 14 +- .../source/drivers/postgresql/pq_connection.cxx | 12 +- .../drivers/postgresql/pq_databasemetadata.cxx | 156 +++++++-------- .../source/drivers/postgresql/pq_driver.cxx | 6 +- .../drivers/postgresql/pq_preparedstatement.cxx | 32 +-- .../source/drivers/postgresql/pq_resultset.cxx | 4 +- .../drivers/postgresql/pq_sequenceresultset.cxx | 4 +- .../source/drivers/postgresql/pq_statement.cxx | 24 +-- .../source/drivers/postgresql/pq_statics.cxx | 64 +++--- .../source/drivers/postgresql/pq_tools.cxx | 14 +- .../drivers/postgresql/pq_updateableresultset.cxx | 8 +- .../source/drivers/postgresql/pq_xbase.cxx | 2 +- .../source/drivers/postgresql/pq_xcolumns.cxx | 6 +- .../source/drivers/postgresql/pq_xcontainer.cxx | 2 +- .../source/drivers/postgresql/pq_xindexcolumns.cxx | 8 +- .../source/drivers/postgresql/pq_xindexes.cxx | 4 +- .../source/drivers/postgresql/pq_xkeycolumns.cxx | 8 +- .../source/drivers/postgresql/pq_xkeys.cxx | 4 +- .../source/drivers/postgresql/pq_xuser.cxx | 4 +- .../source/drivers/postgresql/pq_xusers.cxx | 2 +- .../source/drivers/postgresql/pq_xviews.cxx | 4 +- connectivity/source/drivers/writer/WCatalog.cxx | 3 +- connectivity/source/drivers/writer/WConnection.cxx | 8 +- .../source/drivers/writer/WDatabaseMetaData.cxx | 2 +- connectivity/source/drivers/writer/WDriver.cxx | 2 +- connectivity/source/drivers/writer/WTables.cxx | 2 +- connectivity/source/manager/mdrivermanager.cxx | 10 +- connectivity/source/parse/PColumn.cxx | 2 +- connectivity/source/parse/sqliterator.cxx | 16 +- connectivity/source/parse/sqlnode.cxx | 12 +- connectivity/source/sdbcx/VCatalog.cxx | 2 +- connectivity/source/sdbcx/VCollection.cxx | 2 +- connectivity/source/sdbcx/VColumn.cxx | 6 +- connectivity/source/sdbcx/VGroup.cxx | 8 +- connectivity/source/sdbcx/VIndex.cxx | 6 +- connectivity/source/sdbcx/VIndexColumn.cxx | 6 +- connectivity/source/sdbcx/VKey.cxx | 6 +- connectivity/source/sdbcx/VKeyColumn.cxx | 6 +- connectivity/source/sdbcx/VTable.cxx | 10 +- connectivity/source/sdbcx/VUser.cxx | 12 +- connectivity/source/sdbcx/VView.cxx | 2 +- 181 files changed, 1342 insertions(+), 1326 deletions(-) (limited to 'connectivity') diff --git a/connectivity/qa/connectivity/commontools/FValue_test.cxx b/connectivity/qa/connectivity/commontools/FValue_test.cxx index b6f0e36588ad..de6b2b27ddac 100644 --- a/connectivity/qa/connectivity/commontools/FValue_test.cxx +++ b/connectivity/qa/connectivity/commontools/FValue_test.cxx @@ -320,37 +320,37 @@ void FValueTest::test_bool_creation() ORowSetValue vFalse(false); { - ORowSetValue v(OUString("1")); + ORowSetValue v(u"1"_ustr); v.setTypeKind(DataType::BOOLEAN); CPPUNIT_ASSERT_MESSAGE("ORowSetValue bool creation from string didn't work", bool(v == vTrue)); } { - ORowSetValue v(OUString("0")); + ORowSetValue v(u"0"_ustr); v.setTypeKind(DataType::BOOLEAN); CPPUNIT_ASSERT_MESSAGE("ORowSetValue bool creation from string didn't work", bool(v == vFalse)); } { - ORowSetValue v(OUString("true")); + ORowSetValue v(u"true"_ustr); v.setTypeKind(DataType::BOOLEAN); CPPUNIT_ASSERT_MESSAGE("ORowSetValue bool creation from string didn't work", bool(v == vTrue)); } { - ORowSetValue v(OUString("tRuE")); + ORowSetValue v(u"tRuE"_ustr); v.setTypeKind(DataType::BOOLEAN); CPPUNIT_ASSERT_MESSAGE("ORowSetValue bool creation from string didn't work", bool(v == vTrue)); } { - ORowSetValue v(OUString("false")); + ORowSetValue v(u"false"_ustr); v.setTypeKind(DataType::BOOLEAN); CPPUNIT_ASSERT_MESSAGE("ORowSetValue bool creation from string didn't work", bool(v == vFalse)); } { - ORowSetValue v(OUString("0")); + ORowSetValue v(u"0"_ustr); v.setTypeKind(DataType::BOOLEAN); CPPUNIT_ASSERT_MESSAGE("ORowSetValue bool creation from string didn't work", bool(v == vFalse)); } diff --git a/connectivity/qa/connectivity/resource/sharedresources_test.cxx b/connectivity/qa/connectivity/resource/sharedresources_test.cxx index 9c8f4e4396b7..0f180ba018ca 100644 --- a/connectivity/qa/connectivity/resource/sharedresources_test.cxx +++ b/connectivity/qa/connectivity/resource/sharedresources_test.cxx @@ -60,30 +60,30 @@ SharedResourcesTest::SharedResourcesTest() void SharedResourcesTest::testGetSourceString() { - CPPUNIT_ASSERT_EQUAL(OUString("UnitTest"), m_aResource.getResourceString(TEST_SOURCE_STRING)); + CPPUNIT_ASSERT_EQUAL(u"UnitTest"_ustr, m_aResource.getResourceString(TEST_SOURCE_STRING)); } void SharedResourcesTest::testGetSourceStringWithSubstitutionOne() { - CPPUNIT_ASSERT_EQUAL(OUString("One substitution UnitTest"), + CPPUNIT_ASSERT_EQUAL(u"One substitution UnitTest"_ustr, m_aResource.getResourceStringWithSubstitution(TEST_SOURCE_ONE_SUBSTITUTION, - "$sub$", "UnitTest")); + "$sub$", u"UnitTest"_ustr)); } void SharedResourcesTest::testGetSourceStringWithSubstitutionTwo() { - CPPUNIT_ASSERT_EQUAL(OUString("Two substitution UnitTest1 UnitTest2"), - m_aResource.getResourceStringWithSubstitution(TEST_SOURCE_TWO_SUBSTITUTION, - "$sub0$", "UnitTest1", - "$sub1$", "UnitTest2")); + CPPUNIT_ASSERT_EQUAL(u"Two substitution UnitTest1 UnitTest2"_ustr, + m_aResource.getResourceStringWithSubstitution( + TEST_SOURCE_TWO_SUBSTITUTION, "$sub0$", u"UnitTest1"_ustr, "$sub1$", + u"UnitTest2"_ustr)); } void SharedResourcesTest::testGetSourceStringWithSubstitutionThree() { - CPPUNIT_ASSERT_EQUAL(OUString("Three substitution UnitTest1 UnitTest2 UnitTest3"), + CPPUNIT_ASSERT_EQUAL(u"Three substitution UnitTest1 UnitTest2 UnitTest3"_ustr, m_aResource.getResourceStringWithSubstitution( - TEST_SOURCE_THREE_SUBSTITUTION, "$sub0$", "UnitTest1", "$sub1$", - "UnitTest2", "$sub2$", "UnitTest3")); + TEST_SOURCE_THREE_SUBSTITUTION, "$sub0$", u"UnitTest1"_ustr, "$sub1$", + u"UnitTest2"_ustr, "$sub2$", u"UnitTest3"_ustr)); } void SharedResourcesTest::testGetSourceStringWithSubstitutionVector() @@ -92,7 +92,7 @@ void SharedResourcesTest::testGetSourceStringWithSubstitutionVector() { "$sub1$", "vector1" }, { "$sub2$", "vector2" } }; - CPPUNIT_ASSERT_EQUAL(OUString("Three substitution vector0 vector1 vector2"), + CPPUNIT_ASSERT_EQUAL(u"Three substitution vector0 vector1 vector2"_ustr, m_aResource.getResourceStringWithSubstitution( TEST_SOURCE_THREE_SUBSTITUTION, aStringToSubstitutes)); } diff --git a/connectivity/source/commontools/BlobHelper.cxx b/connectivity/source/commontools/BlobHelper.cxx index 6f4808d96626..844299e20a49 100644 --- a/connectivity/source/commontools/BlobHelper.cxx +++ b/connectivity/source/commontools/BlobHelper.cxx @@ -50,12 +50,12 @@ css::uno::Reference< css::io::XInputStream > SAL_CALL BlobHelper::getBinaryStrea ::sal_Int64 SAL_CALL BlobHelper::position( const css::uno::Sequence< ::sal_Int8 >& /*pattern*/, ::sal_Int64 /*start*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XBlob::position", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XBlob::position"_ustr, *this ); } ::sal_Int64 SAL_CALL BlobHelper::positionOfBlob( const css::uno::Reference< css::sdbc::XBlob >& /*pattern*/, ::sal_Int64 /*start*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XBlob::positionOfBlob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XBlob::positionOfBlob"_ustr, *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index b5f7ce50fe74..cae16e17eb6e 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -125,7 +125,7 @@ namespace connectivity Any uaJVM = xVM->getJavaVM( processID ); sal_Int64 nTemp; if (!(uaJVM >>= nTemp)) { - throw Exception("cannot get result for getJavaVM", nullptr); // -5 + throw Exception(u"cannot get result for getJavaVM"_ustr, nullptr); // -5 } aRet = reinterpret_cast( static_cast(nTemp)); diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index b8e45fb027e7..875d56925c70 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -105,7 +105,7 @@ OConnectionWrapper::~OConnectionWrapper() OUString SAL_CALL OConnectionWrapper::getImplementationName( ) { - return "com.sun.star.sdbc.drivers.OConnectionWrapper"; + return u"com.sun.star.sdbc.drivers.OConnectionWrapper"_ustr; } @@ -117,7 +117,7 @@ css::uno::Sequence< OUString > SAL_CALL OConnectionWrapper::getSupportedServiceN aSupported = m_xServiceInfo->getSupportedServiceNames(); // append our own service, if necessary - OUString sConnectionService( "com.sun.star.sdbc.Connection" ); + OUString sConnectionService( u"com.sun.star.sdbc.Connection"_ustr ); if ( ::comphelper::findValue( aSupported, sConnectionService ) == -1 ) { sal_Int32 nLen = aSupported.getLength(); diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 0895881d7ee3..896d7a85455c 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -203,7 +203,7 @@ Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xS { // get the null date Date aDate; - xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= aDate; + xSupplier->getNumberFormatSettings()->getPropertyValue(u"NullDate"_ustr) >>= aDate; return aDate; } catch ( const Exception& ) @@ -243,7 +243,7 @@ void DBTypeConversion::setValue(const Reference& xVariant, if (xFormatProps.is()) { css::lang::Locale loc; - if (xFormatProps->getPropertyValue("Locale") >>= loc) + if (xFormatProps->getPropertyValue(u"Locale"_ustr) >>= loc) nStandardKey = xFormatTypes->getStandardIndex(loc); else { @@ -469,7 +469,7 @@ OUString DBTypeConversion::getFormattedValue(const Reference& xVariant, { Reference< XNumberFormatsSupplier > xSupplier( xFormatter->getNumberFormatsSupplier(), UNO_SET_THROW ); Reference< XPropertySet > xFormatterSettings( xSupplier->getNumberFormatSettings(), UNO_SET_THROW ); - OSL_VERIFY( xFormatterSettings->getPropertyValue("NullDate") >>= aFormatterNullDate ); + OSL_VERIFY( xFormatterSettings->getPropertyValue(u"NullDate"_ustr) >>= aFormatterNullDate ); } catch( const Exception& ) { diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index 90e361a8e0a8..3c5fe27e8327 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -76,9 +76,9 @@ namespace if ( !sDriverTypeDisplayName.isEmpty() ) _rInstalledDriver.sDriverTypeDisplayName = sDriverTypeDisplayName; - lcl_fillValues(aURLPatternNode,"Properties",_rInstalledDriver.aProperties); - lcl_fillValues(aURLPatternNode,"Features",_rInstalledDriver.aFeatures); - lcl_fillValues(aURLPatternNode,"MetaData",_rInstalledDriver.aMetaData); + lcl_fillValues(aURLPatternNode,u"Properties"_ustr,_rInstalledDriver.aProperties); + lcl_fillValues(aURLPatternNode,u"Features"_ustr,_rInstalledDriver.aFeatures); + lcl_fillValues(aURLPatternNode,u"MetaData"_ustr,_rInstalledDriver.aMetaData); } } @@ -93,7 +93,7 @@ const TInstalledDrivers& DriversConfigImpl::getInstalledDrivers(const uno::Refer if ( !m_aInstalled.isValid() ) { m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB, - "org.openoffice.Office.DataAccess.Drivers/Installed", -1, ::utl::OConfigurationTreeRoot::CM_READONLY); + u"org.openoffice.Office.DataAccess.Drivers/Installed"_ustr, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); } if ( m_aInstalled.isValid() ) diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index e42a9336817a..ea3e70d73646 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -657,55 +657,55 @@ ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getBasicValue() ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getSelectValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("SELECT")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"SELECT"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getInsertValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("INSERT")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"INSERT"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getDeleteValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DELETE")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"DELETE"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getUpdateValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("UPDATE")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"UPDATE"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getCreateValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("CREATE")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"CREATE"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getReadValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("READ")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"READ"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getAlterValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("ALTER")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"ALTER"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getDropValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DROP")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"DROP"_ustr); return aValueRef; } ORowSetValueDecoratorRef const & ODatabaseMetaDataResultSet::getQuoteValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("'")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(u"'"_ustr); return aValueRef; } @@ -805,7 +805,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA OUString SAL_CALL ODatabaseMetaDataResultSet::getImplementationName( ) { - return "org.openoffice.comp.helper.DatabaseMetaDataResultSet"; + return u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr; } sal_Bool SAL_CALL ODatabaseMetaDataResultSet::supportsService( const OUString& _rServiceName ) @@ -815,7 +815,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA Sequence< OUString > SAL_CALL ODatabaseMetaDataResultSet::getSupportedServiceNames( ) { - return Sequence{ "com.sun.star.sdbc.ResultSet" }; + return Sequence{ u"com.sun.star.sdbc.ResultSet"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx index 291ce7a7d96b..02c0a402a0fc 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx @@ -165,191 +165,191 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isWritable( sal_Int32 colu void ODatabaseMetaDataResultSetMetaData::setColumnPrivilegesMap() { setColumnMap(); - m_mColumns[5] = OColumn(OUString(),"GRANTOR", ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"GRANTEE", ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"PRIVILEGE", ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); - m_mColumns[8] = OColumn(OUString(),"IS_GRANTABLE", ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"GRANTOR"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"GRANTEE"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"PRIVILEGE"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); + m_mColumns[8] = OColumn(OUString(),u"IS_GRANTABLE"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setTableNameMap() { - m_mColumns[1] = OColumn(OUString(),"TABLE_CAT", ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); - m_mColumns[2] = OColumn(OUString(),"TABLE_SCHEM", ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); - m_mColumns[3] = OColumn(OUString(),"TABLE_NAME", ColumnValue::NO_NULLS, 3,3,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"TABLE_CAT"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); + m_mColumns[2] = OColumn(OUString(),u"TABLE_SCHEM"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::VARCHAR); + m_mColumns[3] = OColumn(OUString(),u"TABLE_NAME"_ustr, ColumnValue::NO_NULLS, 3,3,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setColumnMap() { setTableNameMap(); - m_mColumns[4] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS, 3,3,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"COLUMN_NAME"_ustr, ColumnValue::NO_NULLS, 3,3,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setColumnsMap() { setColumnMap(); - m_mColumns[5] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[6] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"COLUMN_SIZE", ColumnValue::NO_NULLS, 3,3,0, DataType::INTEGER); - m_mColumns[8] = OColumn(OUString(),"BUFFER_LENGTH", ColumnValue::NULLABLE, 3,3,0, DataType::INTEGER); - m_mColumns[9] = OColumn(OUString(),"DECIMAL_DIGITS", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[10] = OColumn(OUString(),"NUM_PREC_RADIX", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[11] = OColumn(OUString(),"NULLABLE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[12] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[13] = OColumn(OUString(),"COLUMN_DEF", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[14] = OColumn(OUString(),"SQL_DATA_TYPE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[15] = OColumn(OUString(),"SQL_DATETIME_SUB", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[16] = OColumn(OUString(),"CHAR_OCTET_LENGTH", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[17] = OColumn(OUString(),"ORDINAL_POSITION", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[18] = OColumn(OUString(),"IS_NULLABLE", ColumnValue::NO_NULLS, 1,1,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[6] = OColumn(OUString(),u"TYPE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"COLUMN_SIZE"_ustr, ColumnValue::NO_NULLS, 3,3,0, DataType::INTEGER); + m_mColumns[8] = OColumn(OUString(),u"BUFFER_LENGTH"_ustr, ColumnValue::NULLABLE, 3,3,0, DataType::INTEGER); + m_mColumns[9] = OColumn(OUString(),u"DECIMAL_DIGITS"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[10] = OColumn(OUString(),u"NUM_PREC_RADIX"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[11] = OColumn(OUString(),u"NULLABLE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[12] = OColumn(OUString(),u"REMARKS"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[13] = OColumn(OUString(),u"COLUMN_DEF"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[14] = OColumn(OUString(),u"SQL_DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[15] = OColumn(OUString(),u"SQL_DATETIME_SUB"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[16] = OColumn(OUString(),u"CHAR_OCTET_LENGTH"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[17] = OColumn(OUString(),u"ORDINAL_POSITION"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[18] = OColumn(OUString(),u"IS_NULLABLE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setTablesMap() { setTableNameMap(); - m_mColumns[4] = OColumn(OUString(),"TABLE_TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"TABLE_TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"REMARKS"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setProcedureNameMap() { - m_mColumns[1] = OColumn(OUString(),"PROCEDURE_CAT", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[2] = OColumn(OUString(),"PROCEDURE_SCHEM", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[3] = OColumn(OUString(),"PROCEDURE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"PROCEDURE_CAT"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[2] = OColumn(OUString(),u"PROCEDURE_SCHEM"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[3] = OColumn(OUString(),u"PROCEDURE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setProcedureColumnsMap() { setProcedureNameMap(); - m_mColumns[4] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"COLUMN_TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[6] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[7] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[8] = OColumn(OUString(),"PRECISION", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[9] = OColumn(OUString(),"LENGTH", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[10] = OColumn(OUString(),"SCALE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[11] = OColumn(OUString(),"RADIX", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[12] = OColumn(OUString(),"NULLABLE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[13] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"COLUMN_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"COLUMN_TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[6] = OColumn(OUString(),u"DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[7] = OColumn(OUString(),u"TYPE_NAME"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[8] = OColumn(OUString(),u"PRECISION"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[9] = OColumn(OUString(),u"LENGTH"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[10] = OColumn(OUString(),u"SCALE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[11] = OColumn(OUString(),u"RADIX"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[12] = OColumn(OUString(),u"NULLABLE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[13] = OColumn(OUString(),u"REMARKS"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setPrimaryKeysMap() { setColumnMap(); - m_mColumns[5] = OColumn(OUString(),"KEY_SEQ", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[6] = OColumn(OUString(),"PK_NAME", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"KEY_SEQ"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[6] = OColumn(OUString(),u"PK_NAME"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setIndexInfoMap() { setTableNameMap(); - m_mColumns[4] = OColumn(OUString(),"NON_UNIQUE", ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); - m_mColumns[5] = OColumn(OUString(),"INDEX_QUALIFIER", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"INDEX_NAME", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[8] = OColumn(OUString(),"ORDINAL_POSITION", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[9] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[10] = OColumn(OUString(),"ASC_OR_DESC", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[11] = OColumn(OUString(),"CARDINALITY", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[12] = OColumn(OUString(),"PAGES", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[13] = OColumn(OUString(),"FILTER_CONDITION", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"NON_UNIQUE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); + m_mColumns[5] = OColumn(OUString(),u"INDEX_QUALIFIER"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"INDEX_NAME"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[8] = OColumn(OUString(),u"ORDINAL_POSITION"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[9] = OColumn(OUString(),u"COLUMN_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[10] = OColumn(OUString(),u"ASC_OR_DESC"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[11] = OColumn(OUString(),u"CARDINALITY"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[12] = OColumn(OUString(),u"PAGES"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[13] = OColumn(OUString(),u"FILTER_CONDITION"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setTablePrivilegesMap() { setTableNameMap(); - m_mColumns[4] = OColumn(OUString(),"GRANTOR", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"GRANTEE", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"PRIVILEGE", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"IS_GRANTABLE", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"GRANTOR"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"GRANTEE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"PRIVILEGE"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"IS_GRANTABLE"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setCrossReferenceMap() { - m_mColumns[1] = OColumn(OUString(),"PKTABLE_CAT", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[2] = OColumn(OUString(),"PKTABLE_SCHEM", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[3] = OColumn(OUString(),"PKTABLE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[4] = OColumn(OUString(),"PKCOLUMN_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"FKTABLE_CAT", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"FKTABLE_SCHEM", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"FKTABLE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[8] = OColumn(OUString(),"FKCOLUMN_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"PKTABLE_CAT"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[2] = OColumn(OUString(),u"PKTABLE_SCHEM"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[3] = OColumn(OUString(),u"PKTABLE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"PKCOLUMN_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"FKTABLE_CAT"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"FKTABLE_SCHEM"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"FKTABLE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[8] = OColumn(OUString(),u"FKCOLUMN_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[9] = OColumn(OUString(),"KEY_SEQ", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[10] = OColumn(OUString(),"UPDATE_RULE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[11] = OColumn(OUString(),"DELETE_RULE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[12] = OColumn(OUString(),"FK_NAME", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[13] = OColumn(OUString(),"PK_NAME", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[14] = OColumn(OUString(),"DEFERRABILITY", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[9] = OColumn(OUString(),u"KEY_SEQ"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[10] = OColumn(OUString(),u"UPDATE_RULE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[11] = OColumn(OUString(),u"DELETE_RULE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[12] = OColumn(OUString(),u"FK_NAME"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[13] = OColumn(OUString(),u"PK_NAME"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[14] = OColumn(OUString(),u"DEFERRABILITY"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); } void ODatabaseMetaDataResultSetMetaData::setTypeInfoMap() { - m_mColumns[1] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[2] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[3] = OColumn(OUString(),"PRECISION", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[4] = OColumn(OUString(),"LITERAL_PREFIX", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"LITERAL_SUFFIX", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"CREATE_PARAMS", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"NULLABLE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[8] = OColumn(OUString(),"CASE_SENSITIVE", ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); - m_mColumns[9] = OColumn(OUString(),"SEARCHABLE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[10] = OColumn(OUString(),"UNSIGNED_ATTRIBUTE", ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); - m_mColumns[11] = OColumn(OUString(),"FIXED_PREC_SCALE", ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); - m_mColumns[12] = OColumn(OUString(),"AUTO_INCREMENT", ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); - m_mColumns[13] = OColumn(OUString(),"LOCAL_TYPE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[14] = OColumn(OUString(),"MINIMUM_SCALE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[15] = OColumn(OUString(),"MAXIMUM_SCALE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[16] = OColumn(OUString(),"SQL_DATA_TYPE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[17] = OColumn(OUString(),"SQL_DATETIME_SUB", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); - m_mColumns[18] = OColumn(OUString(),"NUM_PREC_RADIX", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[1] = OColumn(OUString(),u"TYPE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[2] = OColumn(OUString(),u"DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[3] = OColumn(OUString(),u"PRECISION"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[4] = OColumn(OUString(),u"LITERAL_PREFIX"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"LITERAL_SUFFIX"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"CREATE_PARAMS"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"NULLABLE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[8] = OColumn(OUString(),u"CASE_SENSITIVE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); + m_mColumns[9] = OColumn(OUString(),u"SEARCHABLE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[10] = OColumn(OUString(),u"UNSIGNED_ATTRIBUTE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); + m_mColumns[11] = OColumn(OUString(),u"FIXED_PREC_SCALE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); + m_mColumns[12] = OColumn(OUString(),u"AUTO_INCREMENT"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::BIT); + m_mColumns[13] = OColumn(OUString(),u"LOCAL_TYPE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[14] = OColumn(OUString(),u"MINIMUM_SCALE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[15] = OColumn(OUString(),u"MAXIMUM_SCALE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[16] = OColumn(OUString(),u"SQL_DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[17] = OColumn(OUString(),u"SQL_DATETIME_SUB"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[18] = OColumn(OUString(),u"NUM_PREC_RADIX"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); } void ODatabaseMetaDataResultSetMetaData::setProceduresMap() { setProcedureNameMap(); - m_mColumns[4] = OColumn(OUString(),"RESERVED1", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"RESERVED2", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"RESERVED3", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[7] = OColumn(OUString(),"REMARKS", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[8] = OColumn(OUString(),"PROCEDURE_TYPE", ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); + m_mColumns[4] = OColumn(OUString(),u"RESERVED1"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"RESERVED2"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"RESERVED3"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[7] = OColumn(OUString(),u"REMARKS"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[8] = OColumn(OUString(),u"PROCEDURE_TYPE"_ustr, ColumnValue::NO_NULLS, 1,1,0, DataType::INTEGER); } void ODatabaseMetaDataResultSetMetaData::setTableTypes() { - m_mColumns[1] = OColumn(OUString(),"TABLE_TYPE", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"TABLE_TYPE"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setCatalogsMap() { - m_mColumns[1] = OColumn(OUString(),"TABLE_CAT", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"TABLE_CAT"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setSchemasMap() { - m_mColumns[1] = OColumn(OUString(),"TABLE_SCHEM", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"TABLE_SCHEM"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); } void ODatabaseMetaDataResultSetMetaData::setVersionColumnsMap() { - m_mColumns[1] = OColumn(OUString(),"SCOPE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[2] = OColumn(OUString(),"COLUMN_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[3] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[4] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"COLUMN_SIZE", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[6] = OColumn(OUString(),"BUFFER_LENGTH", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); - m_mColumns[7] = OColumn(OUString(),"DECIMAL_DIGITS", ColumnValue::NULLABLE, 0,0,0, DataType::INTEGER); - m_mColumns[8] = OColumn(OUString(),"PSEUDO_COLUMN", ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[1] = OColumn(OUString(),u"SCOPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[2] = OColumn(OUString(),u"COLUMN_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[3] = OColumn(OUString(),u"DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[4] = OColumn(OUString(),u"TYPE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"COLUMN_SIZE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[6] = OColumn(OUString(),u"BUFFER_LENGTH"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); + m_mColumns[7] = OColumn(OUString(),u"DECIMAL_DIGITS"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::INTEGER); + m_mColumns[8] = OColumn(OUString(),u"PSEUDO_COLUMN"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::INTEGER); } void ODatabaseMetaDataResultSetMetaData::setUDTsMap() { - m_mColumns[1] = OColumn(OUString(),"TYPE_CAT", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[2] = OColumn(OUString(),"TYPE_SCHEM", ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); - m_mColumns[3] = OColumn(OUString(),"TYPE_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[4] = OColumn(OUString(),"CLASS_NAME", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[5] = OColumn(OUString(),"DATA_TYPE", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); - m_mColumns[6] = OColumn(OUString(),"REMARKS", ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[1] = OColumn(OUString(),u"TYPE_CAT"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[2] = OColumn(OUString(),u"TYPE_SCHEM"_ustr, ColumnValue::NULLABLE, 0,0,0, DataType::VARCHAR); + m_mColumns[3] = OColumn(OUString(),u"TYPE_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[4] = OColumn(OUString(),u"CLASS_NAME"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[5] = OColumn(OUString(),u"DATA_TYPE"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); + m_mColumns[6] = OColumn(OUString(),u"REMARKS"_ustr, ColumnValue::NO_NULLS, 0,0,0, DataType::VARCHAR); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/ParameterSubstitution.cxx b/connectivity/source/commontools/ParameterSubstitution.cxx index 6fa55780803f..e5d08fbe499f 100644 --- a/connectivity/source/commontools/ParameterSubstitution.cxx +++ b/connectivity/source/commontools/ParameterSubstitution.cxx @@ -37,13 +37,13 @@ namespace connectivity ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); uno::Reference< sdbc::XConnection > xConnection; - xConnection = aArgs.getUnpackedValueOrDefault("ActiveConnection",xConnection); + xConnection = aArgs.getUnpackedValueOrDefault(u"ActiveConnection"_ustr,xConnection); m_xConnection = xConnection; } OUString SAL_CALL ParameterSubstitution::getImplementationName( ) { - return "org.openoffice.comp.helper.ParameterSubstitution"; + return u"org.openoffice.comp.helper.ParameterSubstitution"_ustr; } sal_Bool SAL_CALL ParameterSubstitution::supportsService( const OUString& _rServiceName ) @@ -53,7 +53,7 @@ namespace connectivity Sequence< OUString > SAL_CALL ParameterSubstitution::getSupportedServiceNames( ) { - return { "com.sun.star.sdb.ParameterSubstitution" }; + return { u"com.sun.star.sdb.ParameterSubstitution"_ustr }; } diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 73fb335b5382..0eba8e83c461 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -95,7 +95,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) Reference< XRow > xRow(xRet,UNO_QUERY); ::comphelper::SequenceAsHashMap aMap(m_aConnectionInfo); Sequence< Any > aTypeInfoSettings; - aTypeInfoSettings = aMap.getUnpackedValueOrDefault("TypeInfoSettings",aTypeInfoSettings); + aTypeInfoSettings = aMap.getUnpackedValueOrDefault(u"TypeInfoSettings"_ustr,aTypeInfoSettings); if ( xRow.is() ) { diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index 723b4a447a18..b50f09182c26 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -226,7 +226,7 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementNam aSchema = _sElementName.copy(0,nLen); aName = _sElementName.copy(nLen+1); - OUString aSql( "DROP INDEX " ); + OUString aSql( u"DROP INDEX "_ustr ); OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::EComposeRule::InIndexDefinitions, true ); OUString sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), OUString(), aSchema, aName, true, ::dbtools::EComposeRule::InIndexDefinitions ); diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx index 427ab524162e..14af0910a8d8 100644 --- a/connectivity/source/commontools/TKeys.cxx +++ b/connectivity/source/commontools/TKeys.cxx @@ -253,7 +253,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re OUString OKeysHelper::getDropForeignKey() const { - return " DROP CONSTRAINT "; + return u" DROP CONSTRAINT "_ustr; } // XDrop diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx index 71a6986239f5..0003cedbcdbf 100644 --- a/connectivity/source/commontools/TPrivilegesResultSet.cxx +++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx @@ -37,7 +37,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& { OUString sUserWorkingFor; // we want all catalogues, all schemas, all tables - Sequence< OUString > sTableTypes {"VIEW", "TABLE", "%"}; // this last one is just to be sure to include anything else... + Sequence< OUString > sTableTypes {u"VIEW"_ustr, u"TABLE"_ustr, u"%"_ustr}; // this last one is just to be sure to include anything else... try { m_xTables = _rxMeta->getTables(catalog,schemaPattern,tableNamePattern,sTableTypes); @@ -53,7 +53,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& ODatabaseMetaDataResultSet::ORow aRow(8); aRow[5] = new ORowSetValueDecorator(sUserWorkingFor); aRow[6] = ODatabaseMetaDataResultSet::getSelectValue(); - aRow[7] = new ORowSetValueDecorator(OUString("YES")); + aRow[7] = new ORowSetValueDecorator(u"YES"_ustr); aRows.push_back(aRow); aRow[6] = ODatabaseMetaDataResultSet::getInsertValue(); aRows.push_back(aRow); @@ -69,7 +69,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& aRows.push_back(aRow); aRow[6] = ODatabaseMetaDataResultSet::getDropValue(); aRows.push_back(aRow); - aRow[6] = new ORowSetValueDecorator(OUString("REFERENCE")); + aRow[6] = new ORowSetValueDecorator(u"REFERENCE"_ustr); aRows.push_back(aRow); setRows(std::move(aRows)); diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 27c874636069..f69333253102 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -132,10 +132,10 @@ namespace connectivity Reference xFac(_xConnection,UNO_QUERY); if ( xFac.is() ) { - m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"TableRenameServiceName")),UNO_QUERY); - m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"TableAlterationServiceName")),UNO_QUERY); - m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"KeyAlterationServiceName")),UNO_QUERY); - m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"IndexAlterationServiceName")),UNO_QUERY); + m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,u"TableRenameServiceName"_ustr)),UNO_QUERY); + m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,u"TableAlterationServiceName"_ustr)),UNO_QUERY); + m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,u"KeyAlterationServiceName"_ustr)),UNO_QUERY); + m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,u"IndexAlterationServiceName"_ustr)),UNO_QUERY); } } catch(const Exception&) @@ -266,7 +266,7 @@ void OTableHelper::refreshColumns() aCatalog, m_SchemaName, m_Name, - "%" + u"%"_ustr ) ); // collect the column names, together with their ordinal position @@ -462,7 +462,7 @@ void OTableHelper::refreshIndexes() OUString OTableHelper::getRenameStart() const { - OUString sSql("RENAME "); + OUString sSql(u"RENAME "_ustr); if ( m_Type == "VIEW" ) sSql += " VIEW "; else diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index bc5a9be80804..73e6af6c2a1a 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -176,7 +176,7 @@ SQLExceptionInfo::operator const css::sdb::SQLContext*() const void SQLExceptionInfo::prepend( const OUString& _rErrorMessage ) { - SQLException aException(_rErrorMessage, {}, "S1000", 0, m_aContent); + SQLException aException(_rErrorMessage, {}, u"S1000"_ustr, 0, m_aContent); m_aContent <<= aException; m_eType = TYPE::SQLException; @@ -464,17 +464,17 @@ OUString getStandardSQLState( StandardSQLState _eState ) { switch ( _eState ) { - case StandardSQLState::INVALID_DESCRIPTOR_INDEX: return "07009"; - case StandardSQLState::INVALID_CURSOR_STATE: return "24000"; - case StandardSQLState::COLUMN_NOT_FOUND: return "42S22"; - case StandardSQLState::GENERAL_ERROR: return "HY000"; - case StandardSQLState::INVALID_SQL_DATA_TYPE: return "HY004"; - case StandardSQLState::FUNCTION_SEQUENCE_ERROR: return "HY010"; - case StandardSQLState::INVALID_CURSOR_POSITION: return "HY109"; - case StandardSQLState::FEATURE_NOT_IMPLEMENTED: return "HYC00"; - case StandardSQLState::FUNCTION_NOT_SUPPORTED: return "IM001"; - case StandardSQLState::CONNECTION_DOES_NOT_EXIST: return "08003"; - default: return "HY001"; // General Error + case StandardSQLState::INVALID_DESCRIPTOR_INDEX: return u"07009"_ustr; + case StandardSQLState::INVALID_CURSOR_STATE: return u"24000"_ustr; + case StandardSQLState::COLUMN_NOT_FOUND: return u"42S22"_ustr; + case StandardSQLState::GENERAL_ERROR: return u"HY000"_ustr; + case StandardSQLState::INVALID_SQL_DATA_TYPE: return u"HY004"_ustr; + case StandardSQLState::FUNCTION_SEQUENCE_ERROR: return u"HY010"_ustr; + case StandardSQLState::INVALID_CURSOR_POSITION: return u"HY109"_ustr; + case StandardSQLState::FEATURE_NOT_IMPLEMENTED: return u"HYC00"_ustr; + case StandardSQLState::FUNCTION_NOT_SUPPORTED: return u"IM001"_ustr; + case StandardSQLState::CONNECTION_DOES_NOT_EXIST: return u"08003"_ustr; + default: return u"HY001"_ustr; // General Error } } diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 8983ee25bada..c269b9ca6c0d 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -127,7 +127,7 @@ namespace dbtools { Reference< XPropertySet > xDataSource( xConnectionAsChild->getParent(), UNO_QUERY_THROW ); Reference< XPropertySet > xDataSourceSettings( - xDataSource->getPropertyValue("Settings"), + xDataSource->getPropertyValue(u"Settings"_ustr), UNO_QUERY_THROW ); _out_setting = xDataSourceSettings->getPropertyValue( _asciiName ); @@ -240,7 +240,7 @@ namespace dbtools try { Any setting; - if ( !( lcl_getConnectionSetting( "PrimaryKeySupport", *m_pImpl, setting ) ) + if ( !( lcl_getConnectionSetting( u"PrimaryKeySupport"_ustr, *m_pImpl, setting ) ) || !( setting >>= bDoesSupportPrimaryKeys ) ) bDoesSupportPrimaryKeys = m_pImpl->xConnectionMetaData->supportsCoreSQLGrammar() @@ -272,7 +272,7 @@ namespace dbtools bool restrict( false ); Any setting; - if ( lcl_getConnectionSetting( "EnableSQL92Check", *m_pImpl, setting ) ) + if ( lcl_getConnectionSetting( u"EnableSQL92Check"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= restrict) ) SAL_WARN("connectivity.commontools", "restrictIdentifiersToSQL92: unable to assign EnableSQL92Check"); return restrict; @@ -283,7 +283,7 @@ namespace dbtools { bool doGenerate( false ); Any setting; - if ( lcl_getConnectionSetting( "GenerateASBeforeCorrelationName", *m_pImpl, setting ) ) + if ( lcl_getConnectionSetting( u"GenerateASBeforeCorrelationName"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= doGenerate) ) SAL_WARN("connectivity.commontools", "generateASBeforeCorrelationName: unable to assign GenerateASBeforeCorrelationName"); return doGenerate; @@ -293,7 +293,7 @@ namespace dbtools { bool doGenerate( true ); Any setting; - if ( lcl_getConnectionSetting( "EscapeDateTime", *m_pImpl, setting ) ) + if ( lcl_getConnectionSetting( u"EscapeDateTime"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= doGenerate) ) SAL_WARN("connectivity.commontools", "shouldEscapeDateTime: unable to assign EscapeDateTime"); return doGenerate; @@ -303,7 +303,7 @@ namespace dbtools { bool doSubstitute( true ); Any setting; - if ( lcl_getConnectionSetting( "ParameterNameSubstitution", *m_pImpl, setting ) ) + if ( lcl_getConnectionSetting( u"ParameterNameSubstitution"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= doSubstitute) ) SAL_WARN("connectivity.commontools", "shouldSubstituteParameterNames: unable to assign ParameterNameSubstitution"); return doSubstitute; @@ -313,7 +313,7 @@ namespace dbtools { bool is( true ); Any setting; - if ( lcl_getDriverSetting( "AutoIncrementIsPrimaryKey", *m_pImpl, setting ) ) + if ( lcl_getDriverSetting( u"AutoIncrementIsPrimaryKey"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= is) ) SAL_WARN("connectivity.commontools", "isAutoIncrementPrimaryKey: unable to assign AutoIncrementIsPrimaryKey"); return is; @@ -323,7 +323,7 @@ namespace dbtools { sal_Int32 mode( BooleanComparisonMode::EQUAL_INTEGER ); Any setting; - if ( lcl_getConnectionSetting( "BooleanComparisonMode", *m_pImpl, setting ) ) + if ( lcl_getConnectionSetting( u"BooleanComparisonMode"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= mode) ) SAL_WARN("connectivity.commontools", "getBooleanComparisonMode: unable to assign BooleanComparisonMode"); return mode; @@ -361,7 +361,7 @@ namespace dbtools { bool doGenerate( true ); Any setting; - if ( lcl_getConnectionSetting( "ColumnAliasInOrderBy", *m_pImpl, setting ) ) + if ( lcl_getConnectionSetting( u"ColumnAliasInOrderBy"_ustr, *m_pImpl, setting ) ) if( ! (setting >>= doGenerate) ) SAL_WARN("connectivity.commontools", "supportsColumnAliasInOrderBy: unable to assign ColumnAliasInOrderBy"); return doGenerate; diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 82f981014f3c..3dc306245ccf 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -125,10 +125,10 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, try { // determine the datatype of the column - _xColumn->getPropertyValue("Type") >>= nDataType; + _xColumn->getPropertyValue(u"Type"_ustr) >>= nDataType; if (DataType::NUMERIC == nDataType || DataType::DECIMAL == nDataType) - _xColumn->getPropertyValue("Scale") >>= nScale; + _xColumn->getPropertyValue(u"Scale"_ustr) >>= nScale; } catch (Exception&) { @@ -136,7 +136,7 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, } return getDefaultNumberFormat(nDataType, nScale, - ::cppu::any2bool(_xColumn->getPropertyValue("IsCurrency")), + ::cppu::any2bool(_xColumn->getPropertyValue(u"IsCurrency"_ustr)), _xTypes, _rLocale); } @@ -278,7 +278,7 @@ static Reference< XConnection > getConnection_allowException( Reference xIni(xDataSource, UNO_QUERY); if (xIni.is()) { - Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", Any(_rxParent) )) }; + Sequence< Any > aArgs{ Any(NamedValue( u"ParentWindow"_ustr, Any(_rxParent) )) }; xIni->initialize(aArgs); } @@ -291,8 +291,8 @@ static Reference< XConnection > getConnection_allowException( try { xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd; - bPwdReq = ::cppu::any2bool(xProp->getPropertyValue("IsPasswordRequired")); - xProp->getPropertyValue("User") >>= sUser; + bPwdReq = ::cppu::any2bool(xProp->getPropertyValue(u"IsPasswordRequired"_ustr)); + xProp->getPropertyValue(u"User"_ustr) >>= sUser; } catch(Exception&) { @@ -316,7 +316,7 @@ static Reference< XConnection > getConnection_allowException( if (xIni.is()) { - Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", Any(Reference()) )) }; + Sequence< Any > aArgs{ Any(NamedValue( u"ParentWindow"_ustr, Any(Reference()) )) }; xIni->initialize(aArgs); } @@ -350,7 +350,7 @@ Reference< XConnection> getConnection(const Reference< XRowSet>& _rxRowSet) Reference< XConnection> xReturn; Reference< XPropertySet> xRowSetProps(_rxRowSet, UNO_QUERY); if (xRowSetProps.is()) - xRowSetProps->getPropertyValue("ActiveConnection") >>= xReturn; + xRowSetProps->getPropertyValue(u"ActiveConnection"_ustr) >>= xReturn; return xReturn; } @@ -370,7 +370,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, // 1. already connected? Reference< XConnection > xExistingConn( - xRowSetProps->getPropertyValue("ActiveConnection"), + xRowSetProps->getPropertyValue(u"ActiveConnection"_ustr), UNO_QUERY ); if ( xExistingConn.is() @@ -380,7 +380,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, || ( xExistingConn = findConnection( _rxRowSet ) ).is() ) { - xRowSetProps->setPropertyValue("ActiveConnection", Any( xExistingConn ) ); + xRowSetProps->setPropertyValue(u"ActiveConnection"_ustr, Any( xExistingConn ) ); // no auto disposer needed, since we did not create the connection xConnection.reset( xExistingConn, SharedConnection::NoTakeOwnership ); @@ -391,9 +391,9 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, static constexpr OUString sUserProp( u"User"_ustr ); OUString sDataSourceName; - xRowSetProps->getPropertyValue("DataSourceName") >>= sDataSourceName; + xRowSetProps->getPropertyValue(u"DataSourceName"_ustr) >>= sDataSourceName; OUString sURL; - xRowSetProps->getPropertyValue("URL") >>= sURL; + xRowSetProps->getPropertyValue(u"URL"_ustr) >>= sURL; Reference< XConnection > xPureConnection; if (!sDataSourceName.isEmpty()) @@ -452,7 +452,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, } else xRowSetProps->setPropertyValue( - "ActiveConnection", + u"ActiveConnection"_ustr, Any( xConnection.getTyped() ) ); } @@ -653,14 +653,14 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect if ( xComposerFac.is() ) { - Reference< XSingleSelectQueryComposer > xComposer(xComposerFac->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"),UNO_QUERY); + Reference< XSingleSelectQueryComposer > xComposer(xComposerFac->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr),UNO_QUERY); if ( xComposer.is() ) { xComposer->setQuery( sStatementToExecute ); // Now set the filter to a dummy restriction which will result in an empty // result set. - xComposer->setFilter( "0=1" ); + xComposer->setFilter( u"0=1"_ustr ); sStatementToExecute = xComposer->getQuery( ); } } @@ -683,7 +683,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect try { if ( xStatementProps.is() ) - xStatementProps->setPropertyValue( "MaxRows", Any( sal_Int32( 0 ) ) ); + xStatementProps->setPropertyValue( u"MaxRows"_ustr, Any( sal_Int32( 0 ) ) ); } catch( const Exception& ) { @@ -1181,17 +1181,17 @@ catch(const Exception&) bool canInsert(const Reference< XPropertySet>& _rxCursorSet) { - return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0); + return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(u"Privileges"_ustr)) & Privilege::INSERT) != 0); } bool canUpdate(const Reference< XPropertySet>& _rxCursorSet) { - return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0); + return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(u"Privileges"_ustr)) & Privilege::UPDATE) != 0); } bool canDelete(const Reference< XPropertySet>& _rxCursorSet) { - return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0); + return (_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(u"Privileges"_ustr)) & Privilege::DELETE) != 0); } Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent) @@ -1226,21 +1226,21 @@ static Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const OUString sCommand; bool bEscapeProcessing = false; - OSL_VERIFY( _rxRowSet->getPropertyValue("CommandType") >>= nCommandType ); - OSL_VERIFY( _rxRowSet->getPropertyValue("Command") >>= sCommand ); - OSL_VERIFY( _rxRowSet->getPropertyValue("EscapeProcessing") >>= bEscapeProcessing ); + OSL_VERIFY( _rxRowSet->getPropertyValue(u"CommandType"_ustr) >>= nCommandType ); + OSL_VERIFY( _rxRowSet->getPropertyValue(u"Command"_ustr) >>= sCommand ); + OSL_VERIFY( _rxRowSet->getPropertyValue(u"EscapeProcessing"_ustr) >>= bEscapeProcessing ); StatementComposer aComposer( xConn, sCommand, nCommandType, bEscapeProcessing ); // append sort - aComposer.setOrder( getString( _rxRowSet->getPropertyValue("Order") ) ); + aComposer.setOrder( getString( _rxRowSet->getPropertyValue(u"Order"_ustr) ) ); // append filter bool bApplyFilter = true; - _rxRowSet->getPropertyValue("ApplyFilter") >>= bApplyFilter; + _rxRowSet->getPropertyValue(u"ApplyFilter"_ustr) >>= bApplyFilter; if ( bApplyFilter ) { - aComposer.setFilter( getString( _rxRowSet->getPropertyValue("Filter") ) ); - aComposer.setHavingClause( getString( _rxRowSet->getPropertyValue("HavingClause") ) ); + aComposer.setFilter( getString( _rxRowSet->getPropertyValue(u"Filter"_ustr) ) ); + aComposer.setHavingClause( getString( _rxRowSet->getPropertyValue(u"HavingClause"_ustr) ) ); } aComposer.getQuery(); @@ -1296,8 +1296,8 @@ OUString composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName ) { - bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, "UseCatalogInSelect", true ); - bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, "UseSchemaInSelect", true ); + bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, u"UseCatalogInSelect"_ustr, true ); + bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, u"UseSchemaInSelect"_ustr, true ); return impl_doComposeTableName( _rxConnection->getMetaData(), @@ -1414,7 +1414,7 @@ void showError(const SQLExceptionInfo& _rInfo, { try { - Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create( _rxContext, "", _xParent, _rInfo.get() ); + Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create( _rxContext, u""_ustr, _xParent, _rInfo.get() ); xErrorDialog->execute(); } catch(const Exception&) diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 5b486bed168e..f43cd2f77d89 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -550,7 +550,7 @@ Reference createSDBCXColumn(const Reference& _xTable xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, _rName,_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); if ( !xProp.is() ) { - xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, "%",_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); + xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, u"%"_ustr,_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); if ( !xProp.is() ) xProp = new connectivity::sdbcx::OColumn(_rName, OUString(),OUString(),OUString(), @@ -587,7 +587,7 @@ bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, if ( xDataSourceProperties.is() ) { Reference< XPropertySet > xSettings( - xDataSourceProperties->getPropertyValue("Settings"), + xDataSourceProperties->getPropertyValue(u"Settings"_ustr), UNO_QUERY_THROW ); OSL_VERIFY( xSettings->getPropertyValue( rSettingName ) >>= bValue ); @@ -611,7 +611,7 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const OUStrin return false; const Reference< XPropertySet > xSettings( - xDataSourceProperties->getPropertyValue("Settings"), + xDataSourceProperties->getPropertyValue(u"Settings"_ustr), UNO_QUERY_THROW ); @@ -641,7 +641,7 @@ bool isDataSourcePropertyEnabled(const Reference& _xProp, const OUSt if ( xProp.is() ) { Sequence< PropertyValue > aInfo; - xProp->getPropertyValue("Info") >>= aInfo; + xProp->getPropertyValue(u"Info"_ustr) >>= aInfo; const PropertyValue* pValue =std::find_if(std::cbegin(aInfo), std::cend(aInfo), [&_sProperty](const PropertyValue& lhs) @@ -745,7 +745,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, // Some drivers put a table privilege as soon as any column has the privilege, // some drivers only if all columns have the privilege. // To unify the situation, collect column privileges here, too. - Reference< XResultSet > xColumnPrivileges = _xMetaData->getColumnPrivileges(aVal, _sSchema, _sTable, "%"); + Reference< XResultSet > xColumnPrivileges = _xMetaData->getColumnPrivileges(aVal, _sSchema, _sTable, u"%"_ustr); Reference< XRow > xColumnCurrentRow(xColumnPrivileges, UNO_QUERY); if ( xColumnCurrentRow.is() ) { @@ -904,7 +904,7 @@ sal_Int32 DBTypeConversion::convertUnicodeString( const OUString& _rSource, OStr throw SQLException( sMessage, nullptr, - "22018", + u"22018"_ustr, 22018, Any() ); @@ -930,7 +930,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour throw SQLException( sMessage, nullptr, - "22001", + u"22001"_ustr, 22001, Any() ); @@ -942,7 +942,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB) { ::utl::OConfigurationTreeRoot aReportEngines = ::utl::OConfigurationTreeRoot::createWithComponentContext( - _rxORB, "org.openoffice.Office.DataAccess/ReportEngines", -1, ::utl::OConfigurationTreeRoot::CM_READONLY); + _rxORB, u"org.openoffice.Office.DataAccess/ReportEngines"_ustr, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); if ( aReportEngines.isValid() ) { @@ -963,17 +963,17 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& } } else - return "org.libreoffice.report.pentaho.SOReportJobFactory"; + return u"org.libreoffice.report.pentaho.SOReportJobFactory"_ustr; } else - return "org.libreoffice.report.pentaho.SOReportJobFactory"; + return u"org.libreoffice.report.pentaho.SOReportJobFactory"_ustr; return OUString(); } bool isAggregateColumn(const Reference< XSingleSelectQueryComposer > &_xParser, const Reference< XPropertySet > &_xField) { OUString sName; - _xField->getPropertyValue("Name") >>= sName; + _xField->getPropertyValue(u"Name"_ustr) >>= sName; Reference< XColumnsSupplier > xColumnsSupplier(_xParser, UNO_QUERY); Reference< css::container::XNameAccess > xCols; if (xColumnsSupplier.is()) diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 32db3d7177c2..07c9418032e5 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -120,7 +120,7 @@ namespace dbtools _rData.m_xColumnUpdate.set( _rxColumn, UNO_QUERY ); // determine the field type, and whether it's a numeric field - OSL_VERIFY( _rxColumn->getPropertyValue("Type") >>= _rData.m_nFieldType ); + OSL_VERIFY( _rxColumn->getPropertyValue(u"Type"_ustr) >>= _rData.m_nFieldType ); switch ( _rData.m_nFieldType ) { @@ -165,7 +165,7 @@ namespace dbtools // some more formatter settings _rData.m_nKeyType = ::comphelper::getNumberFormatType( xNumberFormatsSupp->getNumberFormats(), _rData.m_nFormatKey ); Reference< XPropertySet > xFormatSettings( xNumberFormatsSupp->getNumberFormatSettings(), UNO_SET_THROW ); - OSL_VERIFY( xFormatSettings->getPropertyValue("NullDate") >>= _rData.m_aNullDate ); + OSL_VERIFY( xFormatSettings->getPropertyValue(u"NullDate"_ustr) >>= _rData.m_aNullDate ); // remember the formatter _rData.m_xFormatter = i_rNumberFormatter; diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index 0e577704de7f..62710654e507 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -210,15 +210,15 @@ namespace dbtools // = : { OUString tblName; - xDetailField->getPropertyValue("TableName") >>= tblName; + xDetailField->getPropertyValue(u"TableName"_ustr) >>= tblName; if (!tblName.isEmpty()) sFilter = ::dbtools::quoteTableName( m_xConnectionMetadata, tblName, ::dbtools::EComposeRule::InDataManipulation ) + "."; } { OUString colName; - xDetailField->getPropertyValue("RealName") >>= colName; + xDetailField->getPropertyValue(u"RealName"_ustr) >>= colName; bool isFunction(false); - xDetailField->getPropertyValue("Function") >>= isFunction; + xDetailField->getPropertyValue(u"Function"_ustr) >>= isFunction; if (isFunction) sFilter += colName; else diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx index e25a3e7b4905..d213d6625602 100644 --- a/connectivity/source/commontools/paramwrapper.cxx +++ b/connectivity/source/commontools/paramwrapper.cxx @@ -160,7 +160,7 @@ namespace dbtools::param sal_Int32 nProperties( aProperties.getLength() ); aProperties.realloc( nProperties + 1 ); aProperties.getArray()[ nProperties ] = Property( - "Value", + u"Value"_ustr, PROPERTY_ID_VALUE, ::cppu::UnoType< Any >::get(), PropertyAttribute::TRANSIENT | PropertyAttribute::MAYBEVOID @@ -196,11 +196,11 @@ namespace dbtools::param { // TODO : aParamType & nScale can be obtained within the constructor... sal_Int32 nParamType = DataType::VARCHAR; - OSL_VERIFY( m_xDelegator->getPropertyValue("Type") >>= nParamType ); + OSL_VERIFY( m_xDelegator->getPropertyValue(u"Type"_ustr) >>= nParamType ); sal_Int32 nScale = 0; - if ( m_xDelegatorPSI->hasPropertyByName("Scale") ) - OSL_VERIFY( m_xDelegator->getPropertyValue("Scale") >>= nScale ); + if ( m_xDelegatorPSI->hasPropertyByName(u"Scale"_ustr) ) + OSL_VERIFY( m_xDelegator->getPropertyValue(u"Scale"_ustr) >>= nScale ); if ( m_xValueDestination.is() ) { diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index cbeaf511a943..c4360f981222 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -132,7 +132,7 @@ namespace dbtools if ( !pReturn ) { // is it a text field ? sal_Int32 nType = DataType::OTHER; - _rxField->getPropertyValue("Type") >>= nType; + _rxField->getPropertyValue(u"Type"_ustr) >>= nType; if ( ( DataType::CHAR == nType ) || ( DataType::VARCHAR == nType ) @@ -178,17 +178,17 @@ namespace dbtools try { Reference< XPropertySetInfo > xPSI( _rxField->getPropertySetInfo() ); - if ( xPSI.is() && xPSI->hasPropertyByName("FormatKey") ) + if ( xPSI.is() && xPSI->hasPropertyByName(u"FormatKey"_ustr) ) { sal_Int32 nFormatKey = 0; - _rxField->getPropertyValue("FormatKey") >>= nFormatKey; + _rxField->getPropertyValue(u"FormatKey"_ustr) >>= nFormatKey; if ( nFormatKey && m_xFormatter.is() ) { Locale aFormatLocale; ::comphelper::getNumberFormatProperty( m_xFormatter, nFormatKey, - "Locale" + u"Locale"_ustr ) >>= aFormatLocale; // valid locale diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index 8ebbd9ca8608..3ff71fcdbf2d 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -145,12 +145,12 @@ namespace dbtools // a native query ? bool bQueryEscapeProcessing = false; - xQuery->getPropertyValue("EscapeProcessing") >>= bQueryEscapeProcessing; + xQuery->getPropertyValue(u"EscapeProcessing"_ustr) >>= bQueryEscapeProcessing; if ( !bQueryEscapeProcessing ) break; // the command used by the query - xQuery->getPropertyValue("Command") >>= sStatement; + xQuery->getPropertyValue(u"Command"_ustr) >>= sStatement; if ( sStatement.isEmpty() ) break; @@ -158,7 +158,7 @@ namespace dbtools Reference< XMultiServiceFactory > xFactory( _rData.xConnection, UNO_QUERY_THROW ); ::utl::SharedUNOComponent< XSingleSelectQueryComposer > xComposer; xComposer.set( - xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), + xFactory->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr), UNO_QUERY_THROW ); @@ -185,9 +185,9 @@ namespace dbtools if ( bApplyFilter ) { OUString sFilter; - OSL_VERIFY( xQuery->getPropertyValue("Filter") >>= sFilter ); + OSL_VERIFY( xQuery->getPropertyValue(u"Filter"_ustr) >>= sFilter ); xComposer->setFilter( sFilter ); - OSL_VERIFY( xQuery->getPropertyValue("HavingClause") >>= sFilter ); + OSL_VERIFY( xQuery->getPropertyValue(u"HavingClause"_ustr) >>= sFilter ); xComposer->setHavingClause( sFilter ); } @@ -205,7 +205,7 @@ namespace dbtools { // create a composer Reference< XMultiServiceFactory > xFactory( _rData.xConnection, UNO_QUERY_THROW ); - Reference< XSingleSelectQueryComposer > xComposer( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), + Reference< XSingleSelectQueryComposer > xComposer( xFactory->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr), UNO_QUERY_THROW ); xComposer->setElementaryQuery( sStatement ); diff --git a/connectivity/source/cpool/ZConnectionWrapper.cxx b/connectivity/source/cpool/ZConnectionWrapper.cxx index 8b1db6f2cd2f..1a09999c846d 100644 --- a/connectivity/source/cpool/ZConnectionWrapper.cxx +++ b/connectivity/source/cpool/ZConnectionWrapper.cxx @@ -42,7 +42,7 @@ OConnectionWeakWrapper::~OConnectionWeakWrapper() } // XServiceInfo -IMPLEMENT_SERVICE_INFO(OConnectionWeakWrapper, "com.sun.star.sdbc.drivers.OConnectionWeakWrapper", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OConnectionWeakWrapper, u"com.sun.star.sdbc.drivers.OConnectionWeakWrapper"_ustr, u"com.sun.star.sdbc.Connection"_ustr) Reference< XStatement > SAL_CALL OConnectionWeakWrapper::createStatement( ) diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index 6044175480b8..160c21bfe7e4 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -115,7 +115,7 @@ sal_Int32 SAL_CALL OPoolCollection::getLoginTimeout( ) OUString SAL_CALL OPoolCollection::getImplementationName( ) { - return "com.sun.star.sdbc.OConnectionPool"; + return u"com.sun.star.sdbc.OConnectionPool"_ustr; } sal_Bool SAL_CALL OPoolCollection::supportsService( const OUString& _rServiceName ) @@ -126,7 +126,7 @@ sal_Bool SAL_CALL OPoolCollection::supportsService( const OUString& _rServiceNam Sequence< OUString > SAL_CALL OPoolCollection::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.ConnectionPool" }; + return { u"com.sun.star.sdbc.ConnectionPool"_ustr }; } Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const OUString& _rURL ) @@ -272,10 +272,10 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu const OUString& _rPath) { OSL_ASSERT(_rxConfProvider.is()); - Sequence< Any > args{ Any(NamedValue( "nodepath", Any(_rPath))) }; + Sequence< Any > args{ Any(NamedValue( u"nodepath"_ustr, Any(_rPath))) }; Reference< XInterface > xInterface( _rxConfProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, args)); OSL_ENSURE( xInterface.is(), diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 3a8493ac290a..60cf3e7ba06a 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -40,7 +40,7 @@ void OCalcCatalog::refreshTables() ::std::vector aVector; Sequence aTypes; OCalcConnection::ODocHolder aDocHolder(static_cast(m_pConnection)); - Reference xResult = m_xMetaData->getTables(Any(), "%", "%", aTypes); + Reference xResult = m_xMetaData->getTables(Any(), u"%"_ustr, u"%"_ustr, aTypes); if (xResult.is()) { diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 275e75f98b38..7cb543d5d9e2 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -120,7 +120,7 @@ Reference< XSpreadsheetDocument> const & OCalcConnection::acquireDoc() try { xComponent = xDesktop->loadComponentFromURL( - m_aFileName, "_blank", 0, aArgs ); + m_aFileName, u"_blank"_ustr, 0, aArgs ); } catch( const Exception& ) { @@ -190,7 +190,7 @@ void OCalcConnection::disposing() // XServiceInfo -IMPLEMENT_SERVICE_INFO(OCalcConnection, "com.sun.star.sdbc.drivers.calc.Connection", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OCalcConnection, u"com.sun.star.sdbc.drivers.calc.Connection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) Reference< XDatabaseMetaData > SAL_CALL OCalcConnection::getMetaData( ) @@ -253,7 +253,7 @@ Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareCall( const OUS ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OConnection_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::prepareCall"_ustr, *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 1b88ab05ff55..6d77b8c4b2f3 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -67,7 +67,7 @@ static bool lcl_IsEmptyOrHidden( const Reference& xSheets, const if (xProp.is()) { bool bVisible; - Any aVisAny = xProp->getPropertyValue("IsVisible"); + Any aVisAny = xProp->getPropertyValue(u"IsVisible"_ustr); if ( (aVisAny >>= bVisible) && !bVisible) return true; // hidden } @@ -108,7 +108,7 @@ static bool lcl_IsUnnamed( const Reference& xRanges, const OUSt { try { - Any aUserAny = xRangeProp->getPropertyValue("IsUserDefined"); + Any aUserAny = xRangeProp->getPropertyValue(u"IsUserDefined"_ustr); bool bUserDefined; if ( aUserAny >>= bUserDefined ) bUnnamed = !bUserDefined; @@ -183,7 +183,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( Reference xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Any aRangesAny = xDocProp->getPropertyValue("DatabaseRanges"); + Any aRangesAny = xDocProp->getPropertyValue(u"DatabaseRanges"_ustr); Reference xRanges; if ( aRangesAny >>= xRanges ) { diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx index eccf97751c8f..1bffa74db424 100644 --- a/connectivity/source/drivers/calc/CDriver.cxx +++ b/connectivity/source/drivers/calc/CDriver.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::lang; OUString SAL_CALL ODriver::getImplementationName( ) { - return "com.sun.star.comp.sdbc.calc.ODriver"; + return u"com.sun.star.comp.sdbc.calc.ODriver"_ustr; } // service names from file::OFileDriver diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index b480ee740f01..da7e74542af3 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -134,7 +134,7 @@ static CellContentType lcl_GetContentOrResultType( const Reference& xCell Reference xProp( xCell, UNO_QUERY ); try { - xProp->getPropertyValue( "CellContentType" ) >>= eCellType; // type of cell content + xProp->getPropertyValue( u"CellContentType"_ustr ) >>= eCellType; // type of cell content } catch (UnknownPropertyException&) { @@ -248,7 +248,7 @@ static void lcl_GetColumnInfo( const Reference& xSheet, const Refe { sal_Int32 nKey = 0; - if ( xProp->getPropertyValue( "NumberFormat" ) >>= nKey ) + if ( xProp->getPropertyValue( u"NumberFormat"_ustr ) >>= nKey ) { const Reference xFormat = xFormats->getByKey( nKey ); if ( xFormat.is() ) @@ -532,7 +532,7 @@ void OCalcTable::construct() Reference xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Reference xRanges(xDocProp->getPropertyValue("DatabaseRanges"),UNO_QUERY); + Reference xRanges(xDocProp->getPropertyValue(u"DatabaseRanges"_ustr),UNO_QUERY); if ( xRanges.is() && xRanges->hasByName( m_Name ) ) { @@ -546,7 +546,7 @@ void OCalcTable::construct() bool bRangeHeader = true; Reference xFiltProp( xDBRange->getFilterDescriptor(), UNO_QUERY ); if ( xFiltProp.is() ) - xFiltProp->getPropertyValue("ContainsHeader") >>= bRangeHeader; + xFiltProp->getPropertyValue(u"ContainsHeader"_ustr) >>= bRangeHeader; Reference xSheetRange( xRefer->getReferredCells(), UNO_QUERY ); Reference xAddr( xSheetRange, UNO_QUERY ); @@ -580,7 +580,7 @@ void OCalcTable::construct() if (xProp.is()) { css::util::Date aDateStruct; - if ( xProp->getPropertyValue("NullDate") >>= aDateStruct ) + if ( xProp->getPropertyValue(u"NullDate"_ustr) >>= aDateStruct ) m_aNullDate = ::Date( aDateStruct.Day, aDateStruct.Month, aDateStruct.Year ); } } diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx index 1f626f7b10d0..d0b23a8b64c6 100644 --- a/connectivity/source/drivers/calc/CTables.cxx +++ b/connectivity/source/drivers/calc/CTables.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::container; sdbcx::ObjectType OCalcTables::createObject(const OUString& _rName) { rtl::Reference pTable = new OCalcTable(this, static_cast(static_cast(m_rParent).getConnection()), - _rName,"TABLE"); + _rName,u"TABLE"_ustr); pTable->construct(); return pTable; } diff --git a/connectivity/source/drivers/component/CDatabaseMetaData.cxx b/connectivity/source/drivers/component/CDatabaseMetaData.cxx index 49d83e36af12..45a932657f67 100644 --- a/connectivity/source/drivers/component/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/component/CDatabaseMetaData.cxx @@ -53,7 +53,7 @@ Reference< XResultSet > OComponentDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow { ODatabaseMetaDataResultSet::getEmptyValue(), - new ORowSetValueDecorator(OUString("VARCHAR")), + new ORowSetValueDecorator(u"VARCHAR"_ustr), new ORowSetValueDecorator(DataType::VARCHAR), new ORowSetValueDecorator(sal_Int32(65535)), ODatabaseMetaDataResultSet::getQuoteValue(), @@ -75,35 +75,35 @@ Reference< XResultSet > OComponentDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(u"DECIMAL"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("BOOL")); + aRow[1] = new ORowSetValueDecorator(u"BOOL"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = new ORowSetValueDecorator(sal_Int32(20)); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = new ORowSetValueDecorator(sal_Int32(15)); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DATE")); + aRow[1] = new ORowSetValueDecorator(u"DATE"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("TIME")); + aRow[1] = new ORowSetValueDecorator(u"TIME"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIME); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(u"TIMESTAMP"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = ODatabaseMetaDataResultSet::get0Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); @@ -187,10 +187,10 @@ Reference< XResultSet > SAL_CALL OComponentDatabaseMetaData::getColumns( switch(aRow[11]->getValue().getInt32()) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(OUString("NO")); + aRow[18] = new ORowSetValueDecorator(u"NO"_ustr); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(OUString("YES")); + aRow[18] = new ORowSetValueDecorator(u"YES"_ustr); break; default: aRow[18] = new ORowSetValueDecorator(OUString()); diff --git a/connectivity/source/drivers/component/CPreparedStatement.cxx b/connectivity/source/drivers/component/CPreparedStatement.cxx index 82935cbd747d..dc7dd01304b9 100644 --- a/connectivity/source/drivers/component/CPreparedStatement.cxx +++ b/connectivity/source/drivers/component/CPreparedStatement.cxx @@ -28,6 +28,6 @@ rtl::Reference OComponentPreparedStatement::createResultSet() return new connectivity::component::OComponentResultSet(this,m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(OComponentPreparedStatement,"com.sun.star.sdbc.driver.component.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(OComponentPreparedStatement,u"com.sun.star.sdbc.driver.component.PreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/component/CResultSet.cxx b/connectivity/source/drivers/component/CResultSet.cxx index 75f0711176ff..8a170bab20d4 100644 --- a/connectivity/source/drivers/component/CResultSet.cxx +++ b/connectivity/source/drivers/component/CResultSet.cxx @@ -45,12 +45,12 @@ OComponentResultSet::OComponentResultSet( OStatement_Base* pStmt,connectivity::O OUString SAL_CALL OComponentResultSet::getImplementationName( ) { - return "com.sun.star.sdbcx.component.ResultSet"; + return u"com.sun.star.sdbcx.component.ResultSet"_ustr; } Sequence< OUString > SAL_CALL OComponentResultSet::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr, u"com.sun.star.sdbcx.ResultSet"_ustr }; } sal_Bool SAL_CALL OComponentResultSet::supportsService( const OUString& _rServiceName ) @@ -130,7 +130,7 @@ Sequence< sal_Int32 > SAL_CALL OComponentResultSet::deleteRows( const Sequence< ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XDeleteRows::deleteRows", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XDeleteRows::deleteRows"_ustr, *this ); } bool OComponentResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) diff --git a/connectivity/source/drivers/component/CStatement.cxx b/connectivity/source/drivers/component/CStatement.cxx index ff072ab5f548..61903e01ad08 100644 --- a/connectivity/source/drivers/component/CStatement.cxx +++ b/connectivity/source/drivers/component/CStatement.cxx @@ -28,7 +28,7 @@ rtl::Reference OComponentStatement::createResultSet() return new connectivity::component::OComponentResultSet(this, m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(OComponentStatement, "com.sun.star.sdbc.driver.component.Statement", - "com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(OComponentStatement, u"com.sun.star.sdbc.driver.component.Statement"_ustr, + u"com.sun.star.sdbc.Statement"_ustr); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 79dce7ba2ce0..6af3440b6071 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -39,7 +39,7 @@ void ODbaseCatalog::refreshTables() { ::std::vector aVector; Sequence aTypes; - Reference xResult = m_xMetaData->getTables(Any(), "%", "%", aTypes); + Reference xResult = m_xMetaData->getTables(Any(), u"%"_ustr, u"%"_ustr, aTypes); if (xResult.is()) { diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx index 7992bc10a0d5..696f7dd3d53c 100644 --- a/connectivity/source/drivers/dbase/DConnection.cxx +++ b/connectivity/source/drivers/dbase/DConnection.cxx @@ -47,7 +47,7 @@ ODbaseConnection::~ODbaseConnection() // XServiceInfo -IMPLEMENT_SERVICE_INFO(ODbaseConnection, "com.sun.star.sdbc.drivers.dbase.Connection", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(ODbaseConnection, u"com.sun.star.sdbc.drivers.dbase.Connection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) @@ -102,7 +102,7 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const OUString& /*sql*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::prepareCall"_ustr, *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 5192b308d19d..7e17e1fc0d79 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -61,19 +61,19 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow { ODatabaseMetaDataResultSet::getEmptyValue(), - new ORowSetValueDecorator(OUString("VARCHAR")), + new ORowSetValueDecorator(u"VARCHAR"_ustr), new ORowSetValueDecorator(DataType::VARCHAR), new ORowSetValueDecorator(sal_Int32(254)), ODatabaseMetaDataResultSet::getQuoteValue(), ODatabaseMetaDataResultSet::getQuoteValue(), - new ORowSetValueDecorator(OUString("length")), + new ORowSetValueDecorator(u"length"_ustr), new ORowSetValueDecorator(sal_Int32(ColumnValue::NULLABLE)), ODatabaseMetaDataResultSet::get1Value(), new ORowSetValueDecorator(sal_Int32(ColumnSearch::FULL)), ODatabaseMetaDataResultSet::get1Value(), ODatabaseMetaDataResultSet::get0Value(), ODatabaseMetaDataResultSet::get0Value(), - new ORowSetValueDecorator(OUString("C")), + new ORowSetValueDecorator(u"C"_ustr), ODatabaseMetaDataResultSet::get0Value(), ODatabaseMetaDataResultSet::get0Value(), ODatabaseMetaDataResultSet::getEmptyValue(), @@ -83,62 +83,62 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("LONGVARCHAR")); + aRow[1] = new ORowSetValueDecorator(u"LONGVARCHAR"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR); aRow[3] = new ORowSetValueDecorator(sal_Int32(2147483647)); aRow[6] = new ORowSetValueDecorator(); - aRow[13] = new ORowSetValueDecorator(OUString("M")); + aRow[13] = new ORowSetValueDecorator(u"M"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DATE")); + aRow[1] = new ORowSetValueDecorator(u"DATE"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator(sal_Int32(10)); - aRow[13] = new ORowSetValueDecorator(OUString("D")); + aRow[13] = new ORowSetValueDecorator(u"D"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("BOOLEAN")); + aRow[1] = new ORowSetValueDecorator(u"BOOLEAN"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = ODatabaseMetaDataResultSet::get1Value(); aRow[4] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[6] = new ORowSetValueDecorator(OUString()); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); - aRow[13] = new ORowSetValueDecorator(OUString("L")); + aRow[13] = new ORowSetValueDecorator(u"L"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DOUBLE")); + aRow[1] = new ORowSetValueDecorator(u"DOUBLE"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator(sal_Int32(8)); - aRow[13] = new ORowSetValueDecorator(OUString("B")); + aRow[13] = new ORowSetValueDecorator(u"B"_ustr); aRows.push_back(aRow); aRow[11] = new ORowSetValueDecorator(ORowSetValue(true)); - aRow[13] = new ORowSetValueDecorator(OUString("Y")); + aRow[13] = new ORowSetValueDecorator(u"Y"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(u"TIMESTAMP"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[11] = new ORowSetValueDecorator(ORowSetValue(false)); - aRow[13] = new ORowSetValueDecorator(OUString("T")); + aRow[13] = new ORowSetValueDecorator(u"T"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("INTEGER")); + aRow[1] = new ORowSetValueDecorator(u"INTEGER"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::INTEGER); aRow[3] = new ORowSetValueDecorator(sal_Int32(10)); - aRow[13] = new ORowSetValueDecorator(OUString("I")); + aRow[13] = new ORowSetValueDecorator(u"I"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(u"DECIMAL"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator(sal_Int32(20)); - aRow[6] = new ORowSetValueDecorator(OUString("length,scale")); - aRow[13] = new ORowSetValueDecorator(OUString("F")); + aRow[6] = new ORowSetValueDecorator(u"length,scale"_ustr); + aRow[13] = new ORowSetValueDecorator(u"F"_ustr); aRows.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("NUMERIC")); + aRow[1] = new ORowSetValueDecorator(u"NUMERIC"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator(sal_Int32(16)); - aRow[13] = new ORowSetValueDecorator(OUString("N")); + aRow[13] = new ORowSetValueDecorator(u"N"_ustr); aRow[15] = new ORowSetValueDecorator(sal_Int32(16)); aRows.push_back(aRow); @@ -211,10 +211,10 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( switch(aRow[11]->getValue().getInt32()) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(OUString("NO")); + aRow[18] = new ORowSetValueDecorator(u"NO"_ustr); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(OUString("YES")); + aRow[18] = new ORowSetValueDecorator(u"YES"_ustr); break; default: aRow[18] = new ORowSetValueDecorator(OUString()); @@ -256,7 +256,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( ODatabaseMetaDataResultSet::ORow aRow(14); aRow[5] = new ORowSetValueDecorator(OUString()); - aRow[10] = new ORowSetValueDecorator(OUString("A")); + aRow[10] = new ORowSetValueDecorator(u"A"_ustr); Reference< XIndexesSupplier> xTable( xNames->getByName(table), css::uno::UNO_QUERY); @@ -349,7 +349,7 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) bool bReadOnly = false; ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext()); - aFile.getPropertyValue("IsReadOnly") >>= bReadOnly; + aFile.getPropertyValue(u"IsReadOnly"_ustr) >>= bReadOnly; return bReadOnly; } diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 21414fd7fc7f..5191dc61f586 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star::lang; OUString SAL_CALL ODriver::getImplementationName( ) { - return "com.sun.star.comp.sdbc.dbase.ODriver"; + return u"com.sun.star.comp.sdbc.dbase.ODriver"_ustr; } @@ -80,29 +80,29 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString { if ( acceptsURL(url) ) { - Sequence< OUString > aBoolean { "0", "1" }; + Sequence< OUString > aBoolean { u"0"_ustr, u"1"_ustr }; return { { - "CharSet" - ,"CharSet of the database." + u"CharSet"_ustr + ,u"CharSet of the database."_ustr ,false ,OUString() ,Sequence< OUString >() }, { - "ShowDeleted" - ,"Display inactive records." + u"ShowDeleted"_ustr + ,u"Display inactive records."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "EnableSQL92Check" - ,"Use SQL92 naming constraints." + u"EnableSQL92Check"_ustr + ,u"Use SQL92 naming constraints."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean } }; diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index a3ee4a2688df..1c32440e6b89 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -46,7 +46,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::uno; using namespace com::sun::star::beans; -IMPLEMENT_SERVICE_INFO(ODbaseIndex,"com.sun.star.sdbcx.driver.dbase.Index","com.sun.star.sdbcx.Index"); +IMPLEMENT_SERVICE_INFO(ODbaseIndex,u"com.sun.star.sdbcx.driver.dbase.Index"_ustr,u"com.sun.star.sdbcx.Index"_ustr); ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) : OIndex(true/*_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()*/) diff --git a/connectivity/source/drivers/dbase/DPreparedStatement.cxx b/connectivity/source/drivers/dbase/DPreparedStatement.cxx index f349701e620b..3dc39e68857a 100644 --- a/connectivity/source/drivers/dbase/DPreparedStatement.cxx +++ b/connectivity/source/drivers/dbase/DPreparedStatement.cxx @@ -28,7 +28,8 @@ rtl::Reference ODbasePreparedStatement::createResultSet() return new ODbaseResultSet(this, m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(ODbasePreparedStatement, "com.sun.star.sdbc.driver.dbase.PreparedStatement", - "com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(ODbasePreparedStatement, + u"com.sun.star.sdbc.driver.dbase.PreparedStatement"_ustr, + u"com.sun.star.sdbc.PreparedStatement"_ustr); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index c257747a75a3..99357a01fcc8 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -49,12 +49,12 @@ ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParse OUString SAL_CALL ODbaseResultSet::getImplementationName( ) { - return "com.sun.star.sdbcx.dbase.ResultSet"; + return u"com.sun.star.sdbcx.dbase.ResultSet"_ustr; } Sequence< OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr, u"com.sun.star.sdbcx.ResultSet"_ustr }; } sal_Bool SAL_CALL ODbaseResultSet::supportsService( const OUString& _rServiceName ) @@ -149,7 +149,7 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< An ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XDeleteRows::deleteRows", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XDeleteRows::deleteRows"_ustr, *this ); } bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex) diff --git a/connectivity/source/drivers/dbase/DStatement.cxx b/connectivity/source/drivers/dbase/DStatement.cxx index 0da788f98e54..c6245e852d31 100644 --- a/connectivity/source/drivers/dbase/DStatement.cxx +++ b/connectivity/source/drivers/dbase/DStatement.cxx @@ -29,6 +29,6 @@ rtl::Reference ODbaseStatement::createResultSet() return new ODbaseResultSet(this,m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(ODbaseStatement,"com.sun.star.sdbc.driver.dbase.Statement","com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(ODbaseStatement,u"com.sun.star.sdbc.driver.dbase.Statement"_ustr,u"com.sun.star.sdbc.Statement"_ustr); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 0caeb5be7c3f..22caafc43fc6 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1052,7 +1052,7 @@ bool ODbaseTable::CreateImpl() try { Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference(), comphelper::getProcessComponentContext()); - aContent.executeCommand( "delete", css::uno::Any( true ) ); + aContent.executeCommand( u"delete"_ustr, css::uno::Any( true ) ); } catch(const Exception&) // an exception is thrown when no file exists { @@ -1080,7 +1080,7 @@ bool ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + aMemoContent.executeCommand( u"delete"_ustr, css::uno::Any( true ) ); } catch(const Exception&) { @@ -1098,7 +1098,7 @@ bool ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + aMemoContent.executeCommand( u"delete"_ustr, css::uno::Any( true ) ); } catch(const ContentCreationException&) { @@ -1439,7 +1439,7 @@ bool ODbaseTable::Drop_Static(std::u16string_view _sUrl, bool _bHasMemoFields, O try { ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aDeleteContent.executeCommand( "delete", Any( true ) ); + aDeleteContent.executeCommand( u"delete"_ustr, Any( true ) ); } catch(const Exception&) { @@ -2308,14 +2308,14 @@ namespace { Content aContent(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE),Reference(), comphelper::getProcessComponentContext()); - Sequence< PropertyValue > aProps{ { "Title", + Sequence< PropertyValue > aProps{ { u"Title"_ustr, -1, // n/a Any(sNewName), css::beans::PropertyState_DIRECT_VALUE } }; Sequence< Any > aValues; - aContent.executeCommand( "setPropertyValues",Any(aProps) ) >>= aValues; + aContent.executeCommand( u"setPropertyValues"_ustr,Any(aProps) ) >>= aValues; if(aValues.hasElements() && aValues[0].hasValue()) - throw Exception("setPropertyValues returned non-zero", nullptr); + throw Exception(u"setPropertyValues returned non-zero"_ustr, nullptr); } catch(const Exception&) { diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 3424801e3842..e17f301a1042 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star::container; sdbcx::ObjectType ODbaseTables::createObject(const OUString& _rName) { rtl::Reference pRet = new ODbaseTable(this, static_cast(static_cast(m_rParent).getConnection()), - _rName,"TABLE"); + _rName,u"TABLE"_ustr); pRet->construct(); return pRet; @@ -79,7 +79,7 @@ sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const R catch(Exception& ex) { css::uno::Any anyEx = cppu::getCaughtException(); - throw SQLException( ex.Message, nullptr, "", 0, anyEx ); + throw SQLException( ex.Message, nullptr, u""_ustr, 0, anyEx ); } } return createObject( _rForName ); diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index d16a6377d1d1..42c66f7f4542 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -37,9 +37,9 @@ OEvoabCatalog::OEvoabCatalog(OEvoabConnection* _pCon) : void OEvoabCatalog::refreshTables() { ::std::vector< OUString> aVector; - Sequence< OUString > aTypes { "TABLE" }; + Sequence< OUString > aTypes { u"TABLE"_ustr }; Reference< XResultSet > xResult = m_xMetaData->getTables( - Any(), "%", "%", aTypes); + Any(), u"%"_ustr, u"%"_ustr, aTypes); if(xResult.is()) { diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index 66fc7ecb6511..4c4d46e63fd8 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -56,7 +56,7 @@ OEvoabConnection::~OEvoabConnection() // XServiceInfo -IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connection", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OEvoabConnection, u"com.sun.star.sdbc.drivers.evoab.Connection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) void OEvoabConnection::construct(const OUString& url, const Sequence< PropertyValue >& info) @@ -147,7 +147,7 @@ Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareStatement( con Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareCall( const OUString& /*sql*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::prepareCall"_ustr, *this ); return nullptr; } sal_Bool SAL_CALL OEvoabConnection::isClosed( ) @@ -189,7 +189,7 @@ void OEvoabConnection::disposing() // -------------------------------- stubbed methods ------------------------------------------------ void SAL_CALL OEvoabConnection::setAutoCommit( sal_Bool /*autoCommit*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setAutoCommit", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setAutoCommit"_ustr, *this ); } sal_Bool SAL_CALL OEvoabConnection::getAutoCommit( ) { @@ -203,7 +203,7 @@ void SAL_CALL OEvoabConnection::rollback( ) } void SAL_CALL OEvoabConnection::setReadOnly( sal_Bool /*readOnly*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setReadOnly", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setReadOnly"_ustr, *this ); } sal_Bool SAL_CALL OEvoabConnection::isReadOnly( ) { @@ -211,7 +211,7 @@ sal_Bool SAL_CALL OEvoabConnection::isReadOnly( ) } void SAL_CALL OEvoabConnection::setCatalog( const OUString& /*catalog*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setCatalog", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setCatalog"_ustr, *this ); } OUString SAL_CALL OEvoabConnection::getCatalog( ) @@ -220,7 +220,7 @@ OUString SAL_CALL OEvoabConnection::getCatalog( ) } void SAL_CALL OEvoabConnection::setTransactionIsolation( sal_Int32 /*level*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setTransactionIsolation", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setTransactionIsolation"_ustr, *this ); } sal_Int32 SAL_CALL OEvoabConnection::getTransactionIsolation( ) @@ -230,12 +230,12 @@ sal_Int32 SAL_CALL OEvoabConnection::getTransactionIsolation( ) Reference< css::container::XNameAccess > SAL_CALL OEvoabConnection::getTypeMap( ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::getTypeMap", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::getTypeMap"_ustr, *this ); return nullptr; } void SAL_CALL OEvoabConnection::setTypeMap( const Reference< css::container::XNameAccess >& /*typeMap*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setTypeMap", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setTypeMap"_ustr, *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 110d01feb213..060c4480bd87 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -190,9 +190,9 @@ namespace connectivity::evoab switch( getFieldType( nCol ) ) { case DataType::BIT: - return "BIT"; + return u"BIT"_ustr; case DataType::VARCHAR: - return "VARCHAR"; + return u"VARCHAR"_ustr; default: break; } @@ -290,10 +290,10 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns( // CHAR_OCTET_LENGTH, refer to [5] aRow[16] = new ORowSetValueDecorator(s_nCHAR_OCTET_LENGTH); // IS_NULLABLE - aRow[18] = new ORowSetValueDecorator(OUString("YES")); + aRow[18] = new ORowSetValueDecorator(u"YES"_ustr); - aRow[3] = new ORowSetValueDecorator(OUString("TABLE")); + aRow[3] = new ORowSetValueDecorator(u"TABLE"_ustr); ::osl::MutexGuard aGuard( m_aMutex ); initFields(); @@ -447,7 +447,7 @@ OUString SAL_CALL OEvoabDatabaseMetaData::getCatalogTerm( ) OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " - return "\""; + return u"\""_ustr; } OUString SAL_CALL OEvoabDatabaseMetaData::getExtraNameCharacters( ) @@ -803,12 +803,12 @@ OUString SAL_CALL OEvoabDatabaseMetaData::getDriverName( ) OUString SAL_CALL OEvoabDatabaseMetaData::getDriverVersion() { - return "1"; + return u"1"_ustr; } OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductVersion( ) { - return "0"; + return u"0"_ustr; } OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductName( ) @@ -1019,7 +1019,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow { ODatabaseMetaDataResultSet::getEmptyValue() , - new ORowSetValueDecorator(OUString("VARCHAR")) , + new ORowSetValueDecorator(u"VARCHAR"_ustr) , new ORowSetValueDecorator(DataType::VARCHAR) , new ORowSetValueDecorator(sal_Int32(s_nCHAR_OCTET_LENGTH)) , ODatabaseMetaDataResultSet::getQuoteValue() , @@ -1041,7 +1041,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("VARCHAR")); + aRow[1] = new ORowSetValueDecorator(u"VARCHAR"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[3] = new ORowSetValueDecorator(sal_Int32(65535)); tmp.push_back(aRow); @@ -1146,7 +1146,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XDatabaseMetaDaza::getUDTs", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XDatabaseMetaDaza::getUDTs"_ustr, *this ); return nullptr; } diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index c72d9b1a189f..2babee09288c 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -89,7 +89,7 @@ Sequence< OUString > SAL_CALL OEvoabDriver::getSupportedServiceNames( ) { // which service is supported // for more information @see com.sun.star.sdbc.Driver - return { "com.sun.star.sdbc.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr }; } diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx index 2ed8b0f166b9..f518122ebfcd 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx @@ -34,7 +34,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -IMPLEMENT_SERVICE_INFO(OEvoabPreparedStatement,"com.sun.star.sdbcx.evoab.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(OEvoabPreparedStatement,u"com.sun.star.sdbcx.evoab.PreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr); OEvoabPreparedStatement::OEvoabPreparedStatement( OEvoabConnection* _pConnection ) @@ -133,14 +133,14 @@ sal_Int32 SAL_CALL OEvoabPreparedStatement::executeUpdate( ) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OCommonStatement_IBase::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XStatement::executeUpdate", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XStatement::executeUpdate"_ustr, *this ); return 0; } void SAL_CALL OEvoabPreparedStatement::setString( sal_Int32 /*parameterIndex*/, const OUString& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setString", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setString"_ustr, *this ); } @@ -164,97 +164,97 @@ Reference< XResultSet > SAL_CALL OEvoabPreparedStatement::executeQuery( ) void SAL_CALL OEvoabPreparedStatement::setBoolean( sal_Int32 /*parameterIndex*/, sal_Bool /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setBoolean", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setBoolean"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setByte( sal_Int32 /*parameterIndex*/, sal_Int8 /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setByte", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setByte"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const Date& /*aData*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setDate", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setDate"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setTime", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setTime"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setTimestamp( sal_Int32 /*parameterIndex*/, const DateTime& /*aVal*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setTimestamp", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setTimestamp"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setDouble( sal_Int32 /*parameterIndex*/, double /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setDouble", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setDouble"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setFloat( sal_Int32 /*parameterIndex*/, float /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setFloat", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setFloat"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setInt( sal_Int32 /*parameterIndex*/, sal_Int32 /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setInt", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setInt"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setLong", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setLong"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setNull( sal_Int32 /*parameterIndex*/, sal_Int32 /*sqlType*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setNull", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setNull"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setClob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setClob"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setBlob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setBlob"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setArray", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setArray"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setRef", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setRef"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setObjectWithInfo( sal_Int32 /*parameterIndex*/, const Any& /*x*/, sal_Int32 /*sqlType*/, sal_Int32 /*scale*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setObjectWithInfo", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setObjectWithInfo"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setObjectNull( sal_Int32 /*parameterIndex*/, sal_Int32 /*sqlType*/, const OUString& /*typeName*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setObjectNull", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setObjectNull"_ustr, *this ); } @@ -273,25 +273,25 @@ void SAL_CALL OEvoabPreparedStatement::setObject( sal_Int32 parameterIndex, cons void SAL_CALL OEvoabPreparedStatement::setShort( sal_Int32 /*parameterIndex*/, sal_Int16 /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setShort", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setShort"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setBytes( sal_Int32 /*parameterIndex*/, const Sequence< sal_Int8 >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setBytes", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setBytes"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setCharacterStream( sal_Int32 /*parameterIndex*/, const Reference< XInputStream >& /*x*/, sal_Int32 /*length*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setCharacterStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setCharacterStream"_ustr, *this ); } void SAL_CALL OEvoabPreparedStatement::setBinaryStream( sal_Int32 /*parameterIndex*/, const Reference< XInputStream >& /*x*/, sal_Int32 /*length*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setBinaryStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setBinaryStream"_ustr, *this ); } diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index bc9656337097..95a25d664602 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -58,12 +58,12 @@ namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; OUString SAL_CALL OEvoabResultSet::getImplementationName( ) { - return "com.sun.star.sdbcx.evoab.ResultSet"; + return u"com.sun.star.sdbcx.evoab.ResultSet"_ustr; } Sequence< OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr }; } sal_Bool SAL_CALL OEvoabResultSet::supportsService( const OUString& _rServiceName ) @@ -657,103 +657,103 @@ sal_Bool SAL_CALL OEvoabResultSet::getBoolean( sal_Int32 nColumnNum ) sal_Int64 SAL_CALL OEvoabResultSet::getLong( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getLong", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getLong"_ustr, *this ); return sal_Int64(); } Reference< XArray > SAL_CALL OEvoabResultSet::getArray( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getArray"_ustr, *this ); return nullptr; } Reference< XClob > SAL_CALL OEvoabResultSet::getClob( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getClob"_ustr, *this ); return nullptr; } Reference< XBlob > SAL_CALL OEvoabResultSet::getBlob( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBlob"_ustr, *this ); return nullptr; } Reference< XRef > SAL_CALL OEvoabResultSet::getRef( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getRef"_ustr, *this ); return nullptr; } Any SAL_CALL OEvoabResultSet::getObject( sal_Int32 /*nColumnNum*/, const Reference< css::container::XNameAccess >& /*typeMap*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getObject", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getObject"_ustr, *this ); return Any(); } sal_Int16 SAL_CALL OEvoabResultSet::getShort( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getShort", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getShort"_ustr, *this ); return 0; } css::util::Time SAL_CALL OEvoabResultSet::getTime( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getTime", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getTime"_ustr, *this ); return css::util::Time(); } util::DateTime SAL_CALL OEvoabResultSet::getTimestamp( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getTimestamp", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getTimestamp"_ustr, *this ); return css::util::DateTime(); } Reference< XInputStream > SAL_CALL OEvoabResultSet::getBinaryStream( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBinaryStream"_ustr, *this ); return nullptr; } Reference< XInputStream > SAL_CALL OEvoabResultSet::getCharacterStream( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getCharacterStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getCharacterStream"_ustr, *this ); return nullptr; } sal_Int8 SAL_CALL OEvoabResultSet::getByte( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getByte", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getByte"_ustr, *this ); return 0; } Sequence< sal_Int8 > SAL_CALL OEvoabResultSet::getBytes( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBytes", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBytes"_ustr, *this ); return Sequence< sal_Int8 >(); } css::util::Date SAL_CALL OEvoabResultSet::getDate( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getDate", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getDate"_ustr, *this ); return css::util::Date(); } double SAL_CALL OEvoabResultSet::getDouble( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getDouble", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getDouble"_ustr, *this ); return 0; } float SAL_CALL OEvoabResultSet::getFloat( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getFloat", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getFloat"_ustr, *this ); return 0; } sal_Int32 SAL_CALL OEvoabResultSet::getInt( sal_Int32 /*nColumnNum*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getInt", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getInt"_ustr, *this ); return 0; } // XRow Interface Ends diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 91ebdda56c70..97f5b5833dfe 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -640,7 +640,7 @@ Reference< XPropertySetInfo > SAL_CALL OCommonStatement::getPropertySetInfo( ) // = OStatement -IMPLEMENT_SERVICE_INFO( OStatement, "com.sun.star.comp.sdbcx.evoab.OStatement", "com.sun.star.sdbc.Statement" ); +IMPLEMENT_SERVICE_INFO( OStatement, u"com.sun.star.comp.sdbcx.evoab.OStatement"_ustr, u"com.sun.star.sdbc.Statement"_ustr ); IMPLEMENT_FORWARD_XINTERFACE2( OStatement, OCommonStatement, OStatement_IBase ) @@ -672,7 +672,7 @@ sal_Int32 SAL_CALL OStatement::executeUpdate( const OUString& /*sql*/ ) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OCommonStatement_IBase::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XStatement::executeUpdate", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XStatement::executeUpdate"_ustr, *this ); return 0; } diff --git a/connectivity/source/drivers/evoab2/NTable.cxx b/connectivity/source/drivers/evoab2/NTable.cxx index 631c27db244d..94a20480f8d2 100644 --- a/connectivity/source/drivers/evoab2/NTable.cxx +++ b/connectivity/source/drivers/evoab2/NTable.cxx @@ -53,7 +53,7 @@ void OEvoabTable::refreshColumns() if (!isNew()) { Reference< XResultSet > xResult = m_pConnection->getMetaData()->getColumns( - Any(), m_SchemaName, m_Name, "%"); + Any(), m_SchemaName, m_Name, u"%"_ustr); if (xResult.is()) { diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index 3be63e1e1049..d972564a4668 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -33,9 +33,9 @@ using namespace ::com::sun::star::sdbc; ObjectType OEvoabTables::createObject(const OUString& aName) { - Sequence< OUString > aTypes { "TABLE" }; + Sequence< OUString > aTypes { u"TABLE"_ustr }; - Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),"%",aName,aTypes); + Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),u"%"_ustr,aName,aTypes); ObjectType xRet; if(xResult.is()) @@ -49,8 +49,8 @@ ObjectType OEvoabTables::createObject(const OUString& aName) aName, xRow->getString(4), xRow->getString(5), - "", - ""); + u""_ustr, + u""_ustr); } } diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index 54ad24bf1d59..2a33bded28fe 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -54,7 +54,7 @@ void OFileCatalog::refreshTables() ::std::vector< OUString> aVector; Sequence< OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - "%", "%", aTypes); + u"%"_ustr, u"%"_ustr, aTypes); fillNames(xResult,aVector); if(m_pTables) diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index ffe804b021d9..d1635906e24a 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -166,7 +166,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& } // set fields to fetch - Sequence< OUString > aProps { "Title" }; + Sequence< OUString > aProps { u"Title"_ustr }; try { @@ -210,7 +210,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& } // XServiceInfo -IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.file.Connection", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OConnection, u"com.sun.star.sdbc.drivers.file.Connection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) Reference< XStatement > SAL_CALL OConnection::createStatement( ) @@ -238,7 +238,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& /*sql*/ ) { - throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this ); + throwFeatureNotImplementedSQLException( u"XConnection::prepareCall"_ustr, *this ); } OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) @@ -313,7 +313,7 @@ sal_Bool SAL_CALL OConnection::isReadOnly( ) void SAL_CALL OConnection::setCatalog( const OUString& /*catalog*/ ) { - throwFeatureNotImplementedSQLException( "XConnection::setCatalog", *this ); + throwFeatureNotImplementedSQLException( u"XConnection::setCatalog"_ustr, *this ); } OUString SAL_CALL OConnection::getCatalog( ) @@ -323,7 +323,7 @@ OUString SAL_CALL OConnection::getCatalog( ) void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 /*level*/ ) { - throwFeatureNotImplementedSQLException( "XConnection::setTransactionIsolation", *this ); + throwFeatureNotImplementedSQLException( u"XConnection::setTransactionIsolation"_ustr, *this ); } sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) @@ -386,7 +386,7 @@ Reference< XTablesSupplier > OConnection::createCatalog() Reference< XDynamicResultSet > OConnection::getDir() const { Reference xContent; - Sequence< OUString > aProps { "Title" }; + Sequence< OUString > aProps { u"Title"_ustr }; try { Reference xIdent = getContent()->getIdentifier(); @@ -418,7 +418,7 @@ void OConnection::throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsM next <<= SQLException(_rsMessage, context, OUString(), 0, Any()); SQLException aError( getResources().getResourceStringWithSubstitution(STR_NO_VALID_FILE_URL, "$URL$", _rsUrl), - context, "S1000", 0, next); + context, u"S1000"_ustr, 0, next); throw aError; } diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 6d157bb575da..f645d19277e0 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -393,7 +393,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aRow[2] = new ORowSetValueDecorator(*pBegin); aRow[6] = ODatabaseMetaDataResultSet::getSelectValue(); - aRow[7] = new ORowSetValueDecorator(OUString("NO")); + aRow[7] = new ORowSetValueDecorator(u"NO"_ustr); aRows.push_back(aRow); Reference< XPropertySet> xTable( @@ -492,7 +492,7 @@ OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { - return "\""; + return u"\""_ustr; } OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) @@ -619,7 +619,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) { rtl::Reference pResult = new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTableTypes ); ODatabaseMetaDataResultSet::ORows aRows; - aRows.push_back( { ODatabaseMetaDataResultSet::getEmptyValue(), new ORowSetValueDecorator(OUString("TABLE")) } ); + aRows.push_back( { ODatabaseMetaDataResultSet::getEmptyValue(), new ORowSetValueDecorator(u"TABLE"_ustr) } ); pResult->setRows(std::move(aRows)); return pResult; } @@ -836,7 +836,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) OUString SAL_CALL ODatabaseMetaData::getURL( ) { - return "sdbc:file:"; + return u"sdbc:file:"_ustr; } OUString SAL_CALL ODatabaseMetaData::getUserName( ) @@ -901,12 +901,12 @@ OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) { - return "UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT"; + return u"UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT"_ustr; } OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) { - return "DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW"; + return u"DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW"_ustr; } OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) @@ -916,7 +916,7 @@ OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) { - return "ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS"; + return u"ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS"_ustr; } sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index a72aa161fe58..1d92b922c15c 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -63,7 +63,7 @@ void OFileDriver::disposing() OUString SAL_CALL OFileDriver::getImplementationName( ) { - return "com.sun.star.sdbc.driver.file.Driver"; + return u"com.sun.star.sdbc.driver.file.Driver"_ustr; } sal_Bool SAL_CALL OFileDriver::supportsService( const OUString& _rServiceName ) @@ -74,7 +74,7 @@ sal_Bool SAL_CALL OFileDriver::supportsService( const OUString& _rServiceName ) Sequence< OUString > SAL_CALL OFileDriver::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.Driver", "com.sun.star.sdbcx.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr, u"com.sun.star.sdbcx.Driver"_ustr }; } @@ -100,48 +100,48 @@ Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const OUSt if ( acceptsURL(url) ) { - Sequence< OUString > aBoolean { "0", "1" }; + Sequence< OUString > aBoolean { u"0"_ustr, u"1"_ustr }; return { { - "CharSet" - ,"CharSet of the database." + u"CharSet"_ustr + ,u"CharSet of the database."_ustr ,false ,{} ,{} }, { - "Extension" - ,"Extension of the file format." + u"Extension"_ustr + ,u"Extension of the file format."_ustr ,false - ,".*" + ,u".*"_ustr ,{} }, { - "ShowDeleted" - ,"Display inactive records." + u"ShowDeleted"_ustr + ,u"Display inactive records."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "EnableSQL92Check" - ,"Use SQL92 naming constraints." + u"EnableSQL92Check"_ustr + ,u"Use SQL92 naming constraints."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "UseRelativePath" - ,"Handle the connection url as relative path." + u"UseRelativePath"_ustr + ,u"Handle the connection url as relative path."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "URL" - ,"The URL of the database document which is used to create an absolute path." + u"URL"_ustr + ,u"The URL of the database document which is used to create an absolute path."_ustr ,false ,{} ,{} diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index f2a8571b61e5..33ca5a3b47d7 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -46,7 +46,7 @@ using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; using namespace com::sun::star; -IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbc.driver.file.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(OPreparedStatement,u"com.sun.star.sdbc.driver.file.PreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr); OPreparedStatement::OPreparedStatement( OConnection* _pConnection) : OStatement_BASE2( _pConnection ) @@ -251,7 +251,7 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x void SAL_CALL OPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) { - throwFeatureNotImplementedSQLException( "XParameters::setLong", *this ); + throwFeatureNotImplementedSQLException( u"XParameters::setLong"_ustr, *this ); } @@ -269,25 +269,25 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 / void SAL_CALL OPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) { - throwFeatureNotImplementedSQLException( "XParameters::setClob", *this ); + throwFeatureNotImplementedSQLException( u"XParameters::setClob"_ustr, *this ); } void SAL_CALL OPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) { - throwFeatureNotImplementedSQLException( "XParameters::setBlob", *this ); + throwFeatureNotImplementedSQLException( u"XParameters::setBlob"_ustr, *this ); } void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) { - throwFeatureNotImplementedSQLException( "XParameters::setArray", *this ); + throwFeatureNotImplementedSQLException( u"XParameters::setArray"_ustr, *this ); } void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) { - throwFeatureNotImplementedSQLException( "XParameters::setRef", *this ); + throwFeatureNotImplementedSQLException( u"XParameters::setRef"_ustr, *this ); } diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index b89cf38bd285..60fd9b6d4df2 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -66,7 +66,7 @@ namespace } } -IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.drivers.file.ResultSet","com.sun.star.sdbc.ResultSet"); +IMPLEMENT_SERVICE_INFO(OResultSet,u"com.sun.star.sdbcx.drivers.file.ResultSet"_ustr,u"com.sun.star.sdbc.ResultSet"_ustr); OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIterator) : OResultSet_BASE(m_aMutex) ,::comphelper::OPropertyContainer(OResultSet_BASE::rBHelper) @@ -651,7 +651,7 @@ void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) void SAL_CALL OResultSet::updateLong( sal_Int32 /*columnIndex*/, sal_Int64 /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateLong", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XRowUpdate::updateLong"_ustr, *this ); } void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index b6b4b8b125fc..9fdafb171e42 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -223,7 +223,7 @@ rtl::Reference OStatement::createResultSet() return new OResultSet(this,m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbc.driver.file.Statement","com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(OStatement,u"com.sun.star.sdbc.driver.file.Statement"_ustr,u"com.sun.star.sdbc.Statement"_ustr); void SAL_CALL OStatement::acquire() noexcept { diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 06dc187fa20e..120af8a61a11 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -74,7 +74,7 @@ void OFileTable::refreshColumns() { ::std::vector< OUString> aVector; Reference< XResultSet > xResult = m_pConnection->getMetaData()->getColumns(Any(), - m_SchemaName,m_Name, "%"); + m_SchemaName,m_Name, u"%"_ustr); if(xResult.is()) { diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx index 036770556b91..774246fa18d4 100644 --- a/connectivity/source/drivers/firebird/Blob.cxx +++ b/connectivity/source/drivers/firebird/Blob.cxx @@ -205,7 +205,7 @@ uno::Sequence< sal_Int8 > SAL_CALL Blob::getBytes(sal_Int64 nPosition, ensureBlobIsOpened(); if (nPosition > m_nBlobLength || nPosition < 1) - throw lang::IllegalArgumentException("nPosition out of range", *this, 0); + throw lang::IllegalArgumentException(u"nPosition out of range"_ustr, *this, 0); // We only have to read as many bytes as are available, i.e. nPosition+nBytes // can legally be greater than the total length, hence we don't bother to check. @@ -234,13 +234,13 @@ uno::Reference< XInputStream > SAL_CALL Blob::getBinaryStream() sal_Int64 SAL_CALL Blob::position(const uno::Sequence< sal_Int8 >& /*rPattern*/, sal_Int64 /*nStart*/) { - ::dbtools::throwFeatureNotImplementedSQLException("Blob::position", *this); + ::dbtools::throwFeatureNotImplementedSQLException(u"Blob::position"_ustr, *this); } sal_Int64 SAL_CALL Blob::positionOfBlob(const uno::Reference< XBlob >& /*rPattern*/, sal_Int64 /*aStart*/) { - ::dbtools::throwFeatureNotImplementedSQLException("Blob::positionOfBlob", *this); + ::dbtools::throwFeatureNotImplementedSQLException(u"Blob::positionOfBlob"_ustr, *this); } // ---- XInputStream ---------------------------------------------------------- diff --git a/connectivity/source/drivers/firebird/Catalog.cxx b/connectivity/source/drivers/firebird/Catalog.cxx index 2ef4f514b12a..aba0784662a7 100644 --- a/connectivity/source/drivers/firebird/Catalog.cxx +++ b/connectivity/source/drivers/firebird/Catalog.cxx @@ -28,11 +28,11 @@ Catalog::Catalog(const uno::Reference< XConnection >& rConnection): //----- OCatalog ------------------------------------------------------------- void Catalog::refreshTables() { - Sequence< OUString > aTypes {"TABLE", "VIEW"}; + Sequence< OUString > aTypes {u"TABLE"_ustr, u"VIEW"_ustr}; uno::Reference< XResultSet > xTables = m_xMetaData->getTables(Any(), - "%", - "%", + u"%"_ustr, + u"%"_ustr, aTypes); if (!xTables.is()) @@ -55,7 +55,7 @@ void Catalog::refreshTables() void Catalog::refreshViews() { css::uno::Reference xViews - = m_xMetaData->getTables(css::uno::Any(), "%", "%", { "VIEW" }); + = m_xMetaData->getTables(css::uno::Any(), u"%"_ustr, u"%"_ustr, { u"VIEW"_ustr }); if (!xViews.is()) return; @@ -80,7 +80,7 @@ void Catalog::refreshGroups() void Catalog::refreshUsers() { Reference xStmt= m_xMetaData->getConnection()->createStatement(); - uno::Reference< XResultSet > xUsers = xStmt->executeQuery("SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES"); + uno::Reference< XResultSet > xUsers = xStmt->executeQuery(u"SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES"_ustr); if (!xUsers.is()) return; diff --git a/connectivity/source/drivers/firebird/Clob.cxx b/connectivity/source/drivers/firebird/Clob.cxx index 422117f9ef81..95d14c11d08d 100644 --- a/connectivity/source/drivers/firebird/Clob.cxx +++ b/connectivity/source/drivers/firebird/Clob.cxx @@ -70,11 +70,11 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition, sal_Int32 nLength) { if (nPosition < 1) // XClob is indexed from 1 - throw lang::IllegalArgumentException("nPosition < 1", *this, 0); + throw lang::IllegalArgumentException(u"nPosition < 1"_ustr, *this, 0); --nPosition; // make 0-based if (nLength < 0) - throw lang::IllegalArgumentException("nLength < 0", *this, 0); + throw lang::IllegalArgumentException(u"nLength < 0"_ustr, *this, 0); MutexGuard aGuard(m_aMutex); checkDisposed(Clob_BASE::rBHelper.bDisposed); @@ -94,7 +94,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition, if (sSegment.getLength() < nPosition) { if (bLastRead) - throw lang::IllegalArgumentException("nPosition out of range", *this, 0); + throw lang::IllegalArgumentException(u"nPosition out of range"_ustr, *this, 0); nPosition -= sSegment.getLength(); continue; } @@ -110,7 +110,7 @@ OUString SAL_CALL Clob::getSubString(sal_Int64 nPosition, assert(sSegmentBuffer.getLength() < nLength); if (bLastRead) - throw lang::IllegalArgumentException("out of range", *this, 0); + throw lang::IllegalArgumentException(u"out of range"_ustr, *this, 0); nPosition = 0; // No offset after first append } @@ -127,13 +127,13 @@ uno::Reference< XInputStream > SAL_CALL Clob::getCharacterStream() sal_Int64 SAL_CALL Clob::position(const OUString& /*rPattern*/, sal_Int32 /*nStart*/) { - ::dbtools::throwFeatureNotImplementedSQLException("Clob::position", *this); + ::dbtools::throwFeatureNotImplementedSQLException(u"Clob::position"_ustr, *this); } sal_Int64 SAL_CALL Clob::positionOfClob(const Reference & /*rPattern*/, sal_Int64 /*aStart*/) { - ::dbtools::throwFeatureNotImplementedSQLException("Clob::positionOfClob", *this); + ::dbtools::throwFeatureNotImplementedSQLException(u"Clob::positionOfClob"_ustr, *this); } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/drivers/firebird/Column.cxx b/connectivity/source/drivers/firebird/Column.cxx index 0a18ebe5b441..5838456abaf7 100644 --- a/connectivity/source/drivers/firebird/Column.cxx +++ b/connectivity/source/drivers/firebird/Column.cxx @@ -45,7 +45,7 @@ void Column::construct() css::uno::Sequence< OUString > SAL_CALL Column::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.Firebird" }; + return { u"com.sun.star.sdbc.Firebird"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index 329f7ad95ea3..9268291f384e 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -340,8 +340,8 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >& } //----- XServiceInfo --------------------------------------------------------- -IMPLEMENT_SERVICE_INFO(Connection, "com.sun.star.sdbc.drivers.firebird.Connection", - "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(Connection, u"com.sun.star.sdbc.drivers.firebird.Connection"_ustr, + u"com.sun.star.sdbc.Connection"_ustr) Reference< XBlob> Connection::createBlob(ISC_QUAD const * pBlobId) { @@ -574,7 +574,7 @@ isc_svc_handle Connection::attachServiceManager() *pSPB++ = isc_spb_version; *pSPB++ = isc_spb_current_version; *pSPB++ = isc_spb_user_name; - OUString sUserName("SYSDBA"); + OUString sUserName(u"SYSDBA"_ustr); char aLength = static_cast(sUserName.getLength()); *pSPB++ = aLength; strncpy(pSPB, @@ -740,12 +740,12 @@ sal_Bool SAL_CALL Connection::isReadOnly() void SAL_CALL Connection::setCatalog(const OUString& /*catalog*/) { - ::dbtools::throwFunctionNotSupportedSQLException("setCatalog", *this); + ::dbtools::throwFunctionNotSupportedSQLException(u"setCatalog"_ustr, *this); } OUString SAL_CALL Connection::getCatalog() { - ::dbtools::throwFunctionNotSupportedSQLException("getCatalog", *this); + ::dbtools::throwFunctionNotSupportedSQLException(u"getCatalog"_ustr, *this); } void SAL_CALL Connection::setTransactionIsolation( sal_Int32 level ) @@ -767,12 +767,12 @@ sal_Int32 SAL_CALL Connection::getTransactionIsolation( ) Reference< XNameAccess > SAL_CALL Connection::getTypeMap() { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::getTypeMap", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::getTypeMap"_ustr, *this ); } void SAL_CALL Connection::setTypeMap(const Reference< XNameAccess >&) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setTypeMap", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setTypeMap"_ustr, *this ); } //----- XCloseable ----------------------------------------------------------- diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index 37c2ffe72c3d..840e60b1e66e 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -221,7 +221,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) // Only quoted identifiers are case sensitive, unquoted are case insensitive OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() { - return "\""; + return u"\""_ustr; } sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) @@ -600,7 +600,7 @@ OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) { uno::Reference< XStatement > xSelect = m_pConnection->createStatement(); - uno::Reference< XResultSet > xRs = xSelect->executeQuery("SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database"); + uno::Reference< XResultSet > xRs = xSelect->executeQuery(u"SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database"_ustr); (void)xRs->next(); // first and only row uno::Reference< XRow > xRow( xRs, UNO_QUERY_THROW ); return xRow->getString(1); @@ -608,7 +608,7 @@ OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) { - return "Firebird (engine12)"; + return u"Firebird (engine12)"_ustr; } OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) @@ -638,15 +638,15 @@ OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) { - return "ASCII_CHAR,ASCII_VAL,BIT_LENGTH,CHAR_LENGTH,CHAR_TO_UUID,CHARACTER_LENGTH," + return u"ASCII_CHAR,ASCII_VAL,BIT_LENGTH,CHAR_LENGTH,CHAR_TO_UUID,CHARACTER_LENGTH," "GEN_UUID,HASH,LEFT,LOWER,LPAD,OCTET_LENGTH,OVERLAY,POSITION,REPLACE,REVERSE," - "RIGHT,RPAD,SUBSTRING,TRIM,UPPER,UUID_TO_CHAR"; + "RIGHT,RPAD,SUBSTRING,TRIM,UPPER,UUID_TO_CHAR"_ustr; } OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) { - return "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,DATEADD, DATEDIFF," - "EXTRACT,'NOW','TODAY','TOMORROW','YESTERDAY'"; + return u"CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,DATEADD, DATEDIFF," + "EXTRACT,'NOW','TODAY','TOMORROW','YESTERDAY'"_ustr; } OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) @@ -656,9 +656,9 @@ OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) { - return "ABS,ACOS,ASIN,ATAN,ATAN2,BIN_AND,BIN_NOT,BIN_OR,BIN_SHL," + return u"ABS,ACOS,ASIN,ATAN,ATAN2,BIN_AND,BIN_NOT,BIN_OR,BIN_SHL," "BIN_SHR,BIN_XOR,CEIL,CEILING,COS,COSH,COT,EXP,FLOOR,LN," - "LOG,LOG10,MOD,PI,POWER,RAND,ROUND,SIGN,SIN,SINH,SQRT,TAN,TANH,TRUNC"; + "LOG,LOG10,MOD,PI,POWER,RAND,ROUND,SIGN,SIN,SINH,SQRT,TAN,TANH,TRUNC"_ustr; } sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) @@ -792,13 +792,13 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) // TODO Put these statics to one place // like postgreSQL's Statics class. - aRow[1] = new ORowSetValueDecorator(OUString("TABLE")); + aRow[1] = new ORowSetValueDecorator(u"TABLE"_ustr); aResults.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("VIEW")); + aRow[1] = new ORowSetValueDecorator(u"VIEW"_ustr); aResults.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("SYSTEM TABLE")); + aRow[1] = new ORowSetValueDecorator(u"SYSTEM TABLE"_ustr); aResults.push_back(aRow); pResultSet->setRows(std::move(aResults)); @@ -836,10 +836,10 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[18] = new ORowSetValueDecorator(sal_Int16(10));// Radix // Char - aRow[1] = new ORowSetValueDecorator(OUString("CHAR")); + aRow[1] = new ORowSetValueDecorator(u"CHAR"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::CHAR); aRow[3] = new ORowSetValueDecorator(sal_Int16(32765)); // Prevision = max length - aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params + aRow[6] = new ORowSetValueDecorator(u"length"_ustr); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement @@ -848,10 +848,10 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); // Varchar - aRow[1] = new ORowSetValueDecorator(OUString("VARCHAR")); + aRow[1] = new ORowSetValueDecorator(u"VARCHAR"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[3] = new ORowSetValueDecorator(sal_Int16(32765)); // Prevision = max length - aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params + aRow[6] = new ORowSetValueDecorator(u"length"_ustr); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement @@ -863,10 +863,10 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() // to fool LO into seeing it as different types. // It is distinguished from Text type by its character set OCTETS; // that will be added by Tables::createStandardColumnPart - aRow[1] = new ORowSetValueDecorator(OUString("CHARACTER")); + aRow[1] = new ORowSetValueDecorator(u"CHARACTER"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BINARY); aRow[3] = new ORowSetValueDecorator(sal_Int16(32765)); // Prevision = max length - aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params + aRow[6] = new ORowSetValueDecorator(u"length"_ustr); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::NONE)); // Searchable aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale @@ -874,15 +874,15 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); // Varbinary (VARCHAR); see comment above about BINARY - aRow[1] = new ORowSetValueDecorator(OUString("CHARACTER VARYING")); + aRow[1] = new ORowSetValueDecorator(u"CHARACTER VARYING"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::VARBINARY); aRow[3] = new ORowSetValueDecorator(sal_Int16(32765)); // Prevision = max length - aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params + aRow[6] = new ORowSetValueDecorator(u"length"_ustr); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::NONE)); // Searchable // Clob (SQL_BLOB) - aRow[1] = new ORowSetValueDecorator(OUString("BLOB SUB_TYPE TEXT")); // BLOB, with subtype 1 + aRow[1] = new ORowSetValueDecorator(u"BLOB SUB_TYPE TEXT"_ustr); // BLOB, with subtype 1 aRow[2] = new ORowSetValueDecorator(DataType::CLOB); aRow[3] = new ORowSetValueDecorator(sal_Int32(2147483647)); // Precision = max length aRow[6] = new ORowSetValueDecorator(); // Create Params @@ -909,17 +909,17 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale } // Smallint (SQL_SHORT) - aRow[1] = new ORowSetValueDecorator(OUString("SMALLINT")); + aRow[1] = new ORowSetValueDecorator(u"SMALLINT"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::SMALLINT); aRow[3] = new ORowSetValueDecorator(sal_Int16(5)); // Prevision tmp.push_back(aRow); // Integer (SQL_LONG) - aRow[1] = new ORowSetValueDecorator(OUString("INTEGER")); + aRow[1] = new ORowSetValueDecorator(u"INTEGER"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::INTEGER); aRow[3] = new ORowSetValueDecorator(sal_Int16(10)); // Precision tmp.push_back(aRow); // Bigint (SQL_INT64) - aRow[1] = new ORowSetValueDecorator(OUString("BIGINT")); + aRow[1] = new ORowSetValueDecorator(u"BIGINT"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BIGINT); aRow[3] = new ORowSetValueDecorator(sal_Int16(20)); // Precision tmp.push_back(aRow); @@ -931,16 +931,16 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[12] = new ORowSetValueDecorator(ORowSetValue(true)); // Autoincrement } - aRow[6] = new ORowSetValueDecorator(OUString("PRECISION,SCALE")); // Create params + aRow[6] = new ORowSetValueDecorator(u"PRECISION,SCALE"_ustr); // Create params // Numeric - aRow[1] = new ORowSetValueDecorator(OUString("NUMERIC")); + aRow[1] = new ORowSetValueDecorator(u"NUMERIC"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC); aRow[3] = new ORowSetValueDecorator(sal_Int16(18)); // Precision aRow[14] = new ORowSetValueDecorator(sal_Int16(0)); // Minimum scale aRow[15] = new ORowSetValueDecorator(sal_Int16(18)); // Max scale tmp.push_back(aRow); // Decimal - aRow[1] = new ORowSetValueDecorator(OUString("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(u"DECIMAL"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator(sal_Int16(18)); // Precision aRow[14] = new ORowSetValueDecorator(sal_Int16(0)); // Minimum scale @@ -949,14 +949,14 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params // Float (SQL_FLOAT) - aRow[1] = new ORowSetValueDecorator(OUString("FLOAT")); + aRow[1] = new ORowSetValueDecorator(u"FLOAT"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::FLOAT); aRow[3] = new ORowSetValueDecorator(sal_Int16(7)); // Precision aRow[14] = new ORowSetValueDecorator(sal_Int16(1)); // Minimum scale aRow[15] = new ORowSetValueDecorator(sal_Int16(7)); // Max scale tmp.push_back(aRow); // Double (SQL_DOUBLE) - aRow[1] = new ORowSetValueDecorator(OUString("DOUBLE PRECISION")); + aRow[1] = new ORowSetValueDecorator(u"DOUBLE PRECISION"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator(sal_Int16(15)); // Precision aRow[14] = new ORowSetValueDecorator(sal_Int16(1)); // Minimum scale @@ -966,7 +966,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() // TODO: no idea whether D_FLOAT corresponds to an sql type // SQL_TIMESTAMP - aRow[1] = new ORowSetValueDecorator(OUString("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(u"TIMESTAMP"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = new ORowSetValueDecorator(sal_Int32(8)); // Prevision = max length aRow[6] = new ORowSetValueDecorator(); // Create Params @@ -978,7 +978,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); // SQL_TYPE_TIME - aRow[1] = new ORowSetValueDecorator(OUString("TIME")); + aRow[1] = new ORowSetValueDecorator(u"TIME"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIME); aRow[3] = new ORowSetValueDecorator(sal_Int32(8)); // Prevision = max length aRow[6] = new ORowSetValueDecorator(); // Create Params @@ -990,7 +990,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); // SQL_TYPE_DATE - aRow[1] = new ORowSetValueDecorator(OUString("DATE")); + aRow[1] = new ORowSetValueDecorator(u"DATE"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator(sal_Int32(8)); // Prevision = max length aRow[6] = new ORowSetValueDecorator(); // Create Params @@ -1002,7 +1002,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); // SQL_BLOB - aRow[1] = new ORowSetValueDecorator(OUString("BLOB SUB_TYPE BINARY")); + aRow[1] = new ORowSetValueDecorator(u"BLOB SUB_TYPE BINARY"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BLOB); aRow[3] = new ORowSetValueDecorator(sal_Int32(0)); // Prevision = max length aRow[6] = new ORowSetValueDecorator(); // Create Params @@ -1014,7 +1014,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() tmp.push_back(aRow); // SQL_BOOLEAN - aRow[1] = new ORowSetValueDecorator(OUString("BOOLEAN")); + aRow[1] = new ORowSetValueDecorator(u"BOOLEAN"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BOOLEAN); aRow[3] = new ORowSetValueDecorator(sal_Int32(1)); // Prevision = max length aRow[6] = new ORowSetValueDecorator(); // Create Params @@ -1057,7 +1057,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( "FROM RDB$USER_PRIVILEGES priv "); { - OUString sAppend = "WHERE priv.RDB$RELATION_NAME = '%' "; + OUString sAppend = u"WHERE priv.RDB$RELATION_NAME = '%' "_ustr; queryBuf.append(sAppend.replaceAll("%", sTable)); } if (!sColumnNamePattern.isEmpty()) @@ -1095,7 +1095,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( aCurrentRow[6] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(3))); // 6. GRANTEE aCurrentRow[7] = new ORowSetValueDecorator(xRow->getString(4)); // 7. Privilege aCurrentRow[8] = new ORowSetValueDecorator( ( xRow->getShort(5) == 1 ) ? - OUString("YES") : OUString("NO")); // 8. Grantable + u"YES"_ustr : u"NO"_ustr); // 8. Grantable aResults.push_back(aCurrentRow); } @@ -1297,11 +1297,11 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( // 18. Is nullable if (xRow->getShort(9)) { - aCurrentRow[18] = new ORowSetValueDecorator(OUString("NO")); + aCurrentRow[18] = new ORowSetValueDecorator(u"NO"_ustr); } else { - aCurrentRow[18] = new ORowSetValueDecorator(OUString("YES")); + aCurrentRow[18] = new ORowSetValueDecorator(u"YES"_ustr); } aResults.push_back(aCurrentRow); @@ -1481,7 +1481,7 @@ uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool bIsImport uno::Reference< XStatement > statement = m_pConnection->createStatement(); - OUString sSQL = "SELECT " + OUString sSQL = u"SELECT " "RDB$REF_CONSTRAINTS.RDB$UPDATE_RULE, " // 1 update rule "RDB$REF_CONSTRAINTS.RDB$DELETE_RULE, " // 2 delete rule "RDB$REF_CONSTRAINTS.RDB$CONST_NAME_UQ, " // 3 primary or unique key name @@ -1502,7 +1502,7 @@ uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool bIsImport "ON PRIM.RDB$INDEX_NAME = PRIMARY_INDEX.RDB$INDEX_NAME " "INNER JOIN RDB$INDEX_SEGMENTS AS FOREIGN_INDEX " "ON FOREI.RDB$INDEX_NAME = FOREIGN_INDEX.RDB$INDEX_NAME " - "WHERE FOREI.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY' "; + "WHERE FOREI.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY' "_ustr; if (bIsImport) sSQL += OUString::Concat("AND FOREI.RDB$RELATION_NAME = '")+ table +"'"; else @@ -1522,11 +1522,11 @@ uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool bIsImport aCurrentRow[6] = new ORowSetValueDecorator(); // FKTABLE_SCHEM unsupported std::map< OUString,sal_Int32> aRuleMap; - aRuleMap[ OUString("CASCADE")] = KeyRule::CASCADE; - aRuleMap[ OUString("RESTRICT")] = KeyRule::RESTRICT; - aRuleMap[ OUString("SET NULL")] = KeyRule::SET_NULL; - aRuleMap[ OUString("SET DEFAULT")] = KeyRule::SET_DEFAULT; - aRuleMap[ OUString("NO ACTION")] = KeyRule::NO_ACTION; + aRuleMap[ u"CASCADE"_ustr] = KeyRule::CASCADE; + aRuleMap[ u"RESTRICT"_ustr] = KeyRule::RESTRICT; + aRuleMap[ u"SET NULL"_ustr] = KeyRule::SET_NULL; + aRuleMap[ u"SET DEFAULT"_ustr] = KeyRule::SET_DEFAULT; + aRuleMap[ u"NO ACTION"_ustr] = KeyRule::NO_ACTION; while(rs->next()) { @@ -1568,7 +1568,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( SAL_INFO("connectivity.firebird", "getPrimaryKeys() with " "Table: " << sTable); - OUString sAppend = "WHERE constr.RDB$RELATION_NAME = '%' "; + OUString sAppend = u"WHERE constr.RDB$RELATION_NAME = '%' "_ustr; OUString sQuery = "SELECT " "constr.RDB$RELATION_NAME, " // 1. Table Name "inds.RDB$FIELD_NAME, " // 2. Column Name @@ -1690,9 +1690,9 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( aCurrentRow[9] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(2))); // 10. ASC(ending)/DESC(ending) if (xRow->getShort(6) == 1) - aCurrentRow[10] = new ORowSetValueDecorator(OUString("D")); + aCurrentRow[10] = new ORowSetValueDecorator(u"D"_ustr); else - aCurrentRow[10] = new ORowSetValueDecorator(OUString("A")); + aCurrentRow[10] = new ORowSetValueDecorator(u"A"_ustr); // TODO: double check this^^^, doesn't seem to be officially documented anywhere. // 11. CARDINALITY aCurrentRow[11] = new ORowSetValueDecorator(sal_Int32(0)); // TODO: determine how to do this diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index 3aa903d48abf..167072ca71c8 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -74,7 +74,7 @@ FirebirdDriver::FirebirdDriver(const css::uno::Reference< css::uno::XComponentCo #ifndef SYSTEM_FIREBIRD // Overrides firebird's hardcoded default of /usr/local/firebird on *nix, // however on Windows it seems to use the current directory as a default. - OUString sMsgURL("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/firebird"); + OUString sMsgURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/firebird"_ustr); ::rtl::Bootstrap::expandMacros(sMsgURL); OUString sMsgPath; ::osl::FileBase::getSystemPathFromFileURL(sMsgURL, sMsgPath); @@ -122,7 +122,7 @@ void FirebirdDriver::disposing() OUString SAL_CALL FirebirdDriver::getImplementationName() { - return "com.sun.star.comp.sdbc.firebird.Driver"; + return u"com.sun.star.comp.sdbc.firebird.Driver"_ustr; } sal_Bool SAL_CALL FirebirdDriver::supportsService(const OUString& _rServiceName) @@ -132,7 +132,7 @@ sal_Bool SAL_CALL FirebirdDriver::supportsService(const OUString& _rServiceName) Sequence< OUString > SAL_CALL FirebirdDriver::getSupportedServiceNames() { - return { "com.sun.star.sdbc.Driver", "com.sun.star.sdbcx.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr, u"com.sun.star.sdbcx.Driver"_ustr }; } // ---- XDriver ------------------------------------------------------------- diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index cc162060aaf9..4bc16e5ea13a 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -48,7 +48,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.firebird.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(OPreparedStatement,u"com.sun.star.sdbcx.firebird.PreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr); constexpr size_t MAX_SIZE_SEGMENT = 65535; // max value of a segment of CLOB, if we want more than 65535 bytes, we need more segments @@ -234,7 +234,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex, (int32Value > std::numeric_limits::max()) ) { ::dbtools::throwSQLException( - "Value out of range for SQL_SHORT type", + u"Value out of range for SQL_SHORT type"_ustr, ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE, *this); } @@ -273,7 +273,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex, } default: ::dbtools::throwSQLException( - "Incorrect type for setString", + u"Incorrect type for setString"_ustr, ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE, *this); } @@ -418,7 +418,7 @@ void OPreparedStatement::setValue(sal_Int32 nIndex, const T& nValue, ISC_SHORT n if ((pVar->sqltype & ~1) != nType) { ::dbtools::throwSQLException( - "Incorrect type for setValue", + u"Incorrect type for setValue"_ustr, ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE, *this); } @@ -466,7 +466,7 @@ void SAL_CALL OPreparedStatement::setDouble(sal_Int32 nIndex, double nValue) if(dSubType < 0 || dSubType > 2) { ::dbtools::throwSQLException( - "Incorrect number sub type", + u"Incorrect number sub type"_ustr, ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE, *this); } @@ -958,7 +958,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, else if( dType == SQL_TEXT ) { if (pVar->sqllen < xBytes.getLength()) - dbtools::throwSQLException("Data too big for this field", + dbtools::throwSQLException(u"Data too big for this field"_ustr, dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE, *this); setParameterNull(nParameterIndex, false); memcpy(pVar->sqldata, xBytes.getConstArray(), xBytes.getLength() ); @@ -968,7 +968,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, else { ::dbtools::throwSQLException( - "Incorrect type for setBytes", + u"Incorrect type for setBytes"_ustr, ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE, *this); } diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index c4703dec20f5..3402de55ee9b 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -151,13 +151,13 @@ sal_Bool SAL_CALL OResultSet::next() sal_Bool SAL_CALL OResultSet::previous() { - ::dbtools::throwFunctionNotSupportedSQLException("previous not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"previous not supported in firebird"_ustr, *this); } sal_Bool SAL_CALL OResultSet::isLast() { - ::dbtools::throwFunctionNotSupportedSQLException("isLast not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"isLast not supported in firebird"_ustr, *this); } @@ -191,7 +191,7 @@ void SAL_CALL OResultSet::beforeFirst() checkDisposed(OResultSet_BASE::rBHelper.bDisposed); if (m_currentRow != 0) - ::dbtools::throwFunctionNotSupportedSQLException("beforeFirst not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"beforeFirst not supported in firebird"_ustr, *this); } @@ -201,7 +201,7 @@ void SAL_CALL OResultSet::afterLast() checkDisposed(OResultSet_BASE::rBHelper.bDisposed); if (!m_bIsAfterLastRow) - ::dbtools::throwFunctionNotSupportedSQLException("afterLast not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"afterLast not supported in firebird"_ustr, *this); } @@ -220,7 +220,7 @@ sal_Bool SAL_CALL OResultSet::first() } else { - ::dbtools::throwFunctionNotSupportedSQLException("first not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"first not supported in firebird"_ustr, *this); return false; } @@ -230,7 +230,7 @@ sal_Bool SAL_CALL OResultSet::last() { // We need to iterate past the last row to know when we've passed the last // row, hence we can't actually move to last. - ::dbtools::throwFunctionNotSupportedSQLException("last not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"last not supported in firebird"_ustr, *this); } @@ -246,7 +246,7 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 aRow) } else { - ::dbtools::throwFunctionNotSupportedSQLException("absolute not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"absolute not supported in firebird"_ustr, *this); return false; } @@ -268,7 +268,7 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) } else { - ::dbtools::throwFunctionNotSupportedSQLException("relative not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"relative not supported in firebird"_ustr, *this); return false; } @@ -296,7 +296,7 @@ void OResultSet::checkRowIndex() if((m_currentRow < 1) || m_bIsAfterLastRow) { ::dbtools::throwSQLException( - "Invalid Row", + u"Invalid Row"_ustr, ::dbtools::StandardSQLState::INVALID_CURSOR_POSITION, *this); } @@ -842,25 +842,25 @@ uno::Reference< XInterface > SAL_CALL OResultSet::getStatement() //----- XResultSet: unsupported change detection methods --------------------- sal_Bool SAL_CALL OResultSet::rowDeleted() { - ::dbtools::throwFunctionNotSupportedSQLException("rowDeleted not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"rowDeleted not supported in firebird"_ustr, *this); } sal_Bool SAL_CALL OResultSet::rowInserted() { - ::dbtools::throwFunctionNotSupportedSQLException("rowInserted not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"rowInserted not supported in firebird"_ustr, *this); } sal_Bool SAL_CALL OResultSet::rowUpdated() { - ::dbtools::throwFunctionNotSupportedSQLException("rowUpdated not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"rowUpdated not supported in firebird"_ustr, *this); } void SAL_CALL OResultSet::refreshRow() { - ::dbtools::throwFunctionNotSupportedSQLException("refreshRow not supported in firebird", + ::dbtools::throwFunctionNotSupportedSQLException(u"refreshRow not supported in firebird"_ustr, *this); } @@ -902,12 +902,12 @@ uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertyS // ---- XServiceInfo ----------------------------------------------------------- OUString SAL_CALL OResultSet::getImplementationName() { - return "com.sun.star.sdbcx.firebird.ResultSet"; + return u"com.sun.star.sdbcx.firebird.ResultSet"_ustr; } Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames() { - return {"com.sun.star.sdbc.ResultSet","com.sun.star.sdbcx.ResultSet"}; + return {u"com.sun.star.sdbc.ResultSet"_ustr,u"com.sun.star.sdbcx.ResultSet"_ustr}; } sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName) diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx index 31a6796f5399..4efabc4ab3cc 100644 --- a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx +++ b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx @@ -75,7 +75,7 @@ OUString OResultSetMetaData::getCharacterSet( sal_Int32 nIndex ) void OResultSetMetaData::verifyValidColumn(sal_Int32 column) { if (column>getColumnCount() || column < 1) - throw SQLException("Invalid column specified", *this, OUString(), 0, Any()); + throw SQLException(u"Invalid column specified"_ustr, *this, OUString(), 0, Any()); } sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount() diff --git a/connectivity/source/drivers/firebird/Statement.cxx b/connectivity/source/drivers/firebird/Statement.cxx index d135c4e4cda4..6b24e5c33321 100644 --- a/connectivity/source/drivers/firebird/Statement.cxx +++ b/connectivity/source/drivers/firebird/Statement.cxx @@ -55,7 +55,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch() return Sequence< sal_Int32 >(); } -IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(OStatement,u"com.sun.star.sdbcx.OStatement"_ustr,u"com.sun.star.sdbc.Statement"_ustr); void SAL_CALL OStatement::acquire() noexcept { diff --git a/connectivity/source/drivers/firebird/Table.cxx b/connectivity/source/drivers/firebird/Table.cxx index 871febcf5122..c12ea8439333 100644 --- a/connectivity/source/drivers/firebird/Table.cxx +++ b/connectivity/source/drivers/firebird/Table.cxx @@ -59,8 +59,8 @@ Table::Table(Tables* pTables, rName, rType, rDescription, - "", - ""), + u""_ustr, + u""_ustr), m_rMutex(rMutex), m_nPrivileges(0) { @@ -121,19 +121,19 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, uno::Reference< XPropertySet > xColumn(m_xColumns->getByName(rColName), UNO_QUERY); // sdbcx::Descriptor - const bool bNameChanged = xColumn->getPropertyValue("Name") != rDescriptor->getPropertyValue("Name"); + const bool bNameChanged = xColumn->getPropertyValue(u"Name"_ustr) != rDescriptor->getPropertyValue(u"Name"_ustr); // sdbcx::ColumnDescriptor - const bool bTypeChanged = xColumn->getPropertyValue("Type") != rDescriptor->getPropertyValue("Type"); - const bool bTypeNameChanged = xColumn->getPropertyValue("TypeName") != rDescriptor->getPropertyValue("TypeName"); - const bool bPrecisionChanged = xColumn->getPropertyValue("Precision") != rDescriptor->getPropertyValue("Precision"); - const bool bScaleChanged = xColumn->getPropertyValue("Scale") != rDescriptor->getPropertyValue("Scale"); - const bool bIsNullableChanged = xColumn->getPropertyValue("IsNullable") != rDescriptor->getPropertyValue("IsNullable"); - const bool bIsAutoIncrementChanged = xColumn->getPropertyValue("IsAutoIncrement") != rDescriptor->getPropertyValue("IsAutoIncrement"); + const bool bTypeChanged = xColumn->getPropertyValue(u"Type"_ustr) != rDescriptor->getPropertyValue(u"Type"_ustr); + const bool bTypeNameChanged = xColumn->getPropertyValue(u"TypeName"_ustr) != rDescriptor->getPropertyValue(u"TypeName"_ustr); + const bool bPrecisionChanged = xColumn->getPropertyValue(u"Precision"_ustr) != rDescriptor->getPropertyValue(u"Precision"_ustr); + const bool bScaleChanged = xColumn->getPropertyValue(u"Scale"_ustr) != rDescriptor->getPropertyValue(u"Scale"_ustr); + const bool bIsNullableChanged = xColumn->getPropertyValue(u"IsNullable"_ustr) != rDescriptor->getPropertyValue(u"IsNullable"_ustr); + const bool bIsAutoIncrementChanged = xColumn->getPropertyValue(u"IsAutoIncrement"_ustr) != rDescriptor->getPropertyValue(u"IsAutoIncrement"_ustr); // TODO: remainder -- these are all "optional" so have to detect presence and change. - bool bDefaultChanged = xColumn->getPropertyValue("DefaultValue") - != rDescriptor->getPropertyValue("DefaultValue"); + bool bDefaultChanged = xColumn->getPropertyValue(u"DefaultValue"_ustr) + != rDescriptor->getPropertyValue(u"DefaultValue"_ustr); if (bTypeChanged || bTypeNameChanged || bPrecisionChanged || bScaleChanged) { @@ -150,7 +150,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, if (bIsNullableChanged) { sal_Int32 nNullable = 0; - rDescriptor->getPropertyValue("IsNullable") >>= nNullable; + rDescriptor->getPropertyValue(u"IsNullable"_ustr) >>= nNullable; if (nNullable != ColumnValue::NULLABLE_UNKNOWN) { @@ -175,7 +175,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, if (bIsAutoIncrementChanged) { ::dbtools::throwSQLException( - "Changing autoincrement property of existing column is not supported", + u"Changing autoincrement property of existing column is not supported"_ustr, ::dbtools::StandardSQLState::FUNCTION_NOT_SUPPORTED, *this); @@ -184,7 +184,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, if (bDefaultChanged) { OUString sNewDefault; - rDescriptor->getPropertyValue("DefaultValue") >>= sNewDefault; + rDescriptor->getPropertyValue(u"DefaultValue"_ustr) >>= sNewDefault; OUString sSql; if (sNewDefault.isEmpty()) @@ -198,7 +198,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, if (bNameChanged) { OUString sNewColName; - rDescriptor->getPropertyValue("Name") >>= sNewColName; + rDescriptor->getPropertyValue(u"Name"_ustr) >>= sNewColName; OUString sSql(getAlterTableColumn(rColName) + " TO \"" + sNewColName + "\""); @@ -212,7 +212,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, // ----- XRename -------------------------------------------------------------- void SAL_CALL Table::rename(const OUString&) { - throw RuntimeException("Table renaming not supported by Firebird."); + throw RuntimeException(u"Table renaming not supported by Firebird."_ustr); } // ----- XInterface ----------------------------------------------------------- diff --git a/connectivity/source/drivers/firebird/Tables.cxx b/connectivity/source/drivers/firebird/Tables.cxx index e3440137381a..01d97c1e83ae 100644 --- a/connectivity/source/drivers/firebird/Tables.cxx +++ b/connectivity/source/drivers/firebird/Tables.cxx @@ -50,7 +50,7 @@ ObjectType Tables::createObject(const OUString& rName) uno::Sequence< OUString >()); if (!xTables.is()) - throw RuntimeException("Could not acquire table."); + throw RuntimeException(u"Could not acquire table."_ustr); uno::Reference< XRow > xRow(xTables,UNO_QUERY_THROW); @@ -65,7 +65,7 @@ ObjectType Tables::createObject(const OUString& rName) xRow->getString(5))); // Description / Remarks / Comments if (xTables->next()) - throw RuntimeException("Found more tables than expected."); + throw RuntimeException(u"Found more tables than expected."_ustr); return xRet; } @@ -193,7 +193,7 @@ void Tables::dropObject(sal_Int32 nPosition, const OUString& sName) return; OUString sType; - xTable->getPropertyValue("Type") >>= sType; + xTable->getPropertyValue(u"Type"_ustr) >>= sType; const OUString sQuoteString = m_xMetaData->getIdentifierQuoteString(); diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx index 3cee5dab6e0b..d2ac59d628ad 100644 --- a/connectivity/source/drivers/firebird/Util.cxx +++ b/connectivity/source/drivers/firebird/Util.cxx @@ -186,57 +186,57 @@ OUString firebird::ColumnTypeInfo::getColumnTypeName() const switch (nDataType) { case DataType::BIT: - return "BIT"; + return u"BIT"_ustr; case DataType::TINYINT: - return "TINYINT"; + return u"TINYINT"_ustr; case DataType::SMALLINT: - return "SMALLINT"; + return u"SMALLINT"_ustr; case DataType::INTEGER: - return "INTEGER"; + return u"INTEGER"_ustr; case DataType::BIGINT: - return "BIGINT"; + return u"BIGINT"_ustr; case DataType::FLOAT: - return "FLOAT"; + return u"FLOAT"_ustr; case DataType::REAL: - return "REAL"; + return u"REAL"_ustr; case DataType::DOUBLE: - return "DOUBLE"; + return u"DOUBLE"_ustr; case DataType::NUMERIC: - return "NUMERIC"; + return u"NUMERIC"_ustr; case DataType::DECIMAL: - return "DECIMAL"; + return u"DECIMAL"_ustr; case DataType::CHAR: - return "CHAR"; + return u"CHAR"_ustr; case DataType::VARCHAR: - return "VARCHAR"; + return u"VARCHAR"_ustr; case DataType::LONGVARCHAR: - return "LONGVARCHAR"; + return u"LONGVARCHAR"_ustr; case DataType::DATE: - return "DATE"; + return u"DATE"_ustr; case DataType::TIME: - return "TIME"; + return u"TIME"_ustr; case DataType::TIMESTAMP: - return "TIMESTAMP"; + return u"TIMESTAMP"_ustr; case DataType::BINARY: // in Firebird, that is the same datatype "CHAR" as DataType::CHAR, // only with CHARACTER SET OCTETS; we use the synonym CHARACTER // to fool LO into seeing it as different types. - return "CHARACTER"; + return u"CHARACTER"_ustr; case DataType::VARBINARY: // see above comment about DataType::BINARY. - return "CHARACTER VARYING"; + return u"CHARACTER VARYING"_ustr; case DataType::LONGVARBINARY: return "BLOB SUB_TYPE " + OUString::number(static_cast(BlobSubtype::Image)); case DataType::ARRAY: - return "ARRAY"; + return u"ARRAY"_ustr; case DataType::BLOB: - return "BLOB SUB_TYPE BINARY"; + return u"BLOB SUB_TYPE BINARY"_ustr; case DataType::CLOB: - return "BLOB SUB_TYPE TEXT"; + return u"BLOB SUB_TYPE TEXT"_ustr; case DataType::BOOLEAN: - return "BOOLEAN"; + return u"BOOLEAN"_ustr; case DataType::SQLNULL: - return "NULL"; + return u"NULL"_ustr; default: assert(false); // Should never happen return OUString(); diff --git a/connectivity/source/drivers/firebird/Views.cxx b/connectivity/source/drivers/firebird/Views.cxx index 2e5bec42adc3..f7d3c55ce415 100644 --- a/connectivity/source/drivers/firebird/Views.cxx +++ b/connectivity/source/drivers/firebird/Views.cxx @@ -60,7 +60,7 @@ void connectivity::firebird::Views::dropObject(sal_Int32 _nPos, const OUString& bool bIsNew = connectivity::sdbcx::ODescriptor::isNew(xObject); if (!bIsNew) { - OUString aSql("DROP VIEW"); + OUString aSql(u"DROP VIEW"_ustr); css::uno::Reference xProp(xObject, css::uno::UNO_QUERY); aSql += ::dbtools::composeTableName(m_xMetaData, xProp, diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index 72b470235a01..a7e806b58e9c 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -40,7 +40,7 @@ void OFlatCatalog::refreshTables() { ::std::vector aVector; Sequence aTypes; - Reference xResult = m_xMetaData->getTables(Any(), "%", "%", aTypes); + Reference xResult = m_xMetaData->getTables(Any(), u"%"_ustr, u"%"_ustr, aTypes); if (xResult.is()) { diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx index 941180a46e39..1529e5baaddb 100644 --- a/connectivity/source/drivers/flat/EConnection.cxx +++ b/connectivity/source/drivers/flat/EConnection.cxx @@ -54,7 +54,7 @@ OFlatConnection::~OFlatConnection() // XServiceInfo -IMPLEMENT_SERVICE_INFO(OFlatConnection, "com.sun.star.sdbc.drivers.flat.Connection", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OFlatConnection, u"com.sun.star.sdbc.drivers.flat.Connection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValue >& info) @@ -167,7 +167,7 @@ Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareCall( const OUS ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OConnection_B::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::prepareCall"_ustr, *this ); } diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index 729b55ef9e2d..b76e88c9359e 100644 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx @@ -55,7 +55,7 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) ODatabaseMetaDataResultSet::ORow aRow { ODatabaseMetaDataResultSet::getEmptyValue() , - new ORowSetValueDecorator(OUString("CHAR")) , + new ORowSetValueDecorator(u"CHAR"_ustr) , new ORowSetValueDecorator(DataType::CHAR) , new ORowSetValueDecorator(sal_Int32(254)) , ODatabaseMetaDataResultSet::getQuoteValue() , @@ -77,60 +77,60 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("VARCHAR")); + aRow[1] = new ORowSetValueDecorator(u"VARCHAR"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("LONGVARCHAR")); + aRow[1] = new ORowSetValueDecorator(u"LONGVARCHAR"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR); aRow[3] = new ORowSetValueDecorator(sal_Int32(65535)); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DATE")); + aRow[1] = new ORowSetValueDecorator(u"DATE"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DATE); aRow[3] = new ORowSetValueDecorator(sal_Int32(10)); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("TIME")); + aRow[1] = new ORowSetValueDecorator(u"TIME"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIME); aRow[3] = new ORowSetValueDecorator(sal_Int32(8)); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("TIMESTAMP")); + aRow[1] = new ORowSetValueDecorator(u"TIMESTAMP"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); aRow[3] = new ORowSetValueDecorator(sal_Int32(19)); aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("BOOL")); + aRow[1] = new ORowSetValueDecorator(u"BOOL"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::BIT); aRow[3] = ODatabaseMetaDataResultSet::get1Value(); aRow[9] = ODatabaseMetaDataResultSet::getBasicValue(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DECIMAL")); + aRow[1] = new ORowSetValueDecorator(u"DECIMAL"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL); aRow[3] = new ORowSetValueDecorator(sal_Int32(20)); aRow[15] = new ORowSetValueDecorator(sal_Int32(15)); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("DOUBLE")); + aRow[1] = new ORowSetValueDecorator(u"DOUBLE"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE); aRow[3] = new ORowSetValueDecorator(sal_Int32(20)); aRow[15] = ODatabaseMetaDataResultSet::get0Value(); tmp.push_back(aRow); - aRow[1] = new ORowSetValueDecorator(OUString("NUMERIC")); + aRow[1] = new ORowSetValueDecorator(u"NUMERIC"_ustr); aRow[2] = new ORowSetValueDecorator(DataType::NUMERIC); aRow[3] = new ORowSetValueDecorator(sal_Int32(20)); aRow[15] = new ORowSetValueDecorator(sal_Int32(20)); @@ -212,10 +212,10 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( switch(aRow[11]->getValue().getInt32()) { case ColumnValue::NO_NULLS: - aRow[18] = new ORowSetValueDecorator(OUString("NO")); + aRow[18] = new ORowSetValueDecorator(u"NO"_ustr); break; case ColumnValue::NULLABLE: - aRow[18] = new ORowSetValueDecorator(OUString("YES")); + aRow[18] = new ORowSetValueDecorator(u"YES"_ustr); break; default: aRow[18] = new ORowSetValueDecorator(OUString()); diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index c214d2b2fca6..f99a437323dc 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -39,7 +39,7 @@ using namespace css::lang; OUString SAL_CALL ODriver::getImplementationName( ) { - return "com.sun.star.comp.sdbc.flat.ODriver"; + return u"com.sun.star.comp.sdbc.flat.ODriver"_ustr; } @@ -82,43 +82,43 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString { if ( acceptsURL(url) ) { - Sequence< OUString > aBoolean { "0", "1" }; + Sequence< OUString > aBoolean { u"0"_ustr, u"1"_ustr }; std::vector< DriverPropertyInfo > aDriverInfo { { - "FieldDelimiter" - ,"Field separator." + u"FieldDelimiter"_ustr + ,u"Field separator."_ustr ,false ,{} ,{} }, { - "HeaderLine" - ,"Text contains headers." + u"HeaderLine"_ustr + ,u"Text contains headers."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "StringDelimiter" - ,"Text separator." + u"StringDelimiter"_ustr + ,u"Text separator."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "DecimalDelimiter" - ,"Decimal separator." + u"DecimalDelimiter"_ustr + ,u"Decimal separator."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean }, { - "ThousandDelimiter" - ,"Thousands separator." + u"ThousandDelimiter"_ustr + ,u"Thousands separator."_ustr ,false - ,"0" + ,u"0"_ustr ,aBoolean } }; diff --git a/connectivity/source/drivers/flat/EPreparedStatement.cxx b/connectivity/source/drivers/flat/EPreparedStatement.cxx index 0ed4299258a2..90a8cb7d0127 100644 --- a/connectivity/source/drivers/flat/EPreparedStatement.cxx +++ b/connectivity/source/drivers/flat/EPreparedStatement.cxx @@ -28,7 +28,8 @@ rtl::Reference OFlatPreparedStatement::createResultSet() return new OFlatResultSet(this, m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(OFlatPreparedStatement, "com.sun.star.sdbc.driver.flat.PreparedStatement", - "com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(OFlatPreparedStatement, + u"com.sun.star.sdbc.driver.flat.PreparedStatement"_ustr, + u"com.sun.star.sdbc.PreparedStatement"_ustr); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 9d1975c77e45..57fd3ea1f324 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -46,12 +46,12 @@ OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTr OUString SAL_CALL OFlatResultSet::getImplementationName( ) { - return "com.sun.star.sdbcx.flat.ResultSet"; + return u"com.sun.star.sdbcx.flat.ResultSet"_ustr; } Sequence< OUString > SAL_CALL OFlatResultSet::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr, u"com.sun.star.sdbcx.ResultSet"_ustr }; } sal_Bool SAL_CALL OFlatResultSet::supportsService( const OUString& _rServiceName ) diff --git a/connectivity/source/drivers/flat/EStatement.cxx b/connectivity/source/drivers/flat/EStatement.cxx index df9fca5f58f2..795011ac61b1 100644 --- a/connectivity/source/drivers/flat/EStatement.cxx +++ b/connectivity/source/drivers/flat/EStatement.cxx @@ -28,6 +28,6 @@ rtl::Reference OFlatStatement::createResultSet() return new OFlatResultSet(this,m_aSQLIterator); } -IMPLEMENT_SERVICE_INFO(OFlatStatement,"com.sun.star.sdbc.driver.flat.Statement","com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(OFlatStatement,u"com.sun.star.sdbc.driver.flat.Statement"_ustr,u"com.sun.star.sdbc.Statement"_ustr); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 9cab6b13da5a..a9440ccb805e 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -415,7 +415,7 @@ void OFlatTable::construct() m_xNumberFormatter.set( NumberFormatter::create( m_pConnection->getDriver()->getComponentContext()), UNO_QUERY_THROW); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); Reference xProp = xSupplier->getNumberFormatSettings(); - xProp->getPropertyValue("NullDate") >>= m_aNullDate; + xProp->getPropertyValue(u"NullDate"_ustr) >>= m_aNullDate; INetURLObject aURL; aURL.SetURL(getEntry()); diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx index 3b0d039311fc..f2f0a16166d7 100644 --- a/connectivity/source/drivers/flat/ETables.cxx +++ b/connectivity/source/drivers/flat/ETables.cxx @@ -28,7 +28,7 @@ using namespace connectivity::file; sdbcx::ObjectType OFlatTables::createObject(const OUString& _rName) { rtl::Reference pRet = new OFlatTable(this, static_cast(static_cast(m_rParent).getConnection()), - _rName,"TABLE"); + _rName,u"TABLE"_ustr); pRet->construct(); return pRet; } diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index c51c9d15a520..d905e67399f0 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -41,8 +41,8 @@ OHCatalog::OHCatalog(const Reference< XConnection >& _xConnection) : sdbcx::OCat void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,::std::vector< OUString>& _rNames) { Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - "%", - "%", + u"%"_ustr, + u"%"_ustr, _sKindOfObject); fillNames(xResult,_rNames); } @@ -51,7 +51,7 @@ void OHCatalog::refreshTables() { ::std::vector< OUString> aVector; - Sequence< OUString > sTableTypes {"VIEW", "TABLE"}; + Sequence< OUString > sTableTypes {u"VIEW"_ustr, u"TABLE"_ustr}; refreshObjects(sTableTypes,aVector); @@ -63,7 +63,7 @@ void OHCatalog::refreshTables() void OHCatalog::refreshViews() { - Sequence< OUString > aTypes { "VIEW" }; + Sequence< OUString > aTypes { u"VIEW"_ustr }; bool bSupportsViews = false; try @@ -100,7 +100,7 @@ void OHCatalog::refreshUsers() { ::std::vector< OUString> aVector; Reference< XStatement > xStmt = m_xConnection->createStatement( ); - Reference< XResultSet > xResult = xStmt->executeQuery("select User from hsqldb.user group by User"); + Reference< XResultSet > xResult = xStmt->executeQuery(u"select User from hsqldb.user group by User"_ustr); if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index e37f9fbd3a5e..6906bde4435a 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -65,7 +65,7 @@ void OHSQLColumn::construct() Sequence< OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) { - return { "com.sun.star.sdbcx.Column" }; + return { u"com.sun.star.sdbcx.Column"_ustr }; } diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index 28feb95fce9b..6b25917092dc 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -101,7 +101,7 @@ namespace connectivity::hsqldb } IMPLEMENT_FORWARD_XINTERFACE2(OHsqlConnection,OHsqlConnection_BASE,OConnectionWrapper) - IMPLEMENT_SERVICE_INFO(OHsqlConnection, "com.sun.star.sdbc.drivers.hsqldb.OHsqlConnection", "com.sun.star.sdbc.Connection") + IMPLEMENT_SERVICE_INFO(OHsqlConnection, u"com.sun.star.sdbc.drivers.hsqldb.OHsqlConnection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) IMPLEMENT_FORWARD_XTYPEPROVIDER2(OHsqlConnection,OHsqlConnection_BASE,OConnectionWrapper) @@ -144,7 +144,7 @@ namespace connectivity::hsqldb if ( !m_bReadOnly ) { Reference< XStatement > xStmt( m_xConnection->createStatement(), css::uno::UNO_SET_THROW ); - xStmt->execute( "CHECKPOINT DEFRAG" ); + xStmt->execute( u"CHECKPOINT DEFRAG"_ustr ); } } catch(const Exception& ) @@ -316,11 +316,9 @@ namespace connectivity::hsqldb // ask the provider to obtain a graphic Sequence< PropertyValue > aMediaProperties{ comphelper::makePropertyValue( - "URL", OUString( - // load the graphic from the global graphic repository - "private:graphicrepository/" + u"URL"_ustr, u"private:graphicrepository/" // the relative path within the images.zip - LINKED_TEXT_TABLE_IMAGE_RESOURCE)) }; + LINKED_TEXT_TABLE_IMAGE_RESOURCE ""_ustr) }; xGraphic = xProvider->queryGraphic( aMediaProperties ); OSL_ENSURE( xGraphic.is(), "OHsqlConnection::impl_getTextTableIcon_nothrow: the provider did not give us a graphic object!" ); } diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 234fc969db63..9bf1da6a99d2 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -121,7 +121,7 @@ namespace connectivity if ( !m_xDriver.is() ) { Reference xDriverAccess = DriverManager::create( m_xContext ); - m_xDriver = xDriverAccess->getDriverByURL("jdbc:hsqldb:db"); + m_xDriver = xDriverAccess->getDriverByURL(u"jdbc:hsqldb:db"_ustr); } return m_xDriver; @@ -203,16 +203,15 @@ namespace connectivity // properties for accessing the embedded storage OUString sKey = StorageContainer::registerStorage( xStorage, sSystemPath ); - aProperties.put( "storage_key", sKey ); - aProperties.put( "storage_class_name", - OUString( "com.sun.star.sdbcx.comp.hsqldb.StorageAccess" ) ); - aProperties.put( "fileaccess_class_name", - OUString( "com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess" ) ); + aProperties.put( u"storage_key"_ustr, sKey ); + aProperties.put( u"storage_class_name"_ustr, + u"com.sun.star.sdbcx.comp.hsqldb.StorageAccess"_ustr ); + aProperties.put( u"fileaccess_class_name"_ustr, + u"com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess"_ustr ); // JDBC driver and driver's classpath - aProperties.put( "JavaDriverClass", - OUString( "org.hsqldb.jdbcDriver" ) ); - aProperties.put( "JavaDriverClassPath", + aProperties.put( u"JavaDriverClass"_ustr, u"org.hsqldb.jdbcDriver"_ustr ); + aProperties.put( u"JavaDriverClassPath"_ustr, #ifdef SYSTEM_HSQLDB u"" HSQLDB_JAR #else @@ -221,21 +220,21 @@ namespace connectivity " vnd.sun.star.expand:$LO_JAVA_DIR/sdbc_hsqldb.jar"_ustr ); // auto increment handling - aProperties.put( "IsAutoRetrievingEnabled", true ); - aProperties.put( "AutoRetrievingStatement", - OUString( "CALL IDENTITY()" ) ); - aProperties.put( "IgnoreDriverPrivileges", true ); + aProperties.put( u"IsAutoRetrievingEnabled"_ustr, true ); + aProperties.put( u"AutoRetrievingStatement"_ustr, + u"CALL IDENTITY()"_ustr ); + aProperties.put( u"IgnoreDriverPrivileges"_ustr, true ); // don't want to expose HSQLDB's schema capabilities which exist since 1.8.0RC10 - aProperties.put( "default_schema", - OUString( "true" ) ); + aProperties.put( u"default_schema"_ustr, + u"true"_ustr ); // security: permitted Java classes NamedValue aPermittedClasses( - "hsqldb.method_class_names", + u"hsqldb.method_class_names"_ustr, Any( lcl_getPermittedJavaMethods_nothrow( m_xContext ) ) ); - aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) ); + aProperties.put( u"SystemProperties"_ustr, Sequence< NamedValue >( &aPermittedClasses, 1 ) ); OUString sMessage; try @@ -333,10 +332,10 @@ namespace connectivity if ( xProp.is() ) { sal_Int32 nMode = 0; - xProp->getPropertyValue("OpenMode") >>= nMode; + xProp->getPropertyValue(u"OpenMode"_ustr) >>= nMode; if ( (nMode & ElementModes::WRITE) != ElementModes::WRITE ) { - aProperties.put( "readonly", OUString( "true" ) ); + aProperties.put( u"readonly"_ustr, u"true"_ustr ); } } @@ -424,24 +423,24 @@ namespace connectivity return { { - "Storage", - "Defines the storage where the database will be stored.", + u"Storage"_ustr, + u"Defines the storage where the database will be stored."_ustr, true, {}, {} }, { - "URL", - "Defines the url of the data source.", + u"URL"_ustr, + u"Defines the url of the data source."_ustr, true, {}, {} }, { - "AutoRetrievingStatement", - "Defines the statement which will be executed to retrieve auto increment values.", + u"AutoRetrievingStatement"_ustr, + u"Defines the statement which will be executed to retrieve auto increment values."_ustr, false, - "CALL IDENTITY()", + u"CALL IDENTITY()"_ustr, {} } }; @@ -510,12 +509,12 @@ namespace connectivity Sequence< OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.Driver", "com.sun.star.sdbcx.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr, u"com.sun.star.sdbcx.Driver"_ustr }; } void SAL_CALL ODriverDelegator::createCatalog( const Sequence< PropertyValue >& /*info*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XCreateCatalog::createCatalog", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XCreateCatalog::createCatalog"_ustr, *this ); } void ODriverDelegator::shutdownConnection(const TWeakPairVector::iterator& _aIter ) @@ -531,12 +530,12 @@ namespace connectivity Reference xStmt = _xConnection->createStatement(); if ( xStmt.is() ) { - Reference xRes = xStmt->executeQuery("SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_SESSIONS WHERE USER_NAME ='SA'"); + Reference xRes = xStmt->executeQuery(u"SELECT COUNT(*) FROM INFORMATION_SCHEMA.SYSTEM_SESSIONS WHERE USER_NAME ='SA'"_ustr); Reference xRow(xRes,UNO_QUERY); if ( xRow.is() && xRes->next() ) bLastOne = xRow->getInt(1) == 1; if ( bLastOne ) - xStmt->execute("SHUTDOWN"); + xStmt->execute(u"SHUTDOWN"_ustr); } } } @@ -643,7 +642,7 @@ namespace connectivity Reference< XStatement> xStmt = xConnection->createStatement(); OSL_ENSURE( xStmt.is(), "ODriverDelegator::preCommit: no statement!" ); if ( xStmt.is() ) - xStmt->execute( "SET WRITE_DELAY 0" ); + xStmt->execute( u"SET WRITE_DELAY 0"_ustr ); bool bPreviousAutoCommit = xConnection->getAutoCommit(); xConnection->setAutoCommit( false ); @@ -651,7 +650,7 @@ namespace connectivity xConnection->setAutoCommit( bPreviousAutoCommit ); if ( xStmt.is() ) - xStmt->execute( "SET WRITE_DELAY 60" ); + xStmt->execute( u"SET WRITE_DELAY 60"_ustr ); } } catch(Exception&) @@ -812,7 +811,7 @@ namespace connectivity OUString lcl_getSystemLocale( const Reference< XComponentContext >& _rxContext ) { - OUString sLocaleString = "en-US"; + OUString sLocaleString = u"en-US"_ustr; try { @@ -823,13 +822,13 @@ namespace connectivity // arguments for creating the config access Sequence aArguments(comphelper::InitAnyPropertySequence( { - {"nodepath", Any(OUString("/org.openoffice.Setup/L10N" ))}, // the path to the node to open + {"nodepath", Any(u"/org.openoffice.Setup/L10N"_ustr)}, // the path to the node to open {"depth", Any(sal_Int32(-1))}, // the depth: -1 means unlimited })); // create the access Reference< XPropertySet > xNode( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArguments ), UNO_QUERY ); OSL_ENSURE( xNode.is(), "lcl_getSystemLocale: invalid access returned (should throw an exception instead)!" ); @@ -837,7 +836,7 @@ namespace connectivity // ask for the system locale setting if ( xNode.is() ) - xNode->getPropertyValue("ooSetupSystemLocale") >>= sLocaleString; + xNode->getPropertyValue(u"ooSetupSystemLocale"_ustr) >>= sLocaleString; } catch( const Exception& ) { diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 01a9c3d34be3..822a655675d2 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -103,14 +103,14 @@ namespace connectivity::hsqldb { css::uno::Environment env(css::uno::Environment::getCurrent()); if (!(env.is() && storageEnvironment.is())) { - throw css::uno::RuntimeException("cannot get environments"); + throw css::uno::RuntimeException(u"cannot get environments"_ustr); } if (env.get() == storageEnvironment.get()) { return storage; } else { css::uno::Mapping map(storageEnvironment, env); if (!map.is()) { - throw css::uno::RuntimeException("cannot get mapping"); + throw css::uno::RuntimeException(u"cannot get mapping"_ustr); } css::uno::Reference mapped; map.mapInterface( diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 63fe36a34a34..05338f21aef2 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -276,7 +276,7 @@ void OHSQLTable::dropDefaultValue(const OUString& _rColName) OUString OHSQLTable::getAlterTableColumnPart() const { - OUString sSql( "ALTER TABLE " ); + OUString sSql( u"ALTER TABLE "_ustr ); OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::EComposeRule::InTableDefinitions ) ); sSql += sComposedName; @@ -338,7 +338,7 @@ void SAL_CALL OHSQLTable::rename( const OUString& newName ) if(!isNew()) { - OUString sSql = "ALTER "; + OUString sSql = u"ALTER "_ustr; if ( m_Type == "VIEW" ) sSql += " VIEW "; else diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 002dfbf9a295..bec309c0950d 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -44,7 +44,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); - Sequence< OUString > sTableTypes {"VIEW", "TABLE", "%"}; // this last one just to be sure to include anything else... + Sequence< OUString > sTableTypes {u"VIEW"_ustr, u"TABLE"_ustr, u"%"_ustr}; // this last one just to be sure to include anything else... Any aCatalog; if ( !sCatalog.isEmpty() ) @@ -114,7 +114,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); - OUString aSql( "DROP " ); + OUString aSql( u"DROP "_ustr ); Reference xProp(xObject,UNO_QUERY); bool bIsView; diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index f493e282a2b1..95cb68ea517f 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -114,7 +114,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,"%"); + xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,u"%"_ustr); } break; } @@ -267,7 +267,7 @@ void SAL_CALL OHSQLUser::changePassword( const OUString& /*oldPassword*/, const if( m_Name != xMeta->getUserName() ) { - ::dbtools::throwGenericSQLException("HSQLDB can only change password of the current user.", *this); + ::dbtools::throwGenericSQLException(u"HSQLDB can only change password of the current user."_ustr, *this); } OUString sAlterPwd = "SET PASSWORD " + diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index 07a91e7cbed2..64933178e05d 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -83,7 +83,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen // XDrop void OUsers::dropObject(sal_Int32 /*nPos*/,const OUString& _sElementName) { - OUString aSql( "REVOKE ALL ON * FROM " ); + OUString aSql( u"REVOKE ALL ON * FROM "_ustr ); OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index f80ec7716f09..56da442a2866 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -95,7 +95,7 @@ void HViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { - OUString aSql( "DROP VIEW" ); + OUString aSql( u"DROP VIEW"_ustr ); Reference xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::EComposeRule::InTableDefinitions, true ); diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx index 70d35cda78fa..c62c9ba5599b 100644 --- a/connectivity/source/drivers/jdbc/Blob.cxx +++ b/connectivity/source/drivers/jdbc/Blob.cxx @@ -132,7 +132,7 @@ sal_Int64 SAL_CALL java_sql_Blob::position( const css::uno::Sequence< sal_Int8 > sal_Int64 SAL_CALL java_sql_Blob::positionOfBlob( const css::uno::Reference< css::sdbc::XBlob >& /*pattern*/, sal_Int64 /*start*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XBlob::positionOfBlob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XBlob::positionOfBlob"_ustr, *this ); // this was put here in CWS warnings01. The previous implementation was defective, as it did ignore // the pattern parameter. Since the effort for proper implementation is rather high - we would need // to translated pattern into a byte[] -, we defer this functionality for the moment (hey, it was diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index ae521efba11a..f98dbe337888 100644 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -IMPLEMENT_SERVICE_INFO(java_sql_CallableStatement,"com.sun.star.sdbcx.ACallableStatement","com.sun.star.sdbc.CallableStatement"); +IMPLEMENT_SERVICE_INFO(java_sql_CallableStatement,u"com.sun.star.sdbcx.ACallableStatement"_ustr,u"com.sun.star.sdbc.CallableStatement"_ustr); //************ Class: java.sql.CallableStatement diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx index f7926a2d465a..e4ed16559555 100644 --- a/connectivity/source/drivers/jdbc/Clob.cxx +++ b/connectivity/source/drivers/jdbc/Clob.cxx @@ -119,7 +119,7 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const OUString& searchstr, sal_Int32 sal_Int64 SAL_CALL java_sql_Clob::positionOfClob( const css::uno::Reference< css::sdbc::XClob >& /*pattern*/, sal_Int64 /*start*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XClob::positionOfClob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XClob::positionOfClob"_ustr, *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index 27c7ae01aec3..e2553f47c020 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -609,8 +609,8 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS // log the call if ( m_aLogger.isLoggable( LogLevel::FINEST ) ) { - OUString sCatalogLog = bCatalog ? sCatalog : OUString( "null" ); - OUString sSchemaLog = bSchema ? _rSchemaPattern : OUString( "null" ); + OUString sCatalogLog = bCatalog ? sCatalog : u"null"_ustr; + OUString sSchemaLog = bSchema ? _rSchemaPattern : u"null"_ustr; if ( _pOptionalAdditionalString ) m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD_ARG4, _pMethodName, sCatalogLog, sSchemaLog, _rLeastPattern, *_pOptionalAdditionalString ); else diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 5844df568ba3..ed92faf87dba 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -239,7 +239,7 @@ bool loadClass( } -IMPLEMENT_SERVICE_INFO(java_sql_Connection,"com.sun.star.sdbcx.JConnection","com.sun.star.sdbc.Connection"); +IMPLEMENT_SERVICE_INFO(java_sql_Connection,u"com.sun.star.sdbcx.JConnection"_ustr,u"com.sun.star.sdbc.Connection"_ustr); //************ Class: java.sql.Connection @@ -406,7 +406,7 @@ void SAL_CALL java_sql_Connection::setTypeMap( const Reference< css::container:: ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setTypeMap", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setTypeMap"_ustr, *this ); } @@ -726,17 +726,17 @@ bool java_sql_Connection::construct(const OUString& url, Sequence< NamedValue > aSystemProperties; ::comphelper::NamedValueCollection aSettings( info ); - sDriverClass = aSettings.getOrDefault( "JavaDriverClass", sDriverClass ); - sDriverClassPath = aSettings.getOrDefault( "JavaDriverClassPath", sDriverClassPath); + sDriverClass = aSettings.getOrDefault( u"JavaDriverClass"_ustr, sDriverClass ); + sDriverClassPath = aSettings.getOrDefault( u"JavaDriverClassPath"_ustr, sDriverClassPath); if ( sDriverClassPath.isEmpty() ) sDriverClassPath = impl_getJavaDriverClassPath_nothrow(sDriverClass); - bAutoRetrievingEnabled = aSettings.getOrDefault( "IsAutoRetrievingEnabled", bAutoRetrievingEnabled ); - sGeneratedValueStatement = aSettings.getOrDefault( "AutoRetrievingStatement", sGeneratedValueStatement ); - m_bIgnoreDriverPrivileges = aSettings.getOrDefault( "IgnoreDriverPrivileges", m_bIgnoreDriverPrivileges ); - m_bIgnoreCurrency = aSettings.getOrDefault( "IgnoreCurrency", m_bIgnoreCurrency ); - aSystemProperties = aSettings.getOrDefault( "SystemProperties", aSystemProperties ); - m_aCatalogRestriction = aSettings.getOrDefault( "ImplicitCatalogRestriction", Any() ); - m_aSchemaRestriction = aSettings.getOrDefault( "ImplicitSchemaRestriction", Any() ); + bAutoRetrievingEnabled = aSettings.getOrDefault( u"IsAutoRetrievingEnabled"_ustr, bAutoRetrievingEnabled ); + sGeneratedValueStatement = aSettings.getOrDefault( u"AutoRetrievingStatement"_ustr, sGeneratedValueStatement ); + m_bIgnoreDriverPrivileges = aSettings.getOrDefault( u"IgnoreDriverPrivileges"_ustr, m_bIgnoreDriverPrivileges ); + m_bIgnoreCurrency = aSettings.getOrDefault( u"IgnoreCurrency"_ustr, m_bIgnoreCurrency ); + aSystemProperties = aSettings.getOrDefault( u"SystemProperties"_ustr, aSystemProperties ); + m_aCatalogRestriction = aSettings.getOrDefault( u"ImplicitCatalogRestriction"_ustr, Any() ); + m_aSchemaRestriction = aSettings.getOrDefault( u"ImplicitSchemaRestriction"_ustr, Any() ); loadDriverFromProperties( sDriverClass, sDriverClassPath, aSystemProperties ); diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 0bb568e2aabb..f2f4bf55a08e 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -47,7 +47,7 @@ java_sql_Driver::~java_sql_Driver() OUString SAL_CALL java_sql_Driver::getImplementationName( ) { - return "com.sun.star.comp.sdbc.JDBCDriver"; + return u"com.sun.star.comp.sdbc.JDBCDriver"_ustr; // this name is referenced in the configuration and in the jdbc.xml // Please take care when changing it. } @@ -60,7 +60,7 @@ sal_Bool SAL_CALL java_sql_Driver::supportsService( const OUString& _rServiceNam Sequence< OUString > SAL_CALL java_sql_Driver::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr }; } Reference< XConnection > SAL_CALL java_sql_Driver::connect( const OUString& url, const @@ -108,97 +108,97 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const { if ( acceptsURL(url) ) { - Sequence< OUString > aBooleanValues{ "false", "true" }; + Sequence< OUString > aBooleanValues{ u"false"_ustr, u"true"_ustr }; return { { - "JavaDriverClass" - ,"The JDBC driver class name." + u"JavaDriverClass"_ustr + ,u"The JDBC driver class name."_ustr ,true ,OUString() ,Sequence< OUString >() }, { - "JavaDriverClassPath" - ,"The class path where to look for the JDBC driver." + u"JavaDriverClassPath"_ustr + ,u"The class path where to look for the JDBC driver."_ustr ,true - , "" + , u""_ustr ,Sequence< OUString >() }, { - "SystemProperties" - ,"Additional properties to set at java.lang.System before loading the driver." + u"SystemProperties"_ustr + ,u"Additional properties to set at java.lang.System before loading the driver."_ustr ,true - , "" + , u""_ustr ,Sequence< OUString >() }, { - "ParameterNameSubstitution" - ,"Change named parameters with '?'." + u"ParameterNameSubstitution"_ustr + ,u"Change named parameters with '?'."_ustr ,false - ,"false" + ,u"false"_ustr ,aBooleanValues }, { - "IgnoreDriverPrivileges" - ,"Ignore the privileges from the database driver." + u"IgnoreDriverPrivileges"_ustr + ,u"Ignore the privileges from the database driver."_ustr ,false - , "false" + , u"false"_ustr ,aBooleanValues }, { - "IsAutoRetrievingEnabled" - ,"Retrieve generated values." + u"IsAutoRetrievingEnabled"_ustr + ,u"Retrieve generated values."_ustr ,false - ,"false" + ,u"false"_ustr ,aBooleanValues }, { - "AutoRetrievingStatement" - ,"Auto-increment statement." + u"AutoRetrievingStatement"_ustr + ,u"Auto-increment statement."_ustr ,false ,OUString() ,Sequence< OUString >() }, { - "GenerateASBeforeCorrelationName" - ,"Generate AS before table correlation names." + u"GenerateASBeforeCorrelationName"_ustr + ,u"Generate AS before table correlation names."_ustr ,false - ,"false" + ,u"false"_ustr ,aBooleanValues }, { - "IgnoreCurrency" - ,"Ignore the currency field from the ResultsetMetaData." + u"IgnoreCurrency"_ustr + ,u"Ignore the currency field from the ResultsetMetaData."_ustr ,false - ,"false" + ,u"false"_ustr ,aBooleanValues }, { - "EscapeDateTime" - ,"Escape date time format." + u"EscapeDateTime"_ustr + ,u"Escape date time format."_ustr ,false - ,"true" + ,u"true"_ustr ,aBooleanValues }, { - "TypeInfoSettings" - ,"Defines how the type info of the database metadata should be manipulated." + u"TypeInfoSettings"_ustr + ,u"Defines how the type info of the database metadata should be manipulated."_ustr ,false ,OUString() ,Sequence< OUString > () }, { - "ImplicitCatalogRestriction" - ,"The catalog which should be used in getTables calls, when the caller passed NULL." + u"ImplicitCatalogRestriction"_ustr + ,u"The catalog which should be used in getTables calls, when the caller passed NULL."_ustr ,false ,OUString( ) ,Sequence< OUString > () }, { - "ImplicitSchemaRestriction" - ,"The schema which should be used in getTables calls, when the caller passed NULL." + u"ImplicitSchemaRestriction"_ustr + ,u"The schema which should be used in getTables calls, when the caller passed NULL."_ustr ,false ,OUString( ) ,Sequence< OUString > () diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 1d5326ca6302..da53ee7f50bb 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -833,7 +833,7 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv) } -IMPLEMENT_SERVICE_INFO(java_sql_Statement,"com.sun.star.sdbcx.JStatement","com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(java_sql_Statement,u"com.sun.star.sdbcx.JStatement"_ustr,u"com.sun.star.sdbc.Statement"_ustr); void SAL_CALL java_sql_Statement_Base::acquire() noexcept { diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index fa3f7b40c982..65ff309c019c 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::lang; //************ Class: java.sql.PreparedStatement -IMPLEMENT_SERVICE_INFO(java_sql_PreparedStatement,"com.sun.star.sdbcx.JPreparedStatement","com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(java_sql_PreparedStatement,u"com.sun.star.sdbcx.JPreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr); java_sql_PreparedStatement::java_sql_PreparedStatement( JNIEnv * pEnv, java_sql_Connection& _rCon, const OUString& sql ) : OStatement_BASE2( pEnv, _rCon ) @@ -295,25 +295,25 @@ void SAL_CALL java_sql_PreparedStatement::setNull( sal_Int32 parameterIndex, sal void SAL_CALL java_sql_PreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const css::uno::Reference< css::sdbc::XClob >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setClob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setClob"_ustr, *this ); } void SAL_CALL java_sql_PreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const css::uno::Reference< css::sdbc::XBlob >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setBlob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setBlob"_ustr, *this ); } void SAL_CALL java_sql_PreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const css::uno::Reference< css::sdbc::XArray >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setArray", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setArray"_ustr, *this ); } void SAL_CALL java_sql_PreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const css::uno::Reference< css::sdbc::XRef >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setRef", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setRef"_ustr, *this ); } diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index c274c521c33c..f37c0dbbeba4 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -58,7 +58,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,"com.sun.star.sdbcx.JResultSet","com.sun.star.sdbc.ResultSet"); +IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,u"com.sun.star.sdbcx.JResultSet"_ustr,u"com.sun.star.sdbc.ResultSet"_ustr); //************ Class: java.sql.ResultSet @@ -730,7 +730,7 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con catch(const Exception&) { Any anyEx = ::cppu::getCaughtException(); - ::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateBinaryStream", *this, anyEx ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XRowUpdate::updateBinaryStream"_ustr, *this, anyEx ); } } @@ -762,7 +762,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, catch(const Exception&) { Any anyEx = ::cppu::getCaughtException(); - ::dbtools::throwFeatureNotImplementedSQLException( "XRowUpdate::updateCharacterStream", *this, anyEx ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XRowUpdate::updateCharacterStream"_ustr, *this, anyEx ); } } diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 1d1959717370..ad133ee5726d 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -181,7 +181,7 @@ jobject connectivity::convertTypeMapToJavaMap(const Reference< css::container::X { css::uno::Sequence< OUString > aNames = _rMap->getElementNames(); if ( aNames.hasElements() ) - ::dbtools::throwFeatureNotImplementedSQLException( "Type maps", nullptr ); + ::dbtools::throwFeatureNotImplementedSQLException( u"Type maps"_ustr, nullptr ); } return nullptr; } diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index 076a05d3b9dc..37cfb087a70f 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -52,7 +52,7 @@ void MozillaBootstrap::disposing() OUString SAL_CALL MozillaBootstrap::getImplementationName( ) { - return "com.sun.star.comp.mozilla.MozillaBootstrap"; + return u"com.sun.star.comp.mozilla.MozillaBootstrap"_ustr; } sal_Bool SAL_CALL MozillaBootstrap::supportsService( const OUString& _rServiceName ) @@ -64,7 +64,7 @@ Sequence< OUString > SAL_CALL MozillaBootstrap::getSupportedServiceNames( ) { // which service is supported // for more information @see com.sun.star.mozilla.MozillaBootstrap - return { "com.sun.star.mozilla.MozillaBootstrap" }; + return { u"com.sun.star.mozilla.MozillaBootstrap"_ustr }; } diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index a146d0c09680..98a1b6ff64bc 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -48,7 +48,7 @@ IniParser::IniParser(OUString const & rIniName) sal_uInt64 nSize = 0; osl_getFileSize(handle, &nSize); - OUString sectionName( "no name section" ); + OUString sectionName( u"no name section"_ustr ); while (true) { sal_uInt64 nPos; diff --git a/connectivity/source/drivers/mysql_jdbc/YCatalog.cxx b/connectivity/source/drivers/mysql_jdbc/YCatalog.cxx index de9ffd7127d5..7f4b0232e0c8 100644 --- a/connectivity/source/drivers/mysql_jdbc/YCatalog.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YCatalog.cxx @@ -41,7 +41,8 @@ OMySQLCatalog::OMySQLCatalog(const Reference& _xConnection) void OMySQLCatalog::refreshObjects(const Sequence& _sKindOfObject, ::std::vector& _rNames) { - Reference xResult = m_xMetaData->getTables(Any(), "%", "%", _sKindOfObject); + Reference xResult + = m_xMetaData->getTables(Any(), u"%"_ustr, u"%"_ustr, _sKindOfObject); fillNames(xResult, _rNames); } @@ -50,7 +51,7 @@ void OMySQLCatalog::refreshTables() ::std::vector aVector; Sequence sTableTypes{ - "VIEW", "TABLE", "%" + u"VIEW"_ustr, u"TABLE"_ustr, u"%"_ustr }; // this last one just to be sure to include anything else... refreshObjects(sTableTypes, aVector); @@ -63,7 +64,7 @@ void OMySQLCatalog::refreshTables() void OMySQLCatalog::refreshViews() { - Sequence aTypes{ "VIEW" }; + Sequence aTypes{ u"VIEW"_ustr }; // let's simply assume the server is new enough to support views. Current drivers // as of this writing might not return the proper information in getTableTypes, so @@ -85,7 +86,7 @@ void OMySQLCatalog::refreshUsers() ::std::vector aVector; Reference xStmt = m_xConnection->createStatement(); Reference xResult = xStmt->executeQuery( - "SELECT grantee FROM information_schema.user_privileges GROUP BY grantee"); + u"SELECT grantee FROM information_schema.user_privileges GROUP BY grantee"_ustr); if (xResult.is()) { Reference xRow(xResult, UNO_QUERY); diff --git a/connectivity/source/drivers/mysql_jdbc/YColumns.cxx b/connectivity/source/drivers/mysql_jdbc/YColumns.cxx index 910b01e4fb11..8861037e9a0d 100644 --- a/connectivity/source/drivers/mysql_jdbc/YColumns.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YColumns.cxx @@ -62,7 +62,7 @@ void OMySQLColumn::construct() Sequence SAL_CALL OMySQLColumn::getSupportedServiceNames() { - return { "com.sun.star.sdbcx.Column" }; + return { u"com.sun.star.sdbcx.Column"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx index e4e338ee0b31..bc2a2314b939 100644 --- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx @@ -50,7 +50,7 @@ namespace OUString getJavaDriverClass(css::uno::Sequence const& info) { return comphelper::NamedValueCollection::getOrDefault(info, u"JavaDriverClass", - OUString("com.mysql.jdbc.Driver")); + u"com.mysql.jdbc.Driver"_ustr); } } @@ -165,7 +165,7 @@ Sequence lcl_convertProperties(T_DRIVERTYPE _eType, { if (!jdc) { - aProps.emplace_back("JavaDriverClass", 0, Any(OUString("com.mysql.jdbc.Driver")), + aProps.emplace_back("JavaDriverClass", 0, Any(u"com.mysql.jdbc.Driver"_ustr), PropertyState_DIRECT_VALUE); } } @@ -174,7 +174,7 @@ Sequence lcl_convertProperties(T_DRIVERTYPE _eType, aProps.emplace_back("PublicConnectionURL", 0, Any(_sUrl), PropertyState_DIRECT_VALUE); } aProps.emplace_back("IsAutoRetrievingEnabled", 0, Any(true), PropertyState_DIRECT_VALUE); - aProps.emplace_back("AutoRetrievingStatement", 0, Any(OUString("SELECT LAST_INSERT_ID()")), + aProps.emplace_back("AutoRetrievingStatement", 0, Any(u"SELECT LAST_INSERT_ID()"_ustr), PropertyState_DIRECT_VALUE); aProps.emplace_back("ParameterNameSubstitution", 0, Any(true), PropertyState_DIRECT_VALUE); return Sequence(aProps.data(), aProps.size()); @@ -284,12 +284,12 @@ ODriverDelegator::getPropertyInfo(const OUString& url, const Sequence(); - Sequence aBoolean{ "0", "1" }; + Sequence aBoolean{ u"0"_ustr, u"1"_ustr }; std::vector aDriverInfo{ - { "CharSet", "CharSet of the database.", false, {}, {} }, - { "SuppressVersionColumns", "Display version columns (when available).", false, "0", - aBoolean } + { u"CharSet"_ustr, u"CharSet of the database."_ustr, false, {}, {} }, + { u"SuppressVersionColumns"_ustr, u"Display version columns (when available)."_ustr, false, + u"0"_ustr, aBoolean } }; const T_DRIVERTYPE eType = lcl_getDriverType(url); if (eType == T_DRIVERTYPE::Jdbc) @@ -377,7 +377,7 @@ ODriverDelegator::getDataDefinitionByURL(const OUString& url, const Sequence SAL_CALL ODriverDelegator::getSupportedServiceNames() { - return { "com.sun.star.sdbc.Driver", "com.sun.star.sdbcx.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr, u"com.sun.star.sdbcx.Driver"_ustr }; } } // namespace connectivity diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx index b79b3f231bbf..dfb3e37a186f 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx @@ -48,7 +48,7 @@ namespace class OMySQLKeysHelper : public OKeysHelper { protected: - virtual OUString getDropForeignKey() const override { return " DROP FOREIGN KEY "; } + virtual OUString getDropForeignKey() const override { return u" DROP FOREIGN KEY "_ustr; } public: OMySQLKeysHelper(OTableHelper* _pTable, ::osl::Mutex& _rMutex, @@ -262,7 +262,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType, const OUString& _rColName, executeStatement(sSql); } -OUString OMySQLTable::getTypeCreatePattern() const { return "(M,D)"; } +OUString OMySQLTable::getTypeCreatePattern() const { return u"(M,D)"_ustr; } void OMySQLTable::alterDefaultValue(std::u16string_view _sNewDefault, const OUString& _rColName) { @@ -284,7 +284,7 @@ void OMySQLTable::dropDefaultValue(const OUString& _rColName) OUString OMySQLTable::getAlterTableColumnPart() const { - OUString sSql("ALTER TABLE "); + OUString sSql(u"ALTER TABLE "_ustr); OUString sComposedName( ::dbtools::composeTableName(getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, @@ -308,6 +308,6 @@ void OMySQLTable::executeStatement(const OUString& _rStatement) } } -OUString OMySQLTable::getRenameStart() const { return "RENAME TABLE "; } +OUString OMySQLTable::getRenameStart() const { return u"RENAME TABLE "_ustr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql_jdbc/YTables.cxx b/connectivity/source/drivers/mysql_jdbc/YTables.cxx index aa527cf0cc30..8fd165b61654 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTables.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTables.cxx @@ -46,7 +46,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) ::dbtools::EComposeRule::InDataManipulation); Sequence sTableTypes{ - "VIEW", "TABLE", "%" + u"VIEW"_ustr, u"TABLE"_ustr, u"%"_ustr }; // this last one just to be sure to include anything else... Any aCatalog; @@ -110,7 +110,7 @@ void OTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName) ::dbtools::qualifiedNameComponents(m_xMetaData, _sElementName, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation); - OUString aSql("DROP "); + OUString aSql(u"DROP "_ustr); Reference xProp(xObject, UNO_QUERY); bool bIsView = xProp.is() diff --git a/connectivity/source/drivers/mysql_jdbc/YUser.cxx b/connectivity/source/drivers/mysql_jdbc/YUser.cxx index ec3a6265967f..6944aa7e4c3f 100644 --- a/connectivity/source/drivers/mysql_jdbc/YUser.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YUser.cxx @@ -117,7 +117,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I Any aCatalog; if (!sCatalog.isEmpty()) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog, sSchema, sTable, "%"); + xRes = xMeta->getColumnPrivileges(aCatalog, sSchema, sTable, u"%"_ustr); } break; } diff --git a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx index b096310acd4c..73fa7069400a 100644 --- a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx @@ -55,7 +55,7 @@ Reference OUsers::createDescriptor() { return new OUserExtend(m_xC sdbcx::ObjectType OUsers::appendObject(const OUString& _rForName, const Reference& descriptor) { - OUString aSql("GRANT USAGE ON * TO "); + OUString aSql(u"GRANT USAGE ON * TO "_ustr); OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString(); aSql += ::dbtools::quoteName(aQuote, _rForName) + " @\"%\" "; OUString sPassword; @@ -77,7 +77,7 @@ sdbcx::ObjectType OUsers::appendObject(const OUString& _rForName, // XDrop void OUsers::dropObject(sal_Int32 /*_nPos*/, const OUString& _sElementName) { - OUString aSql("DROP USER "); + OUString aSql(u"DROP USER "_ustr); OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString(); aSql += ::dbtools::quoteName(aQuote, _sElementName); diff --git a/connectivity/source/drivers/mysql_jdbc/YViews.cxx b/connectivity/source/drivers/mysql_jdbc/YViews.cxx index e9531df6950f..4308d88c9949 100644 --- a/connectivity/source/drivers/mysql_jdbc/YViews.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YViews.cxx @@ -80,7 +80,7 @@ void OViews::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/) if (bIsNew) return; - OUString aSql("DROP VIEW"); + OUString aSql(u"DROP VIEW"_ustr); Reference xProp(xObject, UNO_QUERY); aSql += ::dbtools::composeTableName(m_xMetaData, xProp, @@ -103,7 +103,7 @@ void OViews::createView(const Reference& descriptor) { Reference xConnection = static_cast(m_rParent).getConnection(); - OUString aSql("CREATE VIEW "); + OUString aSql(u"CREATE VIEW "_ustr); OUString sCommand; aSql += ::dbtools::composeTableName(m_xMetaData, descriptor, diff --git a/connectivity/source/drivers/mysqlc/mysqlc_catalog.cxx b/connectivity/source/drivers/mysqlc/mysqlc_catalog.cxx index d72ab1f65d72..dfe88d9b4b17 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_catalog.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_catalog.cxx @@ -25,7 +25,7 @@ connectivity::mysqlc::Catalog::Catalog( void connectivity::mysqlc::Catalog::refreshTables() { css::uno::Reference xTables - = m_xMetaData->getTables(css::uno::Any(), "%", "%", {}); + = m_xMetaData->getTables(css::uno::Any(), u"%"_ustr, u"%"_ustr, {}); if (!xTables.is()) return; @@ -43,7 +43,7 @@ void connectivity::mysqlc::Catalog::refreshTables() void connectivity::mysqlc::Catalog::refreshViews() { css::uno::Reference xViews - = m_xMetaData->getTables(css::uno::Any(), "%", "%", { "VIEW" }); + = m_xMetaData->getTables(css::uno::Any(), u"%"_ustr, u"%"_ustr, { u"VIEW"_ustr }); if (!xViews.is()) return; @@ -69,7 +69,7 @@ void connectivity::mysqlc::Catalog::refreshUsers() { css::uno::Reference statement = m_xConnection->createStatement(); css::uno::Reference xUsers = statement->executeQuery( - "SELECT grantee FROM information_schema.user_privileges GROUP BY grantee"); + u"SELECT grantee FROM information_schema.user_privileges GROUP BY grantee"_ustr); if (!xUsers.is()) return; diff --git a/connectivity/source/drivers/mysqlc/mysqlc_column.cxx b/connectivity/source/drivers/mysqlc/mysqlc_column.cxx index ceb7437386e6..953d4117c247 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_column.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_column.cxx @@ -39,7 +39,7 @@ void connectivity::mysqlc::Column::construct() css::uno::Sequence SAL_CALL connectivity::mysqlc::Column::getSupportedServiceNames() { - return { "com.sun.star.sdbcx.Column" }; + return { u"com.sun.star.sdbcx.Column"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx index 269113383d8d..035b373b69cd 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx @@ -78,7 +78,7 @@ void OConnection::construct(const OUString& url, const Sequence& sal_Int32 nIndex; OUString token; - OUString aHostName("localhost"); + OUString aHostName(u"localhost"_ustr); sal_Int32 nPort = 3306; OUString aDbName; @@ -188,7 +188,7 @@ void OConnection::construct(const OUString& url, const Sequence& // Check if the server is 4.1 or above if (getMysqlVersion() < 40100) { - throw SQLException("MariaDB LibreOffice Connector requires MySQL Server 4.1 or above", + throw SQLException(u"MariaDB LibreOffice Connector requires MySQL Server 4.1 or above"_ustr, *this, OUString(), 0, Any()); } @@ -198,12 +198,12 @@ void OConnection::construct(const OUString& url, const Sequence& OUString OConnection::getImplementationName() { - return "com.sun.star.sdbc.drivers.mysqlc.OConnection"; + return u"com.sun.star.sdbc.drivers.mysqlc.OConnection"_ustr; } css::uno::Sequence OConnection::getSupportedServiceNames() { - return { "com.sun.star.sdbc.Connection" }; + return { u"com.sun.star.sdbc.Connection"_ustr }; } sal_Bool OConnection::supportsService(OUString const& ServiceName) @@ -462,11 +462,11 @@ OUString OConnection::transFormPreparedStatement(const OUString& _sSQL) try { Reference xCon = this; - Sequence aArgs{ Any(NamedValue("ActiveConnection", Any(xCon))) }; + Sequence aArgs{ Any(NamedValue(u"ActiveConnection"_ustr, Any(xCon))) }; m_xParameterSubstitution.set( m_xDriver->getFactory()->createInstanceWithArguments( - "org.openoffice.comp.helper.ParameterSubstitution", aArgs), + u"org.openoffice.comp.helper.ParameterSubstitution"_ustr, aArgs), UNO_QUERY); } catch (const Exception&) diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx index 6d171b661815..c3c073f276b2 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx @@ -158,11 +158,11 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength() { return 256; } sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns() { return true; } -OUString SAL_CALL ODatabaseMetaData::getCatalogTerm() { return "n/a"; } +OUString SAL_CALL ODatabaseMetaData::getCatalogTerm() { return u"n/a"_ustr; } -OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() { return "`"; } +OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString() { return u"`"_ustr; } -OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters() { return "#@"; } +OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters() { return u"#@"_ustr; } sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames() { return true; } @@ -349,7 +349,7 @@ OUString SAL_CALL ODatabaseMetaData::getURL() OUString SAL_CALL ODatabaseMetaData::getUserName() { Reference statement = m_rConnection.createStatement(); - Reference rs = statement->executeQuery("select user()"); + Reference rs = statement->executeQuery(u"select user()"_ustr); Reference xRow(rs, UNO_QUERY_THROW); (void)rs->next(); // the first and only result // e.g. root@localhost @@ -363,9 +363,9 @@ OUString SAL_CALL ODatabaseMetaData::getUserName() return userWithConnection; } -OUString SAL_CALL ODatabaseMetaData::getDriverName() { return "MySQL Connector/OO.org"; } +OUString SAL_CALL ODatabaseMetaData::getDriverName() { return u"MySQL Connector/OO.org"_ustr; } -OUString SAL_CALL ODatabaseMetaData::getDriverVersion() { return "0.9.2"; } +OUString SAL_CALL ODatabaseMetaData::getDriverVersion() { return u"0.9.2"_ustr; } OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion() { @@ -373,11 +373,11 @@ OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion() m_rConnection.getConnectionEncoding()); } -OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName() { return "MySQL"; } +OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName() { return u"MySQL"_ustr; } -OUString SAL_CALL ODatabaseMetaData::getProcedureTerm() { return "procedure"; } +OUString SAL_CALL ODatabaseMetaData::getProcedureTerm() { return u"procedure"_ustr; } -OUString SAL_CALL ODatabaseMetaData::getSchemaTerm() { return "database"; } +OUString SAL_CALL ODatabaseMetaData::getSchemaTerm() { return u"database"_ustr; } sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion() { @@ -400,7 +400,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion() OUString SAL_CALL ODatabaseMetaData::getSQLKeywords() { - return "ACCESSIBLE, ADD, ALL," + return u"ACCESSIBLE, ADD, ALL," "ALTER, ANALYZE, AND, AS, ASC, ASENSITIVE, BEFORE," "BETWEEN, BIGINT, BINARY, BLOB, BOTH, BY, CALL," "CASCADE, CASE, CHANGE, CHAR, CHARACTER, CHECK," @@ -442,43 +442,43 @@ OUString SAL_CALL ODatabaseMetaData::getSQLKeywords() "VARCHARACTER, VARYING, WHEN, WHERE, WHILE, WITH," "WRITE, X509, XOR, YEAR_MONTH, ZEROFILL" "GENERAL, IGNORE_SERVER_IDS, MASTER_HEARTBEAT_PERIOD," - "MAXVALUE, RESIGNAL, SIGNAL, SLOW"; + "MAXVALUE, RESIGNAL, SIGNAL, SLOW"_ustr; } -OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape() { return "\\"; } +OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape() { return u"\\"_ustr; } OUString SAL_CALL ODatabaseMetaData::getStringFunctions() { - return "ASCII,BIN,BIT_LENGTH,CHAR,CHARACTER_LENGTH,CHAR_LENGTH,CONCAT," + return u"ASCII,BIN,BIT_LENGTH,CHAR,CHARACTER_LENGTH,CHAR_LENGTH,CONCAT," "CONCAT_WS,CONV,ELT,EXPORT_SET,FIELD,FIND_IN_SET,HEX,INSERT," "INSTR,LCASE,LEFT,LENGTH,LOAD_FILE,LOCATE,LOCATE,LOWER,LPAD," "LTRIM,MAKE_SET,MATCH,MID,OCT,OCTET_LENGTH,ORD,POSITION," "QUOTE,REPEAT,REPLACE,REVERSE,RIGHT,RPAD,RTRIM,SOUNDEX," "SPACE,STRCMP,SUBSTRING,SUBSTRING,SUBSTRING,SUBSTRING," - "SUBSTRING_INDEX,TRIM,UCASE,UPPER"; + "SUBSTRING_INDEX,TRIM,UCASE,UPPER"_ustr; } OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions() { - return "DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME," + return u"DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME," "MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,PERIOD_ADD," "PERIOD_DIFF,TO_DAYS,FROM_DAYS,DATE_FORMAT,TIME_FORMAT," "CURDATE,CURRENT_DATE,CURTIME,CURRENT_TIME,NOW,SYSDATE," "CURRENT_TIMESTAMP,UNIX_TIMESTAMP,FROM_UNIXTIME," - "SEC_TO_TIME,TIME_TO_SEC"; + "SEC_TO_TIME,TIME_TO_SEC"_ustr; } OUString SAL_CALL ODatabaseMetaData::getSystemFunctions() { - return "DATABASE,USER,SYSTEM_USER," - "SESSION_USER,PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION"; + return u"DATABASE,USER,SYSTEM_USER," + "SESSION_USER,PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION"_ustr; } OUString SAL_CALL ODatabaseMetaData::getNumericFunctions() { - return "ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS," + return u"ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS," "COT,DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW," - "POWER,RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE"; + "POWER,RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE"_ustr; } sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar() { return false; } @@ -553,9 +553,10 @@ Reference SAL_CALL ODatabaseMetaData::getTableTypes() const char* const table_types[] = { "TABLE", "VIEW" }; sal_Int32 const requiredVersion[] = { 0, 50000 }; - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -573,9 +574,10 @@ Reference SAL_CALL ODatabaseMetaData::getTableTypes() Reference SAL_CALL ODatabaseMetaData::getTypeInfo() { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; @@ -605,17 +607,19 @@ Reference SAL_CALL ODatabaseMetaData::getTypeInfo() Reference SAL_CALL ODatabaseMetaData::getCatalogs() { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); return xResultSet; } Reference SAL_CALL ODatabaseMetaData::getSchemas() { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; Reference statement = m_rConnection.createStatement(); @@ -649,12 +653,12 @@ Reference const OUString& table, const OUString& columnNamePattern) { - OUString query("SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA AS " + OUString query(u"SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA AS " "TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, NULL AS GRANTOR, " "GRANTEE, PRIVILEGE_TYPE AS PRIVILEGE, IS_GRANTABLE FROM " "INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE TABLE_SCHEMA LIKE " "'?' AND TABLE_NAME='?' AND COLUMN_NAME LIKE '?' ORDER BY " - "COLUMN_NAME, PRIVILEGE_TYPE"); + "COLUMN_NAME, PRIVILEGE_TYPE"_ustr); query = query.replaceFirst("?", schema); query = query.replaceFirst("?", table); @@ -723,9 +727,10 @@ Reference SAL_CALL ODatabaseMetaData::getColumns(const Any& /*catalo Reference rs = statement->executeQuery(query); Reference xRow(rs, UNO_QUERY_THROW); - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> aRows; while (rs->next()) { @@ -849,9 +854,10 @@ Reference const OUString& /*schemaPattern*/, const OUString& /*procedureNamePattern*/) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; // TODO IMPL SAL_WARN("connectivity.mysqlc", "method not implemented"); @@ -863,9 +869,10 @@ Reference SAL_CALL ODatabaseMetaData::getVersionColumns(const Any& / const OUString& /* schema */, const OUString& /* table */) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; lcl_setRows_throw(xResultSet, 16, rRows); return xResultSet; @@ -875,9 +882,10 @@ Reference SAL_CALL ODatabaseMetaData::getExportedKeys(const Any& /*c const OUString& /*schema */, const OUString& /*table */) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; // TODO implement SAL_WARN("connectivity.mysqlc", "method not implemented"); @@ -889,11 +897,12 @@ Reference SAL_CALL ODatabaseMetaData::getImportedKeys(const Any& /*c const OUString& schema, const OUString& table) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); - OUString query("SELECT refi.CONSTRAINT_CATALOG," // 1: foreign catalog + OUString query(u"SELECT refi.CONSTRAINT_CATALOG," // 1: foreign catalog " k.COLUMN_NAME," // 2: foreign column name " refi.UNIQUE_CONSTRAINT_CATALOG," // 3: primary catalog FIXME " k.REFERENCED_TABLE_SCHEMA," // 4: primary schema @@ -908,7 +917,7 @@ Reference SAL_CALL ODatabaseMetaData::getImportedKeys(const Any& /*c "refi.CONSTRAINT_NAME " " and k.TABLE_NAME = refi.TABLE_NAME " " WHERE k.REFERENCED_TABLE_SCHEMA LIKE " - "'?' AND refi.TABLE_NAME='?'"); + "'?' AND refi.TABLE_NAME='?'"_ustr); query = query.replaceFirst("?", schema); // TODO what if schema is NULL? query = query.replaceFirst("?", table); @@ -960,12 +969,12 @@ Reference SAL_CALL ODatabaseMetaData::getPrimaryKeys(const Any& /*ca const OUString& schema, const OUString& table) { - OUString query("SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA " + OUString query(u"SELECT TABLE_CATALOG AS TABLE_CAT, TABLE_SCHEMA " "AS TABLE_SCHEM, TABLE_NAME, " "COLUMN_NAME, SEQ_IN_INDEX AS KEY_SEQ," "INDEX_NAME AS PK_NAME FROM INFORMATION_SCHEMA.STATISTICS " "WHERE TABLE_SCHEMA LIKE '?' AND TABLE_NAME LIKE '?' AND INDEX_NAME='PRIMARY' " - "ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX"); + "ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX"_ustr); // TODO use prepared stmt instead // TODO escape schema, table name ? @@ -983,9 +992,10 @@ Reference SAL_CALL ODatabaseMetaData::getIndexInfo(const Any& /*cata sal_Bool /*unique*/, sal_Bool /*approximate*/) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; // TODO SAL_WARN("connectivity.mysqlc", "method not implemented"); @@ -999,9 +1009,10 @@ Reference SAL_CALL ODatabaseMetaData::getBestRowIdentifier(const Any sal_Int32 /*scope*/, sal_Bool /*nullable*/) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; // TODO SAL_WARN("connectivity.mysqlc", "method not implemented"); @@ -1012,7 +1023,7 @@ Reference SAL_CALL ODatabaseMetaData::getBestRowIdentifier(const Any Reference SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& /* catalog */, const OUString& schemaPattern, const OUString& tableNamePattern) { - OUString query("SELECT TABLE_SCHEMA TABLE_CAT, " + OUString query(u"SELECT TABLE_SCHEMA TABLE_CAT, " "NULL TABLE_SCHEM, " "TABLE_NAME, " "NULL GRANTOR," @@ -1021,7 +1032,7 @@ Reference SAL_CALL ODatabaseMetaData::getTablePrivileges( "IS_GRANTABLE " "FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES " "WHERE TABLE_SCHEMA LIKE '?' " - "AND TABLE_NAME='?'"); + "AND TABLE_NAME='?'"_ustr); query = query.replaceFirst("?", schemaPattern); query = query.replaceFirst("?", tableNamePattern); Reference statement = m_rConnection.createStatement(); @@ -1034,9 +1045,10 @@ Reference SAL_CALL ODatabaseMetaData::getCrossReference( const OUString& /*primaryTable_*/, const Any& /*foreignCatalog*/, const OUString& /*foreignSchema*/, const OUString& /*foreignTable*/) { - Reference xResultSet(getOwnConnection().getDriver().getFactory()->createInstance( - "org.openoffice.comp.helper.DatabaseMetaDataResultSet"), - UNO_QUERY); + Reference xResultSet( + getOwnConnection().getDriver().getFactory()->createInstance( + u"org.openoffice.comp.helper.DatabaseMetaDataResultSet"_ustr), + UNO_QUERY); std::vector> rRows; // TODO SAL_WARN("connectivity.mysqlc", "method not implemented"); diff --git a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx index 79a514a57898..54240b360c08 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx @@ -55,12 +55,12 @@ void MysqlCDriver::disposing() // static ServiceInfo OUString MysqlCDriver::getImplementationName_Static() { - return "com.sun.star.comp.sdbc.mysqlc.MysqlCDriver"; + return u"com.sun.star.comp.sdbc.mysqlc.MysqlCDriver"_ustr; } Sequence MysqlCDriver::getSupportedServiceNames_Static() { - return { "com.sun.star.sdbc.Driver", "com.sun.star.sdbcx.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr, u"com.sun.star.sdbcx.Driver"_ustr }; } OUString SAL_CALL MysqlCDriver::getImplementationName() { return getImplementationName_Static(); } @@ -103,8 +103,8 @@ MysqlCDriver::getPropertyInfo(const OUString& url, const Sequence { if (acceptsURL(url)) { - return { { "Hostname", "Name of host", true, "localhost", {} }, - { "Port", "Port", true, "3306", {} } }; + return { { u"Hostname"_ustr, u"Name of host"_ustr, true, u"localhost"_ustr, {} }, + { u"Port"_ustr, u"Port"_ustr, true, u"3306"_ustr, {} } }; } return Sequence(); diff --git a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx index bc57770413f5..58409e454e7a 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_general.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_general.cxx @@ -94,7 +94,7 @@ void throwFeatureNotImplementedException(const char* _pAsciiFeatureName, { const OUString sMessage = OUString::createFromAscii(_pAsciiFeatureName) + ": feature not implemented."; - throw SQLException(sMessage, _rxContext, "HYC00", 0, Any()); + throw SQLException(sMessage, _rxContext, u"HYC00"_ustr, 0, Any()); } void throwInvalidArgumentException(const char* _pAsciiFeatureName, @@ -102,7 +102,7 @@ void throwInvalidArgumentException(const char* _pAsciiFeatureName, { const OUString sMessage = OUString::createFromAscii(_pAsciiFeatureName) + ": invalid arguments."; - throw SQLException(sMessage, _rxContext, "HYC00", 0, Any()); + throw SQLException(sMessage, _rxContext, u"HYC00"_ustr, 0, Any()); } void throwSQLExceptionWithMsg(const char* msg, const char* SQLSTATE, unsigned int errorNum, @@ -257,93 +257,92 @@ OUString mysqlTypeToStr(unsigned type, unsigned flags) switch (type) { case MYSQL_TYPE_BIT: - return OUString{ "BIT" }; + return u"BIT"_ustr; case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_NEWDECIMAL: - return isUnsigned ? (isZerofill ? OUString{ "DECIMAL UNSIGNED ZEROFILL" } - : OUString{ "DECIMAL UNSIGNED" }) - : OUString{ "DECIMAL" }; + return isUnsigned + ? (isZerofill ? u"DECIMAL UNSIGNED ZEROFILL"_ustr : u"DECIMAL UNSIGNED"_ustr) + : u"DECIMAL"_ustr; case MYSQL_TYPE_TINY: - return isUnsigned ? (isZerofill ? OUString{ "TINYINT UNSIGNED ZEROFILL" } - : OUString{ "TINYINT UNSIGNED" }) - : OUString{ "TINYINT" }; + return isUnsigned + ? (isZerofill ? u"TINYINT UNSIGNED ZEROFILL"_ustr : u"TINYINT UNSIGNED"_ustr) + : u"TINYINT"_ustr; case MYSQL_TYPE_SHORT: - return isUnsigned ? (isZerofill ? OUString{ "SMALLINT UNSIGNED ZEROFILL" } - : OUString{ "SMALLINT UNSIGNED" }) - : OUString{ "SMALLINT" }; + return isUnsigned ? (isZerofill ? u"SMALLINT UNSIGNED ZEROFILL"_ustr + : u"SMALLINT UNSIGNED"_ustr) + : u"SMALLINT"_ustr; case MYSQL_TYPE_LONG: - return isUnsigned ? (isZerofill ? OUString{ "INT UNSIGNED ZEROFILL" } - : OUString{ "INT UNSIGNED" }) - : OUString{ "INT" }; + return isUnsigned ? (isZerofill ? u"INT UNSIGNED ZEROFILL"_ustr : u"INT UNSIGNED"_ustr) + : u"INT"_ustr; case MYSQL_TYPE_FLOAT: - return isUnsigned ? (isZerofill ? OUString{ "FLOAT UNSIGNED ZEROFILL" } - : OUString{ "FLOAT UNSIGNED" }) - : OUString{ "FLOAT" }; + return isUnsigned + ? (isZerofill ? u"FLOAT UNSIGNED ZEROFILL"_ustr : u"FLOAT UNSIGNED"_ustr) + : u"FLOAT"_ustr; case MYSQL_TYPE_DOUBLE: - return isUnsigned ? (isZerofill ? OUString{ "DOUBLE UNSIGNED ZEROFILL" } - : OUString{ "DOUBLE UNSIGNED" }) - : OUString{ "DOUBLE" }; + return isUnsigned + ? (isZerofill ? u"DOUBLE UNSIGNED ZEROFILL"_ustr : u"DOUBLE UNSIGNED"_ustr) + : u"DOUBLE"_ustr; case MYSQL_TYPE_NULL: - return OUString{ "NULL" }; + return u"NULL"_ustr; case MYSQL_TYPE_TIMESTAMP: - return OUString{ "TIMESTAMP" }; + return u"TIMESTAMP"_ustr; case MYSQL_TYPE_LONGLONG: - return isUnsigned ? (isZerofill ? OUString{ "BIGINT UNSIGNED ZEROFILL" } - : OUString{ "BIGINT UNSIGNED" }) - : OUString{ "BIGINT" }; + return isUnsigned + ? (isZerofill ? u"BIGINT UNSIGNED ZEROFILL"_ustr : u"BIGINT UNSIGNED"_ustr) + : u"BIGINT"_ustr; case MYSQL_TYPE_INT24: - return isUnsigned ? (isZerofill ? OUString{ "MEDIUMINT UNSIGNED ZEROFILL" } - : OUString{ "MEDIUMINT UNSIGNED" }) - : OUString{ "MEDIUMINT" }; + return isUnsigned ? (isZerofill ? u"MEDIUMINT UNSIGNED ZEROFILL"_ustr + : u"MEDIUMINT UNSIGNED"_ustr) + : u"MEDIUMINT"_ustr; case MYSQL_TYPE_DATE: - return OUString{ "DATE" }; + return u"DATE"_ustr; case MYSQL_TYPE_TIME: - return OUString{ "TIME" }; + return u"TIME"_ustr; case MYSQL_TYPE_DATETIME: - return OUString{ "DATETIME" }; + return u"DATETIME"_ustr; case MYSQL_TYPE_TINY_BLOB: { - return OUString{ "TINYBLOB" }; + return u"TINYBLOB"_ustr; } case MYSQL_TYPE_MEDIUM_BLOB: { - return OUString{ "MEDIUMBLOB" }; + return u"MEDIUMBLOB"_ustr; } case MYSQL_TYPE_LONG_BLOB: { - return OUString{ "LONGBLOB" }; + return u"LONGBLOB"_ustr; } case MYSQL_TYPE_BLOB: { - return OUString{ "BLOB" }; + return u"BLOB"_ustr; } case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VAR_STRING: if (flags & ENUM_FLAG) { - return OUString{ "ENUM" }; + return u"ENUM"_ustr; } if (flags & SET_FLAG) { - return OUString{ "SET" }; + return u"SET"_ustr; } - return OUString{ "VARCHAR" }; + return u"VARCHAR"_ustr; case MYSQL_TYPE_STRING: if (flags & ENUM_FLAG) { - return OUString{ "ENUM" }; + return u"ENUM"_ustr; } if (flags & SET_FLAG) { - return OUString{ "SET" }; + return u"SET"_ustr; } - return OUString{ "CHAR" }; + return u"CHAR"_ustr; case MYSQL_TYPE_YEAR: - return OUString{ "YEAR" }; + return u"YEAR"_ustr; case MYSQL_TYPE_GEOMETRY: - return OUString{ "GEOMETRY" }; + return u"GEOMETRY"_ustr; default: - return OUString{ "UNKNOWN" }; + return u"UNKNOWN"_ustr; } } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx index e11476dc9805..ab3753f5691c 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx @@ -163,12 +163,12 @@ bool OPreparedResultSet::fetchResult() OUString SAL_CALL OPreparedResultSet::getImplementationName() { - return "com.sun.star.sdbcx.mysqlc.ResultSet"; + return u"com.sun.star.sdbcx.mysqlc.ResultSet"_ustr; } uno::Sequence SAL_CALL OPreparedResultSet::getSupportedServiceNames() { - return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr, u"com.sun.star.sdbcx.ResultSet"_ustr }; } sal_Bool SAL_CALL OPreparedResultSet::supportsService(const OUString& _rServiceName) @@ -233,8 +233,8 @@ sal_Int32 SAL_CALL OPreparedResultSet::findColumn(const OUString& columnName) return i + 1; // sdbc indexes from 1 } - throw SQLException("The column name '" + columnName + "' is not valid.", *this, "42S22", 0, - Any()); + throw SQLException("The column name '" + columnName + "' is not valid.", *this, u"42S22"_ustr, + 0, Any()); } template T OPreparedResultSet::safelyRetrieveValue(sal_Int32 nColumnIndex) @@ -388,13 +388,13 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex) case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: - throw SQLException("Column with type BLOB cannot be converted", *this, "22000", 1, - Any()); + throw SQLException(u"Column with type BLOB cannot be converted"_ustr, *this, + u"22000"_ustr, 1, Any()); default: SAL_WARN("connectivity.mysqlc", "OPreparedResultSet::getRowSetValue: unknown type: " << m_aFields[nColumnIndex - 1].type); - throw SQLException("Unknown column type when fetching result", *this, "22000", 1, - Any()); + throw SQLException(u"Unknown column type when fetching result"_ustr, *this, + u"22000"_ustr, 1, Any()); } } @@ -1028,13 +1028,14 @@ uno::Sequence IPropertyArrayHelper* OPreparedResultSet::createArrayHelper() const { return new OPropertyArrayHelper{ - { { "FetchDirection", PROPERTY_ID_FETCHDIRECTION, cppu::UnoType::get(), 0 }, - { "FetchSize", PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0 }, - { "IsBookmarkable", PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType::get(), + { { u"FetchDirection"_ustr, PROPERTY_ID_FETCHDIRECTION, cppu::UnoType::get(), + 0 }, + { u"FetchSize"_ustr, PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0 }, + { u"IsBookmarkable"_ustr, PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType::get(), PropertyAttribute::READONLY }, - { "ResultSetConcurrency", PROPERTY_ID_RESULTSETCONCURRENCY, + { u"ResultSetConcurrency"_ustr, PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType::get(), PropertyAttribute::READONLY }, - { "ResultSetType", PROPERTY_ID_RESULTSETTYPE, cppu::UnoType::get(), + { u"ResultSetType"_ustr, PROPERTY_ID_RESULTSETTYPE, cppu::UnoType::get(), PropertyAttribute::READONLY } } }; } @@ -1115,11 +1116,11 @@ css::uno::Reference SAL_CALL OPreparedResultSet::g void OPreparedResultSet::checkColumnIndex(sal_Int32 index) { if (!m_aData) - throw SQLException("Cursor out of range", *this, "HY109", 1, Any()); + throw SQLException(u"Cursor out of range"_ustr, *this, u"HY109"_ustr, 1, Any()); if (index < 1 || index > static_cast(m_nColumnCount)) { /* static object for efficiency or thread safety is a problem ? */ - throw SQLException("index out of range", *this, "42S22", 1, Any()); + throw SQLException(u"index out of range"_ustr, *this, u"42S22"_ustr, 1, Any()); } } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx index 2e7be0894040..0c54630f25f2 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx @@ -40,12 +40,12 @@ using ::osl::MutexGuard; OUString OPreparedStatement::getImplementationName() { - return "com.sun.star.sdbcx.mysqlc.PreparedStatement"; + return u"com.sun.star.sdbcx.mysqlc.PreparedStatement"_ustr; } css::uno::Sequence OPreparedStatement::getSupportedServiceNames() { - return { "com.sun.star.sdbc.PreparedStatement" }; + return { u"com.sun.star.sdbc.PreparedStatement"_ustr }; } sal_Bool OPreparedStatement::supportsService(OUString const& ServiceName) @@ -571,7 +571,7 @@ void OPreparedStatement::checkParameterIndex(sal_Int32 column) { if (column < 1 || o3tl::make_unsigned(column) > m_paramCount) { - throw SQLException("Parameter index out of range", *this, OUString(), 1, Any()); + throw SQLException(u"Parameter index out of range"_ustr, *this, OUString(), 1, Any()); } } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx index 397ea7cbab64..3197a8f81845 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx @@ -73,7 +73,7 @@ void OResultSet::checkRowIndex() { if (m_nRowPosition < 0 || m_nRowPosition >= m_nRowCount) { - throw SQLException("Cursor position out of range", *this, OUString(), 1, Any()); + throw SQLException(u"Cursor position out of range"_ustr, *this, OUString(), 1, Any()); } } @@ -90,12 +90,12 @@ bool OResultSet::checkNull(sal_Int32 column) OUString SAL_CALL OResultSet::getImplementationName() { - return "com.sun.star.sdbcx.mysqlc.ResultSet"; + return u"com.sun.star.sdbcx.mysqlc.ResultSet"_ustr; } uno::Sequence SAL_CALL OResultSet::getSupportedServiceNames() { - return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr, u"com.sun.star.sdbcx.ResultSet"_ustr }; } sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName) @@ -217,8 +217,8 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName) return static_cast(i) + 1; // sdbc indexes from 1 } - throw SQLException("The column name '" + columnName + "' is not valid.", *this, "42S22", 0, - Any()); + throw SQLException("The column name '" + columnName + "' is not valid.", *this, u"42S22"_ustr, + 0, Any()); } uno::Reference SAL_CALL OResultSet::getBinaryStream(sal_Int32 column) @@ -515,7 +515,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column) auto timeParts = lcl_split(dateAndTime.at(1), ':'); if (dateParts.size() < 2 || timeParts.size() < 2) - throw SQLException("Timestamp has a wrong format", *this, OUString(), 1, Any()); + throw SQLException(u"Timestamp has a wrong format"_ustr, *this, OUString(), 1, Any()); DateTime dt; @@ -1010,13 +1010,14 @@ uno::Sequence SAL_CALL OResultSet::deleteRows(const uno::Sequence::get(), 0 }, - { "FetchSize", PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0 }, - { "IsBookmarkable", PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType::get(), + { { u"FetchDirection"_ustr, PROPERTY_ID_FETCHDIRECTION, cppu::UnoType::get(), + 0 }, + { u"FetchSize"_ustr, PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0 }, + { u"IsBookmarkable"_ustr, PROPERTY_ID_ISBOOKMARKABLE, cppu::UnoType::get(), PropertyAttribute::READONLY }, - { "ResultSetConcurrency", PROPERTY_ID_RESULTSETCONCURRENCY, + { u"ResultSetConcurrency"_ustr, PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType::get(), PropertyAttribute::READONLY }, - { "ResultSetType", PROPERTY_ID_RESULTSETTYPE, cppu::UnoType::get(), + { u"ResultSetType"_ustr, PROPERTY_ID_RESULTSETTYPE, cppu::UnoType::get(), PropertyAttribute::READONLY } } }; } @@ -1097,7 +1098,7 @@ void OResultSet::checkColumnIndex(sal_Int32 index) if (index < 1 || o3tl::make_unsigned(index) > m_aFields.size()) { /* static object for efficiency or thread safety is a problem ? */ - throw SQLException("index out of range", *this, OUString(), 1, Any()); + throw SQLException(u"index out of range"_ustr, *this, OUString(), 1, Any()); } } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx index bcb6d3a6cafc..49a16cd5c6c5 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx @@ -147,11 +147,11 @@ Reference SAL_CALL OStatement::executeQuery(const OUString& sql) assert(isRS == m_xResultSet.is()); if (!isRS) mysqlc_sdbc_driver::throwSQLExceptionWithMsg( - "executeQuery called on SQL command that does not return a ResultSet", "02000", 0, + u"executeQuery called on SQL command that does not return a ResultSet"_ustr, "02000", 0, *this); if (!m_xResultSet.is()) mysqlc_sdbc_driver::throwSQLExceptionWithMsg( - "internal MySQL-SDBC error: executeQuery: no ResultSet after execute() returned true.", + u"internal MySQL-SDBC error: executeQuery: no ResultSet after execute() returned true."_ustr, "02000", 0, *this); return m_xResultSet; @@ -236,8 +236,8 @@ bool OStatement::getResult() else { mysqlc_sdbc_driver::throwSQLExceptionWithMsg( - "mysql_store_result indicated success and SQL command was supposed to return a " - "ResultSet, but did not.", + u"mysql_store_result indicated success and SQL command was supposed to return a " + "ResultSet, but did not."_ustr, "02000", 0, *this); } //unreachable @@ -296,17 +296,18 @@ void SAL_CALL OCommonStatement::clearWarnings() // this properties are define by the service statement // they must in alphabetic order return new ::cppu::OPropertyArrayHelper{ - { { "CursorName", PROPERTY_ID_CURSORNAME, cppu::UnoType::get(), 0 }, - { "EscapeProcessing", PROPERTY_ID_ESCAPEPROCESSING, cppu::UnoType::get(), 0 }, - { "FetchDirection", PROPERTY_ID_FETCHDIRECTION, cppu::UnoType::get(), 0 }, - { "FetchSize", PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0 }, - { "MaxFieldSize", PROPERTY_ID_MAXFIELDSIZE, cppu::UnoType::get(), 0 }, - { "MaxRows", PROPERTY_ID_MAXROWS, cppu::UnoType::get(), 0 }, - { "QueryTimeOut", PROPERTY_ID_QUERYTIMEOUT, cppu::UnoType::get(), 0 }, - { "ResultSetConcurrency", PROPERTY_ID_RESULTSETCONCURRENCY, + { { u"CursorName"_ustr, PROPERTY_ID_CURSORNAME, cppu::UnoType::get(), 0 }, + { u"EscapeProcessing"_ustr, PROPERTY_ID_ESCAPEPROCESSING, cppu::UnoType::get(), 0 }, + { u"FetchDirection"_ustr, PROPERTY_ID_FETCHDIRECTION, cppu::UnoType::get(), + 0 }, + { u"FetchSize"_ustr, PROPERTY_ID_FETCHSIZE, cppu::UnoType::get(), 0 }, + { u"MaxFieldSize"_ustr, PROPERTY_ID_MAXFIELDSIZE, cppu::UnoType::get(), 0 }, + { u"MaxRows"_ustr, PROPERTY_ID_MAXROWS, cppu::UnoType::get(), 0 }, + { u"QueryTimeOut"_ustr, PROPERTY_ID_QUERYTIMEOUT, cppu::UnoType::get(), 0 }, + { u"ResultSetConcurrency"_ustr, PROPERTY_ID_RESULTSETCONCURRENCY, cppu::UnoType::get(), 0 }, - { "ResultSetType", PROPERTY_ID_RESULTSETTYPE, cppu::UnoType::get(), 0 }, - { "UseBookmarks", PROPERTY_ID_USEBOOKMARKS, cppu::UnoType::get(), 0 } } + { u"ResultSetType"_ustr, PROPERTY_ID_RESULTSETTYPE, cppu::UnoType::get(), 0 }, + { u"UseBookmarks"_ustr, PROPERTY_ID_USEBOOKMARKS, cppu::UnoType::get(), 0 } } }; } @@ -360,11 +361,11 @@ void OCommonStatement::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) con } } -OUString OStatement::getImplementationName() { return "com.sun.star.sdbcx.OStatement"; } +OUString OStatement::getImplementationName() { return u"com.sun.star.sdbcx.OStatement"_ustr; } css::uno::Sequence OStatement::getSupportedServiceNames() { - return { "com.sun.star.sdbc.Statement" }; + return { u"com.sun.star.sdbc.Statement"_ustr }; } sal_Bool OStatement::supportsService(OUString const& ServiceName) diff --git a/connectivity/source/drivers/mysqlc/mysqlc_table.cxx b/connectivity/source/drivers/mysqlc/mysqlc_table.cxx index eedcb35d6164..3c621f9d375d 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_table.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_table.cxx @@ -88,23 +88,24 @@ void SAL_CALL connectivity::mysqlc::Table::alterColumnByName( // sdbcx::Descriptor const bool bNameChanged - = xColumn->getPropertyValue("Name") != rDescriptor->getPropertyValue("Name"); + = xColumn->getPropertyValue(u"Name"_ustr) != rDescriptor->getPropertyValue(u"Name"_ustr); // sdbcx::ColumnDescriptor const bool bTypeChanged - = xColumn->getPropertyValue("Type") != rDescriptor->getPropertyValue("Type"); - const bool bTypeNameChanged = !comphelper::getString(xColumn->getPropertyValue("TypeName")) - .equalsIgnoreAsciiCase(comphelper::getString( - rDescriptor->getPropertyValue("TypeName"))); - const bool bPrecisionChanged - = xColumn->getPropertyValue("Precision") != rDescriptor->getPropertyValue("Precision"); + = xColumn->getPropertyValue(u"Type"_ustr) != rDescriptor->getPropertyValue(u"Type"_ustr); + const bool bTypeNameChanged + = !comphelper::getString(xColumn->getPropertyValue(u"TypeName"_ustr)) + .equalsIgnoreAsciiCase( + comphelper::getString(rDescriptor->getPropertyValue(u"TypeName"_ustr))); + const bool bPrecisionChanged = xColumn->getPropertyValue(u"Precision"_ustr) + != rDescriptor->getPropertyValue(u"Precision"_ustr); const bool bScaleChanged - = xColumn->getPropertyValue("Scale") != rDescriptor->getPropertyValue("Scale"); + = xColumn->getPropertyValue(u"Scale"_ustr) != rDescriptor->getPropertyValue(u"Scale"_ustr); - const bool bIsNullableChanged - = xColumn->getPropertyValue("IsNullable") != rDescriptor->getPropertyValue("IsNullable"); + const bool bIsNullableChanged = xColumn->getPropertyValue(u"IsNullable"_ustr) + != rDescriptor->getPropertyValue(u"IsNullable"_ustr); - const bool bIsAutoIncrementChanged = xColumn->getPropertyValue("IsAutoIncrement") - != rDescriptor->getPropertyValue("IsAutoIncrement"); + const bool bIsAutoIncrementChanged = xColumn->getPropertyValue(u"IsAutoIncrement"_ustr) + != rDescriptor->getPropertyValue(u"IsAutoIncrement"_ustr); // there's also DefaultValue but not related to database directly, it seems completely internal to LO // so no need to test it @@ -119,13 +120,13 @@ void SAL_CALL connectivity::mysqlc::Table::alterColumnByName( sSql.append(getAlterTableColumnPart() + " MODIFY COLUMN `" + rColName + "` " + ::dbtools::createStandardTypePart(rDescriptor, getConnection())); - if (comphelper::getBOOL(rDescriptor->getPropertyValue("IsAutoIncrement"))) + if (comphelper::getBOOL(rDescriptor->getPropertyValue(u"IsAutoIncrement"_ustr))) sSql.append(" auto_increment"); // see ColumnValue: NO_NULLS = 0, NULLABLE = 1, NULLABLE_UNKNOWN // so entry required = yes corresponds to NO_NULLS = 0 and only in this case // NOT NULL - if (comphelper::getINT32(rDescriptor->getPropertyValue("IsNullable")) == 0) + if (comphelper::getINT32(rDescriptor->getPropertyValue(u"IsNullable"_ustr)) == 0) sSql.append(" NOT NULL"); getConnection()->createStatement()->execute(sSql.makeStringAndClear()); @@ -134,7 +135,7 @@ void SAL_CALL connectivity::mysqlc::Table::alterColumnByName( if (bNameChanged) { OUString sNewColName; - rDescriptor->getPropertyValue("Name") >>= sNewColName; + rDescriptor->getPropertyValue(u"Name"_ustr) >>= sNewColName; OUString sSql(getAlterTableColumnPart() + " RENAME COLUMN `" + rColName + "` TO `" + sNewColName + "`"); @@ -162,6 +163,6 @@ OUString connectivity::mysqlc::Table::getAlterTableColumnPart() const ::dbtools::EComposeRule::InTableDefinitions); } -OUString connectivity::mysqlc::Table::getRenameStart() const { return "RENAME TABLE "; } +OUString connectivity::mysqlc::Table::getRenameStart() const { return u"RENAME TABLE "_ustr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx index 81498978d3a5..1504fd1b5bad 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx @@ -66,7 +66,7 @@ connectivity::sdbcx::ObjectType connectivity::mysqlc::Tables::createObject(const = m_xMetaData->getTables(aCatalog, sSchema, sTable, css::uno::Sequence()); if (!xTables.is()) - throw css::uno::RuntimeException("Could not acquire table."); + throw css::uno::RuntimeException(u"Could not acquire table."_ustr); css::uno::Reference xRow(xTables, css::uno::UNO_QUERY_THROW); @@ -82,7 +82,7 @@ connectivity::sdbcx::ObjectType connectivity::mysqlc::Tables::createObject(const xRow->getString(5))); // Description / Remarks / Comments if (xTables->next()) - throw css::uno::RuntimeException("Found more tables than expected."); + throw css::uno::RuntimeException(u"Found more tables than expected."_ustr); return xRet; } @@ -149,7 +149,7 @@ void connectivity::mysqlc::Tables::dropObject(sal_Int32 nPosition, const OUStrin return; OUString sType; - xTable->getPropertyValue("Type") >>= sType; + xTable->getPropertyValue(u"Type"_ustr) >>= sType; m_xMetaData->getConnection()->createStatement()->execute("DROP " + sType + " " + sName); } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_user.cxx b/connectivity/source/drivers/mysqlc/mysqlc_user.cxx index 6e8c3d734a67..d4f6bdad8b25 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_user.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_user.cxx @@ -112,7 +112,7 @@ void User::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_Int32 o css::uno::Any aCatalog; if (!sCatalog.isEmpty()) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog, sSchema, sTable, "%"); + xRes = xMeta->getColumnPrivileges(aCatalog, sSchema, sTable, u"%"_ustr); } break; } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_users.cxx b/connectivity/source/drivers/mysqlc/mysqlc_users.cxx index 296377c1be94..b7ad6cecc8cf 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_users.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_users.cxx @@ -48,14 +48,14 @@ uno::Reference Users::createDescriptor() // There is some internal magic so that the same class can be used as either // a descriptor or as a normal user. See VUser.cxx for the details. In our // case we just need to ensure we use the correct constructor. - return new OUserExtend(m_xMetaData->getConnection(), ""); + return new OUserExtend(m_xMetaData->getConnection(), u""_ustr); } //----- XAppend --------------------------------------------------------------- ObjectType Users::appendObject(const OUString& rName, const uno::Reference& descriptor) { - OUString aSql("GRANT USAGE ON * TO "); + OUString aSql(u"GRANT USAGE ON * TO "_ustr); OUString aQuote = m_xMetaData->getIdentifierQuoteString(); aSql += ::dbtools::quoteName(aQuote, rName) + " @\"%\" "; OUString sPassword; diff --git a/connectivity/source/drivers/mysqlc/mysqlc_views.cxx b/connectivity/source/drivers/mysqlc/mysqlc_views.cxx index 1c79c9225d44..23437e1c885b 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_views.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_views.cxx @@ -67,7 +67,7 @@ void connectivity::mysqlc::Views::dropObject(sal_Int32 _nPos, const OUString& /* bool bIsNew = connectivity::sdbcx::ODescriptor::isNew(xObject); if (!bIsNew) { - OUString aSql("DROP VIEW"); + OUString aSql(u"DROP VIEW"_ustr); css::uno::Reference xProp(xObject, css::uno::UNO_QUERY); aSql += ::dbtools::composeTableName(m_xMetaData, xProp, diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index eeb27367b180..996e735ac07c 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -173,7 +173,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+2); - OUString aDSN("DSN="), aUID, aPWD, aSysDrvSettings; + OUString aDSN(u"DSN="_ustr), aUID, aPWD, aSysDrvSettings; aDSN += url.subView(nLen+1); sal_Int32 nTimeout = 20; @@ -266,7 +266,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal } // XServiceInfo -IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.odbc.OConnection", "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OConnection, u"com.sun.star.sdbc.drivers.odbc.OConnection"_ustr, u"com.sun.star.sdbc.Connection"_ustr) Reference< XStatement > SAL_CALL OConnection::createStatement( ) @@ -291,7 +291,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& /*sql*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::prepareCall"_ustr, *this ); } OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) @@ -450,7 +450,7 @@ Reference< css::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) void SAL_CALL OConnection::setTypeMap( const Reference< css::container::XNameAccess >& /*typeMap*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setTypeMap", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XConnection::setTypeMap"_ustr, *this ); } // XCloseable diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 796c63ab9ef3..3c78062b307a 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -179,12 +179,12 @@ template < typename T, SQLSMALLINT sqlTypeId > T ODatabaseMetaDataResultSet::get Reference< css::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBinaryStream"_ustr, *this ); } Reference< css::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getCharacterStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getCharacterStream"_ustr, *this ); } sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex ) @@ -336,29 +336,29 @@ Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getArray"_ustr, *this ); } Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getClob"_ustr, *this ); } Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBlob"_ustr, *this ); } Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getRef"_ustr, *this ); } Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 /*columnIndex*/, const Reference< css::container::XNameAccess >& /*typeMap*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getObject", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getObject"_ustr, *this ); } diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx index 95ea14234f20..10f4eec6d5e4 100644 --- a/connectivity/source/drivers/odbc/ODriver.cxx +++ b/connectivity/source/drivers/odbc/ODriver.cxx @@ -59,7 +59,7 @@ void ODBCDriver::disposing() OUString ODBCDriver::getImplementationName( ) { - return "com.sun.star.comp.sdbc.ODBCDriver"; + return u"com.sun.star.comp.sdbc.ODBCDriver"_ustr; // this name is referenced in the configuration and in the odbc.xml // Please take care when changing it. } @@ -67,7 +67,7 @@ OUString ODBCDriver::getImplementationName( ) Sequence< OUString > ODBCDriver::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr }; } @@ -104,71 +104,71 @@ Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const OUStr { if ( acceptsURL(url) ) { - Sequence< OUString > aBooleanValues{ "false", "true" }; + Sequence< OUString > aBooleanValues{ u"false"_ustr, u"true"_ustr }; return { { - "CharSet", - "CharSet of the database.", + u"CharSet"_ustr, + u"CharSet of the database."_ustr, false, {}, {} }, { - "UseCatalog", - "Use catalog for file-based databases.", + u"UseCatalog"_ustr, + u"Use catalog for file-based databases."_ustr, false, - "false", + u"false"_ustr, aBooleanValues }, { - "SystemDriverSettings", - "Driver settings.", + u"SystemDriverSettings"_ustr, + u"Driver settings."_ustr, false, {}, {} }, { - "ParameterNameSubstitution", - "Change named parameters with '?'.", + u"ParameterNameSubstitution"_ustr, + u"Change named parameters with '?'."_ustr, false, - "false", + u"false"_ustr, aBooleanValues }, { - "IgnoreDriverPrivileges", - "Ignore the privileges from the database driver.", + u"IgnoreDriverPrivileges"_ustr, + u"Ignore the privileges from the database driver."_ustr, false, - "false", + u"false"_ustr, aBooleanValues }, { - "IsAutoRetrievingEnabled", - "Retrieve generated values.", + u"IsAutoRetrievingEnabled"_ustr, + u"Retrieve generated values."_ustr, false, - "false", + u"false"_ustr, aBooleanValues }, { - "AutoRetrievingStatement", - "Auto-increment statement.", + u"AutoRetrievingStatement"_ustr, + u"Auto-increment statement."_ustr, false, {}, {} }, { - "GenerateASBeforeCorrelationName", - "Generate AS before table correlation names.", + u"GenerateASBeforeCorrelationName"_ustr, + u"Generate AS before table correlation names."_ustr, false, - "false", + u"false"_ustr, aBooleanValues }, { - "EscapeDateTime", - "Escape date time format.", + u"EscapeDateTime"_ustr, + u"Escape date time format."_ustr, false, - "true", + u"true"_ustr, aBooleanValues } }; diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 951eb8b36bff..87bd726b3bee 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -126,113 +126,113 @@ bool LoadLibrary_ODBC3(OUString &_rPath) bool LoadFunctions(oslModule pODBCso) { - if( ( pODBC3SQLAllocHandle = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLAllocHandle").pData ))) == nullptr ) + if( ( pODBC3SQLAllocHandle = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLAllocHandle"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLConnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLConnect").pData ))) == nullptr ) + if( ( pODBC3SQLConnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLConnect"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLDriverConnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLDriverConnect").pData ))) == nullptr ) + if( ( pODBC3SQLDriverConnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLDriverConnect"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLBrowseConnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLBrowseConnect").pData ))) == nullptr ) + if( ( pODBC3SQLBrowseConnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLBrowseConnect"_ustr.pData ))) == nullptr ) return false; - if(( pODBC3SQLDataSources = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLDataSources").pData ))) == nullptr ) + if(( pODBC3SQLDataSources = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLDataSources"_ustr.pData ))) == nullptr ) return false; - if(( pODBC3SQLDrivers = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLDrivers").pData ))) == nullptr ) + if(( pODBC3SQLDrivers = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLDrivers"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetInfo = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetInfo").pData ))) == nullptr ) + if( ( pODBC3SQLGetInfo = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetInfo"_ustr.pData ))) == nullptr ) return false; - if(( pODBC3SQLGetFunctions = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetFunctions").pData ))) == nullptr ) + if(( pODBC3SQLGetFunctions = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetFunctions"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetTypeInfo = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetTypeInfo").pData ))) == nullptr ) + if( ( pODBC3SQLGetTypeInfo = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetTypeInfo"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLSetConnectAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLSetConnectAttr").pData ))) == nullptr ) + if( ( pODBC3SQLSetConnectAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLSetConnectAttr"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetConnectAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetConnectAttr").pData ))) == nullptr ) + if( ( pODBC3SQLGetConnectAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetConnectAttr"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLSetEnvAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLSetEnvAttr").pData ))) == nullptr ) + if( ( pODBC3SQLSetEnvAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLSetEnvAttr"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetEnvAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetEnvAttr").pData ))) == nullptr ) + if( ( pODBC3SQLGetEnvAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetEnvAttr"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLSetStmtAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLSetStmtAttr").pData ))) == nullptr ) + if( ( pODBC3SQLSetStmtAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLSetStmtAttr"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetStmtAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetStmtAttr").pData ))) == nullptr ) + if( ( pODBC3SQLGetStmtAttr = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetStmtAttr"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLPrepare = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLPrepare").pData ))) == nullptr ) + if( ( pODBC3SQLPrepare = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLPrepare"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLBindParameter = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLBindParameter").pData ))) == nullptr ) + if( ( pODBC3SQLBindParameter = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLBindParameter"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLSetCursorName = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLSetCursorName").pData ))) == nullptr ) + if( ( pODBC3SQLSetCursorName = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLSetCursorName"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLExecute = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLExecute").pData ))) == nullptr ) + if( ( pODBC3SQLExecute = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLExecute"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLExecDirect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLExecDirect").pData ))) == nullptr ) + if( ( pODBC3SQLExecDirect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLExecDirect"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLDescribeParam = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeParam").pData ))) == nullptr ) + if( ( pODBC3SQLDescribeParam = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLDescribeParam"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLNumParams = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLNumParams").pData ))) == nullptr ) + if( ( pODBC3SQLNumParams = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLNumParams"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLParamData = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLParamData").pData ))) == nullptr ) + if( ( pODBC3SQLParamData = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLParamData"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLPutData = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLPutData").pData ))) == nullptr ) + if( ( pODBC3SQLPutData = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLPutData"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLRowCount = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLRowCount").pData ))) == nullptr ) + if( ( pODBC3SQLRowCount = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLRowCount"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLNumResultCols = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLNumResultCols").pData ))) == nullptr ) + if( ( pODBC3SQLNumResultCols = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLNumResultCols"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLDescribeCol = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeCol").pData ))) == nullptr ) + if( ( pODBC3SQLDescribeCol = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLDescribeCol"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLColAttribute = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLColAttribute").pData ))) == nullptr ) + if( ( pODBC3SQLColAttribute = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLColAttribute"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLBindCol = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLBindCol").pData ))) == nullptr ) + if( ( pODBC3SQLBindCol = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLBindCol"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLFetch = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLFetch").pData ))) == nullptr ) + if( ( pODBC3SQLFetch = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLFetch"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLFetchScroll = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLFetchScroll").pData ))) == nullptr ) + if( ( pODBC3SQLFetchScroll = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLFetchScroll"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetData = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetData").pData ))) == nullptr ) + if( ( pODBC3SQLGetData = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetData"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLSetPos = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLSetPos").pData ))) == nullptr ) + if( ( pODBC3SQLSetPos = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLSetPos"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLBulkOperations = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLBulkOperations").pData ))) == nullptr ) + if( ( pODBC3SQLBulkOperations = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLBulkOperations"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLMoreResults = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLMoreResults").pData ))) == nullptr ) + if( ( pODBC3SQLMoreResults = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLMoreResults"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetDiagRec = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetDiagRec").pData ))) == nullptr ) + if( ( pODBC3SQLGetDiagRec = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetDiagRec"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLColumnPrivileges = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLColumnPrivileges").pData ))) == nullptr ) + if( ( pODBC3SQLColumnPrivileges = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLColumnPrivileges"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLColumns = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLColumns").pData ))) == nullptr ) + if( ( pODBC3SQLColumns = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLColumns"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLForeignKeys = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLForeignKeys").pData ))) == nullptr ) + if( ( pODBC3SQLForeignKeys = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLForeignKeys"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLPrimaryKeys = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLPrimaryKeys").pData ))) == nullptr ) + if( ( pODBC3SQLPrimaryKeys = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLPrimaryKeys"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLProcedureColumns = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLProcedureColumns").pData ))) == nullptr ) + if( ( pODBC3SQLProcedureColumns = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLProcedureColumns"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLProcedures = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLProcedures").pData ))) == nullptr ) + if( ( pODBC3SQLProcedures = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLProcedures"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLSpecialColumns = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLSpecialColumns").pData ))) == nullptr ) + if( ( pODBC3SQLSpecialColumns = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLSpecialColumns"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLStatistics = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLStatistics").pData ))) == nullptr ) + if( ( pODBC3SQLStatistics = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLStatistics"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLTablePrivileges = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLTablePrivileges").pData ))) == nullptr ) + if( ( pODBC3SQLTablePrivileges = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLTablePrivileges"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLTables = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLTables").pData ))) == nullptr ) + if( ( pODBC3SQLTables = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLTables"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLFreeStmt = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLFreeStmt").pData ))) == nullptr ) + if( ( pODBC3SQLFreeStmt = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLFreeStmt"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLCloseCursor = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLCloseCursor").pData ))) == nullptr ) + if( ( pODBC3SQLCloseCursor = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLCloseCursor"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLCancel = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLCancel").pData ))) == nullptr ) + if( ( pODBC3SQLCancel = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLCancel"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLEndTran = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLEndTran").pData ))) == nullptr ) + if( ( pODBC3SQLEndTran = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLEndTran"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLDisconnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLDisconnect").pData ))) == nullptr ) + if( ( pODBC3SQLDisconnect = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLDisconnect"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLFreeHandle = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLFreeHandle").pData ))) == nullptr ) + if( ( pODBC3SQLFreeHandle = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLFreeHandle"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLGetCursorName = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLGetCursorName").pData ))) == nullptr ) + if( ( pODBC3SQLGetCursorName = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLGetCursorName"_ustr.pData ))) == nullptr ) return false; - if( ( pODBC3SQLNativeSql = reinterpret_cast(osl_getFunctionSymbol(pODBCso, OUString("SQLNativeSql").pData ))) == nullptr ) + if( ( pODBC3SQLNativeSql = reinterpret_cast(osl_getFunctionSymbol(pODBCso, u"SQLNativeSql"_ustr.pData ))) == nullptr ) return false; return true; diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index 90045a46277e..f8bb5a6ad0b7 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -45,7 +45,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.OPreparedStatement","com.sun.star.sdbc.PreparedStatement"); +IMPLEMENT_SERVICE_INFO(OPreparedStatement,u"com.sun.star.sdbcx.OPreparedStatement"_ustr,u"com.sun.star.sdbc.PreparedStatement"_ustr); namespace { @@ -544,13 +544,13 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setArray", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setArray"_ustr, *this ); } void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setRef", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XParameters::setRef"_ustr, *this ); } void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) @@ -645,7 +645,7 @@ void SAL_CALL OPreparedStatement::clearParameters( ) void SAL_CALL OPreparedStatement::clearBatch( ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::clearBatch", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XPreparedBatchExecution::clearBatch"_ustr, *this ); // clearParameters( ); // m_aBatchVector.erase(); } @@ -653,12 +653,12 @@ void SAL_CALL OPreparedStatement::clearBatch( ) void SAL_CALL OPreparedStatement::addBatch( ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::addBatch", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XPreparedBatchExecution::addBatch"_ustr, *this ); } Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch( ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::executeBatch", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XPreparedBatchExecution::executeBatch"_ustr, *this ); } // methods diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index f74cbf197979..7a1e81593d58 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -64,12 +64,12 @@ namespace // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); OUString SAL_CALL OResultSet::getImplementationName( ) { - return "com.sun.star.sdbcx.odbc.ResultSet"; + return u"com.sun.star.sdbcx.odbc.ResultSet"_ustr; } Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" }; + return { u"com.sun.star.sdbc.ResultSet"_ustr, u"com.sun.star.sdbcx.ResultSet"_ustr }; } sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) @@ -405,7 +405,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*colu ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBinaryStream"_ustr, *this ); } Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) @@ -413,7 +413,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*c ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBinaryStream"_ustr, *this ); } template < typename T > T OResultSet::impl_getValue( const sal_Int32 _nColumnIndex, SQLSMALLINT nType ) @@ -591,22 +591,22 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getArray"_ustr, *this ); } Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getClob"_ustr, *this ); } Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getBlob"_ustr, *this ); } Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRow::getRef"_ustr, *this ); } Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< css::container::XNameAccess >& /*typeMap*/ ) @@ -1046,7 +1046,7 @@ void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) void SAL_CALL OResultSet::updateLong( sal_Int32 /*columnIndex*/, sal_Int64 /*x*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRowUpdate::updateLong", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRowUpdate::updateLong"_ustr, *this ); } void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) @@ -1236,7 +1236,7 @@ sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks( ) sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& /*bookmark*/ ) { - ::dbtools::throwFunctionNotSupportedSQLException( "XRowLocate::hashBookmark", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"XRowLocate::hashBookmark"_ustr, *this ); } // XDeleteRows @@ -1366,7 +1366,7 @@ bool OResultSet::isBookmarkable() const void OResultSet::setFetchDirection(sal_Int32 /*_par0*/) { - ::dbtools::throwFunctionNotSupportedSQLException( "setFetchDirection", *this ); + ::dbtools::throwFunctionNotSupportedSQLException( u"setFetchDirection"_ustr, *this ); } void OResultSet::setFetchSize(sal_Int32 _par0) @@ -1374,7 +1374,7 @@ void OResultSet::setFetchSize(sal_Int32 _par0) OSL_ENSURE(_par0>0,"Illegal fetch size!"); if ( _par0 != 1 ) { - throw css::beans::PropertyVetoException("SDBC/ODBC layer not prepared for fetchSize > 1", *this); + throw css::beans::PropertyVetoException(u"SDBC/ODBC layer not prepared for fetchSize > 1"_ustr, *this); } setStmtOption(SQL_ATTR_ROW_ARRAY_SIZE, _par0); m_pRowStatusArray.reset( new SQLUSMALLINT[_par0] ); diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx index d8b5d6ce75de..530634747e30 100644 --- a/connectivity/source/drivers/odbc/OStatement.cxx +++ b/connectivity/source/drivers/odbc/OStatement.cxx @@ -1077,7 +1077,7 @@ void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const } } -IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.sdbc.Statement"); +IMPLEMENT_SERVICE_INFO(OStatement,u"com.sun.star.sdbcx.OStatement"_ustr,u"com.sun.star.sdbc.Statement"_ustr); void SAL_CALL OStatement_Base::acquire() noexcept { diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx index 841ed70c6cb2..03c93537f828 100644 --- a/connectivity/source/drivers/postgresql/pq_array.cxx +++ b/connectivity/source/drivers/postgresql/pq_array.cxx @@ -54,7 +54,7 @@ namespace pq_sdbc_driver OUString Array::getBaseTypeName( ) { - return "varchar"; + return u"varchar"_ustr; } sal_Int32 Array::getBaseType( ) diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index 9ff5e01e098a..274a0a209a17 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -74,25 +74,25 @@ static ::cppu::IPropertyArrayHelper & getResultSetPropertyArrayHelper() static ::cppu::OPropertyArrayHelper arrayHelper( Sequence{ Property( - "CursorName", 0, + u"CursorName"_ustr, 0, ::cppu::UnoType::get() , 0 ), Property( - "EscapeProcessing", 1, + u"EscapeProcessing"_ustr, 1, cppu::UnoType::get() , 0 ), Property( - "FetchDirection", 2, + u"FetchDirection"_ustr, 2, ::cppu::UnoType::get() , 0 ), Property( - "FetchSize", 3, + u"FetchSize"_ustr, 3, ::cppu::UnoType::get() , 0 ), Property( - "IsBookmarkable", 4, + u"IsBookmarkable"_ustr, 4, cppu::UnoType::get() , 0 ), Property( - "ResultSetConcurrency", 5, + u"ResultSetConcurrency"_ustr, 5, ::cppu::UnoType::get() , 0 ), Property( - "ResultSetType", 6, + u"ResultSetType"_ustr, 6, ::cppu::UnoType::get() , 0 )}, true ); return arrayHelper; diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 091479f87f95..f87435600303 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -215,7 +215,7 @@ Reference< XPreparedStatement > Connection::prepareStatement( const OUString& sq Reference< XPreparedStatement > Connection::prepareCall( const OUString& ) { throw SQLException( - "pq_driver: Callable statements not supported", + u"pq_driver: Callable statements not supported"_ustr, Reference< XInterface > (), OUString() , 1, Any() ); } @@ -282,7 +282,7 @@ OUString Connection::getCatalog() MutexGuard guard( m_xMutex->GetMutex() ); if( m_settings.pConnection == nullptr ) { - throw SQLException( "pq_connection: connection is closed", *this, + throw SQLException( u"pq_connection: connection is closed"_ustr, *this, OUString(), 1, Any() ); } char * p = PQdb(m_settings.pConnection ); @@ -427,7 +427,7 @@ void Connection::initialize( const Sequence< Any >& aArguments ) if( ! tc.is() ) { throw RuntimeException( - "pq_driver: Couldn't instantiate converter service" ); + u"pq_driver: Couldn't instantiate converter service"_ustr ); } if( aArguments.getLength() != 2 ) { @@ -479,7 +479,7 @@ void Connection::initialize( const Sequence< Any >& aArguments ) // Just the most likely error; the error might be HY024 "Invalid attribute value". throw SQLException( "Error in database URL '" + url + "':\n" + errorMessage, - *this, "HY092", 5, Any() ); + *this, u"HY092"_ustr, 5, Any() ); } for ( PQconninfoOption * opt = oOpts.get(); opt->keyword != nullptr; ++opt) @@ -498,7 +498,7 @@ void Connection::initialize( const Sequence< Any >& aArguments ) m_settings.pConnection = PQconnectdbParams( keywords.c_array(), values.c_array(), 0 ); } if( ! m_settings.pConnection ) - throw RuntimeException("pq_driver: out of memory" ); + throw RuntimeException(u"pq_driver: out of memory"_ustr ); if( PQstatus( m_settings.pConnection ) == CONNECTION_BAD ) { const char * error = PQerrorMessage( m_settings.pConnection ); @@ -528,7 +528,7 @@ void Connection::disposing() void Connection::checkClosed() { if( !m_settings.pConnection ) - throw SQLException( "pq_connection: Connection already closed", + throw SQLException( u"pq_connection: Connection already closed"_ustr, *this, OUString(), 1, Any() ); } diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index 1fbcb1aa69f5..0b471a92fa9c 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -121,7 +121,7 @@ DatabaseMetaData::DatabaseMetaData( : m_xMutex(std::move( refMutex )), m_pSettings( pSettings ), m_origin(std::move( origin )), - m_getIntSetting_stmt ( m_origin->prepareStatement("SELECT setting FROM pg_catalog.pg_settings WHERE name=?") ) + m_getIntSetting_stmt ( m_origin->prepareStatement(u"SELECT setting FROM pg_catalog.pg_settings WHERE name=?"_ustr) ) { init_getReferences_stmt(); init_getPrivs_stmt(); @@ -181,7 +181,7 @@ sal_Bool DatabaseMetaData::nullsAreSortedAtEnd( ) OUString DatabaseMetaData::getDatabaseProductName( ) { - return "PostgreSQL"; + return u"PostgreSQL"_ustr; } OUString DatabaseMetaData::getDatabaseProductVersion( ) @@ -190,7 +190,7 @@ OUString DatabaseMetaData::getDatabaseProductVersion( ) } OUString DatabaseMetaData::getDriverName( ) { - return "postgresql-sdbc"; + return u"postgresql-sdbc"_ustr; } OUString DatabaseMetaData::getDriverVersion( ) @@ -271,7 +271,7 @@ sal_Bool DatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) OUString DatabaseMetaData::getIdentifierQuoteString( ) { - return "\""; + return u"\""_ustr; } OUString DatabaseMetaData::getSQLKeywords( ) @@ -282,7 +282,7 @@ OUString DatabaseMetaData::getSQLKeywords( ) // See http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html // LEM TODO: consider using pg_get_keywords(), filter on catcode return - "ANALYSE," + u"ANALYSE," "ANALYZE," "ARRAY," //SQL:1999 "ASYMMETRIC," //SQL:2003 @@ -306,7 +306,7 @@ OUString DatabaseMetaData::getSQLKeywords( ) "SIMILAR," //SQL:2003 "VARIADIC," "VERBOSE," - "WINDOW" //SQL:2003 + "WINDOW"_ustr //SQL:2003 ; } OUString DatabaseMetaData::getNumericFunctions( ) @@ -318,7 +318,7 @@ OUString DatabaseMetaData::getNumericFunctions( ) // And it is my job to map from Open Group CLI names/syntax to PostgreSQL names/syntax. Where? By parsing the SQL??? // Should look at what the JDBC driver is doing. return - "abs," + u"abs," "cbrt," "ceil," "ceiling," @@ -346,7 +346,7 @@ OUString DatabaseMetaData::getNumericFunctions( ) "cos," "cot," "sin," - "tan" + "tan"_ustr ; } @@ -354,7 +354,7 @@ OUString DatabaseMetaData::getStringFunctions( ) { // See http://www.postgresql.org/docs/9.1/static/functions-string.html return - "bit_length," + u"bit_length," "char_length," "character_length," "lower," @@ -400,7 +400,7 @@ OUString DatabaseMetaData::getStringFunctions( ) "substr," "to_ascii," "to_hex," - "translate" + "translate"_ustr ; } @@ -409,7 +409,7 @@ OUString DatabaseMetaData::getSystemFunctions( ) // See http://www.postgresql.org/docs/9.1/static/functions-info.html // and http://www.postgresql.org/docs/9.1/static/functions-admin.html return - "current_catalog," + u"current_catalog," "current_database," "current_query," "current_schema," @@ -530,14 +530,14 @@ OUString DatabaseMetaData::getSystemFunctions( ) "pg_try_advisory_lock_shared," "pg_try_advisory_xact_lock," "pg_try_advisory_xact_lock_shared," - "pg_sleep" + "pg_sleep"_ustr ; } OUString DatabaseMetaData::getTimeDateFunctions( ) { // TODO return - "age," + u"age," "age," "clock_timestamp," "current_date," @@ -559,16 +559,16 @@ OUString DatabaseMetaData::getTimeDateFunctions( ) "now," "statement_timestamp," "timeofday," - "transaction_timestamp," + "transaction_timestamp,"_ustr ; } OUString DatabaseMetaData::getSearchStringEscape( ) { - return "\\"; + return u"\\"_ustr; } OUString DatabaseMetaData::getExtraNameCharacters( ) { - return "$"; + return u"$"_ustr; } sal_Bool DatabaseMetaData::supportsAlterTableWithAddColumn( ) @@ -723,17 +723,17 @@ sal_Bool DatabaseMetaData::supportsLimitedOuterJoins( ) OUString DatabaseMetaData::getSchemaTerm( ) { - return "SCHEMA"; + return u"SCHEMA"_ustr; } OUString DatabaseMetaData::getProcedureTerm( ) { - return "function"; + return u"function"_ustr; } OUString DatabaseMetaData::getCatalogTerm( ) { - return "DATABASE"; + return u"DATABASE"_ustr; } sal_Bool DatabaseMetaData::isCatalogAtStart( ) @@ -743,7 +743,7 @@ sal_Bool DatabaseMetaData::isCatalogAtStart( ) OUString DatabaseMetaData::getCatalogSeparator( ) { - return "."; + return u"."_ustr; } sal_Bool DatabaseMetaData::supportsSchemasInDataManipulation( ) @@ -910,7 +910,7 @@ sal_Int32 DatabaseMetaData::getIntSetting(const OUString& settingName) sal_Int32 DatabaseMetaData::getMaxNameLength() { if ( m_pSettings->maxNameLen == 0) - m_pSettings->maxNameLen = getIntSetting( "max_identifier_length" ); + m_pSettings->maxNameLen = getIntSetting( u"max_identifier_length"_ustr ); OSL_ENSURE(m_pSettings->maxNameLen, "postgresql-sdbc: maxNameLen is zero"); return m_pSettings->maxNameLen; } @@ -918,7 +918,7 @@ sal_Int32 DatabaseMetaData::getMaxNameLength() sal_Int32 DatabaseMetaData::getMaxIndexKeys() { if ( m_pSettings->maxIndexKeys == 0) - m_pSettings->maxIndexKeys = getIntSetting("max_index_keys"); + m_pSettings->maxIndexKeys = getIntSetting(u"max_index_keys"_ustr); OSL_ENSURE(m_pSettings->maxIndexKeys, "postgresql-sdbc: maxIndexKeys is zero"); return m_pSettings->maxIndexKeys; } @@ -1124,14 +1124,14 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTables( // Take "inspiration" from JDBC driver // Ah, this is used to create a XResultSet manually... Try to do it directly in SQL Reference< XPreparedStatement > statement = m_origin->prepareStatement( - "SELECT " + u"SELECT " "DISTINCT ON (pg_namespace.nspname, relname ) " // avoid duplicates (pg_settings !) "pg_namespace.nspname, relname, relkind, pg_description.description " "FROM pg_namespace, pg_class LEFT JOIN pg_description ON pg_class.oid = pg_description.objoid " "WHERE relnamespace = pg_namespace.oid " "AND ( relkind = 'r' OR relkind = 'v') " "AND pg_namespace.nspname LIKE ? " - "AND relname LIKE ? " + "AND relname LIKE ? "_ustr // "ORDER BY pg_namespace.nspname || relname" ); @@ -1245,7 +1245,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getSchemas( ) // TABLE_SCHEM string =&gt; schema name Reference< XStatement > statement = m_origin->createStatement(); Reference< XResultSet > rs = statement->executeQuery( - "SELECT nspname from pg_namespace" ); + u"SELECT nspname from pg_namespace"_ustr ); // LEM TODO: look at JDBC driver and consider doing the same // in particular, excluding temporary schemas, but maybe better through pg_is_other_temp_schema(oid) OR == pg_my_temp_schema() @@ -1534,8 +1534,8 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getColumns( columnMetaData2DatabaseTypeDescription( domainMap, rs, domainTypeStmt ); sal_uInt32 colNum(0); - OUString sSchema( "#invalid#" ); - OUString sTable( "#invalid#" ); + OUString sSchema( u"#invalid#"_ustr ); + OUString sTable( u"#invalid#"_ustr ); while( rs->next() ) { @@ -1685,14 +1685,14 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getPrimaryKeys( << schema << "." << table); Reference< XPreparedStatement > statement = m_origin->prepareStatement( - "SELECT nmsp.nspname, " + u"SELECT nmsp.nspname, " "cl.relname, " "con.conkey, " "con.conname, " "con.conrelid " "FROM pg_constraint as con,pg_class as cl, pg_namespace as nmsp " "WHERE con.connamespace = nmsp.oid AND con.conrelid = cl.oid AND con.contype = 'p' " - "AND nmsp.nspname LIKE ? AND cl.relname LIKE ?" ); + "AND nmsp.nspname LIKE ? AND cl.relname LIKE ?"_ustr ); Reference< XParameters > parameters( statement, UNO_QUERY_THROW ); parameters->setString( 1 , schema ); @@ -1753,9 +1753,9 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getPrimaryKeys( row[4] >>= tableOid; row[3] >>= attnum; statement = m_origin->prepareStatement( - "SELECT att.attname FROM " + u"SELECT att.attname FROM " "pg_attribute AS att, pg_class AS cl WHERE " - "att.attrelid = ? AND att.attnum = ?" ); + "att.attrelid = ? AND att.attnum = ?"_ustr ); parameters.set( statement, UNO_QUERY_THROW ); parameters->setString( 1 , tableOid ); @@ -1826,100 +1826,100 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getPrimaryKeys( #define SQL_GET_REFERENCES_ORDER_NO_PTABLE "ORDER BY pkn.nspname, pkc.relname, conkeyseq" #define SQL_GET_REFERENCES_NONE_NONE_NONE_NONE \ - SQL_GET_REFERENCES \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + u"" SQL_GET_REFERENCES \ + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_NONE_NONE_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_SOME_NONE_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PTABLE \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_SOME_NONE_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_PTABLE \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_NONE_SOME_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_FSCHEMA \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_NONE_NONE_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_NONE_SOME_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_FSCHEMA \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_NONE_SOME_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_FSCHEMA \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_NONE_NONE_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_NONE_SOME_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_FSCHEMA \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_NO_PTABLE + SQL_GET_REFERENCES_ORDER_NO_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_SOME_SOME_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PTABLE \ SQL_GET_REFERENCES_FSCHEMA \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_SOME_NONE_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PTABLE \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_NONE_SOME_SOME_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PTABLE \ SQL_GET_REFERENCES_FSCHEMA \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_SOME_SOME_NONE \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_PTABLE \ SQL_GET_REFERENCES_FSCHEMA \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_SOME_NONE_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_PTABLE \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr #define SQL_GET_REFERENCES_SOME_SOME_SOME_SOME \ - SQL_GET_REFERENCES \ + u"" SQL_GET_REFERENCES \ SQL_GET_REFERENCES_PSCHEMA \ SQL_GET_REFERENCES_PTABLE \ SQL_GET_REFERENCES_FSCHEMA \ SQL_GET_REFERENCES_FTABLE \ - SQL_GET_REFERENCES_ORDER_SOME_PTABLE + SQL_GET_REFERENCES_ORDER_SOME_PTABLE ""_ustr void DatabaseMetaData::init_getReferences_stmt () { @@ -2226,12 +2226,12 @@ namespace // in postgresql the upper limit is optional, no limit means unlimited // length (=1GB). precision = 0x40000000; // about 1 GB, see character type docs in postgresql - row[CREATE_PARAMS] <<= OUString("length"); + row[CREATE_PARAMS] <<= u"length"_ustr; } else if( dataType == css::sdbc::DataType::NUMERIC ) { precision = 1000; - row[CREATE_PARAMS] <<= OUString("length, scale"); + row[CREATE_PARAMS] <<= u"length, scale"_ustr; } row[TYPE_NAME] <<= construct_full_typename(xRow->getString(6), xRow->getString(1)); @@ -2243,15 +2243,15 @@ namespace row[NULLABLE] <<= OUString::number(nullable); row[CASE_SENSITIVE] <<= OUString::number(1); row[SEARCHABLE] <<= OUString::number( calcSearchable( dataType ) ); - row[UNSIGNED_ATTRIBUTE] <<= OUString("0"); + row[UNSIGNED_ATTRIBUTE] <<= u"0"_ustr; if( css::sdbc::DataType::INTEGER == dataType || css::sdbc::DataType::BIGINT == dataType ) - row[AUTO_INCREMENT] <<= OUString("1"); // TODO + row[AUTO_INCREMENT] <<= u"1"_ustr; // TODO else - row[AUTO_INCREMENT] <<= OUString("0"); // TODO - row[MINIMUM_SCALE] <<= OUString("0"); // TODO: what is this ? + row[AUTO_INCREMENT] <<= u"0"_ustr; // TODO + row[MINIMUM_SCALE] <<= u"0"_ustr; // TODO: what is this ? row[MAXIMUM_SCALE] <<= OUString::number( getMaxScale( dataType ) ); - row[NUM_PREC_RADIX] <<= OUString("10"); // TODO: what is this ? + row[NUM_PREC_RADIX] <<= u"10"_ustr; // TODO: what is this ? vec.push_back( row ); } } @@ -2267,7 +2267,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTypeInfo( ) Reference< XStatement > statement = m_origin->createStatement(); Reference< XResultSet > rs = statement->executeQuery( - "SELECT pg_type.typname AS typname," //1 + u"SELECT pg_type.typname AS typname," //1 "pg_type.typtype AS typtype," //2 "pg_type.typlen AS typlen," //3 "pg_type.typnotnull AS typnotnull," //4 @@ -2275,7 +2275,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTypeInfo( ) "pg_namespace.nspname as typns " //6 "FROM pg_type LEFT JOIN pg_namespace ON pg_type.typnamespace=pg_namespace.oid " "WHERE pg_type.typtype = 'b' " - "OR pg_type.typtype = 'p'" + "OR pg_type.typtype = 'p'"_ustr ); std::vector< std::vector > vec; @@ -2283,14 +2283,14 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getTypeInfo( ) // check for domain types rs = statement->executeQuery( - "SELECT t1.typname as typname," + u"SELECT t1.typname as typname," "t2.typtype AS typtype," "t2.typlen AS typlen," "t2.typnotnull AS typnotnull," "t2.typname as realtypname, " "pg_namespace.nspname as typns " "FROM pg_type as t1 LEFT JOIN pg_type AS t2 ON t1.typbasetype=t2.oid LEFT JOIN pg_namespace ON t1.typnamespace=pg_namespace.oid " - "WHERE t1.typtype = 'd'" ); + "WHERE t1.typtype = 'd'"_ustr ); pgTypeInfo2ResultSet( vec, rs ); std::sort( vec.begin(), vec.end(), TypeInfoByDataTypeSorter() ); @@ -2362,7 +2362,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getIndexInfo( static const sal_Int32 R_COLUMN_NAME = 8; Reference< XPreparedStatement > stmt = m_origin->prepareStatement( - "SELECT nspname, " // 1 + u"SELECT nspname, " // 1 "pg_class.relname, " // 2 "class2.relname, " // 3 "indisclustered, " // 4 @@ -2372,7 +2372,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getIndexInfo( "FROM pg_index INNER JOIN pg_class ON indrelid = pg_class.oid " "INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid " "INNER JOIN pg_class as class2 ON pg_index.indexrelid = class2.oid " - "WHERE nspname = ? AND pg_class.relname = ?" ); + "WHERE nspname = ? AND pg_class.relname = ?"_ustr ); Reference< XParameters > param ( stmt, UNO_QUERY_THROW ); param->setString( 1, schema ); @@ -2385,11 +2385,11 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getIndexInfo( { std::vector< sal_Int32 > columns = parseIntArray( xRow->getString(C_COLUMNS) ); Reference< XPreparedStatement > columnsStmt = m_origin->prepareStatement( - "SELECT attnum, attname " + u"SELECT attnum, attname " "FROM pg_attribute " " INNER JOIN pg_class ON attrelid = pg_class.oid " " INNER JOIN pg_namespace ON pg_class.relnamespace=pg_namespace.oid " - " WHERE pg_namespace.nspname=? AND pg_class.relname=?" ); + " WHERE pg_namespace.nspname=? AND pg_class.relname=?"_ustr ); Reference< XParameters > paramColumn ( columnsStmt, UNO_QUERY_THROW ); OUString currentSchema = xRow->getString( C_SCHEMA ); OUString currentTable = xRow->getString( C_TABLENAME ); diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx index 8e07123a2b0f..a1025017d8c7 100644 --- a/connectivity/source/drivers/postgresql/pq_driver.cxx +++ b/connectivity/source/drivers/postgresql/pq_driver.cxx @@ -67,7 +67,7 @@ Reference< XConnection > Driver::connect( Sequence< Any > seq{ Any(url), Any(info) }; return Reference< XConnection> ( m_smgr->createInstanceWithArgumentsAndContext( - "org.openoffice.comp.connectivity.pq.Connection.noext", + u"org.openoffice.comp.connectivity.pq.Connection.noext"_ustr, seq, m_ctx ), UNO_QUERY ); } @@ -97,7 +97,7 @@ sal_Int32 Driver::getMinorVersion( ) // XServiceInfo OUString SAL_CALL Driver::getImplementationName() { - return "org.openoffice.comp.connectivity.pq.Driver.noext"; + return u"org.openoffice.comp.connectivity.pq.Driver.noext"_ustr; } sal_Bool Driver::supportsService(const OUString& ServiceName) @@ -107,7 +107,7 @@ sal_Bool Driver::supportsService(const OUString& ServiceName) Sequence< OUString > Driver::getSupportedServiceNames() { - return { "com.sun.star.sdbc.Driver" }; + return { u"com.sun.star.sdbc.Driver"_ustr }; } // XComponent diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index e616e9b22966..0daacfbdc33f 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -91,31 +91,31 @@ static ::cppu::IPropertyArrayHelper & getPreparedStatementPropertyArrayHelper() static ::cppu::OPropertyArrayHelper arrayHelper( Sequence{ Property( - "CursorName", 0, + u"CursorName"_ustr, 0, ::cppu::UnoType::get() , 0 ), Property( - "EscapeProcessing", 1, + u"EscapeProcessing"_ustr, 1, cppu::UnoType::get() , 0 ), Property( - "FetchDirection", 2, + u"FetchDirection"_ustr, 2, ::cppu::UnoType::get() , 0 ), Property( - "FetchSize", 3, + u"FetchSize"_ustr, 3, ::cppu::UnoType::get() , 0 ), Property( - "MaxFieldSize", 4, + u"MaxFieldSize"_ustr, 4, ::cppu::UnoType::get() , 0 ), Property( - "MaxRows", 5, + u"MaxRows"_ustr, 5, ::cppu::UnoType::get() , 0 ), Property( - "QueryTimeOut", 6, + u"QueryTimeOut"_ustr, 6, ::cppu::UnoType::get() , 0 ), Property( - "ResultSetConcurrency", 7, + u"ResultSetConcurrency"_ustr, 7, ::cppu::UnoType::get() , 0 ), Property( - "ResultSetType", 8, + u"ResultSetType"_ustr, 8, ::cppu::UnoType::get() , 0 )}, true ); static ::cppu::IPropertyArrayHelper *pArrayHelper = &arrayHelper; @@ -214,7 +214,7 @@ void PreparedStatement::checkClosed() { if( ! m_pSettings || ! m_pSettings->pConnection ) throw SQLException( - "pq_driver: PreparedStatement or connection has already been closed !", + u"pq_driver: PreparedStatement or connection has already been closed !"_ustr, *this, OUString(),1,Any()); } @@ -486,7 +486,7 @@ void PreparedStatement::setBytes( if( ! escapedString ) { throw SQLException( - "pq_preparedstatement.setBytes: Error during converting bytesequence to an SQL conform string", + u"pq_preparedstatement.setBytes: Error during converting bytesequence to an SQL conform string"_ustr, *this, OUString(), 1, Any() ); } m_vars[parameterIndex-1] @@ -516,7 +516,7 @@ void PreparedStatement::setBinaryStream( sal_Int32 ) { throw SQLException( - "pq_preparedstatement: setBinaryStream not implemented", + u"pq_preparedstatement: setBinaryStream not implemented"_ustr, *this, OUString(), 1, Any () ); } @@ -526,7 +526,7 @@ void PreparedStatement::setCharacterStream( sal_Int32 ) { throw SQLException( - "pq_preparedstatement: setCharacterStream not implemented", + u"pq_preparedstatement: setCharacterStream not implemented"_ustr, *this, OUString(), 1, Any () ); } @@ -581,7 +581,7 @@ void PreparedStatement::setRef( const Reference< XRef >& ) { throw SQLException( - "pq_preparedstatement: setRef not implemented", + u"pq_preparedstatement: setRef not implemented"_ustr, *this, OUString(), 1, Any () ); } @@ -590,7 +590,7 @@ void PreparedStatement::setBlob( const Reference< XBlob >& ) { throw SQLException( - "pq_preparedstatement: setBlob not implemented", + u"pq_preparedstatement: setBlob not implemented"_ustr, *this, OUString(), 1, Any () ); } @@ -599,7 +599,7 @@ void PreparedStatement::setClob( const Reference< XClob >& ) { throw SQLException( - "pq_preparedstatement: setClob not implemented", + u"pq_preparedstatement: setClob not implemented"_ustr, *this, OUString(), 1, Any () ); } diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx index c2f16cc3eaf4..62b33fa10ba9 100644 --- a/connectivity/source/drivers/postgresql/pq_resultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx @@ -64,13 +64,13 @@ void ResultSet::checkClosed() { if( ! m_result ) { - throw SQLException( "pq_resultset: already closed", + throw SQLException( u"pq_resultset: already closed"_ustr, *this, OUString(), 1, Any() ); } if( ! m_ppSettings || ! *m_ppSettings || ! (*m_ppSettings)->pConnection ) { - throw SQLException( "pq_resultset: statement has been closed already", + throw SQLException( u"pq_resultset: statement has been closed already"_ustr, *this, OUString(), 1, Any() ); } diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx index b85ed976a877..84db1fa63389 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx @@ -95,11 +95,11 @@ Reference< XResultSetMetaData > SAL_CALL SequenceResultSet::getMetaData( ) { // Oh no, not again throw css::sdbc::SQLException( - "pq_sequenceresultset: no meta supported ", *this, + u"pq_sequenceresultset: no meta supported "_ustr, *this, // I did not find "IM001" in a specific standard, // but it seems to be used by other systems (such as ODBC) // and some parts of LibreOffice special-case it. - "IM001", 1, Any() ); + u"IM001"_ustr, 1, Any() ); } return m_meta; } diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 648faa69811b..5867d5cdbf33 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -103,31 +103,31 @@ static ::cppu::IPropertyArrayHelper & getStatementPropertyArrayHelper() static ::cppu::OPropertyArrayHelper arrayHelper( Sequence{ Property( - "CursorName", 0, + u"CursorName"_ustr, 0, ::cppu::UnoType::get() , 0 ), Property( - "EscapeProcessing", 1, + u"EscapeProcessing"_ustr, 1, cppu::UnoType::get() , 0 ), Property( - "FetchDirection", 2, + u"FetchDirection"_ustr, 2, ::cppu::UnoType::get() , 0 ), Property( - "FetchSize", 3, + u"FetchSize"_ustr, 3, ::cppu::UnoType::get() , 0 ), Property( - "MaxFieldSize", 4, + u"MaxFieldSize"_ustr, 4, ::cppu::UnoType::get() , 0 ), Property( - "MaxRows", 5, + u"MaxRows"_ustr, 5, ::cppu::UnoType::get() , 0 ), Property( - "QueryTimeOut", 6, + u"QueryTimeOut"_ustr, 6, ::cppu::UnoType::get() , 0 ), Property( - "ResultSetConcurrency", 7, + u"ResultSetConcurrency"_ustr, 7, ::cppu::UnoType::get() , 0 ), Property( - "ResultSetType", 8, + u"ResultSetType"_ustr, 8, ::cppu::UnoType::get() , 0 )}, true ); @@ -162,7 +162,7 @@ void Statement::checkClosed() { if( ! m_pSettings || ! m_pSettings->pConnection ) throw SQLException( - "pq_driver: Statement or connection has already been closed !", + u"pq_driver: Statement or connection has already been closed !"_ustr, *this, OUString(),1,Any()); } @@ -531,12 +531,12 @@ static Sequence< OUString > getPrimaryKeyColumnNames( // retrieve the primary key ... Reference< XPreparedStatement > stmt = connection->prepareStatement( - "SELECT conkey " // 7 + u"SELECT conkey " // 7 "FROM pg_constraint INNER JOIN pg_class ON conrelid = pg_class.oid " "INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid " "LEFT JOIN pg_class AS class2 ON confrelid = class2.oid " "LEFT JOIN pg_namespace AS nmsp2 ON class2.relnamespace=nmsp2.oid " - "WHERE pg_class.relname = ? AND pg_namespace.nspname = ? AND pg_constraint.contype='p'" ); + "WHERE pg_class.relname = ? AND pg_namespace.nspname = ? AND pg_constraint.contype='p'"_ustr ); DisposeGuard guard( stmt ); Reference< XParameters > paras( stmt, UNO_QUERY ); paras->setString( 1 , tableName ); diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx index f69556202240..937e8df26686 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.cxx +++ b/connectivity/source/drivers/postgresql/pq_statics.cxx @@ -186,7 +186,7 @@ Statics & getStatics() // Table props set ImplementationStatics &ist = statics.refl.table; ist.implName = "org.openoffice.comp.pq.sdbcx.Table"; - ist.serviceNames = { "com.sun.star.sdbcx.Table" }; + ist.serviceNames = { u"com.sun.star.sdbcx.Table"_ustr }; PropertyDef tableDef[] = { PropertyDef( statics.CATALOG_NAME , tString ), @@ -201,7 +201,7 @@ Statics & getStatics() statics.refl.tableDescriptor.implName = "org.openoffice.comp.pq.sdbcx.TableDescriptor"; - statics.refl.tableDescriptor.serviceNames = { "com.sun.star.sdbcx.TableDescriptor" }; + statics.refl.tableDescriptor.serviceNames = { u"com.sun.star.sdbcx.TableDescriptor"_ustr }; PropertyDef tableDescDef[] = { PropertyDef( statics.CATALOG_NAME , tString ), @@ -215,7 +215,7 @@ Statics & getStatics() // Column props set statics.refl.column.implName = "org.openoffice.comp.pq.sdbcx.Column"; - statics.refl.column.serviceNames = { "com.sun.star.sdbcx.Column" }; + statics.refl.column.serviceNames = { u"com.sun.star.sdbcx.Column"_ustr }; PropertyDefEx columnDef[] = { PropertyDefEx( statics.CATALOG_NAME , tString, READONLY ), @@ -237,7 +237,7 @@ Statics & getStatics() statics.refl.columnDescriptor.implName = "org.openoffice.comp.pq.sdbcx.ColumnDescriptor"; - statics.refl.columnDescriptor.serviceNames = { "com.sun.star.sdbcx.ColumnDescriptor" }; + statics.refl.columnDescriptor.serviceNames = { u"com.sun.star.sdbcx.ColumnDescriptor"_ustr }; PropertyDef columnDescDef[] = { PropertyDef( statics.CATALOG_NAME , tString ), @@ -260,7 +260,7 @@ Statics & getStatics() // Key properties statics.refl.key.implName = "org.openoffice.comp.pq.sdbcx.Key"; - statics.refl.key.serviceNames = { "com.sun.star.sdbcx.Key" }; + statics.refl.key.serviceNames = { u"com.sun.star.sdbcx.Key"_ustr }; PropertyDef keyDef[] = { PropertyDef( statics.DELETE_RULE, tInt ), @@ -278,7 +278,7 @@ Statics & getStatics() // Key properties statics.refl.keyDescriptor.implName = "org.openoffice.comp.pq.sdbcx.KeyDescriptor"; - statics.refl.keyDescriptor.serviceNames = { "com.sun.star.sdbcx.KeyDescriptor" }; + statics.refl.keyDescriptor.serviceNames = { u"com.sun.star.sdbcx.KeyDescriptor"_ustr }; PropertyDef keyDescDef[] = { PropertyDef( statics.DELETE_RULE, tInt ), @@ -293,7 +293,7 @@ Statics & getStatics() // KeyColumn props set statics.refl.keycolumn.implName = "org.openoffice.comp.pq.sdbcx.KeyColumn"; - statics.refl.keycolumn.serviceNames = { "com.sun.star.sdbcx.KeyColumn" }; + statics.refl.keycolumn.serviceNames = { u"com.sun.star.sdbcx.KeyColumn"_ustr }; PropertyDef keycolumnDef[] = { PropertyDef( statics.CATALOG_NAME , tString ), @@ -317,7 +317,7 @@ Statics & getStatics() statics.refl.keycolumnDescriptor.implName = "org.openoffice.comp.pq.sdbcx.KeyColumnDescriptor"; statics.refl.keycolumnDescriptor.serviceNames = - { "com.sun.star.sdbcx.KeyColumnDescriptor" }; + { u"com.sun.star.sdbcx.KeyColumnDescriptor"_ustr }; PropertyDef keycolumnDescDef[] = { PropertyDef( statics.NAME , tString ), @@ -328,7 +328,7 @@ Statics & getStatics() // view props set statics.refl.view.implName = "org.openoffice.comp.pq.sdbcx.View"; - statics.refl.view.serviceNames = { "com.sun.star.sdbcx.View" }; + statics.refl.view.serviceNames = { u"com.sun.star.sdbcx.View"_ustr }; PropertyDef viewDef[] = { PropertyDef( statics.CATALOG_NAME , tString ), @@ -342,12 +342,12 @@ Statics & getStatics() // view props set statics.refl.viewDescriptor.implName = "org.openoffice.comp.pq.sdbcx.ViewDescriptor"; - statics.refl.viewDescriptor.serviceNames = { "com.sun.star.sdbcx.ViewDescriptor" }; + statics.refl.viewDescriptor.serviceNames = { u"com.sun.star.sdbcx.ViewDescriptor"_ustr }; statics.refl.viewDescriptor.pProps = createPropertyArrayHelper( viewDef, std::size(viewDef), 0 ); // reuse view, as it is identical // user props set statics.refl.user.implName = "org.openoffice.comp.pq.sdbcx.User"; - statics.refl.user.serviceNames = { "com.sun.star.sdbcx.User" }; + statics.refl.user.serviceNames = { u"com.sun.star.sdbcx.User"_ustr }; PropertyDef userDefRO[] = { PropertyDef( statics.NAME , tString ) @@ -358,7 +358,7 @@ Statics & getStatics() // user props set statics.refl.userDescriptor.implName = "org.openoffice.comp.pq.sdbcx.UserDescriptor"; - statics.refl.userDescriptor.serviceNames = { "com.sun.star.sdbcx.UserDescriptor" }; + statics.refl.userDescriptor.serviceNames = { u"com.sun.star.sdbcx.UserDescriptor"_ustr }; PropertyDef userDefWR[] = { PropertyDef( statics.NAME , tString ), @@ -369,7 +369,7 @@ Statics & getStatics() // index props set statics.refl.index.implName = "org.openoffice.comp.pq.sdbcx.Index"; - statics.refl.index.serviceNames = { "com.sun.star.sdbcx.Index" }; + statics.refl.index.serviceNames = { u"com.sun.star.sdbcx.Index"_ustr }; PropertyDef indexDef[] = { PropertyDef( statics.CATALOG , tString ), @@ -385,13 +385,13 @@ Statics & getStatics() // index props set statics.refl.indexDescriptor.implName = "org.openoffice.comp.pq.sdbcx.IndexDescriptor"; - statics.refl.indexDescriptor.serviceNames = { "com.sun.star.sdbcx.IndexDescriptor" }; + statics.refl.indexDescriptor.serviceNames = { u"com.sun.star.sdbcx.IndexDescriptor"_ustr }; statics.refl.indexDescriptor.pProps = createPropertyArrayHelper( indexDef, std::size(indexDef), 0 ); // indexColumn props set statics.refl.indexColumn.implName = "org.openoffice.comp.pq.sdbcx.IndexColumn"; - statics.refl.indexColumn.serviceNames = { "com.sun.star.sdbcx.IndexColumn" }; + statics.refl.indexColumn.serviceNames = { u"com.sun.star.sdbcx.IndexColumn"_ustr }; PropertyDef indexColumnDef[] = { PropertyDef( statics.CATALOG_NAME , tString ), @@ -415,7 +415,7 @@ Statics & getStatics() statics.refl.indexColumnDescriptor.implName = "org.openoffice.comp.pq.sdbcx.IndexColumnDescriptor"; statics.refl.indexColumnDescriptor.serviceNames = - { "com.sun.star.sdbcx.IndexColumnDescriptor" }; + { u"com.sun.star.sdbcx.IndexColumnDescriptor"_ustr }; PropertyDef indexColumnDescDef[] = { PropertyDef( statics.IS_ASCENDING, tBool ), @@ -473,32 +473,32 @@ Statics & getStatics() statics.columnRowNames = { - "TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", "COLUMN_NAME", - "DATA_TYPE", "TYPE_NAME", "COLUMN_SIZE", "BUFFER_LENGTH", - "DECIMAL_DIGITS", "NUM_PREC_RADIX", "NULLABLE", "REMARKS", - "COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", - "ORDINAL_POSITION", "IS_NULLABLE" + u"TABLE_CAT"_ustr, u"TABLE_SCHEM"_ustr, u"TABLE_NAME"_ustr, u"COLUMN_NAME"_ustr, + u"DATA_TYPE"_ustr, u"TYPE_NAME"_ustr, u"COLUMN_SIZE"_ustr, u"BUFFER_LENGTH"_ustr, + u"DECIMAL_DIGITS"_ustr, u"NUM_PREC_RADIX"_ustr, u"NULLABLE"_ustr, u"REMARKS"_ustr, + u"COLUMN_DEF"_ustr, u"SQL_DATA_TYPE"_ustr, u"SQL_DATETIME_SUB"_ustr, u"CHAR_OCTET_LENGTH"_ustr, + u"ORDINAL_POSITION"_ustr, u"IS_NULLABLE"_ustr }; statics.typeinfoColumnNames = { - "TYPE_NAME", "DATA_TYPE", "PRECISION", "LITERAL_PREFIX", - "LITERAL_SUFFIX", "CREATE_PARAMS", "NULLABLE", "CASE_SENSITIVE", - "SEARCHABLE", "UNSIGNED_ATTRIBUTE", "FIXED_PREC_SCALE", - "AUTO_INCREMENT", "LOCAL_TYPE_NAME", "MINIMUM_SCALE", - "MAXIMUM_SCALE", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", - "NUM_PREC_RADIX" + u"TYPE_NAME"_ustr, u"DATA_TYPE"_ustr, u"PRECISION"_ustr, u"LITERAL_PREFIX"_ustr, + u"LITERAL_SUFFIX"_ustr, u"CREATE_PARAMS"_ustr, u"NULLABLE"_ustr, u"CASE_SENSITIVE"_ustr, + u"SEARCHABLE"_ustr, u"UNSIGNED_ATTRIBUTE"_ustr, u"FIXED_PREC_SCALE"_ustr, + u"AUTO_INCREMENT"_ustr, u"LOCAL_TYPE_NAME"_ustr, u"MINIMUM_SCALE"_ustr, + u"MAXIMUM_SCALE"_ustr, u"SQL_DATA_TYPE"_ustr, u"SQL_DATETIME_SUB"_ustr, + u"NUM_PREC_RADIX"_ustr }; statics.indexinfoColumnNames = { - "TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", - "NON_UNIQUE", "INDEX_QUALIFIER", "INDEX_NAME", - "TYPE", "ORDINAL_POSITION", "COLUMN_NAME", - "ASC_OR_DESC", "CARDINALITY", "PAGES", "FILTER_CONDITION" + u"TABLE_CAT"_ustr, u"TABLE_SCHEM"_ustr, u"TABLE_NAME"_ustr, + u"NON_UNIQUE"_ustr, u"INDEX_QUALIFIER"_ustr, u"INDEX_NAME"_ustr, + u"TYPE"_ustr, u"ORDINAL_POSITION"_ustr, u"COLUMN_NAME"_ustr, + u"ASC_OR_DESC"_ustr, u"CARDINALITY"_ustr, u"PAGES"_ustr, u"FILTER_CONDITION"_ustr }; - statics.resultSetArrayColumnNames = { "INDEX" , "VALUE" }; + statics.resultSetArrayColumnNames = { u"INDEX"_ustr , u"VALUE"_ustr }; // LEM TODO see if a refresh is needed; obtain automatically from pg_catalog.pg_type? BaseTypeDef baseTypeDefs[] = diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index f2ed8a6574ae..b6e5d28f938e 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -118,7 +118,7 @@ void bufferEscapeConstant( OUStringBuffer & buf, std::u16string_view value, Conn // We have no good XInterface Reference to pass here, so just give NULL throw SQLException(OUString(errstr, strlen(errstr), ConnectionSettings::encoding), nullptr, - "22018", + u"22018"_ustr, -1, Any()); } @@ -164,7 +164,7 @@ static void ibufferQuoteIdentifier( OUStringBuffer & buf, std::u16string_view to // Implementation-defined SQLACCESS error throw SQLException(OUString(errstr, strlen(errstr), ConnectionSettings::encoding), nullptr, - "22018", + u"22018"_ustr, -1, Any()); } @@ -259,7 +259,7 @@ Reference< XConnection > extractConnectionFromStatement( const Reference< XInter ret = myowner->getConnection(); if( ! ret.is() ) throw SQLException( - "PQSDBC: Couldn't retrieve connection from statement", + u"PQSDBC: Couldn't retrieve connection from statement"_ustr, Reference< XInterface > () , OUString(), 0 , css::uno::Any() ); } @@ -711,11 +711,11 @@ void fillAttnum2attnameMap( const OUString &table ) { Reference< XPreparedStatement > prep = conn->prepareStatement( - "SELECT attname,attnum " + u"SELECT attname,attnum " "FROM pg_attribute " "INNER JOIN pg_class ON attrelid = pg_class.oid " "INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid " - "WHERE relname=? AND nspname=?" ); + "WHERE relname=? AND nspname=?"_ustr ); Reference< XParameters > paras( prep, UNO_QUERY_THROW ); paras->setString( 1 , table ); @@ -836,8 +836,8 @@ OString extractSingleTableFromSelect( const std::vector< OString > &vec ) OUString getColExprForDefaultSettingVal(ConnectionSettings const *settings) { return (PQserverVersion( settings->pConnection ) < 80000)? - OUString("pg_attrdef.adsrc"): - OUString("pg_get_expr(pg_attrdef.adbin, pg_attrdef.adrelid, true)"); + u"pg_attrdef.adsrc"_ustr: + u"pg_get_expr(pg_attrdef.adbin, pg_attrdef.adrelid, true)"_ustr; } css::uno::Sequence< sal_Int32 > string2intarray( std::u16string_view str ) diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index 49eb65cd9fbf..1bfeaee0fc43 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -187,7 +187,7 @@ void UpdateableResultSet::insertRow( ) if( ! m_insertRow ) throw SQLException( - "pq_resultset.insertRow: moveToInsertRow has not been called !", + u"pq_resultset.insertRow: moveToInsertRow has not been called !"_ustr, *this, OUString(), 1, Any() ); OUStringBuffer buf( 128 ); @@ -279,7 +279,7 @@ void UpdateableResultSet::updateRow( ) if( m_insertRow ) throw SQLException( - "pq_resultset.updateRow: moveToCurrentRow has not been called !", + u"pq_resultset.updateRow: moveToCurrentRow has not been called !"_ustr, *this, OUString(), 1, Any() ); OUStringBuffer buf( 128 ); @@ -326,7 +326,7 @@ void UpdateableResultSet::deleteRow( ) if( m_insertRow ) throw SQLException( - "pq_resultset.deleteRow: deleteRow cannot be called when on insert row !", + u"pq_resultset.deleteRow: deleteRow cannot be called when on insert row !"_ustr, *this, OUString(), 1, Any() ); if( m_row < 0 || m_row >= m_rowCount ) @@ -473,7 +473,7 @@ void UpdateableResultSet::updateBytes( sal_Int32 columnIndex, const css::uno::Se if( ! escapedString ) { throw SQLException( - "pq_preparedstatement.setBytes: Error during converting bytesequence to an SQL conform string", + u"pq_preparedstatement.setBytes: Error during converting bytesequence to an SQL conform string"_ustr, *this, OUString(), 1, Any() ); } // buf.append( (const char *)escapedString, len -1 ); diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx index 001046aa52fa..dd9579fce0da 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.cxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx @@ -205,7 +205,7 @@ OUString ReflectionBase::getName( ) void ReflectionBase::setName( const OUString& /* aName */ ) { throw RuntimeException( - "pq_sdbc::ReflectionBase::setName not implemented", + u"pq_sdbc::ReflectionBase::setName not implemented"_ustr, *this ); //setPropertyValue( getStatics().NAME , makeAny( aName ) ); } diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index 2902879c49b0..962449368aaf 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -112,7 +112,7 @@ Columns::Columns( ConnectionSettings *pSettings, OUString schemaName, OUString tableName) - : Container( refMutex, origin, pSettings, "COLUMN" ), + : Container( refMutex, origin, pSettings, u"COLUMN"_ustr ), m_schemaName(std::move( schemaName )), m_tableName(std::move( tableName )) {} @@ -382,7 +382,7 @@ void alterColumnByDescriptor( if( pastTypeName != futureTypeName ) { throw RuntimeException( - "Can't modify column types, drop the column and create a new one" ); + u"Can't modify column types, drop the column and create a new one"_ustr ); } if( pastColumnName != futureColumnName ) @@ -546,7 +546,7 @@ ColumnDescriptors::ColumnDescriptors( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings ) - : Container( refMutex, origin, pSettings, "COLUMN-DESCRIPTOR" ) + : Container( refMutex, origin, pSettings, u"COLUMN-DESCRIPTOR"_ustr ) {} diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx index 131148c3e192..eec72bac8feb 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx @@ -238,7 +238,7 @@ css::uno::Any ContainerEnumeration::nextElement() if( ! hasMoreElements() ) { throw NoSuchElementException( - "NoSuchElementException during enumeration", *this ); + u"NoSuchElementException during enumeration"_ustr, *this ); } m_index ++; return m_vec[m_index]; diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index 2bca00e13b77..5237f64e9b45 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -77,7 +77,7 @@ IndexColumns::IndexColumns( OUString tableName, OUString indexName, const css::uno::Sequence< OUString > &columns ) - : Container( refMutex, origin, pSettings, "INDEX_COLUMN" ), + : Container( refMutex, origin, pSettings, u"INDEX_COLUMN"_ustr ), m_schemaName(std::move( schemaName )), m_tableName(std::move( tableName )), m_indexName(std::move( indexName )), @@ -152,7 +152,7 @@ void IndexColumns::appendByDescriptor( const css::uno::Reference< css::beans::XPropertySet >& /*future*/ ) { throw css::sdbc::SQLException( - "SDBC-POSTGRESQL: IndexesColumns.appendByDescriptor not yet implemented", + u"SDBC-POSTGRESQL: IndexesColumns.appendByDescriptor not yet implemented"_ustr, *this, OUString(), 1, Any() ); // osl::MutexGuard guard( m_xMutex->GetMutex() ); // Statics & st = getStatics(); @@ -166,7 +166,7 @@ void IndexColumns::appendByDescriptor( void IndexColumns::dropByName( const OUString& ) { throw css::sdbc::SQLException( - "SDBC-POSTGRESQL: IndexesColumns.dropByName not yet implemented", + u"SDBC-POSTGRESQL: IndexesColumns.dropByName not yet implemented"_ustr, *this, OUString(), 1, Any() ); // String2IntMap::const_iterator ii = m_name2index.find( elementName ); // if( ii == m_name2index.end() ) @@ -188,7 +188,7 @@ void IndexColumns::dropByName( const OUString& ) void IndexColumns::dropByIndex( sal_Int32 ) { throw css::sdbc::SQLException( - "SDBC-POSTGRESQL: IndexesColumns.dropByIndex not yet implemented", + u"SDBC-POSTGRESQL: IndexesColumns.dropByIndex not yet implemented"_ustr, *this, OUString(), 1, Any() ); // osl::MutexGuard guard( m_xMutex->GetMutex() ); // if( index < 0 || index >= m_values.getLength() ) diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index bff96216c568..6c44c8875604 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -104,7 +104,7 @@ void Indexes::refresh() // see XDatabaseMetaData::getIndexInfo() Reference< XPreparedStatement > stmt = m_origin->prepareStatement( - "SELECT nspname, " // 1 + u"SELECT nspname, " // 1 "pg_class.relname, " // 2 "class2.relname, " // 3 "indisclustered, " // 4 @@ -114,7 +114,7 @@ void Indexes::refresh() "FROM pg_index INNER JOIN pg_class ON indrelid = pg_class.oid " "INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid " "INNER JOIN pg_class as class2 ON pg_index.indexrelid = class2.oid " - "WHERE nspname = ? AND pg_class.relname = ?" ); + "WHERE nspname = ? AND pg_class.relname = ?"_ustr ); Reference< XParameters > params( stmt, UNO_QUERY); params->setString( 1, m_schemaName ); diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx index 89f63ceb5a65..f44899d41a2f 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx @@ -73,7 +73,7 @@ KeyColumns::KeyColumns( OUString tableName, const Sequence< OUString > &columnNames, const Sequence< OUString > &foreignColumnNames ) - : Container( refMutex, origin, pSettings, "KEY_COLUMN" ), + : Container( refMutex, origin, pSettings, u"KEY_COLUMN"_ustr ), m_schemaName(std::move( schemaName )), m_tableName(std::move( tableName )), m_columnNames( columnNames ), @@ -152,7 +152,7 @@ void KeyColumns::appendByDescriptor( const css::uno::Reference< css::beans::XPropertySet >& ) { throw css::sdbc::SQLException( - "KeyColumns::appendByDescriptor not implemented yet", + u"KeyColumns::appendByDescriptor not implemented yet"_ustr, *this, OUString(), 1, Any() ); // osl::MutexGuard guard( m_xMutex->GetMutex() ); @@ -168,7 +168,7 @@ void KeyColumns::appendByDescriptor( void KeyColumns::dropByIndex( sal_Int32 ) { throw css::sdbc::SQLException( - "KeyColumns::dropByIndex not implemented yet", + u"KeyColumns::dropByIndex not implemented yet"_ustr, *this, OUString(), 1, Any() ); // osl::MutexGuard guard( m_xMutex->GetMutex() ); // if( index < 0 || index >= m_values.getLength() ) @@ -227,7 +227,7 @@ KeyColumnDescriptors::KeyColumnDescriptors( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings ) - : Container( refMutex, origin, pSettings, "KEY_COLUMN" ) + : Container( refMutex, origin, pSettings, u"KEY_COLUMN"_ustr ) {} Reference< css::beans::XPropertySet > KeyColumnDescriptors::createDataDescriptor() diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx index 0758be630e04..c3daebfff617 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx @@ -127,7 +127,7 @@ void Keys::refresh() fillAttnum2attnameMap( mainMap, m_origin, m_schemaName, m_tableName ); Reference< XPreparedStatement > stmt = m_origin->prepareStatement( - "SELECT conname, " // 1 + u"SELECT conname, " // 1 "contype, " // 2 "confupdtype, " // 3 "confdeltype, " // 4 @@ -139,7 +139,7 @@ void Keys::refresh() "INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid " "LEFT JOIN pg_class AS class2 ON confrelid = class2.oid " "LEFT JOIN pg_namespace AS nmsp2 ON class2.relnamespace=nmsp2.oid " - "WHERE pg_class.relname = ? AND pg_namespace.nspname = ?" ); + "WHERE pg_class.relname = ? AND pg_namespace.nspname = ?"_ustr ); Reference< XParameters > paras( stmt, UNO_QUERY ); paras->setString( 1 , m_tableName ); diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx index 4d0a01f6366f..2165c7e3d528 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.cxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx @@ -134,13 +134,13 @@ sal_Int32 User::getGrantablePrivileges( const OUString&, sal_Int32 ) void User::grantPrivileges( const OUString&, sal_Int32, sal_Int32 ) { - throw css::sdbc::SQLException("pq_driver: privilege change not implemented yet", + throw css::sdbc::SQLException(u"pq_driver: privilege change not implemented yet"_ustr, *this, OUString(), 1, Any() ); } void User::revokePrivileges( const OUString&, sal_Int32, sal_Int32 ) { - throw css::sdbc::SQLException("pq_driver: privilege change not implemented yet", + throw css::sdbc::SQLException(u"pq_driver: privilege change not implemented yet"_ustr, *this, OUString(), 1, Any() ); } diff --git a/connectivity/source/drivers/postgresql/pq_xusers.cxx b/connectivity/source/drivers/postgresql/pq_xusers.cxx index 08cdf2d1c135..701adc76600d 100644 --- a/connectivity/source/drivers/postgresql/pq_xusers.cxx +++ b/connectivity/source/drivers/postgresql/pq_xusers.cxx @@ -83,7 +83,7 @@ void Users::refresh() Reference< XStatement > stmt = m_origin->createStatement(); - Reference< XResultSet > rs = stmt->executeQuery( "SELECT usename FROM pg_shadow" ); + Reference< XResultSet > rs = stmt->executeQuery( u"SELECT usename FROM pg_shadow"_ustr ); Reference< XRow > xRow( rs , UNO_QUERY ); diff --git a/connectivity/source/drivers/postgresql/pq_xviews.cxx b/connectivity/source/drivers/postgresql/pq_xviews.cxx index 1f5b6c4fa52c..b50fb9510746 100644 --- a/connectivity/source/drivers/postgresql/pq_xviews.cxx +++ b/connectivity/source/drivers/postgresql/pq_xviews.cxx @@ -85,7 +85,7 @@ void Views::refresh() Reference< XStatement > stmt = m_origin->createStatement(); - Reference< XResultSet > rs = stmt->executeQuery("SELECT " + Reference< XResultSet > rs = stmt->executeQuery(u"SELECT " "DISTINCT ON( pg_namespace.nspname, relname) " // needed because of duplicates "pg_namespace.nspname," // 1 "relname," // 2 @@ -93,7 +93,7 @@ void Views::refresh() "FROM pg_namespace, pg_class, pg_rewrite " "WHERE pg_namespace.oid = relnamespace " "AND pg_class.oid = ev_class " - "AND relkind=\'v\'" ); + "AND relkind=\'v\'"_ustr ); Reference< XRow > xRow( rs , UNO_QUERY ); diff --git a/connectivity/source/drivers/writer/WCatalog.cxx b/connectivity/source/drivers/writer/WCatalog.cxx index 8671af7bd5d9..b0e326d96d6f 100644 --- a/connectivity/source/drivers/writer/WCatalog.cxx +++ b/connectivity/source/drivers/writer/WCatalog.cxx @@ -41,7 +41,8 @@ void OWriterCatalog::refreshTables() ::std::vector aVector; uno::Sequence aTypes; OWriterConnection::ODocHolder aDocHolder(static_cast(m_pConnection)); - uno::Reference xResult = m_xMetaData->getTables(uno::Any(), "%", "%", aTypes); + uno::Reference xResult + = m_xMetaData->getTables(uno::Any(), u"%"_ustr, u"%"_ustr, aTypes); if (xResult.is()) { diff --git a/connectivity/source/drivers/writer/WConnection.cxx b/connectivity/source/drivers/writer/WConnection.cxx index 65be4e345d83..9f59541c0125 100644 --- a/connectivity/source/drivers/writer/WConnection.cxx +++ b/connectivity/source/drivers/writer/WConnection.cxx @@ -115,7 +115,7 @@ uno::Reference const& OWriterConnection::acquireDoc() uno::Any aLoaderException; try { - xComponent = xDesktop->loadComponentFromURL(m_aFileName, "_blank", 0, aArgs); + xComponent = xDesktop->loadComponentFromURL(m_aFileName, u"_blank"_ustr, 0, aArgs); } catch (const uno::Exception&) { @@ -177,8 +177,8 @@ void OWriterConnection::disposing() // XServiceInfo -IMPLEMENT_SERVICE_INFO(OWriterConnection, "com.sun.star.sdbc.drivers.writer.Connection", - "com.sun.star.sdbc.Connection") +IMPLEMENT_SERVICE_INFO(OWriterConnection, u"com.sun.star.sdbc.drivers.writer.Connection"_ustr, + u"com.sun.star.sdbc.Connection"_ustr) uno::Reference SAL_CALL OWriterConnection::getMetaData() { @@ -236,7 +236,7 @@ uno::Reference ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OConnection_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException("XConnection::prepareCall", *this); + ::dbtools::throwFeatureNotImplementedSQLException(u"XConnection::prepareCall"_ustr, *this); } } // namespace diff --git a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx index 1eed92ddcf07..29a6ab9379e2 100644 --- a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx +++ b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx @@ -53,7 +53,7 @@ uno::Reference SAL_CALL OWriterDatabaseMetaData::getTables( // check if ORowSetValue type is given // when no types are given then we have to return all tables e.g. TABLE - OUString aTable("TABLE"); + OUString aTable(u"TABLE"_ustr); bool bTableFound = true; sal_Int32 nLength = types.getLength(); diff --git a/connectivity/source/drivers/writer/WDriver.cxx b/connectivity/source/drivers/writer/WDriver.cxx index bbd0f71838c1..6129b4a20c4c 100644 --- a/connectivity/source/drivers/writer/WDriver.cxx +++ b/connectivity/source/drivers/writer/WDriver.cxx @@ -31,7 +31,7 @@ namespace connectivity::writer { OUString SAL_CALL ODriver::getImplementationName() { - return "com.sun.star.comp.sdbc.writer.ODriver"; + return u"com.sun.star.comp.sdbc.writer.ODriver"_ustr; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/connectivity/source/drivers/writer/WTables.cxx b/connectivity/source/drivers/writer/WTables.cxx index 8b2692d93a01..95f8d7c177f5 100644 --- a/connectivity/source/drivers/writer/WTables.cxx +++ b/connectivity/source/drivers/writer/WTables.cxx @@ -35,7 +35,7 @@ sdbcx::ObjectType OWriterTables::createObject(const OUString& rName) = new OWriterTable(this, static_cast( static_cast(m_rParent).getConnection()), - rName, "TABLE"); + rName, u"TABLE"_ustr); pTable->construct(); return pTable; } diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index ed09cc3c816e..2c9b32adc4b3 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -170,18 +170,18 @@ namespace // one argument for creating the node access: the path to the configuration node Sequence< Any > aCreationArgs{ Any(NamedValue( - "nodepath", Any( OUString("org.openoffice.Office.DataAccess/DriverManager") ) )) }; + u"nodepath"_ustr, Any( u"org.openoffice.Office.DataAccess/DriverManager"_ustr ) )) }; // create the node access Reference< XNameAccess > xDriverManagerNode( - xConfigurationProvider->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aCreationArgs), + xConfigurationProvider->createInstanceWithArguments(u"com.sun.star.configuration.ConfigurationAccess"_ustr, aCreationArgs), UNO_QUERY); OSL_ENSURE(xDriverManagerNode.is(), "lcl_getDriverPrecedence: could not open my configuration node!"); if (xDriverManagerNode.is()) { // obtain the preference list - Any aPreferences = xDriverManagerNode->getByName("DriverPrecedence"); + Any aPreferences = xDriverManagerNode->getByName(u"DriverPrecedence"_ustr); bool bSuccess = aPreferences >>= _rPrecedence; OSL_ENSURE(bSuccess || !aPreferences.hasValue(), "lcl_getDriverPrecedence: invalid value for the preferences node (no string sequence but not NULL)!"); } @@ -492,7 +492,7 @@ sal_Bool SAL_CALL OSDBCDriverManager::hasElements( ) OUString SAL_CALL OSDBCDriverManager::getImplementationName( ) { - return "com.sun.star.comp.sdbc.OSDBCDriverManager"; + return u"com.sun.star.comp.sdbc.OSDBCDriverManager"_ustr; } sal_Bool SAL_CALL OSDBCDriverManager::supportsService( const OUString& _rServiceName ) @@ -503,7 +503,7 @@ sal_Bool SAL_CALL OSDBCDriverManager::supportsService( const OUString& _rService Sequence< OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceNames( ) { - return { "com.sun.star.sdbc.DriverManager" }; + return { u"com.sun.star.sdbc.DriverManager"_ustr }; } diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx index 5ada4136cc93..29763c2dd438 100644 --- a/connectivity/source/parse/PColumn.cxx +++ b/connectivity/source/parse/PColumn.cxx @@ -264,7 +264,7 @@ void OOrderColumn::construct() css::uno::Sequence< OUString > SAL_CALL OOrderColumn::getSupportedServiceNames( ) { - return { "com.sun.star.sdb.OrderColumn" }; + return { u"com.sun.star.sdb.OrderColumn"_ustr }; } diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 3171507bcc67..e0db07e9bbe8 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -269,7 +269,7 @@ namespace static constexpr OUString s_sWildcard = u"%"_ustr ; // we want all catalogues, all schemas, all tables - Sequence< OUString > sTableTypes { "VIEW", "TABLE", s_sWildcard }; // this last one just to be sure to include anything else... + Sequence< OUString > sTableTypes { u"VIEW"_ustr, u"TABLE"_ustr, s_sWildcard }; // this last one just to be sure to include anything else... if ( _rxDBMeta.is() ) { @@ -853,7 +853,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele if (pSelectNode->getChild(2)->isRule() && SQL_ISPUNCTUATION(pSelectNode->getChild(2)->getChild(0),"*")) { // SELECT * ... - setSelectColumnName("*", "", ""); + setSelectColumnName(u"*"_ustr, u""_ustr, u""_ustr); } else if (SQL_ISRULE(pSelectNode->getChild(2),scalar_exp_commalist)) { @@ -873,7 +873,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele // All the table's columns OUString aTableRange; pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, nullptr, false, false ); - setSelectColumnName("*", "", aTableRange); + setSelectColumnName(u"*"_ustr, u""_ustr, aTableRange); continue; } else if (SQL_ISRULE(pColumnRef,derived_column)) @@ -1035,7 +1035,7 @@ namespace { OUString lcl_generateParameterName( const OSQLParseNode& _rParentNode, const OSQLParseNode& _rParamNode ) { - OUString sColumnName( "param" ); + OUString sColumnName( u"param"_ustr ); const sal_Int32 nCount = static_cast(_rParentNode.count()); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -1313,7 +1313,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode ? _rColumnAlias : !_aColumnName.isEmpty() ? _aColumnName - : OUString("?"); + : u"?"_ustr; } else if (SQL_ISPUNCTUATION(pMark,":")) { @@ -1516,8 +1516,8 @@ OSQLTable OSQLParseTreeIterator::impl_createTableObject( const OUString& rTableN nullptr, false, rTableName, - "Table", - "New Created Table", + u"Table"_ustr, + u"New Created Table"_ustr, rSchemaName, rCatalogName ); @@ -1620,7 +1620,7 @@ void OSQLParseTreeIterator::setSelectColumnName(const OUString & rColumnName,con // did not find a column with this name in any of the tables rtl::Reference pColumn = new OParseColumn( aNewColName, - "VARCHAR", + u"VARCHAR"_ustr, // TODO: does this match with _nType? // Or should be fill this from the getTypeInfo of the connection? OUString(), diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 823813b3f0e0..ca4521b05e7d 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -244,7 +244,7 @@ void OSQLParseNode::parseNodeToStr(OUString& rString, parseNodeToStr( rString, _rxConnection, nullptr, nullptr, OUString(), pContext ? pContext->getPreferredLocale() : OParseContext::getDefaultLocale(), - pContext, _bIntl, _bQuote, ".", false ); + pContext, _bIntl, _bQuote, u"."_ustr, false ); } @@ -320,7 +320,7 @@ bool OSQLParseNode::parseNodeToExecutableStatement( OUString& _out_rString, cons { OSL_PRECOND( _rxConnection.is(), "OSQLParseNode::parseNodeToExecutableStatement: invalid connection!" ); SQLParseNodeParameter aParseParam( _rxConnection, - nullptr, nullptr, OUString(), OParseContext::getDefaultLocale(), nullptr, false, true, OUString("."), false, true ); + nullptr, nullptr, OUString(), OParseContext::getDefaultLocale(), nullptr, false, true, u"."_ustr, false, true ); if ( aParseParam.aMetaData.supportsSubqueriesInFrom() ) { @@ -1008,7 +1008,7 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode* pAppend, OSQLParseNode*& pLit sal_Int16 nScale = 0; try { - Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, "Decimals" ); + Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, u"Decimals"_ustr ); aValue >>= nScale; } catch( Exception& ) @@ -1095,7 +1095,7 @@ OSQLParseNode* OSQLParser::buildNode_STR_NUM(OSQLParseNode*& _pLiteral) sal_Int16 nScale = 0; try { - Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, "Decimals" ); + Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, u"Decimals"_ustr ); aValue >>= nScale; } catch( Exception& ) @@ -1221,7 +1221,7 @@ std::unique_ptr OSQLParser::predicateTree(OUString& rErrorMessage css::lang::Locale aLocale; aLocale.Language = "en"; aLocale.Country = "US"; - OUString sFormat("YYYY-MM-DD"); + OUString sFormat(u"YYYY-MM-DD"_ustr); m_nDateFormatKey = xFormats->queryKey(sFormat,aLocale,false); if ( m_nDateFormatKey == sal_Int32(-1) ) m_nDateFormatKey = xFormats->addNew(sFormat, aLocale); @@ -1705,7 +1705,7 @@ bool OSQLParseNode::addDateValue(OUStringBuffer& rString, const SQLParseNodePara SQL_ISTOKEN(pODBCNodeChild, TS) )) return false; - OUString suQuote("'"); + OUString suQuote(u"'"_ustr); if (rParam.bPredicate) { if (rParam.aMetaData.shouldEscapeDateTime()) diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx index b30519fcaab1..79f4400d1025 100644 --- a/connectivity/source/sdbcx/VCatalog.cxx +++ b/connectivity/source/sdbcx/VCatalog.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -IMPLEMENT_SERVICE_INFO(OCatalog,"com.sun.star.comp.connectivity.OCatalog","com.sun.star.sdbcx.DatabaseDefinition") +IMPLEMENT_SERVICE_INFO(OCatalog,u"com.sun.star.comp.connectivity.OCatalog"_ustr,u"com.sun.star.sdbcx.DatabaseDefinition"_ustr) OCatalog::OCatalog(const Reference< XConnection> &_xConnection) : OCatalog_BASE(m_aMutex) { diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index c9ada7cf59e6..e6671d4598a1 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -216,7 +216,7 @@ namespace IObjectCollection::~IObjectCollection() {} -IMPLEMENT_SERVICE_INFO(OCollection,"com.sun.star.sdbcx.VContainer" , "com.sun.star.sdbcx.Container") +IMPLEMENT_SERVICE_INFO(OCollection,u"com.sun.star.sdbcx.VContainer"_ustr , u"com.sun.star.sdbcx.Container"_ustr) OCollection::OCollection(::cppu::OWeakObject& _rParent , bool _bCase diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx index ad9a52ed12ed..bae1f7140c8a 100644 --- a/connectivity/source/sdbcx/VColumn.cxx +++ b/connectivity/source/sdbcx/VColumn.cxx @@ -37,13 +37,13 @@ using namespace ::com::sun::star::sdbc; OUString SAL_CALL OColumn::getImplementationName( ) { if(isNew()) - return "com.sun.star.sdbcx.VColumnDescriptor"; - return "com.sun.star.sdbcx.VColumn"; + return u"com.sun.star.sdbcx.VColumnDescriptor"_ustr; + return u"com.sun.star.sdbcx.VColumn"_ustr; } css::uno::Sequence< OUString > SAL_CALL OColumn::getSupportedServiceNames( ) { - return { isNew()?OUString("com.sun.star.sdbcx.ColumnDescriptor"):OUString("com.sun.star.sdbcx.Column") }; + return { isNew()?u"com.sun.star.sdbcx.ColumnDescriptor"_ustr:u"com.sun.star.sdbcx.Column"_ustr }; } sal_Bool SAL_CALL OColumn::supportsService( const OUString& _rServiceName ) diff --git a/connectivity/source/sdbcx/VGroup.cxx b/connectivity/source/sdbcx/VGroup.cxx index 7a37ea3e523d..c2a789a90574 100644 --- a/connectivity/source/sdbcx/VGroup.cxx +++ b/connectivity/source/sdbcx/VGroup.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -IMPLEMENT_SERVICE_INFO(OGroup,"com.sun.star.sdbcx.VGroup","com.sun.star.sdbcx.Group"); +IMPLEMENT_SERVICE_INFO(OGroup,u"com.sun.star.sdbcx.VGroup"_ustr,u"com.sun.star.sdbcx.Group"_ustr); OGroup::OGroup(bool _bCase) : OGroup_BASE(m_aMutex) , ODescriptor(OGroup_BASE::rBHelper,_bCase) @@ -125,14 +125,14 @@ void SAL_CALL OGroup::grantPrivileges( const OUString& /*objName*/, sal_Int32 /* { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OGroup_BASE::rBHelper.bDisposed); - throwFeatureNotImplementedSQLException( "XAuthorizable::grantPrivileges", *this ); + throwFeatureNotImplementedSQLException( u"XAuthorizable::grantPrivileges"_ustr, *this ); } void SAL_CALL OGroup::revokePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OGroup_BASE::rBHelper.bDisposed); - throwFeatureNotImplementedSQLException( "XAuthorizable::revokePrivileges", *this ); + throwFeatureNotImplementedSQLException( u"XAuthorizable::revokePrivileges"_ustr, *this ); } css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OGroup::getPropertySetInfo( ) @@ -147,7 +147,7 @@ OUString SAL_CALL OGroup::getName( ) void SAL_CALL OGroup::setName( const OUString& /*aName*/ ) { - throwFeatureNotImplementedRuntimeException( "XNamed::setName", *this ); + throwFeatureNotImplementedRuntimeException( u"XNamed::setName"_ustr, *this ); } // XInterface diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx index 48e26ae1140e..b69c1414d9f7 100644 --- a/connectivity/source/sdbcx/VIndex.cxx +++ b/connectivity/source/sdbcx/VIndex.cxx @@ -41,13 +41,13 @@ using namespace ::com::sun::star::lang; OUString SAL_CALL OIndex::getImplementationName( ) { if(isNew()) - return "com.sun.star.sdbcx.VIndexDescriptor"; - return "com.sun.star.sdbcx.VIndex"; + return u"com.sun.star.sdbcx.VIndexDescriptor"_ustr; + return u"com.sun.star.sdbcx.VIndex"_ustr; } css::uno::Sequence< OUString > SAL_CALL OIndex::getSupportedServiceNames( ) { - return { isNew()?OUString("com.sun.star.sdbcx.IndexDescriptor"):OUString("com.sun.star.sdbcx.Index") }; + return { isNew()?u"com.sun.star.sdbcx.IndexDescriptor"_ustr:u"com.sun.star.sdbcx.Index"_ustr }; } sal_Bool SAL_CALL OIndex::supportsService( const OUString& _rServiceName ) diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx index edd1ea93e9a2..4f55fc864167 100644 --- a/connectivity/source/sdbcx/VIndexColumn.cxx +++ b/connectivity/source/sdbcx/VIndexColumn.cxx @@ -30,13 +30,13 @@ using namespace ::com::sun::star::uno; OUString SAL_CALL OIndexColumn::getImplementationName( ) { if(isNew()) - return "com.sun.star.sdbcx.VIndexColumnDescriptor"; - return "com.sun.star.sdbcx.VIndexColumn"; + return u"com.sun.star.sdbcx.VIndexColumnDescriptor"_ustr; + return u"com.sun.star.sdbcx.VIndexColumn"_ustr; } css::uno::Sequence< OUString > SAL_CALL OIndexColumn::getSupportedServiceNames( ) { - return { isNew()?OUString("com.sun.star.sdbcx.IndexColumnDescriptor"):OUString("com.sun.star.sdbcx.IndexColumn") }; + return { isNew()?u"com.sun.star.sdbcx.IndexColumnDescriptor"_ustr:u"com.sun.star.sdbcx.IndexColumn"_ustr }; } sal_Bool SAL_CALL OIndexColumn::supportsService( const OUString& _rServiceName ) diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx index 140bd6160709..0780d13fc944 100644 --- a/connectivity/source/sdbcx/VKey.cxx +++ b/connectivity/source/sdbcx/VKey.cxx @@ -38,13 +38,13 @@ using namespace ::com::sun::star::lang; OUString SAL_CALL OKey::getImplementationName( ) { if(isNew()) - return "com.sun.star.sdbcx.VKeyDescriptor"; - return "com.sun.star.sdbcx.VKey"; + return u"com.sun.star.sdbcx.VKeyDescriptor"_ustr; + return u"com.sun.star.sdbcx.VKey"_ustr; } css::uno::Sequence< OUString > SAL_CALL OKey::getSupportedServiceNames( ) { - return { isNew()?OUString("com.sun.star.sdbcx.KeyDescriptor"):OUString("com.sun.star.sdbcx.Key") }; + return { isNew()?u"com.sun.star.sdbcx.KeyDescriptor"_ustr:u"com.sun.star.sdbcx.Key"_ustr }; } sal_Bool SAL_CALL OKey::supportsService( const OUString& _rServiceName ) diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx index e22620fb599d..4bf85159d932 100644 --- a/connectivity/source/sdbcx/VKeyColumn.cxx +++ b/connectivity/source/sdbcx/VKeyColumn.cxx @@ -32,13 +32,13 @@ using namespace cppu; OUString SAL_CALL OKeyColumn::getImplementationName( ) { if(isNew()) - return "com.sun.star.sdbcx.VKeyColumnDescriptor"; - return "com.sun.star.sdbcx.VKeyColumn"; + return u"com.sun.star.sdbcx.VKeyColumnDescriptor"_ustr; + return u"com.sun.star.sdbcx.VKeyColumn"_ustr; } css::uno::Sequence< OUString > SAL_CALL OKeyColumn::getSupportedServiceNames( ) { - return { isNew()?OUString("com.sun.star.sdbcx.KeyColumnDescriptor"):OUString("com.sun.star.sdbcx.KeyColumn") }; + return { isNew()?u"com.sun.star.sdbcx.KeyColumnDescriptor"_ustr:u"com.sun.star.sdbcx.KeyColumn"_ustr }; } sal_Bool SAL_CALL OKeyColumn::supportsService( const OUString& _rServiceName ) diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index f569d01baef3..afa70c87b745 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -41,14 +41,14 @@ using namespace ::com::sun::star::lang; OUString SAL_CALL OTable::getImplementationName( ) { if(isNew()) - return "com.sun.star.sdbcx.VTableDescriptor"; - return "com.sun.star.sdbcx.Table"; + return u"com.sun.star.sdbcx.VTableDescriptor"_ustr; + return u"com.sun.star.sdbcx.Table"_ustr; } css::uno::Sequence< OUString > SAL_CALL OTable::getSupportedServiceNames( ) { - return { isNew()?OUString("com.sun.star.sdbcx.TableDescriptor"):OUString("com.sun.star.sdbcx.Table") }; + return { isNew()?u"com.sun.star.sdbcx.TableDescriptor"_ustr:u"com.sun.star.sdbcx.Table"_ustr }; } sal_Bool SAL_CALL OTable::supportsService( const OUString& _rServiceName ) @@ -264,12 +264,12 @@ Reference< XDatabaseMetaData> OTable::getMetaData() const // XAlterTable void SAL_CALL OTable::alterColumnByName( const OUString& /*colName*/, const Reference< XPropertySet >& /*descriptor*/ ) { - throwFeatureNotImplementedSQLException( "XAlterTable::alterColumnByName", *this ); + throwFeatureNotImplementedSQLException( u"XAlterTable::alterColumnByName"_ustr, *this ); } void SAL_CALL OTable::alterColumnByIndex( sal_Int32 /*index*/, const Reference< XPropertySet >& /*descriptor*/ ) { - throwFeatureNotImplementedSQLException( "XAlterTable::alterColumnByIndex", *this ); + throwFeatureNotImplementedSQLException( u"XAlterTable::alterColumnByIndex"_ustr, *this ); } css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OTable::getPropertySetInfo( ) diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx index 2aabd67576d9..0e897260e032 100644 --- a/connectivity/source/sdbcx/VUser.cxx +++ b/connectivity/source/sdbcx/VUser.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -IMPLEMENT_SERVICE_INFO(OUser,"com.sun.star.sdbcx.VUser","com.sun.star.sdbcx.User"); +IMPLEMENT_SERVICE_INFO(OUser,u"com.sun.star.sdbcx.VUser"_ustr,u"com.sun.star.sdbcx.User"_ustr); OUser::OUser(bool _bCase) : OUser_BASE(m_aMutex) , ODescriptor(OUser_BASE::rBHelper,_bCase,true) @@ -86,7 +86,7 @@ void SAL_CALL OUser::changePassword( const OUString& /*objPassword*/, const OUSt { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XUser::changePassword", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XUser::changePassword"_ustr, *this ); } // XGroupsSupplier @@ -117,28 +117,28 @@ sal_Int32 SAL_CALL OUser::getPrivileges( const OUString& /*objName*/, sal_Int32 { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XAuthorizable::changePassword", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XAuthorizable::changePassword"_ustr, *this ); } sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XAuthorizable::getGrantablePrivileges", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XAuthorizable::getGrantablePrivileges"_ustr, *this ); } void SAL_CALL OUser::grantPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XAuthorizable::grantPrivileges", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XAuthorizable::grantPrivileges"_ustr, *this ); } void SAL_CALL OUser::revokePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); - ::dbtools::throwFeatureNotImplementedSQLException( "XAuthorizable::revokePrivileges", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XAuthorizable::revokePrivileges"_ustr, *this ); } css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OUser::getPropertySetInfo( ) diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index 41828b5758cb..cd634cc68db8 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -IMPLEMENT_SERVICE_INFO(OView,"com.sun.star.sdbcx.VView","com.sun.star.sdbcx.View"); +IMPLEMENT_SERVICE_INFO(OView,u"com.sun.star.sdbcx.VView"_ustr,u"com.sun.star.sdbcx.View"_ustr); OView::OView(bool _bCase, const OUString& Name, -- cgit