diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /stoc/source | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'stoc/source')
31 files changed, 312 insertions, 360 deletions
diff --git a/stoc/source/corereflection/crarray.cxx b/stoc/source/corereflection/crarray.cxx index 8f8ccb5e7212..4bc0eb53acba 100644 --- a/stoc/source/corereflection/crarray.cxx +++ b/stoc/source/corereflection/crarray.cxx @@ -90,13 +90,13 @@ void ArrayIdlClassImpl::realloc( Any & rArray, sal_Int32 nLen ) if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no sequence given!") ), + OUString("no sequence given!"), (XWeak *)(OWeakObject *)this, 0 ); } if (nLen < 0) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal length given!") ), + OUString("illegal length given!"), (XWeak *)(OWeakObject *)this, 1 ); } @@ -115,7 +115,7 @@ sal_Int32 ArrayIdlClassImpl::getLen( const Any & rArray ) if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no sequence given!") ), + OUString("no sequence given!"), (XWeak *)(OWeakObject *)this, 0 ); } @@ -129,7 +129,7 @@ Any ArrayIdlClassImpl::get( const Any & rArray, sal_Int32 nIndex ) if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no sequence given!") ), + OUString("no sequence given!"), (XWeak *)(OWeakObject *)this, 0 ); } @@ -137,7 +137,7 @@ Any ArrayIdlClassImpl::get( const Any & rArray, sal_Int32 nIndex ) if (pSeq->nElements <= nIndex) { throw ArrayIndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal index given!") ), + OUString("illegal index given!"), (XWeak *)(OWeakObject *)this ); } @@ -160,7 +160,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal if (eTC != TypeClass_SEQUENCE && eTC != TypeClass_ARRAY) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no sequence given!") ), + OUString("no sequence given!"), (XWeak *)(OWeakObject *)this, 0 ); } @@ -168,7 +168,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal if (pSeq->nElements <= nIndex) { throw ArrayIndexOutOfBoundsException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal index given!") ), + OUString("illegal index given!"), (XWeak *)(OWeakObject *)this ); } @@ -188,7 +188,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal { TYPELIB_DANGER_RELEASE( pElemTypeDescr ); throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("sequence element is not assignable by given value!") ), + OUString("sequence element is not assignable by given value!"), (XWeak *)(OWeakObject *)this, 2 ); } TYPELIB_DANGER_RELEASE( pElemTypeDescr ); diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index 6ee7ee009024..5835840b5f41 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -203,7 +203,7 @@ Any IdlCompFieldImpl::get( const Any & rObj ) TYPELIB_DANGER_RELEASE( pObjTD ); } throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal object given!") ), + OUString("illegal object given!"), (XWeak *)(OWeakObject *)this, 0 ); } //__________________________________________________________________________________________________ @@ -232,14 +232,14 @@ void IdlCompFieldImpl::set( const Any & rObj, const Any & rValue ) else { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal value given!") ), + OUString("illegal value given!"), (XWeak *)(OWeakObject *)this, 1 ); } } TYPELIB_DANGER_RELEASE( pObjTD ); } throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal object given!") ), + OUString("illegal object given!"), (XWeak *)(OWeakObject *)this, 0 ); } @@ -269,14 +269,14 @@ void IdlCompFieldImpl::set( Any & rObj, const Any & rValue ) else { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal value given!") ), + OUString("illegal value given!"), (XWeak *)(OWeakObject *)this, 1 ); } } TYPELIB_DANGER_RELEASE( pObjTD ); } throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal object given!") ), + OUString("illegal object given!"), (XWeak *)(OWeakObject *)this, 0 ); } diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index a51f58a6b35c..5015c69659fa 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -69,8 +69,8 @@ IdlReflectionServiceImpl::IdlReflectionServiceImpl( , _aElements( CACHE_SIZE ) { g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - xContext->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM( - "/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) ) >>= _xTDMgr; + xContext->getValueByName( OUString( + "/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) >>= _xTDMgr; OSL_ENSURE( _xTDMgr.is(), "### cannot get singleton \"TypeDescriptionManager\" from context!" ); } //__________________________________________________________________________________________________ @@ -399,7 +399,7 @@ const Mapping & IdlReflectionServiceImpl::getCpp2Uno() if (! _aCpp2Uno.is()) { throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get c++ to uno mapping!") ), + OUString("cannot get c++ to uno mapping!"), (XWeak *)(OWeakObject *)this ); } } @@ -422,7 +422,7 @@ const Mapping & IdlReflectionServiceImpl::getUno2Cpp() if (! _aUno2Cpp.is()) { throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get uno to c++ mapping!") ), + OUString("cannot get uno to c++ mapping!"), (XWeak *)(OWeakObject *)this ); } } @@ -439,7 +439,7 @@ uno_Interface * IdlReflectionServiceImpl::mapToUno( return (uno_Interface *)getCpp2Uno().mapInterface( xObj.get(), pTo ); throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal object given!") ), + OUString("illegal object given!"), (XWeak *)(OWeakObject *)this ); } diff --git a/stoc/source/corereflection/crenum.cxx b/stoc/source/corereflection/crenum.cxx index e37e35028034..a2040639d5e7 100644 --- a/stoc/source/corereflection/crenum.cxx +++ b/stoc/source/corereflection/crenum.cxx @@ -160,7 +160,7 @@ void IdlEnumFieldImpl::set( const Any &, const Any & ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException) { throw IllegalAccessException( - OUString( RTL_CONSTASCII_USTRINGPARAM("enum field is constant!") ), + OUString("enum field is constant!"), (XWeak *)(OWeakObject *)this ); } //__________________________________________________________________________________________________ @@ -168,7 +168,7 @@ void IdlEnumFieldImpl::set( Any &, const Any & ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException) { throw IllegalAccessException( - OUString( RTL_CONSTASCII_USTRINGPARAM("enum field is constant!") ), + OUString("enum field is constant!"), (XWeak *)(OWeakObject *)this ); } diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 99db43221fdf..12d6a6bd2b25 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -206,7 +206,7 @@ Any IdlAttributeFieldImpl::get( const Any & rObj ) return aRet; } throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal object given!") ), + OUString("illegal object given!"), (XWeak *)(OWeakObject *)this, 0 ); } //__________________________________________________________________________________________________ @@ -216,7 +216,7 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue ) if (getAttributeTypeDescr()->bReadOnly) { throw IllegalAccessException( - OUString( RTL_CONSTASCII_USTRINGPARAM("cannot set readonly attribute!") ), + OUString("cannot set readonly attribute!"), (XWeak *)(OWeakObject *)this ); } @@ -292,11 +292,11 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue ) (*pUnoI->release)( pUnoI ); throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal value given!") ), + OUString("illegal value given!"), *(const Reference< XInterface > *)rObj.getValue(), 1 ); } throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal destination object given!") ), + OUString("illegal destination object given!"), (XWeak *)(OWeakObject *)this, 0 ); } //__________________________________________________________________________________________________ @@ -625,7 +625,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & { (*pUnoI->release)( pUnoI ); throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("arguments len differ!") ), + OUString("arguments len differ!"), *(const Reference< XInterface > *)rObj.getValue(), 1 ); } @@ -699,7 +699,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & if (! bAssign) { IllegalArgumentException aExc( - OUString( RTL_CONSTASCII_USTRINGPARAM("cannot coerce argument type during corereflection call!") ), + OUString("cannot coerce argument type during corereflection call!"), *(const Reference< XInterface > *)rObj.getValue(), (sal_Int16)nPos ); // cleanup @@ -738,7 +738,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & InvocationTargetException aExc; aExc.Context = *(const Reference< XInterface > *)rObj.getValue(); - aExc.Message = OUString( RTL_CONSTASCII_USTRINGPARAM("exception occurred during invocation!") ); + aExc.Message = OUString("exception occurred during invocation!"); uno_any_destruct( &aExc.TargetException, reinterpret_cast< uno_ReleaseFunc >(cpp_release) ); @@ -776,7 +776,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & return aRet; } throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal destination object given!") ), + OUString("illegal destination object given!"), (XWeak *)(OWeakObject *)this, 0 ); } diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 07b4129726cb..568bc0560e7d 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -642,7 +642,7 @@ static void prepareUserKeys(const Reference < XSimpleRegistry >& xDest, OUString linkTarget = xKey->getLinkTarget(relativKey); OUString linkName(xKey->getKeyName().copy(xUnoKey->getKeyName().getLength())); - linkName = linkName + OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + relativKey; + linkName = linkName + OUString("/") + relativKey; if (bRegister) { diff --git a/stoc/source/implementationregistration/mergekeys.cxx b/stoc/source/implementationregistration/mergekeys.cxx index 489a27b4b37c..830abdf32280 100644 --- a/stoc/source/implementationregistration/mergekeys.cxx +++ b/stoc/source/implementationregistration/mergekeys.cxx @@ -155,8 +155,8 @@ void mergeKeys( if (xDest->isReadOnly()) { throw registry::InvalidRegistryException( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "destination registry is read-only! cannot merge!") ), + OUString( + "destination registry is read-only! cannot merge!"), Reference< XInterface >() ); } diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 5948fc621942..1fc00707d356 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -1661,7 +1661,7 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX mpTypeProviderCache = NULL; // Spezielle Klassen holen -// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ); +// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( ::rtl::OUString("com.sun.star.reflection.CoreReflection") ); // if( xServiceIface.is() ) // mxCoreReflection = Reference< XIdlReflection >::query( xServiceIface ); Reference< XPropertySet > xProps( rXSMgr, UNO_QUERY ); @@ -1670,30 +1670,30 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX { Reference< XComponentContext > xContext; xProps->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext; + ::rtl::OUString("DefaultContext") ) >>= xContext; OSL_ASSERT( xContext.is() ); if (xContext.is()) { xContext->getValueByName( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection") ) ) >>= mxCoreReflection; + ::rtl::OUString("/singletons/com.sun.star.reflection.theCoreReflection") ) >>= mxCoreReflection; OSL_ENSURE( mxCoreReflection.is(), "### CoreReflection singleton not accessible!?" ); } } if (! mxCoreReflection.is()) { throw DeploymentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible") ), + ::rtl::OUString("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible"), Reference< XInterface >() ); } - mxElementAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XElementAccess")) ); - mxNameContainerClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XNameContainer")) ); - mxNameAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XNameAccess")) ); - mxIndexContainerClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XIndexContainer")) ); - mxIndexAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XIndexAccess")) ); - mxEnumerationAccessClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.XEnumerationAccess")) ); - mxInterfaceClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")) ); - mxAggregationClass = mxCoreReflection->forName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XAggregation")) ); + mxElementAccessClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.container.XElementAccess") ); + mxNameContainerClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.container.XNameContainer") ); + mxNameAccessClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.container.XNameAccess") ); + mxIndexContainerClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.container.XIndexContainer") ); + mxIndexAccessClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.container.XIndexAccess") ); + mxEnumerationAccessClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.container.XEnumerationAccess") ); + mxInterfaceClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.uno.XInterface") ); + mxAggregationClass = mxCoreReflection->forName( ::rtl::OUString("com.sun.star.uno.XAggregation") ); mbDisposed = sal_False; } @@ -1888,7 +1888,7 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS ::rtl::OUString sOWName( pTD->pTypeName ); if( !xRefl.is() ) { - xRefl = Reference< XIdlReflection >( xMgr->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ), UNO_QUERY ); + xRefl = Reference< XIdlReflection >( xMgr->createInstance( ::rtl::OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); } xRetClass = xRefl->forName( sOWName ); @@ -2318,7 +2318,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else { - if( aMethName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("queryInterface")) ) + if( aMethName != ::rtl::OUString("queryInterface") ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index f1d8c2b3654e..fd2d75e29123 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -531,7 +531,7 @@ Any Invocation_Impl::getValue( const OUString& PropertyName ) } throw UnknownPropertyException( - OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get value ") ) + PropertyName, + OUString("cannot get value ") + PropertyName, Reference< XInterface >() ); } @@ -560,7 +560,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value ) PropertyName, xTypeConverter->convertTo( Value, aProp.Type ) ); else throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no type converter service!") ), + OUString("no type converter service!"), Reference< XInterface >() ); } // NameContainer @@ -575,7 +575,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value ) aConv = xTypeConverter->convertTo( Value, _xNameContainer->getElementType() ); else throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no type converter service!") ), + OUString("no type converter service!"), Reference< XInterface >() ); // bei Vorhandensein ersetzen, ansonsten einfuegen @@ -586,7 +586,7 @@ void Invocation_Impl::setValue( const OUString& PropertyName, const Any& Value ) } else throw UnknownPropertyException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no introspection nor name container!") ), + OUString("no introspection nor name container!"), Reference< XInterface >() ); } catch (UnknownPropertyException &) @@ -635,7 +635,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>& if (nFParamsLen != InParams.getLength()) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("incorrect number of parameters passed invoking function ") ) + FunctionName, + OUString("incorrect number of parameters passed invoking function ") + FunctionName, (OWeakObject *) this, (sal_Int16) 1 ); } @@ -674,7 +674,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>& { CannotConvertException aExc; aExc.Context = *this; - aExc.Message = OUString( RTL_CONSTASCII_USTRINGPARAM("invocation type mismatch!") ); + aExc.Message = OUString("invocation type mismatch!"); throw aExc; } } @@ -714,7 +714,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>& RuntimeException aExc; aExc.Context = *this; - aExc.Message = OUString( RTL_CONSTASCII_USTRINGPARAM("invocation lacking of introspection access!") ); + aExc.Message = OUString("invocation lacking of introspection access!"); throw aExc; } @@ -1103,24 +1103,23 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); xTypeConverter = Reference<XTypeConverter>( mxSMgr->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")), + OUString("com.sun.star.script.Converter"), xCtx ), UNO_QUERY ); xIntrospection = Introspection::create(xCtx); mxCtx->getValueByName( - OUString( - RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection")) ) + OUString("/singletons/com.sun.star.reflection.theCoreReflection") ) >>= xCoreReflection; OSL_ENSURE( xCoreReflection.is(), "### CoreReflection singleton not accessible!?" ); if (! xCoreReflection.is()) { throw DeploymentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible") ), + OUString("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible"), Reference< XInterface >() ); } // xCoreReflection = Reference<XIdlReflection>( // mxSMgr->createInstanceWithContext( -// OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")), +// OUString("com.sun.star.reflection.CoreReflection"), // xCtx), // UNO_QUERY); } @@ -1156,7 +1155,7 @@ Sequence< OUString > InvocationService::getSupportedServiceNames(void) throw( Ru //-------------------------------------------------------------------------------------------------- Reference<XInterface> InvocationService::createInstance(void) throw( Exception, RuntimeException ) { - //TODO:throw( Exception(OUString( RTL_CONSTASCII_USTRINGPARAM("no default construction of invocation adapter possible!")), *this) ); + //TODO:throw( Exception(OUString("no default construction of invocation adapter possible!"), *this) ); return Reference<XInterface>(); // dummy } @@ -1172,7 +1171,7 @@ Reference<XInterface> InvocationService::createInstanceWithArguments( } else { - //TODO:throw( Exception(OUString( RTL_CONSTASCII_USTRINGPARAM("no default construction of invocation adapter possible!")), *this) ); + //TODO:throw( Exception(OUString("no default construction of invocation adapter possible!"), *this) ); return Reference<XInterface>(); } } diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 1472dd604e2d..92b04fba70ec 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -716,8 +716,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) // type converter Reference< script::XTypeConverter > xConverter( xContext->getServiceManager()->createInstanceWithContext( - OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter") ), + OUString("com.sun.star.script.Converter"), xContext ), UNO_QUERY_THROW ); m_pConverter = (uno_Interface *)m_aCpp2Uno.mapInterface( diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index 38029b181356..352782ede2e8 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -70,17 +70,14 @@ static Mutex & getInitMutex(); static Sequence< OUString > loader_getSupportedServiceNames() { Sequence< OUString > seqNames(2); - seqNames.getArray()[0] = OUString( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.Java") ); - seqNames.getArray()[1] = OUString( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.Java2") ); + seqNames.getArray()[0] = OUString( "com.sun.star.loader.Java"); + seqNames.getArray()[1] = OUString( "com.sun.star.loader.Java2"); return seqNames; } static OUString loader_getImplementationName() { - return OUString( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.JavaComponentLoader" ) ); + return OUString( "com.sun.star.comp.stoc.JavaComponentLoader" ); } class JavaComponentLoader : public WeakImplHelper2<XImplementationLoader, XServiceInfo> @@ -185,40 +182,40 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL // instantiate the java JavaLoader jclass jcClassLoader = pJNIEnv->FindClass("java/lang/ClassLoader"); if(pJNIEnv->ExceptionOccurred()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - could not find class java/lang/ClassLoader")), + throw RuntimeException(OUString( + "javaloader error - could not find class java/lang/ClassLoader"), css::uno::Reference<XInterface>()); jmethodID jmLoadClass = pJNIEnv->GetMethodID( jcClassLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;"); if(pJNIEnv->ExceptionOccurred()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - could not find method java/lang/ClassLoader.loadClass")), + throw RuntimeException(OUString( + "javaloader error - could not find method java/lang/ClassLoader.loadClass"), css::uno::Reference<XInterface>()); jvalue arg; arg.l = pJNIEnv->NewStringUTF( "com.sun.star.comp.loader.JavaLoader"); if(pJNIEnv->ExceptionOccurred()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - could not create string")), + throw RuntimeException(OUString( + "javaloader error - could not create string"), css::uno::Reference<XInterface>()); jclass jcJavaLoader = static_cast< jclass >( pJNIEnv->CallObjectMethodA( static_cast< jobject >(xVirtualMachine->getClassLoader()), jmLoadClass, &arg)); if(pJNIEnv->ExceptionOccurred()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - could not find class com/sun/star/comp/loader/JavaLoader")), + throw RuntimeException(OUString( + "javaloader error - could not find class com/sun/star/comp/loader/JavaLoader"), css::uno::Reference<XInterface>()); jmethodID jmJavaLoader_init = pJNIEnv->GetMethodID(jcJavaLoader, "<init>", "()V"); if(pJNIEnv->ExceptionOccurred()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed")), + throw RuntimeException(OUString( + "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed"), css::uno::Reference<XInterface>()); jobject joJavaLoader = pJNIEnv->NewObject(jcJavaLoader, jmJavaLoader_init); if(pJNIEnv->ExceptionOccurred()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed")), + throw RuntimeException(OUString( + "javaloader error - instantiation of com.sun.star.comp.loader.JavaLoader failed"), css::uno::Reference<XInterface>()); // map the java JavaLoader to this environment @@ -226,20 +223,20 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL uno_getEnvironment(&pJava_environment, sJava.pData, xVirtualMachine.get()); if(!pJava_environment) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - no Java environment available")), css::uno::Reference<XInterface>()); + throw RuntimeException(OUString( + "javaloader error - no Java environment available"), css::uno::Reference<XInterface>()); // why is there no convinient contructor? OUString sCppu_current_lb_name(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME)); uno_getEnvironment(&pUno_environment, sCppu_current_lb_name.pData, NULL); if(!pUno_environment) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - no C++ environment available")), css::uno::Reference<XInterface>()); + throw RuntimeException(OUString( + "javaloader error - no C++ environment available"), css::uno::Reference<XInterface>()); Mapping java_curr(pJava_environment, pUno_environment); if(!java_curr.is()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - no mapping from java to C++ ")), css::uno::Reference<XInterface>()); + throw RuntimeException(OUString( + "javaloader error - no mapping from java to C++ "), css::uno::Reference<XInterface>()); // release java environment pJava_environment->release(pJava_environment); @@ -252,16 +249,16 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL getCppuType((css::uno::Reference<XImplementationLoader> *) 0). getDescription((typelib_TypeDescription **) & pType_XImplementationLoader); if(!pType_XImplementationLoader) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - no type information for XImplementationLoader")), + throw RuntimeException(OUString( + "javaloader error - no type information for XImplementationLoader"), css::uno::Reference<XInterface>()); m_javaLoader = css::uno::Reference<XImplementationLoader>(reinterpret_cast<XImplementationLoader *>( java_curr.mapInterface(joJavaLoader, pType_XImplementationLoader))); pJNIEnv->DeleteLocalRef( joJavaLoader ); if(!m_javaLoader.is()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - mapping of java XImplementationLoader to c++ failed")), + throw RuntimeException(OUString( + "javaloader error - mapping of java XImplementationLoader to c++ failed"), css::uno::Reference<XInterface>()); typelib_typedescription_release(reinterpret_cast<typelib_TypeDescription *>(pType_XImplementationLoader)); @@ -278,8 +275,8 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL // set the service manager at the javaloader css::uno::Reference<XInitialization> javaLoader_XInitialization(m_javaLoader, UNO_QUERY); if(!javaLoader_XInitialization.is()) - throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM( - "javaloader error - initialization of java javaloader failed, no XInitialization")), + throw RuntimeException(OUString( + "javaloader error - initialization of java javaloader failed, no XInitialization"), css::uno::Reference<XInterface>()); Any any; @@ -354,7 +351,7 @@ sal_Bool SAL_CALL JavaComponentLoader::writeRegistryInfo( return loader->writeRegistryInfo(xKey, blabla, rLibName); else throw CannotRegisterImplementationException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Could not create Java implementation loader")), NULL); + OUString("Could not create Java implementation loader"), NULL); } @@ -368,7 +365,7 @@ css::uno::Reference<XInterface> SAL_CALL JavaComponentLoader::activate( return loader->activate(rImplName, blabla, rLibName, xKey); else throw CannotActivateFactoryException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Could not create Java implementation loader")), NULL); + OUString("Could not create Java implementation loader"), NULL); } static Mutex & getInitMutex() diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 03811aba78a6..102605c072f1 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -210,8 +210,8 @@ bool SingletonFactory::m_bDisposed = false; rtl::OUString serviceGetImplementationName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.stoc.JavaVirtualMachine")); + return rtl::OUString( + "com.sun.star.comp.stoc.JavaVirtualMachine"); } css::uno::Sequence< rtl::OUString > serviceGetSupportedServiceNames() @@ -268,8 +268,7 @@ bool askForRetry(css::uno::Any const & rException) { css::uno::Reference< css::task::XInteractionHandler > xHandler; xContext->getValueByName(rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "java-vm.interaction-handler"))) + "java-vm.interaction-handler")) >>= xHandler; if (xHandler.is()) { @@ -289,30 +288,30 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw (css::uno::Exception) { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationRegistry")), + rtl::OUString("com.sun.star.configuration.ConfigurationRegistry"), xCtx ); - if(!xConfRegistry.is()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.cxx: couldn't get ConfigurationRegistry")), 0); + if(!xConfRegistry.is()) throw css::uno::RuntimeException(rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY); - if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.cxx: couldn't get ConfigurationRegistry")), 0); + if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException(rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); - xConfRegistry_simple->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Inet")), sal_True, sal_False); + xConfRegistry_simple->open(rtl::OUString("org.openoffice.Inet"), sal_True, sal_False); css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); // if ooInetProxyType is not 0 then read the settings - css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetProxyType"))); + css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetProxyType")); if( proxyEnable.is() && 0 != proxyEnable->getLongValue()) { // read ftp proxy name - css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetFTPProxyName"))); + css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetFTPProxyName")); if(ftpProxy_name.is() && !ftpProxy_name->getStringValue().isEmpty()) { - rtl::OUString ftpHost = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyHost=")); + rtl::OUString ftpHost = rtl::OUString("ftp.proxyHost="); ftpHost += ftpProxy_name->getStringValue(); // read ftp proxy port - css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetFTPProxyPort"))); + css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetFTPProxyPort")); if(ftpProxy_port.is() && ftpProxy_port->getLongValue()) { - rtl::OUString ftpPort = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyPort=")); + rtl::OUString ftpPort = rtl::OUString("ftp.proxyPort="); ftpPort += rtl::OUString::valueOf(ftpProxy_port->getLongValue()); pjvm->pushProp(ftpHost); @@ -321,15 +320,15 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read http proxy name - css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetHTTPProxyName"))); + css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPProxyName")); if(httpProxy_name.is() && !httpProxy_name->getStringValue().isEmpty()) { - rtl::OUString httpHost = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyHost=")); + rtl::OUString httpHost = rtl::OUString("http.proxyHost="); httpHost += httpProxy_name->getStringValue(); // read http proxy port - css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetHTTPProxyPort"))); + css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPProxyPort")); if(httpProxy_port.is() && httpProxy_port->getLongValue()) { - rtl::OUString httpPort = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyPort=")); + rtl::OUString httpPort = rtl::OUString("http.proxyPort="); httpPort += rtl::OUString::valueOf(httpProxy_port->getLongValue()); pjvm->pushProp(httpHost); @@ -338,15 +337,15 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read https proxy name - css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetHTTPSProxyName"))); + css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPSProxyName")); if(httpsProxy_name.is() && !httpsProxy_name->getStringValue().isEmpty()) { - rtl::OUString httpsHost = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyHost=")); + rtl::OUString httpsHost = rtl::OUString("https.proxyHost="); httpsHost += httpsProxy_name->getStringValue(); // read https proxy port - css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetHTTPSProxyPort"))); + css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPSProxyPort")); if(httpsProxy_port.is() && httpsProxy_port->getLongValue()) { - rtl::OUString httpsPort = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyPort=")); + rtl::OUString httpsPort = rtl::OUString("https.proxyPort="); httpsPort += rtl::OUString::valueOf(httpsProxy_port->getLongValue()); pjvm->pushProp(httpsHost); @@ -355,10 +354,10 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read nonProxyHosts - css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Settings/ooInetNoProxy"))); + css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetNoProxy")); if(nonProxies_name.is() && !nonProxies_name->getStringValue().isEmpty()) { - rtl::OUString httpNonProxyHosts = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.nonProxyHosts=")); - rtl::OUString ftpNonProxyHosts= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.nonProxyHosts=")); + rtl::OUString httpNonProxyHosts = rtl::OUString("http.nonProxyHosts="); + rtl::OUString ftpNonProxyHosts= rtl::OUString("ftp.nonProxyHosts="); rtl::OUString value= nonProxies_name->getStringValue(); // replace the separator ";" by "|" value= value.replace((sal_Unicode)';', (sal_Unicode)'|'); @@ -397,23 +396,23 @@ void getDefaultLocaleFromConfig( { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationRegistry")), xCtx ); + rtl::OUString( + "com.sun.star.configuration.ConfigurationRegistry"), xCtx ); if(!xConfRegistry.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.cxx: couldn't get ConfigurationRegistry")), 0); + rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple( xConfRegistry, css::uno::UNO_QUERY); if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.cxx: couldn't get ConfigurationRegistry")), 0); + rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); - xConfRegistry_simple->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup")), sal_True, sal_False); + xConfRegistry_simple->open(rtl::OUString("org.openoffice.Setup"), sal_True, sal_False); css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); // read locale - css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale"))); + css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(rtl::OUString("L10N/ooLocale")); if(locale.is() && !locale->getStringValue().isEmpty()) { rtl::OUString language; rtl::OUString country; @@ -452,39 +451,39 @@ void getJavaPropsFromSafetySettings( { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationRegistry")), + rtl::OUString( + "com.sun.star.configuration.ConfigurationRegistry"), xCtx); if(!xConfRegistry.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.cxx: couldn't get ConfigurationRegistry")), 0); + rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple( xConfRegistry, css::uno::UNO_QUERY); if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.cxx: couldn't get ConfigurationRegistry")), 0); + rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); xConfRegistry_simple->open( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Java")), + rtl::OUString("org.openoffice.Office.Java"), sal_True, sal_False); css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); if (xRegistryRootKey.is()) { - css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VirtualMachine/NetAccess"))); + css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey(rtl::OUString("VirtualMachine/NetAccess")); if (key_NetAccess.is()) { sal_Int32 val= key_NetAccess->getLongValue(); rtl::OUString sVal; switch( val) { - case 0: sVal= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("host")); + case 0: sVal= rtl::OUString("host"); break; - case 1: sVal= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unrestricted")); + case 1: sVal= rtl::OUString("unrestricted"); break; - case 3: sVal= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("none")); + case 3: sVal= rtl::OUString("none"); break; } rtl::OUString sProperty( RTL_CONSTASCII_USTRINGPARAM("appletviewer.security.mode=")); @@ -492,15 +491,15 @@ void getJavaPropsFromSafetySettings( pjvm->pushProp(sProperty); } css::uno::Reference<css::registry::XRegistryKey> key_CheckSecurity= xRegistryRootKey->openKey( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VirtualMachine/Security"))); + rtl::OUString("VirtualMachine/Security")); if( key_CheckSecurity.is()) { sal_Bool val= (sal_Bool) key_CheckSecurity->getLongValue(); rtl::OUString sProperty(RTL_CONSTASCII_USTRINGPARAM("stardiv.security.disableSecurity=")); if( val) - sProperty= sProperty + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("false")); + sProperty= sProperty + rtl::OUString("false"); else - sProperty= sProperty + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")); + sProperty= sProperty + rtl::OUString("true"); pjvm->pushProp( sProperty); } } @@ -526,7 +525,7 @@ static void setTimeZone(stoc_javavm::JVM * pjvm) throw() { #endif if (!strcmp(TIMEZONE, p)) - pjvm->pushProp(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user.timezone=ECT"))); + pjvm->pushProp(rtl::OUString("user.timezone=ECT")); } void initVMConfiguration( @@ -628,8 +627,8 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); if (m_xUnoVirtualMachine.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "bad call to initialize")), + rtl::OUString( + "bad call to initialize"), static_cast< cppu::OWeakObject * >(this)); css::beans::NamedValue val; if (rArguments.getLength() == 1 && (rArguments[0] >>= val) && val.Name == "UnoVirtualMachine" ) @@ -658,8 +657,7 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & } catch (jvmaccess::UnoVirtualMachine::CreationException &) { throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "jvmaccess::UnoVirtualMachine::CreationException")), + "jvmaccess::UnoVirtualMachine::CreationException"), static_cast< cppu::OWeakObject * >(this)); } } @@ -1146,74 +1144,74 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } else if ( aAccessor == "ooInetHTTPProxyName" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "http.proxyHost")); + aPropertyName = rtl::OUString( + "http.proxyHost"); rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetHTTPProxyPort" ) { aPropertyName - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyPort")); + = rtl::OUString("http.proxyPort"); sal_Int32 n = 0; rEvent.Element >>= n; aPropertyValue = rtl::OUString::valueOf(n); } else if ( aAccessor == "ooInetHTTPSProxyName" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "https.proxyHost")); + aPropertyName = rtl::OUString( + "https.proxyHost"); rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetHTTPSProxyPort" ) { aPropertyName - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyPort")); + = rtl::OUString("https.proxyPort"); sal_Int32 n = 0; rEvent.Element >>= n; aPropertyValue = rtl::OUString::valueOf(n); } else if ( aAccessor == "ooInetFTPProxyName" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ftp.proxyHost")); + aPropertyName = rtl::OUString( + "ftp.proxyHost"); rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetFTPProxyPort" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ftp.proxyPort")); + aPropertyName = rtl::OUString( + "ftp.proxyPort"); sal_Int32 n = 0; rEvent.Element >>= n; aPropertyValue = rtl::OUString::valueOf(n); } else if ( aAccessor == "ooInetNoProxy" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "http.nonProxyHosts")); - aPropertyName2 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ftp.nonProxyHosts")); + aPropertyName = rtl::OUString( + "http.nonProxyHosts"); + aPropertyName2 = rtl::OUString( + "ftp.nonProxyHosts"); rEvent.Element >>= aPropertyValue; aPropertyValue = aPropertyValue.replace(';', '|'); } else if ( aAccessor == "NetAccess" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "appletviewer.security.mode")); + aPropertyName = rtl::OUString( + "appletviewer.security.mode"); sal_Int32 n = 0; if (rEvent.Element >>= n) switch (n) { case 0: - aPropertyValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "host")); + aPropertyValue = rtl::OUString( + "host"); break; case 1: - aPropertyValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "unrestricted")); + aPropertyValue = rtl::OUString( + "unrestricted"); break; case 3: - aPropertyValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "none")); + aPropertyValue = rtl::OUString( + "none"); break; } else @@ -1222,16 +1220,16 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } else if ( aAccessor == "Security" ) { - aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "stardiv.security.disableSecurity")); + aPropertyName = rtl::OUString( + "stardiv.security.disableSecurity"); sal_Bool b = sal_Bool(); if (rEvent.Element >>= b) if (b) - aPropertyValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "false")); + aPropertyValue = rtl::OUString( + "false"); else - aPropertyValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "true")); + aPropertyValue = rtl::OUString( + "true"); else return; bSecurityChanged = true; @@ -1257,12 +1255,12 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( // call java.lang.System.setProperty // String setProperty( String key, String value) jclass jcSystem= pJNIEnv->FindClass("java/lang/System"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:FindClass java/lang/System")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:FindClass java/lang/System"), 0); jmethodID jmSetProps= pJNIEnv->GetStaticMethodID( jcSystem, "setProperty","(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetStaticMethodID java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetStaticMethodID java.lang.System.setProperty"), 0); jstring jsPropName= pJNIEnv->NewString( aPropertyName.getStr(), aPropertyName.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); // remove the property if it does not have a value ( user left the dialog field empty) // or if the port is set to 0 @@ -1273,14 +1271,14 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( { // call java.lang.System.getProperties jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetStaticMethodID java.lang.System.getProperties")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.getProperties")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0); // call java.util.Properties.remove jclass jcProperties= pJNIEnv->FindClass("java/util/Properties"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:FindClass java/util/Properties")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:FindClass java/util/Properties"), 0); jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetMethodID java.util.Properties.remove")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetMethodID java.util.Properties.remove"), 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName); // special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only @@ -1288,7 +1286,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( if (!aPropertyName2.isEmpty()) { jstring jsPropName2= pJNIEnv->NewString( aPropertyName2.getStr(), aPropertyName2.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName2); } } @@ -1296,20 +1294,20 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( { // Change the Value of the property jstring jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName, jsPropValue); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); // special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only // has a value for two java properties if (!aPropertyName2.isEmpty()) { jstring jsPropName2= pJNIEnv->NewString( aPropertyName2.getStr(), aPropertyName2.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName2, jsPropValue); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } } @@ -1319,7 +1317,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( if (bSecurityChanged) { jmethodID jmGetSecur= pJNIEnv->GetStaticMethodID( jcSystem,"getSecurityManager","()Ljava/lang/SecurityManager;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetStaticMethodID java.lang.System.getSecurityManager")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetStaticMethodID java.lang.System.getSecurityManager"), 0); jobject joSecur= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetSecur); if (joSecur != 0) { @@ -1333,9 +1331,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( // The SecurityManagers class Name must be com.sun.star.lib.sandbox.SandboxSecurity jclass jcSec= pJNIEnv->GetObjectClass( joSecur); jclass jcClass= pJNIEnv->FindClass("java/lang/Class"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:FindClass java.lang.Class")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:FindClass java.lang.Class"), 0); jmethodID jmName= pJNIEnv->GetMethodID( jcClass,"getName","()Ljava/lang/String;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetMethodID java.lang.Class.getName")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetMethodID java.lang.Class.getName"), 0); jstring jsClass= (jstring) pJNIEnv->CallObjectMethod( jcSec, jmName); const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL); rtl::OUString sName( jcharName); @@ -1350,9 +1348,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( { // call SandboxSecurity.reset jmethodID jmReset= pJNIEnv->GetMethodID( jcSec,"reset","()V"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); pJNIEnv->CallVoidMethod( joSecur, jmReset); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); } } } @@ -1421,8 +1419,8 @@ void JavaVirtualMachine::registerConfigChangesListener() try { css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider( - m_xContext->getServiceManager()->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider")), m_xContext), css::uno::UNO_QUERY); + m_xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( + "com.sun.star.configuration.ConfigurationProvider"), m_xContext), css::uno::UNO_QUERY); if (xConfigProvider.is()) { @@ -1430,13 +1428,13 @@ void JavaVirtualMachine::registerConfigChangesListener() // arguments for ConfigurationAccess css::uno::Sequence< css::uno::Any > aArguments(2); aArguments[0] <<= css::beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), + rtl::OUString("nodepath"), 0, - css::uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Inet/Settings"))), + css::uno::makeAny(rtl::OUString("org.openoffice.Inet/Settings")), css::beans::PropertyState_DIRECT_VALUE); // depth: -1 means unlimited aArguments[1] <<= css::beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), + rtl::OUString("depth"), 0, css::uno::makeAny( (sal_Int32)-1), css::beans::PropertyState_DIRECT_VALUE); @@ -1445,8 +1443,7 @@ void JavaVirtualMachine::registerConfigChangesListener() = css::uno::Reference< css::container::XContainer >( xConfigProvider->createInstanceWithArguments( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationAccess")), + "com.sun.star.configuration.ConfigurationAccess"), aArguments), css::uno::UNO_QUERY); @@ -1456,13 +1453,13 @@ void JavaVirtualMachine::registerConfigChangesListener() // now register as listener to changes in org.openoffice.Java/VirtualMachine css::uno::Sequence< css::uno::Any > aArguments2(2); aArguments2[0] <<= css::beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), + rtl::OUString("nodepath"), 0, - css::uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Java/VirtualMachine"))), + css::uno::makeAny(rtl::OUString("org.openoffice.Office.Java/VirtualMachine")), css::beans::PropertyState_DIRECT_VALUE); // depth: -1 means unlimited aArguments2[1] <<= css::beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), + rtl::OUString("depth"), 0, css::uno::makeAny( (sal_Int32)-1), css::beans::PropertyState_DIRECT_VALUE); @@ -1471,8 +1468,7 @@ void JavaVirtualMachine::registerConfigChangesListener() = css::uno::Reference< css::container::XContainer >( xConfigProvider->createInstanceWithArguments( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationAccess")), + "com.sun.star.configuration.ConfigurationAccess"), aArguments2), css::uno::UNO_QUERY); @@ -1513,32 +1509,32 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) // creat Java Properties as JNI strings jstring jsFtpProxyHost= pJNIEnv->NewString( sFtpProxyHost.getStr(), sFtpProxyHost.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); jstring jsFtpProxyPort= pJNIEnv->NewString( sFtpProxyPort.getStr(), sFtpProxyPort.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); jstring jsFtpNonProxyHosts= pJNIEnv->NewString( sFtpNonProxyHosts.getStr(), sFtpNonProxyHosts.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); jstring jsHttpProxyHost= pJNIEnv->NewString( sHttpProxyHost.getStr(), sHttpProxyHost.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); jstring jsHttpProxyPort= pJNIEnv->NewString( sHttpProxyPort.getStr(), sHttpProxyPort.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); jstring jsHttpNonProxyHosts= pJNIEnv->NewString( sHttpNonProxyHosts.getStr(), sHttpNonProxyHosts.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); // prepare java.lang.System.setProperty jclass jcSystem= pJNIEnv->FindClass("java/lang/System"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:FindClass java/lang/System")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:FindClass java/lang/System"), 0); jmethodID jmSetProps= pJNIEnv->GetStaticMethodID( jcSystem, "setProperty","(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetStaticMethodID java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetStaticMethodID java.lang.System.setProperty"), 0); // call java.lang.System.getProperties jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetStaticMethodID java.lang.System.getProperties")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.getProperties")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0); // prepare java.util.Properties.remove jclass jcProperties= pJNIEnv->FindClass("java/util/Properties"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:FindClass java/util/Properties")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:FindClass java/util/Properties"), 0); if (set_reset) { @@ -1558,44 +1554,44 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) if( propName.equals( sFtpProxyHost)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyHost, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } else if( propName.equals( sFtpProxyPort)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyPort, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } else if( propName.equals( sFtpNonProxyHosts)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpNonProxyHosts, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } else if( propName.equals( sHttpProxyHost)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyHost, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } else if( propName.equals( sHttpProxyPort)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyPort, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } else if( propName.equals( sHttpNonProxyHosts)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:NewString")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpNonProxyHosts, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:CallStaticObjectMethod java.lang.System.setProperty")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } } } @@ -1603,7 +1599,7 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) { // call java.util.Properties.remove jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JNI:GetMethodID java.util.Property.remove")), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:GetMethodID java.util.Property.remove"), 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyHost); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyPort); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpNonProxyHosts); @@ -1628,20 +1624,17 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { rtl::OUString baseUrl; try { baseUrl = exp->expandMacros( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("$URE_INTERNAL_JAVA_DIR/"))); + rtl::OUString("$URE_INTERNAL_JAVA_DIR/")); } catch (css::lang::IllegalArgumentException &) { throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com::sun::star::lang::IllegalArgumentException")), + "com::sun::star::lang::IllegalArgumentException"), static_cast< cppu::OWeakObject * >(this)); } rtl::OUString classPath; try { classPath = exp->expandMacros( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("$URE_INTERNAL_JAVA_CLASSPATH"))); + rtl::OUString("$URE_INTERNAL_JAVA_CLASSPATH")); } catch (css::lang::IllegalArgumentException &) {} jclass class_URLClassLoader = environment->FindClass( "java/net/URLClassLoader"); @@ -1737,8 +1730,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { } catch (jvmaccess::UnoVirtualMachine::CreationException &) { throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "jvmaccess::UnoVirtualMachine::CreationException")), + "jvmaccess::UnoVirtualMachine::CreationException"), static_cast< cppu::OWeakObject * >(this)); } } @@ -1746,8 +1738,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { void JavaVirtualMachine::handleJniException(JNIEnv * environment) { environment->ExceptionClear(); throw css::uno::RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("JNI exception occurred")), + rtl::OUString("JNI exception occurred"), static_cast< cppu::OWeakObject * >(this)); } diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 038fc3cfcccb..b2e20e37f8c6 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -193,11 +193,11 @@ Reference<XInterface> SAL_CALL DllComponentLoader::activate( if( xKey.is() ) { Reference<XRegistryKey > xActivatorKey = xKey->openKey( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) ); + rtl::OUString("/UNO/ACTIVATOR") ); if (xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII ) { Reference<XRegistryKey > xPrefixKey = xKey->openKey( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/PREFIX") ) ); + rtl::OUString("/UNO/PREFIX") ); if( xPrefixKey.is() && xPrefixKey->getValueType() == RegistryValueType_ASCII ) { aPrefix = xPrefixKey->getAsciiValue(); diff --git a/stoc/source/registry_tdprovider/functiondescription.cxx b/stoc/source/registry_tdprovider/functiondescription.cxx index 8840451355fe..0d7d160ddb31 100644 --- a/stoc/source/registry_tdprovider/functiondescription.cxx +++ b/stoc/source/registry_tdprovider/functiondescription.cxx @@ -73,8 +73,7 @@ FunctionDescription::getExceptions() const { } catch (const css::container::NoSuchElementException & e) { throw new css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.container.NoSuchElementException: ")) + "com.sun.star.container.NoSuchElementException: ") + e.Message), css::uno::Reference< css::uno::XInterface >()); //TODO } @@ -82,8 +81,7 @@ FunctionDescription::getExceptions() const { || exceptions[i]->getTypeClass() != css::uno::TypeClass_EXCEPTION) { throw new css::uno::RuntimeException( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("not an exception type: ")) + (rtl::OUString("not an exception type: ") + name), css::uno::Reference< css::uno::XInterface >()); //TODO } diff --git a/stoc/source/registry_tdprovider/methoddescription.cxx b/stoc/source/registry_tdprovider/methoddescription.cxx index fd2d6c3343aa..d5ab8e14099d 100644 --- a/stoc/source/registry_tdprovider/methoddescription.cxx +++ b/stoc/source/registry_tdprovider/methoddescription.cxx @@ -92,8 +92,7 @@ css::uno::Reference< css::reflection::XTypeDescription > Parameter::getType() } catch (const css::container::NoSuchElementException & e) { throw new css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.container.NoSuchElementException: ")) + "com.sun.star.container.NoSuchElementException: ") + e.Message), static_cast< cppu::OWeakObject * >(this)); } diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx index 50be0cb335df..4c2cd50da07a 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx @@ -272,8 +272,7 @@ TypeDescriptionEnumerationImpl::nextTypeDescription() return xTD; throw container::NoSuchElementException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("No further elements in enumeration!") ), + rtl::OUString("No further elements in enumeration!"), static_cast< cppu::OWeakObject * >( this ) ); } diff --git a/stoc/source/registry_tdprovider/structtypedescription.cxx b/stoc/source/registry_tdprovider/structtypedescription.cxx index 3251fd1812d2..5c2959a857ad 100644 --- a/stoc/source/registry_tdprovider/structtypedescription.cxx +++ b/stoc/source/registry_tdprovider/structtypedescription.cxx @@ -110,7 +110,7 @@ css::uno::Sequence< rtl::OUString > StructTypeDescription::getTypeParameters() return parameters; } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), + rtl::OUString("std::bad_alloc"), static_cast< cppu::OWeakObject * >(this)); } } diff --git a/stoc/source/registry_tdprovider/tdiface.cxx b/stoc/source/registry_tdprovider/tdiface.cxx index 0ec64d9e4c8e..36c17f913b94 100644 --- a/stoc/source/registry_tdprovider/tdiface.cxx +++ b/stoc/source/registry_tdprovider/tdiface.cxx @@ -339,8 +339,7 @@ void InterfaceTypeDescriptionImpl::checkInterfaceType( if (resolveTypedefs(type)->getTypeClass() != TypeClass_INTERFACE) { throw RuntimeException( OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Interface base is not an interface type")), + "Interface base is not an interface type"), static_cast< OWeakObject * >(this)); } } @@ -537,8 +536,7 @@ InterfaceTypeDescriptionImpl::getBaseTypes() throw (RuntimeException) { } catch (const NoSuchElementException & e) { throw RuntimeException( (OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.container.NoSuchElementException: ")) + "com.sun.star.container.NoSuchElementException: ") + e.Message), static_cast< OWeakObject * >(this)); } @@ -565,8 +563,7 @@ InterfaceTypeDescriptionImpl::getOptionalBaseTypes() throw (RuntimeException) { } catch (const NoSuchElementException & e) { throw RuntimeException( (OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.container.NoSuchElementException: ")) + "com.sun.star.container.NoSuchElementException: ") + e.Message), static_cast< OWeakObject * >(this)); } diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index 92dbc92ddeab..84223360787b 100644 --- a/stoc/source/registry_tdprovider/tdprovider.cxx +++ b/stoc/source/registry_tdprovider/tdprovider.cxx @@ -272,7 +272,7 @@ void ProviderImpl::initialize( if (xRegistry.is() && xRegistry->isValid()) { com::sun::star::uno::Reference< XRegistryKey > xKey( xRegistry->getRootKey()->openKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/UCR") ) ) ); + OUString("/UCR") ) ); if (xKey.is() && xKey->isValid()) { _aBaseKeys.push_back( xKey ); diff --git a/stoc/source/registry_tdprovider/tdservice.cxx b/stoc/source/registry_tdprovider/tdservice.cxx index 585a0268eed2..294f000db92c 100644 --- a/stoc/source/registry_tdprovider/tdservice.cxx +++ b/stoc/source/registry_tdprovider/tdservice.cxx @@ -347,8 +347,7 @@ ServiceTypeDescriptionImpl::getConstructors() throw (RuntimeException) { { throw RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Service has bad constructors")), + "Service has bad constructors"), static_cast< OWeakObject * >(this)); } (*ctors)[i] = new Constructor( @@ -375,8 +374,7 @@ void ServiceTypeDescriptionImpl::getReferences() if (superTypes > 1) { throw RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Service has more than one supertype")), + "Service has more than one supertype"), static_cast< OWeakObject * >(this)); } if (superTypes == 1) { @@ -398,8 +396,7 @@ void ServiceTypeDescriptionImpl::getReferences() { throw RuntimeException( OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.container.NoSuchElementException: " ) ) + "com.sun.star.container.NoSuchElementException: " ) + e.Message, static_cast< OWeakObject * >( this ) ); } @@ -466,8 +463,7 @@ void ServiceTypeDescriptionImpl::getReferences() if ( !( aTypeDesc >>= aOptionalServices[ nOS ] ) ) throw RuntimeException( OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Service 'export' is not a service" ) ), + "Service 'export' is not a service" ), static_cast< OWeakObject * >( this ) ); nOS++; } @@ -477,8 +473,7 @@ void ServiceTypeDescriptionImpl::getReferences() if ( !( aTypeDesc >>= aMandatoryServices[ nMS ] ) ) throw RuntimeException( OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Service 'export' is not a service" ) ), + "Service 'export' is not a service" ), static_cast< OWeakObject * >( this ) ); nMS++; } diff --git a/stoc/source/registry_tdprovider/tdsingleton.cxx b/stoc/source/registry_tdprovider/tdsingleton.cxx index f995558e9fc6..b777974049d7 100644 --- a/stoc/source/registry_tdprovider/tdsingleton.cxx +++ b/stoc/source/registry_tdprovider/tdsingleton.cxx @@ -41,8 +41,7 @@ void SingletonTypeDescriptionImpl::init() { } catch (NoSuchElementException const & e) { throw RuntimeException( (OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.container.NoSuchElementException: ")) + "com.sun.star.container.NoSuchElementException: ") + e.Message), static_cast< OWeakObject * >(this)); } @@ -56,8 +55,7 @@ void SingletonTypeDescriptionImpl::init() { } else { throw RuntimeException( OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Singleton is based on neither interface nor service")), + "Singleton is based on neither interface nor service"), static_cast< OWeakObject * >(this)); } } diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index c58e065ae69b..3b2c25b7abcf 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -82,43 +82,39 @@ namespace stoc_bootstrap Sequence< OUString > smgr_wrapper_getSupportedServiceNames() { Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.MultiServiceFactory") ); + seqNames.getArray()[0] = OUString("com.sun.star.lang.MultiServiceFactory"); return seqNames; } OUString smgr_wrapper_getImplementationName() { - return OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.OServiceManagerWrapper")); + return OUString("com.sun.star.comp.stoc.OServiceManagerWrapper"); } Sequence< OUString > smgr_getSupportedServiceNames() { Sequence< OUString > seqNames(2); - seqNames.getArray()[0] = OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.MultiServiceFactory") ); - seqNames.getArray()[1] = OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.ServiceManager") ); + seqNames.getArray()[0] = OUString("com.sun.star.lang.MultiServiceFactory"); + seqNames.getArray()[1] = OUString("com.sun.star.lang.ServiceManager"); return seqNames; } OUString smgr_getImplementationName() { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.OServiceManager")); + return OUString("com.sun.star.comp.stoc.OServiceManager"); } Sequence< OUString > regsmgr_getSupportedServiceNames() { Sequence< OUString > seqNames(2); - seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.MultiServiceFactory")); - seqNames.getArray()[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.RegistryServiceManager")); + seqNames.getArray()[0] = OUString("com.sun.star.lang.MultiServiceFactory"); + seqNames.getArray()[1] = OUString("com.sun.star.lang.RegistryServiceManager"); return seqNames; } OUString regsmgr_getImplementationName() { - return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.ORegistryServiceManager" ) ); + return OUString( "com.sun.star.comp.stoc.ORegistryServiceManager" ); } } @@ -702,7 +698,7 @@ void SAL_CALL OServiceManagerWrapper::setPropertyValue( else { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no XComponentContext given!") ), + OUString("no XComponentContext given!"), (OWeakObject *)this, 1 ); } } @@ -755,7 +751,7 @@ OServiceManagerWrapper::OServiceManagerWrapper( if (! m_root.is()) { throw RuntimeException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no service manager to wrap") ), + OUString("no service manager to wrap"), Reference< XInterface >() ); } } @@ -980,14 +976,14 @@ void OServiceManager::setPropertyValue( else { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no XComponentContext given!") ), + OUString("no XComponentContext given!"), (OWeakObject *)this, 1 ); } } else { throw UnknownPropertyException( - OUString( RTL_CONSTASCII_USTRINGPARAM("unknown property ") ) + PropertyName, + OUString("unknown property ") + PropertyName, (OWeakObject *)this ); } } @@ -1007,7 +1003,7 @@ Any OServiceManager::getPropertyValue(const OUString& PropertyName) else { UnknownPropertyException except; - except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager : unknown property " ) ); + except.Message = OUString( "ServiceManager : unknown property " ); except.Message += PropertyName; throw except; } @@ -1096,7 +1092,7 @@ Reference< XInterface > OServiceManager::createInstanceWithContext( { Reference< XComponentContext > xDefContext; xProps->getPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xDefContext; + OUString("DefaultContext") ) >>= xDefContext; OSL_ENSURE( xContext == xDefContext, "### default context of service manager singleton differs from context holding it!" ); @@ -1160,7 +1156,7 @@ Reference< XInterface > OServiceManager::createInstanceWithArgumentsAndContext( { Reference< XComponentContext > xDefContext; xProps->getPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xDefContext; + OUString("DefaultContext") ) >>= xDefContext; OSL_ENSURE( xContext == xDefContext, "### default context of service manager singleton differs from context holding it!" ); @@ -1385,7 +1381,7 @@ void OServiceManager::insert( const Any & Element ) if( Element.getValueTypeClass() != TypeClass_INTERFACE ) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no interface given!") ), + OUString("no interface given!"), Reference< XInterface >(), 0 ); } Reference<XInterface > xEle( Element, UNO_QUERY_THROW ); @@ -1396,7 +1392,7 @@ void OServiceManager::insert( const Any & Element ) if( aIt != m_ImplementationMap.end() ) { throw ElementExistException( - OUString( RTL_CONSTASCII_USTRINGPARAM("element already exists!") ), + OUString("element already exists!"), Reference< XInterface >() ); } @@ -1457,7 +1453,7 @@ void OServiceManager::remove( const Any & Element ) if (iFind == m_ImplementationNameMap.end()) { throw NoSuchElementException( - OUString( RTL_CONSTASCII_USTRINGPARAM("element is not in: ") ) + OUString("element is not in: ") + implName, static_cast< OWeakObject * >(this) ); } xEle = iFind->second; @@ -1465,8 +1461,8 @@ void OServiceManager::remove( const Any & Element ) else { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "neither interface nor string given!") ), + OUString( + "neither interface nor string given!"), Reference< XInterface >(), 0 ); } @@ -1480,7 +1476,7 @@ void OServiceManager::remove( const Any & Element ) if( aIt == m_ImplementationMap.end() ) { throw NoSuchElementException( - OUString( RTL_CONSTASCII_USTRINGPARAM("element is not in!") ), + OUString("element is not in!"), static_cast< OWeakObject * >(this) ); } //First remove all factories which have been loaded by ORegistryServiceManager. @@ -1631,7 +1627,7 @@ Reference<XRegistryKey > ORegistryServiceManager::getRootKey() m_xRegistry.set( createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.DefaultRegistry") ), + OUString("com.sun.star.registry.DefaultRegistry"), m_xContext ), UNO_QUERY ); } @@ -1656,7 +1652,7 @@ Reference<XInterface > ORegistryServiceManager::loadWithImplementationName( try { - OUString implementationName = OUString( RTL_CONSTASCII_USTRINGPARAM("/IMPLEMENTATIONS/") ) + name; + OUString implementationName = OUString("/IMPLEMENTATIONS/") + name; Reference<XRegistryKey > xImpKey = m_xRootKey->openKey(implementationName); if( xImpKey.is() ) @@ -1723,7 +1719,7 @@ void ORegistryServiceManager::fillAllNamesFromRegistry( HashSet_OWString & rSet try { Reference<XRegistryKey > xServicesKey = xRootKey->openKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("SERVICES") ) ); + OUString("SERVICES") ); // root + /Services + / if( xServicesKey.is() ) { diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 2b2a7110c008..816c35547bcc 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -1134,8 +1134,7 @@ void SimpleRegistry::open( if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.registry.SimpleRegistry.open(")) + + "com.sun.star.registry.SimpleRegistry.open(") + rURL + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -1254,14 +1253,12 @@ css::uno::Reference< css::uno::XInterface > SimpleRegistry_CreateInstance( css::uno::Sequence< rtl::OUString > simreg_getSupportedServiceNames() { css::uno::Sequence< rtl::OUString > names(1); - names[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry")); + names[0] = rtl::OUString("com.sun.star.registry.SimpleRegistry"); return names; } rtl::OUString simreg_getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.SimpleRegistry")); + return rtl::OUString("com.sun.star.comp.stoc.SimpleRegistry"); } } diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx index 51af243c0c62..458bded2165c 100644 --- a/stoc/source/tdmanager/tdmgr.cxx +++ b/stoc/source/tdmanager/tdmgr.cxx @@ -257,7 +257,7 @@ Any EnumerationImpl::nextElement() if (_nPos >= _pMgr->_aProviders.size()) { throw NoSuchElementException( - OUString( RTL_CONSTASCII_USTRINGPARAM("there is no further element!") ), + OUString("there is no further element!"), (XWeak *)(OWeakObject *)this ); } return makeAny( _pMgr->_aProviders[_nPos++] ); @@ -423,7 +423,7 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement ) if (find( newProvs.begin(), newProvs.end(), xElem ) != newProvs.end()) { throw ElementExistException( - OUString( RTL_CONSTASCII_USTRINGPARAM("provider already inserted!") ), + OUString("provider already inserted!"), (XWeak *)(OWeakObject *)this ); } @@ -530,7 +530,7 @@ void SAL_CALL ManagerImpl::remove( const Any & rElement ) if (! (rElement >>= xElem)) { throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("no type description provider given!") ), + OUString("no type description provider given!"), (XWeak *)(OWeakObject *)this, 0 ); } @@ -539,7 +539,7 @@ void SAL_CALL ManagerImpl::remove( const Any & rElement ) if (iFind == _aProviders.end()) { throw NoSuchElementException( - OUString( RTL_CONSTASCII_USTRINGPARAM("provider not found!") ), + OUString("provider not found!"), (XWeak *)(OWeakObject *)this ); } _aProviders.erase( iFind ); @@ -654,7 +654,7 @@ TypeClass SequenceTypeDescriptionImpl::getTypeClass() OUString SequenceTypeDescriptionImpl::getName() throw(::com::sun::star::uno::RuntimeException) { - return (OUString( RTL_CONSTASCII_USTRINGPARAM("[]") ) + _xElementTD->getName()); + return (OUString("[]") + _xElementTD->getName()); } // XIndirectTypeDescription diff --git a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx index 7433d11b84cc..ea44a750835e 100644 --- a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx +++ b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx @@ -88,8 +88,7 @@ uno::Any SAL_CALL TypeDescriptionEnumerationImpl::nextElement() return xEnum->nextElement(); throw container::NoSuchElementException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("No further elements in enumeration!") ), + rtl::OUString("No further elements in enumeration!"), static_cast< cppu::OWeakObject * >( this ) ); } @@ -111,8 +110,7 @@ TypeDescriptionEnumerationImpl::nextTypeDescription() return xEnum->nextTypeDescription(); throw container::NoSuchElementException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("No further elements in enumeration!") ), + rtl::OUString("No further elements in enumeration!"), static_cast< cppu::OWeakObject * >( this ) ); } diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index e9564768cc1a..125f50bf5ce2 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -370,7 +370,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6 return nRet; } throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("UNSIGNED HYPER out of range!") ), + OUString("UNSIGNED HYPER out of range!"), Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 ); } @@ -384,7 +384,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6 return nRet; } throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("FLOAT out of range!") ), + OUString("FLOAT out of range!"), Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 ); } case TypeClass_DOUBLE: @@ -396,7 +396,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6 return nRet; } throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("DOUBLE out of range!") ), + OUString("DOUBLE out of range!"), Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 ); } @@ -407,27 +407,27 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6 if (! getHyperValue( fVal, *(OUString const *)rAny.getValue() )) { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("invalid STRING value!") ), + OUString("invalid STRING value!"), Reference<XInterface>(), aDestinationClass, FailReason::IS_NOT_NUMBER, 0 ); } nRet = (fVal > SAL_INT64_MAX ? (sal_Int64)(sal_uInt64)fVal : (sal_Int64)fVal); if (fVal >= min && (fVal < 0 || ((sal_uInt64)fVal) <= max)) return nRet; throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("STRING value out of range!") ), + OUString("STRING value out of range!"), Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 ); } default: throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("TYPE is not supported!") ), + OUString("TYPE is not supported!"), Reference<XInterface>(), aDestinationClass, FailReason::TYPE_NOT_SUPPORTED, 0 ); } if (nRet >= min && (nRet < 0 || (sal_uInt64)nRet <= max)) return nRet; throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("VALUE is out of range!") ), + OUString("VALUE is out of range!"), Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 ); } @@ -493,7 +493,7 @@ double TypeConverter_Impl::toDouble( const Any& rAny, double min, double max ) c if (! getNumericValue( fRet, *(OUString *)rAny.getValue() )) { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("invalid STRING value!") ), + OUString("invalid STRING value!"), Reference<XInterface>(), aDestinationClass, FailReason::IS_NOT_NUMBER, 0 ); } break; @@ -501,14 +501,14 @@ double TypeConverter_Impl::toDouble( const Any& rAny, double min, double max ) c default: throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("TYPE is not supported!") ), + OUString("TYPE is not supported!"), Reference< XInterface >(), aDestinationClass, FailReason::TYPE_NOT_SUPPORTED, 0 ); } if (fRet >= min && fRet <= max) return fRet; throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("VALUE is out of range!") ), + OUString("VALUE is out of range!"), Reference< XInterface >(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 ); } @@ -550,7 +550,7 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy else { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("value is not of same or derived type!") ), + OUString("value is not of same or derived type!"), Reference< XInterface >(), aDestinationClass, FailReason::SOURCE_IS_NO_DERIVED_TYPE, 0 ); } @@ -571,14 +571,14 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy !*(XInterface * const *)rVal.getValue()) { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("value is no interface!") ), + OUString("value is no interface!"), Reference< XInterface >(), aDestinationClass, FailReason::NO_SUCH_INTERFACE, 0 ); } if (! (aRet = (*(XInterface * const *)rVal.getValue())->queryInterface( aDestType )).hasValue()) { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("value has no such interface!") ), + OUString("value has no such interface!"), Reference< XInterface >(), aDestinationClass, FailReason::NO_SUCH_INTERFACE, 0 ); } break; @@ -681,8 +681,7 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy else { throw CannotConvertException( - OUString( - RTL_CONSTASCII_USTRINGPARAM("value cannot be converted to demanded ENUM!") ), + OUString("value cannot be converted to demanded ENUM!"), Reference< XInterface >(), aDestinationClass, FailReason::IS_NOT_ENUM, 0 ); } break; @@ -704,7 +703,7 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy return aRet; throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("conversion not possible!") ), + OUString("conversion not possible!"), Reference< XInterface >(), aDestinationClass, FailReason::INVALID, 0 ); } @@ -727,7 +726,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina case TypeClass_UNKNOWN: case TypeClass_MODULE: throw IllegalArgumentException( - OUString( RTL_CONSTASCII_USTRINGPARAM("destination type is not simple!") ), + OUString("destination type is not simple!"), Reference< XInterface >(), (sal_Int16) 1 ); default: break; @@ -766,12 +765,12 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina case TypeClass_STRING: { const OUString & aStr = *(const OUString *)rVal.getValue(); - if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) )) + if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( OUString("false") )) { sal_Bool bFalse = sal_False; aRet.setValue( &bFalse, getCppuBooleanType() ); } - else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) )) + else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( OUString("true") )) { sal_Bool bTrue = sal_True; aRet.setValue( &bTrue, getCppuBooleanType() ); @@ -779,7 +778,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina else { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("STRING has no boolean value!") ), + OUString("STRING has no boolean value!"), Reference< XInterface >(), aDestinationClass, FailReason::IS_NOT_BOOL, 0 ); } } @@ -862,7 +861,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina else { throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("value is not ENUM!") ), + OUString("value is not ENUM!"), Reference< XInterface >(), aDestinationClass, FailReason::IS_NOT_ENUM, 0 ); } break; @@ -870,8 +869,8 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina case TypeClass_BOOLEAN: aRet <<= (*(sal_Bool *)rVal.getValue()) ? - OUString(RTL_CONSTASCII_USTRINGPARAM("true")) : - OUString(RTL_CONSTASCII_USTRINGPARAM("false")); + OUString("true") : + OUString("false"); break; case TypeClass_CHAR: aRet <<= OUString( (sal_Unicode *)rVal.getValue(), 1 ); @@ -914,7 +913,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina return aRet; throw CannotConvertException( - OUString( RTL_CONSTASCII_USTRINGPARAM("conversion not possible!") ), + OUString("conversion not possible!"), Reference< XInterface >(), aDestinationClass, FailReason::INVALID, 0 ); } } diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index cad73741f527..0888326e340a 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -209,19 +209,17 @@ css::uno::Reference< css::uno::XInterface > create( return static_cast< cppu::OWeakObject * >(new Translator(context)); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0); + rtl::OUString("std::bad_alloc"), 0); } } rtl::OUString getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.ExternalUriReferenceTranslator")); + return rtl::OUString("com.sun.star.comp.uri.ExternalUriReferenceTranslator"); } css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator")); + s[0] = rtl::OUString("com.sun.star.uri.ExternalUriReferenceTranslator"); return s; } diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index ef947c1f90e4..a5f6041339ab 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -411,7 +411,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::parse( throw; } catch (const css::uno::Exception & e) { throw css::lang::WrappedTargetRuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("creating service ")) + rtl::OUString("creating service ") + serviceName, static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e)); //TODO: preserve type of e @@ -430,7 +430,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::parse( uriRef = parseGeneric(scheme, schemeSpecificPart); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), + rtl::OUString("std::bad_alloc"), static_cast< cppu::OWeakObject * >(this)); } } @@ -694,19 +694,17 @@ css::uno::Reference< css::uno::XInterface > create( return static_cast< cppu::OWeakObject * >(new Factory(context)); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0); + rtl::OUString("std::bad_alloc"), 0); } } rtl::OUString getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.UriReferenceFactory")); + return rtl::OUString("com.sun.star.comp.uri.UriReferenceFactory"); } css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.UriReferenceFactory")); + s[0] = rtl::OUString("com.sun.star.uri.UriReferenceFactory"); return s; } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx index 47b2bc7b965c..ffeb1dbde867 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx @@ -213,7 +213,7 @@ css::uno::Reference< css::uri::XUriReference > Parser::parse( return new UrlReference(scheme, schemeSpecificPart); } catch (::std::bad_alloc &) { throw css::uno::RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), + ::rtl::OUString("std::bad_alloc"), css::uno::Reference< css::uno::XInterface >()); } } @@ -232,22 +232,20 @@ css::uno::Reference< css::uno::XInterface > create( return static_cast< ::cppu::OWeakObject * >(new Parser); } catch (::std::bad_alloc &) { throw css::uno::RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), + ::rtl::OUString("std::bad_alloc"), css::uno::Reference< css::uno::XInterface >()); } } ::rtl::OUString getImplementationName() { return ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand")); + "com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand"); } css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames() { css::uno::Sequence< ::rtl::OUString > s(1); s[0] = ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand")); + "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand"); return s; } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index 9db6f7300a5f..073d279dafb5 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -436,7 +436,7 @@ Parser::parse( return new UrlReference(scheme, schemeSpecificPart); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0); + rtl::OUString("std::bad_alloc"), 0); } } @@ -455,19 +455,17 @@ css::uno::Reference< css::uno::XInterface > create( return static_cast< cppu::OWeakObject * >(new Parser); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0); + rtl::OUString("std::bad_alloc"), 0); } } rtl::OUString getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript")); + return rtl::OUString("com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"); } css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript")); + s[0] = rtl::OUString("com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"); return s; } diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx index 50a0fbdd4c6d..2083d056715f 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx @@ -136,19 +136,17 @@ css::uno::Reference< css::uno::XInterface > create( return static_cast< cppu::OWeakObject * >(new Factory(context)); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), 0); + rtl::OUString("std::bad_alloc"), 0); } } rtl::OUString getImplementationName() { - return rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory")); + return rtl::OUString("com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory"); } css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.VndSunStarPkgUrlReferenceFactory")); + s[0] = rtl::OUString("com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"); return s; } |