emfio/qa/cppunit/emf/EmfImportTest.cxx | 1052 +++++------ emfio/qa/cppunit/wmf/wmfimporttest.cxx | 290 +-- emfio/source/emfuno/xemfparser.cxx | 6 emfio/source/reader/emfreader.cxx | 2 emfio/source/reader/mtftools.cxx | 2 extensions/qa/bibliography/bibliography.cxx | 2 extensions/qa/update/test_update.cxx | 10 extensions/source/abpilot/abpfinalpage.cxx | 22 extensions/source/abpilot/admininvokationpage.cxx | 6 extensions/source/abpilot/datasourcehandling.cxx | 8 extensions/source/abpilot/fieldmappingimpl.cxx | 12 extensions/source/abpilot/fieldmappingpage.cxx | 6 extensions/source/abpilot/tableselectionpage.cxx | 4 extensions/source/abpilot/typeselectionpage.cxx | 22 extensions/source/abpilot/unodialogabp.cxx | 10 extensions/source/bibliography/bibbeam.cxx | 4 extensions/source/bibliography/bibconfig.cxx | 22 extensions/source/bibliography/bibload.cxx | 22 extensions/source/bibliography/bibview.cxx | 4 extensions/source/bibliography/datman.cxx | 158 - extensions/source/bibliography/framectr.cxx | 18 extensions/source/bibliography/general.cxx | 166 - extensions/source/bibliography/toolbar.cxx | 46 extensions/source/config/ldap/ldapaccess.cxx | 4 extensions/source/config/ldap/ldapuserprofilebe.cxx | 26 extensions/source/dbpilots/commonpagesdbp.cxx | 34 extensions/source/dbpilots/controlwizard.cxx | 38 extensions/source/dbpilots/gridwizard.cxx | 20 extensions/source/dbpilots/groupboxwiz.cxx | 32 extensions/source/dbpilots/listcombowizard.cxx | 28 extensions/source/dbpilots/optiongrouplayouter.cxx | 18 extensions/source/dbpilots/wizardservices.cxx | 12 extensions/source/logging/consolehandler.cxx | 6 extensions/source/logging/csvformatter.cxx | 8 extensions/source/logging/filehandler.cxx | 6 extensions/source/logging/logger.cxx | 6 extensions/source/logging/loggerconfig.cxx | 6 extensions/source/logging/loghandler.cxx | 10 extensions/source/logging/plaintextformatter.cxx | 8 extensions/source/logging/simpletextformatter.cxx | 4 extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 4 extensions/source/propctrlr/browserline.cxx | 16 extensions/source/propctrlr/browserlistbox.cxx | 4 extensions/source/propctrlr/browserpage.cxx | 4 extensions/source/propctrlr/buttonnavigationhandler.cxx | 4 extensions/source/propctrlr/cellbindinghandler.cxx | 4 extensions/source/propctrlr/controlfontdialog.cxx | 6 extensions/source/propctrlr/defaultforminspection.cxx | 4 extensions/source/propctrlr/defaulthelpprovider.cxx | 4 extensions/source/propctrlr/editpropertyhandler.cxx | 6 extensions/source/propctrlr/eformspropertyhandler.cxx | 14 extensions/source/propctrlr/eventhandler.cxx | 16 extensions/source/propctrlr/fontdialog.cxx | 8 extensions/source/propctrlr/formcomponenthandler.cxx | 44 extensions/source/propctrlr/formcontroller.cxx | 8 extensions/source/propctrlr/formgeometryhandler.cxx | 8 extensions/source/propctrlr/formlinkdialog.cxx | 32 extensions/source/propctrlr/formmetadata.cxx | 4 extensions/source/propctrlr/genericpropertyhandler.cxx | 10 extensions/source/propctrlr/handlerhelper.cxx | 10 extensions/source/propctrlr/inspectorhelpwindow.cxx | 4 extensions/source/propctrlr/inspectormodelbase.cxx | 8 extensions/source/propctrlr/listselectiondlg.cxx | 6 extensions/source/propctrlr/newdatatype.cxx | 6 extensions/source/propctrlr/objectinspectormodel.cxx | 6 extensions/source/propctrlr/pcrunodialogs.cxx | 10 extensions/source/propctrlr/propcontroller.cxx | 52 extensions/source/propctrlr/propertyeditor.cxx | 6 extensions/source/propctrlr/propertyhandler.hxx | 2 extensions/source/propctrlr/selectlabeldialog.cxx | 8 extensions/source/propctrlr/sqlcommanddesign.cxx | 12 extensions/source/propctrlr/standardcontrol.cxx | 30 extensions/source/propctrlr/stringrepresentation.cxx | 6 extensions/source/propctrlr/submissionhandler.cxx | 4 extensions/source/propctrlr/taborder.cxx | 12 extensions/source/propctrlr/usercontrol.cxx | 16 extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 4 extensions/source/scanner/grid.cxx | 8 extensions/source/scanner/sane.cxx | 4 extensions/source/scanner/sanedlg.cxx | 48 extensions/source/scanner/scanner.cxx | 8 extensions/source/scanner/scanunx.cxx | 14 extensions/source/update/check/download.cxx | 16 extensions/source/update/check/updatecheck.cxx | 16 extensions/source/update/check/updatecheckconfig.cxx | 48 extensions/source/update/check/updatecheckjob.cxx | 4 extensions/source/update/check/updatehdl.cxx | 236 +- extensions/source/update/check/updateprotocol.cxx | 26 extensions/source/update/feed/updatefeed.cxx | 40 extensions/source/update/ui/updatecheckui.cxx | 10 90 files changed, 1573 insertions(+), 1467 deletions(-)
New commits: commit f49d8ce4614bb12a6c9f0c6e83812aa69b9b2454 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 7 16:01:41 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 7 18:15:14 2024 +0200 loplugin:ostr in extensions Change-Id: I32f74fe67e8eb0b6b12ee60405c3d99932b75182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/extensions/qa/bibliography/bibliography.cxx b/extensions/qa/bibliography/bibliography.cxx index 3919b787f3fe..1657fec35db9 100644 --- a/extensions/qa/bibliography/bibliography.cxx +++ b/extensions/qa/bibliography/bibliography.cxx @@ -32,7 +32,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBibliographyLoader) uno::Sequence<beans::PropertyValue> aSeq; // When getting the column names: - xPropSet->getPropertyValue("BibliographyDataFieldNames") >>= aSeq; + xPropSet->getPropertyValue(u"BibliographyDataFieldNames"_ustr) >>= aSeq; // Then make sure we have columns and all have non-empty names: CPPUNIT_ASSERT(aSeq.hasElements()); diff --git a/extensions/qa/update/test_update.cxx b/extensions/qa/update/test_update.cxx index 27d634b3b374..cfc5c4a59414 100644 --- a/extensions/qa/update/test_update.cxx +++ b/extensions/qa/update/test_update.cxx @@ -54,7 +54,7 @@ protected: uno::Reference< container::XEnumeration > aUpdateInfoEnumeration = m_xProvider->getUpdateInformationEnumeration( m_aRepositoryList, - "TODO" ); // unused when we do not have a 'feed' + u"TODO"_ustr ); // unused when we do not have a 'feed' if ( !aUpdateInfoEnumeration.is() ) CPPUNIT_FAIL( "Calling getUpdateInformationEnumeration() with TODO failed." ); @@ -65,7 +65,7 @@ protected: deployment::UpdateInformationEntry aEntry; if ( aUpdateInfoEnumeration->nextElement() >>= aEntry ) { - CPPUNIT_ASSERT_EQUAL( OUString("description"), aEntry.UpdateDocument->getNodeName() ); + CPPUNIT_ASSERT_EQUAL( u"description"_ustr, aEntry.UpdateDocument->getNodeName() ); uno::Reference< dom::XNodeList> xChildNodes = aEntry.UpdateDocument->getChildNodes(); CPPUNIT_ASSERT( xChildNodes.is() ); @@ -105,10 +105,10 @@ protected: u"x86", m_aRepositoryList, u"111111-222222-333333-444444", - "InstallSetID" ) ) + u"InstallSetID"_ustr ) ) { CPPUNIT_ASSERT_EQUAL( std::size_t(1), aInfo.Sources.size() ); - CPPUNIT_ASSERT_EQUAL( OUString("http://www.libreoffice.org/download/"), aInfo.Sources[0].URL ); + CPPUNIT_ASSERT_EQUAL( u"http://www.libreoffice.org/download/"_ustr, aInfo.Sources[0].URL ); } else CPPUNIT_FAIL( "Calling checkForUpdates() failed." ); @@ -125,7 +125,7 @@ protected: u"x86", m_aRepositoryList, u"123456-abcdef-1a2b3c-4d5e6f", - "InstallSetID" ) ) + u"InstallSetID"_ustr ) ) { CPPUNIT_ASSERT( aInfo.Sources.empty() ); } diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index c75f9cc5b168..114533edf1b3 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -33,22 +33,22 @@ namespace abp { static std::shared_ptr<const SfxFilter> lcl_getBaseFilter() { - std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)"); + std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName(u"StarOffice XML (Base)"_ustr); OSL_ENSURE(pFilter,"Filter: StarOffice XML (Base) could not be found!"); return pFilter; } FinalPage::FinalPage(weld::Container* pPage, OAddressBookSourcePilot* pWizard) - : AddressBookSourcePage(pPage, pWizard, "modules/sabpilot/ui/datasourcepage.ui", - "DataSourcePage") - , m_xLocation(new SvtURLBox(m_xBuilder->weld_combo_box("location"))) - , m_xBrowse(m_xBuilder->weld_button("browse")) - , m_xRegisterName(m_xBuilder->weld_check_button("available")) - , m_xEmbed(m_xBuilder->weld_check_button("embed")) - , m_xNameLabel(m_xBuilder->weld_label("nameft")) - , m_xLocationLabel(m_xBuilder->weld_label("locationft")) - , m_xName(m_xBuilder->weld_entry("name")) - , m_xDuplicateNameError(m_xBuilder->weld_label("warning")) + : AddressBookSourcePage(pPage, pWizard, u"modules/sabpilot/ui/datasourcepage.ui"_ustr, + u"DataSourcePage"_ustr) + , m_xLocation(new SvtURLBox(m_xBuilder->weld_combo_box(u"location"_ustr))) + , m_xBrowse(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xRegisterName(m_xBuilder->weld_check_button(u"available"_ustr)) + , m_xEmbed(m_xBuilder->weld_check_button(u"embed"_ustr)) + , m_xNameLabel(m_xBuilder->weld_label(u"nameft"_ustr)) + , m_xLocationLabel(m_xBuilder->weld_label(u"locationft"_ustr)) + , m_xName(m_xBuilder->weld_entry(u"name"_ustr)) + , m_xDuplicateNameError(m_xBuilder->weld_label(u"warning"_ustr)) { m_xLocation->SetSmartProtocol(INetProtocol::File); m_xLocation->DisableHistory(); diff --git a/extensions/source/abpilot/admininvokationpage.cxx b/extensions/source/abpilot/admininvokationpage.cxx index 2f51d8639896..cb7d097a3138 100644 --- a/extensions/source/abpilot/admininvokationpage.cxx +++ b/extensions/source/abpilot/admininvokationpage.cxx @@ -24,9 +24,9 @@ namespace abp { AdminDialogInvokationPage::AdminDialogInvokationPage(weld::Container* pPage, OAddressBookSourcePilot* pController) - : AddressBookSourcePage(pPage, pController, "modules/sabpilot/ui/invokeadminpage.ui", "InvokeAdminPage") - , m_xInvokeAdminDialog(m_xBuilder->weld_button("settings")) - , m_xErrorMessage(m_xBuilder->weld_label("warning")) + : AddressBookSourcePage(pPage, pController, u"modules/sabpilot/ui/invokeadminpage.ui"_ustr, u"InvokeAdminPage"_ustr) + , m_xInvokeAdminDialog(m_xBuilder->weld_button(u"settings"_ustr)) + , m_xErrorMessage(m_xBuilder->weld_label(u"warning"_ustr)) { m_xInvokeAdminDialog->connect_clicked(LINK(this, AdminDialogInvokationPage, OnInvokeAdminDialog)); } diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index c26066b8daaa..77f94b71600c 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -140,7 +140,7 @@ namespace abp if (xNewDataSource.is()) { xNewDataSource->setPropertyValue( - "URL", + u"URL"_ustr, Any( OUString::createFromAscii( _pInitialAsciiURL ) ) ); } @@ -345,7 +345,7 @@ namespace abp else { // Embed. - OUString aStreamRelPath = "EmbeddedDatabase"; + OUString aStreamRelPath = u"EmbeddedDatabase"_ustr; auto xContext(comphelper::getProcessComponentContext()); auto xUri = css::uri::UriReferenceFactory::create(xContext)->parse(aOwnURL); assert(xUri.is()); @@ -366,8 +366,8 @@ namespace abp // Refer to the sub-storage name in the document settings, so // we can load it again next time the file is imported. uno::Reference<lang::XMultiServiceFactory> xFactory(pObjectShell->GetModel(), uno::UNO_QUERY); - uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); - xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::Any(aStreamRelPath)); + uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); + xPropertySet->setPropertyValue(u"EmbeddedDatabaseName"_ustr, uno::Any(aStreamRelPath)); } } } diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 3b54e7504f1d..1aa2a7c322e7 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -86,7 +86,7 @@ namespace abp Sequence< AliasProgrammaticPair > aMapping; bool bSuccess = - xDialogProps->getPropertyValue("FieldMapping") >>= aMapping; + xDialogProps->getPropertyValue(u"FieldMapping"_ustr) >>= aMapping; DBG_ASSERT( bSuccess, "fieldmapping::invokeDialog: invalid property type for FieldMapping!" ); // and copy it into the map @@ -209,7 +209,7 @@ namespace abp OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext( _rxContext, sAddressBookNodeName); - OConfigurationNode aFields = aAddressBookSettings.openNode( OUString( "Fields" ) ); + OConfigurationNode aFields = aAddressBookSettings.openNode( u"Fields"_ustr ); // loop through all existent fields static constexpr OUString sProgrammaticNodeName( u"ProgrammaticFieldName"_ustr ); @@ -276,9 +276,9 @@ namespace abp OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext( _rxContext, sAddressBookNodeName); - aAddressBookSettings.setNodeValue( OUString( "DataSourceName" ), Any( _rDataSourceName ) ); - aAddressBookSettings.setNodeValue( OUString( "Command" ), Any( _rTableName ) ); - aAddressBookSettings.setNodeValue( OUString( "CommandType" ), Any( sal_Int16(CommandType::TABLE) ) ); + aAddressBookSettings.setNodeValue( u"DataSourceName"_ustr, Any( _rDataSourceName ) ); + aAddressBookSettings.setNodeValue( u"Command"_ustr, Any( _rTableName ) ); + aAddressBookSettings.setNodeValue( u"CommandType"_ustr, Any( sal_Int16(CommandType::TABLE) ) ); // commit the changes done aAddressBookSettings.commit(); @@ -294,7 +294,7 @@ namespace abp _rxContext, sAddressBookNodeName); // set the flag - aAddressBookSettings.setNodeValue( OUString( "AutoPilotCompleted" ), Any( true ) ); + aAddressBookSettings.setNodeValue( u"AutoPilotCompleted"_ustr, Any( true ) ); // commit the changes done aAddressBookSettings.commit(); diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 1652723fda99..8d684fa0b40a 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -26,9 +26,9 @@ namespace abp { FieldMappingPage::FieldMappingPage(weld::Container* pPage, OAddressBookSourcePilot* pController) - : AddressBookSourcePage(pPage, pController, "modules/sabpilot/ui/fieldassignpage.ui", "FieldAssignPage") - , m_xInvokeDialog(m_xBuilder->weld_button("assign")) - , m_xHint(m_xBuilder->weld_label("hint")) + : AddressBookSourcePage(pPage, pController, u"modules/sabpilot/ui/fieldassignpage.ui"_ustr, u"FieldAssignPage"_ustr) + , m_xInvokeDialog(m_xBuilder->weld_button(u"assign"_ustr)) + , m_xHint(m_xBuilder->weld_label(u"hint"_ustr)) { m_xInvokeDialog->connect_clicked(LINK(this, FieldMappingPage, OnInvokeDialog)); } diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx index abf8e582967a..1df2ef092e31 100644 --- a/extensions/source/abpilot/tableselectionpage.cxx +++ b/extensions/source/abpilot/tableselectionpage.cxx @@ -28,8 +28,8 @@ namespace abp { TableSelectionPage::TableSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pController) - : AddressBookSourcePage(pPage, pController, "modules/sabpilot/ui/selecttablepage.ui", "SelectTablePage") - , m_xTableList(m_xBuilder->weld_tree_view("table")) + : AddressBookSourcePage(pPage, pController, u"modules/sabpilot/ui/selecttablepage.ui"_ustr, u"SelectTablePage"_ustr) + , m_xTableList(m_xBuilder->weld_tree_view(u"table"_ustr)) { m_xTableList->connect_changed( LINK( this, TableSelectionPage, OnTableSelected ) ); m_xTableList->connect_row_activated( LINK( this, TableSelectionPage, OnTableDoubleClicked ) ); diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index 8db9f5a2ae43..bde50171fead 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -32,14 +32,14 @@ namespace abp // TypeSelectionPage TypeSelectionPage::TypeSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pDialog) - : AddressBookSourcePage(pPage, pDialog, "modules/sabpilot/ui/selecttypepage.ui", "SelectTypePage") - , m_xEvolution(m_xBuilder->weld_radio_button("evolution")) - , m_xEvolutionGroupwise(m_xBuilder->weld_radio_button("groupwise")) - , m_xEvolutionLdap(m_xBuilder->weld_radio_button("evoldap")) - , m_xThunderbird(m_xBuilder->weld_radio_button("thunderbird")) - , m_xKab(m_xBuilder->weld_radio_button("kde")) - , m_xMacab(m_xBuilder->weld_radio_button("macosx")) - , m_xOther(m_xBuilder->weld_radio_button("other")) + : AddressBookSourcePage(pPage, pDialog, u"modules/sabpilot/ui/selecttypepage.ui"_ustr, u"SelectTypePage"_ustr) + , m_xEvolution(m_xBuilder->weld_radio_button(u"evolution"_ustr)) + , m_xEvolutionGroupwise(m_xBuilder->weld_radio_button(u"groupwise"_ustr)) + , m_xEvolutionLdap(m_xBuilder->weld_radio_button(u"evoldap"_ustr)) + , m_xThunderbird(m_xBuilder->weld_radio_button(u"thunderbird"_ustr)) + , m_xKab(m_xBuilder->weld_radio_button(u"kde"_ustr)) + , m_xMacab(m_xBuilder->weld_radio_button(u"macosx"_ustr)) + , m_xOther(m_xBuilder->weld_radio_button(u"other"_ustr)) { //TODO: For now, try to keep offering the same choices like before the // Mozilla cleanup, even if the status of what driver actually @@ -71,7 +71,7 @@ namespace abp try { // check whether Evolution is available - Reference< XDriver > xDriver( xManager->getDriverByURL("sdbc:address:evolution:local") ); + Reference< XDriver > xDriver( xManager->getDriverByURL(u"sdbc:address:evolution:local"_ustr) ); if ( xDriver.is() ) bHaveEvolution = true; } @@ -82,7 +82,7 @@ namespace abp // check whether KDE address book is available try { - Reference< XDriver > xDriver( xManager->getDriverByURL("sdbc:address:kab") ); + Reference< XDriver > xDriver( xManager->getDriverByURL(u"sdbc:address:kab"_ustr) ); if ( xDriver.is() ) bHaveKab = true; } @@ -93,7 +93,7 @@ namespace abp try { // check whether macOS address book is available - Reference< XDriver > xDriver( xManager->getDriverByURL("sdbc:address:macab") ); + Reference< XDriver > xDriver( xManager->getDriverByURL(u"sdbc:address:macab"_ustr) ); if ( xDriver.is() ) bHaveMacab = true; } diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx index 9608f2551f2b..4baafbf7f705 100644 --- a/extensions/source/abpilot/unodialogabp.cxx +++ b/extensions/source/abpilot/unodialogabp.cxx @@ -37,7 +37,7 @@ namespace abp OABSPilotUno::OABSPilotUno(const Reference< XComponentContext >& _rxORB) :OGenericUnoDialog(_rxORB) { - registerProperty( "DataSourceName", PROPERTY_ID_DATASOURCENAME, PropertyAttribute::READONLY , + registerProperty( u"DataSourceName"_ustr, PROPERTY_ID_DATASOURCENAME, PropertyAttribute::READONLY , &m_sDataSourceName, cppu::UnoType<decltype(m_sDataSourceName)>::get() ); } @@ -72,12 +72,12 @@ namespace abp OUString SAL_CALL OABSPilotUno::getImplementationName() { - return "org.openoffice.comp.abp.OAddressBookSourcePilot"; + return u"org.openoffice.comp.abp.OAddressBookSourcePilot"_ustr; } css::uno::Sequence<OUString> SAL_CALL OABSPilotUno::getSupportedServiceNames() { - return { "com.sun.star.ui.dialogs.AddressBookSourcePilot" }; + return { u"com.sun.star.ui.dialogs.AddressBookSourcePilot"_ustr }; } Reference<XPropertySetInfo> SAL_CALL OABSPilotUno::getPropertySetInfo() @@ -105,7 +105,7 @@ namespace abp Reference<awt::XWindow> xParentWindow; if (aArguments.getLength() == 1 && (aArguments[0] >>= xParentWindow) ) { Sequence< Any > aNewArgs{ Any(PropertyValue( - "ParentWindow", 0, Any(xParentWindow), PropertyState_DIRECT_VALUE )) }; + u"ParentWindow"_ustr, 0, Any(xParentWindow), PropertyState_DIRECT_VALUE )) }; OGenericUnoDialog::initialize(aNewArgs); } else { OGenericUnoDialog::initialize(aArguments); @@ -128,7 +128,7 @@ namespace abp // User has one chance to accept it or not. // (or he can start it again by using wizard-menu!) // So we should deregister it on our general job execution service by using right protocol parameters. - css::uno::Sequence< css::beans::NamedValue > lProtocol { { "Deactivate", css::uno::Any( true ) } }; + css::uno::Sequence< css::beans::NamedValue > lProtocol { { u"Deactivate"_ustr, css::uno::Any( true ) } }; return Any( lProtocol ); } diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index 1f83070f3c54..0fa2a4b1ec7d 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -134,7 +134,7 @@ namespace bib if ( xPropSet.is() && m_xGridModel.is() ) { - uno::Any aAny = xPropSet->getPropertyValue( "DefaultControl" ); + uno::Any aAny = xPropSet->getPropertyValue( u"DefaultControl"_ustr ); OUString aControlName; aAny >>= aControlName; @@ -146,7 +146,7 @@ namespace bib return; // Peer as Child to the FrameWindow - m_xControlContainer->addControl("GridControl", m_xControl); + m_xControlContainer->addControl(u"GridControl"_ustr, m_xControl); m_xGridWin.set(m_xControl, UNO_QUERY ); m_xDispatchProviderInterception.set(m_xControl, UNO_QUERY ); m_xGridWin->setVisible( true ); diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index 746e136c25f3..499ab41aeeea 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -39,20 +39,20 @@ Sequence<OUString> const & BibConfig::GetPropertyNames() { static Sequence<OUString> aNames = { - "CurrentDataSource/DataSourceName", - "CurrentDataSource/Command", - "CurrentDataSource/CommandType", - "BeamerHeight", - "ViewHeight", - "QueryText", - "QueryField", - "ShowColumnAssignmentWarning" + u"CurrentDataSource/DataSourceName"_ustr, + u"CurrentDataSource/Command"_ustr, + u"CurrentDataSource/CommandType"_ustr, + u"BeamerHeight"_ustr, + u"ViewHeight"_ustr, + u"QueryText"_ustr, + u"QueryField"_ustr, + u"ShowColumnAssignmentWarning"_ustr }; return aNames; } BibConfig::BibConfig() - : ConfigItem("Office.DataAccess/Bibliography", ConfigItemMode::NONE) + : ConfigItem(u"Office.DataAccess/Bibliography"_ustr, ConfigItemMode::NONE) , nTblOrQuery(0) , nBeamerSize(0) , nViewSize(0) @@ -224,8 +224,8 @@ void BibConfig::ImplCommit() sPrefix += "Fields"; sal_Int32 nFieldAssignment = 0; - OUString sFieldName = "/ProgrammaticFieldName"; - OUString sDatabaseFieldName = "/AssignedFieldName"; + OUString sFieldName = u"/ProgrammaticFieldName"_ustr; + OUString sDatabaseFieldName = u"/AssignedFieldName"_ustr; ClearNodeSet( sPrefix ); while(nFieldAssignment < COLUMN_COUNT && diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 755b43d8defa..00b7192f2e96 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -139,7 +139,7 @@ BibliographyLoader::~BibliographyLoader() // XServiceInfo OUString BibliographyLoader::getImplementationName() { - return "com.sun.star.extensions.Bibliography"; + return u"com.sun.star.extensions.Bibliography"_ustr; } // XServiceInfo @@ -151,7 +151,7 @@ sal_Bool BibliographyLoader::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > BibliographyLoader::getSupportedServiceNames() { - return { "com.sun.star.frame.FrameLoader", "com.sun.star.frame.Bibliography" }; + return { u"com.sun.star.frame.FrameLoader"_ustr, u"com.sun.star.frame.Bibliography"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -182,7 +182,7 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const OUString { Any aTitle; aTitle <<= BibResId(RID_BIB_STR_FRAME_TITLE); - xPrSet->setPropertyValue("Title", aTitle); + xPrSet->setPropertyValue(u"Title"_ustr, aTitle); } if(aPartName == u"View" || aPartName == u"View1") { @@ -256,7 +256,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, { try { - Any a = xPropSet->getPropertyValue("LayoutManager"); + Any a = xPropSet->getPropertyValue(u"LayoutManager"_ustr); a >>= xLayoutManager; } catch ( const uno::Exception& ) @@ -265,7 +265,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, } if ( xLayoutManager.is() ) - xLayoutManager->createElement( "private:resource/menubar/menubar" ); + xLayoutManager->createElement( u"private:resource/menubar/menubar"_ustr ); } BibDataManager* BibliographyLoader::GetDataManager()const @@ -284,22 +284,22 @@ Reference< XNameAccess > const & BibliographyLoader::GetDataColumns() const if (!m_xColumns.is()) { Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); - Reference< XRowSet > xRowSet(xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY); + Reference< XRowSet > xRowSet(xMgr->createInstance(u"com.sun.star.sdb.RowSet"_ustr), UNO_QUERY); Reference< XPropertySet > xResultSetProps(xRowSet, UNO_QUERY); DBG_ASSERT(xResultSetProps.is() , "BibliographyLoader::GetDataCursor : invalid row set (no XResultSet or no XPropertySet) !"); BibDBDescriptor aBibDesc = BibModul::GetConfig()->GetBibliographyURL(); Any aBibUrlAny; aBibUrlAny <<= aBibDesc.sDataSource; - xResultSetProps->setPropertyValue("DataSourceName", aBibUrlAny); + xResultSetProps->setPropertyValue(u"DataSourceName"_ustr, aBibUrlAny); Any aCommandType; aCommandType <<= aBibDesc.nCommandType; - xResultSetProps->setPropertyValue("CommandType", aCommandType); + xResultSetProps->setPropertyValue(u"CommandType"_ustr, aCommandType); Any aTableName; aTableName <<= aBibDesc.sTableOrQuery; - xResultSetProps->setPropertyValue("Command", aTableName); + xResultSetProps->setPropertyValue(u"Command"_ustr, aTableName); Any aResultSetType; aResultSetType <<= sal_Int32(ResultSetType::SCROLL_INSENSITIVE); - xResultSetProps->setPropertyValue("ResultSetType", aResultSetType); + xResultSetProps->setPropertyValue(u"ResultSetType"_ustr, aResultSetType); Any aResultSetCurrency; aResultSetCurrency <<= sal_Int32(ResultSetConcurrency::UPDATABLE); - xResultSetProps->setPropertyValue("ResultSetConcurrency", aResultSetCurrency); + xResultSetProps->setPropertyValue(u"ResultSetConcurrency"_ustr, aResultSetCurrency); bool bSuccess = false; try diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index 0809789854ce..75db3e0d44d0 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -43,8 +43,8 @@ namespace std::unique_ptr<weld::CheckButton> m_xWarningOnBox; public: MessageWithCheck(weld::Window *pParent) - : MessageDialogController(pParent, "modules/sbibliography/ui/querydialog.ui", "QueryDialog", "ask") - , m_xWarningOnBox(m_xBuilder->weld_check_button("ask")) + : MessageDialogController(pParent, u"modules/sbibliography/ui/querydialog.ui"_ustr, u"QueryDialog"_ustr, u"ask"_ustr) + , m_xWarningOnBox(m_xBuilder->weld_check_button(u"ask"_ustr)) { } bool get_active() const { return m_xWarningOnBox->get_active(); } diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 407645c1df89..398ab9b74579 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -126,7 +126,7 @@ static Reference< XConnection > getConnection(const Reference< XInterface > & if (!xFormProps.is()) return xConn; - xConn.set(xFormProps->getPropertyValue("ActiveConnection"), UNO_QUERY); + xConn.set(xFormProps->getPropertyValue(u"ActiveConnection"_ustr), UNO_QUERY); if (!xConn.is()) { SAL_INFO("extensions.biblio", "no active connection"); @@ -158,10 +158,10 @@ static Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm) { try { - DBG_ASSERT(*o3tl::forceAccess<sal_Int32>(xFormProps->getPropertyValue("CommandType")) == CommandType::TABLE, + DBG_ASSERT(*o3tl::forceAccess<sal_Int32>(xFormProps->getPropertyValue(u"CommandType"_ustr)) == CommandType::TABLE, "::getColumns : invalid form (has no table as data source) !"); OUString sTable; - xFormProps->getPropertyValue("Command") >>= sTable; + xFormProps->getPropertyValue(u"Command"_ustr) >>= sTable; Reference< XNameAccess > xTables = xSupplyTables->getTables(); if (xTables.is() && xTables->hasByName(sTable)) xSupplyCols.set(xTables->getByName(sTable), UNO_QUERY); @@ -243,43 +243,43 @@ static sal_uInt16 lcl_FindLogicalName(BibConfig const * pConfig , } MappingDialog_Impl::MappingDialog_Impl(weld::Window* pParent, BibDataManager* pMan) - : GenericDialogController(pParent, "modules/sbibliography/ui/mappingdialog.ui", "MappingDialog") + : GenericDialogController(pParent, u"modules/sbibliography/ui/mappingdialog.ui"_ustr, u"MappingDialog"_ustr) , pDatMan(pMan) , sNone(BibResId(RID_BIB_STR_NONE)) , bModified(false) - , m_xOKBT(m_xBuilder->weld_button("ok")) - , m_xIdentifierLB(m_xBuilder->weld_combo_box("identifierCombobox")) - , m_xAuthorityTypeLB(m_xBuilder->weld_combo_box("authorityTypeCombobox")) - , m_xAuthorLB(m_xBuilder->weld_combo_box("authorCombobox")) - , m_xTitleLB(m_xBuilder->weld_combo_box("titleCombobox")) - , m_xMonthLB(m_xBuilder->weld_combo_box("monthCombobox")) - , m_xYearLB(m_xBuilder->weld_combo_box("yearCombobox")) - , m_xISBNLB(m_xBuilder->weld_combo_box("ISBNCombobox")) - , m_xBooktitleLB(m_xBuilder->weld_combo_box("bookTitleCombobox")) - , m_xChapterLB(m_xBuilder->weld_combo_box("chapterCombobox")) - , m_xEditionLB(m_xBuilder->weld_combo_box("editionCombobox")) - , m_xEditorLB(m_xBuilder->weld_combo_box("editorCombobox")) - , m_xHowpublishedLB(m_xBuilder->weld_combo_box("howPublishedCombobox")) - , m_xInstitutionLB(m_xBuilder->weld_combo_box("institutionCombobox")) - , m_xJournalLB(m_xBuilder->weld_combo_box("journalCombobox")) - , m_xNoteLB(m_xBuilder->weld_combo_box("noteCombobox")) - , m_xAnnoteLB(m_xBuilder->weld_combo_box("annoteCombobox")) - , m_xNumberLB(m_xBuilder->weld_combo_box("numberCombobox")) - , m_xOrganizationsLB(m_xBuilder->weld_combo_box("organizationCombobox")) - , m_xPagesLB(m_xBuilder->weld_combo_box("pagesCombobox")) - , m_xPublisherLB(m_xBuilder->weld_combo_box("publisherCombobox")) - , m_xAddressLB(m_xBuilder->weld_combo_box("addressCombobox")) - , m_xSchoolLB(m_xBuilder->weld_combo_box("schoolCombobox")) - , m_xSeriesLB(m_xBuilder->weld_combo_box("seriesCombobox")) - , m_xReportTypeLB(m_xBuilder->weld_combo_box("reportTypeCombobox")) - , m_xVolumeLB(m_xBuilder->weld_combo_box("volumeCombobox")) - , m_xURLLB(m_xBuilder->weld_combo_box("URLCombobox")) - , m_xCustom1LB(m_xBuilder->weld_combo_box("custom1Combobox")) - , m_xCustom2LB(m_xBuilder->weld_combo_box("custom2Combobox")) - , m_xCustom3LB(m_xBuilder->weld_combo_box("custom3Combobox")) - , m_xCustom4LB(m_xBuilder->weld_combo_box("custom4Combobox")) - , m_xCustom5LB(m_xBuilder->weld_combo_box("custom5Combobox")) - , m_xLocalURLLB(m_xBuilder->weld_combo_box("LocalURLCombobox")) + , m_xOKBT(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xIdentifierLB(m_xBuilder->weld_combo_box(u"identifierCombobox"_ustr)) + , m_xAuthorityTypeLB(m_xBuilder->weld_combo_box(u"authorityTypeCombobox"_ustr)) + , m_xAuthorLB(m_xBuilder->weld_combo_box(u"authorCombobox"_ustr)) + , m_xTitleLB(m_xBuilder->weld_combo_box(u"titleCombobox"_ustr)) + , m_xMonthLB(m_xBuilder->weld_combo_box(u"monthCombobox"_ustr)) + , m_xYearLB(m_xBuilder->weld_combo_box(u"yearCombobox"_ustr)) + , m_xISBNLB(m_xBuilder->weld_combo_box(u"ISBNCombobox"_ustr)) + , m_xBooktitleLB(m_xBuilder->weld_combo_box(u"bookTitleCombobox"_ustr)) + , m_xChapterLB(m_xBuilder->weld_combo_box(u"chapterCombobox"_ustr)) + , m_xEditionLB(m_xBuilder->weld_combo_box(u"editionCombobox"_ustr)) + , m_xEditorLB(m_xBuilder->weld_combo_box(u"editorCombobox"_ustr)) + , m_xHowpublishedLB(m_xBuilder->weld_combo_box(u"howPublishedCombobox"_ustr)) + , m_xInstitutionLB(m_xBuilder->weld_combo_box(u"institutionCombobox"_ustr)) + , m_xJournalLB(m_xBuilder->weld_combo_box(u"journalCombobox"_ustr)) + , m_xNoteLB(m_xBuilder->weld_combo_box(u"noteCombobox"_ustr)) + , m_xAnnoteLB(m_xBuilder->weld_combo_box(u"annoteCombobox"_ustr)) + , m_xNumberLB(m_xBuilder->weld_combo_box(u"numberCombobox"_ustr)) + , m_xOrganizationsLB(m_xBuilder->weld_combo_box(u"organizationCombobox"_ustr)) + , m_xPagesLB(m_xBuilder->weld_combo_box(u"pagesCombobox"_ustr)) + , m_xPublisherLB(m_xBuilder->weld_combo_box(u"publisherCombobox"_ustr)) + , m_xAddressLB(m_xBuilder->weld_combo_box(u"addressCombobox"_ustr)) + , m_xSchoolLB(m_xBuilder->weld_combo_box(u"schoolCombobox"_ustr)) + , m_xSeriesLB(m_xBuilder->weld_combo_box(u"seriesCombobox"_ustr)) + , m_xReportTypeLB(m_xBuilder->weld_combo_box(u"reportTypeCombobox"_ustr)) + , m_xVolumeLB(m_xBuilder->weld_combo_box(u"volumeCombobox"_ustr)) + , m_xURLLB(m_xBuilder->weld_combo_box(u"URLCombobox"_ustr)) + , m_xCustom1LB(m_xBuilder->weld_combo_box(u"custom1Combobox"_ustr)) + , m_xCustom2LB(m_xBuilder->weld_combo_box(u"custom2Combobox"_ustr)) + , m_xCustom3LB(m_xBuilder->weld_combo_box(u"custom3Combobox"_ustr)) + , m_xCustom4LB(m_xBuilder->weld_combo_box(u"custom4Combobox"_ustr)) + , m_xCustom5LB(m_xBuilder->weld_combo_box(u"custom5Combobox"_ustr)) + , m_xLocalURLLB(m_xBuilder->weld_combo_box(u"LocalURLCombobox"_ustr)) { m_xOKBT->connect_clicked(LINK(this, MappingDialog_Impl, OkHdl)); OUString sTitle = m_xDialog->get_title(); @@ -421,8 +421,8 @@ public: } DBChangeDialog_Impl::DBChangeDialog_Impl(weld::Window* pParent, const BibDataManager* pDatMan ) - : GenericDialogController(pParent, "modules/sbibliography/ui/choosedatasourcedialog.ui", "ChooseDataSourceDialog") - , m_xSelectionLB(m_xBuilder->weld_tree_view("treeview")) + : GenericDialogController(pParent, u"modules/sbibliography/ui/choosedatasourcedialog.ui"_ustr, u"ChooseDataSourceDialog"_ustr) + , m_xSelectionLB(m_xBuilder->weld_tree_view(u"treeview"_ustr)) { m_xSelectionLB->set_size_request(-1, m_xSelectionLB->get_height_rows(6)); m_xSelectionLB->connect_row_activated(LINK(this, DBChangeDialog_Impl, DoubleClickHdl)); @@ -544,7 +544,7 @@ BibDataManager::~BibDataManager() if ( m_xForm.is() ) { Reference< XComponent > xConnection; - xPrSet->getPropertyValue("ActiveConnection") >>= xConnection; + xPrSet->getPropertyValue(u"ActiveConnection"_ustr) >>= xConnection; if (xLoad.is()) xLoad->unload(); if (xComp.is()) @@ -593,7 +593,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) sal_Int32 nType = 0; bool bIsFormatted = false; bool bFormattedIsNumeric = true; - xField->getPropertyValue("Type") >>= nType; + xField->getPropertyValue(u"Type"_ustr) >>= nType; switch(nType) { case DataType::BIT: @@ -623,10 +623,10 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) Reference< XPropertySet > xCurrentCol = xColFactory->createColumn(sCurrentModelType); if (bIsFormatted) { - OUString sFormatKey("FormatKey"); + OUString sFormatKey(u"FormatKey"_ustr); xCurrentCol->setPropertyValue(sFormatKey, xField->getPropertyValue(sFormatKey)); Any aFormatted(bFormattedIsNumeric); - xCurrentCol->setPropertyValue("TreatAsNumber", aFormatted); + xCurrentCol->setPropertyValue(u"TreatAsNumber"_ustr, aFormatted); } Any aColName( rField ); xCurrentCol->setPropertyValue(FM_PROP_CONTROLSOURCE, aColName); @@ -652,7 +652,7 @@ Reference< awt::XControlModel > const & BibDataManager::updateGridModel(const Re { Reference< XPropertySet > aFormPropSet( xDbForm, UNO_QUERY ); OUString sName; - aFormPropSet->getPropertyValue("Command") >>= sName; + aFormPropSet->getPropertyValue(u"Command"_ustr) >>= sName; if ( !m_xGridModel.is() ) { @@ -680,7 +680,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) try { Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); - m_xForm.set( xMgr->createInstance( "com.sun.star.form.component.Form" ), UNO_QUERY ); + m_xForm.set( xMgr->createInstance( u"com.sun.star.form.component.Form"_ustr ), UNO_QUERY ); Reference< XPropertySet > aPropertySet( m_xForm, UNO_QUERY ); @@ -689,17 +689,17 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) { Any aVal; aVal <<= sal_Int32(ResultSetType::SCROLL_INSENSITIVE); - aPropertySet->setPropertyValue("ResultSetType",aVal ); + aPropertySet->setPropertyValue(u"ResultSetType"_ustr,aVal ); aVal <<= sal_Int32(ResultSetConcurrency::READ_ONLY); - aPropertySet->setPropertyValue("ResultSetConcurrency", aVal); + aPropertySet->setPropertyValue(u"ResultSetConcurrency"_ustr, aVal); //Caching for Performance aVal <<= sal_Int32(50); - aPropertySet->setPropertyValue("FetchSize", aVal); + aPropertySet->setPropertyValue(u"FetchSize"_ustr, aVal); Reference< XConnection > xConnection = getConnection(rDesc.sDataSource); aVal <<= xConnection; - aPropertySet->setPropertyValue("ActiveConnection", aVal); + aPropertySet->setPropertyValue(u"ActiveConnection"_ustr, aVal); Reference< XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY); Reference< XNameAccess > xTables = xSupplyTables.is() ? @@ -720,9 +720,9 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) } aVal <<= aActiveDataTable; - aPropertySet->setPropertyValue("Command", aVal); + aPropertySet->setPropertyValue(u"Command"_ustr, aVal); aVal <<= rDesc.nCommandType; - aPropertySet->setPropertyValue("CommandType", aVal); + aPropertySet->setPropertyValue(u"CommandType"_ustr, aVal); Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); @@ -730,9 +730,9 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); + m_xParser.set( xFactory->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr), UNO_QUERY ); - OUString aString("SELECT * FROM "); + OUString aString(u"SELECT * FROM "_ustr); OUString sCatalog, sSchema, sName; ::dbtools::qualifiedNameComponents( xMetaData, aActiveDataTable, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InDataManipulation ); @@ -786,8 +786,8 @@ void BibDataManager::setFilter(const OUString& rQuery) m_xParser->setFilter( rQuery ); OUString aQuery = m_xParser->getFilter(); Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW ); - xFormProps->setPropertyValue( "Filter", Any( aQuery ) ); - xFormProps->setPropertyValue( "ApplyFilter", Any( true ) ); + xFormProps->setPropertyValue( u"Filter"_ustr, Any( aQuery ) ); + xFormProps->setPropertyValue( u"ApplyFilter"_ustr, Any( true ) ); reload(); } catch (const Exception&) @@ -805,7 +805,7 @@ OUString BibDataManager::getFilter() const try { Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW ); - OSL_VERIFY( xFormProps->getPropertyValue( "Filter" ) >>= aQueryString ); + OSL_VERIFY( xFormProps->getPropertyValue( u"Filter"_ustr ) >>= aQueryString ); } catch (const Exception&) { @@ -868,7 +868,7 @@ void BibDataManager::setActiveDataSource(const OUString& rURL) unload(); Reference< XComponent > xOldConnection; - aPropertySet->getPropertyValue("ActiveConnection") >>= xOldConnection; + aPropertySet->getPropertyValue(u"ActiveConnection"_ustr) >>= xOldConnection; Reference< XConnection > xConnection = getConnection(rURL); if(!xConnection.is()) @@ -877,10 +877,10 @@ void BibDataManager::setActiveDataSource(const OUString& rURL) return; } Any aVal; aVal <<= xConnection; - aPropertySet->setPropertyValue("ActiveConnection", aVal); + aPropertySet->setPropertyValue(u"ActiveConnection"_ustr, aVal); Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); + m_xParser.set( xFactory->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr), UNO_QUERY ); if(xOldConnection.is()) xOldConnection->dispose(); @@ -896,12 +896,12 @@ void BibDataManager::setActiveDataSource(const OUString& rURL) { aActiveDataTable = aTableNameSeq[0]; aVal <<= aActiveDataTable; - aPropertySet->setPropertyValue("Command", aVal); - aPropertySet->setPropertyValue("CommandType", Any(CommandType::TABLE)); + aPropertySet->setPropertyValue(u"Command"_ustr, aVal); + aPropertySet->setPropertyValue(u"CommandType"_ustr, Any(CommandType::TABLE)); //Caching for Performance aVal <<= sal_Int32(50); - aPropertySet->setPropertyValue("FetchSize", aVal); - OUString aString("SELECT * FROM "); + aPropertySet->setPropertyValue(u"FetchSize"_ustr, aVal); + OUString aString(u"SELECT * FROM "_ustr); // quote the table name which may contain catalog.schema.table Reference<XDatabaseMetaData> xMetaData = xConnection->getMetaData(); aQuoteChar = xMetaData->getIdentifierQuoteString(); @@ -955,16 +955,16 @@ void BibDataManager::setActiveDataTable(const OUString& rTable) { aActiveDataTable = rTable; Any aVal; aVal <<= rTable; - aPropertySet->setPropertyValue( "Command", aVal ); + aPropertySet->setPropertyValue( u"Command"_ustr, aVal ); Reference<XDatabaseMetaData> xMetaData = xConnection->getMetaData(); aQuoteChar = xMetaData->getIdentifierQuoteString(); Reference<XMultiServiceFactory> xFactory(xConnection, UNO_QUERY); if (xFactory.is()) - m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); + m_xParser.set( xFactory->createInstance(u"com.sun.star.sdb.SingleSelectQueryComposer"_ustr), UNO_QUERY ); - OUString aString("SELECT * FROM "); + OUString aString(u"SELECT * FROM "_ustr); OUString sCatalog, sSchema, sName; ::dbtools::qualifiedNameComponents( xMetaData, aActiveDataTable, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InDataManipulation ); @@ -1101,19 +1101,19 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const OUString& { // create the control model Reference< XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - Reference< XInterface > xObject = xMgr->createInstance("com.sun.star.form.component.GridControl"); + Reference< XInterface > xObject = xMgr->createInstance(u"com.sun.star.form.component.GridControl"_ustr); xModel.set( xObject, UNO_QUERY ); // set the Reference< XPropertySet > xPropSet( xModel, UNO_QUERY ); - xPropSet->setPropertyValue( "Name", Any( rName ) ); + xPropSet->setPropertyValue( u"Name"_ustr, Any( rName ) ); // set the name of the to-be-created control - Any aAny(OUString("com.sun.star.form.control.InteractionGridControl")); - xPropSet->setPropertyValue( "DefaultControl",aAny ); + Any aAny(u"com.sun.star.form.control.InteractionGridControl"_ustr); + xPropSet->setPropertyValue( u"DefaultControl"_ustr,aAny ); // the helpURL - OUString uProp("HelpURL"); + OUString uProp(u"HelpURL"_ustr); Reference< XPropertySetInfo > xPropInfo = xPropSet->getPropertySetInfo(); if (xPropInfo->hasPropertyByName(uProp)) { @@ -1189,9 +1189,9 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( aElement >>= xField; sal_Int32 nFormatKey = 0; - xField->getPropertyValue("Type") >>= nFormatKey; + xField->getPropertyValue(u"Type"_ustr) >>= nFormatKey; - OUString aInstanceName("com.sun.star.form.component."); + OUString aInstanceName(u"com.sun.star.form.component."_ustr); if (bForceListBox) aInstanceName += "ListBox"; @@ -1206,7 +1206,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( xPropSet->setPropertyValue( FM_PROP_NAME,aFieldName); xPropSet->setPropertyValue( FM_PROP_CONTROLSOURCE, Any( rName ) ); - xPropSet->setPropertyValue("NativeWidgetLook", Any( true ) ); + xPropSet->setPropertyValue(u"NativeWidgetLook"_ustr, Any( true ) ); if (bForceListBox) { @@ -1214,9 +1214,9 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( //uno::Reference< beans::XPropertySet > xPropSet(xControl, UNO_QUERY); aAny <<= sal_Int16(1); - xPropSet->setPropertyValue("BoundColumn", aAny); + xPropSet->setPropertyValue(u"BoundColumn"_ustr, aAny); aAny <<= ListSourceType_VALUELIST; - xPropSet->setPropertyValue("ListSourceType", aAny); + xPropSet->setPropertyValue(u"ListSourceType"_ustr, aAny); uno::Sequence<OUString> aListSource(TYPE_COUNT); OUString* pListSourceArr = aListSource.getArray(); @@ -1225,7 +1225,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( pListSourceArr[i] = OUString::number(i); aAny <<= aListSource; - xPropSet->setPropertyValue("ListSource", aAny); + xPropSet->setPropertyValue(u"ListSource"_ustr, aAny); uno::Sequence<OUString> aValues(TYPE_COUNT + 1); OUString* pValuesArr = aValues.getArray(); @@ -1256,9 +1256,9 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( aAny <<= aValues; - xPropSet->setPropertyValue("StringItemList", aAny); + xPropSet->setPropertyValue(u"StringItemList"_ustr, aAny); - xPropSet->setPropertyValue( "Dropdown", Any(true) ); + xPropSet->setPropertyValue( u"Dropdown"_ustr, Any(true) ); } Reference< XFormComponent > aFormComp(xModel,UNO_QUERY ); diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 7e0ec6e93938..c547fa99f33d 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -166,7 +166,7 @@ BibFrameController_Impl::~BibFrameController_Impl() OUString SAL_CALL BibFrameController_Impl::getImplementationName() { - return "com.sun.star.comp.extensions.Bibliography"; + return u"com.sun.star.comp.extensions.Bibliography"_ustr; } sal_Bool SAL_CALL BibFrameController_Impl::supportsService( const OUString& sServiceName ) @@ -178,7 +178,7 @@ css::uno::Sequence< OUString > SAL_CALL BibFrameController_Impl::getSupportedSer { // return only top level services ... // base services are included there and should be asked by uno-rtti. - return { "com.sun.star.frame.Bibliography" }; + return { u"com.sun.star.frame.Bibliography"_ustr }; } void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & xArg ) @@ -318,7 +318,7 @@ uno::Sequence< frame::DispatchInformation > SAL_CALL BibFrameController_Impl::ge static bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet) { sal_Int32 nPriv = 0; - _rxCursorSet->getPropertyValue("Privileges") >>= nPriv; + _rxCursorSet->getPropertyValue(u"Privileges"_ustr) >>= nPriv; return _rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0; } @@ -337,8 +337,8 @@ bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XForm return false; // need to save? - bool bIsNew = ::comphelper::getBOOL(_xSet->getPropertyValue("IsNew")); - bool bIsModified = ::comphelper::getBOOL(_xSet->getPropertyValue("IsModified")); + bool bIsNew = ::comphelper::getBOOL(_xSet->getPropertyValue(u"IsNew"_ustr)); + bool bIsModified = ::comphelper::getBOOL(_xSet->getPropertyValue(u"IsModified"_ustr)); bool bResult = !bIsModified; if (bIsModified) { @@ -513,11 +513,11 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen Reference< css::sdbc::XResultSet > xCursor(m_xDatMan->getForm(), UNO_QUERY); Reference< XResultSetUpdate > xUpdateCursor(xCursor, UNO_QUERY); Reference< beans::XPropertySet > xSet(m_xDatMan->getForm(), UNO_QUERY); - bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); + bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue(u"IsNew"_ustr)); if(!bIsNew) { sal_uInt32 nCount = 0; - xSet->getPropertyValue("RowCount") >>= nCount; + xSet->getPropertyValue(u"RowCount"_ustr) >>= nCount; // determine next position bool bSuccess = false; bool bLeft = false; @@ -722,11 +722,11 @@ void BibFrameController_Impl::addStatusListener( else if(aURL.Path == "Bib/DeleteRecord") { Reference< beans::XPropertySet > xSet(m_xDatMan->getForm(), UNO_QUERY); - bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); + bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue(u"IsNew"_ustr)); if(!bIsNew) { sal_uInt32 nCount = 0; - xSet->getPropertyValue("RowCount") >>= nCount; + xSet->getPropertyValue(u"RowCount"_ustr) >>= nCount; aEvent.IsEnabled = nCount > 0; } } diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 92a4c6843ec1..7f37505d032c 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -69,7 +69,7 @@ bool SplitUrlAndPage(const OUString& rText, OUString& rUrl, int& nPageNumber) return false; } - OUString aPagePrefix("page="); + OUString aPagePrefix(u"page="_ustr); if (!xUriRef->getFragment().startsWith(aPagePrefix)) { return false; @@ -126,77 +126,77 @@ static OUString lcl_GetColumnName( const Mapping* pMapping, sal_uInt16 nIndexPos } BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan) - : InterimItemWindow(pParent, "modules/sbibliography/ui/generalpage.ui", "GeneralPage") + : InterimItemWindow(pParent, u"modules/sbibliography/ui/generalpage.ui"_ustr, u"GeneralPage"_ustr) , BibShortCutHandler(this) - , xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow")) - , xGrid(m_xBuilder->weld_widget("grid")) - , xIdentifierFT(m_xBuilder->weld_label("shortname")) - , xIdentifierED(m_xBuilder->weld_entry("shortnamecontrol")) - , xAuthTypeFT(m_xBuilder->weld_label("authtype")) - , xAuthTypeLB(m_xBuilder->weld_combo_box("authtypecontrol")) - , xYearFT(m_xBuilder->weld_label("year")) - , xYearED(m_xBuilder->weld_entry("yearcontrol")) - , xAuthorFT(m_xBuilder->weld_label("authors")) - , xAuthorED(m_xBuilder->weld_entry("authorscontrol")) - , xTitleFT(m_xBuilder->weld_label("title")) - , xTitleED(m_xBuilder->weld_entry("titlecontrol")) - , xPublisherFT(m_xBuilder->weld_label("publisher")) - , xPublisherED(m_xBuilder->weld_entry("publishercontrol")) - , xAddressFT(m_xBuilder->weld_label("address")) - , xAddressED(m_xBuilder->weld_entry("addresscontrol")) - , xISBNFT(m_xBuilder->weld_label("isbn")) - , xISBNED(m_xBuilder->weld_entry("isbncontrol")) - , xChapterFT(m_xBuilder->weld_label("chapter")) - , xChapterED(m_xBuilder->weld_entry("chaptercontrol")) - , xPagesFT(m_xBuilder->weld_label("pages")) - , xPagesED(m_xBuilder->weld_entry("pagescontrol")) - , xEditorFT(m_xBuilder->weld_label("editor")) - , xEditorED(m_xBuilder->weld_entry("editorcontrol")) - , xEditionFT(m_xBuilder->weld_label("edition")) - , xEditionED(m_xBuilder->weld_entry("editioncontrol")) - , xBooktitleFT(m_xBuilder->weld_label("booktitle")) - , xBooktitleED(m_xBuilder->weld_entry("booktitlecontrol")) - , xVolumeFT(m_xBuilder->weld_label("volume")) - , xVolumeED(m_xBuilder->weld_entry("volumecontrol")) - , xHowpublishedFT(m_xBuilder->weld_label("publicationtype")) - , xHowpublishedED(m_xBuilder->weld_entry("publicationtypecontrol")) - , xOrganizationsFT(m_xBuilder->weld_label("organization")) - , xOrganizationsED(m_xBuilder->weld_entry("organizationcontrol")) - , xInstitutionFT(m_xBuilder->weld_label("institution")) - , xInstitutionED(m_xBuilder->weld_entry("institutioncontrol")) - , xSchoolFT(m_xBuilder->weld_label("university")) - , xSchoolED(m_xBuilder->weld_entry("universitycontrol")) - , xReportTypeFT(m_xBuilder->weld_label("reporttype")) - , xReportTypeED(m_xBuilder->weld_entry("reporttypecontrol")) - , xMonthFT(m_xBuilder->weld_label("month")) - , xMonthED(m_xBuilder->weld_entry("monthcontrol")) - , xJournalFT(m_xBuilder->weld_label("journal")) - , xJournalED(m_xBuilder->weld_entry("journalcontrol")) - , xNumberFT(m_xBuilder->weld_label("number")) - , xNumberED(m_xBuilder->weld_entry("numbercontrol")) - , xSeriesFT(m_xBuilder->weld_label("series")) - , xSeriesED(m_xBuilder->weld_entry("seriescontrol")) - , xAnnoteFT(m_xBuilder->weld_label("annotation")) - , xAnnoteED(m_xBuilder->weld_entry("annotationcontrol")) - , xNoteFT(m_xBuilder->weld_label("note")) - , xNoteED(m_xBuilder->weld_entry("notecontrol")) - , xURLFT(m_xBuilder->weld_label("url")) - , xURLED(m_xBuilder->weld_entry("urlcontrol")) - , xCustom1FT(m_xBuilder->weld_label("custom1")) - , xCustom1ED(m_xBuilder->weld_entry("custom1control")) - , xCustom2FT(m_xBuilder->weld_label("custom2")) - , xCustom2ED(m_xBuilder->weld_entry("custom2control")) - , xCustom3FT(m_xBuilder->weld_label("custom3")) - , xCustom3ED(m_xBuilder->weld_entry("custom3control")) - , xCustom4FT(m_xBuilder->weld_label("custom4")) - , xCustom4ED(m_xBuilder->weld_entry("custom4control")) - , xCustom5FT(m_xBuilder->weld_label("custom5")) - , xCustom5ED(m_xBuilder->weld_entry("custom5control")) - , m_xLocalURLFT(m_xBuilder->weld_label("localurl")) - , m_xLocalURLED(m_xBuilder->weld_entry("localurlcontrol")) - , m_xLocalBrowseButton(m_xBuilder->weld_button("localbrowse")) - , m_xLocalPageCB(m_xBuilder->weld_check_button("localpagecb")) - , m_xLocalPageSB(m_xBuilder->weld_spin_button("localpagesb")) + , xScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr)) + , xGrid(m_xBuilder->weld_widget(u"grid"_ustr)) + , xIdentifierFT(m_xBuilder->weld_label(u"shortname"_ustr)) + , xIdentifierED(m_xBuilder->weld_entry(u"shortnamecontrol"_ustr)) + , xAuthTypeFT(m_xBuilder->weld_label(u"authtype"_ustr)) + , xAuthTypeLB(m_xBuilder->weld_combo_box(u"authtypecontrol"_ustr)) + , xYearFT(m_xBuilder->weld_label(u"year"_ustr)) + , xYearED(m_xBuilder->weld_entry(u"yearcontrol"_ustr)) + , xAuthorFT(m_xBuilder->weld_label(u"authors"_ustr)) + , xAuthorED(m_xBuilder->weld_entry(u"authorscontrol"_ustr)) + , xTitleFT(m_xBuilder->weld_label(u"title"_ustr)) + , xTitleED(m_xBuilder->weld_entry(u"titlecontrol"_ustr)) + , xPublisherFT(m_xBuilder->weld_label(u"publisher"_ustr)) + , xPublisherED(m_xBuilder->weld_entry(u"publishercontrol"_ustr)) + , xAddressFT(m_xBuilder->weld_label(u"address"_ustr)) + , xAddressED(m_xBuilder->weld_entry(u"addresscontrol"_ustr)) + , xISBNFT(m_xBuilder->weld_label(u"isbn"_ustr)) + , xISBNED(m_xBuilder->weld_entry(u"isbncontrol"_ustr)) + , xChapterFT(m_xBuilder->weld_label(u"chapter"_ustr)) + , xChapterED(m_xBuilder->weld_entry(u"chaptercontrol"_ustr)) + , xPagesFT(m_xBuilder->weld_label(u"pages"_ustr)) + , xPagesED(m_xBuilder->weld_entry(u"pagescontrol"_ustr)) + , xEditorFT(m_xBuilder->weld_label(u"editor"_ustr)) + , xEditorED(m_xBuilder->weld_entry(u"editorcontrol"_ustr)) + , xEditionFT(m_xBuilder->weld_label(u"edition"_ustr)) + , xEditionED(m_xBuilder->weld_entry(u"editioncontrol"_ustr)) + , xBooktitleFT(m_xBuilder->weld_label(u"booktitle"_ustr)) + , xBooktitleED(m_xBuilder->weld_entry(u"booktitlecontrol"_ustr)) + , xVolumeFT(m_xBuilder->weld_label(u"volume"_ustr)) + , xVolumeED(m_xBuilder->weld_entry(u"volumecontrol"_ustr)) + , xHowpublishedFT(m_xBuilder->weld_label(u"publicationtype"_ustr)) + , xHowpublishedED(m_xBuilder->weld_entry(u"publicationtypecontrol"_ustr)) + , xOrganizationsFT(m_xBuilder->weld_label(u"organization"_ustr)) + , xOrganizationsED(m_xBuilder->weld_entry(u"organizationcontrol"_ustr)) + , xInstitutionFT(m_xBuilder->weld_label(u"institution"_ustr)) + , xInstitutionED(m_xBuilder->weld_entry(u"institutioncontrol"_ustr)) + , xSchoolFT(m_xBuilder->weld_label(u"university"_ustr)) + , xSchoolED(m_xBuilder->weld_entry(u"universitycontrol"_ustr)) + , xReportTypeFT(m_xBuilder->weld_label(u"reporttype"_ustr)) + , xReportTypeED(m_xBuilder->weld_entry(u"reporttypecontrol"_ustr)) + , xMonthFT(m_xBuilder->weld_label(u"month"_ustr)) + , xMonthED(m_xBuilder->weld_entry(u"monthcontrol"_ustr)) + , xJournalFT(m_xBuilder->weld_label(u"journal"_ustr)) + , xJournalED(m_xBuilder->weld_entry(u"journalcontrol"_ustr)) + , xNumberFT(m_xBuilder->weld_label(u"number"_ustr)) + , xNumberED(m_xBuilder->weld_entry(u"numbercontrol"_ustr)) + , xSeriesFT(m_xBuilder->weld_label(u"series"_ustr)) + , xSeriesED(m_xBuilder->weld_entry(u"seriescontrol"_ustr)) + , xAnnoteFT(m_xBuilder->weld_label(u"annotation"_ustr)) + , xAnnoteED(m_xBuilder->weld_entry(u"annotationcontrol"_ustr)) + , xNoteFT(m_xBuilder->weld_label(u"note"_ustr)) + , xNoteED(m_xBuilder->weld_entry(u"notecontrol"_ustr)) + , xURLFT(m_xBuilder->weld_label(u"url"_ustr)) + , xURLED(m_xBuilder->weld_entry(u"urlcontrol"_ustr)) + , xCustom1FT(m_xBuilder->weld_label(u"custom1"_ustr)) + , xCustom1ED(m_xBuilder->weld_entry(u"custom1control"_ustr)) + , xCustom2FT(m_xBuilder->weld_label(u"custom2"_ustr)) + , xCustom2ED(m_xBuilder->weld_entry(u"custom2control"_ustr)) + , xCustom3FT(m_xBuilder->weld_label(u"custom3"_ustr)) + , xCustom3ED(m_xBuilder->weld_entry(u"custom3control"_ustr)) + , xCustom4FT(m_xBuilder->weld_label(u"custom4"_ustr)) + , xCustom4ED(m_xBuilder->weld_entry(u"custom4control"_ustr)) + , xCustom5FT(m_xBuilder->weld_label(u"custom5"_ustr)) + , xCustom5ED(m_xBuilder->weld_entry(u"custom5control"_ustr)) + , m_xLocalURLFT(m_xBuilder->weld_label(u"localurl"_ustr)) + , m_xLocalURLED(m_xBuilder->weld_entry(u"localurlcontrol"_ustr)) + , m_xLocalBrowseButton(m_xBuilder->weld_button(u"localbrowse"_ustr)) + , m_xLocalPageCB(m_xBuilder->weld_check_button(u"localpagecb"_ustr)) + , m_xLocalPageSB(m_xBuilder->weld_spin_button(u"localpagesb"_ustr)) , pDatMan(pMan) { SetStyle(GetStyle() | WB_DIALOGCONTROL); @@ -425,14 +425,14 @@ void BibGeneralPage::SaveChanges() if (!xResUpd.is() ) return; - Any aModified = xProps->getPropertyValue( "IsModified" ); + Any aModified = xProps->getPropertyValue( u"IsModified"_ustr ); bool bFlag = false; if ( !( aModified >>= bFlag ) || !bFlag ) return; try { - Any aNew = xProps->getPropertyValue( "IsNew" ); + Any aNew = xProps->getPropertyValue( u"IsNew"_ustr ); aNew >>= bFlag; if ( bFlag ) xResUpd->insertRow(); @@ -512,7 +512,7 @@ namespace , m_rPage(rPage) { rEntry.connect_focus_out(LINK(this, EntryChangeListener, LoseFocusHdl)); - setValue(rPropSet->getPropertyValue("Text")); + setValue(rPropSet->getPropertyValue(u"Text"_ustr)); } virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override @@ -524,12 +524,12 @@ namespace virtual void start() override { - m_xPropSet->addPropertyChangeListener("Text", this); + m_xPropSet->addPropertyChangeListener(u"Text"_ustr, this); } virtual void stop() override { - m_xPropSet->removePropertyChangeListener("Text", this); + m_xPropSet->removePropertyChangeListener(u"Text"_ustr, this); ChangeListener::stop(); } @@ -594,7 +594,7 @@ namespace { aText = m_rEntry.get_text(); } - m_xPropSet->setPropertyValue("Text", Any(aText)); + m_xPropSet->setPropertyValue(u"Text"_ustr, Any(aText)); css::uno::Reference<css::form::XBoundComponent> xBound(m_xPropSet, css::uno::UNO_QUERY); if (xBound.is()) @@ -623,7 +623,7 @@ namespace , m_rComboBox(rComboBox) { rComboBox.connect_changed(LINK(this, ComboBoxChangeListener, ChangeHdl)); - setValue(rPropSet->getPropertyValue("SelectedItems")); + setValue(rPropSet->getPropertyValue(u"SelectedItems"_ustr)); } virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override @@ -635,12 +635,12 @@ namespace virtual void start() override { - m_xPropSet->addPropertyChangeListener("SelectedItems", this); + m_xPropSet->addPropertyChangeListener(u"SelectedItems"_ustr, this); } virtual void stop() override { - m_xPropSet->removePropertyChangeListener("SelectedItems", this); + m_xPropSet->removePropertyChangeListener(u"SelectedItems"_ustr, this); ChangeListener::stop(); } @@ -668,7 +668,7 @@ namespace m_bSelfChanging = true; Sequence<sal_Int16> aSelection{ o3tl::narrowing<sal_Int16>(m_rComboBox.get_active()) }; - m_xPropSet->setPropertyValue("SelectedItems", Any(aSelection)); + m_xPropSet->setPropertyValue(u"SelectedItems"_ustr, Any(aSelection)); css::uno::Reference<css::form::XBoundComponent> xBound(m_xPropSet, css::uno::UNO_QUERY); if (xBound.is()) @@ -850,13 +850,13 @@ bool BibGeneralPage::AddXControl(const OUString& rName, weld::ComboBox& rList) if( xPropSet.is()) { css::uno::Sequence<OUString> aEntries; - xPropSet->getPropertyValue("StringItemList") >>= aEntries; + xPropSet->getPropertyValue(u"StringItemList"_ustr) >>= aEntries; for (const OUString& rString : aEntries) rList.append_text(rString); sal_Int16 nSelection = -1; Sequence<sal_Int16> aSelection; - xPropSet->getPropertyValue("SelectedItems") >>= aSelection; + xPropSet->getPropertyValue(u"SelectedItems"_ustr) >>= aSelection; if (aSelection.hasElements()) nSelection = aSelection[0]; diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 35bd6b2320fb..c97ea7952811 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -169,9 +169,9 @@ void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt) } ComboBoxControl::ComboBoxControl(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/sbibliography/ui/combobox.ui", "ComboBox") - , m_xFtSource(m_xBuilder->weld_label("label")) - , m_xLBSource(m_xBuilder->weld_combo_box("combobox")) + : InterimItemWindow(pParent, u"modules/sbibliography/ui/combobox.ui"_ustr, u"ComboBox"_ustr) + , m_xFtSource(m_xBuilder->weld_label(u"label"_ustr)) + , m_xLBSource(m_xBuilder->weld_combo_box(u"combobox"_ustr)) { m_xFtSource->set_toolbar_background(); m_xLBSource->set_toolbar_background(); @@ -192,9 +192,9 @@ ComboBoxControl::~ComboBoxControl() } EditControl::EditControl(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/sbibliography/ui/editbox.ui", "EditBox") - , m_xFtQuery(m_xBuilder->weld_label("label")) - , m_xEdQuery(m_xBuilder->weld_entry("entry")) + : InterimItemWindow(pParent, u"modules/sbibliography/ui/editbox.ui"_ustr, u"EditBox"_ustr) + , m_xFtQuery(m_xBuilder->weld_label(u"label"_ustr)) + , m_xEdQuery(m_xBuilder->weld_entry(u"entry"_ustr)) { m_xFtQuery->set_toolbar_background(); m_xEdQuery->set_toolbar_background(); @@ -215,14 +215,14 @@ EditControl::~EditControl() } BibToolBar::BibToolBar(vcl::Window* pParent, Link<void*,void> aLink) - : ToolBox(pParent, "toolbar", "modules/sbibliography/ui/toolbar.ui") + : ToolBox(pParent, u"toolbar"_ustr, u"modules/sbibliography/ui/toolbar.ui"_ustr) , aIdle("BibToolBar") , xSource(VclPtr<ComboBoxControl>::Create(this)) , pLbSource(xSource->get_widget()) , xQuery(VclPtr<EditControl>::Create(this)) , pEdQuery(xQuery->get_widget()) - , xBuilder(Application::CreateBuilder(nullptr, "modules/sbibliography/ui/autofiltermenu.ui")) - , xPopupMenu(xBuilder->weld_menu("menu")) + , xBuilder(Application::CreateBuilder(nullptr, u"modules/sbibliography/ui/autofiltermenu.ui"_ustr)) + , xPopupMenu(xBuilder->weld_menu(u"menu"_ustr)) , nMenuId(0) , aLayoutManager(aLink) , nSymbolsSize(SFX_SYMBOLS_SIZE_SMALL) @@ -242,13 +242,13 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link<void*,void> aLink) xQuery->Show(); - nTBC_SOURCE = GetItemId(".uno:Bib/source"); - nTBC_QUERY = GetItemId(".uno:Bib/query"); - nTBC_BT_AUTOFILTER = GetItemId(".uno:Bib/autoFilter"); - nTBC_BT_COL_ASSIGN = GetItemId("TBC_BT_COL_ASSIGN"); - nTBC_BT_CHANGESOURCE = GetItemId(".uno:Bib/sdbsource"); - nTBC_BT_FILTERCRIT = GetItemId(".uno:Bib/standardFilter"); - nTBC_BT_REMOVEFILTER = GetItemId(".uno:Bib/removeFilter"); + nTBC_SOURCE = GetItemId(u".uno:Bib/source"_ustr); + nTBC_QUERY = GetItemId(u".uno:Bib/query"_ustr); + nTBC_BT_AUTOFILTER = GetItemId(u".uno:Bib/autoFilter"_ustr); + nTBC_BT_COL_ASSIGN = GetItemId(u"TBC_BT_COL_ASSIGN"_ustr); + nTBC_BT_CHANGESOURCE = GetItemId(u".uno:Bib/sdbsource"_ustr); + nTBC_BT_FILTERCRIT = GetItemId(u".uno:Bib/standardFilter"_ustr); + nTBC_BT_REMOVEFILTER = GetItemId(u".uno:Bib/removeFilter"_ustr); SetItemWindow(nTBC_SOURCE, xSource.get()); SetItemWindow(nTBC_QUERY , xQuery.get()); @@ -343,8 +343,8 @@ void BibToolBar::Select() { Sequence<PropertyValue> aPropVal { - comphelper::makePropertyValue("QueryText", pEdQuery->get_text()), - comphelper::makePropertyValue("QueryField", aQueryField) + comphelper::makePropertyValue(u"QueryText"_ustr, pEdQuery->get_text()), + comphelper::makePropertyValue(u"QueryField"_ustr, aQueryField) }; SendDispatch(nId,aPropVal); } @@ -472,8 +472,8 @@ bool BibToolBar::PreNotify( NotifyEvent& rNEvt ) { Sequence<PropertyValue> aPropVal { - comphelper::makePropertyValue("QueryText", pEdQuery->get_text()), - comphelper::makePropertyValue("QueryField", aQueryField) + comphelper::makePropertyValue(u"QueryText"_ustr, pEdQuery->get_text()), + comphelper::makePropertyValue(u"QueryField"_ustr, aQueryField) }; SendDispatch(nTBC_BT_AUTOFILTER, aPropVal); return bResult; @@ -495,7 +495,7 @@ IMPL_LINK_NOARG( BibToolBar, SendSelHdl, Timer*, void ) { Sequence<PropertyValue> aPropVal { - comphelper::makePropertyValue("DataSourceName", MnemonicGenerator::EraseAllMnemonicChars( pLbSource->get_active_text() )) + comphelper::makePropertyValue(u"DataSourceName"_ustr, MnemonicGenerator::EraseAllMnemonicChars( pLbSource->get_active_text() )) }; SendDispatch(nTBC_SOURCE, aPropVal); } @@ -522,8 +522,8 @@ IMPL_LINK_NOARG(BibToolBar, MenuHdl, ToolBox*, void) aQueryField = MnemonicGenerator::EraseAllMnemonicChars(xPopupMenu->get_label(sId)); Sequence<PropertyValue> aPropVal { - comphelper::makePropertyValue("QueryText", pEdQuery->get_text()), - comphelper::makePropertyValue("QueryField", aQueryField) + comphelper::makePropertyValue(u"QueryText"_ustr, pEdQuery->get_text()), + comphelper::makePropertyValue(u"QueryField"_ustr, aQueryField) }; SendDispatch(nTBC_BT_AUTOFILTER, aPropVal); } diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index 7e35408b3b9e..a2bad65ef188 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -149,7 +149,7 @@ void LdapConnection::initConnection() { if (mLdapDefinition.mServer.isEmpty()) { - throw ldap::LdapConnectionException("Cannot initialise connection to LDAP: No server specified."); + throw ldap::LdapConnectionException(u"Cannot initialise connection to LDAP: No server specified."_ustr); } if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT; @@ -231,7 +231,7 @@ void LdapConnection::initConnection() if (aUser.isEmpty()) { throw lang::IllegalArgumentException( - "LdapConnection::findUserDn -User id is empty", + u"LdapConnection::findUserDn -User id is empty"_ustr, nullptr, 0) ; } diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index a735b5fbd71a..48b69b85c085 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -93,34 +93,34 @@ bool LdapUserProfileBe::readLdapConfiguration( uno::Reference< lang::XMultiServiceFactory > xCfgProvider( css::configuration::theDefaultProvider::get(context)); - css::beans::NamedValue aPath("nodepath", uno::Any(OUString("org.openoffice.LDAP/UserDirectory")) ); + css::beans::NamedValue aPath(u"nodepath"_ustr, uno::Any(u"org.openoffice.LDAP/UserDirectory"_ustr) ); uno::Sequence< uno::Any > aArgs{ uno::Any(aPath) }; - xIface = xCfgProvider->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aArgs); + xIface = xCfgProvider->createInstanceWithArguments(u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs); uno::Reference<container::XNameAccess > xAccess(xIface, uno::UNO_QUERY_THROW); - xAccess->getByName("ServerDefinition") >>= xIface; + xAccess->getByName(u"ServerDefinition"_ustr) >>= xIface; uno::Reference<container::XNameAccess > xChildAccess(xIface, uno::UNO_QUERY_THROW); - if (!getLdapStringParam(xChildAccess, "Server", definition->mServer)) + if (!getLdapStringParam(xChildAccess, u"Server"_ustr, definition->mServer)) return false; - if (!getLdapStringParam(xChildAccess, "BaseDN", definition->mBaseDN)) + if (!getLdapStringParam(xChildAccess, u"BaseDN"_ustr, definition->mBaseDN)) return false; definition->mPort=0; - xChildAccess->getByName("Port") >>= definition->mPort ; + xChildAccess->getByName(u"Port"_ustr) >>= definition->mPort ; if (definition->mPort == 0) return false; - if (!getLdapStringParam(xAccess, "UserObjectClass", definition->mUserObjectClass)) + if (!getLdapStringParam(xAccess, u"UserObjectClass"_ustr, definition->mUserObjectClass)) return false; - if (!getLdapStringParam(xAccess, "UserUniqueAttribute", definition->mUserUniqueAttr)) + if (!getLdapStringParam(xAccess, u"UserUniqueAttribute"_ustr, definition->mUserUniqueAttr)) return false; - getLdapStringParam(xAccess, "SearchUser", definition->mAnonUser); - getLdapStringParam(xAccess, "SearchPassword", definition->mAnonCredentials); + getLdapStringParam(xAccess, u"SearchUser"_ustr, definition->mAnonUser); + getLdapStringParam(xAccess, u"SearchPassword"_ustr, definition->mAnonCredentials); } catch (const uno::Exception&) { @@ -154,7 +154,7 @@ void LdapUserProfileBe::setPropertyValue( OUString const &, css::uno::Any const &) { throw css::lang::IllegalArgumentException( - "setPropertyValue not supported", + u"setPropertyValue not supported"_ustr, static_cast< cppu::OWeakObject * >(this), -1); } @@ -187,7 +187,7 @@ css::uno::Any LdapUserProfileBe::getPropertyValue( OUString SAL_CALL LdapUserProfileBe::getImplementationName() { - return "com.sun.star.comp.configuration.backend.LdapUserProfileBe"; + return u"com.sun.star.comp.configuration.backend.LdapUserProfileBe"_ustr; } sal_Bool SAL_CALL LdapUserProfileBe::supportsService(const OUString& aServiceName) @@ -198,7 +198,7 @@ sal_Bool SAL_CALL LdapUserProfileBe::supportsService(const OUString& aServiceNam uno::Sequence<OUString> SAL_CALL LdapUserProfileBe::getSupportedServiceNames() { - return { "com.sun.star.configuration.backend.LdapUserProfileBe" }; + return { u"com.sun.star.configuration.backend.LdapUserProfileBe"_ustr }; } } diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 8bac5d09c42c..dfeac375c391 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -54,11 +54,11 @@ namespace dbp using namespace ::comphelper; OTableSelectionPage::OTableSelectionPage(weld::Container* pPage, OControlWizard* pWizard) - : OControlWizardPage(pPage, pWizard, "modules/sabpilot/ui/tableselectionpage.ui", "TableSelectionPage") - , m_xTable(m_xBuilder->weld_tree_view("table")) - , m_xDatasource(m_xBuilder->weld_tree_view("datasource")) - , m_xSearchDatabase(m_xBuilder->weld_button("search")) - , m_xSourceBox(m_xBuilder->weld_container("sourcebox")) + : OControlWizardPage(pPage, pWizard, u"modules/sabpilot/ui/tableselectionpage.ui"_ustr, u"TableSelectionPage"_ustr) + , m_xTable(m_xBuilder->weld_tree_view(u"table"_ustr)) + , m_xDatasource(m_xBuilder->weld_tree_view(u"datasource"_ustr)) + , m_xSearchDatabase(m_xBuilder->weld_button(u"search"_ustr)) + , m_xSourceBox(m_xBuilder->weld_container(u"sourcebox"_ustr)) { try { @@ -109,7 +109,7 @@ namespace dbp try { OUString sDataSourceName; - rContext.xForm->getPropertyValue("DataSourceName") >>= sDataSourceName; + rContext.xForm->getPropertyValue(u"DataSourceName"_ustr) >>= sDataSourceName; Reference< XConnection > xConnection; bool bEmbedded = ::dbtools::isEmbeddedInDatabase( rContext.xForm, xConnection ); @@ -123,9 +123,9 @@ namespace dbp implFillTables(xConnection); OUString sCommand; - OSL_VERIFY( rContext.xForm->getPropertyValue("Command") >>= sCommand ); + OSL_VERIFY( rContext.xForm->getPropertyValue(u"Command"_ustr) >>= sCommand ); sal_Int32 nCommandType = CommandType::TABLE; - OSL_VERIFY( rContext.xForm->getPropertyValue("CommandType") >>= nCommandType ); + OSL_VERIFY( rContext.xForm->getPropertyValue(u"CommandType"_ustr) >>= nCommandType ); // search the entry of the given type with the given name for (sal_Int32 nLookup = 0; nLookup < m_xTable->n_children(); ++nLookup) @@ -160,13 +160,13 @@ namespace dbp xOldConn = getFormConnection(); OUString sDataSource = m_xDatasource->get_selected_text(); - rContext.xForm->setPropertyValue("DataSourceName", Any( sDataSource ) ); + rContext.xForm->setPropertyValue(u"DataSourceName"_ustr, Any( sDataSource ) ); } OUString sCommand = m_xTable->get_selected_text(); sal_Int32 nCommandType = m_xTable->get_selected_id().toInt32(); - rContext.xForm->setPropertyValue("Command", Any( sCommand ) ); - rContext.xForm->setPropertyValue("CommandType", Any( nCommandType ) ); + rContext.xForm->setPropertyValue(u"Command"_ustr, Any( sCommand ) ); + rContext.xForm->setPropertyValue(u"CommandType"_ustr, Any( nCommandType ) ); if ( !rContext.bEmbedded ) setFormConnection( xOldConn, false ); @@ -189,7 +189,7 @@ namespace dbp FileDialogFlags::NONE, getDialog()->getDialog()); aFileDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() ); - std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)"); + std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName(u"StarOffice XML (Base)"_ustr); OSL_ENSURE(pFilter,"Filter: StarOffice XML (Base) could not be found!"); if ( pFilter ) { @@ -405,11 +405,11 @@ namespace dbp } ODBFieldPage::ODBFieldPage(weld::Container* pPage, OControlWizard* pWizard) - : OMaybeListSelectionPage(pPage, pWizard, "modules/sabpilot/ui/optiondbfieldpage.ui", "OptionDBField") - , m_xDescription(m_xBuilder->weld_label("explLabel")) - , m_xStoreYes(m_xBuilder->weld_radio_button("yesRadiobutton")) - , m_xStoreNo(m_xBuilder->weld_radio_button("noRadiobutton")) - , m_xStoreWhere(m_xBuilder->weld_combo_box("storeInFieldCombobox")) + : OMaybeListSelectionPage(pPage, pWizard, u"modules/sabpilot/ui/optiondbfieldpage.ui"_ustr, u"OptionDBField"_ustr) + , m_xDescription(m_xBuilder->weld_label(u"explLabel"_ustr)) + , m_xStoreYes(m_xBuilder->weld_radio_button(u"yesRadiobutton"_ustr)) + , m_xStoreNo(m_xBuilder->weld_radio_button(u"noRadiobutton"_ustr)) + , m_xStoreWhere(m_xBuilder->weld_combo_box(u"storeInFieldCombobox"_ustr)) { SetPageTitle(compmodule::ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE)); diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 5a3eca35b539..4b08658c5cf5 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -137,13 +137,13 @@ namespace dbp // nothing to do return; - m_xFrame = m_xBuilder->weld_frame("sourceframe"); + m_xFrame = m_xBuilder->weld_frame(u"sourceframe"_ustr); m_xFrame->show(); - m_xFormContentType = m_xBuilder->weld_label("contenttype"); - m_xFormContentTypeLabel = m_xBuilder->weld_label("contenttypelabel"); - m_xFormDatasource = m_xBuilder->weld_label("datasource"); - m_xFormDatasourceLabel = m_xBuilder->weld_label("datasourcelabel"); - m_xFormTable = m_xBuilder->weld_label("formtable"); + m_xFormContentType = m_xBuilder->weld_label(u"contenttype"_ustr); + m_xFormContentTypeLabel = m_xBuilder->weld_label(u"contenttypelabel"_ustr); + m_xFormDatasource = m_xBuilder->weld_label(u"datasource"_ustr); + m_xFormDatasourceLabel = m_xBuilder->weld_label(u"datasourcelabel"_ustr); + m_xFormTable = m_xBuilder->weld_label(u"formtable"_ustr); const OControlWizardContext& rContext = getContext(); if ( rContext.bEmbedded ) @@ -163,9 +163,9 @@ namespace dbp sal_Int32 nCommandType = CommandType::COMMAND; try { - rContext.xForm->getPropertyValue("DataSourceName") >>= sDataSource; - rContext.xForm->getPropertyValue("Command") >>= sCommand; - rContext.xForm->getPropertyValue("CommandType") >>= nCommandType; + rContext.xForm->getPropertyValue(u"DataSourceName"_ustr) >>= sDataSource; + rContext.xForm->getPropertyValue(u"Command"_ustr) >>= sCommand; + rContext.xForm->getPropertyValue(u"CommandType"_ustr) >>= nCommandType; } catch(const Exception&) { @@ -221,7 +221,7 @@ namespace dbp sal_Int16 nClassId = FormComponentType::CONTROL; try { - getContext().xObjectModel->getPropertyValue("ClassId") >>= nClassId; + getContext().xObjectModel->getPropertyValue(u"ClassId"_ustr) >>= nClassId; } catch(const Exception&) { @@ -375,7 +375,7 @@ namespace dbp try { if ( !::dbtools::isEmbeddedInDatabase(m_aContext.xForm,xConn) ) - m_aContext.xForm->getPropertyValue("ActiveConnection") >>= xConn; + m_aContext.xForm->getPropertyValue(u"ActiveConnection"_ustr) >>= xConn; } catch(const Exception&) { @@ -404,7 +404,7 @@ namespace dbp } else { - m_aContext.xForm->setPropertyValue("ActiveConnection", Any( _rxConn ) ); + m_aContext.xForm->setPropertyValue(u"ActiveConnection"_ustr, Any( _rxConn ) ); } } catch(const Exception&) @@ -474,8 +474,8 @@ namespace dbp if (m_aContext.xForm.is()) { // collect some properties of the form - OUString sObjectName = ::comphelper::getString(m_aContext.xForm->getPropertyValue("Command")); - sal_Int32 nObjectType = ::comphelper::getINT32(m_aContext.xForm->getPropertyValue("CommandType")); + OUString sObjectName = ::comphelper::getString(m_aContext.xForm->getPropertyValue(u"Command"_ustr)); + sal_Int32 nObjectType = ::comphelper::getINT32(m_aContext.xForm->getPropertyValue(u"CommandType"_ustr)); // calculate the connection the rowset is working with Reference< XConnection > xConnection; @@ -520,7 +520,7 @@ namespace dbp // not interested in any results, only in the fields Reference< XPropertySet > xStatementProps(xStatement, UNO_QUERY); - xStatementProps->setPropertyValue("MaxRows", Any(sal_Int32(0))); + xStatementProps->setPropertyValue(u"MaxRows"_ustr, Any(sal_Int32(0))); // TODO: think about handling local SQLExceptions here ... Reference< XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), UNO_QUERY); @@ -541,7 +541,7 @@ namespace dbp { Reference< XPropertySet > xColumn; xColumns->getByName(name) >>= xColumn; - xColumn->getPropertyValue("Type") >>= nFieldType; + xColumn->getPropertyValue(u"Type"_ustr) >>= nFieldType; } catch(const Exception&) { @@ -598,11 +598,11 @@ namespace dbp try { Reference< XPropertySetInfo > xInfo = m_aContext.xObjectModel->getPropertySetInfo(); - if (xInfo.is() && xInfo->hasPropertyByName("Label")) + if (xInfo.is() && xInfo->hasPropertyByName(u"Label"_ustr)) { OUString sControlLabel(_pSettings->sControlLabel); m_aContext.xObjectModel->setPropertyValue( - "Label", + u"Label"_ustr, Any(sControlLabel) ); } @@ -623,7 +623,7 @@ namespace dbp // initialize some settings from the control model give try { - OUString sLabelPropertyName("Label"); + OUString sLabelPropertyName(u"Label"_ustr); Reference< XPropertySetInfo > xInfo = m_aContext.xObjectModel->getPropertySetInfo(); if (xInfo.is() && xInfo->hasPropertyByName(sLabelPropertyName)) { diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index ec61df855503..edf5f9090afe 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -186,11 +186,11 @@ namespace dbp disambiguateName(xExistenceChecker, sColumnName); // the data field the column should be bound to - xColumn->setPropertyValue("DataField", Any(*pFormFieldName)); + xColumn->setPropertyValue(u"DataField"_ustr, Any(*pFormFieldName)); // the label - xColumn->setPropertyValue("Label", Any(*pFormFieldName + *pColumnLabelPostfix)); + xColumn->setPropertyValue(u"Label"_ustr, Any(*pFormFieldName + *pColumnLabelPostfix)); // the width (<void/> => column will be auto-sized) - xColumn->setPropertyValue("Width", Any()); + xColumn->setPropertyValue(u"Width"_ustr, Any()); if ( xColumnPSI->hasPropertyByName( s_sMouseWheelBehavior ) ) xColumn->setPropertyValue( s_sMouseWheelBehavior, Any( MouseWheelBehavior::SCROLL_DISABLED ) ); @@ -277,13 +277,13 @@ namespace dbp } OGridFieldsSelection::OGridFieldsSelection(weld::Container* pPage, OGridWizard* pWizard) - : OGridPage(pPage, pWizard, "modules/sabpilot/ui/gridfieldsselectionpage.ui", "GridFieldsSelection") - , m_xExistFields(m_xBuilder->weld_tree_view("existingfields")) - , m_xSelectOne(m_xBuilder->weld_button("fieldright")) - , m_xSelectAll(m_xBuilder->weld_button("allfieldsright")) - , m_xDeselectOne(m_xBuilder->weld_button("fieldleft")) - , m_xDeselectAll(m_xBuilder->weld_button("allfieldsleft")) - , m_xSelFields(m_xBuilder->weld_tree_view("selectedfields")) + : OGridPage(pPage, pWizard, u"modules/sabpilot/ui/gridfieldsselectionpage.ui"_ustr, u"GridFieldsSelection"_ustr) + , m_xExistFields(m_xBuilder->weld_tree_view(u"existingfields"_ustr)) + , m_xSelectOne(m_xBuilder->weld_button(u"fieldright"_ustr)) + , m_xSelectAll(m_xBuilder->weld_button(u"allfieldsright"_ustr)) + , m_xDeselectOne(m_xBuilder->weld_button(u"fieldleft"_ustr)) + , m_xDeselectAll(m_xBuilder->weld_button(u"allfieldsleft"_ustr)) + , m_xSelFields(m_xBuilder->weld_tree_view(u"selectedfields"_ustr)) { enableFormDatasourceDisplay(); diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 37b79d8ed4e3..46d6ad1db75f 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -166,11 +166,11 @@ namespace dbp } ORadioSelectionPage::ORadioSelectionPage(weld::Container* pPage, OControlWizard* pWizard) - : OGBWPage(pPage, pWizard, "modules/sabpilot/ui/groupradioselectionpage.ui", "GroupRadioSelectionPage") - , m_xRadioName(m_xBuilder->weld_entry("radiolabels")) - , m_xMoveRight(m_xBuilder->weld_button("toright")) - , m_xMoveLeft(m_xBuilder->weld_button("toleft")) - , m_xExistingRadios(m_xBuilder->weld_tree_view("radiobuttons")) + : OGBWPage(pPage, pWizard, u"modules/sabpilot/ui/groupradioselectionpage.ui"_ustr, u"GroupRadioSelectionPage"_ustr) + , m_xRadioName(m_xBuilder->weld_entry(u"radiolabels"_ustr)) + , m_xMoveRight(m_xBuilder->weld_button(u"toright"_ustr)) + , m_xMoveLeft(m_xBuilder->weld_button(u"toleft"_ustr)) + , m_xExistingRadios(m_xBuilder->weld_tree_view(u"radiobuttons"_ustr)) { if (getContext().aFieldNames.hasElements()) { @@ -202,7 +202,7 @@ namespace dbp { OGBWPage::initializePage(); - m_xRadioName->set_text(""); + m_xRadioName->set_text(u""_ustr); // no need to initialize the list of radios here // (we're the only one affecting this special setting, so it will be in the same state as last time this @@ -243,7 +243,7 @@ namespace dbp else { m_xExistingRadios->append_text(m_xRadioName->get_text()); - m_xRadioName->set_text(""); + m_xRadioName->set_text(u""_ustr); } implCheckMoveButtons(); @@ -298,10 +298,10 @@ namespace dbp } ODefaultFieldSelectionPage::ODefaultFieldSelectionPage(weld::Container* pPage, OControlWizard* pWizard) - : OMaybeListSelectionPage(pPage, pWizard, "modules/sabpilot/ui/defaultfieldselectionpage.ui", "DefaultFieldSelectionPage") - , m_xDefSelYes(m_xBuilder->weld_radio_button("defaultselectionyes")) - , m_xDefSelNo(m_xBuilder->weld_radio_button("defaultselectionno")) - , m_xDefSelection(m_xBuilder->weld_combo_box("defselectionfield")) + : OMaybeListSelectionPage(pPage, pWizard, u"modules/sabpilot/ui/defaultfieldselectionpage.ui"_ustr, u"DefaultFieldSelectionPage"_ustr) + , m_xDefSelYes(m_xBuilder->weld_radio_button(u"defaultselectionyes"_ustr)) + , m_xDefSelNo(m_xBuilder->weld_radio_button(u"defaultselectionno"_ustr)) + , m_xDefSelection(m_xBuilder->weld_combo_box(u"defselectionfield"_ustr)) { announceControls(*m_xDefSelYes, *m_xDefSelNo, *m_xDefSelection); } @@ -336,9 +336,9 @@ namespace dbp } OOptionValuesPage::OOptionValuesPage(weld::Container* pPage, OControlWizard* pWizard) - : OGBWPage(pPage, pWizard, "modules/sabpilot/ui/optionvaluespage.ui", "OptionValuesPage") - , m_xValue(m_xBuilder->weld_entry("optionvalue")) - , m_xOptions(m_xBuilder->weld_tree_view("radiobuttons")) + : OGBWPage(pPage, pWizard, u"modules/sabpilot/ui/optionvaluespage.ui"_ustr, u"OptionValuesPage"_ustr) + , m_xValue(m_xBuilder->weld_entry(u"optionvalue"_ustr)) + , m_xOptions(m_xBuilder->weld_tree_view(u"radiobuttons"_ustr)) , m_nLastSelection(::vcl::WizardTypes::WizardState(-1)) { m_xOptions->connect_changed(LINK(this, OOptionValuesPage, OnOptionSelected)); @@ -423,8 +423,8 @@ namespace dbp } OFinalizeGBWPage::OFinalizeGBWPage(weld::Container* pPage, OControlWizard* pWizard) - : OGBWPage(pPage, pWizard, "modules/sabpilot/ui/optionsfinalpage.ui", "OptionsFinalPage") - , m_xName(m_xBuilder->weld_entry("nameit")) + : OGBWPage(pPage, pWizard, u"modules/sabpilot/ui/optionsfinalpage.ui"_ustr, u"OptionsFinalPage"_ustr) + , m_xName(m_xBuilder->weld_entry(u"nameit"_ustr)) { } diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 1e90b3c33df9..ed8caf2acc71 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -169,12 +169,12 @@ namespace dbp } // ListSourceType: SQL - getContext().xObjectModel->setPropertyValue("ListSourceType", Any(sal_Int32(ListSourceType_SQL))); + getContext().xObjectModel->setPropertyValue(u"ListSourceType"_ustr, Any(sal_Int32(ListSourceType_SQL))); if (isListBox()) { // BoundColumn: 1 - getContext().xObjectModel->setPropertyValue("BoundColumn", Any(sal_Int16(1))); + getContext().xObjectModel->setPropertyValue(u"BoundColumn"_ustr, Any(sal_Int16(1))); Sequence< OUString > aListSource { // build the statement to set as list source @@ -182,7 +182,7 @@ namespace dbp getSettings().sListContentField + ", " + getSettings().sLinkedListField + " FROM " + getSettings().sListContentTable) }; - getContext().xObjectModel->setPropertyValue("ListSource", Any(aListSource)); + getContext().xObjectModel->setPropertyValue(u"ListSource"_ustr, Any(aListSource)); } else { @@ -190,11 +190,11 @@ namespace dbp OUString sStatement = "SELECT DISTINCT " + getSettings().sListContentField + " FROM " + getSettings().sListContentTable; - getContext().xObjectModel->setPropertyValue( "ListSource", Any(sStatement)); + getContext().xObjectModel->setPropertyValue( u"ListSource"_ustr, Any(sStatement)); } // the bound field - getContext().xObjectModel->setPropertyValue("DataField", Any(getSettings().sLinkedFormField)); + getContext().xObjectModel->setPropertyValue(u"DataField"_ustr, Any(getSettings().sLinkedFormField)); } catch(const Exception&) { @@ -259,8 +259,8 @@ namespace dbp } OContentTableSelection::OContentTableSelection(weld::Container* pPage, OListComboWizard* pWizard) - : OLCPage(pPage, pWizard, "modules/sabpilot/ui/contenttablepage.ui", "TableSelectionPage") - , m_xSelectTable(m_xBuilder->weld_tree_view("table")) + : OLCPage(pPage, pWizard, u"modules/sabpilot/ui/contenttablepage.ui"_ustr, u"TableSelectionPage"_ustr) + , m_xSelectTable(m_xBuilder->weld_tree_view(u"table"_ustr)) { enableFormDatasourceDisplay(); @@ -336,10 +336,10 @@ namespace dbp } OContentFieldSelection::OContentFieldSelection(weld::Container* pPage, OListComboWizard* pWizard) - : OLCPage(pPage, pWizard, "modules/sabpilot/ui/contentfieldpage.ui", "FieldSelectionPage") - , m_xSelectTableField(m_xBuilder->weld_tree_view("selectfield")) - , m_xDisplayedField(m_xBuilder->weld_entry("displayfield")) - , m_xInfo(m_xBuilder->weld_label("info")) + : OLCPage(pPage, pWizard, u"modules/sabpilot/ui/contentfieldpage.ui"_ustr, u"FieldSelectionPage"_ustr) + , m_xSelectTableField(m_xBuilder->weld_tree_view(u"selectfield"_ustr)) + , m_xDisplayedField(m_xBuilder->weld_entry(u"displayfield"_ustr)) + , m_xInfo(m_xBuilder->weld_label(u"info"_ustr)) { m_xInfo->set_label(compmodule::ModuleRes( isListBox() ? RID_STR_FIELDINFO_LISTBOX : RID_STR_FIELDINFO_COMBOBOX)); m_xSelectTableField->connect_changed(LINK(this, OContentFieldSelection, OnFieldSelected)); @@ -393,9 +393,9 @@ namespace dbp } OLinkFieldsPage::OLinkFieldsPage(weld::Container* pPage, OListComboWizard* pWizard) - : OLCPage(pPage, pWizard, "modules/sabpilot/ui/fieldlinkpage.ui", "FieldLinkPage") - , m_xValueListField(m_xBuilder->weld_combo_box("valuefield")) - , m_xTableField(m_xBuilder->weld_combo_box("listtable")) + : OLCPage(pPage, pWizard, u"modules/sabpilot/ui/fieldlinkpage.ui"_ustr, u"FieldLinkPage"_ustr) + , m_xValueListField(m_xBuilder->weld_combo_box(u"valuefield"_ustr)) + , m_xTableField(m_xBuilder->weld_combo_box(u"listtable"_ustr)) { m_xValueListField->connect_changed(LINK(this, OLinkFieldsPage, OnSelectionModified)); m_xTableField->connect_changed(LINK(this, OLinkFieldsPage, OnSelectionModified)); diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index c35b0cefc8d7..870522855000 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -102,7 +102,7 @@ namespace dbp css::awt::Point aButtonPosition; aButtonPosition.X = aShapePosition.X + OFFSET; - OUString sElementsName("RadioGroup"); + OUString sElementsName(u"RadioGroup"_ustr); disambiguateName(Reference< XNameAccess >(_rContext.xForm, UNO_QUERY), sElementsName); auto aLabelIter = _rSettings.aLabels.cbegin(); @@ -112,28 +112,28 @@ namespace dbp aButtonPosition.Y = aShapePosition.Y + (i+1) * nTempHeight; Reference< XPropertySet > xRadioModel( - xDocFactory->createInstance("com.sun.star.form.component.RadioButton"), + xDocFactory->createInstance(u"com.sun.star.form.component.RadioButton"_ustr), UNO_QUERY); // the label - xRadioModel->setPropertyValue("Label", Any(*aLabelIter)); + xRadioModel->setPropertyValue(u"Label"_ustr, Any(*aLabelIter)); // the value - xRadioModel->setPropertyValue("RefValue", Any(*aValueIter)); + xRadioModel->setPropertyValue(u"RefValue"_ustr, Any(*aValueIter)); // default selection if (_rSettings.sDefaultField == *aLabelIter) - xRadioModel->setPropertyValue("DefaultState", Any(sal_Int16(1))); + xRadioModel->setPropertyValue(u"DefaultState"_ustr, Any(sal_Int16(1))); // the connection to the database field if (!_rSettings.sDBField.isEmpty()) - xRadioModel->setPropertyValue("DataField", Any(_rSettings.sDBField)); + xRadioModel->setPropertyValue(u"DataField"_ustr, Any(_rSettings.sDBField)); // the name for the model - xRadioModel->setPropertyValue("Name", Any(sElementsName)); + xRadioModel->setPropertyValue(u"Name"_ustr, Any(sElementsName)); // create a shape for the radio button Reference< XControlShape > xRadioShape( - xDocFactory->createInstance("com.sun.star.drawing.ControlShape"), + xDocFactory->createInstance(u"com.sun.star.drawing.ControlShape"_ustr), UNO_QUERY); Reference< XPropertySet > xShapeProperties(xRadioShape, UNO_QUERY); @@ -164,7 +164,7 @@ namespace dbp // set the GroupBox as "LabelControl" for the RadioButton // (_after_ having inserted the model into the page!) - xRadioModel->setPropertyValue("LabelControl", Any(_rContext.xObjectModel)); + xRadioModel->setPropertyValue(u"LabelControl"_ustr, Any(_rContext.xObjectModel)); } // group the shapes diff --git a/extensions/source/dbpilots/wizardservices.cxx b/extensions/source/dbpilots/wizardservices.cxx index 25bcf79427b2..91d2ecedd21d 100644 --- a/extensions/source/dbpilots/wizardservices.cxx +++ b/extensions/source/dbpilots/wizardservices.cxx @@ -33,8 +33,8 @@ extensions_dbp_OGroupBoxWizard_get_implementation( return cppu::acquire( new ::dbp::OUnoAutoPilot< ::dbp::OGroupBoxWizard>( context, - "org.openoffice.comp.dbp.OGroupBoxWizard", - { "com.sun.star.sdb.GroupBoxAutoPilot" } + u"org.openoffice.comp.dbp.OGroupBoxWizard"_ustr, + { u"com.sun.star.sdb.GroupBoxAutoPilot"_ustr } )); } @@ -45,8 +45,8 @@ extensions_dbp_OListComboWizard_get_implementation( return cppu::acquire( new ::dbp::OUnoAutoPilot< ::dbp::OListComboWizard>( context, - "org.openoffice.comp.dbp.OListComboWizard", - { "com.sun.star.sdb.ListComboBoxAutoPilot" } + u"org.openoffice.comp.dbp.OListComboWizard"_ustr, + { u"com.sun.star.sdb.ListComboBoxAutoPilot"_ustr } )); } @@ -57,8 +57,8 @@ extensions_dbp_OGridWizard_get_implementation( return cppu::acquire( new ::dbp::OUnoAutoPilot< ::dbp::OGridWizard>( context, - "org.openoffice.comp.dbp.OGridWizard", - { "com.sun.star.sdb.GridControlAutoPilot" } + u"org.openoffice.comp.dbp.OGridWizard"_ustr, + { u"com.sun.star.sdb.GridControlAutoPilot"_ustr } )); } diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx index d1455baa3178..9781bf34b06f 100644 --- a/extensions/source/logging/consolehandler.cxx +++ b/extensions/source/logging/consolehandler.cxx @@ -121,7 +121,7 @@ namespace logging -e ... etc. - the rest is truncated