diff options
Diffstat (limited to 'scripting/source/provider')
-rw-r--r-- | scripting/source/provider/ActiveMSPList.cxx | 8 | ||||
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 12 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 54 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProviderFactory.cxx | 4 | ||||
-rw-r--r-- | scripting/source/provider/ProviderCache.cxx | 2 | ||||
-rw-r--r-- | scripting/source/provider/URIHelper.cxx | 12 |
6 files changed, 46 insertions, 46 deletions
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx index 8ff88be99512..a53aa9a73478 100644 --- a/scripting/source/provider/ActiveMSPList.cxx +++ b/scripting/source/provider/ActiveMSPList.cxx @@ -52,7 +52,7 @@ ActiveMSPList::createNewMSP( const uno::Any& context ) Reference< provider::XScriptProvider > msp( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.script.provider.MasterScriptProvider", args, m_xContext ), UNO_QUERY ); + u"com.sun.star.script.provider.MasterScriptProvider"_ustr, args, m_xContext ), UNO_QUERY ); return msp; } @@ -128,8 +128,8 @@ Reference< provider::XScriptProvider > if ( !xScripts.is() ) { throw lang::IllegalArgumentException( - "Failed to create MasterScriptProvider for ScriptInvocationContext: " - "Component supporting XEmbeddScripts interface not found.", + u"Failed to create MasterScriptProvider for ScriptInvocationContext: " + "Component supporting XEmbeddScripts interface not found."_ustr, nullptr, 1 ); } @@ -272,7 +272,7 @@ void ActiveMSPList::createNonDocMSPs() { // do creation of user and share MSPs here - OUString serviceName("com.sun.star.script.provider.MasterScriptProvider"); + OUString serviceName(u"com.sun.star.script.provider.MasterScriptProvider"_ustr); Sequence< Any > args{ Any(userDirString) }; // should check if provider reference is valid diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 3ea45aeecd7e..003cb999f520 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -266,8 +266,8 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen { xFac = provider::theMasterScriptProviderFactory::get( xCtx ); - locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( OUString("user") ) ), UNO_QUERY_THROW ); - locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( OUString("share") ) ), UNO_QUERY_THROW ); + locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( u"user"_ustr ) ), UNO_QUERY_THROW ); + locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( u"share"_ustr ) ), UNO_QUERY_THROW ); } // TODO proper exception handling, should throw catch( const Exception& ) @@ -545,7 +545,7 @@ public: virtual OUString SAL_CALL getName() override { - return "Root"; + return u"Root"_ustr; } virtual Sequence< Reference< browse::XBrowseNode > > SAL_CALL @@ -607,7 +607,7 @@ BrowseNodeFactoryImpl::createView( sal_Int16 viewType ) case browse::BrowseNodeFactoryViewTypes::MACROORGANIZER: return getOrganizerHierarchy(); default: - throw RuntimeException( "Unknown view type" ); + throw RuntimeException( u"Unknown view type"_ustr ); } } @@ -624,13 +624,13 @@ BrowseNodeFactoryImpl::getOrganizerHierarchy() const OUString SAL_CALL BrowseNodeFactoryImpl::getImplementationName() { - return "com.sun.star.script.browse.BrowseNodeFactory"; + return u"com.sun.star.script.browse.BrowseNodeFactory"_ustr; } Sequence< OUString > SAL_CALL BrowseNodeFactoryImpl::getSupportedServiceNames() { - return { "com.sun.star.script.browse.BrowseNodeFactory" }; + return { u"com.sun.star.script.browse.BrowseNodeFactory"_ustr }; } sal_Bool BrowseNodeFactoryImpl::supportsService(OUString const & serviceName ) diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 66fc58db78bd..a6350846e20d 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -90,7 +90,7 @@ void SAL_CALL MasterScriptProvider::initialize( const Sequence < Any >& args ) if ( len > 1 ) { throw RuntimeException( - "MasterScriptProvider::initialize: invalid number of arguments" ); + u"MasterScriptProvider::initialize: invalid number of arguments"_ustr ); } Sequence< Any > invokeArgs( len ); @@ -128,7 +128,7 @@ void SAL_CALL MasterScriptProvider::initialize( const Sequence < Any >& args ) if ( !xScripts.is() ) { throw lang::IllegalArgumentException( - "The given document does not support embedding scripts into it, and cannot be associated with such a document.", + u"The given document does not support embedding scripts into it, and cannot be associated with such a document."_ustr, *this, 1 ); @@ -158,7 +158,7 @@ void SAL_CALL MasterScriptProvider::initialize( const Sequence < Any >& args ) pinvokeArgs[ 0 ] <<= m_sCtxString; } - OUString pkgSpec = "uno_packages"; + OUString pkgSpec = u"uno_packages"_ustr; sal_Int32 indexOfPkgSpec = m_sCtxString.lastIndexOf( pkgSpec ); // if context string ends with "uno_packages" @@ -216,8 +216,8 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) if ( !m_bIsValid ) { throw provider::ScriptFrameworkErrorException( - "MasterScriptProvider not initialised", Reference< XInterface >(), - scriptURI, "", + u"MasterScriptProvider not initialised"_ustr, Reference< XInterface >(), + scriptURI, u""_ustr, provider::ScriptFrameworkErrorType::UNKNOWN ); } @@ -234,12 +234,12 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) throw provider::ScriptFrameworkErrorException( "Incorrect format for Script URI: " + scriptURI, Reference< XInterface >(), - scriptURI, "", + scriptURI, u""_ustr, provider::ScriptFrameworkErrorType::UNKNOWN ); } - OUString langKey("language"); - OUString locKey("location"); + OUString langKey(u"language"_ustr); + OUString locKey(u"location"_ustr); if ( !sfUri->hasParameter( langKey ) || !sfUri->hasParameter( locKey ) || @@ -248,7 +248,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) throw provider::ScriptFrameworkErrorException( "Incorrect format for Script URI: " + scriptURI, Reference< XInterface >(), - scriptURI, "", + scriptURI, u""_ustr, provider::ScriptFrameworkErrorType::UNKNOWN ); } @@ -257,7 +257,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) // if script us located in uno pkg sal_Int32 index = -1; - OUString pkgTag(":uno_packages"); + OUString pkgTag(u":uno_packages"_ustr); // for languages other than basic, scripts located in uno packages // are merged into the user/share location context. // For other languages the location attribute in script url has the form @@ -295,7 +295,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) if ( !providerCache() ) { throw provider::ScriptFrameworkErrorException( - "No LanguageProviders detected", + u"No LanguageProviders detected"_ustr, Reference< XInterface >(), sfUri->getName(), language, provider::ScriptFrameworkErrorType::NOTSUPPORTED ); @@ -339,7 +339,7 @@ MasterScriptProvider::providerCache() std::scoped_lock aGuard( m_mutex ); if ( !m_pPCache ) { - Sequence<OUString> denylist { "com.sun.star.script.provider.ScriptProviderForBasic" }; + Sequence<OUString> denylist { u"com.sun.star.script.provider.ScriptProviderForBasic"_ustr }; if ( !m_bIsPkgMSP ) { @@ -492,7 +492,7 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement ) { if ( !m_xMSPPkg.is() ) { - throw RuntimeException( "PackageMasterScriptProvider is unitialised" ); + throw RuntimeException( u"PackageMasterScriptProvider is unitialised"_ustr ); } Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY_THROW ); @@ -503,12 +503,12 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement ) Reference< deployment::XPackage > xPkg( aElement, UNO_QUERY ); if ( !xPkg.is() ) { - throw lang::IllegalArgumentException( "Couldn't convert to XPackage", + throw lang::IllegalArgumentException( u"Couldn't convert to XPackage"_ustr, Reference < XInterface > (), 2 ); } if ( aName.isEmpty() ) { - throw lang::IllegalArgumentException( "Name not set!!", + throw lang::IllegalArgumentException( u"Name not set!!"_ustr, Reference < XInterface > (), 1 ); } // TODO for library package parse the language, for the moment will try @@ -537,7 +537,7 @@ MasterScriptProvider::removeByName( const OUString& Name ) { if ( !m_xMSPPkg.is() ) { - throw RuntimeException( "PackageMasterScriptProvider is unitialised" ); + throw RuntimeException( u"PackageMasterScriptProvider is unitialised"_ustr ); } Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY_THROW ); @@ -547,7 +547,7 @@ MasterScriptProvider::removeByName( const OUString& Name ) { if ( Name.isEmpty() ) { - throw lang::IllegalArgumentException( "Name not set!!", + throw lang::IllegalArgumentException( u"Name not set!!"_ustr, Reference < XInterface > (), 1 ); } // TODO for Script library package url parse the language, @@ -573,14 +573,14 @@ void SAL_CALL MasterScriptProvider::replaceByName( const OUString& /*aName*/, const Any& /*aElement*/ ) { // TODO needs implementing - throw RuntimeException( "replaceByName not implemented!!!!" ); + throw RuntimeException( u"replaceByName not implemented!!!!"_ustr ); } Any SAL_CALL MasterScriptProvider::getByName( const OUString& /*aName*/ ) { // TODO needs to be implemented - throw RuntimeException( "getByName not implemented!!!!" ); + throw RuntimeException( u"getByName not implemented!!!!"_ustr ); } sal_Bool SAL_CALL @@ -598,7 +598,7 @@ MasterScriptProvider::hasByName( const OUString& aName ) // have a PackageProvider else if (!m_xModel.is()) { - throw RuntimeException( "PackageMasterScriptProvider is unitialised" ); + throw RuntimeException( u"PackageMasterScriptProvider is unitialised"_ustr ); } } @@ -606,7 +606,7 @@ MasterScriptProvider::hasByName( const OUString& aName ) { if ( aName.isEmpty() ) { - throw lang::IllegalArgumentException( "Name not set!!", + throw lang::IllegalArgumentException( u"Name not set!!"_ustr, Reference < XInterface > (), 1 ); } // TODO for Script library package url parse the language, @@ -626,7 +626,7 @@ Sequence< OUString > SAL_CALL MasterScriptProvider::getElementNames( ) { // TODO needs implementing - throw RuntimeException( "getElementNames not implemented!!!!" ); + throw RuntimeException( u"getElementNames not implemented!!!!"_ustr ); } Type SAL_CALL @@ -640,13 +640,13 @@ MasterScriptProvider::getElementType( ) sal_Bool SAL_CALL MasterScriptProvider::hasElements( ) { // TODO needs implementing - throw RuntimeException( "hasElements not implemented!!!!" ); + throw RuntimeException( u"hasElements not implemented!!!!"_ustr ); } OUString SAL_CALL MasterScriptProvider::getImplementationName( ) { - return "com.sun.star.script.provider.MasterScriptProvider"; + return u"com.sun.star.script.provider.MasterScriptProvider"_ustr; } sal_Bool SAL_CALL MasterScriptProvider::supportsService( const OUString& serviceName ) @@ -658,9 +658,9 @@ sal_Bool SAL_CALL MasterScriptProvider::supportsService( const OUString& service Sequence< OUString > SAL_CALL MasterScriptProvider::getSupportedServiceNames( ) { return { - "com.sun.star.script.provider.MasterScriptProvider", - "com.sun.star.script.browse.BrowseNode", - "com.sun.star.script.provider.ScriptProvider" }; + u"com.sun.star.script.provider.MasterScriptProvider"_ustr, + u"com.sun.star.script.browse.BrowseNode"_ustr, + u"com.sun.star.script.provider.ScriptProvider"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/scripting/source/provider/MasterScriptProviderFactory.cxx b/scripting/source/provider/MasterScriptProviderFactory.cxx index acdb8f8da0ff..20050e116e09 100644 --- a/scripting/source/provider/MasterScriptProviderFactory.cxx +++ b/scripting/source/provider/MasterScriptProviderFactory.cxx @@ -59,12 +59,12 @@ MasterScriptProviderFactory::getActiveMSPList() const OUString SAL_CALL MasterScriptProviderFactory::getImplementationName() { - return "com.sun.star.script.provider.MasterScriptProviderFactory"; + return u"com.sun.star.script.provider.MasterScriptProviderFactory"_ustr; } Sequence< OUString > SAL_CALL MasterScriptProviderFactory::getSupportedServiceNames() { - return { "com.sun.star.script.provider.MasterScriptProviderFactory" }; + return { u"com.sun.star.script.provider.MasterScriptProviderFactory"_ustr }; } sal_Bool MasterScriptProviderFactory::supportsService( diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 7b240fe590fd..f679df5d10e5 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -137,7 +137,7 @@ ProviderCache::populateCache() try { Reference< container::XContentEnumerationAccess > xEnumAccess( m_xMgr, UNO_QUERY_THROW ); - Reference< container::XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( "com.sun.star.script.provider.LanguageScriptProvider" ); + Reference< container::XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( u"com.sun.star.script.provider.LanguageScriptProvider"_ustr ); while ( xEnum->hasMoreElements() ) { diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index 4b122da8b1d7..a335abbaad3d 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -80,19 +80,19 @@ ScriptingFrameworkURIHelper::initialize( args[0].getValueType() != ::cppu::UnoType<OUString>::get() || args[1].getValueType() != ::cppu::UnoType<OUString>::get() ) { - throw uno::RuntimeException( "ScriptingFrameworkURIHelper got invalid argument list" ); + throw uno::RuntimeException( u"ScriptingFrameworkURIHelper got invalid argument list"_ustr ); } if ( !(args[0] >>= m_sLanguage) || !(args[1] >>= m_sLocation) ) { - throw uno::RuntimeException( "ScriptingFrameworkURIHelper error parsing args" ); + throw uno::RuntimeException( u"ScriptingFrameworkURIHelper error parsing args"_ustr ); } SCRIPTS_PART = "/Scripts/" + m_sLanguage.toAsciiLowerCase(); if ( !initBaseURI() ) { - throw uno::RuntimeException( "ScriptingFrameworkURIHelper cannot find script directory" ); + throw uno::RuntimeException( u"ScriptingFrameworkURIHelper cannot find script directory"_ustr ); } } @@ -211,7 +211,7 @@ ScriptingFrameworkURIHelper::getStorageURI(const OUString& rScriptURI) catch ( uno::Exception& ) { throw lang::IllegalArgumentException( - "Script URI not valid", + u"Script URI not valid"_ustr, uno::Reference< uno::XInterface >(), 1 ); } @@ -228,7 +228,7 @@ OUString SAL_CALL ScriptingFrameworkURIHelper::getImplementationName() { return - "com.sun.star.script.provider.ScriptURIHelper"; + u"com.sun.star.script.provider.ScriptURIHelper"_ustr; } sal_Bool SAL_CALL @@ -240,7 +240,7 @@ ScriptingFrameworkURIHelper::supportsService( const OUString& serviceName ) uno::Sequence< OUString > SAL_CALL ScriptingFrameworkURIHelper::getSupportedServiceNames() { - return { "com.sun.star.script.provider.ScriptURIHelper" }; + return { u"com.sun.star.script.provider.ScriptURIHelper"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* |