diff options
Diffstat (limited to 'extensions')
85 files changed, 844 insertions, 844 deletions
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 ::comphelper::NamedValueCollection aTypedSettings( aSettings ); m_aHandlerHelper.initFromSettings( aTypedSettings ); - aTypedSettings.get_ensureType( "Threshold", m_nThreshold ); + aTypedSettings.get_ensureType( u"Threshold"_ustr, m_nThreshold ); m_aHandlerHelper.setIsInitialized(); } @@ -238,7 +238,7 @@ namespace logging OUString SAL_CALL ConsoleHandler::getImplementationName() { - return "com.sun.star.comp.extensions.ConsoleHandler"; + return u"com.sun.star.comp.extensions.ConsoleHandler"_ustr; } sal_Bool SAL_CALL ConsoleHandler::supportsService( const OUString& _rServiceName ) @@ -248,7 +248,7 @@ namespace logging Sequence< OUString > SAL_CALL ConsoleHandler::getSupportedServiceNames() { - return { "com.sun.star.logging.ConsoleHandler" }; + return { u"com.sun.star.logging.ConsoleHandler"_ustr }; } } // namespace logging diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx index a9ea13f208ca..a94c836b330f 100644 --- a/extensions/source/logging/csvformatter.cxx +++ b/extensions/source/logging/csvformatter.cxx @@ -134,7 +134,7 @@ namespace logging m_LogTimestamp(true), m_LogSource(false), m_MultiColumn(false), - m_Columnnames({ "message" }) + m_Columnnames({ u"message"_ustr }) { } sal_Bool CsvFormatter::getLogEventNo() @@ -233,7 +233,7 @@ namespace logging || 60 < record.LogTime.Seconds || 999999999 < record.LogTime.NanoSeconds) { - throw css::lang::IllegalArgumentException("invalid date", static_cast<cppu::OWeakObject*>(this), 1); + throw css::lang::IllegalArgumentException(u"invalid date"_ustr, static_cast<cppu::OWeakObject*>(this), 1); } // ISO 8601 @@ -298,12 +298,12 @@ namespace logging OUString SAL_CALL CsvFormatter::getImplementationName() { - return "com.sun.star.comp.extensions.CsvFormatter"; + return u"com.sun.star.comp.extensions.CsvFormatter"_ustr; } Sequence< OUString > SAL_CALL CsvFormatter::getSupportedServiceNames() { - return { "com.sun.star.logging.CsvFormatter" }; + return { u"com.sun.star.logging.CsvFormatter"_ustr }; } } // namespace logging diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index 8108f7c6abf8..76863e350001 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -149,7 +149,7 @@ namespace logging ::comphelper::NamedValueCollection aTypedSettings( aSettings ); m_aHandlerHelper.initFromSettings( aTypedSettings ); - if ( aTypedSettings.get_ensureType( "FileURL", m_sFileURL ) ) + if ( aTypedSettings.get_ensureType( u"FileURL"_ustr, m_sFileURL ) ) impl_doStringsubstitution_nothrow( m_sFileURL ); } else @@ -333,7 +333,7 @@ namespace logging OUString SAL_CALL FileHandler::getImplementationName() { - return "com.sun.star.comp.extensions.FileHandler"; + return u"com.sun.star.comp.extensions.FileHandler"_ustr; } sal_Bool SAL_CALL FileHandler::supportsService( const OUString& _rServiceName ) @@ -343,7 +343,7 @@ namespace logging Sequence< OUString > SAL_CALL FileHandler::getSupportedServiceNames() { - return { "com.sun.star.logging.FileHandler" }; + return { u"com.sun.star.logging.FileHandler"_ustr }; } } // namespace logging diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index 4ae2f79362fc..c1d4d88ddfa2 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -219,7 +219,7 @@ namespace logging OUString SAL_CALL LoggerPool::getImplementationName() { - return "com.sun.star.comp.extensions.LoggerPool"; + return u"com.sun.star.comp.extensions.LoggerPool"_ustr; } sal_Bool SAL_CALL LoggerPool::supportsService( const OUString& _rServiceName ) @@ -229,7 +229,7 @@ namespace logging Sequence< OUString > SAL_CALL LoggerPool::getSupportedServiceNames() { - return { "com.sun.star.logging.LoggerPool" }; + return { u"com.sun.star.logging.LoggerPool"_ustr }; } Reference< XLogger > SAL_CALL LoggerPool::getNamedLogger( const OUString& _rName ) @@ -250,7 +250,7 @@ namespace logging Reference< XLogger > SAL_CALL LoggerPool::getDefaultLogger( ) { - return getNamedLogger( "org.openoffice.logging.DefaultLogger" ); + return getNamedLogger( u"org.openoffice.logging.DefaultLogger"_ustr ); } } // namespace logging diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index daf42859b833..31f7ce784ae7 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -218,9 +218,9 @@ namespace logging // write access to the "Settings" node (which includes settings for all loggers) Sequence<Any> aArguments{ Any(NamedValue( - "nodepath", Any(OUString("/org.openoffice.Office.Logging/Settings")))) }; + u"nodepath"_ustr, Any(u"/org.openoffice.Office.Logging/Settings"_ustr))) }; Reference< XNameContainer > xAllSettings( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArguments ), UNO_QUERY_THROW ); @@ -240,7 +240,7 @@ namespace logging // the log level sal_Int32 nLogLevel( LogLevel::OFF ); - OSL_VERIFY( xLoggerSettings->getByName("LogLevel") >>= nLogLevel ); + OSL_VERIFY( xLoggerSettings->getByName(u"LogLevel"_ustr) >>= nLogLevel ); _rxLogger->setLevel( nLogLevel ); // the default handler, if any diff --git a/extensions/source/logging/loghandler.cxx b/extensions/source/logging/loghandler.cxx index a398bd053acd..c09db1fe4cd9 100644 --- a/extensions/source/logging/loghandler.cxx +++ b/extensions/source/logging/loghandler.cxx @@ -58,14 +58,14 @@ namespace logging void LogHandlerHelper::initFromSettings( const ::comphelper::NamedValueCollection& _rSettings ) { OUString sEncoding; - if ( _rSettings.get_ensureType( "Encoding", sEncoding ) ) + if ( _rSettings.get_ensureType( u"Encoding"_ustr, sEncoding ) ) { if ( !setEncoding( sEncoding ) ) throw IllegalArgumentException(); } - _rSettings.get_ensureType( "Formatter", m_xFormatter ); - _rSettings.get_ensureType( "Level", m_nLevel ); + _rSettings.get_ensureType( u"Formatter"_ustr, m_xFormatter ); + _rSettings.get_ensureType( u"Level"_ustr, m_nLevel ); } @@ -74,10 +74,10 @@ namespace logging m_rMutex.acquire(); if ( !m_bInitialized ) - throw DisposedException("component not initialized" ); + throw DisposedException(u"component not initialized"_ustr ); if ( m_rBHelper.bDisposed ) - throw DisposedException("component already disposed" ); + throw DisposedException(u"component already disposed"_ustr ); // fallback settings, in case they weren't passed at construction time if ( !getFormatter().is() ) diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx index 2c534a2a2e8f..ef176f6ba0dd 100644 --- a/extensions/source/logging/plaintextformatter.cxx +++ b/extensions/source/logging/plaintextformatter.cxx @@ -66,7 +66,7 @@ namespace logging OUString SAL_CALL PlainTextFormatter::getHead( ) { return - " event no" // column 1: the event number + u" event no" // column 1: the event number " " "thread " // column 2: the thread ID " " @@ -75,7 +75,7 @@ namespace logging "time " // column 4: time " " "(class/method:) message" // column 5: class/method/message - "\n"; + "\n"_ustr; } @@ -129,12 +129,12 @@ namespace logging OUString SAL_CALL PlainTextFormatter::getImplementationName() { - return "com.sun.star.comp.extensions.PlainTextFormatter"; + return u"com.sun.star.comp.extensions.PlainTextFormatter"_ustr; } Sequence< OUString > SAL_CALL PlainTextFormatter::getSupportedServiceNames() { - return { "com.sun.star.logging.PlainTextFormatter" }; + return { u"com.sun.star.logging.PlainTextFormatter"_ustr }; } } // namespace logging diff --git a/extensions/source/logging/simpletextformatter.cxx b/extensions/source/logging/simpletextformatter.cxx index b54fea5a645b..11cacac420de 100644 --- a/extensions/source/logging/simpletextformatter.cxx +++ b/extensions/source/logging/simpletextformatter.cxx @@ -78,12 +78,12 @@ sal_Bool SAL_CALL SimpleTextFormatter::supportsService(const OUString& _rService OUString SAL_CALL SimpleTextFormatter::getImplementationName() { - return "com.sun.star.comp.extensions.SimpleTextFormatter"; + return u"com.sun.star.comp.extensions.SimpleTextFormatter"_ustr; } Sequence<OUString> SAL_CALL SimpleTextFormatter::getSupportedServiceNames() { - return { "com.sun.star.logging.SimpleTextFormatter" }; + return { u"com.sun.star.logging.SimpleTextFormatter"_ustr }; } } // namespace logging diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx index 4f4e6d9a97f1..117d7c7da1ce 100644 --- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx +++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx @@ -43,13 +43,13 @@ namespace pcr OUString SAL_CALL MasterDetailLinkDialog::getImplementationName() { - return "org.openoffice.comp.form.ui.MasterDetailLinkDialog"; + return u"org.openoffice.comp.form.ui.MasterDetailLinkDialog"_ustr; } css::uno::Sequence<OUString> SAL_CALL MasterDetailLinkDialog::getSupportedServiceNames() { - return { "com.sun.star.form.MasterDetailLinkDialog" }; + return { u"com.sun.star.form.MasterDetailLinkDialog"_ustr }; } diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index f4619000dcf8..8e7d3e0699e6 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -54,11 +54,11 @@ namespace pcr OBrowserLine::OBrowserLine(OUString aEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup, weld::Container* pInitialControlParent) : m_sEntryName(std::move(aEntryName)) - , m_xBuilder(Application::CreateBuilder(pParent, "modules/spropctrlr/ui/browserline.ui")) - , m_xContainer(m_xBuilder->weld_container("BrowserLine")) - , m_xFtTitle(m_xBuilder->weld_label("label")) - , m_xBrowseButton(m_xBuilder->weld_button("browse")) - , m_xAdditionalBrowseButton(m_xBuilder->weld_button("morebrowse")) + , m_xBuilder(Application::CreateBuilder(pParent, u"modules/spropctrlr/ui/browserline.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"BrowserLine"_ustr)) + , m_xFtTitle(m_xBuilder->weld_label(u"label"_ustr)) + , m_xBrowseButton(m_xBuilder->weld_button(u"browse"_ustr)) + , m_xAdditionalBrowseButton(m_xBuilder->weld_button(u"morebrowse"_ustr)) , m_pInitialControlParent(pInitialControlParent) // controls start with this as their parent and need to be moved into m_xContainer , m_pParent(pParent) , m_pControlWindow( nullptr ) @@ -177,7 +177,7 @@ namespace pcr { OUStringBuffer aText(m_xFtTitle->get_label()); - int n10DotsWidth = m_xFtTitle->get_pixel_size("..........").Width(); + int n10DotsWidth = m_xFtTitle->get_pixel_size(u".........."_ustr).Width(); int nTextWidth = m_xFtTitle->get_pixel_size(OUString::unacquired(aText)).Width(); int nDiff = m_nNameWidth - nTextWidth; int nExtraChars = (nDiff * 10) / n10DotsWidth; @@ -314,7 +314,7 @@ namespace pcr Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create(xContext) ); - Sequence aMediaProperties{ comphelper::makePropertyValue("URL", rImageURL) }; + Sequence aMediaProperties{ comphelper::makePropertyValue(u"URL"_ustr, rImageURL) }; xGraphic = Reference<XGraphic>(xGraphicProvider->queryGraphic(aMediaProperties), css::uno::UNO_SET_THROW); } @@ -366,7 +366,7 @@ namespace pcr void OBrowserLine::SetTitleWidth(sal_uInt16 nWidth) { - int nMinDotsWidth = m_xFtTitle->get_pixel_size("...").Width(); + int nMinDotsWidth = m_xFtTitle->get_pixel_size(u"..."_ustr).Width(); if (m_nNameWidth != nWidth + nMinDotsWidth) m_nNameWidth = nWidth + nMinDotsWidth; FullFillTitleString(); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index b48fc7fa227e..1ae4650a26bb 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -297,8 +297,8 @@ namespace pcr } OBrowserListBox::OBrowserListBox(weld::Builder& rBuilder, weld::Container* pContainer) - : m_xScrolledWindow(rBuilder.weld_scrolled_window("scrolledwindow")) - , m_xLinesPlayground(rBuilder.weld_container("playground")) + : m_xScrolledWindow(rBuilder.weld_scrolled_window(u"scrolledwindow"_ustr)) + , m_xLinesPlayground(rBuilder.weld_container(u"playground"_ustr)) , m_xSizeGroup(rBuilder.create_size_group()) , m_xHelpWindow(new InspectorHelpWindow(rBuilder)) , m_pInitialControlParent(pContainer) diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx index 5502418bd0e2..610315c18fb5 100644 --- a/extensions/source/propctrlr/browserpage.cxx +++ b/extensions/source/propctrlr/browserpage.cxx @@ -24,8 +24,8 @@ namespace pcr { OBrowserPage::OBrowserPage(weld::Container* pParent, weld::Container* pInitialControlContainer) : m_pParent(pParent) - , m_xBuilder(Application::CreateBuilder(pParent, "modules/spropctrlr/ui/browserpage.ui")) - , m_xContainer(m_xBuilder->weld_container("BrowserPage")) + , m_xBuilder(Application::CreateBuilder(pParent, u"modules/spropctrlr/ui/browserpage.ui"_ustr)) + , m_xContainer(m_xBuilder->weld_container(u"BrowserPage"_ustr)) , m_xListBox(new OBrowserListBox(*m_xBuilder, pInitialControlContainer)) { } diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx index 43ed02a952d6..2aa0c7b93422 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.cxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx @@ -47,13 +47,13 @@ namespace pcr OUString ButtonNavigationHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.ButtonNavigationHandler"; + return u"com.sun.star.comp.extensions.ButtonNavigationHandler"_ustr; } Sequence< OUString > ButtonNavigationHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.ButtonNavigationHandler" }; + return { u"com.sun.star.form.inspection.ButtonNavigationHandler"_ustr }; } diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index bd1628192eb8..b1acab9ccbce 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -52,13 +52,13 @@ namespace pcr OUString CellBindingPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.CellBindingPropertyHandler"; + return u"com.sun.star.comp.extensions.CellBindingPropertyHandler"_ustr; } Sequence< OUString > CellBindingPropertyHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.CellBindingPropertyHandler" }; + return { u"com.sun.star.form.inspection.CellBindingPropertyHandler"_ustr }; } diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx index 33da88b14ff4..4b587813534b 100644 --- a/extensions/source/propctrlr/controlfontdialog.cxx +++ b/extensions/source/propctrlr/controlfontdialog.cxx @@ -66,13 +66,13 @@ namespace pcr OUString SAL_CALL OControlFontDialog::getImplementationName() { - return "org.openoffice.comp.form.ui.OControlFontDialog"; + return u"org.openoffice.comp.form.ui.OControlFontDialog"_ustr; } css::uno::Sequence<OUString> SAL_CALL OControlFontDialog::getSupportedServiceNames() { - return { "com.sun.star.form.ControlFontDialog" }; + return { u"com.sun.star.form.ControlFontDialog"_ustr }; } void OControlFontDialog::initialize( const Sequence< Any >& aArguments ) @@ -80,7 +80,7 @@ namespace pcr Reference<XPropertySet> xGridModel; if (aArguments.getLength() == 1 && (aArguments[0] >>= xGridModel)) { - Sequence aNewArguments{ Any(comphelper::makePropertyValue("IntrospectedObject", + Sequence aNewArguments{ Any(comphelper::makePropertyValue(u"IntrospectedObject"_ustr, xGridModel)) }; OControlFontDialog_DBase::initialize(aNewArguments); } diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index 3fa7fa5658a5..d6336eccf957 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -57,13 +57,13 @@ namespace pcr OUString SAL_CALL DefaultFormComponentInspectorModel::getImplementationName( ) { - return "org.openoffice.comp.extensions.DefaultFormComponentInspectorModel"; + return u"org.openoffice.comp.extensions.DefaultFormComponentInspectorModel"_ustr; } Sequence< OUString > SAL_CALL DefaultFormComponentInspectorModel::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.DefaultFormComponentInspectorModel" }; + return { u"com.sun.star.form.inspection.DefaultFormComponentInspectorModel"_ustr }; } diff --git a/extensions/source/propctrlr/defaulthelpprovider.cxx b/extensions/source/propctrlr/defaulthelpprovider.cxx index 96c99af67e27..d087c474cae2 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.cxx +++ b/extensions/source/propctrlr/defaulthelpprovider.cxx @@ -62,12 +62,12 @@ namespace pcr Sequence< OUString > SAL_CALL DefaultHelpProvider::getSupportedServiceNames() { - return { "com.sun.star.inspection.DefaultHelpProvider" }; + return { u"com.sun.star.inspection.DefaultHelpProvider"_ustr }; } OUString SAL_CALL DefaultHelpProvider::getImplementationName() { - return "org.openoffice.comp.extensions.DefaultHelpProvider"; + return u"org.openoffice.comp.extensions.DefaultHelpProvider"_ustr; } sal_Bool SAL_CALL DefaultHelpProvider::supportsService(const OUString& aServiceName) diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx index 272e24428e20..1cc655736508 100644 --- a/extensions/source/propctrlr/editpropertyhandler.cxx +++ b/extensions/source/propctrlr/editpropertyhandler.cxx @@ -60,13 +60,13 @@ namespace pcr OUString EditPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.EditPropertyHandler"; + return u"com.sun.star.comp.extensions.EditPropertyHandler"_ustr; } Sequence< OUString > EditPropertyHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.EditPropertyHandler" }; + return { u"com.sun.star.form.inspection.EditPropertyHandler"_ustr }; } @@ -279,7 +279,7 @@ namespace pcr _rxInspectorUI->enablePropertyUI( PROPERTY_LINEEND_FORMAT, nTextType != TextType::SINGLELINE ); _rxInspectorUI->enablePropertyUI( PROPERTY_VERTICAL_ALIGN, nTextType == TextType::SINGLELINE ); - _rxInspectorUI->showCategory( "Data", nTextType != TextType::RICHTEXT ); + _rxInspectorUI->showCategory( u"Data"_ustr, nTextType != TextType::RICHTEXT ); } break; diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 68e8ebb4f423..59c97ac12c92 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -64,13 +64,13 @@ namespace pcr OUString EFormsPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.EFormsPropertyHandler"; + return u"com.sun.star.comp.extensions.EFormsPropertyHandler"_ustr; } Sequence< OUString > EFormsPropertyHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.XMLFormsPropertyHandler" }; + return { u"com.sun.star.form.inspection.XMLFormsPropertyHandler"_ustr }; } @@ -483,7 +483,7 @@ namespace pcr try { Reference< XExecutableDialog > xDialog; - xDialog.set( m_xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.xforms.ui.dialogs.AddCondition", m_xContext ), UNO_QUERY ); + xDialog.set( m_xContext->getServiceManager()->createInstanceWithContext( u"com.sun.star.xforms.ui.dialogs.AddCondition"_ustr, m_xContext ), UNO_QUERY ); Reference< XPropertySet > xDialogProps( xDialog, UNO_QUERY_THROW ); // the model for the dialog to work with @@ -498,15 +498,15 @@ namespace pcr if ( !xModel.is() || !xBinding.is() || sFacetName.isEmpty() ) return InteractiveSelectionResult_Cancelled; - xDialogProps->setPropertyValue("FormModel", Any( xModel ) ); - xDialogProps->setPropertyValue("Binding", Any( xBinding ) ); - xDialogProps->setPropertyValue("FacetName", Any( sFacetName ) ); + xDialogProps->setPropertyValue(u"FormModel"_ustr, Any( xModel ) ); + xDialogProps->setPropertyValue(u"Binding"_ustr, Any( xBinding ) ); + xDialogProps->setPropertyValue(u"FacetName"_ustr, Any( sFacetName ) ); if ( !xDialog->execute() ) // cancelled return InteractiveSelectionResult_Cancelled; - _rData = xDialogProps->getPropertyValue("ConditionValue"); + _rData = xDialogProps->getPropertyValue(u"ConditionValue"_ustr); return InteractiveSelectionResult_ObtainedValue; } catch( const Exception& ) diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 7e4ca0747cb4..fe497681203f 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -362,8 +362,8 @@ namespace pcr ::comphelper::NamedValueCollection aExtractor( aScriptDescriptor ); - pos->second.ScriptType = aExtractor.getOrDefault( "EventType", OUString() ); - pos->second.ScriptCode = aExtractor.getOrDefault( "Script", OUString() ); + pos->second.ScriptType = aExtractor.getOrDefault( u"EventType"_ustr, OUString() ); + pos->second.ScriptCode = aExtractor.getOrDefault( u"Script"_ustr, OUString() ); } Any SAL_CALL EventHolder::getByName( const OUString& _rName ) @@ -371,8 +371,8 @@ namespace pcr ScriptEventDescriptor aDescriptor( impl_getDescriptor_throw( _rName ) ); Sequence< PropertyValue > aScriptDescriptor{ - comphelper::makePropertyValue("EventType", aDescriptor.ScriptType), - comphelper::makePropertyValue("Script", aDescriptor.ScriptCode) + comphelper::makePropertyValue(u"EventType"_ustr, aDescriptor.ScriptType), + comphelper::makePropertyValue(u"Script"_ustr, aDescriptor.ScriptCode) }; return Any( aScriptDescriptor ); @@ -433,7 +433,7 @@ namespace pcr OUString SAL_CALL EventHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.EventHandler"; + return u"com.sun.star.comp.extensions.EventHandler"_ustr; } sal_Bool SAL_CALL EventHandler::supportsService( const OUString& ServiceName ) @@ -443,7 +443,7 @@ namespace pcr Sequence< OUString > SAL_CALL EventHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.EventHandler" }; + return { u"com.sun.star.form.inspection.EventHandler"_ustr }; } void SAL_CALL EventHandler::inspect( const Reference< XInterface >& _rxIntrospectee ) @@ -591,8 +591,8 @@ namespace pcr aComposeBuffer.append( xScriptUri->getName() ); // location - const OUString sLocation = xScriptUri->getParameter( "location" ); - const OUString sLanguage = xScriptUri->getParameter( "language" ); + const OUString sLocation = xScriptUri->getParameter( u"location"_ustr ); + const OUString sLanguage = xScriptUri->getParameter( u"language"_ustr ); if ( !(sLocation.isEmpty() && sLanguage.isEmpty()) ) { diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 78dd50c8475d..f9bc9bd93b61 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -199,11 +199,11 @@ namespace pcr //= ControlCharacterDialog ControlCharacterDialog::ControlCharacterDialog(weld::Window* pParent, const SfxItemSet& _rCoreSet) - : SfxTabDialogController(pParent, "modules/spropctrlr/ui/controlfontdialog.ui", "ControlFontDialog", &_rCoreSet) + : SfxTabDialogController(pParent, u"modules/spropctrlr/ui/controlfontdialog.ui"_ustr, u"ControlFontDialog"_ustr, &_rCoreSet) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr ); - AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr ); + AddTabPage(u"font"_ustr, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr ); + AddTabPage(u"fonteffects"_ustr, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr ); } ControlCharacterDialog::~ControlCharacterDialog() @@ -545,7 +545,7 @@ namespace pcr // just to be sure... _rpSet = nullptr; _rpPool = nullptr; - _rpPool = new SfxItemPool("PCRControlFontItemPool"); + _rpPool = new SfxItemPool(u"PCRControlFontItemPool"_ustr); _rpPool->registerItemInfoPackage( getItemInfoPackageCntChrDlg(), [&rFontList](sal_uInt16 nWhich) diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 1b36dd64e387..b00cc9a110c3 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -159,13 +159,13 @@ namespace pcr OUString FormComponentPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.FormComponentPropertyHandler"; + return u"com.sun.star.comp.extensions.FormComponentPropertyHandler"_ustr; } Sequence< OUString > FormComponentPropertyHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.FormComponentPropertyHandler" }; + return { u"com.sun.star.form.inspection.FormComponentPropertyHandler"_ustr }; } namespace { @@ -221,7 +221,7 @@ namespace pcr Reference< resource::XStringResourceResolver > xStringResourceResolver; try { - xStringResourceResolver.set( _xComponent->getPropertyValue( "ResourceResolver" ),UNO_QUERY); + xStringResourceResolver.set( _xComponent->getPropertyValue( u"ResourceResolver"_ustr ),UNO_QUERY); if( xStringResourceResolver.is() && xStringResourceResolver->getLocales().hasElements() ) { @@ -993,8 +993,8 @@ namespace pcr case PROPERTY_ID_TARGET_URL: case PROPERTY_ID_IMAGE_URL: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/urlcontrol.ui", m_xContext)); - auto pURLBox = std::make_unique<SvtURLBox>(xBuilder->weld_combo_box("urlcontrol")); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/urlcontrol.ui"_ustr, m_xContext)); + auto pURLBox = std::make_unique<SvtURLBox>(xBuilder->weld_combo_box(u"urlcontrol"_ustr)); rtl::Reference<OFileUrlControl> pControl = new OFileUrlControl(std::move(pURLBox), std::move(xBuilder), false); pControl->SetModifyHandler(); aDescriptor.Control = pControl; @@ -1094,8 +1094,8 @@ namespace pcr if ( bIsFormatKey ) { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/formattedsample.ui", m_xContext)); - auto pContainer = xBuilder->weld_container("formattedsample"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/formattedsample.ui"_ustr, m_xContext)); + auto pContainer = xBuilder->weld_container(u"formattedsample"_ustr); rtl::Reference<OFormatSampleControl> pControl = new OFormatSampleControl(std::move(pContainer), std::move(xBuilder), false); pControl->SetModifyHandler(); @@ -1107,8 +1107,8 @@ namespace pcr } else { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/formattedcontrol.ui", m_xContext)); - auto pSpinButton = xBuilder->weld_formatted_spin_button("formattedcontrol"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/formattedcontrol.ui"_ustr, m_xContext)); + auto pSpinButton = xBuilder->weld_formatted_spin_button(u"formattedcontrol"_ustr); rtl::Reference<OFormattedNumericControl> pControl = new OFormattedNumericControl(std::move(pSpinButton), std::move(xBuilder), false); pControl->SetModifyHandler(); @@ -1146,8 +1146,8 @@ namespace pcr case PROPERTY_ID_DEFAULT_VALUE: case PROPERTY_ID_VALUE: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/formattedcontrol.ui", m_xContext)); - auto pSpinButton = xBuilder->weld_formatted_spin_button("formattedcontrol"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/formattedcontrol.ui"_ustr, m_xContext)); + auto pSpinButton = xBuilder->weld_formatted_spin_button(u"formattedcontrol"_ustr); rtl::Reference<OFormattedNumericControl> pControl = new OFormattedNumericControl(std::move(pSpinButton), std::move(xBuilder), false); pControl->SetModifyHandler(); aDescriptor.Control = pControl; @@ -1279,8 +1279,8 @@ namespace pcr { case PROPERTY_ID_REPEAT_DELAY: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/numericfield.ui", m_xContext)); - auto pSpinButton = xBuilder->weld_metric_spin_button("numericfield", FieldUnit::MILLISECOND); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/numericfield.ui"_ustr, m_xContext)); + auto pSpinButton = xBuilder->weld_metric_spin_button(u"numericfield"_ustr, FieldUnit::MILLISECOND); rtl::Reference<ONumericControl> pControl = new ONumericControl(std::move(pSpinButton), std::move(xBuilder), bReadOnly); pControl->SetModifyHandler(); pControl->setMinValue( Optional< double >( true, 0 ) ); @@ -2381,7 +2381,7 @@ namespace pcr if ( !m_xRowSetConnection.is() ) { uno::Reference<sdbc::XConnection> xConnection; - Any any = m_xContext->getValueByName( "ActiveConnection" ); + Any any = m_xContext->getValueByName( u"ActiveConnection"_ustr ); any >>= xConnection; m_xRowSetConnection.reset(xConnection,::dbtools::SharedConnection::NoTakeOwnership); } @@ -2627,11 +2627,11 @@ namespace pcr // initialize the dialog Reference< XPropertySet > xDialogProps( xDialog, UNO_QUERY_THROW ); - xDialogProps->setPropertyValue("QueryComposer", Any( xComposer ) ); - xDialogProps->setPropertyValue("RowSet", Any( m_xComponent ) ); + xDialogProps->setPropertyValue(u"QueryComposer"_ustr, Any( xComposer ) ); + xDialogProps->setPropertyValue(u"RowSet"_ustr, Any( m_xComponent ) ); if (auto pTopLevel = impl_getDefaultDialogFrame_nothrow()) - xDialogProps->setPropertyValue("ParentWindow", Any(pTopLevel->GetXWindow())); - xDialogProps->setPropertyValue("Title", Any( sPropertyUIName ) ); + xDialogProps->setPropertyValue(u"ParentWindow"_ustr, Any(pTopLevel->GetXWindow())); + xDialogProps->setPropertyValue(u"Title"_ustr, Any( sPropertyUIName ) ); _rClearBeforeDialog.clear(); bSuccess = ( xDialog->execute() != 0 ); @@ -2700,7 +2700,7 @@ namespace pcr // a tab dialog with a single page SfxSingleTabDialogController aDialog(impl_getDefaultDialogFrame_nothrow(), &aCoreSet, - "cui/ui/formatnumberdialog.ui", "FormatNumberDialog"); + u"cui/ui/formatnumberdialog.ui"_ustr, u"FormatNumberDialog"_ustr); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ); if ( !fnCreatePage ) @@ -2865,7 +2865,7 @@ namespace pcr weld::Window* pWin = impl_getDefaultDialogFrame_nothrow(); ::sfx2::FileDialogHelper aFileDlg( ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE, - "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, pWin); + u"sdatabase"_ustr, SfxFilterFlags::NONE, SfxFilterFlags::NONE, pWin); OUString sDataSource; if( ! (impl_getPropertyValue_throw( PROPERTY_DATASOURCE ) >>= sDataSource) ) @@ -2876,7 +2876,7 @@ namespace pcr // is considered to be potentially expensive aFileDlg.SetDisplayDirectory( sDataSource ); - 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 ) { @@ -2923,7 +2923,7 @@ namespace pcr Reference< XControlContainer > FormComponentPropertyHandler::impl_getContextControlContainer_nothrow() const { Reference< XControlContainer > xControlContext; - Any any = m_xContext->getValueByName( "ControlContext" ); + Any any = m_xContext->getValueByName( u"ControlContext"_ustr ); any >>= xControlContext; return xControlContext; } diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx index f2daf2dbd329..8ebfe136dac7 100644 --- a/extensions/source/propctrlr/formcontroller.cxx +++ b/extensions/source/propctrlr/formcontroller.cxx @@ -230,8 +230,8 @@ extensions_propctrlr_FormController_get_implementation( css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any> const&) { return cppu::acquire(new pcr::FormController( context, - "org.openoffice.comp.extensions.FormController", - { "com.sun.star.form.PropertyBrowserController" }, + u"org.openoffice.comp.extensions.FormController"_ustr, + { u"com.sun.star.form.PropertyBrowserController"_ustr }, true ) ); } @@ -240,8 +240,8 @@ extensions_propctrlr_DialogController_get_implementation( css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any> const&) { return cppu::acquire(new pcr::FormController( context, - "org.openoffice.comp.extensions.DialogController", - { "com.sun.star.awt.PropertyBrowserController" }, + u"org.openoffice.comp.extensions.DialogController"_ustr, + { u"com.sun.star.awt.PropertyBrowserController"_ustr }, false ) ); } diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index b07cd7eb145e..65e47f0a09b2 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -304,7 +304,7 @@ namespace pcr if ( !xCheckGrid.is() ) { Reference< XMap > xControlMap; - Any any = m_xContext->getValueByName( "ControlShapeAccess" ); + Any any = m_xContext->getValueByName( u"ControlShapeAccess"_ustr ); any >>= xControlMap; m_xAssociatedShape.set( xControlMap->get( Any( xControlModel ) ), UNO_QUERY_THROW ); m_xShapeProperties.set( m_xAssociatedShape, UNO_QUERY_THROW ); @@ -323,13 +323,13 @@ namespace pcr OUString FormGeometryHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.FormGeometryHandler"; + return u"com.sun.star.comp.extensions.FormGeometryHandler"_ustr; } Sequence< OUString > FormGeometryHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.FormGeometryHandler" }; + return { u"com.sun.star.form.inspection.FormGeometryHandler"_ustr }; } @@ -608,7 +608,7 @@ namespace pcr if ( !xPSI->hasPropertyByName( PROPERTY_ANCHOR ) ) return false; Reference< XServiceInfo > xSI( m_xAssociatedShape, UNO_QUERY_THROW ); - if ( xSI->supportsService("com.sun.star.sheet.Shape") ) + if ( xSI->supportsService(u"com.sun.star.sheet.Shape"_ustr) ) return true; } catch( const Exception& ) diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 605837c5d1b3..440b47b93310 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -138,25 +138,25 @@ namespace pcr const OUString& _sExplanation, OUString _sDetailLabel, OUString _sMasterLabel) - : GenericDialogController(_pParent, "modules/spropctrlr/ui/formlinksdialog.ui", "FormLinks") + : GenericDialogController(_pParent, u"modules/spropctrlr/ui/formlinksdialog.ui"_ustr, u"FormLinks"_ustr) , m_xContext ( _rxContext ) , m_xDetailForm( _rxDetailForm ) , m_xMasterForm( _rxMasterForm ) , m_sDetailLabel(std::move(_sDetailLabel)) , m_sMasterLabel(std::move(_sMasterLabel)) - , m_xExplanation(m_xBuilder->weld_label("explanationLabel")) - , m_xDetailLabel(m_xBuilder->weld_label("detailLabel")) - , m_xMasterLabel(m_xBuilder->weld_label("masterLabel")) - , m_xRow1(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox1"), - m_xBuilder->weld_combo_box("masterCombobox1"))) - , m_xRow2(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox2"), - m_xBuilder->weld_combo_box("masterCombobox2"))) - , m_xRow3(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox3"), - m_xBuilder->weld_combo_box("masterCombobox3"))) - , m_xRow4(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox4"), - m_xBuilder->weld_combo_box("masterCombobox4"))) - , m_xOK(m_xBuilder->weld_button("ok")) - , m_xSuggest(m_xBuilder->weld_button("suggestButton")) + , m_xExplanation(m_xBuilder->weld_label(u"explanationLabel"_ustr)) + , m_xDetailLabel(m_xBuilder->weld_label(u"detailLabel"_ustr)) + , m_xMasterLabel(m_xBuilder->weld_label(u"masterLabel"_ustr)) + , m_xRow1(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box(u"detailCombobox1"_ustr), + m_xBuilder->weld_combo_box(u"masterCombobox1"_ustr))) + , m_xRow2(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box(u"detailCombobox2"_ustr), + m_xBuilder->weld_combo_box(u"masterCombobox2"_ustr))) + , m_xRow3(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box(u"detailCombobox3"_ustr), + m_xBuilder->weld_combo_box(u"masterCombobox3"_ustr))) + , m_xRow4(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box(u"detailCombobox4"_ustr), + m_xBuilder->weld_combo_box(u"masterCombobox4"_ustr))) + , m_xOK(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xSuggest(m_xBuilder->weld_button(u"suggestButton"_ustr)) { m_xRow1->Show(); m_xRow2->Show(); @@ -494,7 +494,7 @@ namespace pcr { xKeys->getByIndex( key ) >>= xKey; sal_Int32 nKeyType = 0; - xKey->getPropertyValue("Type") >>= nKeyType; + xKey->getPropertyValue(u"Type"_ustr) >>= nKeyType; if ( nKeyType != KeyType::FOREIGN ) continue; @@ -518,7 +518,7 @@ namespace pcr if ( xKeyColumn.is() ) { xKeyColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName; - xKeyColumn->getPropertyValue("RelatedColumn") >>= sRelatedColumnName; + xKeyColumn->getPropertyValue(u"RelatedColumn"_ustr) >>= sRelatedColumnName; _rLeftFields[ column ] = sColumnName; _rRightFields[ column ] = sRelatedColumnName; diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index c6e1e0d6020e..8a3674e1690a 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -413,7 +413,7 @@ namespace pcr if (_nId == PROPERTY_ID_SUBMIT_METHOD) { - return { "Get", "Post" }; + return { u"Get"_ustr, u"Post"_ustr }; } const TranslateId* pStringItemsResId = nullptr; std::size_t nElements = 0; @@ -569,7 +569,7 @@ namespace pcr // Initialization if(!s_pPropertyInfos) getPropertyInfo(); - OPropertyInfoImpl aSearch(_rName, 0, OUString(), 0, "", 0); + OPropertyInfoImpl aSearch(_rName, 0, OUString(), 0, u""_ustr, 0); const OPropertyInfoImpl* pInfo = std::lower_bound( s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() ); diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index 322bc3405143..fc91e007ae36 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -93,7 +93,7 @@ namespace pcr if ( _rxContext.is() ) { Reference< XHierarchicalNameAccess > xTypeDescProv( - _rxContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"), + _rxContext->getValueByName(u"/singletons/com.sun.star.reflection.theTypeDescriptionManager"_ustr), UNO_QUERY_THROW ); m_xTypeDescription.set( xTypeDescProv->getByHierarchicalName( m_aEnumType.getTypeName() ), UNO_QUERY_THROW ); @@ -250,7 +250,7 @@ namespace pcr Reference< XDesktop2 > xDispProv = Desktop::create( m_xContext ); Reference< XDispatch > xDispatch( xDispProv->queryDispatch( aURL, OUString(), 0 ), UNO_SET_THROW ); - Sequence aDispatchArgs{ comphelper::makePropertyValue("URL", _rURL) }; + Sequence aDispatchArgs{ comphelper::makePropertyValue(u"URL"_ustr, _rURL) }; xDispatch->dispatch( aURL, aDispatchArgs ); } @@ -271,7 +271,7 @@ namespace pcr OUString SAL_CALL GenericPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.GenericPropertyHandler"; + return u"com.sun.star.comp.extensions.GenericPropertyHandler"_ustr; } sal_Bool SAL_CALL GenericPropertyHandler::supportsService( const OUString& ServiceName ) @@ -281,7 +281,7 @@ namespace pcr Sequence< OUString > SAL_CALL GenericPropertyHandler::getSupportedServiceNames( ) { - return { "com.sun.star.inspection.GenericPropertyHandler" }; + return { u"com.sun.star.inspection.GenericPropertyHandler"_ustr }; } void SAL_CALL GenericPropertyHandler::inspect( const Reference< XInterface >& _rxIntrospectee ) @@ -306,7 +306,7 @@ namespace pcr Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( Any( _rxIntrospectee ) ) ); if ( !xIntrospectionAccess.is() ) - throw RuntimeException("The introspection service could not handle the given component.", *this ); + throw RuntimeException(u"The introspection service could not handle the given component."_ustr, *this ); m_xComponent.set( xIntrospectionAccess->queryAdapter( cppu::UnoType<XPropertySet>::get() ), UNO_QUERY_THROW ); // now that we survived so far, remember m_xComponentIntrospectionAccess diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index 77743c622ad7..d810ab4aa711 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -268,7 +268,7 @@ namespace pcr Reference< XInterface > PropertyHandlerHelper::getContextDocument_throw( const Reference<XComponentContext> & rContext ) { Reference< XInterface > xI; - Any aReturn = rContext->getValueByName( "ContextDocument" ); + Any aReturn = rContext->getValueByName( u"ContextDocument"_ustr ); aReturn >>= xI; return xI; } @@ -278,7 +278,7 @@ namespace pcr weld::Window* pInspectorWindow = nullptr; try { - Reference< XWindow > xInspectorWindow(rContext->getValueByName( "DialogParentWindow" ), UNO_QUERY_THROW); + Reference< XWindow > xInspectorWindow(rContext->getValueByName( u"DialogParentWindow"_ustr ), UNO_QUERY_THROW); pInspectorWindow = Application::GetFrameWeld(xInspectorWindow); } catch( const Exception& ) @@ -290,7 +290,7 @@ namespace pcr std::unique_ptr<weld::Builder> PropertyHandlerHelper::makeBuilder(const OUString& rUIFile, const Reference<XComponentContext>& rContext) { - Reference<XWindow> xWindow(rContext->getValueByName("BuilderParent"), UNO_QUERY_THROW); + Reference<XWindow> xWindow(rContext->getValueByName(u"BuilderParent"_ustr), UNO_QUERY_THROW); weld::TransportAsXWindow& rTunnel = dynamic_cast<weld::TransportAsXWindow&>(*xWindow); return Application::CreateBuilder(rTunnel.getWidget(), rUIFile); } @@ -299,13 +299,13 @@ namespace pcr { Reference<css::container::XNameContainer> xName(rContext, UNO_QUERY_THROW); Reference<XWindow> xWindow(new weld::TransportAsXWindow(pParent)); - xName->insertByName("BuilderParent", Any(xWindow)); + xName->insertByName(u"BuilderParent"_ustr, Any(xWindow)); } void PropertyHandlerHelper::clearBuilderParent(const css::uno::Reference<css::uno::XComponentContext>& rContext) { Reference<css::container::XNameContainer> xName(rContext, UNO_QUERY_THROW); - xName->removeByName("BuilderParent"); + xName->removeByName(u"BuilderParent"_ustr); } } // namespace pcr diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index a57c4ffedbaf..c1f7e6dc5734 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -23,8 +23,8 @@ namespace pcr { //= InspectorHelpWindow InspectorHelpWindow::InspectorHelpWindow(weld::Builder& rBuilder) - : m_xHelpFrame(rBuilder.weld_widget("helpframe")) - , m_xHelpText(rBuilder.weld_text_view("helptext")) + : m_xHelpFrame(rBuilder.weld_widget(u"helpframe"_ustr)) + , m_xHelpText(rBuilder.weld_text_view(u"helptext"_ustr)) { } diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx index aaa994e94abd..92504c243061 100644 --- a/extensions/source/propctrlr/inspectormodelbase.cxx +++ b/extensions/source/propctrlr/inspectormodelbase.cxx @@ -96,25 +96,25 @@ namespace pcr ,m_bIsReadOnly( false ) { registerProperty( - "HasHelpSection", + u"HasHelpSection"_ustr, static_cast<sal_Int32>(ModelPropertyId::HAS_HELP_SECTION), PropertyAttribute::READONLY, &m_bHasHelpSection, cppu::UnoType<decltype(m_bHasHelpSection)>::get() ); registerProperty( - "MinHelpTextLines", + u"MinHelpTextLines"_ustr, static_cast<sal_Int32>(ModelPropertyId::MIN_HELP_TEXT_LINES), PropertyAttribute::READONLY, &m_nMinHelpTextLines, cppu::UnoType<decltype(m_nMinHelpTextLines)>::get() ); registerProperty( - "MaxHelpTextLines", + u"MaxHelpTextLines"_ustr, static_cast<sal_Int32>(ModelPropertyId::MAX_HELP_TEXT_LINES), PropertyAttribute::READONLY, &m_nMaxHelpTextLines, cppu::UnoType<decltype(m_nMaxHelpTextLines)>::get() ); registerProperty( - "IsReadOnly", + u"IsReadOnly"_ustr, static_cast<sal_Int32>(ModelPropertyId::IS_READ_ONLY), PropertyAttribute::BOUND, &m_bIsReadOnly, cppu::UnoType<decltype(m_bIsReadOnly)>::get() diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx index 521afdf449fa..3de89eac76c4 100644 --- a/extensions/source/propctrlr/listselectiondlg.cxx +++ b/extensions/source/propctrlr/listselectiondlg.cxx @@ -31,11 +31,11 @@ namespace pcr ListSelectionDialog::ListSelectionDialog(weld::Window* pParent, const Reference< XPropertySet >& _rxListBox, OUString _sPropertyName, const OUString& _rPropertyUIName) - : GenericDialogController(pParent, "modules/spropctrlr/ui/listselectdialog.ui", "ListSelectDialog") + : GenericDialogController(pParent, u"modules/spropctrlr/ui/listselectdialog.ui"_ustr, u"ListSelectDialog"_ustr) , m_xListBox ( _rxListBox ) , m_sPropertyName(std::move( _sPropertyName )) - , m_xFrame(m_xBuilder->weld_frame("frame")) - , m_xEntries(m_xBuilder->weld_tree_view("treeview")) + , m_xFrame(m_xBuilder->weld_frame(u"frame"_ustr)) + , m_xEntries(m_xBuilder->weld_tree_view(u"treeview"_ustr)) { OSL_PRECOND( m_xListBox.is(), "ListSelectionDialog::ListSelectionDialog: invalid list box!" ); diff --git a/extensions/source/propctrlr/newdatatype.cxx b/extensions/source/propctrlr/newdatatype.cxx index b2399d680668..648f05199b4d 100644 --- a/extensions/source/propctrlr/newdatatype.cxx +++ b/extensions/source/propctrlr/newdatatype.cxx @@ -27,10 +27,10 @@ namespace pcr NewDataTypeDialog::NewDataTypeDialog(weld::Window* pParent, std::u16string_view _rNameBase, const std::vector< OUString >& _rProhibitedNames) - : GenericDialogController(pParent, "modules/spropctrlr/ui/datatypedialog.ui", "DataTypeDialog") + : GenericDialogController(pParent, u"modules/spropctrlr/ui/datatypedialog.ui"_ustr, u"DataTypeDialog"_ustr) , m_aProhibitedNames( _rProhibitedNames.begin(), _rProhibitedNames.end() ) - , m_xName(m_xBuilder->weld_entry("entry")) - , m_xOK(m_xBuilder->weld_button("ok")) + , m_xName(m_xBuilder->weld_entry(u"entry"_ustr)) + , m_xOK(m_xBuilder->weld_button(u"ok"_ustr)) { m_xName->connect_changed(LINK(this, NewDataTypeDialog, OnNameModified)); diff --git a/extensions/source/propctrlr/objectinspectormodel.cxx b/extensions/source/propctrlr/objectinspectormodel.cxx index a05d9347f979..d62b5ba3321b 100644 --- a/extensions/source/propctrlr/objectinspectormodel.cxx +++ b/extensions/source/propctrlr/objectinspectormodel.cxx @@ -139,19 +139,19 @@ namespace pcr OUString SAL_CALL ObjectInspectorModel::getImplementationName( ) { - return "org.openoffice.comp.extensions.ObjectInspectorModel"; + return u"org.openoffice.comp.extensions.ObjectInspectorModel"_ustr; } Sequence< OUString > SAL_CALL ObjectInspectorModel::getSupportedServiceNames( ) { - return { "com.sun.star.inspection.ObjectInspectorModel" }; + return { u"com.sun.star.inspection.ObjectInspectorModel"_ustr }; } void ObjectInspectorModel::createDefault() { - m_aFactories = { Any(OUString( "com.sun.star.inspection.GenericPropertyHandler" )) }; + m_aFactories = { Any(u"com.sun.star.inspection.GenericPropertyHandler"_ustr) }; } diff --git a/extensions/source/propctrlr/pcrunodialogs.cxx b/extensions/source/propctrlr/pcrunodialogs.cxx index f36aedf39d76..ef5ff1903f1e 100644 --- a/extensions/source/propctrlr/pcrunodialogs.cxx +++ b/extensions/source/propctrlr/pcrunodialogs.cxx @@ -70,13 +70,13 @@ namespace pcr OUString SAL_CALL OTabOrderDialog::getImplementationName() { - return "org.openoffice.comp.form.ui.OTabOrderDialog"; + return u"org.openoffice.comp.form.ui.OTabOrderDialog"_ustr; } css::uno::Sequence<OUString> SAL_CALL OTabOrderDialog::getSupportedServiceNames() { - return { "com.sun.star.form.ui.TabOrderDialog", "com.sun.star.form.TabOrderDialog" }; + return { u"com.sun.star.form.ui.TabOrderDialog"_ustr, u"com.sun.star.form.TabOrderDialog"_ustr }; } @@ -112,15 +112,15 @@ namespace pcr { Sequence< Any > aNewArguments{ Any(NamedValue( - "TabbingModel", + u"TabbingModel"_ustr, Any( xTabbingModel ) )), Any(NamedValue( - "ControlContext", + u"ControlContext"_ustr, Any( xControlContext ) )), Any(NamedValue( - "ParentWindow", + u"ParentWindow"_ustr, Any( xParentWindow ) )) }; diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index f6a37893a11b..c8704c702e24 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -183,7 +183,7 @@ namespace pcr = _bDoListen ? &XPropertySet::addPropertyChangeListener : &XPropertySet::removePropertyChangeListener; (xModelProperties.get()->*pListenerOperation)( - OUString( "IsReadOnly" ), + u"IsReadOnly"_ustr, const_cast< OPropertyBrowserController* >( this ) ); } @@ -316,7 +316,7 @@ namespace pcr ::osl::MutexGuard aGuard( m_aMutex ); if (_rxFrame.is() && haveView()) - throw RuntimeException("Unable to attach to a second frame.",*this); + throw RuntimeException(u"Unable to attach to a second frame."_ustr,*this); // revoke as focus listener from the old container window stopContainerWindowListening(); @@ -333,7 +333,7 @@ namespace pcr // announcement is responsible for calling setComponent, too. Reference<XWindow> xContainerWindow = m_xFrame->getContainerWindow(); - OUString sUIFile("modules/spropctrlr/ui/formproperties.ui"); + OUString sUIFile(u"modules/spropctrlr/ui/formproperties.ui"_ustr); std::unique_ptr<weld::Builder> xBuilder; if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xContainerWindow.get())) @@ -344,7 +344,7 @@ namespace pcr { VclPtr<vcl::Window> pParentWin = VCLUnoHelper::GetWindow(xContainerWindow); if (!pParentWin) - throw RuntimeException("The frame is invalid. Unable to extract the container window.",*this); + throw RuntimeException(u"The frame is invalid. Unable to extract the container window."_ustr,*this); xBuilder = Application::CreateInterimBuilder(pParentWin, sUIFile, true); } @@ -505,7 +505,7 @@ namespace pcr OUString SAL_CALL OPropertyBrowserController::getImplementationName( ) { - return "org.openoffice.comp.extensions.ObjectInspector"; + return u"org.openoffice.comp.extensions.ObjectInspector"_ustr; } sal_Bool SAL_CALL OPropertyBrowserController::supportsService( const OUString& ServiceName ) @@ -516,7 +516,7 @@ namespace pcr Sequence< OUString > SAL_CALL OPropertyBrowserController::getSupportedServiceNames( ) { - return { "com.sun.star.inspection.ObjectInspector" }; + return { u"com.sun.star.inspection.ObjectInspector"_ustr }; } @@ -691,8 +691,8 @@ namespace pcr case PropertyControlType::StringListField: { bool bMultiLineTextField = ControlType == PropertyControlType::MultiLineTextField; - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/multiline.ui", m_xContext)); - auto pContainer = xBuilder->weld_container("multiline"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/multiline.ui"_ustr, m_xContext)); + auto pContainer = xBuilder->weld_container(u"multiline"_ustr); rtl::Reference<OMultilineEditControl> pControl = new OMultilineEditControl(std::move(pContainer), std::move(xBuilder), bMultiLineTextField ? eMultiLineText : eStringList, bCreateReadOnly); pControl->SetModifyHandler(); @@ -702,8 +702,8 @@ namespace pcr case PropertyControlType::ListBox: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/listbox.ui", m_xContext)); - auto pComboBox = xBuilder->weld_combo_box("listbox"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/listbox.ui"_ustr, m_xContext)); + auto pComboBox = xBuilder->weld_combo_box(u"listbox"_ustr); rtl::Reference<OListboxControl> pControl = new OListboxControl(std::move(pComboBox), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -712,8 +712,8 @@ namespace pcr case PropertyControlType::ComboBox: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/combobox.ui", m_xContext)); - auto pComboBox = xBuilder->weld_combo_box("combobox"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/combobox.ui"_ustr, m_xContext)); + auto pComboBox = xBuilder->weld_combo_box(u"combobox"_ustr); rtl::Reference<OComboboxControl> pControl = new OComboboxControl(std::move(pComboBox), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -724,8 +724,8 @@ namespace pcr case PropertyControlType::CharacterField: { bool bCharacterField = ControlType == PropertyControlType::CharacterField; - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/textfield.ui", m_xContext)); - auto pEntry = xBuilder->weld_entry("textfield"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/textfield.ui"_ustr, m_xContext)); + auto pEntry = xBuilder->weld_entry(u"textfield"_ustr); rtl::Reference<OEditControl> pControl = new OEditControl(std::move(pEntry), std::move(xBuilder), bCharacterField, bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -734,8 +734,8 @@ namespace pcr case PropertyControlType::NumericField: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/numericfield.ui", m_xContext)); - auto pSpinButton = xBuilder->weld_metric_spin_button("numericfield", FieldUnit::NONE); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/numericfield.ui"_ustr, m_xContext)); + auto pSpinButton = xBuilder->weld_metric_spin_button(u"numericfield"_ustr, FieldUnit::NONE); rtl::Reference<ONumericControl> pControl = new ONumericControl(std::move(pSpinButton), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -744,8 +744,8 @@ namespace pcr case PropertyControlType::DateTimeField: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/datetimefield.ui", m_xContext)); - auto pContainer = xBuilder->weld_container("datetimefield"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/datetimefield.ui"_ustr, m_xContext)); + auto pContainer = xBuilder->weld_container(u"datetimefield"_ustr); rtl::Reference<ODateTimeControl> pControl = new ODateTimeControl(std::move(pContainer), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -754,8 +754,8 @@ namespace pcr case PropertyControlType::DateField: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/datefield.ui", m_xContext)); - auto pContainer = xBuilder->weld_container("datefield"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/datefield.ui"_ustr, m_xContext)); + auto pContainer = xBuilder->weld_container(u"datefield"_ustr); rtl::Reference<ODateControl> pControl = new ODateControl(std::move(pContainer), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -764,8 +764,8 @@ namespace pcr case PropertyControlType::TimeField: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/timefield.ui", m_xContext)); - auto pTimeSpinButton = xBuilder->weld_formatted_spin_button("timefield"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/timefield.ui"_ustr, m_xContext)); + auto pTimeSpinButton = xBuilder->weld_formatted_spin_button(u"timefield"_ustr); rtl::Reference<OTimeControl> pControl = new OTimeControl(std::move(pTimeSpinButton), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -775,8 +775,8 @@ namespace pcr case PropertyControlType::ColorListBox: { auto lambda = [this]{ return PropertyHandlerHelper::getDialogParentFrame(m_xContext); }; - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/colorlistbox.ui", m_xContext)); - auto pMenuButton = xBuilder->weld_menu_button("colorlistbox"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/colorlistbox.ui"_ustr, m_xContext)); + auto pMenuButton = xBuilder->weld_menu_button(u"colorlistbox"_ustr); rtl::Reference<OColorControl> pControl = new OColorControl(std::make_unique<ColorListBox>(std::move(pMenuButton), lambda), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; @@ -785,8 +785,8 @@ namespace pcr case PropertyControlType::HyperlinkField: { - std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder("modules/spropctrlr/ui/hyperlinkfield.ui", m_xContext)); - auto pContainer = xBuilder->weld_container("hyperlinkfield"); + std::unique_ptr<weld::Builder> xBuilder(PropertyHandlerHelper::makeBuilder(u"modules/spropctrlr/ui/hyperlinkfield.ui"_ustr, m_xContext)); + auto pContainer = xBuilder->weld_container(u"hyperlinkfield"_ustr); rtl::Reference<OHyperlinkControl> pControl = new OHyperlinkControl(std::move(pContainer), std::move(xBuilder), bCreateReadOnly); pControl->SetModifyHandler(); xControl = pControl; diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 1e026c5b5bb4..f6f1c1fe5f29 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -33,9 +33,9 @@ namespace pcr using ::com::sun::star::uno::Reference; OPropertyEditor::OPropertyEditor(const css::uno::Reference<css::uno::XComponentContext>& rContext, weld::Builder& rBuilder) - : m_xContainer(rBuilder.weld_container("box")) - , m_xTabControl(rBuilder.weld_notebook("tabcontrol")) - , m_xControlHoldingParent(rBuilder.weld_container("controlparent")) // controls initially have this parent before they are moved + : m_xContainer(rBuilder.weld_container(u"box"_ustr)) + , m_xTabControl(rBuilder.weld_notebook(u"tabcontrol"_ustr)) + , m_xControlHoldingParent(rBuilder.weld_container(u"controlparent"_ustr)) // controls initially have this parent before they are moved , m_xContext(rContext) , m_pListener(nullptr) , m_pObserver(nullptr) diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx index 3491a89be338..1d80142bc456 100644 --- a/extensions/source/propctrlr/propertyhandler.hxx +++ b/extensions/source/propctrlr/propertyhandler.hxx @@ -275,7 +275,7 @@ namespace pcr impl_getContextDocument_nothrow() const { return css::uno::Reference< css::frame::XModel >( - m_xContext->getValueByName( "ContextDocument" ), css::uno::UNO_QUERY ); + m_xContext->getValueByName( u"ContextDocument"_ustr ), css::uno::UNO_QUERY ); } /** marks the context document as modified diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 706e6eb3c807..f0ba29207794 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -51,14 +51,14 @@ namespace pcr // OSelectLabelDialog OSelectLabelDialog::OSelectLabelDialog(weld::Window* pParent, Reference< XPropertySet > const & _xControlModel) - : GenericDialogController(pParent, "modules/spropctrlr/ui/labelselectiondialog.ui", "LabelSelectionDialog") + : GenericDialogController(pParent, u"modules/spropctrlr/ui/labelselectiondialog.ui"_ustr, u"LabelSelectionDialog"_ustr) , m_xControlModel(_xControlModel) , m_bLastSelected(false) , m_bHaveAssignableControl(false) - , m_xMainDesc(m_xBuilder->weld_label("label")) - , m_xControlTree(m_xBuilder->weld_tree_view("control")) + , m_xMainDesc(m_xBuilder->weld_label(u"label"_ustr)) + , m_xControlTree(m_xBuilder->weld_tree_view(u"control"_ustr)) , m_xScratchIter(m_xControlTree->make_iterator()) - , m_xNoAssignment(m_xBuilder->weld_check_button("noassignment")) + , m_xNoAssignment(m_xBuilder->weld_check_button(u"noassignment"_ustr)) { m_xControlTree->connect_changed(LINK(this, OSelectLabelDialog, OnEntrySelected)); m_xControlTree->set_size_request(-1, m_xControlTree->get_height_rows(8)); diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index d98b2a569234..c4e0d2f365b8 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -231,12 +231,12 @@ namespace pcr comphelper::makePropertyValue(PROPERTY_COMMAND, m_xObjectAdapter->getSQLCommand()), comphelper::makePropertyValue(PROPERTY_COMMANDTYPE, CommandType::COMMAND), comphelper::makePropertyValue(PROPERTY_ESCAPE_PROCESSING, bEscapeProcessing), - comphelper::makePropertyValue("GraphicalDesign", bEscapeProcessing) + comphelper::makePropertyValue(u"GraphicalDesign"_ustr, bEscapeProcessing) }; Reference< XComponent > xQueryDesign = xLoader->loadComponentFromURL( - ".component:DB/QueryDesign", - "_self", + u".component:DB/QueryDesign"_ustr, + u"_self"_ustr, FrameSearchFlag::TASKS | FrameSearchFlag::CREATE, aArgs ); @@ -282,7 +282,7 @@ namespace pcr Reference< XDesktop2 > xDesktop = Desktop::create(m_xContext); Reference< XFrames > xDesktopFramesCollection( xDesktop->getFrames(), css::uno::UNO_SET_THROW ); - xFrame = xDesktop->findFrame( "_blank", FrameSearchFlag::CREATE ); + xFrame = xDesktop->findFrame( u"_blank"_ustr, FrameSearchFlag::CREATE ); OSL_ENSURE( xFrame.is(), "SQLCommandDesigner::impl_createEmptyParentlessTask_nothrow: could not create an empty frame!" ); xDesktopFramesCollection->remove( xFrame ); } @@ -309,11 +309,11 @@ namespace pcr // instead of calling XCloseable::close directly. The latter method would also close // the frame, but not care for things like shutting down the office when the last // frame is gone ... - const UnoURL aCloseURL( ".uno:CloseDoc", + const UnoURL aCloseURL( u".uno:CloseDoc"_ustr, Reference< XMultiServiceFactory >( m_xORB, UNO_QUERY ) ); Reference< XDispatchProvider > xProvider( m_xDesigner->getFrame(), UNO_QUERY_THROW ); - Reference< XDispatch > xDispatch( xProvider->queryDispatch( aCloseURL, "_top", FrameSearchFlag::SELF ) ); + Reference< XDispatch > xDispatch( xProvider->queryDispatch( aCloseURL, u"_top"_ustr, FrameSearchFlag::SELF ) ); OSL_ENSURE( xDispatch.is(), "SQLCommandDesigner::impl_closeDesigner_nothrow: no dispatcher for the CloseDoc command!" ); if ( xDispatch.is() ) { diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index ad978253b076..f5bb95f7380a 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -66,7 +66,7 @@ namespace pcr util::Time aUNOTime; if ( !( _rValue >>= aUNOTime ) ) { - getTypedControlWindow()->set_text(""); + getTypedControlWindow()->set_text(u""_ustr); m_xFormatter->SetTime(tools::Time(tools::Time::EMPTY)); } else @@ -93,8 +93,8 @@ namespace pcr //= ODateControl ODateControl::ODateControl(std::unique_ptr<weld::Container> xWidget, std::unique_ptr<weld::Builder> xBuilder, bool bReadOnly) : ODateControl_Base(PropertyControlType::DateField, std::move(xBuilder), std::move(xWidget), bReadOnly) - , m_xEntry(m_xBuilder->weld_entry("entry")) - , m_xCalendarBox(std::make_unique<SvtCalendarBox>(m_xBuilder->weld_menu_button("button"), false)) + , m_xEntry(m_xBuilder->weld_entry(u"entry"_ustr)) + , m_xCalendarBox(std::make_unique<SvtCalendarBox>(m_xBuilder->weld_menu_button(u"button"_ustr), false)) { m_xEntryFormatter.reset(new weld::DateFormatter(*m_xEntry)); @@ -249,8 +249,8 @@ namespace pcr ODateTimeControl::ODateTimeControl(std::unique_ptr<weld::Container> xWidget, std::unique_ptr<weld::Builder> xBuilder, bool bReadOnly) : ODateTimeControl_Base(PropertyControlType::DateTimeField, std::move(xBuilder), std::move(xWidget), bReadOnly) - , m_xDate(std::make_unique<SvtCalendarBox>(m_xBuilder->weld_menu_button("datefield"))) - , m_xTime(m_xBuilder->weld_formatted_spin_button("timefield")) + , m_xDate(std::make_unique<SvtCalendarBox>(m_xBuilder->weld_menu_button(u"datefield"_ustr))) + , m_xTime(m_xBuilder->weld_formatted_spin_button(u"timefield"_ustr)) , m_xFormatter(new weld::TimeFormatter(*m_xTime)) { m_xFormatter->SetExtFormat(ExtTimeFieldFormat::LongDuration); @@ -261,7 +261,7 @@ namespace pcr if ( !_rValue.hasValue() ) { m_xDate->set_date(::Date(::Date::SYSTEM)); - m_xTime->set_text(""); + m_xTime->set_text(u""_ustr); m_xFormatter->SetTime(tools::Time(tools::Time::EMPTY)); } else @@ -300,8 +300,8 @@ namespace pcr //= OHyperlinkControl OHyperlinkControl::OHyperlinkControl(std::unique_ptr<weld::Container> xWidget, std::unique_ptr<weld::Builder> xBuilder, bool bReadOnly) : OHyperlinkControl_Base(PropertyControlType::HyperlinkField, std::move(xBuilder), std::move(xWidget), bReadOnly) - , m_xEntry(m_xBuilder->weld_entry("entry")) - , m_xButton(m_xBuilder->weld_button("button")) + , m_xEntry(m_xBuilder->weld_entry(u"entry"_ustr)) + , m_xButton(m_xBuilder->weld_button(u"button"_ustr)) , m_aActionListeners(m_aMutex) { auto pWidget = getTypedControlWindow(); @@ -352,7 +352,7 @@ namespace pcr IMPL_LINK_NOARG( OHyperlinkControl, OnHyperlinkClicked, weld::Button&, void ) { - ActionEvent aEvent( *this, "clicked" ); + ActionEvent aEvent( *this, u"clicked"_ustr ); m_aActionListeners.forEach< XActionListener >( [&aEvent] (uno::Reference<awt::XActionListener> const& xListener) { return xListener->actionPerformed(aEvent); }); @@ -468,7 +468,7 @@ namespace pcr { if ( !_rValue.hasValue() ) { - getTypedControlWindow()->set_text( "" ); + getTypedControlWindow()->set_text( u""_ustr ); } else { @@ -770,11 +770,11 @@ namespace pcr : OMultilineEditControl_Base(eMode == eMultiLineText ? PropertyControlType::MultiLineTextField : PropertyControlType::StringListField, std::move(xBuilder), std::move(xWidget), bReadOnly) , m_nOperationMode(eMode) - , m_xEntry(m_xBuilder->weld_entry("entry")) - , m_xButton(m_xBuilder->weld_menu_button("button")) - , m_xPopover(m_xBuilder->weld_widget("popover")) - , m_xTextView(m_xBuilder->weld_text_view("textview")) - , m_xOk(m_xBuilder->weld_button("ok")) + , m_xEntry(m_xBuilder->weld_entry(u"entry"_ustr)) + , m_xButton(m_xBuilder->weld_menu_button(u"button"_ustr)) + , m_xPopover(m_xBuilder->weld_widget(u"popover"_ustr)) + , m_xTextView(m_xBuilder->weld_text_view(u"textview"_ustr)) + , m_xOk(m_xBuilder->weld_button(u"ok"_ustr)) { m_xButton->set_popover(m_xPopover.get()); m_xTextView->set_size_request(m_xTextView->get_approximate_digit_width() * 30, m_xTextView->get_height_rows(8)); diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index 6f40c09c9d84..9a4d21eb95dc 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -136,7 +136,7 @@ StringRepresentation::StringRepresentation(uno::Reference< uno::XComponentContex // com.sun.star.uno.XServiceInfo: OUString SAL_CALL StringRepresentation::getImplementationName() { - return "StringRepresentation"; + return u"StringRepresentation"_ustr; } sal_Bool SAL_CALL StringRepresentation::supportsService(OUString const & serviceName) @@ -146,7 +146,7 @@ sal_Bool SAL_CALL StringRepresentation::supportsService(OUString const & service uno::Sequence< OUString > SAL_CALL StringRepresentation::getSupportedServiceNames() { - return { "com.sun.star.inspection.StringRepresentation" }; + return { u"com.sun.star.inspection.StringRepresentation"_ustr }; } // inspection::XStringRepresentation: @@ -250,7 +250,7 @@ void SAL_CALL StringRepresentation::initialize(const uno::Sequence< uno::Any > & return; uno::Reference< container::XHierarchicalNameAccess > xTypeDescProv( - m_xContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"), + m_xContext->getValueByName(u"/singletons/com.sun.star.reflection.theTypeDescriptionManager"_ustr), uno::UNO_QUERY_THROW ); m_xTypeDescription.set( xTypeDescProv->getByHierarchicalName( sConstantName ), uno::UNO_QUERY_THROW ); diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 05e25e4d71a8..3abbbd3f6375 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -95,13 +95,13 @@ namespace pcr OUString SubmissionPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.SubmissionPropertyHandler"; + return u"com.sun.star.comp.extensions.SubmissionPropertyHandler"_ustr; } Sequence< OUString > SubmissionPropertyHandler::getSupportedServiceNames( ) { - return { "com.sun.star.form.inspection.SubmissionPropertyHandler" }; + return { u"com.sun.star.form.inspection.SubmissionPropertyHandler"_ustr }; } diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index af7b9ced7480..358b2818fc12 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -107,15 +107,15 @@ namespace pcr //= TabOrderDialog TabOrderDialog::TabOrderDialog(weld::Window* _pParent, const Reference< XTabControllerModel >& _rxTabModel, const Reference< XControlContainer >& _rxControlCont, const Reference< XComponentContext >& _rxORB) - : GenericDialogController( _pParent, "modules/spropctrlr/ui/taborder.ui", "TabOrderDialog") + : GenericDialogController( _pParent, u"modules/spropctrlr/ui/taborder.ui"_ustr, u"TabOrderDialog"_ustr) , m_xModel( _rxTabModel ) , m_xControlContainer( _rxControlCont ) , m_xORB( _rxORB ) - , m_xLB_Controls(m_xBuilder->weld_tree_view("CTRLtree")) - , m_xPB_OK(m_xBuilder->weld_button("ok")) - , m_xPB_MoveUp(m_xBuilder->weld_button("upB")) - , m_xPB_MoveDown(m_xBuilder->weld_button("downB")) - , m_xPB_AutoOrder(m_xBuilder->weld_button("autoB")) + , m_xLB_Controls(m_xBuilder->weld_tree_view(u"CTRLtree"_ustr)) + , m_xPB_OK(m_xBuilder->weld_button(u"ok"_ustr)) + , m_xPB_MoveUp(m_xBuilder->weld_button(u"upB"_ustr)) + , m_xPB_MoveDown(m_xBuilder->weld_button(u"downB"_ustr)) + , m_xPB_AutoOrder(m_xBuilder->weld_button(u"autoB"_ustr)) { m_xLB_Controls->set_size_request(m_xLB_Controls->get_approximate_digit_width() * 60, m_xLB_Controls->get_height_rows(10)); diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 8cccb48e84b5..1b9a4c4095ad 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -46,8 +46,8 @@ namespace pcr sal_uInt16 nKey = rKeyEvent.GetKeyCode().GetCode(); if ((KEY_DELETE == nKey) || (KEY_BACKSPACE == nKey)) { - m_xSpinButton->set_text(""); - m_xEntry->set_text(""); + m_xSpinButton->set_text(u""_ustr); + m_xEntry->set_text(u""_ustr); setModified(); } @@ -69,7 +69,7 @@ namespace pcr { rFieldFormatter.TreatAsNumber(false); rFieldFormatter.SetFormatter(nullptr); - m_xSpinButton->set_text( "" ); + m_xSpinButton->set_text( u""_ustr ); } m_xEntry->set_text(m_xSpinButton->get_text()); @@ -77,8 +77,8 @@ namespace pcr OFormatSampleControl::OFormatSampleControl(std::unique_ptr<weld::Container> xWidget, std::unique_ptr<weld::Builder> xBuilder, bool bReadOnly) : OFormatSampleControl_Base(PropertyControlType::Unknown, std::move(xBuilder), std::move(xWidget), bReadOnly) - , m_xSpinButton(m_xBuilder->weld_formatted_spin_button("sample")) - , m_xEntry(m_xBuilder->weld_entry("entry")) + , m_xSpinButton(m_xBuilder->weld_formatted_spin_button(u"sample"_ustr)) + , m_xEntry(m_xBuilder->weld_entry(u"entry"_ustr)) { Formatter& rFieldFormatter = m_xSpinButton->GetFormatter(); rFieldFormatter.TreatAsNumber(true); @@ -107,7 +107,7 @@ namespace pcr rFieldFormatter.SetValue( pEntry ? getPreviewValue( *pEntry ) : 1234.56789 ); } else - m_xSpinButton->set_text( "" ); + m_xSpinButton->set_text( u""_ustr ); m_xEntry->set_text(m_xSpinButton->get_text()); } @@ -183,7 +183,7 @@ namespace pcr if ( _rValue >>= nValue ) getTypedControlWindow()->GetFormatter().SetValue(nValue); else - getTypedControlWindow()->set_text(""); + getTypedControlWindow()->set_text(u""_ustr); } Any SAL_CALL OFormattedNumericControl::getValue() @@ -226,7 +226,7 @@ namespace pcr { rFieldFormatter.TreatAsNumber(false); rFieldFormatter.SetFormatter(nullptr); - getTypedControlWindow()->set_text(""); + getTypedControlWindow()->set_text(u""_ustr); } } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 29bc09a65a7f..5e65bc727b64 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -77,13 +77,13 @@ namespace pcr OUString XSDValidationPropertyHandler::getImplementationName( ) { - return "com.sun.star.comp.extensions.XSDValidationPropertyHandler"; + return u"com.sun.star.comp.extensions.XSDValidationPropertyHandler"_ustr; } Sequence< OUString > XSDValidationPropertyHandler::getSupportedServiceNames( ) { - return{ "com.sun.star.form.inspection.XSDValidationPropertyHandler" }; + return{ u"com.sun.star.form.inspection.XSDValidationPropertyHandler"_ustr }; } diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 7d87010ea152..5b5a12d6d389 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -205,11 +205,11 @@ void GridWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) } GridDialog::GridDialog(weld::Window* pParent, double* pXValues, double* pYValues, int nValues) - : GenericDialogController(pParent, "modules/scanner/ui/griddialog.ui", "GridDialog") - , m_xResetTypeBox(m_xBuilder->weld_combo_box("resetTypeCombobox")) - , m_xResetButton(m_xBuilder->weld_button("resetButton")) + : GenericDialogController(pParent, u"modules/scanner/ui/griddialog.ui"_ustr, u"GridDialog"_ustr) + , m_xResetTypeBox(m_xBuilder->weld_combo_box(u"resetTypeCombobox"_ustr)) + , m_xResetButton(m_xBuilder->weld_button(u"resetButton"_ustr)) , m_xGridWindow(new GridWindow) - , m_xGridWindowWND(new weld::CustomWeld(*m_xBuilder, "gridwindow", *m_xGridWindow)) + , m_xGridWindowWND(new weld::CustomWeld(*m_xBuilder, u"gridwindow"_ustr, *m_xGridWindow)) { m_xGridWindow->Init(pXValues, pYValues, nValues, true/*bCutValues*/, BitmapEx(RID_SCANNER_HANDLE)); m_xResetTypeBox->set_active(0); diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 0e92a8796433..731355e59db4 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -170,7 +170,7 @@ Sane::~Sane() void Sane::Init() { #ifndef DISABLE_DYNLOADING - OUString sSaneLibName( "libsane" SAL_DLLEXTENSION ); + OUString sSaneLibName( u"libsane" SAL_DLLEXTENSION ""_ustr ); pSaneLib = osl_loadModule( sSaneLibName.pData, SAL_LOADMODULE_LAZY ); if( ! pSaneLib ) { @@ -180,7 +180,7 @@ void Sane::Init() // try reasonable places that might not be in the library search path if( ! pSaneLib ) { - OUString sSaneLibSystemPath( "/usr/local/lib/libsane" SAL_DLLEXTENSION ); + OUString sSaneLibSystemPath( u"/usr/local/lib/libsane" SAL_DLLEXTENSION ""_ustr ); osl_getFileURLFromSystemPath( sSaneLibSystemPath.pData, &sSaneLibName.pData ); pSaneLib = osl_loadModule( sSaneLibName.pData, SAL_LOADMODULE_LAZY ); } diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index b4f5e9a36cb7..b7c4ff4d051f 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -220,7 +220,7 @@ public: }; SaneDlg::SaneDlg(weld::Window* pParent, Sane& rSane, bool bScanEnabled) - : GenericDialogController(pParent, "modules/scanner/ui/sanedialog.ui", "SaneDialog") + : GenericDialogController(pParent, u"modules/scanner/ui/sanedialog.ui"_ustr, u"SaneDialog"_ustr) , mpParent(pParent) , mrSane(rSane) , mbScanEnabled(bScanEnabled) @@ -229,30 +229,30 @@ SaneDlg::SaneDlg(weld::Window* pParent, Sane& rSane, bool bScanEnabled) , mfMin(0.0) , mfMax(0.0) , doScan(false) - , mxCancelButton(m_xBuilder->weld_button("cancel")) - , mxDeviceInfoButton(m_xBuilder->weld_button("deviceInfoButton")) - , mxPreviewButton(m_xBuilder->weld_button("previewButton")) - , mxScanButton(m_xBuilder->weld_button("ok")) - , mxButtonOption(m_xBuilder->weld_button("optionsButton")) - , mxOptionTitle(m_xBuilder->weld_label("optionTitleLabel")) - , mxOptionDescTxt(m_xBuilder->weld_label("optionsDescLabel")) - , mxVectorTxt(m_xBuilder->weld_label("vectorLabel")) - , mxLeftField(m_xBuilder->weld_metric_spin_button("leftSpinbutton", FieldUnit::PIXEL)) - , mxTopField(m_xBuilder->weld_metric_spin_button("topSpinbutton", FieldUnit::PIXEL)) - , mxRightField(m_xBuilder->weld_metric_spin_button("rightSpinbutton", FieldUnit::PIXEL)) - , mxBottomField(m_xBuilder->weld_metric_spin_button("bottomSpinbutton", FieldUnit::PIXEL)) - , mxDeviceBox(m_xBuilder->weld_combo_box("deviceCombobox")) - , mxReslBox(m_xBuilder->weld_combo_box("reslCombobox")) - , mxAdvancedBox(m_xBuilder->weld_check_button("advancedCheckbutton")) - , mxVectorBox(m_xBuilder->weld_spin_button("vectorSpinbutton")) - , mxQuantumRangeBox(m_xBuilder->weld_combo_box("quantumRangeCombobox")) - , mxStringRangeBox(m_xBuilder->weld_combo_box("stringRangeCombobox")) - , mxBoolCheckBox(m_xBuilder->weld_check_button("boolCheckbutton")) - , mxStringEdit(m_xBuilder->weld_entry("stringEntry")) - , mxNumericEdit(m_xBuilder->weld_entry("numericEntry")) - , mxOptionBox(m_xBuilder->weld_tree_view("optionSvTreeListBox")) + , mxCancelButton(m_xBuilder->weld_button(u"cancel"_ustr)) + , mxDeviceInfoButton(m_xBuilder->weld_button(u"deviceInfoButton"_ustr)) + , mxPreviewButton(m_xBuilder->weld_button(u"previewButton"_ustr)) + , mxScanButton(m_xBuilder->weld_button(u"ok"_ustr)) + , mxButtonOption(m_xBuilder->weld_button(u"optionsButton"_ustr)) + , mxOptionTitle(m_xBuilder->weld_label(u"optionTitleLabel"_ustr)) + , mxOptionDescTxt(m_xBuilder->weld_label(u"optionsDescLabel"_ustr)) + , mxVectorTxt(m_xBuilder->weld_label(u"vectorLabel"_ustr)) + , mxLeftField(m_xBuilder->weld_metric_spin_button(u"leftSpinbutton"_ustr, FieldUnit::PIXEL)) + , mxTopField(m_xBuilder->weld_metric_spin_button(u"topSpinbutton"_ustr, FieldUnit::PIXEL)) + , mxRightField(m_xBuilder->weld_metric_spin_button(u"rightSpinbutton"_ustr, FieldUnit::PIXEL)) + , mxBottomField(m_xBuilder->weld_metric_spin_button(u"bottomSpinbutton"_ustr, FieldUnit::PIXEL)) + , mxDeviceBox(m_xBuilder->weld_combo_box(u"deviceCombobox"_ustr)) + , mxReslBox(m_xBuilder->weld_combo_box(u"reslCombobox"_ustr)) + , mxAdvancedBox(m_xBuilder->weld_check_button(u"advancedCheckbutton"_ustr)) + , mxVectorBox(m_xBuilder->weld_spin_button(u"vectorSpinbutton"_ustr)) + , mxQuantumRangeBox(m_xBuilder->weld_combo_box(u"quantumRangeCombobox"_ustr)) + , mxStringRangeBox(m_xBuilder->weld_combo_box(u"stringRangeCombobox"_ustr)) + , mxBoolCheckBox(m_xBuilder->weld_check_button(u"boolCheckbutton"_ustr)) + , mxStringEdit(m_xBuilder->weld_entry(u"stringEntry"_ustr)) + , mxNumericEdit(m_xBuilder->weld_entry(u"numericEntry"_ustr)) + , mxOptionBox(m_xBuilder->weld_tree_view(u"optionSvTreeListBox"_ustr)) , mxPreview(new ScanPreview) - , mxPreviewWnd(new weld::CustomWeld(*m_xBuilder, "preview", *mxPreview)) + , mxPreviewWnd(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *mxPreview)) { Size aSize(mxOptionBox->get_approximate_digit_width() * 32, mxOptionBox->get_height_rows(8)); mxOptionTitle->set_size_request(aSize.Width(), aSize.Height() / 2); diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx index b661a4f7e254..c0a0260f1c99 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -50,7 +50,7 @@ Sequence< sal_Int8 > SAL_CALL ScannerManager::getMaskDIB() OUString ScannerManager::getImplementationName() { - return "com.sun.star.scanner.ScannerManager"; + return u"com.sun.star.scanner.ScannerManager"_ustr; } @@ -62,7 +62,7 @@ sal_Bool ScannerManager::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> ScannerManager::getSupportedServiceNames() { - return { "com.sun.star.scanner.ScannerManager" }; + return { u"com.sun.star.scanner.ScannerManager"_ustr }; } @@ -74,8 +74,8 @@ sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) void SAL_CALL ScannerManager::initialize(const css::uno::Sequence<css::uno::Any>& rArguments) { ::comphelper::NamedValueCollection aProperties(rArguments); - if (aProperties.has("ParentWindow")) - aProperties.get("ParentWindow") >>= mxDialogParent; + if (aProperties.has(u"ParentWindow"_ustr)) + aProperties.get(u"ParentWindow"_ustr) >>= mxDialogParent; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index 0db920c4c951..92b53915ae42 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -225,7 +225,7 @@ Sequence< ScannerContext > ScannerManager::getAvailableScanners() if( Sane::IsSane() ) { - Sequence< ScannerContext > aRet{ { /* ScannerName */ "SANE", /* InternalData */ 0 } }; + Sequence< ScannerContext > aRet{ { /* ScannerName */ u"SANE"_ustr, /* InternalData */ 0 } }; return aRet; } @@ -246,7 +246,7 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex if( scanner_context.InternalData < 0 || o3tl::make_unsigned(scanner_context.InternalData) >= rSanes.size() ) throw ScannerException( - "Scanner does not exist", + u"Scanner does not exist"_ustr, Reference< XScannerManager >( this ), ScanError_InvalidContext ); @@ -254,7 +254,7 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex std::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; if( pHolder->m_bBusy ) throw ScannerException( - "Scanner is busy", + u"Scanner is busy"_ustr, Reference< XScannerManager >( this ), ScanError_ScanInProgress ); @@ -282,14 +282,14 @@ void ScannerManager::startScan( const ScannerContext& scanner_context, if( scanner_context.InternalData < 0 || o3tl::make_unsigned(scanner_context.InternalData) >= rSanes.size() ) throw ScannerException( - "Scanner does not exist", + u"Scanner does not exist"_ustr, Reference< XScannerManager >( this ), ScanError_InvalidContext ); std::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; if( pHolder->m_bBusy ) throw ScannerException( - "Scanner is busy", + u"Scanner is busy"_ustr, Reference< XScannerManager >( this ), ScanError_ScanInProgress ); @@ -307,7 +307,7 @@ ScanError ScannerManager::getError( const ScannerContext& scanner_context ) if( scanner_context.InternalData < 0 || o3tl::make_unsigned(scanner_context.InternalData) >= rSanes.size() ) throw ScannerException( - "Scanner does not exist", + u"Scanner does not exist"_ustr, Reference< XScannerManager >( this ), ScanError_InvalidContext ); @@ -325,7 +325,7 @@ Reference< css::awt::XBitmap > ScannerManager::getBitmap( const ScannerContext& if( scanner_context.InternalData < 0 || o3tl::make_unsigned(scanner_context.InternalData) >= rSanes.size() ) throw ScannerException( - "Scanner does not exist", + u"Scanner does not exist"_ustr, Reference< XScannerManager >( this ), ScanError_InvalidContext ); diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index f96d6ecd495e..7f876ec56d85 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -178,30 +178,30 @@ Download::getProxyForURL(std::u16string_view rURL, OString& rHost, sal_Int32& rP beans::PropertyValue aProperty; aProperty.Name = "nodepath"; - aProperty.Value <<= OUString("org.openoffice.Inet/Settings"); + aProperty.Value <<= u"org.openoffice.Inet/Settings"_ustr; uno::Sequence< uno::Any > aArgumentList{ uno::Any(aProperty) }; uno::Reference< container::XNameAccess > xNameAccess( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", aArgumentList ), + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW ); - OSL_ASSERT(xNameAccess->hasByName("ooInetProxyType")); - uno::Any aValue = xNameAccess->getByName("ooInetProxyType"); + OSL_ASSERT(xNameAccess->hasByName(u"ooInetProxyType"_ustr)); + uno::Any aValue = xNameAccess->getByName(u"ooInetProxyType"_ustr); sal_Int32 nProxyType = aValue.get< sal_Int32 >(); if( 0 != nProxyType ) // type 0 means "direct connection to the internet { if( o3tl::starts_with(rURL, u"http:") ) { - rHost = getStringValue(xNameAccess, "ooInetHTTPProxyName"); - rPort = getInt32Value(xNameAccess, "ooInetHTTPProxyPort"); + rHost = getStringValue(xNameAccess, u"ooInetHTTPProxyName"_ustr); + rPort = getInt32Value(xNameAccess, u"ooInetHTTPProxyPort"_ustr); } else if( o3tl::starts_with(rURL, u"https:") ) { - rHost = getStringValue(xNameAccess, "ooInetHTTPSProxyName"); - rPort = getInt32Value(xNameAccess, "ooInetHTTPSProxyPort"); + rHost = getStringValue(xNameAccess, u"ooInetHTTPSProxyName"_ustr); + rPort = getInt32Value(xNameAccess, u"ooInetHTTPSProxyPort"_ustr); } } } diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 66409b32f8b3..139eabbd2050 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -89,7 +89,7 @@ namespace OUString getBuildId() { - OUString aPathVal("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"); + OUString aPathVal(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"_ustr); rtl::Bootstrap::expandMacros(aPathVal); return aPathVal; } @@ -184,15 +184,15 @@ uno::Reference< beans::XPropertySet > createMenuBarUI( { if( !xContext.is() ) throw uno::RuntimeException( - "UpdateCheckJob: empty component context", uno::Reference< uno::XInterface > () ); + u"UpdateCheckJob: empty component context"_ustr, uno::Reference< uno::XInterface > () ); uno::Reference< lang::XMultiComponentFactory > xServiceManager(xContext->getServiceManager()); if( !xServiceManager.is() ) throw uno::RuntimeException( - "UpdateCheckJob: unable to obtain service manager from component context", uno::Reference< uno::XInterface > () ); + u"UpdateCheckJob: unable to obtain service manager from component context"_ustr, uno::Reference< uno::XInterface > () ); uno::Reference< beans::XPropertySet > xMenuBarUI( - xServiceManager->createInstanceWithContext( "com.sun.star.setup.UpdateCheckUI", xContext ), + xServiceManager->createInstanceWithContext( u"com.sun.star.setup.UpdateCheckUI"_ustr, xContext ), uno::UNO_QUERY_THROW); xMenuBarUI->setPropertyValue( PROPERTY_CLICK_HDL, uno::Any( xJob ) ); @@ -1430,17 +1430,17 @@ void UpdateCheck::showExtensionDialog() if( ! m_xContext.is() ) throw uno::RuntimeException( - "UpdateCheck::showExtensionDialog(): empty component context", uno::Reference< uno::XInterface > () ); + u"UpdateCheck::showExtensionDialog(): empty component context"_ustr, uno::Reference< uno::XInterface > () ); uno::Reference< lang::XMultiComponentFactory > xServiceManager( m_xContext->getServiceManager() ); if( !xServiceManager.is() ) throw uno::RuntimeException( - "UpdateCheck::showExtensionDialog(): unable to obtain service manager from component context", uno::Reference< uno::XInterface > () ); + u"UpdateCheck::showExtensionDialog(): unable to obtain service manager from component context"_ustr, uno::Reference< uno::XInterface > () ); - xService = xServiceManager->createInstanceWithContext( "com.sun.star.deployment.ui.PackageManagerDialog", m_xContext ); + xService = xServiceManager->createInstanceWithContext( u"com.sun.star.deployment.ui.PackageManagerDialog"_ustr, m_xContext ); uno::Reference< task::XJobExecutor > xExecutable( xService, uno::UNO_QUERY ); if ( xExecutable.is() ) - xExecutable->trigger( "SHOW_UPDATE_DIALOG" ); + xExecutable->trigger( u"SHOW_UPDATE_DIALOG"_ustr ); } diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index 52deb59528fb..01a9033100fb 100644 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -220,22 +220,22 @@ UpdateCheckConfig::get( beans::PropertyValue aProperty; aProperty.Name = "nodepath"; - aProperty.Value <<= OUString("org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments"); + aProperty.Value <<= u"org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments"_ustr; uno::Sequence< uno::Any > aArgumentList{ uno::Any(aProperty) }; uno::Reference< container::XNameContainer > xContainer( xConfigProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationUpdateAccess", aArgumentList ), + u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW ); - aProperty.Value <<= OUString("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates"); + aProperty.Value <<= u"/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates"_ustr; aArgumentList = { uno::Any(aProperty) }; - uno::Reference< container::XNameContainer > xIgnoredExt( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationUpdateAccess", aArgumentList ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameContainer > xIgnoredExt( xConfigProvider->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW ); - aProperty.Value <<= OUString("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/AvailableUpdates"); + aProperty.Value <<= u"/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/AvailableUpdates"_ustr; aArgumentList = { uno::Any(aProperty) }; - uno::Reference< container::XNameContainer > xUpdateAvail( xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationUpdateAccess", aArgumentList ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameContainer > xUpdateAvail( xConfigProvider->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW ); return new UpdateCheckConfig( xContainer, xUpdateAvail, xIgnoredExt, rListener ); } @@ -244,7 +244,7 @@ bool UpdateCheckConfig::isAutoCheckEnabled() const { bool nValue = false; - const_cast < UpdateCheckConfig *> (this)->getByName( AUTOCHECK_ENABLED ) >>= nValue; + const_cast < UpdateCheckConfig *> (this)->getByName( u"" AUTOCHECK_ENABLED ""_ustr ) >>= nValue; return nValue; } @@ -252,7 +252,7 @@ bool UpdateCheckConfig::isAutoDownloadEnabled() const { bool nValue = false; - const_cast < UpdateCheckConfig *> (this)->getByName( AUTODOWNLOAD_ENABLED ) >>= nValue; + const_cast < UpdateCheckConfig *> (this)->getByName( u"" AUTODOWNLOAD_ENABLED ""_ustr ) >>= nValue; return nValue; } @@ -262,7 +262,7 @@ UpdateCheckConfig::getUpdateEntryVersion() const OUString aValue; // getByName is defined as non const in XNameAccess - const_cast < UpdateCheckConfig *> (this)->getByName( OLD_VERSION ) >>= aValue; + const_cast < UpdateCheckConfig *> (this)->getByName( u"" OLD_VERSION ""_ustr ) >>= aValue; return aValue; } @@ -273,7 +273,7 @@ UpdateCheckConfig::getLastChecked() const sal_Int64 nValue = 0; // getByName is defined as non const in XNameAccess - const_cast < UpdateCheckConfig *> (this)->getByName( LAST_CHECK ) >>= nValue; + const_cast < UpdateCheckConfig *> (this)->getByName( u"" LAST_CHECK ""_ustr ) >>= nValue; return nValue; } @@ -284,7 +284,7 @@ UpdateCheckConfig::getCheckInterval() const sal_Int64 nValue = 0; // getByName is defined as non const in XNameAccess - const_cast < UpdateCheckConfig *> (this)->getByName( CHECK_INTERVAL ) >>= nValue; + const_cast < UpdateCheckConfig *> (this)->getByName( u"" CHECK_INTERVAL ""_ustr ) >>= nValue; return nValue; } @@ -292,7 +292,7 @@ UpdateCheckConfig::getCheckInterval() const OUString UpdateCheckConfig::getLocalFileName() const { - OUString aName = LOCAL_FILE; + OUString aName = u"" LOCAL_FILE ""_ustr; OUString aRet; if( m_xContainer->hasByName(aName) ) @@ -306,7 +306,7 @@ UpdateCheckConfig::getDownloadDestination() const { OUString aRet; - const_cast <UpdateCheckConfig *> (this)->getByName(DOWNLOAD_DESTINATION) >>= aRet; + const_cast <UpdateCheckConfig *> (this)->getByName(u"" DOWNLOAD_DESTINATION ""_ustr) >>= aRet; return aRet; } @@ -315,7 +315,7 @@ void UpdateCheckConfig::storeLocalFileName(const OUString& rLocalFileName, sal_Int64 nFileSize) { const sal_uInt8 nItems = 2; - const OUString aNameList[nItems] = { OUString(LOCAL_FILE), OUString(DOWNLOAD_SIZE) }; + const OUString aNameList[nItems] = { u"" LOCAL_FILE ""_ustr, u"" DOWNLOAD_SIZE ""_ustr }; const uno::Any aValueList[nItems] = { uno::Any(rLocalFileName), uno::Any(nFileSize) }; for( sal_uInt8 i=0; i < nItems; ++i ) @@ -333,7 +333,7 @@ void UpdateCheckConfig::clearLocalFileName() { const sal_uInt8 nItems = 2; - const OUString aNameList[nItems] = { OUString(LOCAL_FILE), OUString(DOWNLOAD_SIZE) }; + const OUString aNameList[nItems] = { u"" LOCAL_FILE ""_ustr, u"" DOWNLOAD_SIZE ""_ustr }; for(const auto & i : aNameList) { @@ -347,7 +347,7 @@ UpdateCheckConfig::clearLocalFileName() void UpdateCheckConfig::storeDownloadPaused(bool paused) { - replaceByName(DOWNLOAD_PAUSED , uno::Any(paused)); + replaceByName(u"" DOWNLOAD_PAUSED ""_ustr , uno::Any(paused)); commitChanges(); } @@ -359,7 +359,7 @@ UpdateCheckConfig::updateLastChecked() sal_Int64 lastCheck = systime.Seconds; - replaceByName(LAST_CHECK, uno::Any(lastCheck)); + replaceByName(u"" LAST_CHECK ""_ustr, uno::Any(lastCheck)); } void @@ -542,18 +542,18 @@ bool UpdateCheckConfig::storeExtensionVersion( const OUString& rExtensionName, bool bNotify = true; if ( m_xAvailableUpdates->hasByName( rExtensionName ) ) - uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->setPropertyValue( PROPERTY_VERSION, uno::Any( rVersion ) ); + uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->setPropertyValue( u"" PROPERTY_VERSION ""_ustr, uno::Any( rVersion ) ); else { uno::Reference< beans::XPropertySet > elem( uno::Reference< lang::XSingleServiceFactory >( m_xAvailableUpdates, uno::UNO_QUERY_THROW )->createInstance(), uno::UNO_QUERY_THROW ); - elem->setPropertyValue( PROPERTY_VERSION, uno::Any( rVersion ) ); + elem->setPropertyValue( u"" PROPERTY_VERSION ""_ustr, uno::Any( rVersion ) ); m_xAvailableUpdates->insertByName( rExtensionName, uno::Any( elem ) ); } if ( m_xIgnoredUpdates->hasByName( rExtensionName ) ) { OUString aIgnoredVersion; - uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( u"" PROPERTY_VERSION ""_ustr ) ); aValue >>= aIgnoredVersion; if ( aIgnoredVersion.isEmpty() ) // no version means ignore all updates bNotify = false; @@ -572,13 +572,13 @@ bool UpdateCheckConfig::checkExtensionVersion( const OUString& rExtensionName, if ( m_xAvailableUpdates->hasByName( rExtensionName ) ) { OUString aStoredVersion; - uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( u"" PROPERTY_VERSION ""_ustr ) ); aValue >>= aStoredVersion; if ( m_xIgnoredUpdates->hasByName( rExtensionName ) ) { OUString aIgnoredVersion; - uno::Any aValue2( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + uno::Any aValue2( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( u"" PROPERTY_VERSION ""_ustr ) ); aValue2 >>= aIgnoredVersion; if ( aIgnoredVersion.isEmpty() ) // no version means ignore all updates return false; @@ -634,7 +634,7 @@ bool UpdateCheckConfig::isVersionGreater( const OUString& rVersion1, OUString SAL_CALL UpdateCheckConfig::getImplementationName() { - return "vnd.sun.UpdateCheckConfig"; + return u"vnd.sun.UpdateCheckConfig"_ustr; } sal_Bool SAL_CALL @@ -646,7 +646,7 @@ UpdateCheckConfig::supportsService(OUString const & serviceName) uno::Sequence< OUString > SAL_CALL UpdateCheckConfig::getSupportedServiceNames() { - return { "com.sun.star.setup.UpdateCheckConfig" }; + return { u"com.sun.star.setup.UpdateCheckConfig"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index b79c438108ee..7c34671ed876 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -259,14 +259,14 @@ void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedVa OUString SAL_CALL UpdateCheckJob::getImplementationName() { - return "vnd.sun.UpdateCheck"; + return u"vnd.sun.UpdateCheck"_ustr; } uno::Sequence< OUString > SAL_CALL UpdateCheckJob::getSupportedServiceNames() { - return { "com.sun.star.setup.UpdateCheck" }; + return { u"com.sun.star.setup.UpdateCheck"_ustr }; } sal_Bool SAL_CALL diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index a5c6429aee69..1579e69c4e70 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -125,7 +125,7 @@ void UpdateHandler::enableControls( short nCtrlState ) if ( ( nCurStateVal & 0x01 ) != ( nOldStateVal & 0x01 ) ) { bool bEnableControl = ( ( nCurStateVal & 0x01 ) == 0x01 ); - setControlProperty( msButtonIDs[i], "Enabled", uno::Any( bEnableControl ) ); + setControlProperty( msButtonIDs[i], u"Enabled"_ustr, uno::Any( bEnableControl ) ); } } @@ -144,8 +144,8 @@ void UpdateHandler::setDownloadBtnLabel( bool bAppendDots ) if ( bAppendDots ) aLabel += "..."; - setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], "Label", uno::Any( aLabel ) ); - setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DOWNLOAD2 )) ); + setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], u"Label"_ustr, uno::Any( aLabel ) ); + setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DOWNLOAD2 )) ); mbDownloadBtnHasDots = bAppendDots; } @@ -231,15 +231,15 @@ void UpdateHandler::setProgress( sal_Int32 nPercent ) osl::MutexGuard aGuard( maMutex ); mnPercent = nPercent; - setControlProperty( CTRL_PROGRESS, "ProgressValue", uno::Any( nPercent ) ); - setControlProperty( TEXT_PERCENT, "Text", uno::Any( substVariables(msPercent) ) ); + setControlProperty( CTRL_PROGRESS, u"ProgressValue"_ustr, uno::Any( nPercent ) ); + setControlProperty( TEXT_PERCENT, u"Text"_ustr, uno::Any( substVariables(msPercent) ) ); } } void UpdateHandler::setErrorMessage( const OUString& rErrorMsg ) { - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( rErrorMsg ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( rErrorMsg ) ); } @@ -404,12 +404,12 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest > if ( !mxInteractionHdl.is() ) { if( !mxContext.is() ) - throw uno::RuntimeException( "UpdateHandler:: empty component context", *this ); + throw uno::RuntimeException( u"UpdateHandler:: empty component context"_ustr, *this ); uno::Reference< lang::XMultiComponentFactory > xServiceManager(mxContext->getServiceManager()); if( !xServiceManager.is() ) - throw uno::RuntimeException( "UpdateHandler: unable to obtain service manager from component context", *this ); + throw uno::RuntimeException( u"UpdateHandler: unable to obtain service manager from component context"_ustr, *this ); mxInteractionHdl.set( task::InteractionHandler::createWithParent(mxContext, nullptr), @@ -420,7 +420,7 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest > beans::Optional< OUString > aErrorText = xStrResolver->getStringFromInformationalRequest( rRequest ); if ( aErrorText.IsPresent ) { - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( aErrorText.Value ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( aErrorText.Value ) ); uno::Sequence< uno::Reference< task::XInteractionContinuation > > xContinuations = rRequest->getContinuations(); if ( xContinuations.getLength() == 1 ) @@ -451,7 +451,7 @@ void SAL_CALL UpdateHandler::queryTermination( const lang::EventObject& ) xTopWindow->toFront(); throw frame::TerminationVetoException( - "The office cannot be closed while displaying a warning!", + u"The office cannot be closed while displaying a warning!"_ustr, static_cast<frame::XTerminateListener*>(this)); } else @@ -490,25 +490,25 @@ void UpdateHandler::updateState( UpdateState eState ) case UPDATESTATE_CHECKING: showControls( (1<<CANCEL_BUTTON) + (1<<THROBBER_CTRL) ); enableControls( 1<<CANCEL_BUTTON ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msChecking) ) ); - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( OUString() ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msChecking) ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( OUString() ) ); focusControl( CANCEL_BUTTON ); break; case UPDATESTATE_ERROR_CHECKING: showControls( 0 ); enableControls( 1 << CLOSE_BUTTON ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msCheckingError) ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msCheckingError) ) ); focusControl( CLOSE_BUTTON ); break; case UPDATESTATE_UPDATE_AVAIL: showControls( 0 ); enableControls( ( 1 << CLOSE_BUTTON ) + ( 1 << DOWNLOAD_BUTTON ) ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msUpdFound) ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msUpdFound) ) ); sText = substVariables(msDownloadWarning); if ( !msDescriptionMsg.isEmpty() ) sText += "\n\n" + msDescriptionMsg; - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( sText ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( sText ) ); setDownloadBtnLabel( false ); focusControl( DOWNLOAD_BUTTON ); @@ -516,12 +516,12 @@ void UpdateHandler::updateState( UpdateState eState ) case UPDATESTATE_UPDATE_NO_DOWNLOAD: showControls( 0 ); enableControls( ( 1 << CLOSE_BUTTON ) + ( 1 << DOWNLOAD_BUTTON ) ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msUpdFound) ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msUpdFound) ) ); sText = substVariables(msDownloadNotAvail); if ( !msDescriptionMsg.isEmpty() ) sText += "\n\n" + msDescriptionMsg; - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( sText ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( sText ) ); setDownloadBtnLabel( true ); focusControl( DOWNLOAD_BUTTON ); @@ -530,38 +530,38 @@ void UpdateHandler::updateState( UpdateState eState ) case UPDATESTATE_EXT_UPD_AVAIL: // will only be set, when there are no office updates avail showControls( 0 ); enableControls( 1 << CLOSE_BUTTON ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msNoUpdFound) ) ); - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( OUString() ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msNoUpdFound) ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( OUString() ) ); focusControl( CLOSE_BUTTON ); break; case UPDATESTATE_DOWNLOADING: showControls( (1<<PROGRESS_CTRL) + (1<<CANCEL_BUTTON) + (1<<PAUSE_BUTTON) + (1<<RESUME_BUTTON) ); enableControls( (1<<CLOSE_BUTTON) + (1<<CANCEL_BUTTON) + (1<<PAUSE_BUTTON) ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msDownloading) ) ); - setControlProperty( TEXT_PERCENT, "Text", uno::Any( substVariables(msPercent) ) ); - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( substVariables(msDownloadWarning) ) ); - setControlProperty( CTRL_PROGRESS, "ProgressValue", uno::Any( mnPercent ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msDownloading) ) ); + setControlProperty( TEXT_PERCENT, u"Text"_ustr, uno::Any( substVariables(msPercent) ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( substVariables(msDownloadWarning) ) ); + setControlProperty( CTRL_PROGRESS, u"ProgressValue"_ustr, uno::Any( mnPercent ) ); focusControl( CLOSE_BUTTON ); break; case UPDATESTATE_DOWNLOAD_PAUSED: showControls( (1<<PROGRESS_CTRL) + (1<<CANCEL_BUTTON) + (1<<PAUSE_BUTTON) + (1<<RESUME_BUTTON) ); enableControls( (1<<CLOSE_BUTTON) + (1<<CANCEL_BUTTON) + (1<<RESUME_BUTTON) ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msDownloadPause) ) ); - setControlProperty( TEXT_PERCENT, "Text", uno::Any( substVariables(msPercent) ) ); - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( substVariables(msDownloadWarning) ) ); - setControlProperty( CTRL_PROGRESS, "ProgressValue", uno::Any( mnPercent ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msDownloadPause) ) ); + setControlProperty( TEXT_PERCENT, u"Text"_ustr, uno::Any( substVariables(msPercent) ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( substVariables(msDownloadWarning) ) ); + setControlProperty( CTRL_PROGRESS, u"ProgressValue"_ustr, uno::Any( mnPercent ) ); focusControl( CLOSE_BUTTON ); break; case UPDATESTATE_ERROR_DOWNLOADING: showControls( (1<<PROGRESS_CTRL) + (1<<CANCEL_BUTTON) + (1<<PAUSE_BUTTON) + (1<<RESUME_BUTTON) ); enableControls( (1<<CLOSE_BUTTON) + (1<<CANCEL_BUTTON) ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msDownloadError) ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msDownloadError) ) ); focusControl( CLOSE_BUTTON ); break; case UPDATESTATE_DOWNLOAD_AVAIL: showControls( 0 ); - setControlProperty( TEXT_STATUS, "Text", uno::Any( substVariables(msReady2Install) ) ); - setControlProperty( TEXT_DESCRIPTION, "Text", uno::Any( substVariables(msDownloadDescr) ) ); + setControlProperty( TEXT_STATUS, u"Text"_ustr, uno::Any( substVariables(msReady2Install) ) ); + setControlProperty( TEXT_DESCRIPTION, u"Text"_ustr, uno::Any( substVariables(msDownloadDescr) ) ); break; case UPDATESTATE_AUTO_START: case UPDATESTATES_COUNT: @@ -746,11 +746,11 @@ void UpdateHandler::insertControlModel( uno::Reference< awt::XControlModel > con } // @see awt/UnoControlDialogElement.idl - xPropSet->setPropertyValue( "Name", uno::Any (rControlName) ); - xPropSet->setPropertyValue( "PositionX", uno::Any (rPosSize.X) ); - xPropSet->setPropertyValue( "PositionY", uno::Any (rPosSize.Y) ); - xPropSet->setPropertyValue( "Height", uno::Any (rPosSize.Height) ); - xPropSet->setPropertyValue( "Width", uno::Any (rPosSize.Width) ); + xPropSet->setPropertyValue( u"Name"_ustr, uno::Any (rControlName) ); + xPropSet->setPropertyValue( u"PositionX"_ustr, uno::Any (rPosSize.X) ); + xPropSet->setPropertyValue( u"PositionY"_ustr, uno::Any (rPosSize.Y) ); + xPropSet->setPropertyValue( u"Height"_ustr, uno::Any (rPosSize.Height) ); + xPropSet->setPropertyValue( u"Width"_ustr, uno::Any (rPosSize.Width) ); // insert by Name into DialogModel container uno::Reference< container::XNameContainer > xContainer (rxDialogModel, uno::UNO_QUERY_THROW); @@ -765,19 +765,19 @@ void UpdateHandler::setFullVersion( OUString& rString ) beans::PropertyValue aProperty; aProperty.Name = "nodepath"; - aProperty.Value <<= OUString("org.openoffice.Setup/Product"); + aProperty.Value <<= u"org.openoffice.Setup/Product"_ustr; uno::Sequence< uno::Any > aArgumentList{ uno::Any(aProperty) }; - uno::Reference< uno::XInterface > xConfigAccess = xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", + uno::Reference< uno::XInterface > xConfigAccess = xConfigurationProvider->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgumentList ); uno::Reference< container::XNameAccess > xNameAccess( xConfigAccess, uno::UNO_QUERY_THROW ); OUString aProductVersion; - xNameAccess->getByName("ooSetupVersion") >>= aProductVersion; + xNameAccess->getByName(u"ooSetupVersion"_ustr) >>= aProductVersion; OUString aProductFullVersion; - xNameAccess->getByName("ooSetupVersionAboutBox") >>= aProductFullVersion; + xNameAccess->getByName(u"ooSetupVersionAboutBox"_ustr) >>= aProductFullVersion; rString = rString.replaceFirst( aProductVersion, aProductFullVersion ); } @@ -871,12 +871,12 @@ bool UpdateHandler::showWarning( const OUString &rWarningText, if ( xMsgBoxCtrl.is() ) { bool bIsDefault = true; - uno::Any aValue = xMsgBoxCtrl->getProperty( "DefaultButton" ); + uno::Any aValue = xMsgBoxCtrl->getProperty( u"DefaultButton"_ustr ); aValue >>= bIsDefault; if ( bIsDefault ) - xMsgBoxCtrl->setProperty( "Text", uno::Any( rBtnText_1 ) ); + xMsgBoxCtrl->setProperty( u"Text"_ustr, uno::Any( rBtnText_1 ) ); else - xMsgBoxCtrl->setProperty( "Text", uno::Any( rBtnText_2 ) ); + xMsgBoxCtrl->setProperty( u"Text"_ustr, uno::Any( rBtnText_2 ) ); } } } @@ -971,15 +971,15 @@ void UpdateHandler::showControls( short nControls ) // Status text needs to be smaller, when there are buttons at the right side of the dialog if ( ( nControls & ( (1<<CANCEL_BUTTON) + (1<<PAUSE_BUTTON) + (1<<RESUME_BUTTON) ) ) != 0 ) - setControlProperty( TEXT_STATUS, "Width", uno::Any( sal_Int32(EDIT_WIDTH - BUTTON_WIDTH - 2*INNER_BORDER - TEXT_OFFSET ) ) ); + setControlProperty( TEXT_STATUS, u"Width"_ustr, uno::Any( sal_Int32(EDIT_WIDTH - BUTTON_WIDTH - 2*INNER_BORDER - TEXT_OFFSET ) ) ); else - setControlProperty( TEXT_STATUS, "Width", uno::Any( sal_Int32(EDIT_WIDTH - 2*TEXT_OFFSET ) ) ); + setControlProperty( TEXT_STATUS, u"Width"_ustr, uno::Any( sal_Int32(EDIT_WIDTH - 2*TEXT_OFFSET ) ) ); // Status text needs to be taller, when we show the progress bar if ( ( nControls & ( 1<<PROGRESS_CTRL ) ) != 0 ) - setControlProperty( TEXT_STATUS, "Height", uno::Any( sal_Int32(LABEL_HEIGHT) ) ); + setControlProperty( TEXT_STATUS, u"Height"_ustr, uno::Any( sal_Int32(LABEL_HEIGHT) ) ); else - setControlProperty( TEXT_STATUS, "Height", uno::Any( sal_Int32(BOX_HEIGHT1 - 4*TEXT_OFFSET - LABEL_HEIGHT ) ) ); + setControlProperty( TEXT_STATUS, u"Height"_ustr, uno::Any( sal_Int32(BOX_HEIGHT1 - 4*TEXT_OFFSET - LABEL_HEIGHT ) ) ); } @@ -1001,48 +1001,48 @@ void UpdateHandler::createDialog() uno::Reference< lang::XMultiComponentFactory > xFactory( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< awt::XControlModel > xControlModel( xFactory->createInstanceWithContext( - "com.sun.star.awt.UnoControlDialogModel", + u"com.sun.star.awt.UnoControlDialogModel"_ustr, mxContext), uno::UNO_QUERY_THROW ); { // @see awt/UnoControlDialogModel.idl uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "Title", uno::Any( msDlgTitle ) ); - xPropSet->setPropertyValue( "Closeable", uno::Any( true ) ); - xPropSet->setPropertyValue( "Enabled", uno::Any( true ) ); - xPropSet->setPropertyValue( "Moveable", uno::Any( true ) ); - xPropSet->setPropertyValue( "Sizeable", uno::Any( true ) ); - xPropSet->setPropertyValue( "DesktopAsParent", uno::Any( true ) ); - xPropSet->setPropertyValue( "PositionX", uno::Any(sal_Int32( 100 )) ); - xPropSet->setPropertyValue( "PositionY", uno::Any(sal_Int32( 100 )) ); - xPropSet->setPropertyValue( "Width", uno::Any(sal_Int32( DIALOG_WIDTH )) ); - xPropSet->setPropertyValue( "Height", uno::Any(sal_Int32( DIALOG_HEIGHT )) ); - xPropSet->setPropertyValue( "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DLG )) ); + xPropSet->setPropertyValue( u"Title"_ustr, uno::Any( msDlgTitle ) ); + xPropSet->setPropertyValue( u"Closeable"_ustr, uno::Any( true ) ); + xPropSet->setPropertyValue( u"Enabled"_ustr, uno::Any( true ) ); + xPropSet->setPropertyValue( u"Moveable"_ustr, uno::Any( true ) ); + xPropSet->setPropertyValue( u"Sizeable"_ustr, uno::Any( true ) ); + xPropSet->setPropertyValue( u"DesktopAsParent"_ustr, uno::Any( true ) ); + xPropSet->setPropertyValue( u"PositionX"_ustr, uno::Any(sal_Int32( 100 )) ); + xPropSet->setPropertyValue( u"PositionY"_ustr, uno::Any(sal_Int32( 100 )) ); + xPropSet->setPropertyValue( u"Width"_ustr, uno::Any(sal_Int32( DIALOG_WIDTH )) ); + xPropSet->setPropertyValue( u"Height"_ustr, uno::Any(sal_Int32( DIALOG_HEIGHT )) ); + xPropSet->setPropertyValue( u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DLG )) ); } { // Label (fixed text) <status> - uno::Sequence< beans::NamedValue > aProps { { "Label", uno::Any( msStatusFL ) } }; + uno::Sequence< beans::NamedValue > aProps { { u"Label"_ustr, uno::Any( msStatusFL ) } }; - insertControlModel( xControlModel, FIXED_TEXT_MODEL, "fixedLineStatus", + insertControlModel( xControlModel, FIXED_TEXT_MODEL, u"fixedLineStatus"_ustr, awt::Rectangle( DIALOG_BORDER+1, DIALOG_BORDER, EDIT_WIDTH-2, LABEL_HEIGHT ), aProps ); } { // box around <status> text uno::Sequence< beans::NamedValue > aProps; - insertControlModel( xControlModel, GROUP_BOX_MODEL, "StatusBox", + insertControlModel( xControlModel, GROUP_BOX_MODEL, u"StatusBox"_ustr, awt::Rectangle( DIALOG_BORDER, DIALOG_BORDER + LABEL_HEIGHT, EDIT_WIDTH, BOX_HEIGHT1 - LABEL_HEIGHT ), aProps ); } { // Text (multiline edit) <status> uno::Sequence< beans::NamedValue > aProps { - { "Text", uno::Any( substVariables(msChecking) ) }, - { "Border", uno::Any( sal_Int16( 0 ) ) }, - { "PaintTransparent", uno::Any( true ) }, - { "MultiLine", uno::Any( true ) }, - { "ReadOnly", uno::Any( true ) }, - { "AutoVScroll", uno::Any( true ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_STATUS )) } + { u"Text"_ustr, uno::Any( substVariables(msChecking) ) }, + { u"Border"_ustr, uno::Any( sal_Int16( 0 ) ) }, + { u"PaintTransparent"_ustr, uno::Any( true ) }, + { u"MultiLine"_ustr, uno::Any( true ) }, + { u"ReadOnly"_ustr, uno::Any( true ) }, + { u"AutoVScroll"_ustr, uno::Any( true ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_STATUS )) } }; insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_STATUS, @@ -1055,10 +1055,10 @@ void UpdateHandler::createDialog() { // Text (edit) <percent> uno::Sequence< beans::NamedValue > aProps { - { "Text", uno::Any( substVariables(msPercent) ) }, - { "Border", uno::Any( sal_Int16( 0 ) ) }, - { "PaintTransparent", uno::Any( true ) }, - { "ReadOnly", uno::Any( true ) }, + { u"Text"_ustr, uno::Any( substVariables(msPercent) ) }, + { u"Border"_ustr, uno::Any( sal_Int16( 0 ) ) }, + { u"PaintTransparent"_ustr, uno::Any( true ) }, + { u"ReadOnly"_ustr, uno::Any( true ) }, }; insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_PERCENT, @@ -1071,11 +1071,11 @@ void UpdateHandler::createDialog() { // pause button uno::Sequence< beans::NamedValue > aProps { - { "DefaultButton", uno::Any( false ) }, - { "Enabled", uno::Any( true ) }, - { "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, - { "Label", uno::Any( msPauseBtn ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_PAUSE )) } + { u"DefaultButton"_ustr, uno::Any( false ) }, + { u"Enabled"_ustr, uno::Any( true ) }, + { u"PushButtonType"_ustr, uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, + { u"Label"_ustr, uno::Any( msPauseBtn ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_PAUSE )) } }; insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[PAUSE_BUTTON], @@ -1085,11 +1085,11 @@ void UpdateHandler::createDialog() { // resume button uno::Sequence< beans::NamedValue > aProps { - { "DefaultButton", uno::Any( false ) }, - { "Enabled", uno::Any( true ) }, - { "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, - { "Label", uno::Any( msResumeBtn ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_RESUME )) } + { u"DefaultButton"_ustr, uno::Any( false ) }, + { u"Enabled"_ustr, uno::Any( true ) }, + { u"PushButtonType"_ustr, uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, + { u"Label"_ustr, uno::Any( msResumeBtn ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_RESUME )) } }; insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[RESUME_BUTTON], @@ -1102,11 +1102,11 @@ void UpdateHandler::createDialog() { // abort button uno::Sequence< beans::NamedValue > aProps { - { "DefaultButton", uno::Any( false ) }, - { "Enabled", uno::Any( true ) }, - { "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, - { "Label", uno::Any( msCancelBtn ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_CANCEL )) } + { u"DefaultButton"_ustr, uno::Any( false ) }, + { u"Enabled"_ustr, uno::Any( true ) }, + { u"PushButtonType"_ustr, uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, + { u"Label"_ustr, uno::Any( msCancelBtn ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_CANCEL )) } }; insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[CANCEL_BUTTON], @@ -1117,29 +1117,29 @@ void UpdateHandler::createDialog() aProps ); } { // Label (FixedText) <description> - uno::Sequence< beans::NamedValue > aProps { { "Label", uno::Any( msDescription ) } }; + uno::Sequence< beans::NamedValue > aProps { { u"Label"_ustr, uno::Any( msDescription ) } }; - insertControlModel( xControlModel, FIXED_TEXT_MODEL, "fixedTextDescription", + insertControlModel( xControlModel, FIXED_TEXT_MODEL, u"fixedTextDescription"_ustr, awt::Rectangle( DIALOG_BORDER+1, LABEL_Y_POS, EDIT_WIDTH-2, LABEL_HEIGHT ), aProps ); } { // box around <description> text uno::Sequence< beans::NamedValue > aProps; - insertControlModel( xControlModel, GROUP_BOX_MODEL, "DescriptionBox", + insertControlModel( xControlModel, GROUP_BOX_MODEL, u"DescriptionBox"_ustr, awt::Rectangle( DIALOG_BORDER, EDIT2_Y_POS, EDIT_WIDTH, BOX_HEIGHT2 ), aProps ); } { // Text (MultiLineEdit) <description> uno::Sequence< beans::NamedValue > aProps { - { "Text", uno::Any( OUString() ) }, - { "Border", uno::Any( sal_Int16( 0 ) ) }, - { "PaintTransparent", uno::Any( true ) }, - { "MultiLine", uno::Any( true ) }, - { "ReadOnly", uno::Any( true ) }, - { "AutoVScroll", uno::Any( true ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DESCRIPTION )) } + { u"Text"_ustr, uno::Any( OUString() ) }, + { u"Border"_ustr, uno::Any( sal_Int16( 0 ) ) }, + { u"PaintTransparent"_ustr, uno::Any( true ) }, + { u"MultiLine"_ustr, uno::Any( true ) }, + { u"ReadOnly"_ustr, uno::Any( true ) }, + { u"AutoVScroll"_ustr, uno::Any( true ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DESCRIPTION )) } }; insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_DESCRIPTION, @@ -1150,25 +1150,25 @@ void UpdateHandler::createDialog() aProps ); } { // @see awt/UnoControlFixedLineModel.idl - uno::Sequence< beans::NamedValue > aProps { { "Orientation", uno::Any( sal_Int32( 0 ) ) } }; + uno::Sequence< beans::NamedValue > aProps { { u"Orientation"_ustr, uno::Any( sal_Int32( 0 ) ) } }; - insertControlModel( xControlModel, FIXED_LINE_MODEL, "fixedLine", + insertControlModel( xControlModel, FIXED_LINE_MODEL, u"fixedLine"_ustr, awt::Rectangle( 0, BUTTON_BAR_Y_POS, DIALOG_WIDTH, 5 ), aProps ); } { // close button // @see awt/UnoControlButtonModel.idl uno::Sequence< beans::NamedValue > aProps { - { "DefaultButton", uno::Any( false ) }, - { "Enabled", uno::Any( true ) }, + { u"DefaultButton"_ustr, uno::Any( false ) }, + { u"Enabled"_ustr, uno::Any( true ) }, // [property] short PushButtonType // with own "ButtonActionListener" - { "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, + { u"PushButtonType"_ustr, uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, // with default ActionListener => endDialog(). // setProperty( aProps, 2, "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_CANCEL) ) ); // [property] string Label // only if PushButtonType_STANDARD - { "Label", uno::Any( msClose ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_CLOSE )) } + { u"Label"_ustr, uno::Any( msClose ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_CLOSE )) } }; insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[ CLOSE_BUTTON ], @@ -1178,11 +1178,11 @@ void UpdateHandler::createDialog() { // download button uno::Sequence< beans::NamedValue > aProps { - { "DefaultButton", uno::Any( false ) }, - { "Enabled", uno::Any( true ) }, - { "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, - { "Label", uno::Any( msDownload ) }, - { "HelpURL", uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DOWNLOAD )) } + { u"DefaultButton"_ustr, uno::Any( false ) }, + { u"Enabled"_ustr, uno::Any( true ) }, + { u"PushButtonType"_ustr, uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) }, + { u"Label"_ustr, uno::Any( msDownload ) }, + { u"HelpURL"_ustr, uno::Any(OUString( INET_HID_SCHEME + HID_CHECK_FOR_UPD_DOWNLOAD )) } }; insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[DOWNLOAD_BUTTON], @@ -1192,9 +1192,9 @@ void UpdateHandler::createDialog() { // help button uno::Sequence< beans::NamedValue > aProps { - { "DefaultButton", uno::Any( false ) }, - { "Enabled", uno::Any( true ) }, - { "PushButtonType", uno::Any( sal_Int16(awt::PushButtonType_HELP) ) } + { u"DefaultButton"_ustr, uno::Any( false ) }, + { u"Enabled"_ustr, uno::Any( true ) }, + { u"PushButtonType"_ustr, uno::Any( sal_Int16(awt::PushButtonType_HELP) ) } }; insertControlModel( xControlModel, BUTTON_MODEL, msButtonIDs[HELP_BUTTON], @@ -1204,19 +1204,19 @@ void UpdateHandler::createDialog() { // @see awt/UnoControlThrobberModel.idl uno::Sequence< beans::NamedValue > aProps; - insertControlModel( xControlModel, "com.sun.star.awt.SpinningProgressControlModel", CTRL_THROBBER, + insertControlModel( xControlModel, u"com.sun.star.awt.SpinningProgressControlModel"_ustr, CTRL_THROBBER, awt::Rectangle( THROBBER_X_POS, THROBBER_Y_POS, THROBBER_WIDTH, THROBBER_HEIGHT), aProps ); } { // @see awt/UnoControlProgressBarModel.idl uno::Sequence< beans::NamedValue > aProps { - { "Enabled", uno::Any( true ) }, - { "ProgressValue", uno::Any( sal_Int32( 0 ) ) }, - { "ProgressValueMax", uno::Any( sal_Int32( 100 ) ) }, - { "ProgressValueMin", uno::Any( sal_Int32( 0 ) ) }, + { u"Enabled"_ustr, uno::Any( true ) }, + { u"ProgressValue"_ustr, uno::Any( sal_Int32( 0 ) ) }, + { u"ProgressValueMax"_ustr, uno::Any( sal_Int32( 100 ) ) }, + { u"ProgressValueMin"_ustr, uno::Any( sal_Int32( 0 ) ) }, }; - insertControlModel( xControlModel, "com.sun.star.awt.UnoControlProgressBarModel", CTRL_PROGRESS, + insertControlModel( xControlModel, u"com.sun.star.awt.UnoControlProgressBarModel"_ustr, CTRL_PROGRESS, awt::Rectangle( PROGRESS_X_POS, PROGRESS_Y_POS, PROGRESS_WIDTH, PROGRESS_HEIGHT ), aProps); } diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx index 2fb6be85286a..8c71aaecf90a 100644 --- a/extensions/source/update/check/updateprotocol.cxx +++ b/extensions/source/update/check/updateprotocol.cxx @@ -56,7 +56,7 @@ getBootstrapData( if ( rInstallSetID.isEmpty() ) return false; - OUString aValue( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateURL}" ); + OUString aValue( u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateURL}"_ustr ); rtl::Bootstrap::expandMacros( aValue ); if( !aValue.isEmpty() ) @@ -79,8 +79,8 @@ checkForUpdates( OUString myArch; OUString myOS; - rtl::Bootstrap::get("_OS", myOS); - rtl::Bootstrap::get("_ARCH", myArch); + rtl::Bootstrap::get(u"_OS"_ustr, myOS); + rtl::Bootstrap::get(u"_ARCH"_ustr, myArch); uno::Sequence< OUString > aRepositoryList; OUString aGitID; @@ -107,14 +107,14 @@ checkForUpdates( const OUString &rInstallSetID ) { if( !rxContext.is() ) - throw uno::RuntimeException( "checkForUpdates: empty component context" ); + throw uno::RuntimeException( u"checkForUpdates: empty component context"_ustr ); OSL_ASSERT( rxContext->getServiceManager().is() ); // XPath implementation uno::Reference< xml::xpath::XXPathAPI > xXPath = xml::xpath::XPathAPI::create(rxContext); - xXPath->registerNS( "inst", "http://update.libreoffice.org/description" ); + xXPath->registerNS( u"inst"_ustr, u"http://update.libreoffice.org/description"_ustr ); if( rxInteractionHandler.is() ) rUpdateInfoProvider->setInteractionHandler(rxInteractionHandler); @@ -160,7 +160,7 @@ checkForUpdates( if( xNode2.is() ) { uno::Reference< xml::dom::XElement > xParent(xNode2->getParentNode(), uno::UNO_QUERY_THROW); - OUString aType = xParent->getAttribute("type"); + OUString aType = xParent->getAttribute(u"type"_ustr); bool bIsDirect = !aType.equalsIgnoreAsciiCase("text/html"); o_rUpdateInfo.Sources.emplace_back(bIsDirect, xNode2->getNodeValue()); @@ -203,15 +203,15 @@ checkForUpdates( uno::Reference< xml::dom::XElement > xRelNote(xNodeList->item(i), uno::UNO_QUERY); if( xRelNote.is() ) { - sal_Int32 pos = xRelNote->getAttribute("pos").toInt32(); + sal_Int32 pos = xRelNote->getAttribute(u"pos"_ustr).toInt32(); - ReleaseNote aRelNote(static_cast<sal_uInt8>(pos), xRelNote->getAttribute("src")); + ReleaseNote aRelNote(static_cast<sal_uInt8>(pos), xRelNote->getAttribute(u"src"_ustr)); - if( xRelNote->hasAttribute("src2") ) + if( xRelNote->hasAttribute(u"src2"_ustr) ) { - pos = xRelNote->getAttribute("pos2").toInt32(); + pos = xRelNote->getAttribute(u"pos2"_ustr).toInt32(); aRelNote.Pos2 = static_cast<sal_Int8>(pos); - aRelNote.URL2 = xRelNote->getAttribute("src2"); + aRelNote.URL2 = xRelNote->getAttribute(u"src2"_ustr); } o_rUpdateInfo.ReleaseNotes.push_back(aRelNote); @@ -260,7 +260,7 @@ bool checkForExtensionUpdates( const uno::Reference< uno::XComponentContext > & try { uno::Any aValue( rxContext->getValueByName( - "/singletons/com.sun.star.deployment.PackageInformationProvider" ) ); + u"/singletons/com.sun.star.deployment.PackageInformationProvider"_ustr ) ); OSL_VERIFY( aValue >>= xInfoProvider ); } catch( const uno::Exception& ) @@ -286,7 +286,7 @@ bool checkForPendingUpdates( const uno::Reference< uno::XComponentContext > & rx try { uno::Any aValue( rxContext->getValueByName( - "/singletons/com.sun.star.deployment.PackageInformationProvider" ) ); + u"/singletons/com.sun.star.deployment.PackageInformationProvider"_ustr ) ); OSL_VERIFY( aValue >>= xInfoProvider ); } catch( const uno::Exception& ) diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 556955b7123c..241a74d385f4 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -243,7 +243,7 @@ public: { // action has been aborted css::uno::Any anyEx = cppu::getCaughtException(); - throw lang::WrappedTargetException( "Command aborted", *this, anyEx ); + throw lang::WrappedTargetException( u"Command aborted"_ustr, *this, anyEx ); } catch( uno::RuntimeException const & ) { @@ -254,7 +254,7 @@ public: { // document not accessible css::uno::Any anyEx = cppu::getCaughtException(); - throw lang::WrappedTargetException( "Document not accessible", *this, anyEx ); + throw lang::WrappedTargetException( u"Document not accessible"_ustr, *this, anyEx ); } } @@ -305,7 +305,7 @@ UpdateInformationProvider::UpdateInformationProvider( auto pRequestHeaderList = m_aRequestHeaderList.getArray(); pRequestHeaderList[0].First = "Accept-Language"; - pRequestHeaderList[0].Second = getConfigurationItem( xConfigurationProvider, "org.openoffice.Setup/L10N", "ooLocale" ); + pRequestHeaderList[0].Second = getConfigurationItem( xConfigurationProvider, u"org.openoffice.Setup/L10N"_ustr, u"ooLocale"_ustr ); } bool @@ -318,8 +318,8 @@ UpdateInformationProvider::isUserAgentExtended() const uno::Any aExtended = getConfigurationItemAny( xConfigurationProvider, - "org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments", - "ExtendedUserAgent"); + u"org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments"_ustr, + u"ExtendedUserAgent"_ustr); aExtended >>= bExtendedUserAgent; } catch (const uno::RuntimeException &) { SAL_WARN("extensions.update", "Online update disabled"); @@ -336,26 +336,26 @@ OUString UpdateInformationProvider::getUserAgent(bool bExtended) buf.append( getConfigurationItem( xConfigurationProvider, - "org.openoffice.Setup/Product", - "ooName")); + u"org.openoffice.Setup/Product"_ustr, + u"ooName"_ustr)); buf.append(' '); buf.append( getConfigurationItem( xConfigurationProvider, - "org.openoffice.Setup/Product", - "ooSetupVersion")); + u"org.openoffice.Setup/Product"_ustr, + u"ooSetupVersion"_ustr)); OUString extension( getConfigurationItem( xConfigurationProvider, - "org.openoffice.Setup/Product", - "ooSetupExtension")); + u"org.openoffice.Setup/Product"_ustr, + u"ooSetupExtension"_ustr)); if (!extension.isEmpty()) buf.append(extension); OUString product(buf.makeStringAndClear()); - OUString aUserAgent( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateUserAgent}" ); + OUString aUserAgent( u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateUserAgent}"_ustr ); OUString aExtended; if( bExtended ) { @@ -411,7 +411,7 @@ UpdateInformationProvider::getConfigurationItemAny(uno::Reference<lang::XMultiSe uno::Sequence< uno::Any > aArgumentList{ uno::Any(aProperty) }; uno::Reference< container::XNameAccess > xNameAccess( configurationProvider->createInstanceWithArguments( - "com.sun.star.configuration.ConfigurationAccess", + u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgumentList ), uno::UNO_QUERY_THROW); @@ -444,7 +444,7 @@ UpdateInformationProvider::load(const OUString& rURL) if( !xId.is() ) throw uno::RuntimeException( - "unable to obtain universal content id", *this); + u"unable to obtain universal content id"_ustr, *this); uno::Reference< ucb::XCommandProcessor > xCommandProcessor(m_xUniversalContentBroker->queryContent(xId), uno::UNO_QUERY_THROW); rtl::Reference< ActiveDataSink > aSink(new ActiveDataSink()); @@ -455,7 +455,7 @@ UpdateInformationProvider::load(const OUString& rURL) aOpenArgument.Sink = *aSink; // Disable KeepAlive in webdav - don't want millions of office // instances phone home & clog up servers - aOpenArgument.OpeningFlags = { { "KeepAlive", uno::Any(false) } }; + aOpenArgument.OpeningFlags = { { u"KeepAlive"_ustr, uno::Any(false) } }; ucb::Command aCommand; aCommand.Name = "open"; @@ -499,10 +499,10 @@ UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode uno::Reference< xml::dom::XElement > xElement(rxNode, uno::UNO_QUERY_THROW); // load the document referenced in 'src' attribute .. - if( xElement->hasAttribute( "src" ) ) + if( xElement->hasAttribute( u"src"_ustr ) ) { uno::Reference< xml::dom::XDocument > xUpdateXML = - m_xDocumentBuilder->parse(load(xElement->getAttribute( "src" ))); + m_xDocumentBuilder->parse(load(xElement->getAttribute( u"src"_ustr ))); OSL_ASSERT( xUpdateXML.is() ); @@ -716,14 +716,14 @@ UpdateInformationProvider::getInteractionHandler() OUString SAL_CALL UpdateInformationProvider::getImplementationName() { - return "vnd.sun.UpdateInformationProvider"; + return u"vnd.sun.UpdateInformationProvider"_ustr; } uno::Sequence< OUString > SAL_CALL UpdateInformationProvider::getSupportedServiceNames() { - return { "com.sun.star.deployment.UpdateInformationProvider" }; + return { u"com.sun.star.deployment.UpdateInformationProvider"_ustr }; } sal_Bool SAL_CALL @@ -746,7 +746,7 @@ extensions_update_UpdateInformationProvider_get_implementation( uno::Reference< xml::xpath::XXPathAPI > xXPath = xml::xpath::XPathAPI::create( xContext ); - xXPath->registerNS( "atom", "http://www.w3.org/2005/Atom" ); + xXPath->registerNS( u"atom"_ustr, u"http://www.w3.org/2005/Atom"_ustr ); return cppu::acquire( new UpdateInformationProvider(xContext, xUniversalContentBroker, xDocumentBuilder, xXPath)); diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 492cb92669ab..2bd7d08ea08e 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -109,13 +109,13 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont OUString SAL_CALL UpdateCheckUI::getImplementationName() { - return "vnd.sun.UpdateCheckUI"; + return u"vnd.sun.UpdateCheckUI"_ustr; } uno::Sequence< OUString > SAL_CALL UpdateCheckUI::getSupportedServiceNames() { - return { "com.sun.star.setup.UpdateCheckUI" }; + return { u"com.sun.star.setup.UpdateCheckUI"_ustr }; } sal_Bool SAL_CALL @@ -134,12 +134,12 @@ Image UpdateCheckUI::GetBubbleImage( OUString const &rURL ) if( !xContext.is() ) throw uno::RuntimeException( - "UpdateCheckUI: unable to obtain service manager from component context" ); + u"UpdateCheckUI: unable to obtain service manager from component context"_ustr ); try { uno::Reference< graphic::XGraphicProvider > xGraphProvider(graphic::GraphicProvider::create(xContext)); - uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue("URL", + uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue(u"URL"_ustr, rURL) }; uno::Reference< graphic::XGraphic > xGraphic = xGraphProvider->queryGraphic( aMediaProps ); if ( xGraphic.is() ) @@ -153,7 +153,7 @@ Image UpdateCheckUI::GetBubbleImage( OUString const &rURL ) } if ( aImage.GetSizePixel().Width() == 0 ) - aImage = Image(StockImage::Yes, SV_RESID_BITMAP_INFOBOX); + aImage = Image(StockImage::Yes, u"" SV_RESID_BITMAP_INFOBOX ""_ustr); return aImage; } |