cppcanvas/qa/extras/emfplus/emfplus.cxx | 2 cppcanvas/source/mtfrenderer/implrenderer.cxx | 2 cppcanvas/source/mtfrenderer/mtftools.cxx | 2 dbaccess/qa/extras/dialog-save.cxx | 8 dbaccess/qa/extras/empty-stdlib-save.cxx | 12 dbaccess/qa/extras/hsql_schema_import.cxx | 6 dbaccess/qa/extras/macros-test.cxx | 2 dbaccess/qa/extras/nolib-save.cxx | 8 dbaccess/qa/extras/rowsetclones.cxx | 12 dbaccess/qa/unit/dbtest_base.cxx | 4 dbaccess/qa/unit/embeddeddb_performancetest.cxx | 22 - dbaccess/qa/unit/firebird.cxx | 22 - dbaccess/qa/unit/hsql_binary_import.cxx | 14 - dbaccess/qa/unit/tdf119625.cxx | 6 dbaccess/qa/unit/tdf126268.cxx | 9 dbaccess/source/core/api/CacheSet.cxx | 4 dbaccess/source/core/api/FilteredContainer.cxx | 4 dbaccess/source/core/api/KeySet.cxx | 10 dbaccess/source/core/api/RowSet.cxx | 28 +- dbaccess/source/core/api/RowSetBase.cxx | 6 dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 14 - dbaccess/source/core/api/TableDeco.cxx | 4 dbaccess/source/core/api/View.cxx | 2 dbaccess/source/core/api/callablestatement.cxx | 2 dbaccess/source/core/api/column.cxx | 4 dbaccess/source/core/api/datacolumn.cxx | 2 dbaccess/source/core/api/definitioncolumn.cxx | 10 dbaccess/source/core/api/preparedstatement.cxx | 2 dbaccess/source/core/api/query.cxx | 6 dbaccess/source/core/api/querycomposer.cxx | 2 dbaccess/source/core/api/querycontainer.cxx | 4 dbaccess/source/core/api/querydescriptor.cxx | 2 dbaccess/source/core/api/resultcolumn.cxx | 2 dbaccess/source/core/api/resultset.cxx | 6 dbaccess/source/core/api/statement.cxx | 2 dbaccess/source/core/api/table.cxx | 2 dbaccess/source/core/api/tablecontainer.cxx | 4 dbaccess/source/core/api/viewcontainer.cxx | 4 dbaccess/source/core/dataaccess/ComponentDefinition.cxx | 8 dbaccess/source/core/dataaccess/ContentHelper.cxx | 18 - dbaccess/source/core/dataaccess/ModelImpl.cxx | 40 +-- dbaccess/source/core/dataaccess/SharedConnection.hxx | 10 dbaccess/source/core/dataaccess/bookmarkcontainer.cxx | 4 dbaccess/source/core/dataaccess/commandcontainer.cxx | 2 dbaccess/source/core/dataaccess/commanddefinition.cxx | 8 dbaccess/source/core/dataaccess/connection.cxx | 4 dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx | 8 dbaccess/source/core/dataaccess/databasecontext.cxx | 16 - dbaccess/source/core/dataaccess/databasedocument.cxx | 112 ++++---- dbaccess/source/core/dataaccess/datasource.cxx | 20 - dbaccess/source/core/dataaccess/definitioncontainer.cxx | 4 dbaccess/source/core/dataaccess/documentcontainer.cxx | 16 - dbaccess/source/core/dataaccess/documentdefinition.cxx | 78 +++--- dbaccess/source/core/dataaccess/documenteventexecutor.cxx | 4 dbaccess/source/core/dataaccess/documentevents.cxx | 8 dbaccess/source/core/dataaccess/intercept.cxx | 18 - dbaccess/source/core/inc/ModelImpl.hxx | 2 dbaccess/source/core/misc/DatabaseDataProvider.cxx | 28 +- dbaccess/source/core/misc/dsntypes.cxx | 66 ++--- dbaccess/source/core/misc/migrwarndlg.cxx | 5 dbaccess/source/core/misc/sdbcoretools.cxx | 2 dbaccess/source/core/recovery/dbdocrecovery.cxx | 4 dbaccess/source/core/recovery/settingsimport.cxx | 4 dbaccess/source/core/recovery/storagetextstream.cxx | 2 dbaccess/source/core/recovery/subcomponentrecovery.cxx | 36 +- dbaccess/source/filter/hsqldb/fbcreateparser.cxx | 34 +- dbaccess/source/filter/hsqldb/parseschema.cxx | 2 dbaccess/source/filter/xml/dbloader2.cxx | 50 +-- dbaccess/source/filter/xml/xmlDataSourceInfo.cxx | 6 dbaccess/source/filter/xml/xmlDocuments.cxx | 2 dbaccess/source/filter/xml/xmlExport.cxx | 24 - dbaccess/source/filter/xml/xmlQuery.cxx | 2 dbaccess/source/filter/xml/xmlfilter.cxx | 14 - dbaccess/source/sdbtools/connection/connectiontools.cxx | 6 dbaccess/source/sdbtools/connection/objectnames.cxx | 2 dbaccess/source/ui/app/AppController.cxx | 180 +++++++------- dbaccess/source/ui/app/AppControllerGen.cxx | 12 dbaccess/source/ui/app/AppDetailPageHelper.cxx | 40 +-- dbaccess/source/ui/app/AppDetailView.cxx | 20 - dbaccess/source/ui/app/AppSwapWindow.cxx | 7 dbaccess/source/ui/app/AppTitleWindow.cxx | 10 dbaccess/source/ui/app/AppView.cxx | 6 dbaccess/source/ui/app/DocumentInfoPreview.cxx | 2 dbaccess/source/ui/app/subcomponentmanager.cxx | 2 dbaccess/source/ui/browser/brwctrlr.cxx | 84 +++--- dbaccess/source/ui/browser/dataview.cxx | 2 dbaccess/source/ui/browser/dbloader.cxx | 20 - dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 30 +- dbaccess/source/ui/browser/exsrcbrw.cxx | 4 dbaccess/source/ui/browser/formadapter.cxx | 4 dbaccess/source/ui/browser/genericcontroller.cxx | 26 +- dbaccess/source/ui/browser/sbagrid.cxx | 38 +- dbaccess/source/ui/browser/unodatbr.cxx | 48 +-- dbaccess/source/ui/control/ColumnControlWindow.cxx | 2 dbaccess/source/ui/control/FieldDescControl.cxx | 68 ++--- dbaccess/source/ui/control/RelationControl.cxx | 6 dbaccess/source/ui/control/dbtreelistbox.cxx | 20 - dbaccess/source/ui/control/opendoccontrols.cxx | 6 dbaccess/source/ui/control/sqledit.cxx | 26 +- dbaccess/source/ui/control/tabletree.cxx | 4 dbaccess/source/ui/dlg/CollectionView.cxx | 20 - dbaccess/source/ui/dlg/ConnectionHelper.cxx | 18 - dbaccess/source/ui/dlg/ConnectionPage.cxx | 20 - dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 4 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 116 ++++----- dbaccess/source/ui/dlg/DbAdminImpl.cxx | 28 +- dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx | 8 dbaccess/source/ui/dlg/RelationDlg.cxx | 20 - dbaccess/source/ui/dlg/TablesSingleDlg.cxx | 2 dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 42 +-- dbaccess/source/ui/dlg/UserAdmin.cxx | 32 +- dbaccess/source/ui/dlg/UserAdminDlg.cxx | 6 dbaccess/source/ui/dlg/admincontrols.cxx | 28 +- dbaccess/source/ui/dlg/adtabdlg.cxx | 18 - dbaccess/source/ui/dlg/advancedsettings.cxx | 62 ++-- dbaccess/source/ui/dlg/dbadmin.cxx | 28 +- dbaccess/source/ui/dlg/dbfindex.cxx | 22 - dbaccess/source/ui/dlg/dbwizsetup.cxx | 14 - dbaccess/source/ui/dlg/detailpages.cxx | 80 +++--- dbaccess/source/ui/dlg/directsql.cxx | 20 - dbaccess/source/ui/dlg/dlgattr.cxx | 8 dbaccess/source/ui/dlg/dlgsave.cxx | 36 +- dbaccess/source/ui/dlg/dlgsize.cxx | 10 dbaccess/source/ui/dlg/dsselect.cxx | 4 dbaccess/source/ui/dlg/generalpage.cxx | 34 +- dbaccess/source/ui/dlg/indexdialog.cxx | 38 +- dbaccess/source/ui/dlg/paramdialog.cxx | 12 dbaccess/source/ui/dlg/queryfilter.cxx | 24 - dbaccess/source/ui/dlg/queryorder.cxx | 14 - dbaccess/source/ui/dlg/sqlmessage.cxx | 10 dbaccess/source/ui/dlg/tablespage.cxx | 10 dbaccess/source/ui/dlg/textconnectionsettings.cxx | 6 dbaccess/source/ui/misc/DExport.cxx | 2 dbaccess/source/ui/misc/RowSetDrop.cxx | 2 dbaccess/source/ui/misc/TableCopyHelper.cxx | 6 dbaccess/source/ui/misc/TokenWriter.cxx | 2 dbaccess/source/ui/misc/UITools.cxx | 8 dbaccess/source/ui/misc/WCPage.cxx | 22 - dbaccess/source/ui/misc/WColumnSelect.cxx | 14 - dbaccess/source/ui/misc/WCopyTable.cxx | 8 dbaccess/source/ui/misc/WNameMatch.cxx | 22 - dbaccess/source/ui/misc/WTypeSelect.cxx | 22 - dbaccess/source/ui/misc/controllerframe.cxx | 2 dbaccess/source/ui/misc/databaseobjectview.cxx | 8 dbaccess/source/ui/misc/datasourceconnector.cxx | 2 dbaccess/source/ui/misc/dsmeta.cxx | 46 +-- dbaccess/source/ui/misc/indexcollection.cxx | 12 dbaccess/source/ui/misc/linkeddocuments.cxx | 34 +- dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx | 4 dbaccess/source/ui/querydesign/JAccess.cxx | 2 dbaccess/source/ui/querydesign/JoinController.cxx | 50 +-- dbaccess/source/ui/querydesign/JoinTableView.cxx | 4 dbaccess/source/ui/querydesign/QueryDesignView.cxx | 8 dbaccess/source/ui/querydesign/QueryTextView.cxx | 6 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 24 - dbaccess/source/ui/querydesign/TableFieldDescription.cxx | 54 ++-- dbaccess/source/ui/querydesign/TableWindow.cxx | 6 dbaccess/source/ui/querydesign/TableWindowAccess.cxx | 6 dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 4 dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 6 dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 10 dbaccess/source/ui/querydesign/querycontainerwindow.cxx | 2 dbaccess/source/ui/querydesign/querycontroller.cxx | 80 +++--- dbaccess/source/ui/querydesign/querydlg.cxx | 12 dbaccess/source/ui/relationdesign/RelationController.cxx | 10 dbaccess/source/ui/tabledesign/TEditControl.cxx | 28 +- dbaccess/source/ui/tabledesign/TableController.cxx | 36 +- dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 8 dbaccess/source/ui/tabledesign/TableDesignView.cxx | 8 dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 8 dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx | 4 dbaccess/source/ui/uno/ColumnControl.cxx | 4 dbaccess/source/ui/uno/ColumnModel.cxx | 4 dbaccess/source/ui/uno/ColumnPeer.cxx | 2 dbaccess/source/ui/uno/DBTypeWizDlg.cxx | 4 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx | 8 dbaccess/source/ui/uno/TableFilterDlg.cxx | 4 dbaccess/source/ui/uno/UserSettingsDlg.cxx | 4 dbaccess/source/ui/uno/admindlg.cxx | 4 dbaccess/source/ui/uno/composerdialogs.cxx | 20 - dbaccess/source/ui/uno/copytablewizard.cxx | 28 +- dbaccess/source/ui/uno/dbinteraction.cxx | 10 dbaccess/source/ui/uno/textconnectionsettings_uno.cxx | 16 - dbaccess/source/ui/uno/unoDirectSql.cxx | 2 dbaccess/source/ui/uno/unosqlmessage.cxx | 4 185 files changed, 1548 insertions(+), 1545 deletions(-)
New commits: commit d52a4dba6a247a0ee2e1c419533818fbfd281f71 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 7 08:51:22 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 7 12:53:22 2024 +0200 loplugin:ostr in dbaccess Change-Id: I6d720ef94d9f29c120f292b844721621e6630856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167259 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx index 04c12b1c5e8b..14d639dbf027 100644 --- a/dbaccess/qa/extras/dialog-save.cxx +++ b/dbaccess/qa/extras/dialog-save.cxx @@ -39,7 +39,7 @@ public: DialogSaveTest::DialogSaveTest() - : UnoApiTest("/dbaccess/qa/extras/testdocuments") + : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr) { } @@ -79,10 +79,10 @@ void DialogSaveTest::test() } { uno::Sequence<uno::Any> args{ uno::Any(aFileName) }; - Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW); - Reference< beans::XPropertySet > xPS(xHNA->getByHierarchicalName("Dialogs/Standard/Dialog1.xml"), UNO_QUERY_THROW); + Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments(u"com.sun.star.packages.Package"_ustr, args), UNO_QUERY_THROW); + Reference< beans::XPropertySet > xPS(xHNA->getByHierarchicalName(u"Dialogs/Standard/Dialog1.xml"_ustr), UNO_QUERY_THROW); sal_Int64 nSize = 0; - CPPUNIT_ASSERT(xPS->getPropertyValue("Size") >>= nSize); + CPPUNIT_ASSERT(xPS->getPropertyValue(u"Size"_ustr) >>= nSize); CPPUNIT_ASSERT(nSize != 0); } } diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx index 5c3b5d028d8c..1e36f3f25861 100644 --- a/dbaccess/qa/extras/empty-stdlib-save.cxx +++ b/dbaccess/qa/extras/empty-stdlib-save.cxx @@ -37,7 +37,7 @@ public: DialogSaveTest::DialogSaveTest() - : UnoApiTest("/dbaccess/qa/extras/testdocuments") + : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr) { } @@ -66,12 +66,12 @@ void DialogSaveTest::test() a = xBasLib->getByName(sStandard); a >>= xI; CPPUNIT_ASSERT(xI.is()); - xI->removeByName("Raralix"); + xI->removeByName(u"Raralix"_ustr); a = xDlgLib->getByName(sStandard); a >>= xI; CPPUNIT_ASSERT(xI.is()); - xI->removeByName("Dialog1"); + xI->removeByName(u"Dialog1"_ustr); // uno::Reference< util::XModifiable > xDlgMod(xDlgLib, UNO_QUERY_THROW); // xDlgMod->setModified(sal_True); @@ -93,9 +93,9 @@ void DialogSaveTest::test() } { uno::Sequence<uno::Any> args{ uno::Any(aFileName) }; - Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW); - CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard")); - CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard")); + Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments(u"com.sun.star.packages.Package"_ustr, args), UNO_QUERY_THROW); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Basic/Standard"_ustr)); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Dialogs/Standard"_ustr)); } } diff --git a/dbaccess/qa/extras/hsql_schema_import.cxx b/dbaccess/qa/extras/hsql_schema_import.cxx index f5f34d38b69a..e8f7cfa26f3a 100644 --- a/dbaccess/qa/extras/hsql_schema_import.cxx +++ b/dbaccess/qa/extras/hsql_schema_import.cxx @@ -64,11 +64,11 @@ void HsqlSchemaImportTest::testIntegerPrimaryKeyNotNull() FbCreateStmtParser aCreateParser; aCreateParser.parse(u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY)"); - CPPUNIT_ASSERT_EQUAL(OUString{ "\"myTable\"" }, aCreateParser.getTableName()); + CPPUNIT_ASSERT_EQUAL(u"\"myTable\""_ustr, aCreateParser.getTableName()); const auto& columns = aCreateParser.getColumnDef(); CPPUNIT_ASSERT_EQUAL(1_z, columns.size()); const auto& column = columns.at(0); - CPPUNIT_ASSERT_EQUAL(OUString{ "\"id\"" }, column.getName()); + CPPUNIT_ASSERT_EQUAL(u"\"id\""_ustr, column.getName()); CPPUNIT_ASSERT_EQUAL(css::sdbc::DataType::INTEGER, column.getDataType()); CPPUNIT_ASSERT(column.isPrimaryKey()); CPPUNIT_ASSERT(!column.isNullable()); @@ -186,7 +186,7 @@ void HsqlSchemaImportTest::testDefaultValueNow() const ColumnDefinition* colTimeStamp = lcl_findByType(columns, css::sdbc::DataType::TIMESTAMP); CPPUNIT_ASSERT(colTimeStamp != nullptr); - CPPUNIT_ASSERT_EQUAL(OUString{ "NOW" }, colTimeStamp->getDefault()); // parsed NOW + CPPUNIT_ASSERT_EQUAL(u"NOW"_ustr, colTimeStamp->getDefault()); // parsed NOW OUString fbSql = aCreateParser.compose(); CPPUNIT_ASSERT(fbSql.indexOf("\'NOW\'") > 0); // composed 'NOW' } diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx index c2f75fa3c8f6..9b11863ef3da 100644 --- a/dbaccess/qa/extras/macros-test.cxx +++ b/dbaccess/qa/extras/macros-test.cxx @@ -27,7 +27,7 @@ public: }; DBAccessTest::DBAccessTest() - : UnoApiTest("/dbaccess/qa/extras/testdocuments") + : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr) { } diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx index 614c4f03794a..5a12fcf99c49 100644 --- a/dbaccess/qa/extras/nolib-save.cxx +++ b/dbaccess/qa/extras/nolib-save.cxx @@ -37,7 +37,7 @@ public: DialogSaveTest::DialogSaveTest() - : UnoApiTest("/dbaccess/qa/extras/testdocuments") + : UnoApiTest(u"/dbaccess/qa/extras/testdocuments"_ustr) { } @@ -83,9 +83,9 @@ void DialogSaveTest::test() } { uno::Sequence<uno::Any> args{ uno::Any(aFileName) }; - Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW); - CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard")); - CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard")); + Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments(u"com.sun.star.packages.Package"_ustr, args), UNO_QUERY_THROW); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Basic/Standard"_ustr)); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName(u"Dialogs/Standard"_ustr)); } } diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx index 88afad9eab9e..db6a30710731 100644 --- a/dbaccess/qa/extras/rowsetclones.cxx +++ b/dbaccess/qa/extras/rowsetclones.cxx @@ -40,7 +40,7 @@ public: RowSetClones::RowSetClones() - : UnoApiTest("") + : UnoApiTest(u""_ustr) { } @@ -54,16 +54,16 @@ void RowSetClones::test() uno::Reference< XDataSource > xDataSource = xDocument->getDataSource(); CPPUNIT_ASSERT(xDataSource.is()); - uno::Reference< XConnection > xConnection = xDataSource->getConnection("",""); + uno::Reference< XConnection > xConnection = xDataSource->getConnection(u""_ustr,u""_ustr); CPPUNIT_ASSERT(xConnection.is()); - uno::Reference< XRowSet > xRowSet (getMultiServiceFactory()->createInstance("com.sun.star.sdb.RowSet" ), UNO_QUERY); + uno::Reference< XRowSet > xRowSet (getMultiServiceFactory()->createInstance(u"com.sun.star.sdb.RowSet"_ustr ), UNO_QUERY); CPPUNIT_ASSERT(xRowSet.is()); uno::Reference< XPropertySet > rowSetProperties ( xRowSet, UNO_QUERY ); CPPUNIT_ASSERT(rowSetProperties.is()); - rowSetProperties->setPropertyValue("Command", Any(OUString("SELECT * FROM Assets ORDER BY AssetID"))); - rowSetProperties->setPropertyValue("CommandType", Any(CommandType::COMMAND)); - rowSetProperties->setPropertyValue("ActiveConnection", Any(xConnection)); + rowSetProperties->setPropertyValue(u"Command"_ustr, Any(u"SELECT * FROM Assets ORDER BY AssetID"_ustr)); + rowSetProperties->setPropertyValue(u"CommandType"_ustr, Any(CommandType::COMMAND)); + rowSetProperties->setPropertyValue(u"ActiveConnection"_ustr, Any(xConnection)); xRowSet->execute(); uno::Reference< XResultSet > xResultSet = xRowSet; diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx index 88da4b469742..5ec6950efe03 100644 --- a/dbaccess/qa/unit/dbtest_base.cxx +++ b/dbaccess/qa/unit/dbtest_base.cxx @@ -28,7 +28,7 @@ class DBTestBase : public UnoApiTest { public: - DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {}; + DBTestBase() : UnoApiTest(u"dbaccess/qa/unit/data"_ustr) {}; uno::Reference<XOfficeDatabaseDocument> getDocumentForUrl(OUString const & url); @@ -49,7 +49,7 @@ uno::Reference< XConnection > DBTestBase::getConnectionForDocument( uno::Reference< XDataSource > xDataSource = xDocument->getDataSource(); CPPUNIT_ASSERT(xDataSource.is()); - uno::Reference< XConnection > xConnection = xDataSource->getConnection("",""); + uno::Reference< XConnection > xConnection = xDataSource->getConnection(u""_ustr,u""_ustr); CPPUNIT_ASSERT(xConnection.is()); return xConnection; diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx index 184ef0831ad1..857a3c55475c 100644 --- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx +++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx @@ -172,17 +172,17 @@ void EmbeddedDBPerformanceTest::testFirebird() { m_aOutputBuffer.append("Standard Insert "); - doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", false); + doPerformanceTestOnODB(u"sdbc:embedded:firebird"_ustr, u"Firebird", false); m_aOutputBuffer.append("PreparedStatement Insert "); - doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", true); + doPerformanceTestOnODB(u"sdbc:embedded:firebird"_ustr, u"Firebird", true); } void EmbeddedDBPerformanceTest::testHSQLDB() { m_aOutputBuffer.append("Standard Insert "); - doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", false); + doPerformanceTestOnODB(u"sdbc:embedded:hsqldb"_ustr, u"HSQLDB", false); m_aOutputBuffer.append("PreparedStatement Insert "); - doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", true); + doPerformanceTestOnODB(u"sdbc:embedded:hsqldb"_ustr, u"HSQLDB", true); } /** @@ -199,13 +199,13 @@ void EmbeddedDBPerformanceTest::doPerformanceTestOnODB( { uno::Reference< XOfficeDatabaseDocument > xDocument( - m_xSFactory->createInstance("com.sun.star.sdb.OfficeDatabaseDocument"), + m_xSFactory->createInstance(u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr), UNO_QUERY_THROW); uno::Reference< XStorable > xStorable(xDocument, UNO_QUERY_THROW); uno::Reference< XDataSource > xDataSource = xDocument->getDataSource(); uno::Reference< XPropertySet > xPropertySet(xDataSource, UNO_QUERY_THROW); - xPropertySet->setPropertyValue("URL", Any(rDriverURL)); + xPropertySet->setPropertyValue(u"URL"_ustr, Any(rDriverURL)); xStorable->storeAsURL(aFile.GetURL(), uno::Sequence< beans::PropertyValue >()); } @@ -234,9 +234,9 @@ void EmbeddedDBPerformanceTest::setupTestTable( // Although not strictly necessary we use quoted identifiers to reflect // the fact that Base always uses quoted identifiers. xStatement->execute( - "CREATE TABLE \"PFTESTTABLE\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY " + u"CREATE TABLE \"PFTESTTABLE\" ( \"ID\" INTEGER NOT NULL PRIMARY KEY " ", \"STRINGCOLUMNA\" VARCHAR (50) " - ")"); + ")"_ustr); xConnection->commit(); } @@ -247,9 +247,9 @@ void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest( { uno::Reference< XPreparedStatement > xPreparedStatement = xConnection->prepareStatement( - "INSERT INTO \"PFTESTTABLE\" ( \"ID\", " + u"INSERT INTO \"PFTESTTABLE\" ( \"ID\", " "\"STRINGCOLUMNA\" " - ") VALUES ( ?, ? )" + ") VALUES ( ?, ? )"_ustr ); uno::Reference< XParameters > xParameters(xPreparedStatement, UNO_QUERY_THROW); @@ -330,7 +330,7 @@ void EmbeddedDBPerformanceTest::performReadTest( TimeValue aStart, aMiddle, aEnd; osl_getSystemTime(&aStart); - uno::Reference< XResultSet > xResults = xStatement->executeQuery("SELECT * FROM PFTESTTABLE"); + uno::Reference< XResultSet > xResults = xStatement->executeQuery(u"SELECT * FROM PFTESTTABLE"_ustr); osl_getSystemTime(&aMiddle); diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx index 1b6b7172fdbd..089f152ee2d5 100644 --- a/dbaccess/qa/unit/firebird.cxx +++ b/dbaccess/qa/unit/firebird.cxx @@ -69,7 +69,7 @@ void FirebirdTest::testIntegerDatabase() CPPUNIT_ASSERT(xStatement.is()); uno::Reference< XResultSet > xResultSet = xStatement->executeQuery( - "SELECT * FROM TESTTABLE"); + u"SELECT * FROM TESTTABLE"_ustr); CPPUNIT_ASSERT(xResultSet.is()); CPPUNIT_ASSERT(xResultSet->next()); @@ -79,15 +79,15 @@ void FirebirdTest::testIntegerDatabase() CPPUNIT_ASSERT(xColumnLocate.is()); CPPUNIT_ASSERT_EQUAL(sal_Int16(-30000), - xRow->getShort(xColumnLocate->findColumn("_SMALLINT"))); + xRow->getShort(xColumnLocate->findColumn(u"_SMALLINT"_ustr))); CPPUNIT_ASSERT_EQUAL(sal_Int32(-2100000000), - xRow->getInt(xColumnLocate->findColumn("_INT"))); + xRow->getInt(xColumnLocate->findColumn(u"_INT"_ustr))); CPPUNIT_ASSERT_EQUAL(SAL_CONST_INT64(-9000000000000000000), - xRow->getLong(xColumnLocate->findColumn("_BIGINT"))); - CPPUNIT_ASSERT_EQUAL(OUString("5"), - xRow->getString(xColumnLocate->findColumn("_CHAR"))); - CPPUNIT_ASSERT_EQUAL(OUString("5"), - xRow->getString(xColumnLocate->findColumn("_VARCHAR"))); + xRow->getLong(xColumnLocate->findColumn(u"_BIGINT"_ustr))); + CPPUNIT_ASSERT_EQUAL(u"5"_ustr, + xRow->getString(xColumnLocate->findColumn(u"_CHAR"_ustr))); + CPPUNIT_ASSERT_EQUAL(u"5"_ustr, + xRow->getString(xColumnLocate->findColumn(u"_VARCHAR"_ustr))); CPPUNIT_ASSERT(!xResultSet->next()); // Should only be one row @@ -104,7 +104,7 @@ void FirebirdTest::testTdf132924() uno::Reference<XStatement> xStatement = xConnection->createStatement(); CPPUNIT_ASSERT(xStatement.is()); - uno::Reference<XResultSet> xResultSet = xStatement->executeQuery("SELECT * FROM AliasTest"); + uno::Reference<XResultSet> xResultSet = xStatement->executeQuery(u"SELECT * FROM AliasTest"_ustr); CPPUNIT_ASSERT(xResultSet.is()); CPPUNIT_ASSERT(xResultSet->next()); @@ -116,8 +116,8 @@ void FirebirdTest::testTdf132924() // Without the fix in place, this test would have failed with: // - Expected: 1 // - Actual : The column name 'TestId' is not valid - CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xRow->getShort(xColumnLocate->findColumn("TestId"))); - CPPUNIT_ASSERT_EQUAL(OUString("TestName"), xRow->getString(xColumnLocate->findColumn("TestName"))); + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xRow->getShort(xColumnLocate->findColumn(u"TestId"_ustr))); + CPPUNIT_ASSERT_EQUAL(u"TestName"_ustr, xRow->getString(xColumnLocate->findColumn(u"TestName"_ustr))); css::uno::Reference<util::XCloseable> xCloseable(mxComponent, css::uno::UNO_QUERY_THROW); xCloseable->close(false); diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx b/dbaccess/qa/unit/hsql_binary_import.cxx index 569463e7e4ef..2e8664aeccb4 100644 --- a/dbaccess/qa/unit/hsql_binary_import.cxx +++ b/dbaccess/qa/unit/hsql_binary_import.cxx @@ -32,7 +32,7 @@ public: void HsqlBinaryImportTest::setUp() { DBTestBase::setUp(); - osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ "1" }.pData); + osl_setEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, u"1"_ustr.pData); } void HsqlBinaryImportTest::testBinaryImport() @@ -56,16 +56,16 @@ void HsqlBinaryImportTest::testBinaryImport() uno::Reference<XStatement> statement = xConnection->createStatement(); uno::Reference<XResultSet> xRes - = statement->executeQuery("SELECT \"ID\", \"Power_value\", \"Power_name\", \"Retired\", " - "\"Birth_date\" FROM \"TestTable\" ORDER BY \"ID\""); + = statement->executeQuery(u"SELECT \"ID\", \"Power_value\", \"Power_name\", \"Retired\", " + "\"Birth_date\" FROM \"TestTable\" ORDER BY \"ID\""_ustr); uno::Reference<XRow> xRow(xRes, UNO_QUERY_THROW); // assert first row CPPUNIT_ASSERT(xRes->next()); constexpr sal_Int16 idExpected = 1; CPPUNIT_ASSERT_EQUAL(idExpected, xRow->getShort(1)); - CPPUNIT_ASSERT_EQUAL(OUString{ "45.32" }, xRow->getString(2)); // numeric - CPPUNIT_ASSERT_EQUAL(OUString{ "laser eye" }, xRow->getString(3)); // varchar + CPPUNIT_ASSERT_EQUAL(u"45.32"_ustr, xRow->getString(2)); // numeric + CPPUNIT_ASSERT_EQUAL(u"laser eye"_ustr, xRow->getString(3)); // varchar CPPUNIT_ASSERT(xRow->getBoolean(4)); // boolean css::util::Date date = xRow->getDate(5); @@ -78,8 +78,8 @@ void HsqlBinaryImportTest::testBinaryImport() CPPUNIT_ASSERT(xRes->next()); constexpr sal_Int16 secondIdExpected = 2; CPPUNIT_ASSERT_EQUAL(secondIdExpected, xRow->getShort(1)); // ID - CPPUNIT_ASSERT_EQUAL(OUString{ "54.12" }, xRow->getString(2)); // numeric - CPPUNIT_ASSERT_EQUAL(OUString{ "telekinesis" }, xRow->getString(3)); // varchar + CPPUNIT_ASSERT_EQUAL(u"54.12"_ustr, xRow->getString(2)); // numeric + CPPUNIT_ASSERT_EQUAL(u"telekinesis"_ustr, xRow->getString(3)); // varchar CPPUNIT_ASSERT(!xRow->getBoolean(4)); // boolean date = xRow->getDate(5); diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx index ba0c7b2ce345..cf8296cc3a34 100644 --- a/dbaccess/qa/unit/tdf119625.cxx +++ b/dbaccess/qa/unit/tdf119625.cxx @@ -33,7 +33,7 @@ public: void Tdf119625Test::setUp() { DBTestBase::setUp(); - osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ "1" }.pData); + osl_setEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, u"1"_ustr.pData); } namespace @@ -90,9 +90,9 @@ void Tdf119625Test::testTime() // select basically everything from the .odb uno::Reference<XStatement> statement = xConnection->createStatement(); - uno::Reference<XResultSet> xRes = statement->executeQuery(" SELECT id, tst_dt, tst_d, tst_t " + uno::Reference<XResultSet> xRes = statement->executeQuery(u" SELECT id, tst_dt, tst_d, tst_t " " FROM tst_data " - "ORDER BY id"); + "ORDER BY id"_ustr); uno::Reference<XRow> xRow(xRes, UNO_QUERY_THROW); // check result diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx index c06fdead79c7..c82299aef022 100644 --- a/dbaccess/qa/unit/tdf126268.cxx +++ b/dbaccess/qa/unit/tdf126268.cxx @@ -32,7 +32,7 @@ public: void Tdf126268Test::setUp() { DBTestBase::setUp(); - osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ "1" }.pData); + osl_setEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, u"1"_ustr.pData); } namespace @@ -45,8 +45,9 @@ struct expect_t } const expect_t expect[] = { - { 1, "0.00" }, { 2, "25.00" }, { 3, "26.00" }, { 4, "30.4" }, { 5, "45.8" }, - { 6, "-25.00" }, { 7, "-26.00" }, { 8, "-30.4" }, { 9, "-45.8" }, + { 1, u"0.00"_ustr }, { 2, u"25.00"_ustr }, { 3, u"26.00"_ustr }, + { 4, u"30.4"_ustr }, { 5, u"45.8"_ustr }, { 6, u"-25.00"_ustr }, + { 7, u"-26.00"_ustr }, { 8, u"-30.4"_ustr }, { 9, u"-45.8"_ustr }, }; void Tdf126268Test::testNumbers() @@ -70,7 +71,7 @@ void Tdf126268Test::testNumbers() uno::Reference<XStatement> statement = xConnection->createStatement(); uno::Reference<XResultSet> xRes - = statement->executeQuery("SELECT ID, Column1, Column2 FROM tableTest ORDER BY ID"); + = statement->executeQuery(u"SELECT ID, Column1, Column2 FROM tableTest ORDER BY ID"_ustr); uno::Reference<XRow> xRow(xRes, UNO_QUERY_THROW); // check result diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index dd266949cb7f..064d020e87cd 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -226,8 +226,8 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow sal_Int32 nCheckCount = 1; // index for the original values sal_Int32 i = 1; - OUString sIsNull(" IS NULL"); - OUString sParam(" = ?"); + OUString sIsNull(u" IS NULL"_ustr); + OUString sParam(u" = ?"_ustr); ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rRow->begin()+1; ORowVector< ORowSetValue >::Vector::const_iterator aEnd = _rRow->end(); for(; aIter != aEnd;++aIter,++nCheckCount,++i) diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 0314c36b8696..7690bca3e10f 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -124,7 +124,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std:: static void lcl_ensureComposedName( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData ) { if ( !_metaData.is() ) - throw RuntimeException("lcl_ensureComposedName: _metaData cannot be null!"); + throw RuntimeException(u"lcl_ensureComposedName: _metaData cannot be null!"_ustr); if ( !_io_tableInfo.sComposedName ) { @@ -145,7 +145,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std:: lcl_ensureComposedName( _io_tableInfo, _metaData ); if ( !_masterContainer.is() ) - throw RuntimeException("lcl_ensureType: _masterContainer cannot be null!"); + throw RuntimeException(u"lcl_ensureType: _masterContainer cannot be null!"_ustr); OUString sTypeName; try diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index e54c5fb39210..0b5455817154 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -195,7 +195,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, if ( o_pKeyColumnNames->empty() ) { - ::dbtools::throwGenericSQLException("Could not find any key column.", *this ); + ::dbtools::throwGenericSQLException(u"Could not find any key column."_ustr, *this ); } for (auto const& keyColumn : *o_pKeyColumnNames) @@ -440,8 +440,8 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi constexpr OUStringLiteral aPara(u" = ?,"); OUString aQuote = getIdentifierQuoteString(); constexpr OUString aAnd(u" AND "_ustr); - OUString sIsNull(" IS NULL"); - OUString sParam(" = ?"); + OUString sIsNull(u" IS NULL"_ustr); + OUString sParam(u" = ?"_ustr); // use keys and indexes for exact positioning Reference<XIndexesSupplier> xIndexSup(_xTable,UNO_QUERY); @@ -1222,7 +1222,7 @@ bool OKeySet::fillAllRows() sal_Bool SAL_CALL OKeySet::wasNull( ) { if ( ! m_xRow.is() ) - throwGenericSQLException("Must call getFOO() for some FOO before wasNull()", *this); + throwGenericSQLException(u"Must call getFOO() for some FOO before wasNull()"_ustr, *this); OSL_ENSURE(m_xRow.is(),"m_xRow is null! I've thrown, but function execution continued?"); return m_xRow->wasNull(); @@ -1233,7 +1233,7 @@ inline void OKeySet::ensureRowForData( ) if (! m_xRow.is() ) refreshRow(); if (! m_xRow.is() ) - throwSQLException("Failed to refetch row", "02000", *this, -2); + throwSQLException(u"Failed to refetch row"_ustr, u"02000"_ustr, *this, -2); OSL_ENSURE(m_xRow.is(),"m_xRow is null! I've called throwSQLException but execution continued?"); } diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 547edec23b6f..a65e842e8557 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -258,7 +258,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const break; case PROPERTY_ID_FETCHDIRECTION: if( m_nResultSetType == ResultSetType::FORWARD_ONLY) - throw Exception("resultsettype is FORWARD_ONLY", nullptr); + throw Exception(u"resultsettype is FORWARD_ONLY"_ustr, nullptr); [[fallthrough]]; default: OPropertyStateContainer::setFastPropertyValue_NoBroadcast(nHandle,rValue); @@ -430,7 +430,7 @@ Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) // css::XServiceInfo OUString SAL_CALL ORowSet::getImplementationName() { - return "com.sun.star.comp.dba.ORowSet"; + return u"com.sun.star.comp.dba.ORowSet"_ustr; } sal_Bool SAL_CALL ORowSet::supportsService( const OUString& _rServiceName ) @@ -2221,7 +2221,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw() m_xTables.reset(new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend)); xTables = m_xTables.get(); - Sequence<OUString> aTableFilter { "%" }; + Sequence<OUString> aTableFilter { u"%"_ustr }; m_xTables->construct(aTableFilter,Sequence< OUString>()); } @@ -2278,7 +2278,7 @@ void ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute ) // don't simply overwrite an existent filter, this would lead to problems if this existent // filter contains parameters (since a keyset may add parameters itself) m_xComposer->setElementaryQuery( m_xComposer->getQuery( ) ); - m_xComposer->setFilter( "0 = 1" ); + m_xComposer->setFilter( u"0 = 1"_ustr ); } m_xComposer->setOrder( m_aOrder ); @@ -2544,7 +2544,7 @@ void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Referenc catch( Exception const & ) { css::uno::Any anyEx = cppu::getCaughtException(); - throw SQLException("ORowSet::setBinaryStream", *this, "S1000", 0,anyEx); + throw SQLException(u"ORowSet::setBinaryStream"_ustr, *this, u"S1000"_ustr, 0,anyEx); } } @@ -2568,7 +2568,7 @@ void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Refer catch( Exception const & ) { css::uno::Any anyEx = cppu::getCaughtException(); - throw SQLException("ORowSet::setCharacterStream", *this, "S1000", 0, anyEx); + throw SQLException(u"ORowSet::setCharacterStream"_ustr, *this, u"S1000"_ustr, 0, anyEx); } } @@ -2591,22 +2591,22 @@ void SAL_CALL ORowSet::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x void SAL_CALL ORowSet::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setRef", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setRef"_ustr, *this ); } void SAL_CALL ORowSet::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setBlob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setBlob"_ustr, *this ); } void SAL_CALL ORowSet::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setClob", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setClob"_ustr, *this ); } void SAL_CALL ORowSet::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setArray", *this ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XParameters::setArray"_ustr, *this ); } void SAL_CALL ORowSet::clearParameters( ) @@ -2838,7 +2838,7 @@ void ORowSetClone::release() noexcept // XServiceInfo OUString ORowSetClone::getImplementationName( ) { - return "com.sun.star.sdb.ORowSetClone"; + return u"com.sun.star.sdb.ORowSetClone"_ustr; } sal_Bool ORowSetClone::supportsService( const OUString& _rServiceName ) @@ -2919,17 +2919,17 @@ bool ORowSetClone::isNew( ) void SAL_CALL ORowSetClone::execute( ) { - throwFunctionNotSupportedSQLException( "RowSetClone::XRowSet::execute", *this ); + throwFunctionNotSupportedSQLException( u"RowSetClone::XRowSet::execute"_ustr, *this ); } void SAL_CALL ORowSetClone::addRowSetListener( const Reference< XRowSetListener >& ) { - throwFunctionNotSupportedRuntimeException( "RowSetClone::XRowSet", *this ); + throwFunctionNotSupportedRuntimeException( u"RowSetClone::XRowSet"_ustr, *this ); } void SAL_CALL ORowSetClone::removeRowSetListener( const Reference< XRowSetListener >& ) { - throwFunctionNotSupportedRuntimeException( "RowSetClone::XRowSet", *this ); + throwFunctionNotSupportedRuntimeException( u"RowSetClone::XRowSet"_ustr, *this ); } } // dbaccess diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index c1731ee18916..d2811d8af564 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -371,7 +371,7 @@ Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, const Reference< XNa Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRef", *m_pMySelf ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XRow::getRef"_ustr, *m_pMySelf ); } Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 columnIndex ) @@ -386,7 +386,7 @@ Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 columnIndex ) Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ ) { - ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getArray", *m_pMySelf ); + ::dbtools::throwFeatureNotImplementedSQLException( u"XRow::getArray"_ustr, *m_pMySelf ); } // css::sdbcx::XRowLocate @@ -1087,7 +1087,7 @@ void SAL_CALL ORowSetBase::refreshRow( ) ::osl::MutexGuard aGuard( *m_pMutex ); checkCache(); if ( impl_rowDeleted() ) - throwSQLException( "The current row is deleted", StandardSQLState::INVALID_CURSOR_STATE, Reference< XRowSet >( this ) ); + throwSQLException( u"The current row is deleted"_ustr, StandardSQLState::INVALID_CURSOR_STATE, Reference< XRowSet >( this ) ); if(!(m_bBeforeFirst || m_bAfterLast)) { diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index f881220f69a2..3608286d36e8 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -281,7 +281,7 @@ void SAL_CALL OSingleSelectQueryComposer::disposing() IMPLEMENT_FORWARD_XINTERFACE3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer) OUString SAL_CALL OSingleSelectQueryComposer::getImplementationName() { - return "org.openoffice.comp.dba.OSingleSelectQueryComposer"; + return u"org.openoffice.comp.dba.OSingleSelectQueryComposer"_ustr; } sal_Bool SAL_CALL OSingleSelectQueryComposer::supportsService(const OUString& _rServiceName) { @@ -496,13 +496,13 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc m_aCurrentColumns[SelectColumns]->getByName(aName) >>= xColumn; OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_REALNAME),"Property REALNAME not available!"); OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_TABLENAME),"Property TABLENAME not available!"); - OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName("Function"),"Property FUNCTION not available!"); + OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(u"Function"_ustr),"Property FUNCTION not available!"); OUString sRealName, sTableName; xColumn->getPropertyValue(PROPERTY_REALNAME) >>= sRealName; xColumn->getPropertyValue(PROPERTY_TABLENAME) >>= sTableName; bool bFunction = false; - xColumn->getPropertyValue("Function") >>= bFunction; + xColumn->getPropertyValue(u"Function"_ustr) >>= bFunction; if ( sRealName == aName ) { if ( bFunction ) @@ -931,8 +931,8 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) continue; rtl::Reference<::connectivity::parse::OParseColumn> pColumn = new ::connectivity::parse::OParseColumn(xProp,bCase); - pColumn->setFunction(::comphelper::getBOOL(xProp->getPropertyValue("Function"))); - pColumn->setAggregateFunction(::comphelper::getBOOL(xProp->getPropertyValue("AggregateFunction"))); + pColumn->setFunction(::comphelper::getBOOL(xProp->getPropertyValue(u"Function"_ustr))); + pColumn->setAggregateFunction(::comphelper::getBOOL(xProp->getPropertyValue(u"AggregateFunction"_ustr))); OUString sRealName; xProp->getPropertyValue(PROPERTY_REALNAME) >>= sRealName; @@ -1648,7 +1648,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert m_aCurrentColumns[SelectColumns]->getByName(aName) >>= xColumn; OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_REALNAME),"Property REALNAME not available!"); OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_TABLENAME),"Property TABLENAME not available!"); - OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName("AggregateFunction"),"Property AggregateFunction not available!"); + OSL_ENSURE(xColumn->getPropertySetInfo()->hasPropertyByName(u"AggregateFunction"_ustr),"Property AggregateFunction not available!"); OUString sRealName,sTableName; xColumn->getPropertyValue(PROPERTY_REALNAME) >>= sRealName; @@ -1662,7 +1662,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert else sTableName = ::dbtools::quoteName(aQuote,sTableName); - if ( !::comphelper::getBOOL(xColumn->getPropertyValue("Function")) ) + if ( !::comphelper::getBOOL(xColumn->getPropertyValue(u"Function"_ustr)) ) { aSQL = sTableName + "." + ::dbtools::quoteName( aQuote, sRealName ); } diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 92821750f9dc..2228042cc748 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -352,7 +352,7 @@ void ODBTableDecorator::construct() // XServiceInfo OUString SAL_CALL ODBTableDecorator::getImplementationName() { - return "com.sun.star.sdb.dbaccess.ODBTableDecorator"; + return u"com.sun.star.sdb.dbaccess.ODBTableDecorator"_ustr; } sal_Bool SAL_CALL ODBTableDecorator::supportsService(const OUString& _rServiceName) { @@ -628,7 +628,7 @@ void SAL_CALL ODBTableDecorator::release() noexcept void SAL_CALL ODBTableDecorator::setName( const OUString& /*aName*/ ) { - throwFunctionNotSupportedRuntimeException( "XNamed::setName", *this ); + throwFunctionNotSupportedRuntimeException( u"XNamed::setName"_ustr, *this ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index 2e2ecda0f775..efbbd8b412df 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -52,7 +52,7 @@ namespace dbaccess try { Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW); - m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,"ViewAccessServiceName")),UNO_QUERY); + m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,u"ViewAccessServiceName"_ustr)),UNO_QUERY); } catch(const Exception& ) { diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx index 25f3f405f8c1..c03fe0aab96e 100644 --- a/dbaccess/source/core/api/callablestatement.cxx +++ b/dbaccess/source/core/api/callablestatement.cxx @@ -68,7 +68,7 @@ void OCallableStatement::release() noexcept // XServiceInfo OUString OCallableStatement::getImplementationName( ) { - return "com.sun.star.sdb.OCallableStatement"; + return u"com.sun.star.sdb.OCallableStatement"_ustr; } Sequence< OUString > OCallableStatement::getSupportedServiceNames( ) diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 127620b1d650..58a8c1649cea 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -78,7 +78,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( OColumn, OColumnBase, ::comphelper::OPropertyCont // css::lang::XServiceInfo OUString OColumn::getImplementationName( ) { - return "com.sun.star.sdb.OColumn"; + return u"com.sun.star.sdb.OColumn"_ustr; } sal_Bool OColumn::supportsService( const OUString& _rServiceName ) @@ -169,7 +169,7 @@ OColumns::~OColumns() // XServiceInfo OUString OColumns::getImplementationName( ) { - return "com.sun.star.sdb.OColumns"; + return u"com.sun.star.sdb.OColumns"_ustr; } sal_Bool OColumns::supportsService( const OUString& _rServiceName ) diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx index e0953449154a..041cbf5f4f03 100644 --- a/dbaccess/source/core/api/datacolumn.cxx +++ b/dbaccess/source/core/api/datacolumn.cxx @@ -75,7 +75,7 @@ Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) // XServiceInfo OUString ODataColumn::getImplementationName( ) { - return "com.sun.star.sdb.ODataColumn"; + return u"com.sun.star.sdb.ODataColumn"_ustr; } Sequence< OUString > ODataColumn::getSupportedServiceNames( ) diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index b952edca2e7a..49aa4c39e48c 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -84,7 +84,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor ) // css::lang::XServiceInfo OUString OTableColumnDescriptor::getImplementationName( ) { - return "com.sun.star.sdb.OTableColumnDescriptor"; + return u"com.sun.star.sdb.OTableColumnDescriptor"_ustr; } Sequence< OUString > OTableColumnDescriptor::getSupportedServiceNames( ) @@ -141,7 +141,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn ) OUString OTableColumn::getImplementationName( ) { - return "com.sun.star.sdb.OTableColumn"; + return u"com.sun.star.sdb.OTableColumn"_ustr; } ::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper() @@ -282,7 +282,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn ) OUString SAL_CALL OQueryColumn::getImplementationName( ) { - return "org.openoffice.comp.dbaccess.OQueryColumn"; + return u"org.openoffice.comp.dbaccess.OQueryColumn"_ustr; } ::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper() @@ -428,7 +428,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper ) // css::lang::XServiceInfo OUString OTableColumnDescriptorWrapper::getImplementationName( ) { - return "com.sun.star.sdb.OTableColumnDescriptorWrapper"; + return u"com.sun.star.sdb.OTableColumnDescriptorWrapper"_ustr; } Sequence< OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( ) @@ -588,7 +588,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper ) OUString OTableColumnWrapper::getImplementationName( ) { - return "com.sun.star.sdb.OTableColumnWrapper"; + return u"com.sun.star.sdb.OTableColumnWrapper"_ustr; } Sequence< OUString > OTableColumnWrapper::getSupportedServiceNames( ) diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx index e7ec79a2ca87..3691477a5ebd 100644 --- a/dbaccess/source/core/api/preparedstatement.cxx +++ b/dbaccess/source/core/api/preparedstatement.cxx @@ -106,7 +106,7 @@ void OPreparedStatement::release() noexcept // XServiceInfo OUString OPreparedStatement::getImplementationName( ) { - return "com.sun.star.sdb.OPreparedStatement"; + return u"com.sun.star.sdb.OPreparedStatement"_ustr; } sal_Bool OPreparedStatement::supportsService( const OUString& _rServiceName ) diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index c8e723853a7a..8d50eacde1ff 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -214,7 +214,7 @@ void OQuery::rebuildColumns() // XServiceInfo OUString SAL_CALL OQuery::getImplementationName() { - return "com.sun.star.sdb.dbaccess.OQuery"; + return u"com.sun.star.sdb.dbaccess.OQuery"_ustr; } sal_Bool SAL_CALL OQuery::supportsService(const OUString& _rServiceName) { @@ -227,7 +227,7 @@ sal_Bool SAL_CALL OQuery::supportsService(const OUString& _rServiceName) } css::uno::Sequence< OUString > SAL_CALL OQuery::getSupportedServiceNames( ) { - return { SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, "com.sun.star.sdb.QueryDefinition" }; + return { SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, u"com.sun.star.sdb.QueryDefinition"_ustr }; } // css::beans::XPropertyChangeListener @@ -374,7 +374,7 @@ void OQuery::registerProperties() OUString OQuery::determineContentType() const { - return "application/vnd.org.openoffice.DatabaseQuery"; + return u"application/vnd.org.openoffice.DatabaseQuery"_ustr; } } // namespace dbaccess diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index 9c41f344ccf5..68d59673e310 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -87,7 +87,7 @@ Any SAL_CALL OQueryComposer::queryInterface( const Type & rType ) // XServiceInfo OUString OQueryComposer::getImplementationName( ) { - return "com.sun.star.sdb.dbaccess.OQueryComposer"; + return u"com.sun.star.sdb.dbaccess.OQueryComposer"_ustr; } sal_Bool OQueryComposer::supportsService( const OUString& _rServiceName ) diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index c308bf9d6f9d..57307c6f1214 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -130,7 +130,7 @@ void OQueryContainer::disposing() // XServiceInfo OUString SAL_CALL OQueryContainer::getImplementationName() { - return "com.sun.star.sdb.dbaccess.OQueryContainer"; + return u"com.sun.star.sdb.dbaccess.OQueryContainer"_ustr; } sal_Bool SAL_CALL OQueryContainer::supportsService(const OUString& _rServiceName) { @@ -345,7 +345,7 @@ void SAL_CALL OQueryContainer::disposing( const css::lang::EventObject& _rSource OUString OQueryContainer::determineContentType() const { - return "application/vnd.org.openoffice.DatabaseQueryContainer"; + return u"application/vnd.org.openoffice.DatabaseQueryContainer"_ustr; } Reference< XContent > OQueryContainer::implCreateWrapper(const OUString& _rName) diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index 0aff2b0aaba1..116a132eb72d 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -192,7 +192,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) OUString SAL_CALL OQueryDescriptor_Base::getImplementationName( ) { - return "com.sun.star.sdb.OQueryDescriptor"; + return u"com.sun.star.sdb.OQueryDescriptor"_ustr; } sal_Bool SAL_CALL OQueryDescriptor_Base::supportsService( const OUString& _rServiceName ) diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx index fbc8cb8a343f..45d722431bee 100644 --- a/dbaccess/source/core/api/resultcolumn.cxx +++ b/dbaccess/source/core/api/resultcolumn.cxx @@ -103,7 +103,7 @@ Sequence< sal_Int8 > OResultColumn::getImplementationId() // XServiceInfo OUString OResultColumn::getImplementationName( ) { - return "com.sun.star.sdb.OResultColumn"; + return u"com.sun.star.sdb.OResultColumn"_ustr; } Sequence< OUString > OResultColumn::getSupportedServiceNames( ) diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index cc6a6fe018f4..20840d3682d3 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -164,7 +164,7 @@ void OResultSet::close() // XServiceInfo OUString OResultSet::getImplementationName( ) { - return "com.sun.star.sdb.OResultSet"; + return u"com.sun.star.sdb.OResultSet"_ustr; } sal_Bool OResultSet::supportsService( const OUString& _rServiceName ) @@ -982,13 +982,13 @@ void OResultSet::checkReadOnly() const if ( ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY ) || !m_xDelegatorResultSetUpdate.is() ) - throwSQLException( "The result set is read-only.", StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) ); + throwSQLException( u"The result set is read-only."_ustr, StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) ); } void OResultSet::checkBookmarkable() const { if ( !m_bIsBookmarkable ) - throwSQLException( "The result set does not have bookmark support.", StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) ); + throwSQLException( u"The result set does not have bookmark support."_ustr, StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index 1a20823ab9dd..f6457121c4b3 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -429,7 +429,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( OStatement, OStatementBase, OStatement_IFACE ) // XServiceInfo OUString OStatement::getImplementationName( ) { - return "com.sun.star.sdb.OStatement"; + return u"com.sun.star.sdb.OStatement"_ustr; } sal_Bool OStatement::supportsService( const OUString& _rServiceName ) diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 8bc4aececf1b..d2071c27b833 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -233,7 +233,7 @@ void ODBTable::construct() // XServiceInfo OUString SAL_CALL ODBTable::getImplementationName() { - return "com.sun.star.sdb.dbaccess.ODBTable"; + return u"com.sun.star.sdb.dbaccess.ODBTable"_ustr; } sal_Bool SAL_CALL ODBTable::supportsService(const OUString& _rServiceName) { diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 2ec9ce796166..37023c267504 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -120,7 +120,7 @@ OUString OTableContainer::getTableTypeRestriction() const // XServiceInfo OUString SAL_CALL OTableContainer::getImplementationName() { - return "com.sun.star.sdb.dbaccess.OTableContainer"; + return u"com.sun.star.sdb.dbaccess.OTableContainer"_ustr; } sal_Bool SAL_CALL OTableContainer::supportsService(const OUString& _rServiceName) { @@ -366,7 +366,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) if(sComposedName.isEmpty()) ::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this))); - OUString aSql("DROP "); + OUString aSql(u"DROP "_ustr); if ( bIsView ) // here we have a view aSql += "VIEW "; diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index 7e170b86d43a..b115cb3dc508 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -61,7 +61,7 @@ OViewContainer::~OViewContainer() // XServiceInfo OUString SAL_CALL OViewContainer::getImplementationName() { - return "com.sun.star.sdb.dbaccess.OViewContainer"; + return u"com.sun.star.sdb.dbaccess.OViewContainer"_ustr; } sal_Bool SAL_CALL OViewContainer::supportsService(const OUString& _rServiceName) { @@ -246,7 +246,7 @@ void SAL_CALL OViewContainer::elementReplaced( const ContainerEvent& /*Event*/ ) OUString OViewContainer::getTableTypeRestriction() const { // no restriction at all (other than the ones provided externally) - return "VIEW"; + return u"VIEW"_ustr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx index 19076507e0b3..a36adad3f40a 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx @@ -153,12 +153,12 @@ IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings OUString SAL_CALL OComponentDefinition::getImplementationName() { - return "com.sun.star.comp.dba.OComponentDefinition"; + return u"com.sun.star.comp.dba.OComponentDefinition"_ustr; } Sequence< OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames() { - return { "com.sun.star.sdb.TableDefinition", "com.sun.star.ucb.Content" }; + return { u"com.sun.star.sdb.TableDefinition"_ustr, u"com.sun.star.ucb.Content"_ustr }; } void SAL_CALL OComponentDefinition::disposing() @@ -193,8 +193,8 @@ Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo( OUString OComponentDefinition::determineContentType() const { return m_bTable - ? OUString( "application/vnd.org.openoffice.DatabaseTable" ) - : OUString( "application/vnd.org.openoffice.DatabaseCommandDefinition" ); + ? u"application/vnd.org.openoffice.DatabaseTable"_ustr + : u"application/vnd.org.openoffice.DatabaseCommandDefinition"_ustr; } Reference< XNameAccess> OComponentDefinition::getColumns() diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index e624eb709c43..6736e22d9bd6 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -86,7 +86,7 @@ void SAL_CALL OContentHelper::disposing() OUString SAL_CALL OContentHelper::getImplementationName() { - return "com.sun.star.comp.sdb.Content"; + return u"com.sun.star.comp.sdb.Content"_ustr; } sal_Bool SAL_CALL OContentHelper::supportsService(const OUString& _rServiceName) { @@ -99,7 +99,7 @@ sal_Bool SAL_CALL OContentHelper::supportsService(const OUString& _rServiceName) } css::uno::Sequence< OUString > SAL_CALL OContentHelper::getSupportedServiceNames() { - return { "com.sun.star.ucb.Content" }; + return { u"com.sun.star.ucb.Content"_ustr }; } @@ -343,7 +343,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue if ( rValue.Name == "ContentType" || rValue.Name == "IsDocument" || rValue.Name == "IsFolder" ) { // Read-only property! - aRetRange[ n ] <<= IllegalAccessException("Property is read-only!", + aRetRange[ n ] <<= IllegalAccessException(u"Property is read-only!"_ustr, static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "Title" ) @@ -377,14 +377,14 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue } else { - aRetRange[ n ] <<= IllegalTypeException("Property value has wrong type!", + aRetRange[ n ] <<= IllegalTypeException(u"Property value has wrong type!"_ustr, static_cast< cppu::OWeakObject * >( this ) ); } } else { - aRetRange[ n ] <<= Exception("No property set for storing the value!", + aRetRange[ n ] <<= Exception(u"No property set for storing the value!"_ustr, static_cast< cppu::OWeakObject * >( this ) ); } } @@ -437,24 +437,24 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >& { // Append all Core Properties. xRow->appendString ( - Property( "ContentType", -1, + Property( u"ContentType"_ustr, -1, cppu::UnoType<OUString>::get(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), getContentType() ); xRow->appendString ( - Property( "Title", -1, + Property( u"Title"_ustr, -1, cppu::UnoType<OUString>::get(), PropertyAttribute::BOUND ), m_pImpl->m_aProps.aTitle ); xRow->appendBoolean( - Property( "IsDocument", -1, + Property( u"IsDocument"_ustr, -1, cppu::UnoType<bool>::get(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), m_pImpl->m_aProps.bIsDocument ); xRow->appendBoolean( - Property( "IsFolder", -1, + Property( u"IsFolder"_ustr, -1, cppu::UnoType<bool>::get(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 8067ef32e30a..2ab07a8e6c20 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -249,7 +249,7 @@ bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits ) bool bSuccess = false; try { - NamedStorages::const_iterator pos = m_aExposedStorages.find( "database" ); + NamedStorages::const_iterator pos = m_aExposedStorages.find( u"database"_ustr ); if ( pos != m_aExposedStorages.end() ) bSuccess = tools::stor::commitStorageIfWriteable( pos->second ); } @@ -315,7 +315,7 @@ void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEv Reference< XStorage > xStorage( aEvent.Source, UNO_QUERY ); // check if this is the dedicated "database" sub storage - NamedStorages::const_iterator pos = m_aExposedStorages.find( "database" ); + NamedStorages::const_iterator pos = m_aExposedStorages.find( u"database"_ustr ); if ( ( pos != m_aExposedStorages.end() ) && ( pos->second == xStorage ) ) @@ -371,7 +371,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _r { // some kind of default m_sConnectURL = "jdbc:"; - m_aTableFilter = { "%" }; + m_aTableFilter = { u"%"_ustr }; impl_construct_nothrow(); } @@ -696,9 +696,9 @@ void ODatabaseModelImpl::setResource( const OUString& i_rDocumentURL, const Sequ ::comphelper::NamedValueCollection aMediaDescriptor( _rArgs ); #if OSL_DEBUG_LEVEL > 0 - if ( aMediaDescriptor.has( "SalvagedFile" ) ) + if ( aMediaDescriptor.has( u"SalvagedFile"_ustr ) ) { - OUString sSalvagedFile( aMediaDescriptor.getOrDefault( "SalvagedFile", OUString() ) ); + OUString sSalvagedFile( aMediaDescriptor.getOrDefault( u"SalvagedFile"_ustr, OUString() ) ); // If SalvagedFile is an empty string, this indicates "the document is being recovered, but i_rDocumentURL already // is the real document URL, not the temporary document location" if ( sSalvagedFile.isEmpty() ) @@ -716,12 +716,12 @@ void ODatabaseModelImpl::setResource( const OUString& i_rDocumentURL, const Sequ ::comphelper::NamedValueCollection ODatabaseModelImpl::stripLoadArguments( const ::comphelper::NamedValueCollection& _rArguments ) { - OSL_ENSURE( !_rArguments.has( "Model" ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (1)!" ); - OSL_ENSURE( !_rArguments.has( "ViewName" ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (2)!" ); + OSL_ENSURE( !_rArguments.has( u"Model"_ustr ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (1)!" ); + OSL_ENSURE( !_rArguments.has( u"ViewName"_ustr ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (2)!" ); ::comphelper::NamedValueCollection aMutableArgs( _rArguments ); - aMutableArgs.remove( "Model" ); - aMutableArgs.remove( "ViewName" ); + aMutableArgs.remove( u"Model"_ustr ); + aMutableArgs.remove( u"ViewName"_ustr ); return aMutableArgs; } @@ -748,9 +748,9 @@ Reference< XStorage > const & ODatabaseModelImpl::getOrCreateRootStorage() if ( !m_xDocumentStorage.is() ) { Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext ); - Any aSource = m_aMediaDescriptor.get( "Stream" ); + Any aSource = m_aMediaDescriptor.get( u"Stream"_ustr ); if ( !aSource.hasValue() ) - aSource = m_aMediaDescriptor.get( "InputStream" ); + aSource = m_aMediaDescriptor.get( u"InputStream"_ustr ); if ( !aSource.hasValue() && !m_sDocFileLocation.isEmpty() ) aSource <<= m_sDocFileLocation; // TODO: shouldn't we also check URL? @@ -843,7 +843,7 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference< // For that, we need a temporary copy of the original file. osl::File::RC rc = osl::File::copy(sLocation, sTmpFileUrl); if (rc != osl::FileBase::E_None) - throw uno::RuntimeException("Could not create temp file"); + throw uno::RuntimeException(u"Could not create temp file"_ustr); } bool bSuccess = false; @@ -877,10 +877,10 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference< if (!xReadOrig.is()) throw uno::RuntimeException("Could not read " + sTmpFileUrl); uno::Reference<embed::XStorage> xMetaInf - = xReadOrig->openStorageElement("META-INF", embed::ElementModes::READ); + = xReadOrig->openStorageElement(u"META-INF"_ustr, embed::ElementModes::READ); uno::Reference<embed::XStorage> xTargetMetaInf - = _rxStorage->openStorageElement("META-INF", embed::ElementModes::READWRITE); + = _rxStorage->openStorageElement(u"META-INF"_ustr, embed::ElementModes::READWRITE); if (xMetaInf.is() && xTargetMetaInf.is() && xMetaInf->hasByName(aScriptSignName)) { xMetaInf->copyElementTo(aScriptSignName, xTargetMetaInf, aScriptSignName); @@ -1034,9 +1034,9 @@ std::span<const DefaultPropertyValue> ODatabaseModelImpl::getDefaultDataSourceSe { u"Extension"_ustr, Any( OUString() ) }, { u"CharSet"_ustr, Any( OUString() ) }, { u"HeaderLine"_ustr, Any( true ) }, - { u"FieldDelimiter"_ustr, Any( OUString( "," ) ) }, - { u"StringDelimiter"_ustr, Any( OUString( "\"" ) ) }, - { u"DecimalDelimiter"_ustr, Any( OUString( "." ) ) }, + { u"FieldDelimiter"_ustr, Any( u","_ustr ) }, + { u"StringDelimiter"_ustr, Any( u"\""_ustr ) }, + { u"DecimalDelimiter"_ustr, Any( u"."_ustr ) }, { u"ThousandDelimiter"_ustr, Any( OUString() ) }, { u"ShowDeleted"_ustr, Any( false ) }, // known ODBC settings @@ -1114,7 +1114,7 @@ bool ODatabaseModelImpl::adjustMacroMode_AutoReject() bool ODatabaseModelImpl::checkMacrosOnLoading() { Reference< XInteractionHandler > xInteraction; - xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", xInteraction ); + xInteraction = m_aMediaDescriptor.getOrDefault( u"InteractionHandler"_ustr, xInteraction ); const bool bHasMacros = m_aMacroMode.hasMacros(); return m_aMacroMode.checkMacrosOnLoading(xInteraction, false /*HasValidContentSignature*/, bHasMacros); } @@ -1283,7 +1283,7 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const sal_Int16 nCurrentMode = MacroExecMode::NEVER_EXECUTE; try { - nCurrentMode = m_aMediaDescriptor.getOrDefault( "MacroExecutionMode", nCurrentMode ); + nCurrentMode = m_aMediaDescriptor.getOrDefault( u"MacroExecutionMode"_ustr, nCurrentMode ); } catch( const Exception& ) { @@ -1294,7 +1294,7 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const void ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode ) { - m_aMediaDescriptor.put( "MacroExecutionMode", nMacroMode ); + m_aMediaDescriptor.put( u"MacroExecutionMode"_ustr, nMacroMode ); } OUString ODatabaseModelImpl::getDocumentLocation() const diff --git a/dbaccess/source/core/dataaccess/SharedConnection.hxx b/dbaccess/source/core/dataaccess/SharedConnection.hxx index 2c88e58fd55d..fff38f2896d9 100644 --- a/dbaccess/source/core/dataaccess/SharedConnection.hxx +++ b/dbaccess/source/core/dataaccess/SharedConnection.hxx @@ -78,23 +78,23 @@ namespace dbaccess // XConnection virtual void SAL_CALL setAutoCommit( sal_Bool /*autoCommit*/ ) override { - throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any()); + throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any()); } virtual void SAL_CALL setReadOnly( sal_Bool /*readOnly*/ ) override { - throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any()); + throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any()); } virtual void SAL_CALL setCatalog( const OUString& /*catalog*/ ) override { - throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any()); + throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any()); } virtual void SAL_CALL setTransactionIsolation( sal_Int32 /*level*/ ) override { - throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any()); + throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any()); } virtual void SAL_CALL setTypeMap( const css::uno::Reference< css::container::XNameAccess >& /*typeMap*/ ) override { - throw css::sdbc::SQLException("This call is not allowed when sharing connections.",*this,"S10000",0,css::uno::Any()); + throw css::sdbc::SQLException(u"This call is not allowed when sharing connections."_ustr,*this,u"S10000"_ustr,0,css::uno::Any()); } // XConnection virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL createStatement( ) override; diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx index a03caea57e93..3d0657e26603 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx @@ -63,7 +63,7 @@ OBookmarkContainer::~OBookmarkContainer() // XServiceInfo OUString SAL_CALL OBookmarkContainer::getImplementationName( ) { - return "com.sun.star.comp.dba.OBookmarkContainer"; + return u"com.sun.star.comp.dba.OBookmarkContainer"_ustr; } sal_Bool SAL_CALL OBookmarkContainer::supportsService( const OUString& _rServiceName ) @@ -73,7 +73,7 @@ sal_Bool SAL_CALL OBookmarkContainer::supportsService( const OUString& _rService Sequence< OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( ) { - return { "com.sun.star.sdb.DefinitionContainer" }; + return { u"com.sun.star.sdb.DefinitionContainer"_ustr }; } // XNameContainer diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx index 7f646c61722e..9f426f4651a6 100644 --- a/dbaccess/source/core/dataaccess/commandcontainer.cxx +++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx @@ -88,7 +88,7 @@ Reference< XInterface > SAL_CALL OCommandContainer::createInstance( ) OUString OCommandContainer::determineContentType() const { - return "application/vnd.org.openoffice.DatabaseCommandDefinitionContainer"; + return u"application/vnd.org.openoffice.DatabaseCommandDefinitionContainer"_ustr; } } // namespace dbaccess diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx index b3f4fa8b0ead..6dfe5056e7ab 100644 --- a/dbaccess/source/core/dataaccess/commanddefinition.cxx +++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx @@ -106,15 +106,15 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OCommandDefinition OUString SAL_CALL OCommandDefinition::getImplementationName() { - return "com.sun.star.comp.dba.OCommandDefinition"; + return u"com.sun.star.comp.dba.OCommandDefinition"_ustr; } css::uno::Sequence<OUString> SAL_CALL OCommandDefinition::getSupportedServiceNames() { return { - "com.sun.star.sdb.QueryDefinition", - "com.sun.star.sdb.CommandDefinition", - "com.sun.star.ucb.Content" + u"com.sun.star.sdb.QueryDefinition"_ustr, + u"com.sun.star.sdb.CommandDefinition"_ustr, + u"com.sun.star.ucb.Content"_ustr }; } diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index fa4c934a056e..1e71a9b9c719 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -70,7 +70,7 @@ namespace dbaccess // XServiceInfo OUString OConnection::getImplementationName( ) { - return "com.sun.star.comp.dbaccess.Connection"; + return u"com.sun.star.comp.dbaccess.Connection"_ustr; } sal_Bool OConnection::supportsService( const OUString& _rServiceName ) @@ -629,7 +629,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s if ( aFind == m_aSupportServices.end() ) { Reference<XConnection> xMy(this); - Sequence<Any> aArgs{ Any(NamedValue("ActiveConnection",Any(xMy))) }; + Sequence<Any> aArgs{ Any(NamedValue(u"ActiveConnection"_ustr,Any(xMy))) }; aFind = m_aSupportServices.emplace( _sServiceSpecifier, m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(_sServiceSpecifier, aArgs, m_aContext) diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx index ef5239a6793f..ae099dfb1bed 100644 --- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx +++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx @@ -146,7 +146,7 @@ namespace OUString SAL_CALL DataAccessDescriptor::getImplementationName() { - return "com.sun.star.comp.dba.DataAccessDescriptor"; + return u"com.sun.star.comp.dba.DataAccessDescriptor"_ustr; } sal_Bool SAL_CALL DataAccessDescriptor::supportsService( const OUString& rServiceName ) @@ -156,7 +156,7 @@ namespace Sequence< OUString > SAL_CALL DataAccessDescriptor::getSupportedServiceNames( ) { - return { "com.sun.star.sdb.DataAccessDescriptor" }; + return { u"com.sun.star.sdb.DataAccessDescriptor"_ustr }; } Reference< XPropertySetInfo > SAL_CALL DataAccessDescriptor::getPropertySetInfo() @@ -198,7 +198,7 @@ namespace OUString SAL_CALL DataAccessDescriptorFactory::getImplementationName() { - return "com.sun.star.comp.dba.DataAccessDescriptorFactory"; + return u"com.sun.star.comp.dba.DataAccessDescriptorFactory"_ustr; } sal_Bool SAL_CALL DataAccessDescriptorFactory::supportsService( const OUString& rServiceName ) @@ -208,7 +208,7 @@ namespace Sequence< OUString > SAL_CALL DataAccessDescriptorFactory::getSupportedServiceNames() { - return { "com.sun.star.sdb.DataAccessDescriptorFactory" }; + return { u"com.sun.star.sdb.DataAccessDescriptorFactory"_ustr }; } Reference< XPropertySet > SAL_CALL DataAccessDescriptorFactory::createDataAccessDescriptor( ) diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 54c2ae37f356..a63ca5af6031 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -193,7 +193,7 @@ ODatabaseContext::~ODatabaseContext() // XServiceInfo OUString ODatabaseContext::getImplementationName( ) { - return "com.sun.star.comp.dba.ODatabaseContext"; + return u"com.sun.star.comp.dba.ODatabaseContext"_ustr; } sal_Bool ODatabaseContext::supportsService( const OUString& _rServiceName ) @@ -203,7 +203,7 @@ sal_Bool ODatabaseContext::supportsService( const OUString& _rServiceName ) Sequence< OUString > ODatabaseContext::getSupportedServiceNames( ) { - return { "com.sun.star.sdb.DatabaseContext" }; + return { u"com.sun.star.sdb.DatabaseContext"_ustr }; } Reference< XInterface > ODatabaseContext::impl_createNewDataSource() @@ -330,9 +330,9 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW ); ::comphelper::NamedValueCollection aArgs; - aArgs.put( "URL", _sURL ); - aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG ); - aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext, nullptr) ); + aArgs.put( u"URL"_ustr, _sURL ); + aArgs.put( u"MacroExecutionMode"_ustr, MacroExecMode::USE_CONFIG ); + aArgs.put( u"InteractionHandler"_ustr, task::InteractionHandler::createWithParent(m_aContext, nullptr) ); if (bEmbeddedDataSource) { // In this case the host contains the real path, and the path is the embedded stream name. @@ -346,7 +346,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa if (auth.isEmpty() == decAuth.isEmpty()) { // Decoding of auth to UTF-8 succeeded: OUString sBaseURI = decAuth + uri->getPath(); - aArgs.put("BaseURI", sBaseURI); + aArgs.put(u"BaseURI"_ustr, sBaseURI); } else { SAL_WARN( "dbaccess.core", @@ -470,7 +470,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl // additionally, remember the "failed password", which is not available as property // #i86178# - aRememberProps.put( "AuthFailedPassword", _rModelImpl.m_sFailedPassword ); + aRememberProps.put( u"AuthFailedPassword"_ustr, _rModelImpl.m_sFailedPassword ); OUString sDocumentURL( _rModelImpl.getURL() ); if ( m_aDatabaseObjects.find( sDocumentURL ) != m_aDatabaseObjects.end() ) @@ -718,7 +718,7 @@ void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForD // ... whose BasicManager has just been created, then add the global DatabaseDocument variable to its scope. if ( xDatabaseDocument.is() ) - _rBasicManager.SetGlobalUNOConstant( "ThisDatabaseDocument", Any( xDatabaseDocument ) ); + _rBasicManager.SetGlobalUNOConstant( u"ThisDatabaseDocument"_ustr, Any( xDatabaseDocument ) ); #endif } diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 204bad556e5d..82c1b66954cc 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -231,7 +231,7 @@ namespace Reference< XStatusIndicator > lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments ) { Reference< XStatusIndicator > xStatusIndicator; - return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator ); + return _rArguments.getOrDefault( u"StatusIndicator"_ustr, xStatusIndicator ); } void lcl_triggerStatusIndicator_throw( const ::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const bool _bStart ) @@ -294,8 +294,8 @@ namespace return _rDescriptor.getPropertyValues(); ::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor ); - aMutableDescriptor.put( "FileName", _rURL ); - aMutableDescriptor.put( "URL", _rURL ); + aMutableDescriptor.put( u"FileName"_ustr, _rURL ); + aMutableDescriptor.put( u"URL"_ustr, _rURL ); return aMutableDescriptor.getPropertyValues(); } } @@ -329,7 +329,7 @@ constexpr OUString sPictures = u"Pictures"_ustr; static void lcl_uglyHackToStoreDialogeEmbedImages( const Reference< XStorageBasedLibraryContainer >& xDlgCont, const Reference< XStorage >& xStorage, const Reference< XModel >& rxModel, const Reference<XComponentContext >& rxContext ) { const Sequence< OUString > sLibraries = xDlgCont->getElementNames(); - Reference< XStorage > xTmpPic = xStorage->openStorageElement( "tempPictures", ElementModes::READWRITE ); + Reference< XStorage > xTmpPic = xStorage->openStorageElement( u"tempPictures"_ustr, ElementModes::READWRITE ); std::vector<uno::Reference<graphic::XGraphic>> vxGraphicList; for ( OUString const & sLibrary : sLibraries ) @@ -415,11 +415,11 @@ namespace /** property map for import/export info set */ comphelper::PropertyMapEntry const aExportInfoMap[] = { - { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("UsePrettyPrinting"), 0, ::cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("TargetStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + { u"BaseURI"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { u"UsePrettyPrinting"_ustr, 0, ::cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + { u"TargetStorage"_ustr, 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + { u"StreamRelPath"_ustr, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, }; } @@ -431,19 +431,19 @@ void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentCont lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs ); uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); - OUString sBaseURI = _rResource.getOrDefault("BaseURI", OUString()); + OUString sBaseURI = _rResource.getOrDefault(u"BaseURI"_ustr, OUString()); if (sBaseURI.isEmpty()) - sBaseURI = _rResource.getOrDefault("URL",OUString()); + sBaseURI = _rResource.getOrDefault(u"URL"_ustr,OUString()); assert(!sBaseURI.isEmpty()); // needed for relative URLs - xInfoSet->setPropertyValue("BaseURI", uno::Any(sBaseURI)); - xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("content.xml"))); + xInfoSet->setPropertyValue(u"BaseURI"_ustr, uno::Any(sBaseURI)); + xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"content.xml"_ustr)); const sal_Int32 nCount = aFilterCreationArgs.getLength(); aFilterCreationArgs.realloc(nCount + 1); aFilterCreationArgs.getArray()[nCount] <<= xInfoSet; Reference< XImporter > xImporter( - _rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, _rContext), + _rContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.comp.sdb.DBFilter"_ustr, aFilterCreationArgs, _rContext), UNO_QUERY_THROW ); Reference< XComponent > xComponent( _rxTargetComponent, UNO_QUERY_THROW ); @@ -498,19 +498,19 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& Argument impl_reset_nothrow(); ::comphelper::NamedValueCollection aResource( Arguments ); - if ( aResource.has( "FileName" ) && !aResource.has( "URL" ) ) + if ( aResource.has( u"FileName"_ustr ) && !aResource.has( u"URL"_ustr ) ) // FileName is the compatibility name for URL, so we might have clients passing // a FileName only. However, some of our code works with the URL only, so ensure // we have one. - aResource.put( "URL", aResource.get( "FileName" ) ); - if ( aResource.has( "URL" ) && !aResource.has( "FileName" ) ) + aResource.put( u"URL"_ustr, aResource.get( u"FileName"_ustr ) ); + if ( aResource.has( u"URL"_ustr ) && !aResource.has( u"FileName"_ustr ) ) // similar ... just in case there is legacy code which expects a FileName only - aResource.put( "FileName", aResource.get( "URL" ) ); + aResource.put( u"FileName"_ustr, aResource.get( u"URL"_ustr ) ); // now that somebody (perhaps) told us a macro execution mode, remember it as // ImposedMacroExecMode m_pImpl->setImposedMacroExecMode( - aResource.getOrDefault( "MacroExecutionMode", m_pImpl->getImposedMacroExecMode() ) ); + aResource.getOrDefault( u"MacroExecutionMode"_ustr, m_pImpl->getImposedMacroExecMode() ) ); impl_setInitializing(); try @@ -653,8 +653,8 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const OUString& i_SourceLocati // our load implementation expects the SalvagedFile and URL to be in the media descriptor ::comphelper::NamedValueCollection aMediaDescriptor( i_MediaDescriptor ); - aMediaDescriptor.put( "SalvagedFile", i_SalvagedFile ); - aMediaDescriptor.put( "URL", i_SourceLocation ); + aMediaDescriptor.put( u"SalvagedFile"_ustr, i_SalvagedFile ); + aMediaDescriptor.put( u"URL"_ustr, i_SourceLocation ); aGuard.clear(); // (load has an own guarding scheme) load( aMediaDescriptor.getPropertyValues() ); @@ -731,12 +731,12 @@ bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentU // for // we do not support macro signatures, so we can ignore that request - aArgs.remove("BreakMacroSignature"); + aArgs.remove(u"BreakMacroSignature"_ustr); bool bMacroEventRead = false; - if ((aArgs.get( "MacroEventRead" ) >>= bMacroEventRead) && bMacroEventRead) + if ((aArgs.get( u"MacroEventRead"_ustr ) >>= bMacroEventRead) && bMacroEventRead) m_pImpl->m_bMacroCallsSeenWhileLoading = true; - aArgs.remove( "MacroEventRead" ); + aArgs.remove( u"MacroEventRead"_ustr ); if (aArgs.empty()) return false; @@ -901,9 +901,9 @@ void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XControl // check if there are sub components to recover from our document storage bool bAttemptRecovery = m_bHasBeenRecovered; - if ( !bAttemptRecovery && m_pImpl->getMediaDescriptor().has( "ForceRecovery" ) ) + if ( !bAttemptRecovery && m_pImpl->getMediaDescriptor().has( u"ForceRecovery"_ustr ) ) // do not use getOrDefault, it will throw for invalid types, which is not desired here - m_pImpl->getMediaDescriptor().get( "ForceRecovery" ) >>= bAttemptRecovery; + m_pImpl->getMediaDescriptor().get( u"ForceRecovery"_ustr ) >>= bAttemptRecovery; if ( !bAttemptRecovery ) return; @@ -1126,12 +1126,12 @@ css::uno::Reference<css::embed::XStorage> ODatabaseDocument::impl_GetStorageOrCr { // Try to get the storage from arguments, then create storage for target URL uno::Reference<embed::XStorage> xTargetStorage; - _rArguments.get("TargetStorage") >>= xTargetStorage; + _rArguments.get(u"TargetStorage"_ustr) >>= xTargetStorage; if (!xTargetStorage.is()) xTargetStorage = impl_createStorageFor_throw(_rURL); // In case we got a StreamRelPath, then xTargetStorage should reference that sub-storage. - OUString sStreamRelPath = _rArguments.getOrDefault("StreamRelPath", OUString()); + OUString sStreamRelPath = _rArguments.getOrDefault(u"StreamRelPath"_ustr, OUString()); if (!sStreamRelPath.isEmpty()) xTargetStorage = xTargetStorage->openStorageElement(sStreamRelPath, embed::ElementModes::READWRITE); @@ -1414,7 +1414,7 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa aValue >>= sSupportService; if ( !sSupportService.isEmpty() ) { - Sequence<Any> aArgs{ Any(NamedValue("DatabaseDocument",Any(xMy))) }; + Sequence<Any> aArgs{ Any(NamedValue(u"DatabaseDocument"_ustr,Any(xMy))) }; xContainer.set( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext), UNO_QUERY); @@ -1565,8 +1565,8 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xC xSeek->seek(0); Reference< XPropertySet > xStreamProp( xOutputStream, UNO_QUERY_THROW ); - xStreamProp->setPropertyValue( INFO_MEDIATYPE, Any( OUString( "text/xml" ) ) ); - xStreamProp->setPropertyValue( "Compressed", Any( true ) ); + xStreamProp->setPropertyValue( INFO_MEDIATYPE, Any( u"text/xml"_ustr ) ); + xStreamProp->setPropertyValue( u"Compressed"_ustr, Any( true ) ); // write the stuff WriteThroughComponent( xOutputStream, xComponent, pServiceName, _rArguments, rMediaDesc ); @@ -1612,21 +1612,21 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); - xInfoSet->setPropertyValue("UsePrettyPrinting", uno::Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get())); + xInfoSet->setPropertyValue(u"UsePrettyPrinting"_ustr, uno::Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get())); if ( officecfg::Office::Common::Save::URL::FileSystem::get() ) { - OUString sBaseURI = _rMediaDescriptor.getOrDefault("BaseURI", OUString()); + OUString sBaseURI = _rMediaDescriptor.getOrDefault(u"BaseURI"_ustr, OUString()); if (sBaseURI.isEmpty()) - sBaseURI = _rMediaDescriptor.getOrDefault("URL",OUString()); - xInfoSet->setPropertyValue("BaseURI", uno::Any(sBaseURI)); + sBaseURI = _rMediaDescriptor.getOrDefault(u"URL"_ustr,OUString()); + xInfoSet->setPropertyValue(u"BaseURI"_ustr, uno::Any(sBaseURI)); } // Set TargetStorage, so it doesn't have to be re-constructed based on possibly empty URL. - xInfoSet->setPropertyValue("TargetStorage", uno::Any(m_pImpl->getRootStorage())); + xInfoSet->setPropertyValue(u"TargetStorage"_ustr, uno::Any(m_pImpl->getRootStorage())); // Set StreamRelPath, in case this document is an embedded one. OUString sStreamRelPath; - OUString sURL = _rMediaDescriptor.getOrDefault("URL", OUString()); + OUString sURL = _rMediaDescriptor.getOrDefault(u"URL"_ustr, OUString()); if (sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:")) { // In this case the host contains the real path, and the path is the embedded stream name. @@ -1636,7 +1636,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r sStreamRelPath = sStreamRelPath.copy(1); } if (!sStreamRelPath.isEmpty()) - xInfoSet->setPropertyValue("StreamRelPath", uno::Any(sStreamRelPath)); + xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, uno::Any(sStreamRelPath)); sal_Int32 nArgsLen = aDelegatorArguments.getLength(); aDelegatorArguments.realloc(nArgsLen+1); @@ -1663,7 +1663,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r { try { - xProp->setPropertyValue("Version" , uno::Any(aVersion)); + xProp->setPropertyValue(u"Version"_ustr , uno::Any(aVersion)); } catch (const uno::Exception&) { @@ -1676,11 +1676,11 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r Sequence< PropertyValue > aMediaDescriptor; _rMediaDescriptor >>= aMediaDescriptor; - xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("settings.xml"))); + xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"settings.xml"_ustr)); WriteThroughComponent( xComponent, "settings.xml", "com.sun.star.comp.sdb.XMLSettingsExporter", aDelegatorArguments, aMediaDescriptor, _rxTargetStorage ); - xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("content.xml"))); + xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"content.xml"_ustr)); WriteThroughComponent( xComponent, "content.xml", "com.sun.star.comp.sdb.DBExportFilter", aDelegatorArguments, aMediaDescriptor, _rxTargetStorage ); @@ -1718,7 +1718,7 @@ Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurat { m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext ); - OUString aUIConfigFolderName( "Configurations2" ); + OUString aUIConfigFolderName( u"Configurations2"_ustr ); // First try to open with READWRITE and then READ Reference< XStorage > xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, ElementModes::READWRITE ); @@ -1729,7 +1729,7 @@ Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurat Any a = xPropSet->getPropertyValue( INFO_MEDIATYPE ); if ( !( a >>= aMediaType ) || aMediaType.isEmpty() ) { - a <<= OUString("application/vnd.sun.xml.ui.configuration"); + a <<= u"application/vnd.sun.xml.ui.configuration"_ustr; xPropSet->setPropertyValue( INFO_MEDIATYPE, a ); } } @@ -1873,12 +1873,12 @@ void SAL_CALL ODatabaseDocument::removeEventListener( const Reference< lang::XEv // XServiceInfo OUString ODatabaseDocument::getImplementationName() { - return "com.sun.star.comp.dba.ODatabaseDocument"; + return u"com.sun.star.comp.dba.ODatabaseDocument"_ustr; } Sequence< OUString > ODatabaseDocument::getSupportedServiceNames() { - return { "com.sun.star.sdb.OfficeDatabaseDocument", "com.sun.star.document.OfficeDocument" }; + return { u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr, u"com.sun.star.document.OfficeDocument"_ustr }; } sal_Bool ODatabaseDocument::supportsService( const OUString& _rServiceName ) @@ -1897,9 +1897,9 @@ namespace /// Property map for embedded import info set. comphelper::PropertyMapEntry const aEmbeddedImportInfoMap[] = { - {OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - {OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - {OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + {u"StreamRelPath"_ustr, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + {u"StreamName"_ustr, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + {u"SourceStorage"_ustr, 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, }; } @@ -1908,13 +1908,13 @@ void SAL_CALL ODatabaseDocument::loadFromStorage(const Reference<XStorage>& xSto DocumentGuard aGuard(*this, DocumentGuard::InitMethod); uno::Reference<beans::XPropertySet> xInfoSet(comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aEmbeddedImportInfoMap))); - xInfoSet->setPropertyValue("StreamRelPath", uno::Any(comphelper::NamedValueCollection::getOrDefault(rMediaDescriptor, u"HierarchicalDocumentName", OUString()))); - xInfoSet->setPropertyValue("StreamName", uno::Any(OUString("content.xml"))); - xInfoSet->setPropertyValue("SourceStorage", uno::Any(xStorage)); + xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, uno::Any(comphelper::NamedValueCollection::getOrDefault(rMediaDescriptor, u"HierarchicalDocumentName", OUString()))); + xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"content.xml"_ustr)); + xInfoSet->setPropertyValue(u"SourceStorage"_ustr, uno::Any(xStorage)); uno::Sequence<uno::Any> aFilterCreationArgs{ Any(xInfoSet) }; - uno::Reference<document::XImporter> xImporter(m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, m_pImpl->m_aContext), uno::UNO_QUERY_THROW); + uno::Reference<document::XImporter> xImporter(m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(u"com.sun.star.comp.sdb.DBFilter"_ustr, aFilterCreationArgs, m_pImpl->m_aContext), uno::UNO_QUERY_THROW); uno::Reference<lang::XComponent> xComponent(*this, uno::UNO_QUERY_THROW); xImporter->setTargetDocument(xComponent); @@ -2048,7 +2048,7 @@ Sequence< OUString > SAL_CALL ODatabaseDocument::getAvailableViewControllerNames Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewController( const Reference< XFrame >& Frame ) { - return createViewController( "Default", Sequence< PropertyValue >(), Frame); + return createViewController( u"Default"_ustr, Sequence< PropertyValue >(), Frame); } Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( const OUString& ViewName, const Sequence< PropertyValue >& Arguments, const Reference< XFrame >& Frame ) @@ -2062,13 +2062,13 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons aGuard.clear(); Reference< XController2 > xController( - m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext("org.openoffice.comp.dbu.OApplicationController", m_pImpl->m_aContext), + m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext(u"org.openoffice.comp.dbu.OApplicationController"_ustr, m_pImpl->m_aContext), UNO_QUERY_THROW ); ::comphelper::NamedValueCollection aInitArgs( Arguments ); - aInitArgs.put( "Frame", Frame ); + aInitArgs.put( u"Frame"_ustr, Frame ); if ( ViewName == "Preview" ) - aInitArgs.put( "Preview", true ); + aInitArgs.put( u"Preview"_ustr, true ); Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW ); xInitController->initialize( aInitArgs.getWrappedPropertyValues() ); diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 62cacc3b1f44..d97ede01612a 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -471,12 +471,12 @@ void SAL_CALL ODatabaseSource::disposing( const css::lang::EventObject& Source ) // XServiceInfo OUString ODatabaseSource::getImplementationName( ) { - return "com.sun.star.comp.dba.ODatabaseSource"; + return u"com.sun.star.comp.dba.ODatabaseSource"_ustr; } Sequence< OUString > ODatabaseSource::getSupportedServiceNames( ) { - return { SERVICE_SDB_DATASOURCE, "com.sun.star.sdb.DocumentDataSource" }; + return { SERVICE_SDB_DATASOURCE, u"com.sun.star.sdb.DocumentDataSource"_ustr }; } sal_Bool ODatabaseSource::supportsService( const OUString& _rServiceName ) @@ -545,7 +545,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString { Reference<XStorage> const xRootStorage = m_pImpl->getOrCreateRootStorage(); OUString sMigrEnvVal; - osl_getEnvironment(OUString("DBACCESS_HSQL_MIGRATION").pData, + osl_getEnvironment(u"DBACCESS_HSQL_MIGRATION"_ustr.pData, &sMigrEnvVal.pData); if(!sMigrEnvVal.isEmpty()) bNeedMigration = true; @@ -553,7 +553,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString { Reference<XPropertySet> const xPropSet(xRootStorage, UNO_QUERY_THROW); sal_Int32 nOpenMode(0); - if ((xPropSet->getPropertyValue("OpenMode") >>= nOpenMode) + if ((xPropSet->getPropertyValue(u"OpenMode"_ustr) >>= nOpenMode) && (nOpenMode & css::embed::ElementModes::WRITE) && (!Application::IsHeadlessModeEnabled())) { @@ -574,7 +574,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString { SAL_INFO("dbaccess", "No file content_before_migration.xml found" ); } - xRootStorage->copyElementTo("content.xml", xRootStorage, + xRootStorage->copyElementTo(u"content.xml"_ustr, xRootStorage, BACKUP_XML_NAME); m_pImpl->m_sConnectURL = "sdbc:embedded:firebird"; @@ -659,7 +659,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString pDriverInfo[nCount].Name = "Storage"; Reference< css::document::XDocumentSubStorageSupplier> xDocSup( m_pImpl->getDocumentSubStorageSupplier() ); - pDriverInfo[nCount++].Value <<= xDocSup->getDocumentSubStorage("database",ElementModes::READWRITE); + pDriverInfo[nCount++].Value <<= xDocSup->getDocumentSubStorage(u"database"_ustr,ElementModes::READWRITE); pDriverInfo[nCount].Name = "Document"; pDriverInfo[nCount++].Value <<= getDatabaseDocument(); @@ -700,7 +700,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString Reference< css::document::XDocumentSubStorageSupplier> xDocSup( m_pImpl->getDocumentSubStorageSupplier() ); dbahsql::HsqlImporter importer(xReturn, - xDocSup->getDocumentSubStorage("database",ElementModes::READWRITE) ); + xDocSup->getDocumentSubStorage(u"database"_ustr,ElementModes::READWRITE) ); importer.importHsqlDatabase(m_pImpl->GetFrameWeld()); } #endif @@ -1181,7 +1181,7 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) aValue >>= sSupportService; if ( !sSupportService.isEmpty() ) { - Sequence<Any> aArgs{ Any(NamedValue("DataSource",Any(xMy))) }; + Sequence<Any> aArgs{ Any(NamedValue(u"DataSource"_ustr,Any(xMy))) }; xContainer.set( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext), UNO_QUERY); } } @@ -1316,8 +1316,8 @@ Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocume void SAL_CALL ODatabaseSource::initialize( css::uno::Sequence< css::uno::Any > const & rArguments) { ::comphelper::NamedValueCollection aProperties( rArguments ); - if (aProperties.has("ParentWindow")) - aProperties.get("ParentWindow") >>= m_pImpl->m_xDialogParent; + if (aProperties.has(u"ParentWindow"_ustr)) + aProperties.get(u"ParentWindow"_ustr) >>= m_pImpl->m_xDialogParent; } Reference< XInterface > ODatabaseSource::getThis() const diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index 807dc5ec98c3..3dca110c3d1c 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -152,12 +152,12 @@ css::uno::Sequence<sal_Int8> ODefinitionContainer::getImplementationId() // XServiceInfo OUString SAL_CALL ODefinitionContainer::getImplementationName( ) { - return "com.sun.star.sdb.ODefinitionContainer"; + return u"com.sun.star.sdb.ODefinitionContainer"_ustr; } Sequence< OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( ) { - return { "com.sun.star.sdb.DefinitionContainer", "com.sun.star.ucb.Content" }; + return { u"com.sun.star.sdb.DefinitionContainer"_ustr, u"com.sun.star.ucb.Content"_ustr }; } // XNameContainer diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index e8ea1dd63869..85661d8b270c 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -126,7 +126,7 @@ css::uno::Sequence< css::uno::Type > ODocumentContainer::getTypes() } OUString SAL_CALL ODocumentContainer::getImplementationName() { - return "com.sun.star.comp.dba.ODocumentContainer"; + return u"com.sun.star.comp.dba.ODocumentContainer"_ustr; }; sal_Bool SAL_CALL ODocumentContainer::supportsService(const OUString& _rServiceName) { @@ -215,10 +215,10 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments lcl_extractAndRemove( aArgs, PROPERTY_ACTIVE_CONNECTION, xConnection ); lcl_extractAndRemove( aArgs, PROPERTY_AS_TEMPLATE, bAsTemplate ); lcl_extractAndRemove( aArgs, INFO_MEDIATYPE, sMediaType ); - lcl_extractAndRemove( aArgs, "DocumentServiceName" , sDocServiceName ); + lcl_extractAndRemove( aArgs, u"DocumentServiceName"_ustr , sDocServiceName ); // ClassID has two allowed types, so a special treatment here -e ... etc. - the rest is truncated