diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /stoc | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'stoc')
67 files changed, 1026 insertions, 1080 deletions
diff --git a/stoc/inc/bootstrapservices.hxx b/stoc/inc/bootstrapservices.hxx index fb25ade9cc93..57b9ca907cb0 100644 --- a/stoc/inc/bootstrapservices.hxx +++ b/stoc/inc/bootstrapservices.hxx @@ -33,71 +33,71 @@ namespace stoc_bootstrap //servicemanager ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OServiceManager_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext ); - ::com::sun::star::uno::Sequence< ::rtl::OUString > smgr_wrapper_getSupportedServiceNames(); - ::rtl::OUString smgr_wrapper_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > smgr_wrapper_getSupportedServiceNames(); + OUString smgr_wrapper_getImplementationName(); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OServiceManagerWrapper_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext ) throw (::com::sun::star::uno::Exception); - ::com::sun::star::uno::Sequence< ::rtl::OUString > smgr_getSupportedServiceNames(); - ::rtl::OUString smgr_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > smgr_getSupportedServiceNames(); + OUString smgr_getImplementationName(); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ORegistryServiceManager_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::rtl::OUString > regsmgr_getSupportedServiceNames(); - ::rtl::OUString regsmgr_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > regsmgr_getSupportedServiceNames(); + OUString regsmgr_getImplementationName(); //security ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ac_create( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xComponentContext ) SAL_THROW( (::com::sun::star::uno::Exception) ); - ::com::sun::star::uno::Sequence< ::rtl::OUString > ac_getSupportedServiceNames() SAL_THROW(()); - ::rtl::OUString ac_getImplementationName() SAL_THROW(()); + ::com::sun::star::uno::Sequence< OUString > ac_getSupportedServiceNames() SAL_THROW(()); + OUString ac_getImplementationName() SAL_THROW(()); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL filepolicy_create( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xComponentContext ) SAL_THROW( (com::sun::star::uno::Exception) ); - ::com::sun::star::uno::Sequence< rtl::OUString > filepolicy_getSupportedServiceNames() SAL_THROW(()); - ::rtl::OUString filepolicy_getImplementationName() SAL_THROW(()); + ::com::sun::star::uno::Sequence< OUString > filepolicy_getSupportedServiceNames() SAL_THROW(()); + OUString filepolicy_getImplementationName() SAL_THROW(()); //defaultregistry ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL NestedRegistry_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ) throw( ::com::sun::star::uno::Exception); - ::com::sun::star::uno::Sequence< ::rtl::OUString > defreg_getSupportedServiceNames(); - ::rtl::OUString defreg_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > defreg_getSupportedServiceNames(); + OUString defreg_getImplementationName(); //simpleregistry ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SimpleRegistry_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ); - ::com::sun::star::uno::Sequence< ::rtl::OUString > simreg_getSupportedServiceNames(); - ::rtl::OUString simreg_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > simreg_getSupportedServiceNames(); + OUString simreg_getImplementationName(); //implementationregistry ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplementationRegistration_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ); // throw(Exception) - ::com::sun::star::uno::Sequence< ::rtl::OUString > impreg_getSupportedServiceNames(); - ::rtl::OUString impreg_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > impreg_getSupportedServiceNames(); + OUString impreg_getImplementationName(); //loader ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DllComponentLoader_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ) throw(::com::sun::star::uno::Exception); - ::com::sun::star::uno::Sequence< ::rtl::OUString > loader_getSupportedServiceNames(); - ::rtl::OUString loader_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > loader_getSupportedServiceNames(); + OUString loader_getImplementationName(); //registry_tdprovider ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ProviderImpl_create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ) throw(::com::sun::star::uno::Exception); - ::com::sun::star::uno::Sequence< ::rtl::OUString > rdbtdp_getSupportedServiceNames(); - ::rtl::OUString rdbtdp_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > rdbtdp_getSupportedServiceNames(); + OUString rdbtdp_getImplementationName(); //tdmanager ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ManagerImpl_create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ) SAL_THROW( (::com::sun::star::uno::Exception) ); - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL tdmgr_getSupportedServiceNames(); - ::rtl::OUString SAL_CALL tdmgr_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > SAL_CALL tdmgr_getSupportedServiceNames(); + OUString SAL_CALL tdmgr_getImplementationName(); } // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/inc/stocservices.hxx b/stoc/inc/stocservices.hxx index 46d7efde70a2..3017c060815b 100644 --- a/stoc/inc/stocservices.hxx +++ b/stoc/inc/stocservices.hxx @@ -34,16 +34,16 @@ namespace stoc_services ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TypeConverter_Impl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & ) throw( ::com::sun::star::uno::RuntimeException ); - ::com::sun::star::uno::Sequence< ::rtl::OUString > tcv_getSupportedServiceNames(); - ::rtl::OUString tcv_getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > tcv_getSupportedServiceNames(); + OUString tcv_getImplementationName(); namespace ExternalUriReferenceTranslator { com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL create( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); + OUString SAL_CALL getImplementationName(); + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } namespace UriReferenceFactory @@ -51,8 +51,8 @@ namespace stoc_services com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL create( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); + OUString SAL_CALL getImplementationName(); + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } namespace UriSchemeParser_vndDOTsunDOTstarDOTexpand @@ -60,8 +60,8 @@ namespace stoc_services ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL create( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const &) SAL_THROW((::com::sun::star::uno::Exception)); - ::rtl::OUString SAL_CALL getImplementationName(); - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(); + OUString SAL_CALL getImplementationName(); + ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } namespace UriSchemeParser_vndDOTsunDOTstarDOTscript @@ -69,8 +69,8 @@ namespace stoc_services com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL create( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const &) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); + OUString SAL_CALL getImplementationName(); + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } namespace VndSunStarPkgUrlReferenceFactory @@ -78,8 +78,8 @@ namespace stoc_services com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL create( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(); + OUString SAL_CALL getImplementationName(); + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } } // namespace diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index a8f45329993b..6bb8b11d9bca 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -26,6 +26,7 @@ #include <cppuhelper/factory.hxx> #include <cppuhelper/component.hxx> #include <cppuhelper/typeprovider.hxx> +#include <rtl/ustring.hxx> #include "lrucache.hxx" @@ -52,8 +53,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::reflection; using namespace com::sun::star::container; -using ::rtl::OUString; - namespace stoc_corefl { diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 5015c69659fa..edec3880ec2e 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -31,9 +31,6 @@ using namespace com::sun::star::registry; using namespace cppu; using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; #include "base.hxx" diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 12d6a6bd2b25..d199c9361cef 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -146,7 +146,7 @@ Reference< XIdlClass > IdlAttributeFieldImpl::getDeclaringClass() MutexGuard aGuard( getMutexAccess() ); if (! _xDeclClass.is()) { - rtl::OUString aName(getAttributeTypeDescr()->aBase.aBase.pTypeName); + OUString aName(getAttributeTypeDescr()->aBase.aBase.pTypeName); sal_Int32 i = aName.indexOf(':'); OSL_ASSERT(i >= 0); _xDeclClass = getReflection()->forName(aName.copy(0, i)); @@ -451,7 +451,7 @@ Reference< XIdlClass > IdlInterfaceMethodImpl::getDeclaringClass() MutexGuard aGuard( getMutexAccess() ); if (! _xDeclClass.is()) { - rtl::OUString aName(getMethodTypeDescr()->aBase.aBase.pTypeName); + OUString aName(getMethodTypeDescr()->aBase.aBase.pTypeName); sal_Int32 i = aName.indexOf(':'); OSL_ASSERT(i >= 0); _xDeclClass = getReflection()->forName(aName.copy(0, i)); diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx index 991fa26d5d4c..1d21df16e630 100644 --- a/stoc/source/corereflection/lrucache.hxx +++ b/stoc/source/corereflection/lrucache.hxx @@ -221,16 +221,16 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear() } //================================================================================================== -struct FctHashOUString : public ::std::unary_function< const ::rtl::OUString &, size_t > +struct FctHashOUString : public ::std::unary_function< const OUString &, size_t > { - size_t operator()( const ::rtl::OUString & rKey ) const + size_t operator()( const OUString & rKey ) const { return rKey.hashCode(); } }; /** Template instance for OUString keys, Any values.<br> */ -typedef LRU_Cache< ::rtl::OUString, ::com::sun::star::uno::Any, - FctHashOUString, ::std::equal_to< ::rtl::OUString > > +typedef LRU_Cache< OUString, ::com::sun::star::uno::Any, + FctHashOUString, ::std::equal_to< OUString > > LRU_CacheAnyByOUString; diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index b6534fb06122..198b90b85254 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -44,7 +44,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace cppu; using namespace osl; -using ::rtl::OUString; #define SERVICENAME "com.sun.star.registry.NestedRegistry" #define IMPLNAME "com.sun.star.comp.stoc.NestedRegistry" diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 568bc0560e7d..ccdfd90cf97a 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -61,8 +61,6 @@ using namespace com::sun::star::registry; using namespace cppu; using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; #define IMPLNAME "com.sun.star.comp.stoc.ImplementationRegistration" #define SERVICENAME "com.sun.star.registry.ImplementationRegistration" namespace stoc_impreg @@ -583,7 +581,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, } else { oldImpl = implEntries.getConstArray()[0]; - rtl::OUString path(xOldKey->getKeyName()); + OUString path(xOldKey->getKeyName()); xOldKey->closeKey(); xRootKey->deleteKey(path); } @@ -599,7 +597,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, { bClean = sal_True; hasNoImplementations = sal_False; - rtl::OUString path(xOldKey->getKeyName()); + OUString path(xOldKey->getKeyName()); xOldKey->closeKey(); xRootKey->deleteKey(path); } @@ -762,7 +760,7 @@ static void deleteAllImplementations( const Reference < XSimpleRegistry >& xRe if (hasLocationUrl) { hasLocationUrl = sal_False; - rtl::OUString path(xImplKey->getKeyName()); + OUString path(xImplKey->getKeyName()); xImplKey->closeKey(); xReg->getRootKey()->deleteKey(path); } @@ -771,13 +769,13 @@ static void deleteAllImplementations( const Reference < XSimpleRegistry >& xRe subKeys = xSource->openKeys(); if (subKeys.getLength() == 0) { - rtl::OUString path(xSource->getKeyName()); + OUString path(xSource->getKeyName()); xSource->closeKey(); xReg->getRootKey()->deleteKey(path); } } else { - rtl::OUString path(xSource->getKeyName()); + OUString path(xSource->getKeyName()); xSource->closeKey(); xReg->getRootKey()->deleteKey(path); } @@ -904,7 +902,7 @@ static void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xRe if (hasNoImplementations) { hasNoImplementations = sal_False; - rtl::OUString path(xServiceKey->getKeyName()); + OUString path(xServiceKey->getKeyName()); xServiceKey->closeKey(); xReg->getRootKey()->deleteKey(path); } @@ -913,13 +911,13 @@ static void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xRe subKeys = xSource->openKeys(); if (subKeys.getLength() == 0) { - rtl::OUString path(xSource->getKeyName()); + OUString path(xSource->getKeyName()); xSource->closeKey(); xReg->getRootKey()->deleteKey(path); } } else { - rtl::OUString path(xSource->getKeyName()); + OUString path(xSource->getKeyName()); xSource->closeKey(); xReg->getRootKey()->deleteKey(path); } diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index a7cea62c707f..4c36dc546037 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -134,7 +134,7 @@ sal_Bool isDerivedFrom( Reference<XIdlClass> xToTestClass, Reference<XIdlClass> // Hashtable for the search of names struct hashName_Impl { - size_t operator()(const ::rtl::OUString Str) const + size_t operator()(const OUString Str) const { return (size_t)Str.hashCode(); } @@ -142,7 +142,7 @@ struct hashName_Impl struct eqName_Impl { - sal_Bool operator()(const ::rtl::OUString Str1, const ::rtl::OUString Str2) const + sal_Bool operator()(const OUString Str1, const OUString Str2) const { return ( Str1 == Str2 ); } @@ -150,7 +150,7 @@ struct eqName_Impl typedef boost::unordered_map < - ::rtl::OUString, + OUString, sal_Int32, hashName_Impl, eqName_Impl @@ -162,8 +162,8 @@ IntrospectionNameMap; // converted names, for the support of XExactName typedef boost::unordered_map < - ::rtl::OUString, - ::rtl::OUString, + OUString, + OUString, hashName_Impl, eqName_Impl > @@ -245,13 +245,13 @@ public: { delete[] mpOrgPropertyHandleArray; } - sal_Int32 getPropertyIndex( const ::rtl::OUString& aPropertyName ) const; - sal_Int32 getMethodIndex( const ::rtl::OUString& aMethodName ) const; + sal_Int32 getPropertyIndex( const OUString& aPropertyName ) const; + sal_Int32 getMethodIndex( const OUString& aMethodName ) const; // Methods of XIntrospectionAccess (OLD, now only Impl) - void setPropertyValue(const Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue) const; -// void setPropertyValue(Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue) const; - Any getPropertyValue(const Any& obj, const ::rtl::OUString& aPropertyName) const; + void setPropertyValue(const Any& obj, const OUString& aPropertyName, const Any& aValue) const; +// void setPropertyValue(Any& obj, const OUString& aPropertyName, const Any& aValue) const; + Any getPropertyValue(const Any& obj, const OUString& aPropertyName) const; void setPropertyValueByIndex(const Any& obj, sal_Int32 nIndex, const Any& aValue) const; // void setPropertyValueByIndex(Any& obj, sal_Int32 nIndex, const Any& aValue) const; Any getPropertyValueByIndex(const Any& obj, sal_Int32 nIndex) const; @@ -289,7 +289,7 @@ IntrospectionAccessStatic_Impl::IntrospectionAccessStatic_Impl( Reference< XIdlR mnMethCount = 0; } -sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const ::rtl::OUString& aPropertyName ) const +sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPropertyName ) const { sal_Int32 iHashResult = -1; IntrospectionAccessStatic_Impl* pThis = (IntrospectionAccessStatic_Impl*)this; @@ -299,7 +299,7 @@ sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const ::rtl::OUStrin return iHashResult; } -sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const ::rtl::OUString& aMethodName ) const +sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMethodName ) const { sal_Int32 iHashResult = -1; IntrospectionAccessStatic_Impl* pThis = (IntrospectionAccessStatic_Impl*)this; @@ -319,15 +319,15 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const ::rtl::OUString& if( nFound == -1 ) break; - ::rtl::OUString aPureMethodName = aMethodName.copy( nFound + 1 ); + OUString aPureMethodName = aMethodName.copy( nFound + 1 ); aIt = pThis->maMethodNameMap.find( aPureMethodName ); if( !( aIt == pThis->maMethodNameMap.end() ) ) { // Check if it can be a type? // Problem: Does not work if package names contain _ ?! - ::rtl::OUString aStr = aMethodName.copy( 0, nFound ); - ::rtl::OUString aTypeName = aStr.replace( '_', '.' ); + OUString aStr = aMethodName.copy( 0, nFound ); + OUString aTypeName = aStr.replace( '_', '.' ); Reference< XIdlClass > xClass = mxCoreReflection->forName( aTypeName ); if( xClass.is() ) { @@ -380,8 +380,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const ::rtl::OUString& return iHashResult; } -void IntrospectionAccessStatic_Impl::setPropertyValue( const Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue ) const -//void IntrospectionAccessStatic_Impl::setPropertyValue( Any& obj, const ::rtl::OUString& aPropertyName, const Any& aValue ) const +void IntrospectionAccessStatic_Impl::setPropertyValue( const Any& obj, const OUString& aPropertyName, const Any& aValue ) const +//void IntrospectionAccessStatic_Impl::setPropertyValue( Any& obj, const OUString& aPropertyName, const Any& aValue ) const { sal_Int32 i = getPropertyIndex( aPropertyName ); if( i != -1 ) @@ -429,7 +429,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal if( eValType == TypeClass_INTERFACE ) { Type aPropType = rProp.Type; - ::rtl::OUString aTypeName( aPropType.getTypeName() ); + OUString aTypeName( aPropType.getTypeName() ); Reference< XIdlClass > xPropClass = mxCoreReflection->forName( aTypeName ); //Reference<XIdlClass> xPropClass = rProp.Type; if( xPropClass.is() && xPropClass->getTypeClass() == TypeClass_INTERFACE ) @@ -524,7 +524,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal } } -Any IntrospectionAccessStatic_Impl::getPropertyValue( const Any& obj, const ::rtl::OUString& aPropertyName ) const +Any IntrospectionAccessStatic_Impl::getPropertyValue( const Any& obj, const OUString& aPropertyName ) const { sal_Int32 i = getPropertyIndex( aPropertyName ); if( i != -1 ) @@ -720,15 +720,15 @@ public: throw( RuntimeException ); virtual sal_Int32 SAL_CALL getSuppliedPropertyConcepts(void) throw( RuntimeException ); - virtual Property SAL_CALL getProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts) + virtual Property SAL_CALL getProperty(const OUString& Name, sal_Int32 PropertyConcepts) throw( NoSuchElementException, RuntimeException ); - virtual sal_Bool SAL_CALL hasProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts) + virtual sal_Bool SAL_CALL hasProperty(const OUString& Name, sal_Int32 PropertyConcepts) throw( RuntimeException ); virtual Sequence< Property > SAL_CALL getProperties(sal_Int32 PropertyConcepts) throw( RuntimeException ); - virtual Reference<XIdlMethod> SAL_CALL getMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts) + virtual Reference<XIdlMethod> SAL_CALL getMethod(const OUString& Name, sal_Int32 MethodConcepts) throw( NoSuchMethodException, RuntimeException ); - virtual sal_Bool SAL_CALL hasMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts) + virtual sal_Bool SAL_CALL hasMethod(const OUString& Name, sal_Int32 MethodConcepts) throw( RuntimeException ); virtual Sequence< Reference<XIdlMethod> > SAL_CALL getMethods(sal_Int32 MethodConcepts) throw( RuntimeException ); @@ -742,7 +742,7 @@ public: virtual Any SAL_CALL getMaterial(void) throw(RuntimeException); // Methoden von XExactName - virtual ::rtl::OUString SAL_CALL getExactName( const ::rtl::OUString& rApproximateName ) throw( RuntimeException ); + virtual OUString SAL_CALL getExactName( const OUString& rApproximateName ) throw( RuntimeException ); }; ImplIntrospectionAccess::ImplIntrospectionAccess @@ -809,17 +809,17 @@ public: // Methoden von XPropertySet virtual Reference<XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( RuntimeException ); - virtual void SAL_CALL setPropertyValue(const ::rtl::OUString& aPropertyName, const Any& aValue) + virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const Any& aValue) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ); - virtual Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName) + virtual Any SAL_CALL getPropertyValue(const OUString& aPropertyName) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); - virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) + virtual void SAL_CALL addPropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); - virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) + virtual void SAL_CALL removePropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); - virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) + virtual void SAL_CALL addVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); - virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) + virtual void SAL_CALL removeVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); // Methoden von XFastPropertySet @@ -830,25 +830,25 @@ public: // Methoden von XPropertySetInfo virtual Sequence< Property > SAL_CALL getProperties(void) throw( RuntimeException ); - virtual Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException ); - virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException ); + virtual Property SAL_CALL getPropertyByName(const OUString& Name) throw( RuntimeException ); + virtual sal_Bool SAL_CALL hasPropertyByName(const OUString& Name) throw( RuntimeException ); // Methoden von XElementAccess virtual Type SAL_CALL getElementType(void) throw( RuntimeException ); virtual sal_Bool SAL_CALL hasElements(void) throw( RuntimeException ); // Methoden von XNameAccess - virtual Any SAL_CALL getByName(const ::rtl::OUString& Name) + virtual Any SAL_CALL getByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException ); - virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames(void) throw( RuntimeException ); - virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& Name) throw( RuntimeException ); + virtual Sequence< OUString > SAL_CALL getElementNames(void) throw( RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( RuntimeException ); // Methoden von XNameContainer - virtual void SAL_CALL insertByName(const ::rtl::OUString& Name, const Any& Element) + virtual void SAL_CALL insertByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException ); - virtual void SAL_CALL replaceByName(const ::rtl::OUString& Name, const Any& Element) + virtual void SAL_CALL replaceByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException ); - virtual void SAL_CALL removeByName(const ::rtl::OUString& Name) + virtual void SAL_CALL removeByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException ); // Methoden von XIndexAccess @@ -940,19 +940,19 @@ Reference<XPropertySetInfo> ImplIntrospectionAdapter::getPropertySetInfo(void) return (XPropertySetInfo *)this; } -void ImplIntrospectionAdapter::setPropertyValue(const ::rtl::OUString& aPropertyName, const Any& aValue) +void ImplIntrospectionAdapter::setPropertyValue(const OUString& aPropertyName, const Any& aValue) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ) { mpStaticImpl->setPropertyValue( mrInspectedObject, aPropertyName, aValue ); } -Any ImplIntrospectionAdapter::getPropertyValue(const ::rtl::OUString& aPropertyName) +Any ImplIntrospectionAdapter::getPropertyValue(const OUString& aPropertyName) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { return mpStaticImpl->getPropertyValue( mrInspectedObject, aPropertyName ); } -void ImplIntrospectionAdapter::addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) +void ImplIntrospectionAdapter::addPropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { if( mxIface.is() ) @@ -965,7 +965,7 @@ void ImplIntrospectionAdapter::addPropertyChangeListener(const ::rtl::OUString& } } -void ImplIntrospectionAdapter::removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) +void ImplIntrospectionAdapter::removePropertyChangeListener(const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { if( mxIface.is() ) @@ -978,7 +978,7 @@ void ImplIntrospectionAdapter::removePropertyChangeListener(const ::rtl::OUStrin } } -void ImplIntrospectionAdapter::addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) +void ImplIntrospectionAdapter::addVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { if( mxIface.is() ) @@ -991,7 +991,7 @@ void ImplIntrospectionAdapter::addVetoableChangeListener(const ::rtl::OUString& } } -void ImplIntrospectionAdapter::removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) +void ImplIntrospectionAdapter::removeVetoableChangeListener(const OUString& aPropertyName, const Reference<XVetoableChangeListener>& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) { if( mxIface.is() ) @@ -1022,13 +1022,13 @@ Sequence< Property > ImplIntrospectionAdapter::getProperties(void) throw( Runtim return mpStaticImpl->getProperties(); } -Property ImplIntrospectionAdapter::getPropertyByName(const ::rtl::OUString& Name) +Property ImplIntrospectionAdapter::getPropertyByName(const OUString& Name) throw( RuntimeException ) { return mpAccess->getProperty( Name, PropertyConcept::ALL ); } -sal_Bool ImplIntrospectionAdapter::hasPropertyByName(const ::rtl::OUString& Name) +sal_Bool ImplIntrospectionAdapter::hasPropertyByName(const OUString& Name) throw( RuntimeException ) { return mpAccess->hasProperty( Name, PropertyConcept::ALL ); @@ -1046,38 +1046,38 @@ sal_Bool ImplIntrospectionAdapter::hasElements(void) throw( RuntimeException ) } // Methoden von XNameAccess -Any ImplIntrospectionAdapter::getByName(const ::rtl::OUString& Name) +Any ImplIntrospectionAdapter::getByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException ) { return mxObjNameAccess->getByName( Name ); } -Sequence< ::rtl::OUString > ImplIntrospectionAdapter::getElementNames(void) +Sequence< OUString > ImplIntrospectionAdapter::getElementNames(void) throw( RuntimeException ) { return mxObjNameAccess->getElementNames(); } -sal_Bool ImplIntrospectionAdapter::hasByName(const ::rtl::OUString& Name) +sal_Bool ImplIntrospectionAdapter::hasByName(const OUString& Name) throw( RuntimeException ) { return mxObjNameAccess->hasByName( Name ); } // Methoden von XNameContainer -void ImplIntrospectionAdapter::insertByName(const ::rtl::OUString& Name, const Any& Element) +void ImplIntrospectionAdapter::insertByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException ) { mxObjNameContainer->insertByName( Name, Element ); } -void ImplIntrospectionAdapter::replaceByName(const ::rtl::OUString& Name, const Any& Element) +void ImplIntrospectionAdapter::replaceByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException ) { mxObjNameContainer->replaceByName( Name, Element ); } -void ImplIntrospectionAdapter::removeByName(const ::rtl::OUString& Name) +void ImplIntrospectionAdapter::removeByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException ) { mxObjNameContainer->removeByName( Name ); @@ -1173,7 +1173,7 @@ sal_Int32 ImplIntrospectionAccess::getSuppliedPropertyConcepts(void) METHODS; } -Property ImplIntrospectionAccess::getProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts) +Property ImplIntrospectionAccess::getProperty(const OUString& Name, sal_Int32 PropertyConcepts) throw( NoSuchElementException, RuntimeException ) { Property aRet; @@ -1194,7 +1194,7 @@ Property ImplIntrospectionAccess::getProperty(const ::rtl::OUString& Name, sal_I return aRet; } -sal_Bool ImplIntrospectionAccess::hasProperty(const ::rtl::OUString& Name, sal_Int32 PropertyConcepts) +sal_Bool ImplIntrospectionAccess::hasProperty(const OUString& Name, sal_Int32 PropertyConcepts) throw( RuntimeException ) { sal_Int32 i = mpStaticImpl->getPropertyIndex( Name ); @@ -1265,7 +1265,7 @@ Sequence< Property > ImplIntrospectionAccess::getProperties(sal_Int32 PropertyCo return maLastPropertySeq; } -Reference<XIdlMethod> ImplIntrospectionAccess::getMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts) +Reference<XIdlMethod> ImplIntrospectionAccess::getMethod(const OUString& Name, sal_Int32 MethodConcepts) throw( NoSuchMethodException, RuntimeException ) { Reference<XIdlMethod> xRet; @@ -1285,7 +1285,7 @@ Reference<XIdlMethod> ImplIntrospectionAccess::getMethod(const ::rtl::OUString& return xRet; } -sal_Bool ImplIntrospectionAccess::hasMethod(const ::rtl::OUString& Name, sal_Int32 MethodConcepts) +sal_Bool ImplIntrospectionAccess::hasMethod(const OUString& Name, sal_Int32 MethodConcepts) throw( RuntimeException ) { sal_Int32 i = mpStaticImpl->getMethodIndex( Name ); @@ -1350,8 +1350,8 @@ Sequence< Reference<XIdlMethod> > ImplIntrospectionAccess::getMethods(sal_Int32 { // Methode mit Concepts ausgeben const Reference< XIdlMethod >& rxMethod = pSourceMethods[ i ]; - ::rtl::OString aNameStr = ::rtl::OUStringToOString( rxMethod->getName(), osl_getThreadTextEncoding() ); - ::rtl::OString ConceptStr; + OString aNameStr = OUStringToOString( rxMethod->getName(), osl_getThreadTextEncoding() ); + OString ConceptStr; if( nConcept & MethodConcept::DANGEROUS ) ConceptStr += "DANGEROUS |"; if( nConcept & MethodConcept::PROPERTY ) @@ -1407,20 +1407,20 @@ Any ImplIntrospectionAccess::getMaterial(void) throw(RuntimeException) return maInspectedObject; } -// Hilfs-Funktion zur LowerCase-Wandlung eines ::rtl::OUString -::rtl::OUString toLower( ::rtl::OUString aUStr ) +// Hilfs-Funktion zur LowerCase-Wandlung eines OUString +OUString toLower( OUString aUStr ) { // Tabelle fuer XExactName pflegen - ::rtl::OUString aOWStr( aUStr.getStr() ); - ::rtl::OUString aOWLowerStr = aOWStr.toAsciiLowerCase(); - ::rtl::OUString aLowerUStr( aOWLowerStr.getStr() ); + OUString aOWStr( aUStr.getStr() ); + OUString aOWLowerStr = aOWStr.toAsciiLowerCase(); + OUString aLowerUStr( aOWLowerStr.getStr() ); return aLowerUStr; } // Methoden von XExactName -::rtl::OUString ImplIntrospectionAccess::getExactName( const ::rtl::OUString& rApproximateName ) throw( RuntimeException ) +OUString ImplIntrospectionAccess::getExactName( const OUString& rApproximateName ) throw( RuntimeException ) { - ::rtl::OUString aRetStr; + OUString aRetStr; LowerToExactNameMap::iterator aIt = mpStaticImpl->maLowerToExactNameMap.find( toLower( rApproximateName ) ); if( !( aIt == mpStaticImpl->maLowerToExactNameMap.end() ) ) @@ -1626,11 +1626,11 @@ public: Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw( RuntimeException ); // XServiceInfo - ::rtl::OUString SAL_CALL getImplementationName() throw(); - sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(); - Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw(); - static ::rtl::OUString SAL_CALL getImplementationName_Static( ); - static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static(void) throw(); + OUString SAL_CALL getImplementationName() throw(); + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(); + Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(); + static OUString SAL_CALL getImplementationName_Static( ); + static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(void) throw(); // Methoden von XIntrospection virtual Reference<XIntrospectionAccess> SAL_CALL inspect(const Any& aToInspectObj) @@ -1661,7 +1661,7 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX mpTypeProviderCache = NULL; // Spezielle Klassen holen -// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( ::rtl::OUString("com.sun.star.reflection.CoreReflection") ); +// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( 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("DefaultContext") ) >>= xContext; + OUString("DefaultContext") ) >>= xContext; OSL_ASSERT( xContext.is() ); if (xContext.is()) { xContext->getValueByName( - ::rtl::OUString("/singletons/com.sun.star.reflection.theCoreReflection") ) >>= mxCoreReflection; + OUString("/singletons/com.sun.star.reflection.theCoreReflection") ) >>= mxCoreReflection; OSL_ENSURE( mxCoreReflection.is(), "### CoreReflection singleton not accessible!?" ); } } if (! mxCoreReflection.is()) { throw DeploymentException( - ::rtl::OUString("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible"), + OUString("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible"), Reference< XInterface >() ); } - 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") ); + mxElementAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XElementAccess") ); + mxNameContainerClass = mxCoreReflection->forName( OUString("com.sun.star.container.XNameContainer") ); + mxNameAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XNameAccess") ); + mxIndexContainerClass = mxCoreReflection->forName( OUString("com.sun.star.container.XIndexContainer") ); + mxIndexAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XIndexAccess") ); + mxEnumerationAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XEnumerationAccess") ); + mxInterfaceClass = mxCoreReflection->forName( OUString("com.sun.star.uno.XInterface") ); + mxAggregationClass = mxCoreReflection->forName( OUString("com.sun.star.uno.XAggregation") ); mbDisposed = sal_False; } @@ -1772,16 +1772,16 @@ Sequence< sal_Int8 > ImplIntrospection::getImplementationId() // XServiceInfo -::rtl::OUString ImplIntrospection::getImplementationName() throw() +OUString ImplIntrospection::getImplementationName() throw() { return getImplementationName_Static(); } // XServiceInfo -sal_Bool ImplIntrospection::supportsService(const ::rtl::OUString& ServiceName) throw() +sal_Bool ImplIntrospection::supportsService(const OUString& ServiceName) throw() { - Sequence< ::rtl::OUString > aSNL = getSupportedServiceNames(); - const ::rtl::OUString * pArray = aSNL.getConstArray(); + Sequence< OUString > aSNL = getSupportedServiceNames(); + const OUString * pArray = aSNL.getConstArray(); for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) return sal_True; @@ -1789,23 +1789,23 @@ sal_Bool ImplIntrospection::supportsService(const ::rtl::OUString& ServiceName) } // XServiceInfo -Sequence< ::rtl::OUString > ImplIntrospection::getSupportedServiceNames(void) throw() +Sequence< OUString > ImplIntrospection::getSupportedServiceNames(void) throw() { return getSupportedServiceNames_Static(); } //************************************************************************* // Helper XServiceInfo -::rtl::OUString ImplIntrospection::getImplementationName_Static( ) +OUString ImplIntrospection::getImplementationName_Static( ) { - return ::rtl::OUString::createFromAscii( IMPLEMENTATION_NAME ); + return OUString::createFromAscii( IMPLEMENTATION_NAME ); } // ORegistryServiceManager_Static -Sequence< ::rtl::OUString > ImplIntrospection::getSupportedServiceNames_Static(void) throw() +Sequence< OUString > ImplIntrospection::getSupportedServiceNames_Static(void) throw() { - Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS.getArray()[0] = ::rtl::OUString::createFromAscii( SERVICE_NAME ); + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString::createFromAscii( SERVICE_NAME ); return aSNS; } @@ -1885,10 +1885,10 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS rType.getDescription( &pTD ); if( pTD ) { - ::rtl::OUString sOWName( pTD->pTypeName ); + OUString sOWName( pTD->pTypeName ); if( !xRefl.is() ) { - xRefl = Reference< XIdlReflection >( xMgr->createInstance( ::rtl::OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); + xRefl = Reference< XIdlReflection >( xMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); } xRetClass = xRefl->forName( sOWName ); @@ -2134,7 +2134,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( pAccess->mnPropertySetPropCount++; // Namen in Hashtable eintragen, wenn nicht schon bekannt - ::rtl::OUString aPropName = rProp.Name; + OUString aPropName = rProp.Name; // Haben wir den Namen schon? IntrospectionNameMap::iterator aIt = rPropNameMap.find( aPropName ); @@ -2226,7 +2226,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( // In eigenes Property-Array eintragen Property& rProp = pAllPropArray[ rPropCount ]; - ::rtl::OUString aFieldName = xField->getName(); + OUString aFieldName = xField->getName(); rProp.Name = aFieldName; rProp.Handle = rPropCount; Type aFieldType( xPropType->getTypeClass(), xPropType->getName() ); @@ -2237,7 +2237,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( ? READONLY : 0; // Namen in Hashtable eintragen - ::rtl::OUString aPropName = rProp.Name; + OUString aPropName = rProp.Name; // Haben wir den Namen schon? IntrospectionNameMap::iterator aIt = rPropNameMap.find( aPropName ); @@ -2289,9 +2289,9 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( pLocalMethodConcepts[ i ] = 0; } - ::rtl::OUString aMethName; - ::rtl::OUString aPropName; - ::rtl::OUString aStartStr; + OUString aMethName; + OUString aPropName; + OUString aStartStr; for( i = 0 ; i < nSourceMethodCount ; i++ ) { // Methode ansprechen @@ -2316,7 +2316,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else { - if( aMethName != ::rtl::OUString("queryInterface") ) + if( aMethName != OUString("queryInterface") ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; @@ -2428,15 +2428,15 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( continue; // Name holen und auswerten - ::rtl::OUString aMethName2 = rxMethod_k->getName(); - ::rtl::OUString aStartStr2 = aMethName2.copy( 0, 3 ); - // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!! + OUString aMethName2 = rxMethod_k->getName(); + OUString aStartStr2 = aMethName2.copy( 0, 3 ); + // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! if( !( aStartStr2 == "set" ) ) continue; // Ist es denn der gleiche Name? - ::rtl::OUString aPropName2 = aMethName2.copy( 3 ); - // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!! + OUString aPropName2 = aMethName2.copy( 3 ); + // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! if( !( aPropName == aPropName2 ) ) continue; @@ -2481,20 +2481,20 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( // Ist es eine addListener-Methode? else if( aStartStr == "add" ) { - ::rtl::OUString aListenerStr( "Listener" ); + OUString aListenerStr( "Listener" ); // Namen der potentiellen Property sal_Int32 nStrLen = aMethName.getLength(); sal_Int32 nCopyLen = nStrLen - aListenerStr.getLength(); - ::rtl::OUString aEndStr = aMethName.copy( nCopyLen > 0 ? nCopyLen : 0 ); + OUString aEndStr = aMethName.copy( nCopyLen > 0 ? nCopyLen : 0 ); // Endet das Teil auf Listener? - // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!! + // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! if( !( aEndStr == aListenerStr ) ) continue; // Welcher Listener? - ::rtl::OUString aListenerName = aMethName.copy( 3, nStrLen - aListenerStr.getLength() - 3 ); + OUString aListenerName = aMethName.copy( 3, nStrLen - aListenerStr.getLength() - 3 ); // TODO: Hier koennten noch genauere Pruefungen vorgenommen werden // - Rueckgabe-Typ @@ -2513,21 +2513,21 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( continue; // Name holen und auswerten - ::rtl::OUString aMethName2 = rxMethod_k->getName(); + OUString aMethName2 = rxMethod_k->getName(); sal_Int32 nNameLen = aMethName2.getLength(); sal_Int32 nCopyLen2 = (nNameLen < 6) ? nNameLen : 6; - ::rtl::OUString aStartStr2 = aMethName2.copy( 0, nCopyLen2 ); - ::rtl::OUString aRemoveStr("remove" ); - // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!! + OUString aStartStr2 = aMethName2.copy( 0, nCopyLen2 ); + OUString aRemoveStr("remove" ); + // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! if( !( aStartStr2 == aRemoveStr ) ) continue; // Ist es denn der gleiche Listener? if( aMethName2.getLength() - aRemoveStr.getLength() <= aListenerStr.getLength() ) continue; - ::rtl::OUString aListenerName2 = aMethName2.copy + OUString aListenerName2 = aMethName2.copy ( 6, aMethName2.getLength() - aRemoveStr.getLength() - aListenerStr.getLength() ); - // ACHTUNG: Wegen SDL-Bug NICHT != bei ::rtl::OUString verwenden !!! + // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! if( !( aListenerName == aListenerName2 ) ) continue; @@ -2676,7 +2676,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( const Reference<XIdlMethod>& rxMethod = pSourceMethods[i]; // Namen in Hashtable eintragen, wenn nicht schon bekannt - ::rtl::OUString aMethName2 = rxMethod->getName(); + OUString aMethName2 = rxMethod->getName(); IntrospectionNameMap::iterator aIt = rMethodNameMap.find( aMethName2 ); if( aIt == rMethodNameMap.end() ) { @@ -2809,7 +2809,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( { Reference<XIdlField> xField = pFields[i]; Reference<XIdlClass> xPropType = xField->getType(); - ::rtl::OUString aPropName = xField->getName(); + OUString aPropName = xField->getName(); // Ist die PropertySequence gross genug? pAccess->checkPropertyArraysSize @@ -2878,7 +2878,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL introspection_component_getFactory( { Reference< XSingleServiceFactory > xFactory( createOneInstanceFactory( reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), - ::rtl::OUString::createFromAscii( pImplName ), + OUString::createFromAscii( pImplName ), stoc_inspect::ImplIntrospection_CreateInstance, stoc_inspect::ImplIntrospection::getSupportedServiceNames_Static() ) ); diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index fd2d75e29123..dd34050b501c 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -63,7 +63,6 @@ using namespace com::sun::star::registry; using namespace com::sun::star::container; using namespace cppu; using namespace osl; -using ::rtl::OUString; namespace stoc_inv { diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index e40ca2f4f139..2600f94eff4c 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -199,16 +199,16 @@ osl::Mutex SingletonFactory::m_aMutex; css::uno::Reference< css::uno::XInterface > SingletonFactory::m_xSingleton; bool SingletonFactory::m_bDisposed = false; -rtl::OUString serviceGetImplementationName() +OUString serviceGetImplementationName() { - return rtl::OUString( + return OUString( "com.sun.star.comp.stoc.JavaVirtualMachine"); } -css::uno::Sequence< rtl::OUString > serviceGetSupportedServiceNames() +css::uno::Sequence< OUString > serviceGetSupportedServiceNames() { - rtl::OUString aServiceName("com.sun.star.java.JavaVirtualMachine"); - return css::uno::Sequence< rtl::OUString >(&aServiceName, 1); + OUString aServiceName("com.sun.star.java.JavaVirtualMachine"); + return css::uno::Sequence< OUString >(&aServiceName, 1); } css::uno::Reference< css::uno::XInterface > SAL_CALL serviceCreateInstance( @@ -257,7 +257,7 @@ bool askForRetry(css::uno::Any const & rException) if (xContext.is()) { css::uno::Reference< css::task::XInteractionHandler > xHandler; - xContext->getValueByName(rtl::OUString( + xContext->getValueByName(OUString( "java-vm.interaction-handler")) >>= xHandler; if (xHandler.is()) @@ -278,31 +278,31 @@ 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("com.sun.star.configuration.ConfigurationRegistry"), + OUString("com.sun.star.configuration.ConfigurationRegistry"), xCtx ); - if(!xConfRegistry.is()) throw css::uno::RuntimeException(rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + if(!xConfRegistry.is()) throw css::uno::RuntimeException(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("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException(OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); - xConfRegistry_simple->open(rtl::OUString("org.openoffice.Inet"), sal_True, sal_False); + xConfRegistry_simple->open(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("Settings/ooInetProxyType")); + css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey(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("Settings/ooInetFTPProxyName")); + css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetFTPProxyName")); if(ftpProxy_name.is() && !ftpProxy_name->getStringValue().isEmpty()) { - rtl::OUString ftpHost = rtl::OUString("ftp.proxyHost="); + OUString ftpHost = OUString("ftp.proxyHost="); ftpHost += ftpProxy_name->getStringValue(); // read ftp proxy port - css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetFTPProxyPort")); + css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetFTPProxyPort")); if(ftpProxy_port.is() && ftpProxy_port->getLongValue()) { - rtl::OUString ftpPort = rtl::OUString("ftp.proxyPort="); - ftpPort += rtl::OUString::valueOf(ftpProxy_port->getLongValue()); + OUString ftpPort = OUString("ftp.proxyPort="); + ftpPort += OUString::valueOf(ftpProxy_port->getLongValue()); pjvm->pushProp(ftpHost); pjvm->pushProp(ftpPort); @@ -310,16 +310,16 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read http proxy name - css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPProxyName")); + css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPProxyName")); if(httpProxy_name.is() && !httpProxy_name->getStringValue().isEmpty()) { - rtl::OUString httpHost = rtl::OUString("http.proxyHost="); + OUString httpHost = OUString("http.proxyHost="); httpHost += httpProxy_name->getStringValue(); // read http proxy port - css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPProxyPort")); + css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPProxyPort")); if(httpProxy_port.is() && httpProxy_port->getLongValue()) { - rtl::OUString httpPort = rtl::OUString("http.proxyPort="); - httpPort += rtl::OUString::valueOf(httpProxy_port->getLongValue()); + OUString httpPort = OUString("http.proxyPort="); + httpPort += OUString::valueOf(httpProxy_port->getLongValue()); pjvm->pushProp(httpHost); pjvm->pushProp(httpPort); @@ -327,16 +327,16 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read https proxy name - css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPSProxyName")); + css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPSProxyName")); if(httpsProxy_name.is() && !httpsProxy_name->getStringValue().isEmpty()) { - rtl::OUString httpsHost = rtl::OUString("https.proxyHost="); + OUString httpsHost = OUString("https.proxyHost="); httpsHost += httpsProxy_name->getStringValue(); // read https proxy port - css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetHTTPSProxyPort")); + css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPSProxyPort")); if(httpsProxy_port.is() && httpsProxy_port->getLongValue()) { - rtl::OUString httpsPort = rtl::OUString("https.proxyPort="); - httpsPort += rtl::OUString::valueOf(httpsProxy_port->getLongValue()); + OUString httpsPort = OUString("https.proxyPort="); + httpsPort += OUString::valueOf(httpsProxy_port->getLongValue()); pjvm->pushProp(httpsHost); pjvm->pushProp(httpsPort); @@ -344,11 +344,11 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read nonProxyHosts - css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(rtl::OUString("Settings/ooInetNoProxy")); + css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(OUString("Settings/ooInetNoProxy")); if(nonProxies_name.is() && !nonProxies_name->getStringValue().isEmpty()) { - rtl::OUString httpNonProxyHosts = rtl::OUString("http.nonProxyHosts="); - rtl::OUString ftpNonProxyHosts= rtl::OUString("ftp.nonProxyHosts="); - rtl::OUString value= nonProxies_name->getStringValue(); + OUString httpNonProxyHosts = OUString("http.nonProxyHosts="); + OUString ftpNonProxyHosts= OUString("ftp.nonProxyHosts="); + OUString value= nonProxies_name->getStringValue(); // replace the separator ";" by "|" value= value.replace((sal_Unicode)';', (sal_Unicode)'|'); @@ -386,26 +386,26 @@ void getDefaultLocaleFromConfig( { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - rtl::OUString( + OUString( "com.sun.star.configuration.ConfigurationRegistry"), xCtx ); if(!xConfRegistry.is()) throw css::uno::RuntimeException( - rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + 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("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); - xConfRegistry_simple->open(rtl::OUString("org.openoffice.Setup"), sal_True, sal_False); + xConfRegistry_simple->open(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("L10N/ooLocale")); + css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(OUString("L10N/ooLocale")); if(locale.is() && !locale->getStringValue().isEmpty()) { - rtl::OUString language; - rtl::OUString country; + OUString language; + OUString country; sal_Int32 index = locale->getStringValue().indexOf((sal_Unicode) '-'); @@ -414,14 +414,14 @@ void getDefaultLocaleFromConfig( country = locale->getStringValue().copy(index + 1); if(!language.isEmpty()) { - rtl::OUString prop("user.language="); + OUString prop("user.language="); prop += language; pjvm->pushProp(prop); } if(!country.isEmpty()) { - rtl::OUString prop("user.country="); + OUString prop("user.country="); prop += country; pjvm->pushProp(prop); @@ -441,55 +441,55 @@ void getJavaPropsFromSafetySettings( { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - rtl::OUString( + OUString( "com.sun.star.configuration.ConfigurationRegistry"), xCtx); if(!xConfRegistry.is()) throw css::uno::RuntimeException( - rtl::OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + 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("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); xConfRegistry_simple->open( - rtl::OUString("org.openoffice.Office.Java"), + 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("VirtualMachine/NetAccess")); + css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey(OUString("VirtualMachine/NetAccess")); if (key_NetAccess.is()) { sal_Int32 val= key_NetAccess->getLongValue(); - rtl::OUString sVal; + OUString sVal; switch( val) { - case 0: sVal= rtl::OUString("host"); + case 0: sVal= OUString("host"); break; - case 1: sVal= rtl::OUString("unrestricted"); + case 1: sVal= OUString("unrestricted"); break; - case 3: sVal= rtl::OUString("none"); + case 3: sVal= OUString("none"); break; } - rtl::OUString sProperty("appletviewer.security.mode="); + OUString sProperty("appletviewer.security.mode="); sProperty= sProperty + sVal; pjvm->pushProp(sProperty); } css::uno::Reference<css::registry::XRegistryKey> key_CheckSecurity= xRegistryRootKey->openKey( - rtl::OUString("VirtualMachine/Security")); + OUString("VirtualMachine/Security")); if( key_CheckSecurity.is()) { sal_Bool val= (sal_Bool) key_CheckSecurity->getLongValue(); - rtl::OUString sProperty("stardiv.security.disableSecurity="); + OUString sProperty("stardiv.security.disableSecurity="); if( val) - sProperty= sProperty + rtl::OUString("false"); + sProperty= sProperty + OUString("false"); else - sProperty= sProperty + rtl::OUString("true"); + sProperty= sProperty + OUString("true"); pjvm->pushProp( sProperty); } } @@ -515,7 +515,7 @@ static void setTimeZone(stoc_javavm::JVM * pjvm) throw() { #endif if (!strcmp(TIMEZONE, p)) - pjvm->pushProp(rtl::OUString("user.timezone=ECT")); + pjvm->pushProp(OUString("user.timezone=ECT")); } void initVMConfiguration( @@ -529,7 +529,7 @@ void initVMConfiguration( } catch(const css::uno::Exception & exception) { #if OSL_DEBUG_LEVEL > 1 - rtl::OString message = rtl::OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); + OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); OSL_TRACE("javavm.cxx: can not get INetProps cause of >%s<", message.getStr()); #else (void) exception; // unused @@ -541,7 +541,7 @@ void initVMConfiguration( } catch(const css::uno::Exception & exception) { #if OSL_DEBUG_LEVEL > 1 - rtl::OString message = rtl::OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); + OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); OSL_TRACE("javavm.cxx: can not get locale cause of >%s<", message.getStr()); #else (void) exception; // unused @@ -554,7 +554,7 @@ void initVMConfiguration( } catch(const css::uno::Exception & exception) { #if OSL_DEBUG_LEVEL > 1 - rtl::OString message = rtl::OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); + OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); OSL_TRACE("javavm.cxx: couldn't get safety settings because of >%s<", message.getStr()); #else (void) exception; // unused @@ -614,10 +614,10 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); if (m_xUnoVirtualMachine.is()) throw css::uno::RuntimeException( - rtl::OUString( + OUString( "bad call to initialize"), static_cast< cppu::OWeakObject * >(this)); css::beans::NamedValue val; @@ -646,7 +646,7 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & m_xUnoVirtualMachine = new jvmaccess::UnoVirtualMachine(vm, 0); } catch (jvmaccess::UnoVirtualMachine::CreationException &) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( "jvmaccess::UnoVirtualMachine::CreationException"), static_cast< cppu::OWeakObject * >(this)); } @@ -654,7 +654,7 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & } if (!m_xUnoVirtualMachine.is()) { throw css::lang::IllegalArgumentException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "sequence of exactly one any containing either (a) a" " com.sun.star.beans.NamedValue with Name" @@ -667,24 +667,24 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & m_xVirtualMachine = m_xUnoVirtualMachine->getVirtualMachine(); } -rtl::OUString SAL_CALL JavaVirtualMachine::getImplementationName() +OUString SAL_CALL JavaVirtualMachine::getImplementationName() throw (css::uno::RuntimeException) { return serviceGetImplementationName(); } sal_Bool SAL_CALL -JavaVirtualMachine::supportsService(rtl::OUString const & rServiceName) +JavaVirtualMachine::supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException) { - css::uno::Sequence< rtl::OUString > aNames(getSupportedServiceNames()); + css::uno::Sequence< OUString > aNames(getSupportedServiceNames()); for (sal_Int32 i = 0; i < aNames.getLength(); ++i) if (aNames[i] == rServiceName) return true; return false; } -css::uno::Sequence< rtl::OUString > SAL_CALL +css::uno::Sequence< OUString > SAL_CALL JavaVirtualMachine::getSupportedServiceNames() throw (css::uno::RuntimeException) { @@ -715,7 +715,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); css::uno::Sequence< sal_Int8 > aId(16); rtl_getGlobalProcessId(reinterpret_cast< sal_uInt8 * >(aId.getArray())); enum ReturnType { @@ -745,26 +745,26 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) initVMConfiguration(&aJvm, m_xContext->getServiceManager(), m_xContext); //Create the JavaVMOption array - const std::vector<rtl::OUString> & props = aJvm.getProperties(); + const std::vector<OUString> & props = aJvm.getProperties(); boost::scoped_array<JavaVMOption> sarOptions( new JavaVMOption[props.size()]); JavaVMOption * arOptions = sarOptions.get(); //Create an array that contains the strings which are passed //into the options - boost::scoped_array<rtl::OString> sarPropStrings( - new rtl::OString[props.size()]); - rtl::OString * arPropStrings = sarPropStrings.get(); + boost::scoped_array<OString> sarPropStrings( + new OString[props.size()]); + OString * arPropStrings = sarPropStrings.get(); - rtl::OString sJavaOption("-"); - typedef std::vector<rtl::OUString>::const_iterator cit; + OString sJavaOption("-"); + typedef std::vector<OUString>::const_iterator cit; int index = 0; for (cit i = props.begin(); i != props.end(); ++i) { - rtl::OString sOption = rtl::OUStringToOString( + OString sOption = OUStringToOString( *i, osl_getThreadTextEncoding()); if (!sOption.matchIgnoreAsciiCase(sJavaOption, 0)) - arPropStrings[index]= rtl::OString("-D") + sOption; + arPropStrings[index]= OString("-D") + sOption; else arPropStrings[index] = sOption; @@ -805,7 +805,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) //%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. //Please install a JRE and restart %PRODUCTNAME. css::java::JavaNotFoundException exc( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::getJavaVM failed because" " No suitable JRE found!")), @@ -817,7 +817,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) { //An unexpected error occurred throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + OUString(RTL_CONSTASCII_USTRINGPARAM( "[JavaVirtualMachine]:An unexpected error occurred" " while searching for a Java!")), 0); } @@ -829,7 +829,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) // - Options - %PRODUCTNAME - Java, select the Java runtime environment // you want to have used by %PRODUCTNAME. css::java::InvalidJavaSettingsException exc( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::getJavaVM failed because" " Java settings have changed!")), @@ -844,7 +844,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) //this task. However, use of a JRE has been disabled. Do you want to //enable the use of a JRE now? css::java::JavaDisabledException exc( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::getJavaVM failed because" " Java is disabled!")), @@ -886,7 +886,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) //is defective. Please select another version or install a new JRE //and select it under Tools - Options - %PRODUCTNAME - Java. css::java::JavaVMCreationFailureException exc( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::getJavaVM failed because" " Java is defective!")), @@ -906,7 +906,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) //For the selected Java runtime environment to work properly, //%PRODUCTNAME must be restarted. Please restart %PRODUCTNAME now. css::java::RestartRequiredException exc( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::getJavaVM failed because" "Office must be restarted before Java can be used!")), @@ -918,7 +918,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) //RuntimeException: error is somewhere in the java framework. //An unexpected error occurred throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + OUString(RTL_CONSTASCII_USTRINGPARAM( "[JavaVirtualMachine]:An unexpected error occurred" " while starting Java!")), 0); } @@ -947,7 +947,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) setUpUnoVirtualMachine(guard.getEnvironment()); } catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "jvmaccess::VirtualMachine::AttachGuard::" "CreationException occurred")), @@ -958,7 +958,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) default: // RETURN_JAVAVM if (m_pJavaVm == 0) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine service was initialized in a way" " that the requested JavaVM pointer is not available")), @@ -983,7 +983,7 @@ sal_Bool SAL_CALL JavaVirtualMachine::isVMStarted() osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); return m_xUnoVirtualMachine.is(); } @@ -994,7 +994,7 @@ sal_Bool SAL_CALL JavaVirtualMachine::isVMEnabled() osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); } // stoc_javavm::JVM aJvm; // initVMConfiguration(&aJvm, m_xContext->getServiceManager(), m_xContext); @@ -1012,7 +1012,7 @@ sal_Bool SAL_CALL JavaVirtualMachine::isThreadAttached() osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); // TODO isThreadAttached only returns true if the thread was attached via // registerThread: GuardStack * pStack @@ -1026,10 +1026,10 @@ void SAL_CALL JavaVirtualMachine::registerThread() osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); if (!m_xUnoVirtualMachine.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + OUString(RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::registerThread:" " null VirtualMachine")), static_cast< cppu::OWeakObject * >(this)); @@ -1049,7 +1049,7 @@ void SAL_CALL JavaVirtualMachine::registerThread() catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::registerThread: jvmaccess::" "VirtualMachine::AttachGuard::CreationException")), @@ -1063,10 +1063,10 @@ void SAL_CALL JavaVirtualMachine::revokeThread() osl::MutexGuard aGuard(*this); if (m_bDisposed) throw css::lang::DisposedException( - rtl::OUString(), static_cast< cppu::OWeakObject * >(this)); + OUString(), static_cast< cppu::OWeakObject * >(this)); if (!m_xUnoVirtualMachine.is()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + OUString(RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::revokeThread:" " null VirtualMachine")), static_cast< cppu::OWeakObject * >(this)); @@ -1074,7 +1074,7 @@ void SAL_CALL JavaVirtualMachine::revokeThread() = static_cast< GuardStack * >(m_aAttachGuards.getData()); if (pStack == 0 || pStack->empty()) throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + OUString(RTL_CONSTASCII_USTRINGPARAM( "JavaVirtualMachine::revokeThread:" " no matching registerThread")), static_cast< cppu::OWeakObject * >(this)); @@ -1118,11 +1118,11 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( // solution must atomically (i.e., protected by a mutex) read the latest // value from the configuration and set it as a system property at the JVM. - rtl::OUString aAccessor; + OUString aAccessor; rEvent.Accessor >>= aAccessor; - rtl::OUString aPropertyName; - rtl::OUString aPropertyName2; - rtl::OUString aPropertyValue; + OUString aPropertyName; + OUString aPropertyName2; + OUString aPropertyValue; bool bSecurityChanged = false; if ( aAccessor == "ooInetProxyType" ) { @@ -1134,73 +1134,73 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } else if ( aAccessor == "ooInetHTTPProxyName" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "http.proxyHost"); rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetHTTPProxyPort" ) { aPropertyName - = rtl::OUString("http.proxyPort"); + = OUString("http.proxyPort"); sal_Int32 n = 0; rEvent.Element >>= n; - aPropertyValue = rtl::OUString::valueOf(n); + aPropertyValue = OUString::valueOf(n); } else if ( aAccessor == "ooInetHTTPSProxyName" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "https.proxyHost"); rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetHTTPSProxyPort" ) { aPropertyName - = rtl::OUString("https.proxyPort"); + = OUString("https.proxyPort"); sal_Int32 n = 0; rEvent.Element >>= n; - aPropertyValue = rtl::OUString::valueOf(n); + aPropertyValue = OUString::valueOf(n); } else if ( aAccessor == "ooInetFTPProxyName" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "ftp.proxyHost"); rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetFTPProxyPort" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "ftp.proxyPort"); sal_Int32 n = 0; rEvent.Element >>= n; - aPropertyValue = rtl::OUString::valueOf(n); + aPropertyValue = OUString::valueOf(n); } else if ( aAccessor == "ooInetNoProxy" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "http.nonProxyHosts"); - aPropertyName2 = rtl::OUString( + aPropertyName2 = OUString( "ftp.nonProxyHosts"); rEvent.Element >>= aPropertyValue; aPropertyValue = aPropertyValue.replace(';', '|'); } else if ( aAccessor == "NetAccess" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "appletviewer.security.mode"); sal_Int32 n = 0; if (rEvent.Element >>= n) switch (n) { case 0: - aPropertyValue = rtl::OUString( + aPropertyValue = OUString( "host"); break; case 1: - aPropertyValue = rtl::OUString( + aPropertyValue = OUString( "unrestricted"); break; case 3: - aPropertyValue = rtl::OUString( + aPropertyValue = OUString( "none"); break; } @@ -1210,15 +1210,15 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } else if ( aAccessor == "Security" ) { - aPropertyName = rtl::OUString( + aPropertyName = OUString( "stardiv.security.disableSecurity"); sal_Bool b = sal_Bool(); if (rEvent.Element >>= b) if (b) - aPropertyValue = rtl::OUString( + aPropertyValue = OUString( "false"); else - aPropertyValue = rtl::OUString( + aPropertyValue = OUString( "true"); else return; @@ -1245,12 +1245,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("JNI:FindClass java/lang/System"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:GetStaticMethodID java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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 @@ -1261,14 +1261,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("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:FindClass java/util/Properties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:GetMethodID java.util.Properties.remove"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.util.Properties.remove"), 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName); // special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only @@ -1276,7 +1276,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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName2); } } @@ -1284,20 +1284,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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName, jsPropValue); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName2, jsPropValue); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } } @@ -1307,7 +1307,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("JNI:GetStaticMethodID java.lang.System.getSecurityManager"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getSecurityManager"), 0); jobject joSecur= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetSecur); if (joSecur != 0) { @@ -1321,12 +1321,12 @@ 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("JNI:FindClass java.lang.Class"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:GetMethodID java.lang.Class.getName"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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); + OUString sName( jcharName); jboolean bIsSandbox; if ( sName == "com.sun.star.lib.sandbox.SandboxSecurity" ) bIsSandbox= JNI_TRUE; @@ -1338,9 +1338,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("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); pJNIEnv->CallVoidMethod( joSecur, jmReset); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); } } } @@ -1348,7 +1348,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { throw css::uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + OUString(RTL_CONSTASCII_USTRINGPARAM( "jvmaccess::VirtualMachine::AttachGuard::" "CreationException")), 0); @@ -1409,7 +1409,7 @@ void JavaVirtualMachine::registerConfigChangesListener() try { css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider( - m_xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( + m_xContext->getServiceManager()->createInstanceWithContext( OUString( "com.sun.star.configuration.ConfigurationProvider"), m_xContext), css::uno::UNO_QUERY); if (xConfigProvider.is()) @@ -1418,13 +1418,13 @@ void JavaVirtualMachine::registerConfigChangesListener() // arguments for ConfigurationAccess css::uno::Sequence< css::uno::Any > aArguments(2); aArguments[0] <<= css::beans::PropertyValue( - rtl::OUString("nodepath"), + OUString("nodepath"), 0, - css::uno::makeAny(rtl::OUString("org.openoffice.Inet/Settings")), + css::uno::makeAny(OUString("org.openoffice.Inet/Settings")), css::beans::PropertyState_DIRECT_VALUE); // depth: -1 means unlimited aArguments[1] <<= css::beans::PropertyValue( - rtl::OUString("depth"), + OUString("depth"), 0, css::uno::makeAny( (sal_Int32)-1), css::beans::PropertyState_DIRECT_VALUE); @@ -1432,7 +1432,7 @@ void JavaVirtualMachine::registerConfigChangesListener() m_xInetConfiguration = css::uno::Reference< css::container::XContainer >( xConfigProvider->createInstanceWithArguments( - rtl::OUString( + OUString( "com.sun.star.configuration.ConfigurationAccess"), aArguments), css::uno::UNO_QUERY); @@ -1443,13 +1443,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("nodepath"), + OUString("nodepath"), 0, - css::uno::makeAny(rtl::OUString("org.openoffice.Office.Java/VirtualMachine")), + css::uno::makeAny(OUString("org.openoffice.Office.Java/VirtualMachine")), css::beans::PropertyState_DIRECT_VALUE); // depth: -1 means unlimited aArguments2[1] <<= css::beans::PropertyValue( - rtl::OUString("depth"), + OUString("depth"), 0, css::uno::makeAny( (sal_Int32)-1), css::beans::PropertyState_DIRECT_VALUE); @@ -1457,7 +1457,7 @@ void JavaVirtualMachine::registerConfigChangesListener() m_xJavaConfiguration = css::uno::Reference< css::container::XContainer >( xConfigProvider->createInstanceWithArguments( - rtl::OUString( + OUString( "com.sun.star.configuration.ConfigurationAccess"), aArguments2), css::uno::UNO_QUERY); @@ -1468,7 +1468,7 @@ void JavaVirtualMachine::registerConfigChangesListener() }catch(const css::uno::Exception & e) { #if OSL_DEBUG_LEVEL > 1 - rtl::OString message = rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); + OString message = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OSL_TRACE("javavm.cxx: could not set up listener for Configuration because of >%s<", message.getStr()); #else (void) e; // unused @@ -1490,98 +1490,98 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) JNIEnv * pJNIEnv = aAttachGuard.getEnvironment(); // The Java Properties - rtl::OUString sFtpProxyHost("ftp.proxyHost"); - rtl::OUString sFtpProxyPort("ftp.proxyPort"); - rtl::OUString sFtpNonProxyHosts ("ftp.nonProxyHosts"); - rtl::OUString sHttpProxyHost("http.proxyHost"); - rtl::OUString sHttpProxyPort("http.proxyPort"); - rtl::OUString sHttpNonProxyHosts("http.nonProxyHosts"); + OUString sFtpProxyHost("ftp.proxyHost"); + OUString sFtpProxyPort("ftp.proxyPort"); + OUString sFtpNonProxyHosts ("ftp.nonProxyHosts"); + OUString sHttpProxyHost("http.proxyHost"); + OUString sHttpProxyPort("http.proxyPort"); + OUString sHttpNonProxyHosts("http.nonProxyHosts"); // creat Java Properties as JNI strings jstring jsFtpProxyHost= pJNIEnv->NewString( sFtpProxyHost.getStr(), sFtpProxyHost.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); jstring jsFtpProxyPort= pJNIEnv->NewString( sFtpProxyPort.getStr(), sFtpProxyPort.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); jstring jsFtpNonProxyHosts= pJNIEnv->NewString( sFtpNonProxyHosts.getStr(), sFtpNonProxyHosts.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); jstring jsHttpProxyHost= pJNIEnv->NewString( sHttpProxyHost.getStr(), sHttpProxyHost.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); jstring jsHttpProxyPort= pJNIEnv->NewString( sHttpProxyPort.getStr(), sHttpProxyPort.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); jstring jsHttpNonProxyHosts= pJNIEnv->NewString( sHttpNonProxyHosts.getStr(), sHttpNonProxyHosts.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:FindClass java/lang/System"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:GetStaticMethodID java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:FindClass java/util/Properties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/util/Properties"), 0); if (set_reset) { // Set all network properties with the VM JVM jvm; getINetPropsFromConfig( &jvm, m_xContext->getServiceManager(), m_xContext); - const ::std::vector< rtl::OUString> & Props = jvm.getProperties(); - typedef ::std::vector< rtl::OUString >::const_iterator C_IT; + const ::std::vector< OUString> & Props = jvm.getProperties(); + typedef ::std::vector< OUString >::const_iterator C_IT; for( C_IT i= Props.begin(); i != Props.end(); ++i) { - rtl::OUString prop= *i; + OUString prop= *i; sal_Int32 index= prop.indexOf( (sal_Unicode)'='); - rtl::OUString propName= prop.copy( 0, index); - rtl::OUString propValue= prop.copy( index + 1); + OUString propName= prop.copy( 0, index); + OUString propValue= prop.copy( index + 1); if( propName.equals( sFtpProxyHost)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyHost, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyPort, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpNonProxyHosts, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyHost, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyPort, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(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("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpNonProxyHosts, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(rtl::OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); } } } @@ -1589,7 +1589,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("JNI:GetMethodID java.util.Property.remove"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.util.Property.remove"), 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyHost); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyPort); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpNonProxyHosts); @@ -1611,20 +1611,20 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { css::uno::Reference< css::util::XMacroExpander > exp = css::util::theMacroExpander::get(m_xContext); - rtl::OUString baseUrl; + OUString baseUrl; try { baseUrl = exp->expandMacros( - rtl::OUString("$URE_INTERNAL_JAVA_DIR/")); + OUString("$URE_INTERNAL_JAVA_DIR/")); } catch (css::lang::IllegalArgumentException &) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( "com::sun::star::lang::IllegalArgumentException"), static_cast< cppu::OWeakObject * >(this)); } - rtl::OUString classPath; + OUString classPath; try { classPath = exp->expandMacros( - rtl::OUString("$URE_INTERNAL_JAVA_CLASSPATH")); + OUString("$URE_INTERNAL_JAVA_CLASSPATH")); } catch (css::lang::IllegalArgumentException &) {} jclass class_URLClassLoader = environment->FindClass( "java/net/URLClassLoader"); @@ -1719,7 +1719,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { m_xVirtualMachine, cl2); } catch (jvmaccess::UnoVirtualMachine::CreationException &) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( "jvmaccess::UnoVirtualMachine::CreationException"), static_cast< cppu::OWeakObject * >(this)); } @@ -1728,7 +1728,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { void JavaVirtualMachine::handleJniException(JNIEnv * environment) { environment->ExceptionClear(); throw css::uno::RuntimeException( - rtl::OUString("JNI exception occurred"), + OUString("JNI exception occurred"), static_cast< cppu::OWeakObject * >(this)); } diff --git a/stoc/source/javavm/javavm.hxx b/stoc/source/javavm/javavm.hxx index 913106aa42c7..c165d172d23a 100644 --- a/stoc/source/javavm/javavm.hxx +++ b/stoc/source/javavm/javavm.hxx @@ -71,14 +71,14 @@ public: throw (com::sun::star::uno::Exception); // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL - supportsService(rtl::OUString const & rServiceName) + supportsService(OUString const & rServiceName) throw (com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); // XJavaVM diff --git a/stoc/source/javavm/jvmargs.cxx b/stoc/source/javavm/jvmargs.cxx index 7497fcbbc89e..2ab9e20cc378 100644 --- a/stoc/source/javavm/jvmargs.cxx +++ b/stoc/source/javavm/jvmargs.cxx @@ -32,7 +32,7 @@ void JVM::pushProp(const OUString & property) _props.push_back(property); } -const ::std::vector< ::rtl::OUString > & JVM::getProperties() const +const ::std::vector< OUString > & JVM::getProperties() const { return _props; } diff --git a/stoc/source/javavm/jvmargs.hxx b/stoc/source/javavm/jvmargs.hxx index c003835ba9b5..6a5202f5ee2a 100644 --- a/stoc/source/javavm/jvmargs.hxx +++ b/stoc/source/javavm/jvmargs.hxx @@ -37,13 +37,13 @@ extern "C" { namespace stoc_javavm { class JVM { - ::std::vector<rtl::OUString> _props; + ::std::vector<OUString> _props; public: JVM() throw(); - void pushProp(const ::rtl::OUString & uString); - const ::std::vector< ::rtl::OUString> & getProperties() const; + void pushProp(const OUString & uString); + const ::std::vector< OUString> & getProperties() const; }; } diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index b2e20e37f8c6..45f9959b3bce 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -53,7 +53,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::registry; using namespace cppu; using namespace osl; -using ::rtl::OUString; extern rtl_StandardModuleCount g_moduleCount; namespace stoc_bootstrap @@ -189,15 +188,15 @@ Reference<XInterface> SAL_CALL DllComponentLoader::activate( throw(CannotActivateFactoryException, RuntimeException) { - rtl::OUString aPrefix; + OUString aPrefix; if( xKey.is() ) { Reference<XRegistryKey > xActivatorKey = xKey->openKey( - rtl::OUString("/UNO/ACTIVATOR") ); + OUString("/UNO/ACTIVATOR") ); if (xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII ) { Reference<XRegistryKey > xPrefixKey = xKey->openKey( - rtl::OUString("/UNO/PREFIX") ); + OUString("/UNO/PREFIX") ); if( xPrefixKey.is() && xPrefixKey->getValueType() == RegistryValueType_ASCII ) { aPrefix = xPrefixKey->getAsciiValue(); diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index 4f08a9c128ef..cfbab255fe85 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -41,7 +41,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::registry; -using ::rtl::OUString; #define SERVICENAME "com.sun.star.uno.NamingService" #define IMPLNAME "com.sun.star.comp.stoc.NamingService" @@ -105,9 +104,9 @@ public: return Sequence< OUString >( &aStr, 1 ); } - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRegisteredObject( const ::rtl::OUString& Name ) throw(Exception, RuntimeException); - virtual void SAL_CALL registerObject( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Object ) throw(Exception, RuntimeException); - virtual void SAL_CALL revokeObject( const ::rtl::OUString& Name ) throw(Exception, RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRegisteredObject( const OUString& Name ) throw(Exception, RuntimeException); + virtual void SAL_CALL registerObject( const OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Object ) throw(Exception, RuntimeException); + virtual void SAL_CALL revokeObject( const OUString& Name ) throw(Exception, RuntimeException); }; //================================================================================================== diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx index 34d060c95371..a788aa196c6b 100644 --- a/stoc/source/proxy_factory/proxyfac.cxx +++ b/stoc/source/proxy_factory/proxyfac.cxx @@ -43,7 +43,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using ::rtl::OUString; namespace diff --git a/stoc/source/registry_tdprovider/base.hxx b/stoc/source/registry_tdprovider/base.hxx index eaa2bf8b1819..8c68646fd3df 100644 --- a/stoc/source/registry_tdprovider/base.hxx +++ b/stoc/source/registry_tdprovider/base.hxx @@ -60,8 +60,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace com::sun::star::reflection; -using ::rtl::OUString; - //-------------------------------------------------------------------------------------------------- extern rtl_StandardModuleCount g_moduleCount; diff --git a/stoc/source/registry_tdprovider/functiondescription.cxx b/stoc/source/registry_tdprovider/functiondescription.cxx index 0d7d160ddb31..3b477d15c285 100644 --- a/stoc/source/registry_tdprovider/functiondescription.cxx +++ b/stoc/source/registry_tdprovider/functiondescription.cxx @@ -65,14 +65,14 @@ FunctionDescription::getExceptions() const { css::uno::Reference< css::reflection::XCompoundTypeDescription > > exceptions(n); for (sal_uInt16 i = 0; i < n; ++i) { - rtl::OUString name( + OUString name( reader.getMethodExceptionTypeName(m_index, i).replace('/', '.')); css::uno::Any any; try { any = m_manager->getByHierarchicalName(name); } catch (const css::container::NoSuchElementException & e) { throw new css::uno::RuntimeException( - (rtl::OUString( + (OUString( "com.sun.star.container.NoSuchElementException: ") + e.Message), css::uno::Reference< css::uno::XInterface >()); //TODO @@ -81,7 +81,7 @@ FunctionDescription::getExceptions() const { || exceptions[i]->getTypeClass() != css::uno::TypeClass_EXCEPTION) { throw new css::uno::RuntimeException( - (rtl::OUString("not an exception type: ") + (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 d5ab8e14099d..b51b3dd618ac 100644 --- a/stoc/source/registry_tdprovider/methoddescription.cxx +++ b/stoc/source/registry_tdprovider/methoddescription.cxx @@ -44,7 +44,7 @@ public: Parameter( css::uno::Reference< css::container::XHierarchicalNameAccess > const & manager, - rtl::OUString const & name, rtl::OUString const & typeName, + OUString const & name, OUString const & typeName, RTParamMode mode, sal_Int32 position): m_manager(manager), m_name(name), m_typeName(typeName.replace('/', '.')), m_mode(mode), @@ -52,7 +52,7 @@ public: virtual ~Parameter() {} - virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException) + virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException) { return m_name; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -76,8 +76,8 @@ private: void operator =(Parameter); // not implemented css::uno::Reference< css::container::XHierarchicalNameAccess > m_manager; - rtl::OUString m_name; - rtl::OUString m_typeName; + OUString m_name; + OUString m_typeName; RTParamMode m_mode; sal_Int32 m_position; }; @@ -91,7 +91,7 @@ css::uno::Reference< css::reflection::XTypeDescription > Parameter::getType() css::uno::UNO_QUERY_THROW); } catch (const css::container::NoSuchElementException & e) { throw new css::uno::RuntimeException( - (rtl::OUString( + (OUString( "com.sun.star.container.NoSuchElementException: ") + e.Message), static_cast< cppu::OWeakObject * >(this)); @@ -103,7 +103,7 @@ css::uno::Reference< css::reflection::XTypeDescription > Parameter::getType() MethodDescription::MethodDescription( css::uno::Reference< css::container::XHierarchicalNameAccess > const & manager, - rtl::OUString const & name, + OUString const & name, com::sun::star::uno::Sequence< sal_Int8 > const & bytes, sal_uInt16 index): FunctionDescription(manager, bytes, index), m_name(name), diff --git a/stoc/source/registry_tdprovider/methoddescription.hxx b/stoc/source/registry_tdprovider/methoddescription.hxx index 59d4565c9845..12d2512b0808 100644 --- a/stoc/source/registry_tdprovider/methoddescription.hxx +++ b/stoc/source/registry_tdprovider/methoddescription.hxx @@ -45,13 +45,13 @@ public: com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess > const & manager, - rtl::OUString const & name, + OUString const & name, com::sun::star::uno::Sequence< sal_Int8 > const & bytes, sal_uInt16 index); ~MethodDescription(); - rtl::OUString getName() const { return m_name; } + OUString getName() const { return m_name; } com::sun::star::uno::Sequence< com::sun::star::uno::Reference< @@ -62,7 +62,7 @@ private: MethodDescription(MethodDescription &); // not implemented void operator =(MethodDescription); // not implemented - rtl::OUString m_name; + OUString m_name; mutable com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::reflection::XParameter > > m_parameters; diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx index 4c2cd50da07a..9af018d9736b 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx @@ -45,7 +45,7 @@ class IndividualConstantTypeDescriptionImpl: { public: IndividualConstantTypeDescriptionImpl( - rtl::OUString const & name, com::sun::star::uno::Any const & value, + OUString const & name, com::sun::star::uno::Any const & value, bool published): cppu::ImplInheritanceHelper1< stoc_rdbtdp::ConstantTypeDescriptionImpl, @@ -77,7 +77,7 @@ namespace stoc_rdbtdp rtl::Reference< TypeDescriptionEnumerationImpl > TypeDescriptionEnumerationImpl::createInstance( const uno::Reference< container::XHierarchicalNameAccess > & xTDMgr, - const rtl::OUString & rModuleName, + const OUString & rModuleName, const uno::Sequence< uno::TypeClass > & rTypes, reflection::TypeDescriptionSearchDepth eDepth, const RegistryKeyList & rBaseKeys ) @@ -95,7 +95,7 @@ TypeDescriptionEnumerationImpl::createInstance( RegistryKeyList aModuleKeys; - rtl::OUString aKey( rModuleName.replace( '.', '/' ) ); + OUString aKey( rModuleName.replace( '.', '/' ) ); bool bOpenKeySucceeded = false; @@ -272,7 +272,7 @@ TypeDescriptionEnumerationImpl::nextTypeDescription() return xTD; throw container::NoSuchElementException( - rtl::OUString("No further elements in enumeration!"), + OUString("No further elements in enumeration!"), static_cast< cppu::OWeakObject * >( this ) ); } @@ -488,7 +488,7 @@ bool TypeDescriptionEnumerationImpl::queryMore() sal_uInt16 nFields = aReader.getFieldCount(); while ( nFields-- ) { - rtl::OUStringBuffer aName( + OUStringBuffer aName( aReader.getTypeName().replace( '/', '.' ) ); aName.appendAscii( "." ); aName.append( aReader.getFieldName( nFields ) ); diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.hxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.hxx index 51ccc4735b51..863d314f611e 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.hxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.hxx @@ -48,7 +48,7 @@ public: static rtl::Reference< TypeDescriptionEnumerationImpl > createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameAccess > & xTDMgr, - const rtl::OUString & rModuleName, + const OUString & rModuleName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::TypeClass > & rTypes, ::com::sun::star::reflection::TypeDescriptionSearchDepth eDepth, diff --git a/stoc/source/registry_tdprovider/structtypedescription.cxx b/stoc/source/registry_tdprovider/structtypedescription.cxx index 5c2959a857ad..a95a1802e173 100644 --- a/stoc/source/registry_tdprovider/structtypedescription.cxx +++ b/stoc/source/registry_tdprovider/structtypedescription.cxx @@ -42,7 +42,7 @@ using stoc::registry_tdprovider::StructTypeDescription; StructTypeDescription::StructTypeDescription( css::uno::Reference< css::container::XHierarchicalNameAccess > const & manager, - rtl::OUString const & name, rtl::OUString const & baseTypeName, + OUString const & name, OUString const & baseTypeName, css::uno::Sequence< sal_Int8 > const & data, bool published): m_data(data), m_base( @@ -60,7 +60,7 @@ css::uno::TypeClass StructTypeDescription::getTypeClass() return m_base->getTypeClass(); } -rtl::OUString StructTypeDescription::getName() +OUString StructTypeDescription::getName() throw (css::uno::RuntimeException) { return m_base->getName(); @@ -78,13 +78,13 @@ StructTypeDescription::getMemberTypes() throw (css::uno::RuntimeException) return m_base->getMemberTypes(); } -css::uno::Sequence< rtl::OUString > StructTypeDescription::getMemberNames() +css::uno::Sequence< OUString > StructTypeDescription::getMemberNames() throw (css::uno::RuntimeException) { return m_base->getMemberNames(); } -css::uno::Sequence< rtl::OUString > StructTypeDescription::getTypeParameters() +css::uno::Sequence< OUString > StructTypeDescription::getTypeParameters() throw (css::uno::RuntimeException) { try { @@ -93,13 +93,13 @@ css::uno::Sequence< rtl::OUString > StructTypeDescription::getTypeParameters() TYPEREG_VERSION_1); OSL_ASSERT(reader.isValid()); sal_uInt16 n = reader.getReferenceCount(); - css::uno::Sequence< rtl::OUString > parameters(n); + css::uno::Sequence< OUString > parameters(n); for (sal_uInt16 i = 0; i < n; ++i) { if (reader.getReferenceFlags(i) != RT_ACCESS_INVALID || reader.getReferenceSort(i) != RT_REF_TYPE_PARAMETER) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "type parameter of polymorphic struct type template" " not RT_ACCESS_INVALID/RT_REF_TYPE_PARAMETER")), @@ -110,7 +110,7 @@ css::uno::Sequence< rtl::OUString > StructTypeDescription::getTypeParameters() return parameters; } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString("std::bad_alloc"), + OUString("std::bad_alloc"), static_cast< cppu::OWeakObject * >(this)); } } diff --git a/stoc/source/registry_tdprovider/structtypedescription.hxx b/stoc/source/registry_tdprovider/structtypedescription.hxx index 247124af87cd..1a750a1c0457 100644 --- a/stoc/source/registry_tdprovider/structtypedescription.hxx +++ b/stoc/source/registry_tdprovider/structtypedescription.hxx @@ -47,7 +47,7 @@ public: com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess > const & manager, - rtl::OUString const & name, rtl::OUString const & baseTypeName, + OUString const & name, OUString const & baseTypeName, com::sun::star::uno::Sequence< sal_Int8 > const & data, bool published); virtual ~StructTypeDescription(); @@ -55,7 +55,7 @@ public: virtual com::sun::star::uno::TypeClass SAL_CALL getTypeClass() throw (com::sun::star::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getName() + virtual OUString SAL_CALL getName() throw (com::sun::star::uno::RuntimeException); virtual @@ -69,10 +69,10 @@ public: com::sun::star::reflection::XTypeDescription > > SAL_CALL getMemberTypes() throw (com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getMemberNames() throw (com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getTypeParameters() throw (com::sun::star::uno::RuntimeException); virtual diff --git a/stoc/source/registry_tdprovider/tdconsts.cxx b/stoc/source/registry_tdprovider/tdconsts.cxx index 73a4ca037417..e0a91bf57e8d 100644 --- a/stoc/source/registry_tdprovider/tdconsts.cxx +++ b/stoc/source/registry_tdprovider/tdconsts.cxx @@ -72,7 +72,7 @@ ConstantsTypeDescriptionImpl::getConstants() while ( nFields-- ) { - rtl::OUStringBuffer aName( _aName ); + OUStringBuffer aName( _aName ); aName.appendAscii( "." ); aName.append( aReader.getFieldName( nFields ) ); diff --git a/stoc/source/registry_tdprovider/tdiface.cxx b/stoc/source/registry_tdprovider/tdiface.cxx index 36c17f913b94..c558042b3661 100644 --- a/stoc/source/registry_tdprovider/tdiface.cxx +++ b/stoc/source/registry_tdprovider/tdiface.cxx @@ -357,7 +357,7 @@ private: void calculate(Reference< XInterfaceTypeDescription2 > const & desc); - std::set< rtl::OUString > set; + std::set< OUString > set; sal_Int32 offset; }; @@ -462,8 +462,8 @@ Sequence< Reference< XInterfaceMemberTypeDescription > > InterfaceTypeDescriptio _members.realloc(count); sal_Int32 index = 0; for (sal_uInt16 i = 0; i < fieldCount; ++i) { - rtl::OUString name(reader.getFieldName(i)); - rtl::OUStringBuffer typeName(getName()); + OUString name(reader.getFieldName(i)); + OUStringBuffer typeName(getName()); typeName.appendAscii(RTL_CONSTASCII_STRINGPARAM("::")); typeName.append(name); RTFieldAccess flags = reader.getFieldFlags(i); @@ -509,8 +509,8 @@ Sequence< Reference< XInterfaceMemberTypeDescription > > InterfaceTypeDescriptio if (flags != RT_MODE_ATTRIBUTE_GET && flags != RT_MODE_ATTRIBUTE_SET) { - rtl::OUString name(reader.getMethodName(i)); - rtl::OUStringBuffer typeName(getName()); + OUString name(reader.getMethodName(i)); + OUStringBuffer typeName(getName()); typeName.appendAscii(RTL_CONSTASCII_STRINGPARAM("::")); typeName.append(name); _members[index] = new InterfaceMethodImpl( diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index 84223360787b..b99eefc2a726 100644 --- a/stoc/source/registry_tdprovider/tdprovider.cxx +++ b/stoc/source/registry_tdprovider/tdprovider.cxx @@ -112,7 +112,7 @@ class ProviderImpl virtual uno::Reference< reflection::XTypeDescriptionEnumeration > SAL_CALL createTypeDescriptionEnumeration( - const ::rtl::OUString& moduleName, + const OUString& moduleName, const uno::Sequence< uno::TypeClass >& types, reflection::TypeDescriptionSearchDepth depth ) throw ( reflection::NoSuchTypeNameException, @@ -152,7 +152,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XTypeDescriptionEnumeration > SAL_CALL createTypeDescriptionEnumeration( - const ::rtl::OUString& moduleName, + const OUString& moduleName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::TypeClass >& types, ::com::sun::star::reflection::TypeDescriptionSearchDepth depth ) @@ -202,7 +202,7 @@ sal_Bool ProviderImpl::TypeDescriptionManagerWrapper::hasByHierarchicalName( //______________________________________________________________________________ uno::Reference< reflection::XTypeDescriptionEnumeration > SAL_CALL ProviderImpl::TypeDescriptionManagerWrapper::createTypeDescriptionEnumeration( - const ::rtl::OUString& moduleName, + const OUString& moduleName, const uno::Sequence< uno::TypeClass >& types, reflection::TypeDescriptionSearchDepth depth ) throw ( reflection::NoSuchTypeNameException, @@ -482,13 +482,13 @@ com::sun::star::uno::Reference< XTypeDescription > createTypeDescription( case RT_TYPE_INTERFACE: { sal_uInt16 n = aReader.getSuperTypeCount(); - com::sun::star::uno::Sequence< rtl::OUString > aBaseTypeNames(n); + com::sun::star::uno::Sequence< OUString > aBaseTypeNames(n); for (sal_uInt16 i = 0; i < n; ++i) { aBaseTypeNames[i] = aReader.getSuperTypeName(i).replace( '/', '.'); } sal_uInt16 n2 = aReader.getReferenceCount(); - com::sun::star::uno::Sequence< rtl::OUString > + com::sun::star::uno::Sequence< OUString > aOptionalBaseTypeNames(n2); for (sal_uInt16 i = 0; i < n2; ++i) { OSL_ASSERT( @@ -520,7 +520,7 @@ com::sun::star::uno::Reference< XTypeDescription > createTypeDescription( case RT_TYPE_STRUCT: { - rtl::OUString superTypeName; + OUString superTypeName; if (aReader.getSuperTypeCount() == 1) { superTypeName = aReader.getSuperTypeName(0).replace( '/', '.'); @@ -541,7 +541,7 @@ com::sun::star::uno::Reference< XTypeDescription > createTypeDescription( case RT_TYPE_EXCEPTION: { - rtl::OUString superTypeName; + OUString superTypeName; if (aReader.getSuperTypeCount() == 1) { superTypeName = aReader.getSuperTypeName(0).replace( '/', '.'); diff --git a/stoc/source/registry_tdprovider/tdservice.cxx b/stoc/source/registry_tdprovider/tdservice.cxx index 294f000db92c..de7795672938 100644 --- a/stoc/source/registry_tdprovider/tdservice.cxx +++ b/stoc/source/registry_tdprovider/tdservice.cxx @@ -30,7 +30,6 @@ #include <memory> using namespace com::sun::star; -using ::rtl::OUStringBuffer; namespace { @@ -40,7 +39,7 @@ class Constructor: public: Constructor( Reference< XHierarchicalNameAccess > const & manager, - rtl::OUString const & name, Sequence< sal_Int8 > const & bytes, + OUString const & name, Sequence< sal_Int8 > const & bytes, sal_uInt16 index): m_desc(manager, name, bytes, index) {} @@ -49,7 +48,7 @@ public: virtual sal_Bool SAL_CALL isDefaultConstructor() throw (RuntimeException) { return m_desc.getName().isEmpty(); } - virtual rtl::OUString SAL_CALL getName() throw (RuntimeException) + virtual OUString SAL_CALL getName() throw (RuntimeException) { return m_desc.getName(); } virtual Sequence< Reference< XParameter > > SAL_CALL getParameters() @@ -338,7 +337,7 @@ ServiceTypeDescriptionImpl::getConstructors() throw (RuntimeException) { ctorCount)); SAL_WNODEPRECATED_DECLARATIONS_POP for (sal_uInt16 i = 0; i < ctorCount; ++i) { - rtl::OUString name(reader.getMethodName(i)); + OUString name(reader.getMethodName(i)); if (reader.getMethodFlags(i) != RT_MODE_TWOWAY || (reader.getMethodReturnTypeName(i) != "void") || (name.isEmpty() @@ -346,7 +345,7 @@ ServiceTypeDescriptionImpl::getConstructors() throw (RuntimeException) { || reader.getMethodExceptionCount(i) != 0))) { throw RuntimeException( - rtl::OUString( + OUString( "Service has bad constructors"), static_cast< OWeakObject * >(this)); } @@ -373,7 +372,7 @@ void ServiceTypeDescriptionImpl::getReferences() sal_uInt16 superTypes = aReader.getSuperTypeCount(); if (superTypes > 1) { throw RuntimeException( - rtl::OUString( + OUString( "Service has more than one supertype"), static_cast< OWeakObject * >(this)); } diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index c774793b2221..10e3bdabbcda 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -60,9 +60,6 @@ using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; extern ::rtl_StandardModuleCount g_moduleCount; @@ -348,7 +345,7 @@ static inline Reference< security::XAccessControlContext > getDynamicRestriction { if (xContext.is()) { - Any acc(xContext->getValueByName(rtl::OUString(s_acRestriction))); + Any acc(xContext->getValueByName(OUString(s_acRestriction))); if (typelib_TypeClass_INTERFACE == acc.pType->eTypeClass) { // avoid ref-counting @@ -409,7 +406,7 @@ class AccessController bool m_defaultPerm_init; bool m_singleUser_init; // for multi-user mode - lru_cache< OUString, PermissionCollection, ::rtl::OUStringHash, equal_to< OUString > > + lru_cache< OUString, PermissionCollection, OUStringHash, equal_to< OUString > > m_user2permissions; ThreadData m_rec; @@ -606,13 +603,13 @@ static void dumpPermissions( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("> dumping default permissions:") ); } - OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); + OString str( OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); Sequence< OUString > permissions( collection.toStrings() ); OUString const * p = permissions.getConstArray(); for ( sal_Int32 nPos = 0; nPos < permissions.getLength(); ++nPos ) { - OString str( ::rtl::OUStringToOString( p[ nPos ], RTL_TEXTENCODING_ASCII_US ) ); + OString str( OUStringToOString( p[ nPos ], RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); } OSL_TRACE( "> permission dump done" ); @@ -754,7 +751,7 @@ PermissionCollection AccessController::getEffectivePermissions( buf.append( userId ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"") ); OString str( - ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); + OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); #endif return PermissionCollection( new AllPermission() ); diff --git a/stoc/source/security/lru_cache.h b/stoc/source/security/lru_cache.h index bb0fcba130db..be081b761074 100644 --- a/stoc/source/security/lru_cache.h +++ b/stoc/source/security/lru_cache.h @@ -188,11 +188,11 @@ inline t_val const * lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lookup( Entry * entry = iFind->second; toFront( entry ); #ifdef __CACHE_DIAGNOSE - ::rtl::OUStringBuffer buf( 48 ); + OUStringBuffer buf( 48 ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("> retrieved element \"") ); buf.append( entry->m_key ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" from cache") ); - ::rtl::OString str( ::rtl::OUStringToOString( + OString str( OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); #endif @@ -217,11 +217,11 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set( #ifdef __CACHE_DIAGNOSE if (entry->m_key.getLength()) { - ::rtl::OUStringBuffer buf( 48 ); + OUStringBuffer buf( 48 ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("> kicking element \"") ); buf.append( entry->m_key ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" from cache") ); - ::rtl::OString str( ::rtl::OUStringToOString( + OString str( OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); } @@ -239,11 +239,11 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set( { entry = iFind->second; #ifdef __CACHE_DIAGNOSE - ::rtl::OUStringBuffer buf( 48 ); + OUStringBuffer buf( 48 ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("> replacing element \"") ); buf.append( entry->m_key ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" in cache") ); - ::rtl::OString str( ::rtl::OUStringToOString( + OString str( OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); #endif diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index c6edcf2004db..4cf385e9361a 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -40,8 +40,6 @@ using namespace ::std; using namespace ::osl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; namespace stoc_sec { @@ -74,7 +72,7 @@ static inline sal_Int32 makeMask( OUStringBuffer buf( 48 ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("### ignoring unknown socket action: ") ); buf.append( item ); - ::rtl::OString str( ::rtl::OUStringToOString( + OString str( OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); } @@ -565,8 +563,8 @@ static void demanded_diag( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("demanding ") ); buf.append( perm.toString() ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" => ok.") ); - ::rtl::OString str( - ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); + OString str( + OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", str.getStr() ); } #endif diff --git a/stoc/source/security/permissions.h b/stoc/source/security/permissions.h index 05c6b9e61a92..39532990a220 100644 --- a/stoc/source/security/permissions.h +++ b/stoc/source/security/permissions.h @@ -49,7 +49,7 @@ public: {} virtual bool implies( Permission const & perm ) const SAL_THROW(()) = 0; - virtual ::rtl::OUString toString() const SAL_THROW(()) = 0; + virtual OUString toString() const SAL_THROW(()) = 0; }; //================================================================================================== class AllPermission : public Permission @@ -62,7 +62,7 @@ public: {} virtual bool implies( Permission const & ) const SAL_THROW(()); - virtual ::rtl::OUString toString() const SAL_THROW(()); + virtual OUString toString() const SAL_THROW(()); }; //================================================================================================== @@ -83,7 +83,7 @@ public: PermissionCollection const & addition = PermissionCollection() ) SAL_THROW( (::com::sun::star::uno::RuntimeException) ); #ifdef __DIAGNOSE - ::com::sun::star::uno::Sequence< ::rtl::OUString > toStrings() const SAL_THROW(()); + ::com::sun::star::uno::Sequence< OUString > toStrings() const SAL_THROW(()); #endif void checkPermission( ::com::sun::star::uno::Any const & perm ) const SAL_THROW( (::com::sun::star::uno::RuntimeException) ); diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 3b2c25b7abcf..93923c2f6ddb 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -70,10 +70,6 @@ using namespace cppu; using namespace osl; using namespace std; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 816c35547bcc..dbf7d13ad262 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -68,10 +68,10 @@ public: osl::Mutex mutex_; private: - virtual rtl::OUString SAL_CALL getURL() throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getURL() throw (css::uno::RuntimeException); virtual void SAL_CALL open( - rtl::OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) + OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); @@ -92,20 +92,20 @@ private: css::registry::InvalidRegistryException, css::uno::RuntimeException); virtual void SAL_CALL mergeKey( - rtl::OUString const & aKeyName, rtl::OUString const & aUrl) + OUString const & aKeyName, OUString const & aUrl) throw ( css::registry::InvalidRegistryException, css::registry::MergeConflictException, css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException) { return stoc_bootstrap::simreg_getImplementationName(); } - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) throw (css::uno::RuntimeException) { return ServiceName == getSupportedServiceNames()[0]; } - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) { return stoc_bootstrap::simreg_getSupportedServiceNames(); } @@ -120,7 +120,7 @@ public: registry_(registry), key_(key) {} private: - virtual rtl::OUString SAL_CALL getKeyName() + virtual OUString SAL_CALL getKeyName() throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL isReadOnly() throw ( @@ -129,7 +129,7 @@ private: virtual sal_Bool SAL_CALL isValid() throw(css::uno::RuntimeException); virtual css::registry::RegistryKeyType SAL_CALL getKeyType( - rtl::OUString const & rKeyName) + OUString const & rKeyName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); @@ -154,38 +154,38 @@ private: css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getAsciiValue() throw ( + virtual OUString SAL_CALL getAsciiValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException); - virtual void SAL_CALL setAsciiValue(rtl::OUString const & value) throw ( + virtual void SAL_CALL setAsciiValue(OUString const & value) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getAsciiListValue() + virtual css::uno::Sequence< OUString > SAL_CALL getAsciiListValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException); virtual void SAL_CALL setAsciiListValue( - css::uno::Sequence< rtl::OUString > const & seqValue) + css::uno::Sequence< OUString > const & seqValue) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getStringValue() throw( + virtual OUString SAL_CALL getStringValue() throw( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException); - virtual void SAL_CALL setStringValue(rtl::OUString const & value) throw ( + virtual void SAL_CALL setStringValue(OUString const & value) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getStringListValue() + virtual css::uno::Sequence< OUString > SAL_CALL getStringListValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException); virtual void SAL_CALL setStringListValue( - css::uno::Sequence< rtl::OUString > const & seqValue) + css::uno::Sequence< OUString > const & seqValue) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); @@ -201,19 +201,19 @@ private: css::uno::RuntimeException); virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL openKey( - rtl::OUString const & aKeyName) + OUString const & aKeyName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL - createKey(rtl::OUString const & aKeyName) throw ( + createKey(OUString const & aKeyName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); virtual void SAL_CALL closeKey() throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual void SAL_CALL deleteKey(rtl::OUString const & rKeyName) throw ( + virtual void SAL_CALL deleteKey(OUString const & rKeyName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); virtual @@ -221,26 +221,26 @@ private: SAL_CALL openKeys() throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getKeyNames() throw ( + virtual css::uno::Sequence< OUString > SAL_CALL getKeyNames() throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); virtual sal_Bool SAL_CALL createLink( - rtl::OUString const & aLinkName, rtl::OUString const & aLinkTarget) + OUString const & aLinkName, OUString const & aLinkTarget) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual void SAL_CALL deleteLink(rtl::OUString const & rLinkName) throw ( + virtual void SAL_CALL deleteLink(OUString const & rLinkName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getLinkTarget( - rtl::OUString const & rLinkName) + virtual OUString SAL_CALL getLinkTarget( + OUString const & rLinkName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getResolvedName( - rtl::OUString const & aKeyName) + virtual OUString SAL_CALL getResolvedName( + OUString const & aKeyName) throw ( css::registry::InvalidRegistryException, css::uno::RuntimeException); @@ -249,7 +249,7 @@ private: RegistryKey key_; }; -rtl::OUString Key::getKeyName() throw (css::uno::RuntimeException) { +OUString Key::getKeyName() throw (css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); return key_.getName(); } @@ -266,7 +266,7 @@ sal_Bool Key::isValid() throw (css::uno::RuntimeException) { return key_.isValid(); } -css::registry::RegistryKeyType Key::getKeyType(rtl::OUString const & rKeyName) +css::registry::RegistryKeyType Key::getKeyType(OUString const & rKeyName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); @@ -274,7 +274,7 @@ css::registry::RegistryKeyType Key::getKeyType(rtl::OUString const & rKeyName) RegError err = key_.getKeyType(rKeyName, &type); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getKeyType:" " underlying RegistryKey::getKeyType() = ")) + @@ -298,7 +298,7 @@ css::registry::RegistryValueType Key::getValueType() osl::MutexGuard guard(registry_->mutex_); RegValueType type; sal_uInt32 size; - RegError err = key_.getValueInfo(rtl::OUString(), &type, &size); + RegError err = key_.getValueInfo(OUString(), &type, &size); switch (err) { case REG_NO_ERROR: break; @@ -307,7 +307,7 @@ css::registry::RegistryValueType Key::getValueType() break; default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getValueType:" " underlying RegistryKey::getValueInfo() = ")) + @@ -343,20 +343,20 @@ sal_Int32 Key::getLongValue() throw ( { osl::MutexGuard guard(registry_->mutex_); sal_Int32 value; - RegError err = key_.getValue(rtl::OUString(), &value); + RegError err = key_.getValue(OUString(), &value); switch (err) { case REG_NO_ERROR: break; case REG_INVALID_VALUE: throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getLongValue:" " underlying RegistryKey::getValue() = REG_INVALID_VALUE")), static_cast< OWeakObject * >(this)); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getLongValue:" " underlying RegistryKey::getValue() = ")) + @@ -371,10 +371,10 @@ void Key::setLongValue(sal_Int32 value) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.setValue( - rtl::OUString(), RG_VALUETYPE_LONG, &value, sizeof (sal_Int32)); + OUString(), RG_VALUETYPE_LONG, &value, sizeof (sal_Int32)); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key setLongValue:" " underlying RegistryKey::setValue() = ")) + @@ -389,7 +389,7 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw ( { osl::MutexGuard guard(registry_->mutex_); RegistryValueList< sal_Int32 > list; - RegError err = key_.getLongListValue(rtl::OUString(), list); + RegError err = key_.getLongListValue(OUString(), list); switch (err) { case REG_NO_ERROR: break; @@ -397,7 +397,7 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw ( return css::uno::Sequence< sal_Int32 >(); case REG_INVALID_VALUE: throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getLongListValue:" " underlying RegistryKey::getLongListValue() =" @@ -405,7 +405,7 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw ( static_cast< OWeakObject * >(this)); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getLongListValue:" " underlying RegistryKey::getLongListValue() = ")) + @@ -415,7 +415,7 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw ( sal_uInt32 n = list.getLength(); if (n > SAL_MAX_INT32) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getLongListValue:" " underlying RegistryKey::getLongListValue() too large")), @@ -437,11 +437,11 @@ void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue) list.push_back(seqValue[i]); } RegError err = key_.setLongListValue( - rtl::OUString(), list.empty() ? 0 : &list[0], + OUString(), list.empty() ? 0 : &list[0], static_cast< sal_uInt32 >(list.size())); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key setLongListValue:" " underlying RegistryKey::setLongListValue() = ")) + @@ -450,17 +450,17 @@ void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue) } } -rtl::OUString Key::getAsciiValue() throw ( +OUString Key::getAsciiValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegValueType type; sal_uInt32 size; - RegError err = key_.getValueInfo(rtl::OUString(), &type, &size); + RegError err = key_.getValueInfo(OUString(), &type, &size); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey::getValueInfo() = ")) + @@ -469,7 +469,7 @@ rtl::OUString Key::getAsciiValue() throw ( } if (type != RG_VALUETYPE_STRING) { throw css::registry::InvalidValueException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey type = ")) + @@ -479,7 +479,7 @@ rtl::OUString Key::getAsciiValue() throw ( // size contains terminating null (error in underlying registry.cxx): if (size == 0) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey size 0 cannot happen due to" @@ -488,17 +488,17 @@ rtl::OUString Key::getAsciiValue() throw ( } if (size > SAL_MAX_INT32) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey size too large")), static_cast< OWeakObject * >(this)); } std::vector< char > list(size); - err = key_.getValue(rtl::OUString(), &list[0]); + err = key_.getValue(OUString(), &list[0]); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey::getValue() = ")) + @@ -507,14 +507,14 @@ rtl::OUString Key::getAsciiValue() throw ( } if (list[size - 1] != '\0') { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey value must be null-terminated due" " to design error")), static_cast< OWeakObject * >(this)); } - rtl::OUString value; + OUString value; if (!rtl_convertStringToUString( &value.pData, &list[0], static_cast< sal_Int32 >(size - 1), RTL_TEXTENCODING_UTF8, @@ -523,7 +523,7 @@ rtl::OUString Key::getAsciiValue() throw ( RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getAsciiValue:" " underlying RegistryKey not UTF-8")), @@ -532,30 +532,30 @@ rtl::OUString Key::getAsciiValue() throw ( return value; } -void Key::setAsciiValue(rtl::OUString const & value) +void Key::setAsciiValue(OUString const & value) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); - rtl::OString utf8; + OString utf8; if (!value.convertToString( &utf8, RTL_TEXTENCODING_UTF8, (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key setAsciiValue:" " value not UTF-16")), static_cast< OWeakObject * >(this)); } RegError err = key_.setValue( - rtl::OUString(), RG_VALUETYPE_STRING, + OUString(), RG_VALUETYPE_STRING, const_cast< char * >(utf8.getStr()), utf8.getLength() + 1); // +1 for terminating null (error in underlying registry.cxx) if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key setAsciiValue:" " underlying RegistryKey::setValue() = ")) + @@ -564,21 +564,21 @@ void Key::setAsciiValue(rtl::OUString const & value) } } -css::uno::Sequence< rtl::OUString > Key::getAsciiListValue() throw ( +css::uno::Sequence< OUString > Key::getAsciiListValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegistryValueList< char * > list; - RegError err = key_.getStringListValue(rtl::OUString(), list); + RegError err = key_.getStringListValue(OUString(), list); switch (err) { case REG_NO_ERROR: break; case REG_VALUE_NOT_EXISTS: - return css::uno::Sequence< rtl::OUString >(); + return css::uno::Sequence< OUString >(); case REG_INVALID_VALUE: throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getAsciiListValue: underlying" @@ -586,7 +586,7 @@ css::uno::Sequence< rtl::OUString > Key::getAsciiListValue() throw ( static_cast< OWeakObject * >(this)); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getAsciiListValue: underlying" @@ -597,14 +597,14 @@ css::uno::Sequence< rtl::OUString > Key::getAsciiListValue() throw ( sal_uInt32 n = list.getLength(); if (n > SAL_MAX_INT32) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getAsciiListValue: underlying" " RegistryKey::getStringListValue() too large")), static_cast< OWeakObject * >(this)); } - css::uno::Sequence< rtl::OUString > value(static_cast< sal_Int32 >(n)); + css::uno::Sequence< OUString > value(static_cast< sal_Int32 >(n)); for (sal_uInt32 i = 0; i < n; ++i) { char * el = list.getElement(i); sal_Int32 size = rtl_str_getLength(el); @@ -616,7 +616,7 @@ css::uno::Sequence< rtl::OUString > Key::getAsciiListValue() throw ( RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getAsciiListValue: underlying RegistryKey not" @@ -628,20 +628,20 @@ css::uno::Sequence< rtl::OUString > Key::getAsciiListValue() throw ( } void Key::setAsciiListValue( - css::uno::Sequence< rtl::OUString > const & seqValue) + css::uno::Sequence< OUString > const & seqValue) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); - std::vector< rtl::OString > list; + std::vector< OString > list; for (sal_Int32 i = 0; i < seqValue.getLength(); ++i) { - rtl::OString utf8; + OString utf8; if (!seqValue[i].convertToString( &utf8, RTL_TEXTENCODING_UTF8, (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))) { throw css::uno::RuntimeException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " setAsciiListValue: value not UTF-16")), @@ -650,17 +650,17 @@ void Key::setAsciiListValue( list.push_back(utf8); } std::vector< char * > list2; - for (std::vector< rtl::OString >::iterator i(list.begin()); i != list.end(); + for (std::vector< OString >::iterator i(list.begin()); i != list.end(); ++i) { list2.push_back(const_cast< char * >(i->getStr())); } RegError err = key_.setStringListValue( - rtl::OUString(), list2.empty() ? 0 : &list2[0], + OUString(), list2.empty() ? 0 : &list2[0], static_cast< sal_uInt32 >(list2.size())); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " setAsciiListValue: underlying" @@ -670,17 +670,17 @@ void Key::setAsciiListValue( } } -rtl::OUString Key::getStringValue() throw ( +OUString Key::getStringValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegValueType type; sal_uInt32 size; - RegError err = key_.getValueInfo(rtl::OUString(), &type, &size); + RegError err = key_.getValueInfo(OUString(), &type, &size); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getStringValue:" " underlying RegistryKey::getValueInfo() = ")) + @@ -689,7 +689,7 @@ rtl::OUString Key::getStringValue() throw ( } if (type != RG_VALUETYPE_UNICODE) { throw css::registry::InvalidValueException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getStringValue:" " underlying RegistryKey type = ")) + @@ -700,7 +700,7 @@ rtl::OUString Key::getStringValue() throw ( // registry.cxx): if (size == 0 || (size & 1) == 1) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getStringValue:" " underlying RegistryKey size 0 or odd cannot happen due to" @@ -709,17 +709,17 @@ rtl::OUString Key::getStringValue() throw ( } if (size > SAL_MAX_INT32) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getStringValue:" " underlying RegistryKey size too large")), static_cast< OWeakObject * >(this)); } std::vector< sal_Unicode > list(size); - err = key_.getValue(rtl::OUString(), &list[0]); + err = key_.getValue(OUString(), &list[0]); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getStringValue:" " underlying RegistryKey::getValue() = ")) + @@ -728,28 +728,28 @@ rtl::OUString Key::getStringValue() throw ( } if (list[size/2 - 1] != 0) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getStringValue:" " underlying RegistryKey value must be null-terminated due" " to design error")), static_cast< OWeakObject * >(this)); } - return rtl::OUString(&list[0], static_cast< sal_Int32 >(size/2 - 1)); + return OUString(&list[0], static_cast< sal_Int32 >(size/2 - 1)); } -void Key::setStringValue(rtl::OUString const & value) +void Key::setStringValue(OUString const & value) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.setValue( - rtl::OUString(), RG_VALUETYPE_UNICODE, + OUString(), RG_VALUETYPE_UNICODE, const_cast< sal_Unicode * >(value.getStr()), (value.getLength() + 1) * sizeof (sal_Unicode)); // +1 for terminating null (error in underlying registry.cxx) if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key setStringValue:" " underlying RegistryKey::setValue() = ")) + @@ -758,21 +758,21 @@ void Key::setStringValue(rtl::OUString const & value) } } -css::uno::Sequence< rtl::OUString > Key::getStringListValue() throw ( +css::uno::Sequence< OUString > Key::getStringListValue() throw ( css::registry::InvalidRegistryException, css::registry::InvalidValueException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegistryValueList< sal_Unicode * > list; - RegError err = key_.getUnicodeListValue(rtl::OUString(), list); + RegError err = key_.getUnicodeListValue(OUString(), list); switch (err) { case REG_NO_ERROR: break; case REG_VALUE_NOT_EXISTS: - return css::uno::Sequence< rtl::OUString >(); + return css::uno::Sequence< OUString >(); case REG_INVALID_VALUE: throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getStringListValue: underlying" @@ -780,7 +780,7 @@ css::uno::Sequence< rtl::OUString > Key::getStringListValue() throw ( static_cast< OWeakObject * >(this)); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getStringListValue: underlying" @@ -791,14 +791,14 @@ css::uno::Sequence< rtl::OUString > Key::getStringListValue() throw ( sal_uInt32 n = list.getLength(); if (n > SAL_MAX_INT32) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " getStringListValue: underlying" " RegistryKey::getUnicodeListValue() too large")), static_cast< OWeakObject * >(this)); } - css::uno::Sequence< rtl::OUString > value(static_cast< sal_Int32 >(n)); + css::uno::Sequence< OUString > value(static_cast< sal_Int32 >(n)); for (sal_uInt32 i = 0; i < n; ++i) { value[static_cast< sal_Int32 >(i)] = list.getElement(i); } @@ -806,7 +806,7 @@ css::uno::Sequence< rtl::OUString > Key::getStringListValue() throw ( } void Key::setStringListValue( - css::uno::Sequence< rtl::OUString > const & seqValue) + css::uno::Sequence< OUString > const & seqValue) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); @@ -815,11 +815,11 @@ void Key::setStringListValue( list.push_back(const_cast< sal_Unicode * >(seqValue[i].getStr())); } RegError err = key_.setUnicodeListValue( - rtl::OUString(), list.empty() ? 0 : &list[0], + OUString(), list.empty() ? 0 : &list[0], static_cast< sal_uInt32 >(list.size())); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key" " setStringListValue: underlying" @@ -837,10 +837,10 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue() osl::MutexGuard guard(registry_->mutex_); RegValueType type; sal_uInt32 size; - RegError err = key_.getValueInfo(rtl::OUString(), &type, &size); + RegError err = key_.getValueInfo(OUString(), &type, &size); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getBinaryValue:" " underlying RegistryKey::getValueInfo() = ")) + @@ -849,7 +849,7 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue() } if (type != RG_VALUETYPE_BINARY) { throw css::registry::InvalidValueException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getBinaryValue:" " underlying RegistryKey type = ")) + @@ -858,17 +858,17 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue() } if (size > SAL_MAX_INT32) { throw css::registry::InvalidValueException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getBinaryValue:" " underlying RegistryKey size too large")), static_cast< OWeakObject * >(this)); } css::uno::Sequence< sal_Int8 > value(static_cast< sal_Int32 >(size)); - err = key_.getValue(rtl::OUString(), value.getArray()); + err = key_.getValue(OUString(), value.getArray()); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getBinaryValue:" " underlying RegistryKey::getValue() = ")) + @@ -883,12 +883,12 @@ void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const & value) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.setValue( - rtl::OUString(), RG_VALUETYPE_BINARY, + OUString(), RG_VALUETYPE_BINARY, const_cast< sal_Int8 * >(value.getConstArray()), static_cast< sal_uInt32 >(value.getLength())); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key setBinaryValue:" " underlying RegistryKey::setValue() = ")) + @@ -898,7 +898,7 @@ void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const & value) } css::uno::Reference< css::registry::XRegistryKey > Key::openKey( - rtl::OUString const & aKeyName) + OUString const & aKeyName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); @@ -911,7 +911,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::openKey( return css::uno::Reference< css::registry::XRegistryKey >(); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key openKey:" " underlying RegistryKey::openKey() = ")) + @@ -921,7 +921,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::openKey( } css::uno::Reference< css::registry::XRegistryKey > Key::createKey( - rtl::OUString const & aKeyName) + OUString const & aKeyName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); @@ -934,7 +934,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::createKey( return css::uno::Reference< css::registry::XRegistryKey >(); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key createKey:" " underlying RegistryKey::createKey() = ")) + @@ -950,7 +950,7 @@ void Key::closeKey() RegError err = key_.closeKey(); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key closeKey:" " underlying RegistryKey::closeKey() = ")) + @@ -959,14 +959,14 @@ void Key::closeKey() } } -void Key::deleteKey(rtl::OUString const & rKeyName) +void Key::deleteKey(OUString const & rKeyName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.deleteKey(rKeyName); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key deleteKey:" " underlying RegistryKey::deleteKey() = ")) + @@ -981,10 +981,10 @@ Key::openKeys() { osl::MutexGuard guard(registry_->mutex_); RegistryKeyArray list; - RegError err = key_.openSubKeys(rtl::OUString(), list); + RegError err = key_.openSubKeys(OUString(), list); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key openKeys:" " underlying RegistryKey::openSubKeys() = ")) + @@ -994,7 +994,7 @@ Key::openKeys() sal_uInt32 n = list.getLength(); if (n > SAL_MAX_INT32) { throw css::registry::InvalidRegistryException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getKeyNames:" " underlying RegistryKey::getKeyNames() too large")), @@ -1009,15 +1009,15 @@ Key::openKeys() return keys; } -css::uno::Sequence< rtl::OUString > Key::getKeyNames() +css::uno::Sequence< OUString > Key::getKeyNames() throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegistryKeyNames list; - RegError err = key_.getKeyNames(rtl::OUString(), list); + RegError err = key_.getKeyNames(OUString(), list); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getKeyNames:" " underlying RegistryKey::getKeyNames() = ")) + @@ -1027,13 +1027,13 @@ css::uno::Sequence< rtl::OUString > Key::getKeyNames() sal_uInt32 n = list.getLength(); if (n > SAL_MAX_INT32) { throw css::registry::InvalidRegistryException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getKeyNames:" " underlying RegistryKey::getKeyNames() too large")), static_cast< OWeakObject * >(this)); } - css::uno::Sequence< rtl::OUString > names(static_cast< sal_Int32 >(n)); + css::uno::Sequence< OUString > names(static_cast< sal_Int32 >(n)); for (sal_uInt32 i = 0; i < n; ++i) { names[static_cast< sal_Int32 >(i)] = list.getElement(i); } @@ -1041,7 +1041,7 @@ css::uno::Sequence< rtl::OUString > Key::getKeyNames() } sal_Bool Key::createLink( - rtl::OUString const & aLinkName, rtl::OUString const & aLinkTarget) + OUString const & aLinkName, OUString const & aLinkTarget) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); @@ -1052,7 +1052,7 @@ sal_Bool Key::createLink( case REG_INVALID_KEY: case REG_DETECT_RECURSION: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key createLink:" " underlying RegistryKey::createLink() = ")) + @@ -1063,14 +1063,14 @@ sal_Bool Key::createLink( } } -void Key::deleteLink(rtl::OUString const & rLinkName) +void Key::deleteLink(OUString const & rLinkName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); RegError err = key_.deleteLink(rLinkName); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key deleteLink:" " underlying RegistryKey::deleteLink() = ")) + @@ -1079,15 +1079,15 @@ void Key::deleteLink(rtl::OUString const & rLinkName) } } -rtl::OUString Key::getLinkTarget(rtl::OUString const & rLinkName) +OUString Key::getLinkTarget(OUString const & rLinkName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); - rtl::OUString target; + OUString target; RegError err = key_.getLinkTarget(rLinkName, target); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getLinkTarget:" " underlying RegistryKey::getLinkTarget() = ")) + @@ -1097,15 +1097,15 @@ rtl::OUString Key::getLinkTarget(rtl::OUString const & rLinkName) return target; } -rtl::OUString Key::getResolvedName(rtl::OUString const & aKeyName) +OUString Key::getResolvedName(OUString const & aKeyName) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(registry_->mutex_); - rtl::OUString resolved; + OUString resolved; RegError err = key_.getResolvedKeyName(aKeyName, true, resolved); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry key getResolvedName:" " underlying RegistryKey::getResolvedName() = ")) + @@ -1115,13 +1115,13 @@ rtl::OUString Key::getResolvedName(rtl::OUString const & aKeyName) return resolved; } -rtl::OUString SimpleRegistry::getURL() throw (css::uno::RuntimeException) { +OUString SimpleRegistry::getURL() throw (css::uno::RuntimeException) { osl::MutexGuard guard(mutex_); return registry_.getName(); } void SimpleRegistry::open( - rtl::OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) + OUString const & rURL, sal_Bool bReadOnly, sal_Bool bCreate) throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(mutex_); @@ -1133,10 +1133,10 @@ void SimpleRegistry::open( } if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( "com.sun.star.registry.SimpleRegistry.open(") + rURL + - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "): underlying Registry::open/create() = ")) + OUString::number(err)), @@ -1156,7 +1156,7 @@ void SimpleRegistry::close() RegError err = registry_.close(); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry.close:" " underlying Registry::close() = ")) + @@ -1169,10 +1169,10 @@ void SimpleRegistry::destroy() throw (css::registry::InvalidRegistryException, css::uno::RuntimeException) { osl::MutexGuard guard(mutex_); - RegError err = registry_.destroy(rtl::OUString()); + RegError err = registry_.destroy(OUString()); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry.destroy:" " underlying Registry::destroy() = ")) + @@ -1189,7 +1189,7 @@ css::uno::Reference< css::registry::XRegistryKey > SimpleRegistry::getRootKey() RegError err = registry_.openRootKey(root); if (err != REG_NO_ERROR) { throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry.getRootKey:" " underlying Registry::getRootKey() = ")) + @@ -1207,7 +1207,7 @@ sal_Bool SimpleRegistry::isReadOnly() } void SimpleRegistry::mergeKey( - rtl::OUString const & aKeyName, rtl::OUString const & aUrl) + OUString const & aKeyName, OUString const & aUrl) throw ( css::registry::InvalidRegistryException, css::registry::MergeConflictException, css::uno::RuntimeException) @@ -1224,14 +1224,14 @@ void SimpleRegistry::mergeKey( break; case REG_MERGE_ERROR: throw css::registry::MergeConflictException( - rtl::OUString( + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry.mergeKey:" " underlying Registry::mergeKey() = REG_MERGE_ERROR")), static_cast< cppu::OWeakObject * >(this)); default: throw css::registry::InvalidRegistryException( - (rtl::OUString( + (OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry.mergeKey:" " underlying Registry::getRootKey/mergeKey() = ")) + @@ -1251,14 +1251,14 @@ css::uno::Reference< css::uno::XInterface > SimpleRegistry_CreateInstance( return static_cast< cppu::OWeakObject * >(new SimpleRegistry); } -css::uno::Sequence< rtl::OUString > simreg_getSupportedServiceNames() { - css::uno::Sequence< rtl::OUString > names(1); - names[0] = rtl::OUString("com.sun.star.registry.SimpleRegistry"); +css::uno::Sequence< OUString > simreg_getSupportedServiceNames() { + css::uno::Sequence< OUString > names(1); + names[0] = OUString("com.sun.star.registry.SimpleRegistry"); return names; } -rtl::OUString simreg_getImplementationName() { - return rtl::OUString("com.sun.star.comp.stoc.SimpleRegistry"); +OUString simreg_getImplementationName() { + return OUString("com.sun.star.comp.stoc.SimpleRegistry"); } } diff --git a/stoc/source/tdmanager/lrucache.hxx b/stoc/source/tdmanager/lrucache.hxx index b7a6895a5808..0ab1712fb793 100644 --- a/stoc/source/tdmanager/lrucache.hxx +++ b/stoc/source/tdmanager/lrucache.hxx @@ -224,16 +224,16 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear() } //================================================================================================== -struct FctHashOUString : public ::std::unary_function< ::rtl::OUString const &, size_t > +struct FctHashOUString : public ::std::unary_function< OUString const &, size_t > { - size_t operator()( ::rtl::OUString const & rKey ) const + size_t operator()( OUString const & rKey ) const { return (size_t)rKey.hashCode(); } }; /** Template instance for OUString keys, Any values.<br> */ -typedef LRU_Cache< ::rtl::OUString, ::com::sun::star::uno::Any, - FctHashOUString, ::std::equal_to< ::rtl::OUString > > +typedef LRU_Cache< OUString, ::com::sun::star::uno::Any, + FctHashOUString, ::std::equal_to< OUString > > LRU_CacheAnyByOUString; diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx index 458bded2165c..2ac14838d434 100644 --- a/stoc/source/tdmanager/tdmgr.cxx +++ b/stoc/source/tdmanager/tdmgr.cxx @@ -59,8 +59,6 @@ using namespace com::sun::star::reflection; using namespace com::sun::star::container; using namespace com::sun::star::registry; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; static const sal_Int32 CACHE_SIZE = 512; @@ -179,7 +177,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XTypeDescriptionEnumeration > SAL_CALL createTypeDescriptionEnumeration( - const ::rtl::OUString& moduleName, + const OUString& moduleName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::TypeClass >& types, ::com::sun::star::reflection::TypeDescriptionSearchDepth depth ) @@ -1000,7 +998,7 @@ Reference< XTypeDescription > ManagerImpl::getInstantiatedStruct( && name[i] == '>' && !args.empty(); } // args.size() cannot exceed SAL_MAX_INT32, as each argument consumes at - // least one position within an rtl::OUString (which is no longer than + // least one position within an OUString (which is no longer than // SAL_MAX_INT32): if (!good || (args.size() diff --git a/stoc/source/tdmanager/tdmgr_check.cxx b/stoc/source/tdmanager/tdmgr_check.cxx index ff9e763bea1e..2ffb80a32c97 100644 --- a/stoc/source/tdmanager/tdmgr_check.cxx +++ b/stoc/source/tdmanager/tdmgr_check.cxx @@ -33,8 +33,6 @@ #include "com/sun/star/reflection/XSingletonTypeDescription2.hpp" -using ::rtl::OUString; -using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::stoc_tdmgr; diff --git a/stoc/source/tdmanager/tdmgr_common.hxx b/stoc/source/tdmanager/tdmgr_common.hxx index 33f1a2ad307b..e841f5de5a3a 100644 --- a/stoc/source/tdmanager/tdmgr_common.hxx +++ b/stoc/source/tdmanager/tdmgr_common.hxx @@ -33,15 +33,15 @@ namespace stoc_tdmgr struct IncompatibleTypeException { - ::rtl::OUString m_cause; - IncompatibleTypeException( ::rtl::OUString const & cause ) + OUString m_cause; + IncompatibleTypeException( OUString const & cause ) : m_cause( cause ) {} }; void check( css::uno::Reference<css::reflection::XTypeDescription> const & xNewTD, css::uno::Reference<css::reflection::XTypeDescription> const & xExistingTD, - ::rtl::OUString const & context = ::rtl::OUString() ); + OUString const & context = OUString() ); /* throw (css::uno::RuntimeException, IncompatibleTypeException) */ } // namespace stoc_tdmgr diff --git a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx index ea44a750835e..0cacac0b86e8 100644 --- a/stoc/source/tdmanager/tdmgr_tdenumeration.cxx +++ b/stoc/source/tdmanager/tdmgr_tdenumeration.cxx @@ -37,7 +37,7 @@ namespace stoc_tdmgr //========================================================================= TypeDescriptionEnumerationImpl::TypeDescriptionEnumerationImpl( - const rtl::OUString & rModuleName, + const OUString & rModuleName, const com::sun::star::uno::Sequence< com::sun::star::uno::TypeClass > & rTypes, com::sun::star::reflection::TypeDescriptionSearchDepth eDepth, @@ -88,7 +88,7 @@ uno::Any SAL_CALL TypeDescriptionEnumerationImpl::nextElement() return xEnum->nextElement(); throw container::NoSuchElementException( - rtl::OUString("No further elements in enumeration!"), + OUString("No further elements in enumeration!"), static_cast< cppu::OWeakObject * >( this ) ); } @@ -110,7 +110,7 @@ TypeDescriptionEnumerationImpl::nextTypeDescription() return xEnum->nextTypeDescription(); throw container::NoSuchElementException( - rtl::OUString("No further elements in enumeration!"), + OUString("No further elements in enumeration!"), static_cast< cppu::OWeakObject * >( this ) ); } diff --git a/stoc/source/tdmanager/tdmgr_tdenumeration.hxx b/stoc/source/tdmanager/tdmgr_tdenumeration.hxx index d8ad3ffffb7b..81672ce5c0f8 100644 --- a/stoc/source/tdmanager/tdmgr_tdenumeration.hxx +++ b/stoc/source/tdmanager/tdmgr_tdenumeration.hxx @@ -39,7 +39,7 @@ class TypeDescriptionEnumerationImpl { public: TypeDescriptionEnumerationImpl( - const rtl::OUString & rModuleName, + const OUString & rModuleName, const com::sun::star::uno::Sequence< com::sun::star::uno::TypeClass > & rTypes, com::sun::star::reflection::TypeDescriptionSearchDepth eDepth, @@ -67,7 +67,7 @@ private: queryCurrentChildEnumeration(); osl::Mutex m_aMutex; - rtl::OUString m_aModuleName; + OUString m_aModuleName; com::sun::star::uno::Sequence< com::sun::star::uno::TypeClass > m_aTypes; com::sun::star::reflection::TypeDescriptionSearchDepth m_eDepth; TDEnumerationAccessStack m_aChildren; diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 125f50bf5ce2..09dd9142ef78 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -46,7 +46,6 @@ using namespace com::sun::star::script; using namespace com::sun::star::registry; using namespace cppu; using namespace osl; -using ::rtl::OUString; #define SERVICENAME "com.sun.star.script.Converter" #define IMPLNAME "com.sun.star.comp.stoc.TypeConverter" diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index 0888326e340a..fde82194d410 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -53,21 +53,21 @@ public: css::uno::Reference< css::uno::XComponentContext > const & context): m_context(context) {} - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) + virtual sal_Bool SAL_CALL supportsService(OUString const & serviceName) throw (css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL - translateToInternal(rtl::OUString const & externalUriReference) + virtual OUString SAL_CALL + translateToInternal(OUString const & externalUriReference) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL - translateToExternal(rtl::OUString const & internalUriReference) + virtual OUString SAL_CALL + translateToExternal(OUString const & internalUriReference) throw (css::uno::RuntimeException); private: @@ -79,29 +79,29 @@ private: css::uno::Reference< css::uno::XComponentContext > m_context; }; -rtl::OUString Translator::getImplementationName() +OUString Translator::getImplementationName() throw (css::uno::RuntimeException) { return stoc_services::ExternalUriReferenceTranslator::getImplementationName(); } -sal_Bool Translator::supportsService(rtl::OUString const & serviceName) +sal_Bool Translator::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { return stoc::uriproc::supportsService( getSupportedServiceNames(), serviceName); } -css::uno::Sequence< rtl::OUString > Translator::getSupportedServiceNames() +css::uno::Sequence< OUString > Translator::getSupportedServiceNames() throw (css::uno::RuntimeException) { return stoc_services::ExternalUriReferenceTranslator:: getSupportedServiceNames(); } -rtl::OUString Translator::translateToInternal( - rtl::OUString const & externalUriReference) +OUString Translator::translateToInternal( + OUString const & externalUriReference) throw (css::uno::RuntimeException) { if (!externalUriReference.matchIgnoreAsciiCaseAsciiL( @@ -110,7 +110,7 @@ rtl::OUString Translator::translateToInternal( return externalUriReference; } sal_Int32 i = RTL_CONSTASCII_LENGTH("file:"); - rtl::OUStringBuffer buf; + OUStringBuffer buf; buf.append(externalUriReference.getStr(), i); // Some environments (e.g., Java) produce illegal file URLs without an // authority part; treat them as having an empty authority part: @@ -128,7 +128,7 @@ rtl::OUString Translator::translateToInternal( ++j; } if (j != i) { - rtl::OUString seg( + OUString seg( rtl::Uri::encode( rtl::Uri::decode( externalUriReference.copy(i, j - i), @@ -136,7 +136,7 @@ rtl::OUString Translator::translateToInternal( rtl_UriCharClassPchar, rtl_UriEncodeStrict, RTL_TEXTENCODING_UTF8)); if (seg.isEmpty()) { - return rtl::OUString(); + return OUString(); } buf.append(seg); } @@ -150,8 +150,8 @@ rtl::OUString Translator::translateToInternal( return buf.makeStringAndClear(); } -rtl::OUString Translator::translateToExternal( - rtl::OUString const & internalUriReference) +OUString Translator::translateToExternal( + OUString const & internalUriReference) throw (css::uno::RuntimeException) { if (!internalUriReference.matchIgnoreAsciiCaseAsciiL( @@ -160,7 +160,7 @@ rtl::OUString Translator::translateToExternal( return internalUriReference; } sal_Int32 i = RTL_CONSTASCII_LENGTH("file://"); - rtl::OUStringBuffer buf; + OUStringBuffer buf; buf.append(internalUriReference.getStr(), i); rtl_TextEncoding encoding = osl_getThreadTextEncoding(); for (bool path = true;;) { @@ -175,7 +175,7 @@ rtl::OUString Translator::translateToExternal( // Use rtl_UriDecodeToIuri -> rtl_UriEncodeStrictKeepEscapes instead // of rtl_UriDecodeStrict -> rtl_UriEncodeStrict, so that spurious // non--UTF-8 octets like "%FE" are copied verbatim: - rtl::OUString seg( + OUString seg( rtl::Uri::encode( rtl::Uri::decode( internalUriReference.copy(i, j - i), @@ -183,7 +183,7 @@ rtl::OUString Translator::translateToExternal( rtl_UriCharClassPchar, rtl_UriEncodeStrictKeepEscapes, encoding)); if (seg.isEmpty()) { - return rtl::OUString(); + return OUString(); } buf.append(seg); } @@ -209,17 +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("std::bad_alloc"), 0); + OUString("std::bad_alloc"), 0); } } -rtl::OUString getImplementationName() { - return rtl::OUString("com.sun.star.comp.uri.ExternalUriReferenceTranslator"); +OUString getImplementationName() { + return OUString("com.sun.star.comp.uri.ExternalUriReferenceTranslator"); } -css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { - css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString("com.sun.star.uri.ExternalUriReferenceTranslator"); +css::uno::Sequence< OUString > getSupportedServiceNames() { + css::uno::Sequence< OUString > s(1); + s[0] = OUString("com.sun.star.uri.ExternalUriReferenceTranslator"); return s; } diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.hxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.hxx index f823286cc439..3da16dbcd0bb 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.hxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.hxx @@ -40,9 +40,9 @@ namespace ExternalUriReferenceTranslator { const & context) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); + OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx index 2dafb685a8d9..312203d78587 100644 --- a/stoc/source/uriproc/UriReference.cxx +++ b/stoc/source/uriproc/UriReference.cxx @@ -30,9 +30,9 @@ using stoc::uriproc::UriReference; UriReference::UriReference( - rtl::OUString const & scheme, bool bIsHierarchical, bool bHasAuthority, - rtl::OUString const & authority, rtl::OUString const & path, - bool bHasQuery, rtl::OUString const & query): + OUString const & scheme, bool bIsHierarchical, bool bHasAuthority, + OUString const & authority, OUString const & path, + bool bHasQuery, OUString const & query): m_scheme(scheme), m_authority(authority), m_path(path), @@ -51,10 +51,10 @@ UriReference::UriReference( UriReference::~UriReference() {} -rtl::OUString UriReference::getUriReference() throw (css::uno::RuntimeException) +OUString UriReference::getUriReference() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); - rtl::OUStringBuffer buf; + OUStringBuffer buf; if (!m_scheme.isEmpty()) { buf.append(m_scheme); buf.append(static_cast< sal_Unicode >(':')); @@ -71,15 +71,15 @@ sal_Bool UriReference::isAbsolute() throw (css::uno::RuntimeException) { return !m_scheme.isEmpty(); } -rtl::OUString UriReference::getScheme() throw (css::uno::RuntimeException) { +OUString UriReference::getScheme() throw (css::uno::RuntimeException) { return m_scheme; } -rtl::OUString UriReference::getSchemeSpecificPart() +OUString UriReference::getSchemeSpecificPart() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); - rtl::OUStringBuffer buf; + OUStringBuffer buf; appendSchemeSpecificPart(buf); return buf.makeStringAndClear(); } @@ -94,12 +94,12 @@ sal_Bool UriReference::hasAuthority() throw (css::uno::RuntimeException) { return m_hasAuthority; } -rtl::OUString UriReference::getAuthority() throw (css::uno::RuntimeException) { +OUString UriReference::getAuthority() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_authority; } -rtl::OUString UriReference::getPath() throw (css::uno::RuntimeException) { +OUString UriReference::getPath() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_path; } @@ -128,7 +128,7 @@ sal_Int32 UriReference::getPathSegmentCount() throw (css::uno::RuntimeException) } } -rtl::OUString UriReference::getPathSegment(sal_Int32 index) +OUString UriReference::getPathSegment(sal_Int32 index) throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); @@ -144,7 +144,7 @@ rtl::OUString UriReference::getPathSegment(sal_Int32 index) } } } - return rtl::OUString(); + return OUString(); } sal_Bool UriReference::hasQuery() throw (css::uno::RuntimeException) { @@ -152,7 +152,7 @@ sal_Bool UriReference::hasQuery() throw (css::uno::RuntimeException) { return m_hasQuery; } -rtl::OUString UriReference::getQuery() throw (css::uno::RuntimeException) { +OUString UriReference::getQuery() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_query; } @@ -162,12 +162,12 @@ sal_Bool UriReference::hasFragment() throw (css::uno::RuntimeException) { return m_hasFragment; } -rtl::OUString UriReference::getFragment() throw (css::uno::RuntimeException) { +OUString UriReference::getFragment() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_fragment; } -void UriReference::setFragment(rtl::OUString const & fragment) +void UriReference::setFragment(OUString const & fragment) throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); @@ -178,10 +178,10 @@ void UriReference::setFragment(rtl::OUString const & fragment) void UriReference::clearFragment() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); m_hasFragment = false; - m_fragment = rtl::OUString(); + m_fragment = OUString(); } -void UriReference::appendSchemeSpecificPart(rtl::OUStringBuffer & buffer) const +void UriReference::appendSchemeSpecificPart(OUStringBuffer & buffer) const { if (m_hasAuthority) { buffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("//")); diff --git a/stoc/source/uriproc/UriReference.hxx b/stoc/source/uriproc/UriReference.hxx index e6557cc4cb26..f6037a2325ea 100644 --- a/stoc/source/uriproc/UriReference.hxx +++ b/stoc/source/uriproc/UriReference.hxx @@ -24,65 +24,64 @@ #include "osl/mutex.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" - -namespace rtl { class OUStringBuffer; } +#include "rtl/ustrbuf.hxx" namespace stoc { namespace uriproc { class UriReference { public: UriReference( - rtl::OUString const & scheme, bool isHierarchical, bool hasAuthority, - rtl::OUString const & authority, rtl::OUString const & path, - bool hasQuery, rtl::OUString const & query); + OUString const & scheme, bool isHierarchical, bool hasAuthority, + OUString const & authority, OUString const & path, + bool hasQuery, OUString const & query); ~UriReference(); - rtl::OUString getUriReference() + OUString getUriReference() throw (com::sun::star::uno::RuntimeException); sal_Bool isAbsolute() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getScheme() throw (com::sun::star::uno::RuntimeException); + OUString getScheme() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getSchemeSpecificPart() + OUString getSchemeSpecificPart() throw (com::sun::star::uno::RuntimeException); sal_Bool isHierarchical() throw (com::sun::star::uno::RuntimeException); sal_Bool hasAuthority() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getAuthority() throw (com::sun::star::uno::RuntimeException); + OUString getAuthority() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getPath() throw (com::sun::star::uno::RuntimeException); + OUString getPath() throw (com::sun::star::uno::RuntimeException); sal_Bool hasRelativePath() throw (com::sun::star::uno::RuntimeException); sal_Int32 getPathSegmentCount() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getPathSegment(sal_Int32 index) + OUString getPathSegment(sal_Int32 index) throw (com::sun::star::uno::RuntimeException); sal_Bool hasQuery() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getQuery() throw (com::sun::star::uno::RuntimeException); + OUString getQuery() throw (com::sun::star::uno::RuntimeException); sal_Bool hasFragment() throw (com::sun::star::uno::RuntimeException); - rtl::OUString getFragment() throw (com::sun::star::uno::RuntimeException); + OUString getFragment() throw (com::sun::star::uno::RuntimeException); - void setFragment(rtl::OUString const & fragment) + void setFragment(OUString const & fragment) throw (com::sun::star::uno::RuntimeException); void clearFragment() throw (com::sun::star::uno::RuntimeException); osl::Mutex m_mutex; - rtl::OUString m_scheme; - rtl::OUString m_authority; - rtl::OUString m_path; - rtl::OUString m_query; - rtl::OUString m_fragment; + OUString m_scheme; + OUString m_authority; + OUString m_path; + OUString m_query; + OUString m_fragment; bool m_isHierarchical; bool m_hasAuthority; bool m_hasQuery; @@ -92,7 +91,7 @@ private: UriReference(UriReference &); // not implemented void operator =(UriReference); // not implemented - void appendSchemeSpecificPart(rtl::OUStringBuffer & buffer) const; + void appendSchemeSpecificPart(OUStringBuffer & buffer) const; }; } } diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index a5f6041339ab..26b693e96651 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -84,7 +84,7 @@ bool equalIgnoreCase(sal_Unicode c1, sal_Unicode c2) { return toLowerCase(c1) == toLowerCase(c2); } -bool equalIgnoreEscapeCase(rtl::OUString const & s1, rtl::OUString const & s2) { +bool equalIgnoreEscapeCase(OUString const & s1, OUString const & s2) { if (s1.getLength() == s2.getLength()) { for (sal_Int32 i = 0; i < s1.getLength();) { if (s1[i] == '%' && s2[i] == '%' && s1.getLength() - i > 2 @@ -106,7 +106,7 @@ bool equalIgnoreEscapeCase(rtl::OUString const & s1, rtl::OUString const & s2) { } } -sal_Int32 parseScheme(rtl::OUString const & uriReference) { +sal_Int32 parseScheme(OUString const & uriReference) { if (uriReference.getLength() >= 2 && isAlpha(uriReference[0])) { for (sal_Int32 i = 0; i < uriReference.getLength(); ++i) { sal_Unicode c = uriReference[i]; @@ -125,15 +125,15 @@ sal_Int32 parseScheme(rtl::OUString const & uriReference) { class UriReference: public cppu::WeakImplHelper1< css::uri::XUriReference > { public: UriReference( - rtl::OUString const & scheme, bool bIsHierarchical, bool bHasAuthority, - rtl::OUString const & authority, rtl::OUString const & path, - bool bHasQuery, rtl::OUString const & query): + OUString const & scheme, bool bIsHierarchical, bool bHasAuthority, + OUString const & authority, OUString const & path, + bool bHasQuery, OUString const & query): m_base( scheme, bIsHierarchical, bHasAuthority, authority, path, bHasQuery, query) {} - virtual rtl::OUString SAL_CALL getUriReference() + virtual OUString SAL_CALL getUriReference() throw (com::sun::star::uno::RuntimeException) { return m_base.getUriReference(); } @@ -141,11 +141,11 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.isAbsolute(); } - virtual rtl::OUString SAL_CALL getScheme() + virtual OUString SAL_CALL getScheme() throw (com::sun::star::uno::RuntimeException) { return m_base.getScheme(); } - virtual rtl::OUString SAL_CALL getSchemeSpecificPart() + virtual OUString SAL_CALL getSchemeSpecificPart() throw (com::sun::star::uno::RuntimeException) { return m_base.getSchemeSpecificPart(); } @@ -157,11 +157,11 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.hasAuthority(); } - virtual rtl::OUString SAL_CALL getAuthority() + virtual OUString SAL_CALL getAuthority() throw (com::sun::star::uno::RuntimeException) { return m_base.getAuthority(); } - virtual rtl::OUString SAL_CALL getPath() + virtual OUString SAL_CALL getPath() throw (com::sun::star::uno::RuntimeException) { return m_base.getPath(); } @@ -173,7 +173,7 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.getPathSegmentCount(); } - virtual rtl::OUString SAL_CALL getPathSegment(sal_Int32 index) + virtual OUString SAL_CALL getPathSegment(sal_Int32 index) throw (com::sun::star::uno::RuntimeException) { return m_base.getPathSegment(index); } @@ -181,7 +181,7 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.hasQuery(); } - virtual rtl::OUString SAL_CALL getQuery() + virtual OUString SAL_CALL getQuery() throw (com::sun::star::uno::RuntimeException) { return m_base.getQuery(); } @@ -189,11 +189,11 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.hasFragment(); } - virtual rtl::OUString SAL_CALL getFragment() + virtual OUString SAL_CALL getFragment() throw (com::sun::star::uno::RuntimeException) { return m_base.getFragment(); } - virtual void SAL_CALL setFragment(rtl::OUString const & fragment) + virtual void SAL_CALL setFragment(OUString const & fragment) throw (com::sun::star::uno::RuntimeException) { m_base.setFragment(fragment); } @@ -212,17 +212,17 @@ private: // throws std::bad_alloc css::uno::Reference< css::uri::XUriReference > parseGeneric( - rtl::OUString const & scheme, rtl::OUString const & schemeSpecificPart) + OUString const & scheme, OUString const & schemeSpecificPart) { bool isAbsolute = !scheme.isEmpty(); bool isHierarchical = !isAbsolute || (!schemeSpecificPart.isEmpty() && schemeSpecificPart[0] == '/'); bool hasAuthority = false; - rtl::OUString authority; - rtl::OUString path; + OUString authority; + OUString path; bool hasQuery = false; - rtl::OUString query; + OUString query; if (isHierarchical) { sal_Int32 len = schemeSpecificPart.getLength(); sal_Int32 i = 0; @@ -270,7 +270,7 @@ void processSegments( OSL_ASSERT(count <= SAL_MAX_INT32 - 1 && -count >= SAL_MIN_INT32 + 1); for (sal_Int32 i = 0; i < count; ++i) { if (processSpecialSegments) { - rtl::OUString segment(uriReference->getPathSegment(i)); + OUString segment(uriReference->getPathSegment(i)); if ( segment == "." ) { if (!base && i == count - 1) { segments.push_back(0); @@ -299,17 +299,17 @@ public: css::uno::Reference< css::uno::XComponentContext > const & context): m_context(context) {} - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) + virtual sal_Bool SAL_CALL supportsService(OUString const & serviceName) throw (css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::uri::XUriReference > SAL_CALL - parse(rtl::OUString const & uriReference) + parse(OUString const & uriReference) throw (css::uno::RuntimeException); virtual css::uno::Reference< css::uri::XUriReference > SAL_CALL @@ -342,41 +342,41 @@ private: css::uno::Reference< css::uno::XComponentContext > m_context; }; -rtl::OUString Factory::getImplementationName() +OUString Factory::getImplementationName() throw (css::uno::RuntimeException) { return stoc_services::UriReferenceFactory::getImplementationName(); } -sal_Bool Factory::supportsService(rtl::OUString const & serviceName) +sal_Bool Factory::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { return stoc::uriproc::supportsService( getSupportedServiceNames(), serviceName); } -css::uno::Sequence< rtl::OUString > Factory::getSupportedServiceNames() +css::uno::Sequence< OUString > Factory::getSupportedServiceNames() throw (css::uno::RuntimeException) { return stoc_services::UriReferenceFactory::getSupportedServiceNames(); } css::uno::Reference< css::uri::XUriReference > Factory::parse( - rtl::OUString const & uriReference) throw (css::uno::RuntimeException) + OUString const & uriReference) throw (css::uno::RuntimeException) { sal_Int32 fragment = uriReference.indexOf('#'); if (fragment == -1) { fragment = uriReference.getLength(); } - rtl::OUString scheme; - rtl::OUString schemeSpecificPart; - rtl::OUString serviceName; + OUString scheme; + OUString schemeSpecificPart; + OUString serviceName; sal_Int32 n = parseScheme(uriReference); OSL_ASSERT(n < fragment); if (n >= 0) { scheme = uriReference.copy(0, n); schemeSpecificPart = uriReference.copy(n + 1, fragment - (n + 1)); - rtl::OUStringBuffer buf; + OUStringBuffer buf; buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("com.sun.star.uri.UriSchemeParser_")); for (sal_Int32 i = 0; i < scheme.getLength(); ++i) { @@ -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("creating service ") + 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("std::bad_alloc"), + OUString("std::bad_alloc"), static_cast< cppu::OWeakObject * >(this)); } } @@ -464,7 +464,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( } return abs; } else { - rtl::OUStringBuffer abs(baseUriReference->getScheme()); + OUStringBuffer abs(baseUriReference->getScheme()); abs.append(static_cast< sal_Unicode >(':')); if (uriReference->hasAuthority()) { abs.appendAscii(RTL_CONSTASCII_STRINGPARAM("//")); @@ -492,7 +492,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( ++i) { if (*i < -1) { - rtl::OUString segment( + OUString segment( baseUriReference->getPathSegment(-(*i + 2))); if (!segment.isEmpty() || segments.size() > 1) { if (!slash) { @@ -503,7 +503,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( abs.append(static_cast< sal_Unicode >('/')); } } else if (*i > 1) { - rtl::OUString segment(uriReference->getPathSegment(*i - 2)); + OUString segment(uriReference->getPathSegment(*i - 2)); if (!segment.isEmpty() || segments.size() > 1) { if (!slash) { abs.append(static_cast< sal_Unicode >('/')); @@ -571,7 +571,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeRelative( uriReference->getScheme())) { return clone(uriReference); } else { - rtl::OUStringBuffer rel; + OUStringBuffer rel; bool omitQuery = false; if ((baseUriReference->hasAuthority() != uriReference->hasAuthority()) || !equalIgnoreEscapeCase( @@ -651,7 +651,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeRelative( if (segments) { rel.append(static_cast< sal_Unicode >('/')); } - rtl::OUString s(uriReference->getPathSegment(i)); + OUString s(uriReference->getPathSegment(i)); if (encodeRetainedSpecialSegments && s.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("."))) { @@ -694,17 +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("std::bad_alloc"), 0); + OUString("std::bad_alloc"), 0); } } -rtl::OUString getImplementationName() { - return rtl::OUString("com.sun.star.comp.uri.UriReferenceFactory"); +OUString getImplementationName() { + return OUString("com.sun.star.comp.uri.UriReferenceFactory"); } -css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { - css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString("com.sun.star.uri.UriReferenceFactory"); +css::uno::Sequence< OUString > getSupportedServiceNames() { + css::uno::Sequence< OUString > s(1); + s[0] = OUString("com.sun.star.uri.UriReferenceFactory"); return s; } diff --git a/stoc/source/uriproc/UriReferenceFactory.hxx b/stoc/source/uriproc/UriReferenceFactory.hxx index 39758d29421c..4a18d502467e 100644 --- a/stoc/source/uriproc/UriReferenceFactory.hxx +++ b/stoc/source/uriproc/UriReferenceFactory.hxx @@ -40,9 +40,9 @@ namespace UriReferenceFactory { const & context) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); + OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx index ffeb1dbde867..d8545d692a0c 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx @@ -48,7 +48,7 @@ namespace { -bool parseSchemeSpecificPart(::rtl::OUString const & part) { +bool parseSchemeSpecificPart(OUString const & part) { // Liberally accepts both an empty opaque_part and an opaque_part that // starts with a non-escaped "/": return part.isEmpty() @@ -59,24 +59,24 @@ class UrlReference: public ::cppu::WeakImplHelper1< css::uri::XVndSunStarExpandUrlReference > { public: - UrlReference(::rtl::OUString const & scheme, ::rtl::OUString const & path): + UrlReference(OUString const & scheme, OUString const & path): base_( - scheme, false, false, ::rtl::OUString(), path, false, - ::rtl::OUString()) + scheme, false, false, OUString(), path, false, + OUString()) {} - virtual ::rtl::OUString SAL_CALL getUriReference() + virtual OUString SAL_CALL getUriReference() throw (css::uno::RuntimeException) { return base_.getUriReference(); } virtual ::sal_Bool SAL_CALL isAbsolute() throw (css::uno::RuntimeException) { return base_.isAbsolute(); } - virtual ::rtl::OUString SAL_CALL getScheme() + virtual OUString SAL_CALL getScheme() throw (css::uno::RuntimeException) { return base_.getScheme(); } - virtual ::rtl::OUString SAL_CALL getSchemeSpecificPart() + virtual OUString SAL_CALL getSchemeSpecificPart() throw (css::uno::RuntimeException) { return base_.getSchemeSpecificPart(); } @@ -88,11 +88,11 @@ public: throw (css::uno::RuntimeException) { return base_.hasAuthority(); } - virtual ::rtl::OUString SAL_CALL getAuthority() + virtual OUString SAL_CALL getAuthority() throw (css::uno::RuntimeException) { return base_.getAuthority(); } - virtual ::rtl::OUString SAL_CALL getPath() + virtual OUString SAL_CALL getPath() throw (css::uno::RuntimeException) { return base_.getPath(); } @@ -104,32 +104,32 @@ public: throw (css::uno::RuntimeException) { return base_.getPathSegmentCount(); } - virtual ::rtl::OUString SAL_CALL getPathSegment(sal_Int32 index) + virtual OUString SAL_CALL getPathSegment(sal_Int32 index) throw (css::uno::RuntimeException) { return base_.getPathSegment(index); } virtual ::sal_Bool SAL_CALL hasQuery() throw (css::uno::RuntimeException) { return base_.hasQuery(); } - virtual ::rtl::OUString SAL_CALL getQuery() + virtual OUString SAL_CALL getQuery() throw (css::uno::RuntimeException) { return base_.getQuery(); } virtual ::sal_Bool SAL_CALL hasFragment() throw (css::uno::RuntimeException) { return base_.hasFragment(); } - virtual ::rtl::OUString SAL_CALL getFragment() + virtual OUString SAL_CALL getFragment() throw (css::uno::RuntimeException) { return base_.getFragment(); } - virtual void SAL_CALL setFragment(::rtl::OUString const & fragment) + virtual void SAL_CALL setFragment(OUString const & fragment) throw (css::uno::RuntimeException) { base_.setFragment(fragment); } virtual void SAL_CALL clearFragment() throw (css::uno::RuntimeException) { base_.clearFragment(); } - virtual ::rtl::OUString SAL_CALL expand( + virtual OUString SAL_CALL expand( css::uno::Reference< css::util::XMacroExpander > const & expander) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); @@ -142,7 +142,7 @@ private: stoc::uriproc::UriReference base_; }; -::rtl::OUString UrlReference::expand( +OUString UrlReference::expand( css::uno::Reference< css::util::XMacroExpander > const & expander) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) { @@ -158,20 +158,20 @@ class Parser: public ::cppu::WeakImplHelper2< public: Parser() {} - virtual ::rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL supportsService( - ::rtl::OUString const & serviceName) + OUString const & serviceName) throw (css::uno::RuntimeException); - virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::uri::XUriReference > SAL_CALL parse( - ::rtl::OUString const & scheme, - ::rtl::OUString const & schemeSpecificPart) + OUString const & scheme, + OUString const & schemeSpecificPart) throw (css::uno::RuntimeException); private: @@ -181,21 +181,21 @@ private: virtual ~Parser() {} }; -::rtl::OUString Parser::getImplementationName() +OUString Parser::getImplementationName() throw (css::uno::RuntimeException) { return ::stoc_services::UriSchemeParser_vndDOTsunDOTstarDOTexpand:: getImplementationName(); } -::sal_Bool Parser::supportsService(::rtl::OUString const & serviceName) +::sal_Bool Parser::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { return ::stoc::uriproc::supportsService( getSupportedServiceNames(), serviceName); } -css::uno::Sequence< ::rtl::OUString > Parser::getSupportedServiceNames() +css::uno::Sequence< OUString > Parser::getSupportedServiceNames() throw (css::uno::RuntimeException) { return ::stoc_services::UriSchemeParser_vndDOTsunDOTstarDOTexpand:: @@ -203,7 +203,7 @@ css::uno::Sequence< ::rtl::OUString > Parser::getSupportedServiceNames() } css::uno::Reference< css::uri::XUriReference > Parser::parse( - ::rtl::OUString const & scheme, ::rtl::OUString const & schemeSpecificPart) + OUString const & scheme, OUString const & schemeSpecificPart) throw (css::uno::RuntimeException) { if (!parseSchemeSpecificPart(schemeSpecificPart)) { @@ -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("std::bad_alloc"), + OUString("std::bad_alloc"), css::uno::Reference< css::uno::XInterface >()); } } @@ -232,19 +232,19 @@ css::uno::Reference< css::uno::XInterface > create( return static_cast< ::cppu::OWeakObject * >(new Parser); } catch (::std::bad_alloc &) { throw css::uno::RuntimeException( - ::rtl::OUString("std::bad_alloc"), + OUString("std::bad_alloc"), css::uno::Reference< css::uno::XInterface >()); } } -::rtl::OUString getImplementationName() { - return ::rtl::OUString( +OUString getImplementationName() { + return OUString( "com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand"); } -css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames() { - css::uno::Sequence< ::rtl::OUString > s(1); - s[0] = ::rtl::OUString( +css::uno::Sequence< OUString > getSupportedServiceNames() { + css::uno::Sequence< OUString > s(1); + s[0] = OUString( "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 073d279dafb5..f82178fa57a1 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -52,7 +52,7 @@ int getHexWeight(sal_Unicode c) { : -1; } -int parseEscaped(rtl::OUString const & part, sal_Int32 * index) { +int parseEscaped(OUString const & part, sal_Int32 * index) { if (part.getLength() - *index < 3 || part[*index] != '%') { return -1; } @@ -65,10 +65,10 @@ int parseEscaped(rtl::OUString const & part, sal_Int32 * index) { return (n1 << 4) | n2; } -rtl::OUString parsePart( - rtl::OUString const & part, bool namePart, sal_Int32 * index) +OUString parsePart( + OUString const & part, bool namePart, sal_Int32 * index) { - rtl::OUStringBuffer buf; + OUStringBuffer buf; while (*index < part.getLength()) { sal_Unicode c = part[*index]; if (namePart ? c == '?' : c == '&' || c == '=') { @@ -140,7 +140,7 @@ rtl::OUString parsePart( namespace { - static rtl::OUString encodeNameOrParamFragment( rtl::OUString const & fragment ) + static OUString encodeNameOrParamFragment( OUString const & fragment ) { static sal_Bool const aCharClass[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* NameOrParamFragment */ @@ -162,7 +162,7 @@ namespace } } -bool parseSchemeSpecificPart(rtl::OUString const & part) { +bool parseSchemeSpecificPart(OUString const & part) { sal_Int32 len = part.getLength(); sal_Int32 i = 0; if (parsePart(part, true, &i).isEmpty() || part[0] == '/') { @@ -193,12 +193,12 @@ class UrlReference: public cppu::WeakImplHelper1< css::uri::XVndSunStarScriptUrlReference > { public: - UrlReference(rtl::OUString const & scheme, rtl::OUString const & path): + UrlReference(OUString const & scheme, OUString const & path): m_base( - scheme, false, false, rtl::OUString(), path, false, rtl::OUString()) + scheme, false, false, OUString(), path, false, OUString()) {} - virtual rtl::OUString SAL_CALL getUriReference() + virtual OUString SAL_CALL getUriReference() throw (com::sun::star::uno::RuntimeException) { return m_base.getUriReference(); } @@ -206,11 +206,11 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.isAbsolute(); } - virtual rtl::OUString SAL_CALL getScheme() + virtual OUString SAL_CALL getScheme() throw (com::sun::star::uno::RuntimeException) { return m_base.getScheme(); } - virtual rtl::OUString SAL_CALL getSchemeSpecificPart() + virtual OUString SAL_CALL getSchemeSpecificPart() throw (com::sun::star::uno::RuntimeException) { return m_base.getSchemeSpecificPart(); } @@ -222,11 +222,11 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.hasAuthority(); } - virtual rtl::OUString SAL_CALL getAuthority() + virtual OUString SAL_CALL getAuthority() throw (com::sun::star::uno::RuntimeException) { return m_base.getAuthority(); } - virtual rtl::OUString SAL_CALL getPath() + virtual OUString SAL_CALL getPath() throw (com::sun::star::uno::RuntimeException) { return m_base.getPath(); } @@ -238,7 +238,7 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.getPathSegmentCount(); } - virtual rtl::OUString SAL_CALL getPathSegment(sal_Int32 index) + virtual OUString SAL_CALL getPathSegment(sal_Int32 index) throw (com::sun::star::uno::RuntimeException) { return m_base.getPathSegment(index); } @@ -246,7 +246,7 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.hasQuery(); } - virtual rtl::OUString SAL_CALL getQuery() + virtual OUString SAL_CALL getQuery() throw (com::sun::star::uno::RuntimeException) { return m_base.getQuery(); } @@ -254,11 +254,11 @@ public: throw (com::sun::star::uno::RuntimeException) { return m_base.hasFragment(); } - virtual rtl::OUString SAL_CALL getFragment() + virtual OUString SAL_CALL getFragment() throw (com::sun::star::uno::RuntimeException) { return m_base.getFragment(); } - virtual void SAL_CALL setFragment(rtl::OUString const & fragment) + virtual void SAL_CALL setFragment(OUString const & fragment) throw (com::sun::star::uno::RuntimeException) { m_base.setFragment(fragment); } @@ -266,18 +266,18 @@ public: throw (com::sun::star::uno::RuntimeException) { m_base.clearFragment(); } - virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); + virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException); - virtual void SAL_CALL setName(rtl::OUString const & name) + virtual void SAL_CALL setName(OUString const & name) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - virtual sal_Bool SAL_CALL hasParameter(rtl::OUString const & key) + virtual sal_Bool SAL_CALL hasParameter(OUString const & key) throw (css::uno::RuntimeException); - virtual rtl::OUString SAL_CALL getParameter(rtl::OUString const & key) + virtual OUString SAL_CALL getParameter(OUString const & key) throw (css::uno::RuntimeException); - virtual void SAL_CALL setParameter(rtl::OUString const & key, rtl::OUString const & value) + virtual void SAL_CALL setParameter(OUString const & key, OUString const & value) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); private: @@ -286,54 +286,54 @@ private: virtual ~UrlReference() {} - sal_Int32 findParameter(rtl::OUString const & key); + sal_Int32 findParameter(OUString const & key); stoc::uriproc::UriReference m_base; }; -rtl::OUString UrlReference::getName() throw (css::uno::RuntimeException) { +OUString UrlReference::getName() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_base.m_mutex); sal_Int32 i = 0; return parsePart(m_base.m_path, true, &i); } -void SAL_CALL UrlReference::setName(rtl::OUString const & name) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException) +void SAL_CALL UrlReference::setName(OUString const & name) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException) { if (name.isEmpty()) throw css::lang::IllegalArgumentException( - ::rtl::OUString(), *this, 1); + OUString(), *this, 1); osl::MutexGuard g(m_base.m_mutex); sal_Int32 i = 0; parsePart(m_base.m_path, true, &i); - rtl::OUStringBuffer newPath; + OUStringBuffer newPath; newPath.append(encodeNameOrParamFragment(name)); newPath.append(m_base.m_path.copy(i)); m_base.m_path = newPath.makeStringAndClear(); } -sal_Bool UrlReference::hasParameter(rtl::OUString const & key) +sal_Bool UrlReference::hasParameter(OUString const & key) throw (css::uno::RuntimeException) { osl::MutexGuard g(m_base.m_mutex); return findParameter(key) >= 0; } -rtl::OUString UrlReference::getParameter(rtl::OUString const & key) +OUString UrlReference::getParameter(OUString const & key) throw (css::uno::RuntimeException) { osl::MutexGuard g(m_base.m_mutex); sal_Int32 i = findParameter(key); - return i >= 0 ? parsePart(m_base.m_path, false, &i) : rtl::OUString(); + return i >= 0 ? parsePart(m_base.m_path, false, &i) : OUString(); } -void UrlReference::setParameter(rtl::OUString const & key, rtl::OUString const & value) +void UrlReference::setParameter(OUString const & key, OUString const & value) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException) { if (key.isEmpty()) throw css::lang::IllegalArgumentException( - ::rtl::OUString(), *this, 1); + OUString(), *this, 1); osl::MutexGuard g(m_base.m_mutex); sal_Int32 i = findParameter(key); @@ -342,7 +342,7 @@ void UrlReference::setParameter(rtl::OUString const & key, rtl::OUString const & i = m_base.m_path.getLength(); } - rtl::OUStringBuffer newPath; + OUStringBuffer newPath; newPath.append(m_base.m_path.copy(0, i)); if (!bExistent) { newPath.append(sal_Unicode(m_base.m_path.indexOf('?') < 0 ? '?' : '&')); @@ -359,7 +359,7 @@ void UrlReference::setParameter(rtl::OUString const & key, rtl::OUString const & m_base.m_path = newPath.makeStringAndClear(); } -sal_Int32 UrlReference::findParameter(rtl::OUString const & key) { +sal_Int32 UrlReference::findParameter(OUString const & key) { sal_Int32 i = 0; parsePart(m_base.m_path, true, &i); // skip name for (;;) { @@ -367,7 +367,7 @@ sal_Int32 UrlReference::findParameter(rtl::OUString const & key) { return -1; } ++i; // skip '?' or '&' - rtl::OUString k = parsePart(m_base.m_path, false, &i); + OUString k = parsePart(m_base.m_path, false, &i); ++i; // skip '=' if (k == key) { return i; @@ -382,18 +382,18 @@ class Parser: public cppu::WeakImplHelper2< public: Parser() {} - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) + virtual sal_Bool SAL_CALL supportsService(OUString const & serviceName) throw (css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::uri::XUriReference > SAL_CALL parse( - rtl::OUString const & scheme, rtl::OUString const & schemeSpecificPart) + OUString const & scheme, OUString const & schemeSpecificPart) throw (css::uno::RuntimeException); private: @@ -403,21 +403,21 @@ private: virtual ~Parser() {} }; -rtl::OUString Parser::getImplementationName() +OUString Parser::getImplementationName() throw (css::uno::RuntimeException) { return stoc_services::UriSchemeParser_vndDOTsunDOTstarDOTscript:: getImplementationName(); } -sal_Bool Parser::supportsService(rtl::OUString const & serviceName) +sal_Bool Parser::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { return stoc::uriproc::supportsService( getSupportedServiceNames(), serviceName); } -css::uno::Sequence< rtl::OUString > Parser::getSupportedServiceNames() +css::uno::Sequence< OUString > Parser::getSupportedServiceNames() throw (css::uno::RuntimeException) { return stoc_services::UriSchemeParser_vndDOTsunDOTstarDOTscript:: @@ -426,7 +426,7 @@ css::uno::Sequence< rtl::OUString > Parser::getSupportedServiceNames() css::uno::Reference< css::uri::XUriReference > Parser::parse( - rtl::OUString const & scheme, rtl::OUString const & schemeSpecificPart) + OUString const & scheme, OUString const & schemeSpecificPart) throw (css::uno::RuntimeException) { if (!parseSchemeSpecificPart(schemeSpecificPart)) { @@ -436,7 +436,7 @@ Parser::parse( return new UrlReference(scheme, schemeSpecificPart); } catch (std::bad_alloc &) { throw css::uno::RuntimeException( - rtl::OUString("std::bad_alloc"), 0); + OUString("std::bad_alloc"), 0); } } @@ -455,17 +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("std::bad_alloc"), 0); + OUString("std::bad_alloc"), 0); } } -rtl::OUString getImplementationName() { - return rtl::OUString("com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"); +OUString getImplementationName() { + return 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("com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"); +css::uno::Sequence< OUString > getSupportedServiceNames() { + css::uno::Sequence< OUString > s(1); + s[0] = OUString("com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"); return s; } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.hxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.hxx index c6259e433deb..8393fc90c995 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.hxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.hxx @@ -42,9 +42,9 @@ namespace UriSchemeParser_vndDOTsunDOTstarDOTscript { const &) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); + OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx index 2083d056715f..2dd5ac6f472d 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx @@ -55,13 +55,13 @@ public: css::uno::Reference< css::uno::XComponentContext > const & context): m_context(context) {} - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) + virtual sal_Bool SAL_CALL supportsService(OUString const & serviceName) throw (css::uno::RuntimeException); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::uri::XUriReference > SAL_CALL @@ -78,7 +78,7 @@ private: css::uno::Reference< css::uno::XComponentContext > m_context; }; -rtl::OUString Factory::getImplementationName() +OUString Factory::getImplementationName() throw (css::uno::RuntimeException) { return @@ -86,14 +86,14 @@ rtl::OUString Factory::getImplementationName() getImplementationName(); } -sal_Bool Factory::supportsService(rtl::OUString const & serviceName) +sal_Bool Factory::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { return stoc::uriproc::supportsService( getSupportedServiceNames(), serviceName); } -css::uno::Sequence< rtl::OUString > Factory::getSupportedServiceNames() +css::uno::Sequence< OUString > Factory::getSupportedServiceNames() throw (css::uno::RuntimeException) { return stoc_services::VndSunStarPkgUrlReferenceFactory:: @@ -107,7 +107,7 @@ Factory::createVndSunStarPkgUrlReference( { OSL_ASSERT(authority.is()); if (authority->isAbsolute() && !authority->hasFragment()) { - rtl::OUStringBuffer buf; + OUStringBuffer buf; buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.pkg://")); buf.append( rtl::Uri::encode( @@ -136,17 +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("std::bad_alloc"), 0); + OUString("std::bad_alloc"), 0); } } -rtl::OUString getImplementationName() { - return rtl::OUString("com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory"); +OUString getImplementationName() { + return OUString("com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory"); } -css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { - css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString("com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"); +css::uno::Sequence< OUString > getSupportedServiceNames() { + css::uno::Sequence< OUString > s(1); + s[0] = OUString("com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"); return s; } diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.hxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.hxx index aac2adaf7dd0..01da290700ad 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.hxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.hxx @@ -40,9 +40,9 @@ namespace VndSunStarPkgUrlReferenceFactory { const & context) SAL_THROW((com::sun::star::uno::Exception)); - rtl::OUString SAL_CALL getImplementationName(); + OUString SAL_CALL getImplementationName(); - com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL + com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(); } diff --git a/stoc/source/uriproc/supportsService.cxx b/stoc/source/uriproc/supportsService.cxx index d20f5749e8b6..b5a835f47c0d 100644 --- a/stoc/source/uriproc/supportsService.cxx +++ b/stoc/source/uriproc/supportsService.cxx @@ -27,8 +27,8 @@ namespace stoc { namespace uriproc { bool supportsService( - com::sun::star::uno::Sequence< rtl::OUString > const & serviceNames, - rtl::OUString const & serviceName) + com::sun::star::uno::Sequence< OUString > const & serviceNames, + OUString const & serviceName) { for (sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { if (serviceNames[i] == serviceName) { diff --git a/stoc/source/uriproc/supportsService.hxx b/stoc/source/uriproc/supportsService.hxx index c410360eee96..2ca3a5321463 100644 --- a/stoc/source/uriproc/supportsService.hxx +++ b/stoc/source/uriproc/supportsService.hxx @@ -27,8 +27,8 @@ namespace rtl { class OUString; } namespace stoc { namespace uriproc { bool supportsService( - com::sun::star::uno::Sequence< rtl::OUString > const & serviceNames, - rtl::OUString const & serviceName); + com::sun::star::uno::Sequence< OUString > const & serviceNames, + OUString const & serviceName); } } diff --git a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx index d95eb666ffcf..48ccb1e50db2 100644 --- a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx +++ b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx @@ -57,9 +57,6 @@ using namespace com::sun::star::registry; using namespace com::sun::star::java; using namespace com::sun::star::task; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; #define INTERACTION_HANDLER_NAME "java-vm.interaction-handler" diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx index 97418fa1df42..ece8cb16fee5 100644 --- a/stoc/test/javavm/testjavavm.cxx +++ b/stoc/test/javavm/testjavavm.cxx @@ -42,9 +42,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::registry; using namespace com::sun::star::java; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; sal_Bool testJavaVM(const Reference< XMultiServiceFactory > & xMgr ) diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx index 4e03b5aaf68b..c3ffaf1ee73d 100644 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx +++ b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx @@ -61,12 +61,12 @@ namespace { class Service: public cppu::WeakImplHelper1< css::lang::XMain > { public: virtual sal_Int32 SAL_CALL - run(css::uno::Sequence< rtl::OUString > const & arguments) + run(css::uno::Sequence< OUString > const & arguments) throw (css::uno::RuntimeException); - static rtl::OUString getImplementationName(); + static OUString getImplementationName(); - static css::uno::Sequence< rtl::OUString > getSupportedServiceNames(); + static css::uno::Sequence< OUString > getSupportedServiceNames(); static css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( css::uno::Reference< css::uno::XComponentContext > const & context) @@ -85,8 +85,8 @@ private: namespace { -std::ostream & operator <<(std::ostream & out, rtl::OUString const & value) { - return out << rtl::OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); +std::ostream & operator <<(std::ostream & out, OUString const & value) { + return out << OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); } void assertTrue(bool argument) { @@ -116,7 +116,7 @@ template< typename T > void assertEqual(T const & value, T const & argument) { } -sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) +sal_Int32 Service::run(css::uno::Sequence< OUString > const &) throw (css::uno::RuntimeException) { css::uno::Reference< css::lang::XMultiComponentFactory > factory( @@ -125,10 +125,10 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) css::uno::Sequence< css::uno::Any > args(1); args[0] = css::uno::Reference< css::beans::XPropertySet >( factory, css::uno::UNO_QUERY_THROW)->getPropertyValue( - rtl::OUString("Registry")); + OUString("Registry")); css::uno::Reference< css::container::XHierarchicalNameAccess > provider( factory->createInstanceWithArgumentsAndContext( - rtl::OUString( "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"), + OUString( "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"), args, m_context), css::uno::UNO_QUERY_THROW); @@ -141,65 +141,65 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual< bool >( false, provider->hasByHierarchicalName( - rtl::OUString( "[][]boolean"))); + OUString( "[][]boolean"))); assertEqual< bool >( false, provider->hasByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct3<boolean,boolean>"))); + OUString( "test.registrytdprovider.Struct3<boolean,boolean>"))); assertEqual< bool >( false, provider->hasByHierarchicalName( - rtl::OUString( "com.sun.star.uno.XComponentContext::getValueByName"))); + OUString( "com.sun.star.uno.XComponentContext::getValueByName"))); css::uno::Reference< css::reflection::XCompoundTypeDescription > exception; exception = css::uno::Reference< css::reflection::XCompoundTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "com.sun.star.uno.Exception")), + OUString( "com.sun.star.uno.Exception")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_EXCEPTION, exception->getTypeClass()); - assertEqual( rtl::OUString( "com.sun.star.uno.Exception"), + assertEqual( OUString( "com.sun.star.uno.Exception"), exception->getName()); assertFalse(exception->getBaseType().is()); exception = css::uno::Reference< css::reflection::XCompoundTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "com.sun.star.uno.RuntimeException")), + OUString( "com.sun.star.uno.RuntimeException")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_EXCEPTION, exception->getTypeClass()); - assertEqual( rtl::OUString( "com.sun.star.uno.RuntimeException"), + assertEqual( OUString( "com.sun.star.uno.RuntimeException"), exception->getName()); - assertEqual( rtl::OUString( "com.sun.star.uno.Exception"), + assertEqual( OUString( "com.sun.star.uno.Exception"), exception->getBaseType()->getName()); css::uno::Reference< css::reflection::XStructTypeDescription > structure; structure = css::uno::Reference< css::reflection::XStructTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct2")), + OUString( "test.registrytdprovider.Struct2")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_STRUCT, structure->getTypeClass()); - assertEqual( rtl::OUString( "test.registrytdprovider.Struct2"), + assertEqual( OUString( "test.registrytdprovider.Struct2"), structure->getName()); assertFalse(structure->getBaseType().is()); assertEqual< sal_Int32 >(1, structure->getMemberTypes().getLength()); assertEqual( - rtl::OUString( "test.registrytdprovider.Struct1"), + OUString( "test.registrytdprovider.Struct1"), structure->getMemberTypes()[0]->getName()); assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength()); assertEqual( - rtl::OUString("s1"), + OUString("s1"), structure->getMemberNames()[0]); assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength()); assertEqual< sal_Int32 >(0, structure->getTypeArguments().getLength()); structure = css::uno::Reference< css::reflection::XStructTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct3")), + OUString( "test.registrytdprovider.Struct3")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_STRUCT, structure->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.Struct3"), + OUString( "test.registrytdprovider.Struct3"), structure->getName()); assertFalse(structure->getBaseType().is()); assertEqual< sal_Int32 >(1, structure->getMemberTypes().getLength()); @@ -207,41 +207,41 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) css::uno::TypeClass_UNKNOWN, structure->getMemberTypes()[0]->getTypeClass()); assertEqual( - rtl::OUString("U"), + OUString("U"), structure->getMemberTypes()[0]->getName()); assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength()); assertEqual( - rtl::OUString("s2"), + OUString("s2"), structure->getMemberNames()[0]); assertEqual< sal_Int32 >(2, structure->getTypeParameters().getLength()); assertEqual( - rtl::OUString("T"), + OUString("T"), structure->getTypeParameters()[0]); assertEqual( - rtl::OUString("U"), + OUString("U"), structure->getTypeParameters()[1]); assertEqual< sal_Int32 >(0, structure->getTypeArguments().getLength()); structure = css::uno::Reference< css::reflection::XStructTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct4")), + OUString( "test.registrytdprovider.Struct4")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_STRUCT, structure->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.Struct4"), + OUString( "test.registrytdprovider.Struct4"), structure->getName()); assertEqual( - rtl::OUString( "test.registrytdprovider.Struct2"), + OUString( "test.registrytdprovider.Struct2"), structure->getBaseType()->getName()); assertEqual< sal_Int32 >(1, structure->getMemberTypes().getLength()); assertEqual( - rtl::OUString( "test.registrytdprovider.Struct3<" + OUString( "test.registrytdprovider.Struct3<" "test.registrytdprovider.Struct2," "test.registrytdprovider.Struct3<boolean,any>>"), structure->getMemberTypes()[0]->getName()); assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength()); assertEqual( - rtl::OUString("s2"), + OUString("s2"), structure->getMemberNames()[0]); assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength()); assertEqual< sal_Int32 >(0, structure->getTypeArguments().getLength()); @@ -252,25 +252,25 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) interface = css::uno::Reference< css::reflection::XInterfaceTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.XTest1")), + OUString( "test.registrytdprovider.XTest1")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE, interface->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest1"), + OUString( "test.registrytdprovider.XTest1"), interface->getName()); css::uno::Sequence< css::uno::Reference< css::reflection::XTypeDescription > > bases( interface->getBaseTypes()); assertEqual< sal_Int32 >(1, bases.getLength()); assertEqual( - rtl::OUString( "com.sun.star.uno.XInterface"), + OUString( "com.sun.star.uno.XInterface"), bases[0]->getName()); css::uno::Sequence< css::uno::Reference< css::reflection::XTypeDescription > > optionalBases(interface->getOptionalBaseTypes()); assertEqual< sal_Int32 >(1, optionalBases.getLength()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.XBase"), optionalBases[0]->getName()); css::uno::Sequence< @@ -296,15 +296,15 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual( css::uno::TypeClass_INTERFACE_ATTRIBUTE, attribute->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest1::a1"), + OUString( "test.registrytdprovider.XTest1::a1"), attribute->getName()); assertEqual( - rtl::OUString("a1"), + OUString("a1"), attribute->getMemberName()); assertEqual< sal_Int32 >(3, attribute->getPosition()); assertEqual< bool >(false, attribute->isReadOnly()); assertEqual( - rtl::OUString("short"), + OUString("short"), attribute->getType()->getName()); assertEqual< bool >(true, attribute->isBound()); getExceptions = attribute->getGetExceptions(); @@ -318,32 +318,32 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual( css::uno::TypeClass_INTERFACE_ATTRIBUTE, attribute->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest1::a2"), + OUString( "test.registrytdprovider.XTest1::a2"), attribute->getName()); assertEqual( - rtl::OUString("a2"), + OUString("a2"), attribute->getMemberName()); assertEqual< sal_Int32 >(4, attribute->getPosition()); assertEqual< bool >(false, attribute->isReadOnly()); assertEqual( - rtl::OUString("long"), + OUString("long"), attribute->getType()->getName()); assertEqual< bool >(false, attribute->isBound()); getExceptions = attribute->getGetExceptions(); assertEqual< sal_Int32 >(2, getExceptions.getLength()); assertEqual( - rtl::OUString( "com.sun.star.lang.WrappedTargetException"), + OUString( "com.sun.star.lang.WrappedTargetException"), getExceptions[0]->getName()); assertEqual( - rtl::OUString( "com.sun.star.uno.RuntimeException"), + OUString( "com.sun.star.uno.RuntimeException"), getExceptions[1]->getName()); setExceptions = attribute->getSetExceptions(); assertEqual< sal_Int32 >(2, setExceptions.getLength()); assertEqual( - rtl::OUString( "com.sun.star.uno.Exception"), + OUString( "com.sun.star.uno.Exception"), setExceptions[0]->getName()); assertEqual( - rtl::OUString( "com.sun.star.lang.WrappedTargetException"), + OUString( "com.sun.star.lang.WrappedTargetException"), setExceptions[1]->getName()); attribute = css::uno::Reference< @@ -352,22 +352,22 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual( css::uno::TypeClass_INTERFACE_ATTRIBUTE, attribute->getTypeClass()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.XTest1::a3"), attribute->getName()); assertEqual( - rtl::OUString("a3"), + OUString("a3"), attribute->getMemberName()); assertEqual< sal_Int32 >(5, attribute->getPosition()); assertEqual< bool >(true, attribute->isReadOnly()); assertEqual( - rtl::OUString("hyper"), + OUString("hyper"), attribute->getType()->getName()); assertEqual< bool >(true, attribute->isBound()); getExceptions = attribute->getGetExceptions(); assertEqual< sal_Int32 >(1, getExceptions.getLength()); assertEqual( - rtl::OUString( "com.sun.star.lang.WrappedTargetException"), + OUString( "com.sun.star.lang.WrappedTargetException"), getExceptions[0]->getName()); setExceptions = attribute->getSetExceptions(); assertEqual< sal_Int32 >(0, setExceptions.getLength()); @@ -377,26 +377,26 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) members[3], css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest1::f1"), + OUString( "test.registrytdprovider.XTest1::f1"), method->getName()); assertEqual( - rtl::OUString("f1"), + OUString("f1"), method->getMemberName()); assertEqual< sal_Int32 >(6, method->getPosition()); assertEqual< bool >(false, method->isOneway()); assertEqual< sal_Int32 >(1, method->getParameters().getLength()); assertEqual( - rtl::OUString("p"), + OUString("p"), method->getParameters()[0]->getName()); assertEqual( - rtl::OUString("any"), + OUString("any"), method->getParameters()[0]->getType()->getName()); assertEqual< bool >(false, method->getParameters()[0]->isIn()); assertEqual< bool >(true, method->getParameters()[0]->isOut()); assertEqual< sal_Int32 >(0, method->getParameters()[0]->getPosition()); assertEqual< sal_Int32 >(1, method->getExceptions().getLength()); assertEqual( - rtl::OUString( "com.sun.star.uno.RuntimeException"), + OUString( "com.sun.star.uno.RuntimeException"), method->getExceptions()[0]->getName()); method = css::uno::Reference< @@ -404,10 +404,10 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) members[4], css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest1::f2"), + OUString( "test.registrytdprovider.XTest1::f2"), method->getName()); assertEqual( - rtl::OUString("f2"), + OUString("f2"), method->getMemberName()); assertEqual< sal_Int32 >(7, method->getPosition()); assertEqual< bool >(true, method->isOneway()); @@ -417,15 +417,15 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) interface = css::uno::Reference< css::reflection::XInterfaceTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.XTest2")), + OUString( "test.registrytdprovider.XTest2")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE, interface->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest2"), + OUString( "test.registrytdprovider.XTest2"), interface->getName()); assertEqual< sal_Int32 >(1, interface->getBaseTypes().getLength()); assertEqual( - rtl::OUString( "test.registrytdprovider.Typedef2"), + OUString( "test.registrytdprovider.Typedef2"), interface->getBaseTypes()[0]->getName()); assertEqual< sal_Int32 >(0, interface->getOptionalBaseTypes().getLength()); assertEqual< sal_Int32 >(0, interface->getMembers().getLength()); @@ -434,11 +434,11 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) service = css::uno::Reference< css::reflection::XServiceTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Service1")), + OUString( "test.registrytdprovider.Service1")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SERVICE, service->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.Service1"), + OUString( "test.registrytdprovider.Service1"), service->getName()); assertEqual< sal_Int32 >(0, service->getMandatoryServices().getLength()); assertEqual< sal_Int32 >(0, service->getOptionalServices().getLength()); @@ -446,27 +446,27 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual< sal_Int32 >(0, service->getOptionalInterfaces().getLength()); assertEqual< bool >(true, service->isSingleInterfaceBased()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.XTest1"), service->getInterface()->getName()); assertEqual< sal_Int32 >(2, service->getConstructors().getLength()); assertEqual( - rtl::OUString("c1"), + OUString("c1"), service->getConstructors()[0]->getName()); assertEqual< sal_Int32 >( 0, service->getConstructors()[0]->getParameters().getLength()); assertEqual< sal_Int32 >( 0, service->getConstructors()[0]->getExceptions().getLength()); assertEqual( - rtl::OUString("c2"), + OUString("c2"), service->getConstructors()[1]->getName()); assertEqual< sal_Int32 >( 1, service->getConstructors()[1]->getParameters().getLength()); assertEqual( - rtl::OUString("p"), + OUString("p"), service->getConstructors()[1]->getParameters()[0]->getName()); assertEqual( - rtl::OUString("any"), + OUString("any"), (service->getConstructors()[1]->getParameters()[0]->getType()-> getName())); assertEqual< bool >( @@ -481,26 +481,26 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual< sal_Int32 >( 1, service->getConstructors()[1]->getExceptions().getLength()); assertEqual( - rtl::OUString( "com.sun.star.uno.RuntimeException"), + OUString( "com.sun.star.uno.RuntimeException"), service->getConstructors()[1]->getExceptions()[0]->getName()); service = css::uno::Reference< css::reflection::XServiceTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Service2")), + OUString( "test.registrytdprovider.Service2")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SERVICE, service->getTypeClass()); assertEqual( - rtl::OUString( "test.registrytdprovider.Service2"), + OUString( "test.registrytdprovider.Service2"), service->getName()); assertEqual< sal_Int32 >(0, service->getMandatoryServices().getLength()); assertEqual< sal_Int32 >(0, service->getOptionalServices().getLength()); assertEqual< sal_Int32 >(1, service->getMandatoryInterfaces().getLength()); assertEqual( - rtl::OUString( "test.registrytdprovider.XTest1"), + OUString( "test.registrytdprovider.XTest1"), service->getMandatoryInterfaces()[0]->getName()); assertEqual< sal_Int32 >(1, service->getOptionalInterfaces().getLength()); assertEqual( - rtl::OUString( "test.registrytdprovider.XBase"), + OUString( "test.registrytdprovider.XBase"), service->getOptionalInterfaces()[0]->getName()); assertEqual< bool >(false, service->isSingleInterfaceBased()); assertFalse(service->getInterface().is()); @@ -508,11 +508,11 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) service = css::uno::Reference< css::reflection::XServiceTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Service3")), + OUString( "test.registrytdprovider.Service3")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SERVICE, service->getTypeClass()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Service3"), service->getName()); assertEqual< sal_Int32 >(0, service->getMandatoryServices().getLength()); @@ -521,7 +521,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) assertEqual< sal_Int32 >(0, service->getOptionalInterfaces().getLength()); assertEqual< bool >(true, service->isSingleInterfaceBased()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Typedef2"), service->getInterface()->getName()); assertEqual< sal_Int32 >(0, service->getConstructors().getLength()); @@ -532,32 +532,32 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) singleton = css::uno::Reference< css::reflection::XSingletonTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Singleton1")), + OUString( "test.registrytdprovider.Singleton1")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SINGLETON, singleton->getTypeClass()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Singleton1"), singleton->getName()); assertFalse(singleton->getService().is()); assertEqual< bool >(true, singleton->isInterfaceBased()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.XTest1"), singleton->getInterface()->getName()); singleton = css::uno::Reference< css::reflection::XSingletonTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Singleton2")), + OUString( "test.registrytdprovider.Singleton2")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SINGLETON, singleton->getTypeClass()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Singleton2"), singleton->getName()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Service1"), singleton->getService()->getName()); assertEqual< bool >(false, singleton->isInterfaceBased()); @@ -566,17 +566,17 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) singleton = css::uno::Reference< css::reflection::XSingletonTypeDescription2 >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Singleton3")), + OUString( "test.registrytdprovider.Singleton3")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SINGLETON, singleton->getTypeClass()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Singleton3"), singleton->getName()); assertFalse(singleton->getService().is()); assertEqual< bool >(true, singleton->isInterfaceBased()); assertEqual( - rtl::OUString( + OUString( "test.registrytdprovider.Typedef2"), singleton->getInterface()->getName()); @@ -584,7 +584,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Enum1")), + OUString( "test.registrytdprovider.Enum1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -592,7 +592,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Enum2")), + OUString( "test.registrytdprovider.Enum2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -600,7 +600,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct1")), + OUString( "test.registrytdprovider.Struct1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -608,7 +608,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct2")), + OUString( "test.registrytdprovider.Struct2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -616,7 +616,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct3")), + OUString( "test.registrytdprovider.Struct3")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -624,14 +624,14 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XStructTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct3")), + OUString( "test.registrytdprovider.Struct3")), css::uno::UNO_QUERY_THROW)->getMemberTypes()[0], css::uno::UNO_QUERY); assertFalse(published.is()); published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Struct3a")), + OUString( "test.registrytdprovider.Struct3a")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -639,7 +639,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Exception1")), + OUString( "test.registrytdprovider.Exception1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -647,7 +647,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Exception2")), + OUString( "test.registrytdprovider.Exception2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -655,7 +655,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.XTest1")), + OUString( "test.registrytdprovider.XTest1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -663,7 +663,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.XTest2")), + OUString( "test.registrytdprovider.XTest2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -671,7 +671,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Typedef1")), + OUString( "test.registrytdprovider.Typedef1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -679,7 +679,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Typedef2")), + OUString( "test.registrytdprovider.Typedef2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -691,7 +691,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Consts1")), + OUString( "test.registrytdprovider.Consts1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -699,7 +699,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Consts2")), + OUString( "test.registrytdprovider.Consts2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -707,14 +707,14 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider")), + OUString( "test.registrytdprovider")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertFalse(published.is()); published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Service1")), + OUString( "test.registrytdprovider.Service1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -722,7 +722,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Service2")), + OUString( "test.registrytdprovider.Service2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -730,7 +730,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Singleton2")), + OUString( "test.registrytdprovider.Singleton2")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -738,7 +738,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) published = css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( provider->getByHierarchicalName( - rtl::OUString( "test.registrytdprovider.Singleton1")), + OUString( "test.registrytdprovider.Singleton1")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY); assertTrue(published.is()); @@ -747,12 +747,12 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const &) return 0; } -rtl::OUString Service::getImplementationName() { - return rtl::OUString("test.registrytdprovider.impl"); +OUString Service::getImplementationName() { + return OUString("test.registrytdprovider.impl"); } -css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames() { - return css::uno::Sequence< rtl::OUString >(); +css::uno::Sequence< OUString > Service::getSupportedServiceNames() { + return css::uno::Sequence< OUString >(); } css::uno::Reference< css::uno::XInterface > Service::createInstance( @@ -782,11 +782,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(char const namespace { -bool writeInfo(void * registryKey, rtl::OUString const & implementationName, - css::uno::Sequence< rtl::OUString > const & serviceNames) { - rtl::OUString keyName("/"); +bool writeInfo(void * registryKey, OUString const & implementationName, + css::uno::Sequence< OUString > const & serviceNames) { + OUString keyName("/"); keyName += implementationName; - keyName += rtl::OUString("/UNO/SERVICES"); + keyName += OUString("/UNO/SERVICES"); css::uno::Reference< css::registry::XRegistryKey > key; try { key = static_cast< css::registry::XRegistryKey * >(registryKey)-> diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx index 9e45fb3ff27c..31bf83c95bc7 100644 --- a/stoc/test/tdmanager/testtdmanager.cxx +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -59,12 +59,12 @@ namespace { class Service: public cppu::WeakImplHelper1< css::lang::XMain > { public: virtual sal_Int32 SAL_CALL - run(css::uno::Sequence< rtl::OUString > const & arguments) + run(css::uno::Sequence< OUString > const & arguments) throw (css::uno::RuntimeException); - static rtl::OUString getImplementationName(); + static OUString getImplementationName(); - static css::uno::Sequence< rtl::OUString > getSupportedServiceNames(); + static css::uno::Sequence< OUString > getSupportedServiceNames(); static css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( css::uno::Reference< css::uno::XComponentContext > const & context) @@ -83,8 +83,8 @@ private: namespace { -std::ostream & operator <<(std::ostream & out, rtl::OUString const & value) { - return out << rtl::OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); +std::ostream & operator <<(std::ostream & out, OUString const & value) { + return out << OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); } void assertTrue(bool argument) { @@ -114,7 +114,7 @@ template< typename T > void assertEqual(T const & value, T const & argument) { } -sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) +sal_Int32 Service::run(css::uno::Sequence< OUString > const & arguments) throw (css::uno::RuntimeException) { css::uno::Reference< css::lang::XMultiComponentFactory > factory( @@ -122,7 +122,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) assertTrue(factory.is()); css::uno::Reference< css::container::XHierarchicalNameAccess > manager( m_context->getValueByName( - rtl::OUString( + OUString( "/singletons/" "com.sun.star.reflection.theTypeDescriptionManager")), css::uno::UNO_QUERY_THROW); @@ -135,7 +135,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) css::uno::Reference<css::container::XSet> xSet( manager, css::uno::UNO_QUERY_THROW ); for ( sal_Int32 argPos = 0; argPos < arguments.getLength(); ++argPos ) { - rtl::OUString url; + OUString url; OSL_VERIFY( osl_File_E_None == osl_getFileURLFromSystemPath( arguments[argPos].pData, &url.pData ) ); bool supposedToBeCompatible = ! url.endsWithIgnoreAsciiCaseAsciiL( @@ -143,14 +143,14 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) css::uno::Reference<css::registry::XSimpleRegistry> xReg( m_context->getServiceManager()->createInstanceWithContext( - rtl::OUString( "com.sun.star.registry.SimpleRegistry" ), + OUString( "com.sun.star.registry.SimpleRegistry" ), m_context ), css::uno::UNO_QUERY_THROW ); xReg->open( url, true /* read-only */, false /* ! create */ ); css::uno::Any arg( css::uno::makeAny(xReg) ); css::uno::Reference<css::container::XHierarchicalNameAccess> xTDprov( m_context->getServiceManager()-> createInstanceWithArgumentsAndContext( - rtl::OUString( "com.sun.star.comp.stoc." + OUString( "com.sun.star.comp.stoc." "RegistryTypeDescriptionProvider" ), css::uno::Sequence<css::uno::Any>( &arg, 1 ), m_context ), css::uno::UNO_QUERY_THROW ); @@ -158,7 +158,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) xSet->insert( css::uno::makeAny(xTDprov) ); if (! supposedToBeCompatible) std::cerr << "current rdb file: " << - rtl::OUStringToOString( + OUStringToOString( url, osl_getThreadTextEncoding()).getStr() << std::endl; assertTrue(supposedToBeCompatible); } catch (css::lang::IllegalArgumentException &) { @@ -172,67 +172,67 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) css::uno::Reference< css::reflection::XIndirectTypeDescription > sequence( manager->getByHierarchicalName( - rtl::OUString("[][]boolean")), + OUString("[][]boolean")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_SEQUENCE, sequence->getTypeClass()); assertEqual( - rtl::OUString("[][]boolean"), + OUString("[][]boolean"), sequence->getName()); assertEqual( - rtl::OUString("[]boolean"), + OUString("[]boolean"), sequence->getReferencedType()->getName()); css::uno::Reference< css::reflection::XStructTypeDescription > structure( manager->getByHierarchicalName( - rtl::OUString( "test.tdmanager.Struct<boolean,test.tdmanager.Struct<" + OUString( "test.tdmanager.Struct<boolean,test.tdmanager.Struct<" "any,com.sun.star.uno.XInterface>>")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_STRUCT, structure->getTypeClass()); assertEqual( - rtl::OUString( "test.tdmanager.Struct<boolean,test.tdmanager.Struct<" + OUString( "test.tdmanager.Struct<boolean,test.tdmanager.Struct<" "any,com.sun.star.uno.XInterface>>"), structure->getName()); assertEqual< bool >(false, structure->getBaseType().is()); assertEqual< sal_Int32 >(1, structure->getMemberTypes().getLength()); assertEqual( - rtl::OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"), + OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"), structure->getMemberTypes()[0]->getName()); assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength()); assertEqual( - rtl::OUString("s"), + OUString("s"), structure->getMemberNames()[0]); assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength()); assertEqual< sal_Int32 >(2, structure->getTypeArguments().getLength()); assertEqual( - rtl::OUString("boolean"), + OUString("boolean"), structure->getTypeArguments()[0]->getName()); assertEqual( - rtl::OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"), + OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"), structure->getTypeArguments()[1]->getName()); css::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > method( manager->getByHierarchicalName( - rtl::OUString( "com.sun.star.uno.XComponentContext::getValueByName")), + OUString( "com.sun.star.uno.XComponentContext::getValueByName")), css::uno::UNO_QUERY_THROW); assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); assertEqual( - rtl::OUString( "com.sun.star.uno.XComponentContext::getValueByName"), + OUString( "com.sun.star.uno.XComponentContext::getValueByName"), method->getName()); assertEqual( - rtl::OUString("getValueByName"), + OUString("getValueByName"), method->getMemberName()); assertEqual< sal_Int32 >(3, method->getPosition()); assertEqual( - rtl::OUString("any"), + OUString("any"), method->getReturnType()->getName()); assertEqual< bool >(false, method->isOneway()); assertEqual< sal_Int32 >(1, method->getParameters().getLength()); assertEqual( - rtl::OUString("Name"), + OUString("Name"), method->getParameters()[0]->getName()); assertEqual( - rtl::OUString("string"), + OUString("string"), method->getParameters()[0]->getType()->getName()); assertEqual< bool >(true, method->getParameters()[0]->isIn()); assertEqual< bool >(false, method->getParameters()[0]->isOut()); @@ -243,21 +243,21 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( manager->getByHierarchicalName( - rtl::OUString("[]boolean")), + OUString("[]boolean")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY).is()); assertFalse( css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( manager->getByHierarchicalName( - rtl::OUString( "com.sun.star.beans.XIntroTest::ObjectName")), + OUString( "com.sun.star.beans.XIntroTest::ObjectName")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY).is()); assertFalse( css::uno::Reference< css::reflection::XPublished >( css::uno::Reference< css::reflection::XTypeDescription >( manager->getByHierarchicalName( - rtl::OUString( "com.sun.star.beans.XIntroTest::writeln")), + OUString( "com.sun.star.beans.XIntroTest::writeln")), css::uno::UNO_QUERY_THROW), css::uno::UNO_QUERY).is()); //TODO: check that the reflection of a property of an accumulation-based @@ -266,12 +266,12 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) return 0; } -rtl::OUString Service::getImplementationName() { - return rtl::OUString("test.tdmanager.impl"); +OUString Service::getImplementationName() { + return OUString("test.tdmanager.impl"); } -css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames() { - return css::uno::Sequence< rtl::OUString >(); +css::uno::Sequence< OUString > Service::getSupportedServiceNames() { + return css::uno::Sequence< OUString >(); } css::uno::Reference< css::uno::XInterface > Service::createInstance( @@ -301,11 +301,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(char const namespace { -bool writeInfo(void * registryKey, rtl::OUString const & implementationName, - css::uno::Sequence< rtl::OUString > const & serviceNames) { - rtl::OUString keyName("/"); +bool writeInfo(void * registryKey, OUString const & implementationName, + css::uno::Sequence< OUString > const & serviceNames) { + OUString keyName("/"); keyName += implementationName; - keyName += rtl::OUString("/UNO/SERVICES"); + keyName += OUString("/UNO/SERVICES"); css::uno::Reference< css::registry::XRegistryKey > key; try { key = static_cast< css::registry::XRegistryKey * >(registryKey)-> diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index 8708e826c096..21fc5a37baa9 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -41,8 +41,6 @@ using namespace com::sun::star::script; using namespace com::sun::star::reflection; using namespace com::sun::star::registry; -using ::rtl::OUString; -using ::rtl::OUStringToOString; const double MIN_DOUBLE = -DBL_MAX; const double MAX_DOUBLE = DBL_MAX; diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index 213989abb6ae..f8a89ab85d9e 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -55,9 +55,6 @@ using namespace com::sun::star::registry; using namespace com::sun::star::reflection; using namespace com::sun::star::container; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; //================================================================================================== class OInterfaceA : public WeakImplHelper1< XInterfaceA > diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx index 1bcce146518b..e48bb44f59d6 100644 --- a/stoc/test/testiadapter.cxx +++ b/stoc/test/testiadapter.cxx @@ -48,9 +48,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::reflection; using namespace com::sun::star::registry; -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OUStringToOString; //================================================================================================== @@ -119,7 +116,7 @@ void assign( test::TestElement & rData, sal_Int32 nLong, sal_uInt32 nULong, sal_Int64 nHyper, sal_uInt64 nUHyper, float fFloat, double fDouble, - test::TestEnum eEnum, const ::rtl::OUString& rStr, + test::TestEnum eEnum, const OUString& rStr, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, const ::com::sun::star::uno::Any& rAny ) { @@ -146,7 +143,7 @@ void assign( test::TestData & rData, sal_Int32 nLong, sal_uInt32 nULong, sal_Int64 nHyper, sal_uInt64 nUHyper, float fFloat, double fDouble, - test::TestEnum eEnum, const ::rtl::OUString& rStr, + test::TestEnum eEnum, const OUString& rStr, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, const ::com::sun::star::uno::Any& rAny, const com::sun::star::uno::Sequence< test::TestElement >& rSequence ) @@ -172,7 +169,7 @@ public: sal_Int32 nLong, sal_uInt32 nULong, sal_Int64 nHyper, sal_uInt64 nUHyper, float fFloat, double fDouble, - test::TestEnum eEnum, const ::rtl::OUString& rStr, + test::TestEnum eEnum, const OUString& rStr, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, const ::com::sun::star::uno::Any& rAny, const ::com::sun::star::uno::Sequence<test::TestElement >& rSequence, @@ -184,7 +181,7 @@ public: sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, - test::TestEnum& eEnum, rtl::OUString& rStr, + test::TestEnum& eEnum, OUString& rStr, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, ::com::sun::star::uno::Any& rAny, ::com::sun::star::uno::Sequence<test::TestElement >& rSequence, @@ -196,7 +193,7 @@ public: sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, - test::TestEnum& eEnum, rtl::OUString& rStr, + test::TestEnum& eEnum, OUString& rStr, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, ::com::sun::star::uno::Any& rAny, ::com::sun::star::uno::Sequence< test::TestElement >& rSequence, @@ -227,7 +224,7 @@ public: { return _aData.Double; } virtual test::TestEnum SAL_CALL getEnum() throw(com::sun::star::uno::RuntimeException) { return _aData.Enum; } - virtual rtl::OUString SAL_CALL getString() throw(com::sun::star::uno::RuntimeException) + virtual OUString SAL_CALL getString() throw(com::sun::star::uno::RuntimeException) { return _aData.String; } virtual com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getInterface( ) throw(com::sun::star::uno::RuntimeException) { return _aData.Interface; } @@ -262,7 +259,7 @@ public: { _aData.Double = _double; } virtual void SAL_CALL setEnum( test::TestEnum _enum ) throw(::com::sun::star::uno::RuntimeException) { _aData.Enum = _enum; } - virtual void SAL_CALL setString( const ::rtl::OUString& _string ) throw(::com::sun::star::uno::RuntimeException) + virtual void SAL_CALL setString( const OUString& _string ) throw(::com::sun::star::uno::RuntimeException) { _aData.String = _string; } virtual void SAL_CALL setInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _interface ) throw(::com::sun::star::uno::RuntimeException) { _aData.Interface = _interface; } @@ -274,7 +271,7 @@ public: { _aStructData = _struct; } // XLanguageBindingTest - virtual test::TestData SAL_CALL raiseException( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, test::TestEnum& eEnum, ::rtl::OUString& aString, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInterface, ::com::sun::star::uno::Any& aAny, ::com::sun::star::uno::Sequence<test::TestElement >& aSequence,test::TestData& aStruct ) + virtual test::TestData SAL_CALL raiseException( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, test::TestEnum& eEnum, OUString& aString, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInterface, ::com::sun::star::uno::Any& aAny, ::com::sun::star::uno::Sequence<test::TestElement >& aSequence,test::TestData& aStruct ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getRuntimeException() throw(::com::sun::star::uno::RuntimeException); @@ -676,7 +673,7 @@ void Test_Impl::setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte, sal_Int32 nLong, sal_uInt32 nULong, sal_Int64 nHyper, sal_uInt64 nUHyper, float fFloat, double fDouble, - test::TestEnum eEnum, const ::rtl::OUString& rStr, + test::TestEnum eEnum, const OUString& rStr, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, const ::com::sun::star::uno::Any& rAny, const ::com::sun::star::uno::Sequence<test::TestElement >& rSequence, @@ -694,7 +691,7 @@ test::TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_I sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, - test::TestEnum& eEnum, rtl::OUString& rStr, + test::TestEnum& eEnum, OUString& rStr, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, ::com::sun::star::uno::Any& rAny, ::com::sun::star::uno::Sequence<test::TestElement >& rSequence, @@ -713,7 +710,7 @@ test::TestData Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_In sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, - test::TestEnum& eEnum, rtl::OUString& rStr, + test::TestEnum& eEnum, OUString& rStr, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest, ::com::sun::star::uno::Any& rAny, ::com::sun::star::uno::Sequence<test::TestElement >& rSequence, @@ -853,7 +850,7 @@ sal_Bool performTest( const Reference<XLanguageBindingTest > & xLBT ) } //__________________________________________________________________________________________________ -test::TestData Test_Impl::raiseException( sal_Bool& /*bBool*/, sal_Unicode& /*cChar*/, sal_Int8& /*nByte*/, sal_Int16& /*nShort*/, sal_uInt16& /*nUShort*/, sal_Int32& /*nLong*/, sal_uInt32& /*nULong*/, sal_Int64& /*nHyper*/, sal_uInt64& /*nUHyper*/, float& /*fFloat*/, double& /*fDouble*/, test::TestEnum& /*eEnum*/, ::rtl::OUString& /*aString*/, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& /*xInterface*/, ::com::sun::star::uno::Any& /*aAny*/, ::com::sun::star::uno::Sequence< test::TestElement >& /*aSequence*/, test::TestData& /*aStruct*/ ) +test::TestData Test_Impl::raiseException( sal_Bool& /*bBool*/, sal_Unicode& /*cChar*/, sal_Int8& /*nByte*/, sal_Int16& /*nShort*/, sal_uInt16& /*nUShort*/, sal_Int32& /*nLong*/, sal_uInt32& /*nULong*/, sal_Int64& /*nHyper*/, sal_uInt64& /*nUHyper*/, float& /*fFloat*/, double& /*fDouble*/, test::TestEnum& /*eEnum*/, OUString& /*aString*/, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& /*xInterface*/, ::com::sun::star::uno::Any& /*aAny*/, ::com::sun::star::uno::Sequence< test::TestElement >& /*aSequence*/, test::TestData& /*aStruct*/ ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { IllegalArgumentException aExc; diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index b583ebc6169d..bcec385465bb 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -52,10 +52,6 @@ using namespace com::sun::star::reflection; using namespace com::sun::star::container; using namespace com::sun::star::beans::PropertyAttribute; -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OUStringToOString; -using ::rtl::OStringToOUString; typedef WeakImplHelper4< XIntroTest, XPropertySet, XNameAccess, XIndexAccess > ImplIntroTestHelper; diff --git a/stoc/test/testloader.cxx b/stoc/test/testloader.cxx index 44af57bf4cae..edb4a281a3ff 100644 --- a/stoc/test/testloader.cxx +++ b/stoc/test/testloader.cxx @@ -43,7 +43,6 @@ using namespace com::sun::star::lang; using namespace osl; using namespace cppu; -using ::rtl::OUString; class EmptyComponentContext : public WeakImplHelper1< XComponentContext > { diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx index c118cbdfa976..9d23f95ca8b1 100644 --- a/stoc/test/testregistry.cxx +++ b/stoc/test/testregistry.cxx @@ -51,9 +51,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; namespace stoc_impreg { diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx index 7f6ece41f2a0..b8e100f18952 100644 --- a/stoc/test/testsmgr_cpnt.cxx +++ b/stoc/test/testsmgr_cpnt.cxx @@ -58,9 +58,6 @@ using namespace com::sun::star::container; using namespace osl; using namespace cppu; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; Reference<XMultiServiceFactory> getProcessServiceManager() diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx index 34a3b2d9c0c1..a82875a13e08 100644 --- a/stoc/test/uriproc/test_uriproc.cxx +++ b/stoc/test/uriproc/test_uriproc.cxx @@ -58,32 +58,32 @@ namespace { (actual) == (expected)) template< typename T > void append( - rtl::OUStringBuffer & buffer, T const & value) + OUStringBuffer & buffer, T const & value) { buffer.append(value); } -template<> void append(rtl::OUStringBuffer & buffer, bool const & value) { +template<> void append(OUStringBuffer & buffer, bool const & value) { buffer.append(static_cast< sal_Bool >(value)); } -template<> void append(rtl::OUStringBuffer & buffer, std::size_t const & value) +template<> void append(OUStringBuffer & buffer, std::size_t const & value) { buffer.append(static_cast< sal_Int32 >(value)); } -template<> void append(rtl::OUStringBuffer & buffer, char const * const & value) +template<> void append(OUStringBuffer & buffer, char const * const & value) { buffer.appendAscii(value); } template< typename T1, typename T2, typename T3, typename T4 > -rtl::OString createTestAssertEqualMessage( +OString createTestAssertEqualMessage( char const * token1, T1 const & token2, T2 const & token3, char const * expectedExpr, char const * actualExpr, T3 const & expected, T4 const & actual) { - rtl::OUStringBuffer buf; + OUStringBuffer buf; buf.appendAscii(token1); buf.append(static_cast< sal_Unicode >('|')); append(buf, token2); @@ -98,7 +98,7 @@ rtl::OString createTestAssertEqualMessage( buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("> != <")); append(buf, actual); buf.append(static_cast< sal_Unicode >('>')); - return rtl::OUStringToOString( + return OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); } @@ -196,24 +196,24 @@ void Test::testParse() { for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) { css::uno::Reference< css::uri::XUriReference > uriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].uriReference))); + OUString::createFromAscii(data[i].uriReference))); CPPUNIT_ASSERT(uriRef.is() == (data[i].schemeSpecificPart != 0)); if (uriRef.is()) { TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].uriReference), + OUString::createFromAscii(data[i].uriReference), uriRef->getUriReference()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, data[i].scheme != 0, uriRef->isAbsolute()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].scheme == 0 ? "" : data[i].scheme), uriRef->getScheme()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].schemeSpecificPart), + OUString::createFromAscii(data[i].schemeSpecificPart), uriRef->getSchemeSpecificPart()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, @@ -224,12 +224,12 @@ void Test::testParse() { data[i].authority != 0, uriRef->hasAuthority()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].authority == 0 ? "" : data[i].authority), uriRef->getAuthority()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].path), + OUString::createFromAscii(data[i].path), uriRef->getPath()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, @@ -240,36 +240,36 @@ void Test::testParse() { data[i].pathSegmentCount, uriRef->getPathSegmentCount()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString(""), uriRef->getPathSegment(-1)); + OUString(""), uriRef->getPathSegment(-1)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].pathSegment0), + OUString::createFromAscii(data[i].pathSegment0), uriRef->getPathSegment(0)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].pathSegment1), + OUString::createFromAscii(data[i].pathSegment1), uriRef->getPathSegment(1)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].pathSegment2), + OUString::createFromAscii(data[i].pathSegment2), uriRef->getPathSegment(2)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].pathSegment3), + OUString::createFromAscii(data[i].pathSegment3), uriRef->getPathSegment(3)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].pathSegment4), + OUString::createFromAscii(data[i].pathSegment4), uriRef->getPathSegment(4)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString(), uriRef->getPathSegment(5)); + OUString(), uriRef->getPathSegment(5)); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, data[i].query != 0, uriRef->hasQuery()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].query == 0 ? "" : data[i].query), uriRef->getQuery()); TEST_ASSERT_EQUAL( @@ -277,7 +277,7 @@ void Test::testParse() { data[i].fragment != 0, uriRef->hasFragment()); TEST_ASSERT_EQUAL( "testParse", i, data[i].uriReference, - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].fragment == 0 ? "" : data[i].fragment), uriRef->getFragment()); } @@ -586,11 +586,11 @@ void Test::testMakeAbsolute() { for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) { css::uno::Reference< css::uri::XUriReference > baseUriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].baseUriReference))); + OUString::createFromAscii(data[i].baseUriReference))); CPPUNIT_ASSERT(baseUriRef.is()); css::uno::Reference< css::uri::XUriReference > uriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].uriReference))); + OUString::createFromAscii(data[i].uriReference))); CPPUNIT_ASSERT(uriRef.is()); css::uno::Reference< css::uri::XUriReference > absolute( m_uriFactory->makeAbsolute( @@ -602,7 +602,7 @@ void Test::testMakeAbsolute() { if (absolute.is()) { TEST_ASSERT_EQUAL( "testMakeAbsolute", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].absolute), + OUString::createFromAscii(data[i].absolute), absolute->getUriReference()); } } @@ -691,11 +691,11 @@ void Test::testMakeRelative() { for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) { css::uno::Reference< css::uri::XUriReference > baseUriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].baseUriReference))); + OUString::createFromAscii(data[i].baseUriReference))); CPPUNIT_ASSERT(baseUriRef.is()); css::uno::Reference< css::uri::XUriReference > uriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].uriReference))); + OUString::createFromAscii(data[i].uriReference))); CPPUNIT_ASSERT(uriRef.is()); css::uno::Reference< css::uri::XUriReference > relative( m_uriFactory->makeRelative( @@ -708,7 +708,7 @@ void Test::testMakeRelative() { if (relative.is()) { TEST_ASSERT_EQUAL( "testMakeRelative", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].relative), + OUString::createFromAscii(data[i].relative), relative->getUriReference()); css::uno::Reference< css::uri::XUriReference > absolute( m_uriFactory->makeAbsolute( @@ -717,7 +717,7 @@ void Test::testMakeRelative() { CPPUNIT_ASSERT(absolute.is()); TEST_ASSERT_EQUAL( "testMakeRelative", i, data[i].uriReference, - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].absolute == 0 ? data[i].uriReference : data[i].absolute), absolute->getUriReference()); @@ -737,12 +737,12 @@ void Test::testVndSunStarExpand() { { "vnd.sun.star.expand:%5C$%5C%24%5C%5C", "$$\\" } }; css::uno::Reference< css::util::XMacroExpander > expander( m_context->getValueByName( - rtl::OUString( "/singletons/com.sun.star.util.theMacroExpander")), + OUString( "/singletons/com.sun.star.util.theMacroExpander")), css::uno::UNO_QUERY_THROW); for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) { css::uno::Reference< css::uri::XUriReference > uriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].uriReference))); + OUString::createFromAscii(data[i].uriReference))); TEST_ASSERT_EQUAL( "testVndSunStarExpand", i, data[i].uriReference, data[i].expanded != 0, uriRef.is()); @@ -751,7 +751,7 @@ void Test::testVndSunStarExpand() { expandUrl(uriRef, css::uno::UNO_QUERY_THROW); TEST_ASSERT_EQUAL( "testVndSunStarExpand", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].expanded), + OUString::createFromAscii(data[i].expanded), expandUrl->expand(expander)); } } @@ -782,7 +782,7 @@ void Test::testVndSunStarScript() { for (std::size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) { css::uno::Reference< css::uri::XUriReference > uriRef( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].uriReference))); + OUString::createFromAscii(data[i].uriReference))); TEST_ASSERT_EQUAL( "testVndSunStarScript", i, data[i].uriReference, data[i].name != 0, uriRef.is()); @@ -791,13 +791,13 @@ void Test::testVndSunStarScript() { scriptUrl(uriRef, css::uno::UNO_QUERY_THROW); TEST_ASSERT_EQUAL( "testVndSunStarScript", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].uriReference), + OUString::createFromAscii(data[i].uriReference), scriptUrl->getUriReference()); TEST_ASSERT_EQUAL( "testVndSunStarScript", i, data[i].uriReference, - rtl::OUString::createFromAscii(data[i].name), + OUString::createFromAscii(data[i].name), scriptUrl->getName()); - rtl::OUString originalReference(uriRef->getUriReference()); + OUString originalReference(uriRef->getUriReference()); for (std::size_t j = 0; j < parameterCount; ++j) { if (data[i].parameters[j].key != 0) { TEST_ASSERT_EQUAL( @@ -807,35 +807,35 @@ void Test::testVndSunStarScript() { data[i].uriReference, data[i].parameters[j].value != 0, scriptUrl->hasParameter( - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].parameters[j].key))); TEST_ASSERT_EQUAL( "testVndSunStarScript", static_cast< double >(i) + static_cast< double >(j) / 10.0, data[i].uriReference, - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].parameters[j].value), scriptUrl->getParameter( - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].parameters[j].key))); // setting the parameter to its original value should not change // the overall uri reference (provided it was normalized before) if ( data[i].normalized ) { - if ( scriptUrl->hasParameter(rtl::OUString::createFromAscii( + if ( scriptUrl->hasParameter(OUString::createFromAscii( data[i].parameters[j].key)) ) { scriptUrl->setParameter( - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].parameters[j].key), scriptUrl->getParameter( - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].parameters[j].key))); TEST_ASSERT_EQUAL( "testVndSunStarScript", static_cast< double >(i) + static_cast< double >(j) / 10.0, - ::rtl::OUString("setParameter"), + OUString("setParameter"), originalReference, uriRef->getUriReference()); } @@ -847,7 +847,7 @@ void Test::testVndSunStarScript() { TEST_ASSERT_EQUAL( "testVndSunStarScript", i, - ::rtl::OUString("setName"), + OUString("setName"), originalReference, uriRef->getUriReference()); } @@ -856,55 +856,55 @@ void Test::testVndSunStarScript() { css::uno::Reference< css::uri::XUriReference > uriRef( m_uriFactory->parse( - rtl::OUString( "vnd.sun.star.script:Hello?location=Library.Module")), + OUString( "vnd.sun.star.script:Hello?location=Library.Module")), css::uno::UNO_SET_THROW); css::uno::Reference< css::uri::XVndSunStarScriptUrlReference > scriptUrl(uriRef, css::uno::UNO_QUERY_THROW); scriptUrl->setParameter( - ::rtl::OUString("location"), - ::rtl::OUString("foo")); + OUString("location"), + OUString("foo")); TEST_ASSERT_EQUAL( "testVndSunStarScript", (sal_Int32)10, (sal_Int32)1, uriRef->getUriReference(), - ::rtl::OUString("vnd.sun.star.script:Hello?location=foo")); + OUString("vnd.sun.star.script:Hello?location=foo")); scriptUrl->setParameter( - ::rtl::OUString("language"), - ::rtl::OUString("StarBasic")); + OUString("language"), + OUString("StarBasic")); TEST_ASSERT_EQUAL( "testVndSunStarScript", (sal_Int32)10, (sal_Int32)2, uriRef->getUriReference(), - ::rtl::OUString("vnd.sun.star.script:Hello?location=foo&language=StarBasic")); + OUString("vnd.sun.star.script:Hello?location=foo&language=StarBasic")); bool caughtExpected = false; try { - scriptUrl->setName(::rtl::OUString()); + scriptUrl->setName(OUString()); } catch( const css::lang::IllegalArgumentException& ) { caughtExpected = true; } TEST_ASSERT_EQUAL( "testVndSunStarScript", - ::rtl::OUString("illegal arguments"), - ::rtl::OUString("name"), + OUString("illegal arguments"), + OUString("name"), caughtExpected, true); caughtExpected = false; try { scriptUrl->setParameter( - ::rtl::OUString(), - ::rtl::OUString("non-empty")); + OUString(), + OUString("non-empty")); } catch( const css::lang::IllegalArgumentException& ) { caughtExpected = true; } TEST_ASSERT_EQUAL( "testVndSunStarScript", - ::rtl::OUString("illegal arguments"), - ::rtl::OUString("parameter"), + OUString("illegal arguments"), + OUString("parameter"), caughtExpected, true); } @@ -939,17 +939,17 @@ void Test::testTranslator() { TEST_ASSERT_EQUAL( "testTranslator, translateToInternal", i, data[i].externalUriReference, - rtl::OUString::createFromAscii(data[i].internalUriReference), + OUString::createFromAscii(data[i].internalUriReference), translator->translateToInternal( - rtl::OUString::createFromAscii( + OUString::createFromAscii( data[i].externalUriReference))); } TEST_ASSERT_EQUAL( "testTranslator, translateToExternal", i, data[i].internalUriReference, - rtl::OUString::createFromAscii(data[i].externalUriReference), + OUString::createFromAscii(data[i].externalUriReference), translator->translateToExternal( - rtl::OUString::createFromAscii(data[i].internalUriReference))); + OUString::createFromAscii(data[i].internalUriReference))); } } @@ -969,14 +969,14 @@ void Test::testPkgUrlFactory() { css::uno::Reference< css::uri::XUriReference > url( factory->createVndSunStarPkgUrlReference( m_uriFactory->parse( - rtl::OUString::createFromAscii(data[i].authority)))); + OUString::createFromAscii(data[i].authority)))); TEST_ASSERT_EQUAL( "testVndSunStarPkgFactory", i, data[i].authority, data[i].result != 0, static_cast< bool >(url.is())); if (data[i].result != 0) { TEST_ASSERT_EQUAL( "testVndSunStarPkgFactory", i, data[i].authority, - rtl::OUString::createFromAscii(data[i].result), + OUString::createFromAscii(data[i].result), url->getUriReference()); } } |