diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 16:01:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 18:15:14 +0200 |
commit | f49d8ce4614bb12a6c9f0c6e83812aa69b9b2454 (patch) | |
tree | 880bdd2287897eda128549083a1614712e06542e /extensions/source/update/check | |
parent | c920881f399a2f679c2ed45f86b93468aa62a5d3 (diff) |
loplugin:ostr in extensions
Change-Id: I32f74fe67e8eb0b6b12ee60405c3d99932b75182
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167284
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/update/check')
-rw-r--r-- | extensions/source/update/check/download.cxx | 16 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 16 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheckconfig.cxx | 48 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheckjob.cxx | 4 | ||||
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 236 | ||||
-rw-r--r-- | extensions/source/update/check/updateprotocol.cxx | 26 |
6 files changed, 173 insertions, 173 deletions
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& ) |