configmgr/qa/unit/test.cxx | 122 ++--- configmgr/source/access.cxx | 78 +-- configmgr/source/childaccess.cxx | 6 configmgr/source/components.cxx | 26 - configmgr/source/configurationprovider.cxx | 24 - configmgr/source/configurationregistry.cxx | 65 +-- configmgr/source/defaultprovider.cxx | 4 configmgr/source/localizedvaluenode.cxx | 2 configmgr/source/node.cxx | 2 configmgr/source/readonlyaccess.cxx | 12 configmgr/source/readwriteaccess.cxx | 12 configmgr/source/rootaccess.cxx | 8 configmgr/source/type.cxx | 4 configmgr/source/update.cxx | 4 configmgr/source/valueparser.cxx | 8 configmgr/source/writemodfile.cxx | 2 configmgr/source/xcsparser.cxx | 6 configmgr/source/xmldata.cxx | 2 connectivity/qa/connectivity/commontools/FValue_test.cxx | 12 connectivity/qa/connectivity/resource/sharedresources_test.cxx | 22 - connectivity/source/commontools/BlobHelper.cxx | 4 connectivity/source/commontools/CommonTools.cxx | 2 connectivity/source/commontools/ConnectionWrapper.cxx | 4 connectivity/source/commontools/DateConversion.cxx | 6 connectivity/source/commontools/DriversConfig.cxx | 8 connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx | 22 - connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx | 214 +++++----- connectivity/source/commontools/ParameterSubstitution.cxx | 6 connectivity/source/commontools/TDatabaseMetaDataBase.cxx | 2 connectivity/source/commontools/TIndexes.cxx | 2 connectivity/source/commontools/TKeys.cxx | 2 connectivity/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 - connectivity/source/commontools/formattedcolumnvalue.cxx | 4 connectivity/source/commontools/parameters.cxx | 6 connectivity/source/commontools/paramwrapper.cxx | 8 connectivity/source/commontools/predicateinput.cxx | 8 connectivity/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 connectivity/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 connectivity/source/drivers/component/CDatabaseMetaData.cxx | 16 connectivity/source/drivers/component/CPreparedStatement.cxx | 2 connectivity/source/drivers/component/CResultSet.cxx | 6 connectivity/source/drivers/component/CStatement.cxx | 4 connectivity/source/drivers/dbase/DCatalog.cxx | 2 connectivity/source/drivers/dbase/DConnection.cxx | 4 connectivity/source/drivers/dbase/DDatabaseMetaData.cxx | 50 +- connectivity/source/drivers/dbase/DDriver.cxx | 20 connectivity/source/drivers/dbase/DIndex.cxx | 2 connectivity/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 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 20 connectivity/source/drivers/evoab2/NDriver.cxx | 2 connectivity/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 connectivity/source/drivers/file/FDatabaseMetaData.cxx | 14 connectivity/source/drivers/file/FDriver.cxx | 38 - connectivity/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 connectivity/source/drivers/firebird/Connection.cxx | 14 connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 96 ++-- connectivity/source/drivers/firebird/Driver.cxx | 6 connectivity/source/drivers/firebird/PreparedStatement.cxx | 14 connectivity/source/drivers/firebird/ResultSet.cxx | 30 - connectivity/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 connectivity/source/drivers/flat/EDatabaseMetaData.cxx | 24 - connectivity/source/drivers/flat/EDriver.cxx | 32 - connectivity/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 connectivity/source/drivers/jdbc/CallableStatement.cxx | 2 connectivity/source/drivers/jdbc/Clob.cxx | 2 connectivity/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 connectivity/source/drivers/jdbc/PreparedStatement.cxx | 10 connectivity/source/drivers/jdbc/ResultSet.cxx | 6 connectivity/source/drivers/jdbc/tools.cxx | 2 connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx | 4 connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx | 2 connectivity/source/drivers/mysql_jdbc/YCatalog.cxx | 9 connectivity/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 connectivity/source/drivers/mysqlc/mysqlc_catalog.cxx | 6 connectivity/source/drivers/mysqlc/mysqlc_column.cxx | 2 connectivity/source/drivers/mysqlc/mysqlc_connection.cxx | 12 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx | 140 +++--- connectivity/source/drivers/mysqlc/mysqlc_driver.cxx | 8 connectivity/source/drivers/mysqlc/mysqlc_general.cxx | 89 ++-- connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx | 31 - connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx | 6 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx | 25 - connectivity/source/drivers/mysqlc/mysqlc_statement.cxx | 33 - connectivity/source/drivers/mysqlc/mysqlc_table.cxx | 33 - connectivity/source/drivers/mysqlc/mysqlc_tables.cxx | 6 connectivity/source/drivers/mysqlc/mysqlc_user.cxx | 2 connectivity/source/drivers/mysqlc/mysqlc_users.cxx | 4 connectivity/source/drivers/mysqlc/mysqlc_views.cxx | 2 connectivity/source/drivers/odbc/OConnection.cxx | 8 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx | 14 connectivity/source/drivers/odbc/ODriver.cxx | 54 +- connectivity/source/drivers/odbc/OFunctions.cxx | 108 ++--- connectivity/source/drivers/odbc/OPreparedStatement.cxx | 12 connectivity/source/drivers/odbc/OResultSet.cxx | 24 - connectivity/source/drivers/odbc/OStatement.cxx | 2 connectivity/source/drivers/postgresql/pq_array.cxx | 2 connectivity/source/drivers/postgresql/pq_baseresultset.cxx | 14 connectivity/source/drivers/postgresql/pq_connection.cxx | 12 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx | 156 +++---- connectivity/source/drivers/postgresql/pq_driver.cxx | 6 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx | 32 - connectivity/source/drivers/postgresql/pq_resultset.cxx | 4 connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx | 4 connectivity/source/drivers/postgresql/pq_statement.cxx | 24 - connectivity/source/drivers/postgresql/pq_statics.cxx | 64 +- connectivity/source/drivers/postgresql/pq_tools.cxx | 14 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx | 8 connectivity/source/drivers/postgresql/pq_xbase.cxx | 2 connectivity/source/drivers/postgresql/pq_xcolumns.cxx | 6 connectivity/source/drivers/postgresql/pq_xcontainer.cxx | 2 connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx | 8 connectivity/source/drivers/postgresql/pq_xindexes.cxx | 4 connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx | 8 connectivity/source/drivers/postgresql/pq_xkeys.cxx | 4 connectivity/source/drivers/postgresql/pq_xuser.cxx | 4 connectivity/source/drivers/postgresql/pq_xusers.cxx | 2 connectivity/source/drivers/postgresql/pq_xviews.cxx | 4 connectivity/source/drivers/writer/WCatalog.cxx | 3 connectivity/source/drivers/writer/WConnection.cxx | 8 connectivity/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 199 files changed, 1535 insertions(+), 1520 deletions(-)
New commits: commit 4d97239b7a92c8dc1c1ee9a6474768ed1e744ef5 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon May 6 18:31:04 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 7 08:46:13 2024 +0200 loplugin:ostr in connectivity Change-Id: Ice633719b05240ab5a052b62ca4eafe89f97e12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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<jvmaccess::VirtualMachine *>( static_cast<sal_IntPtr>(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<XColumnUpdate>& 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<XColumn>& 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<OUString>{ "com.sun.star.sdbc.ResultSet" }; + return Sequence<OUString>{ 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<XMultiServiceFactory> 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<XInitialization> 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<XWindow>()) )) }; + Sequence< Any > aArgs{ Any(NamedValue( u"ParentWindow"_ustr, Any(Reference<XWindow>()) )) }; 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<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _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<XInterface>& _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 // <detail_column> = :<new_param_name> { 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<OUString> aVector; Sequence<OUString> aTypes; OCalcConnection::ODocHolder aDocHolder(static_cast<OCalcConnection*>(m_pConnection)); - Reference<XResultSet> xResult = m_xMetaData->getTables(Any(), "%", "%", aTypes); + Reference<XResultSet> 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<XSpreadsheets>& 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<XDatabaseRanges>& 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<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Any aRangesAny = xDocProp->getPropertyValue("DatabaseRanges"); + Any aRangesAny = xDocProp->getPropertyValue(u"DatabaseRanges"_ustr); Reference<XDatabaseRanges> 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>& xCell Reference<XPropertySet> 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<XSpreadsheet>& xSheet, const Refe { sal_Int32 nKey = 0; - if ( xProp->getPropertyValue( "NumberFormat" ) >>= nKey ) + if ( xProp->getPropertyValue( u"NumberFormat"_ustr ) >>= nKey ) { const Reference<XPropertySet> xFormat = xFormats->getByKey( nKey ); if ( xFormat.is() ) @@ -532,7 +532,7 @@ void OCalcTable::construct() Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Reference<XDatabaseRanges> xRanges(xDocProp->getPropertyValue("DatabaseRanges"),UNO_QUERY); + Reference<XDatabaseRanges> 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<XPropertySet> xFiltProp( xDBRange->getFilterDescriptor(), UNO_QUERY ); if ( xFiltProp.is() ) - xFiltProp->getPropertyValue("ContainsHeader") >>= bRangeHeader; + xFiltProp->getPropertyValue(u"ContainsHeader"_ustr) >>= bRangeHeader; Reference<XSheetCellRange> xSheetRange( xRefer->getReferredCells(), UNO_QUERY ); Reference<XCellRangeAddressable> 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<OCalcTable> pTable = new OCalcTable(this, static_cast<OCalcConnection*>(static_cast<OFileCatalog&>(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<OResultSet> 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<OResultSet> 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<OUString> aVector; Sequence<OUString> aTypes; - Reference<XResultSet> xResult = m_xMetaData->getTables(Any(), "%", "%", aTypes); + Reference<XResultSet> 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(); -e ... etc. - the rest is truncated