diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-02 17:46:27 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-02 17:57:17 -0500 |
commit | aca92397245389e93de25a779bfdc6bb7f03ceee (patch) | |
tree | dba50821d3c7dc6f7ab2e4865d68315e6947c27a /basic | |
parent | e4b6a8e0e942c170ff18b886817e0b696dc712e7 (diff) |
targeted string re-work
Change-Id: Ia651a93951da514105183775a5f49d031a192937
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/errobject.cxx | 4 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 68 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 44 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 6 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 14 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 30 | ||||
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 44 |
7 files changed, 105 insertions, 105 deletions
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index b3c06df9381e..f6736aebe7b8 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -165,7 +165,7 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any ::rtl::OUString SAL_CALL ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException) { - static rtl::OUString sDfltPropName( RTL_CONSTASCII_USTRINGPARAM("Number") ); + static rtl::OUString sDfltPropName( "Number" ); return sDfltPropName; } @@ -173,7 +173,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u throw (uno::RuntimeException) { if ( !Number.hasValue() ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Missing Required Paramater")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); Number >>= m_nNumber; Description >>= m_sDescription; Source >>= m_sSource; diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 2fe5d8bf42b4..1a38e04ea103 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -182,7 +182,7 @@ Reference< XComponentContext > getComponentContext_Impl( void ) if (xProps.is()) { xProps->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext; + ::rtl::OUString( "DefaultContext" ) ) >>= xContext; OSL_ASSERT( xContext.is() ); } } @@ -201,14 +201,14 @@ Reference< XIdlReflection > getCoreReflection_Impl( void ) if( xContext.is() ) { xContext->getValueByName( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection") ) ) + ::rtl::OUString( "/singletons/com.sun.star.reflection.theCoreReflection" ) ) >>= xCoreReflection; OSL_ENSURE( xCoreReflection.is(), "### CoreReflection singleton not accessable!?" ); } if( !xCoreReflection.is() ) { throw DeploymentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessable") ), + ::rtl::OUString( "/singletons/com.sun.star.reflection.theCoreReflection singleton not accessable" ), Reference< XInterface >() ); } } @@ -244,7 +244,7 @@ Reference< XHierarchicalNameAccess > getTypeProvider_Impl( void ) if( xContext.is() ) { xContext->getValueByName( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) ) + ::rtl::OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ) >>= xAccess; OSL_ENSURE( xAccess.is(), "### TypeDescriptionManager singleton not accessable!?" ); } @@ -273,7 +273,7 @@ Reference< XTypeConverter > getTypeConverter_Impl( void ) Reference<XMultiComponentFactory> xSMgr = xContext->getServiceManager(); xTypeConverter = Reference<XTypeConverter>( xSMgr->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")), + ::rtl::OUString( "com.sun.star.script.Converter"), xContext ), UNO_QUERY ); } if( !xTypeConverter.is() ) @@ -304,7 +304,7 @@ SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType ) Reference<XMultiComponentFactory> xSMgr = xContext->getServiceManager(); xOLEFactory = Reference<XMultiServiceFactory>( xSMgr->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.OleObjectFactory")), + ::rtl::OUString( "com.sun.star.bridge.OleObjectFactory"), xContext ), UNO_QUERY ); } } @@ -315,7 +315,7 @@ SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType ) // some type names available in VBA can not be directly used in COM ::rtl::OUString aOLEType = aType; if ( aOLEType == "SAXXMLReader30" ) - aOLEType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Msxml2.SAXXMLReader.3.0" ) ); + aOLEType = ::rtl::OUString( "Msxml2.SAXXMLReader.3.0" ); Reference< XInterface > xOLEObject = xOLEFactory->createInstance( aOLEType ); if( xOLEObject.is() ) @@ -390,7 +390,7 @@ Any convertAny( const Any& rVal, const Type& aDestType ) catch( const CannotConvertException& e2 ) { ::rtl::OUString aCannotConvertExceptionName - ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException" ) ); + ( "com.sun.star.lang.IllegalArgumentException" ); StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, implGetExceptionMsg( e2, aCannotConvertExceptionName ) ); return aConvertedVal; @@ -1709,7 +1709,7 @@ rtl::OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Ref { ::rtl::OUString aName = getDbgObjectNameImpl( pUnoObj ); if( aName.isEmpty() ) - aName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown")); + aName += ::rtl::OUString("Unknown"); ::rtl::OUStringBuffer aRet; if( aName.getLength() > 20 ) @@ -1786,7 +1786,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass ) if ( xInv.is() ) { rtl::OUString sTypeName; - xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName; + xInv->getValue( rtl::OUString( "$GetTypeName" ) ) >>= sTypeName; if ( sTypeName.isEmpty() || sTypeName == "IDispatch" ) // can't check type, leave it pass result = true; @@ -2349,8 +2349,8 @@ SbUnoObject::SbUnoObject( const rtl::OUString& aName_, const Any& aUnoObj_ ) static Reference< XIntrospection > xIntrospection; // beat out again the default properties of Sbx - Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Name") ), SbxCLASS_DONTCARE ); - Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Parent") ), SbxCLASS_DONTCARE ); + Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Name")), SbxCLASS_DONTCARE ); + Remove( XubString( RTL_CONSTASCII_USTRINGPARAM("Parent")), SbxCLASS_DONTCARE ); // check the type of the ojekts TypeClass eType = aUnoObj_.getValueType().getTypeClass(); @@ -2448,7 +2448,7 @@ void SbUnoObject::doIntrospection( void ) Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() ); if ( xFactory.is() ) { - Reference< XInterface > xI = xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")) ); + Reference< XInterface > xI = xFactory->createInstance( rtl::OUString("com.sun.star.beans.Introspection") ); if (xI.is()) xIntrospection = Reference< XIntrospection >::query( xI ); } @@ -2802,15 +2802,15 @@ void SbUnoObject::implCreateDbgProperties( void ) Property aProp; // Id == -1: display the implemented interfaces corresponding the ClassProvider - SbxVariableRef xVarRef = new SbUnoProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES)), SbxSTRING, SbxSTRING, aProp, -1, false ); + SbxVariableRef xVarRef = new SbUnoProperty( ::rtl::OUString(ID_DBG_SUPPORTEDINTERFACES), SbxSTRING, SbxSTRING, aProp, -1, false ); QuickInsert( (SbxVariable*)xVarRef ); // Id == -2: output the properties - xVarRef = new SbUnoProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES)), SbxSTRING, SbxSTRING, aProp, -2, false ); + xVarRef = new SbUnoProperty( ::rtl::OUString(ID_DBG_PROPERTIES), SbxSTRING, SbxSTRING, aProp, -2, false ); QuickInsert( (SbxVariable*)xVarRef ); // Id == -3: output the Methods - xVarRef = new SbUnoProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS)), SbxSTRING, SbxSTRING, aProp, -3, false ); + xVarRef = new SbUnoProperty( ::rtl::OUString(ID_DBG_METHODS), SbxSTRING, SbxSTRING, aProp, -3, false ); QuickInsert( (SbxVariable*)xVarRef ); } @@ -3108,7 +3108,7 @@ void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, sal_B aAny <<= xFactory; // Create a SbUnoObject out of it and return it - SbUnoObjectRef xUnoObj = new SbUnoObject( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ProcessServiceManager") ), aAny ); + SbUnoObjectRef xUnoObj = new SbUnoObject( ::rtl::OUString( "ProcessServiceManager" ), aAny ); refVar->PutObject( (SbUnoObject*)xUnoObj ); } else @@ -3428,7 +3428,7 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t ) { // expand fully qualified name ::rtl::OUString aNewName = GetName(); - aNewName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")); + aNewName += ::rtl::OUString("."); aNewName += rName; // get CoreReflection @@ -3569,7 +3569,7 @@ SbxVariable* SbUnoService::Find( const String& rName, SbxClassType ) if( aName.isEmpty() ) { if( xCtor->isDefaultConstructor() ) - aName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("create")); + aName = ::rtl::OUString("create"); } if( !aName.isEmpty() ) @@ -3707,7 +3707,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, else { Reference < XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - xContext.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) ), UNO_QUERY_THROW ); + xContext.set( xProps->getPropertyValue( rtl::OUString( "DefaultContext" ) ), UNO_QUERY_THROW ); } Reference< XMultiComponentFactory > xServiceMgr( xContext->getServiceManager() ); @@ -3813,7 +3813,7 @@ SbUnoSingleton::SbUnoSingleton( const ::rtl::OUString& aName_, , m_xSingletonTypeDesc( xSingletonTypeDesc ) { SbxVariableRef xGetMethodRef = - new SbxMethod( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "get" ) ), SbxOBJECT ); + new SbxMethod( ::rtl::OUString( "get" ), SbxOBJECT ); QuickInsert( (SbxVariable*)xGetMethodRef ); } @@ -3841,7 +3841,7 @@ void SbUnoSingleton::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, if( !xContextToUse.is() ) { Reference < XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - xContextToUse.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) ), UNO_QUERY_THROW ); + xContextToUse.set( xProps->getPropertyValue( rtl::OUString( "DefaultContext" ) ), UNO_QUERY_THROW ); --nAllowedParamCount; } @@ -3854,7 +3854,7 @@ void SbUnoSingleton::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, Any aRetAny; if( xContextToUse.is() ) { - ::rtl::OUString aSingletonName( RTL_CONSTASCII_USTRINGPARAM("/singletons/") ); + ::rtl::OUString aSingletonName( "/singletons/" ); aSingletonName += GetName(); Reference < XInterface > xRet; xContextToUse->getValueByName( aSingletonName ) >>= xRet; @@ -4172,7 +4172,7 @@ void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite // From 1999-11-30: get the InvocationAdapterFactory Reference< XInvocationAdapterFactory > xInvocationAdapterFactory = Reference< XInvocationAdapterFactory >( - xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.InvocationAdapterFactory")) ), UNO_QUERY ); + xFactory->createInstance( rtl::OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY ); BasicAllListener_Impl * p; Reference< XAllListener > xAllLst = p = new BasicAllListener_Impl( aPrefixName ); @@ -4215,10 +4215,10 @@ void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWr if( xPSMPropertySet.is() ) { Any aContextAny = xPSMPropertySet->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ); + ::rtl::OUString( "DefaultContext" ) ); SbUnoObjectRef xUnoObj = new SbUnoObject - ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ), + ( ::rtl::OUString( "DefaultContext" ), aContextAny ); refVar->PutObject( (SbUnoObject*)xUnoObj ); } @@ -4236,7 +4236,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite (void)pBasic; (void)bWrite; - static rtl::OUString aTypeTypeString( RTL_CONSTASCII_USTRINGPARAM("type") ); + static rtl::OUString aTypeTypeString( "type" ); // 2 parameters needed if ( rPar.Count() != 3 ) @@ -4294,7 +4294,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite catch( const NoSuchElementException& e1 ) { ::rtl::OUString aNoSuchElementExceptionName - ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.NoSuchElementException" ) ); + ( "com.sun.star.container.NoSuchElementException" ); StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, implGetExceptionMsg( e1, aNoSuchElementExceptionName ) ); return; @@ -4364,7 +4364,7 @@ public: }; ModuleInvocationProxy::ModuleInvocationProxy( const ::rtl::OUString& aPrefix, SbxObjectRef xScopeObj ) - : m_aPrefix( aPrefix + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_") ) ) + : m_aPrefix( aPrefix + ::rtl::OUString( "_" ) ) , m_xScopeObj( xScopeObj ) , m_aListeners( m_aMutex ) { @@ -4383,7 +4383,7 @@ void SAL_CALL ModuleInvocationProxy::setValue( const ::rtl::OUString& rProperty, SolarMutexGuard guard; - ::rtl::OUString aPropertyFunctionName( RTL_CONSTASCII_USTRINGPARAM( "Property Set ") ); + ::rtl::OUString aPropertyFunctionName( "Property Set " ); aPropertyFunctionName += m_aPrefix; aPropertyFunctionName += rProperty; @@ -4421,7 +4421,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue( const ::rtl::OUString& rProperty ) SolarMutexGuard guard; - ::rtl::OUString aPropertyFunctionName( RTL_CONSTASCII_USTRINGPARAM( "Property Get ") ); + ::rtl::OUString aPropertyFunctionName( "Property Get " ); aPropertyFunctionName += m_aPrefix; aPropertyFunctionName += rProperty; @@ -4562,7 +4562,7 @@ Reference< XInterface > createComListener( const Any& aControlAny, const ::rtl:: try { xRet = xServiceMgr->createInstanceWithArgumentsAndContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.custom.UnoComListener")), + ::rtl::OUString( "com.sun.star.custom.UnoComListener"), args, xContext ); } catch( const Exception& ) @@ -4675,7 +4675,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP Reference< XSingleServiceFactory > xComImplementsFactory ( xServiceMgr->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.custom.ComImplementsFactory")), xContext ), + ::rtl::OUString( "com.sun.star.custom.ComImplementsFactory"), xContext ), UNO_QUERY ); if( !xComImplementsFactory.is() ) @@ -4757,7 +4757,7 @@ bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ) // Only for native COM objects if( pUnoObj->isNativeCOMObject() ) { - SbxVariableRef pMeth = pObj->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "toString" ) ), SbxCLASS_METHOD ); + SbxVariableRef pMeth = pObj->Find( ::rtl::OUString( "toString" ), SbxCLASS_METHOD ); if ( pMeth.Is() ) { SbxValues aRes; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 87928cf8865a..a676fc8bfde5 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -172,7 +172,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV Reference< XComponentContext > xCtx; xPSMPropertySet->getPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xCtx; - Reference< XProxyFactory > xProxyFac( xMFac->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.ProxyFactory" ) ), xCtx ), UNO_QUERY_THROW ); + Reference< XProxyFactory > xProxyFac( xMFac->createInstanceWithContext( rtl::OUString( "com.sun.star.reflection.ProxyFactory" ), xCtx ), UNO_QUERY_THROW ); m_xAggProxy = xProxyFac->createProxy( xIf ); } catch(const Exception& ) @@ -273,7 +273,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence< sal_Int32 nSbxCount = n - 1; if ( nParamsCount < nSbxCount - nSbxOptional ) { - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "wrong number of parameters!" ) ), Reference< XInterface >() ); + throw RuntimeException( ::rtl::OUString( "wrong number of parameters!" ), Reference< XInterface >() ); } } // set parameters @@ -458,7 +458,7 @@ uno::Reference< vba::XVBACompatibility > getVBACompatibility( const uno::Referen try { uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW ); - xVBACompat.set( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ), uno::UNO_QUERY ); + xVBACompat.set( xModelProps->getPropertyValue( ::rtl::OUString( "BasicLibraries" ) ), uno::UNO_QUERY ); } catch(const uno::Exception& ) { @@ -488,7 +488,7 @@ public: uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); if ( xFactory.is() ) { - uno::Reference< frame::XDesktop > xDeskTop( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop") ) ), uno::UNO_QUERY ); + uno::Reference< frame::XDesktop > xDeskTop( xFactory->createInstance( rtl::OUString( "com.sun.star.frame.Desktop" ) ), uno::UNO_QUERY ); if ( xDeskTop.is() ) xDeskTop->terminate(); } @@ -506,7 +506,7 @@ void VBAUnlockDocuments( StarBASIC* pBasic ) { if ( pBasic && pBasic->IsDocBasic() ) { - SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ), SbxCLASS_DONTCARE ) ); + SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( "ThisComponent" ), SbxCLASS_DONTCARE ) ); if ( pGlobs ) { uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY ); @@ -2191,7 +2191,7 @@ SbObjModule::SbObjModule( const String& rName, const com::sun::star::script::Mod SetModuleType( mInfo.ModuleType ); if ( mInfo.ModuleType == script::ModuleType::FORM ) { - SetClassName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Form" )) ); + SetClassName( rtl::OUString("Form" ) ); } else if ( mInfo.ModuleObject.is() ) SetUnoObject( uno::makeAny( mInfo.ModuleObject ) ); @@ -2210,13 +2210,13 @@ SbObjModule::SetUnoObject( const uno::Any& aObj ) throw ( uno::RuntimeException pDocObject = new SbUnoObject( GetName(), uno::makeAny( aObj ) ); com::sun::star::uno::Reference< com::sun::star::lang::XServiceInfo > xServiceInfo( aObj, com::sun::star::uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Worksheet" )) ) ) + if( xServiceInfo->supportsService( rtl::OUString("ooo.vba.excel.Worksheet" ) ) ) { - SetClassName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Worksheet" )) ); + SetClassName( rtl::OUString("Worksheet" ) ); } - else if( xServiceInfo->supportsService( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Workbook" )) ) ) + else if( xServiceInfo->supportsService( rtl::OUString("ooo.vba.excel.Workbook" ) ) ) { - SetClassName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Workbook" )) ); + SetClassName( rtl::OUString("Workbook" ) ); } } @@ -2361,9 +2361,9 @@ public: aParams[0] <<= nCancel; aParams[1] <<= nCloseMode; - mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), + mpUserForm->triggerMethod( rtl::OUString("Userform_QueryClose" ), aParams); - xVbaMethodParameter->setVbaMethodParameter( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cancel")), aParams[0]); + xVbaMethodParameter->setVbaMethodParameter( rtl::OUString( "Cancel"), aParams[0]); // If we don't cancel then we want to make sure the dialog // really is gone to make sure when we attempt to raise it again // it will actually generate an initialise event @@ -2378,7 +2378,7 @@ public: } } - mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ) ); + mpUserForm->triggerMethod( rtl::OUString("Userform_QueryClose" ) ); } @@ -2533,14 +2533,14 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any void SbUserFormModule::triggerActivateEvent( void ) { OSL_TRACE("**** entering SbUserFormModule::triggerActivate"); - triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_Activate") ) ); + triggerMethod( rtl::OUString( "UserForm_Activate" ) ); OSL_TRACE("**** leaving SbUserFormModule::triggerActivate"); } void SbUserFormModule::triggerDeactivateEvent( void ) { OSL_TRACE("**** SbUserFormModule::triggerDeactivate"); - triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_Deactivate") ) ); + triggerMethod( rtl::OUString("Userform_Deactivate" ) ); } void SbUserFormModule::triggerInitializeEvent( void ) @@ -2621,7 +2621,7 @@ void SbUserFormModule::Unload() aParams[0] <<= nCancel; aParams[1] <<= nCloseMode; - triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), aParams); + triggerMethod( rtl::OUString("Userform_QueryClose" ), aParams); aParams[0] >>= nCancel; // basic boolean ( and what the user might use ) can be ambiguous ( e.g. basic true = -1 ) @@ -2678,20 +2678,20 @@ void SbUserFormModule::InitObject() uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); uno::Sequence< uno::Any > aArgs(1); aArgs[ 0 ] <<= m_xModel; - rtl::OUString sDialogUrl( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:" ) ); - rtl::OUString sProjectName( RTL_CONSTASCII_USTRINGPARAM("Standard") ); + rtl::OUString sDialogUrl( "vnd.sun.star.script:" ); + rtl::OUString sProjectName( "Standard" ); try { Reference< beans::XPropertySet > xProps( m_xModel, UNO_QUERY_THROW ); - uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( "BasicLibraries" ) ), uno::UNO_QUERY_THROW ); sProjectName = xVBAMode->getProjectName(); } catch(const Exception& ) {} - sDialogUrl = sDialogUrl.concat( sProjectName ).concat( rtl::OUString( '.') ).concat( GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("?location=document") ) ); + sDialogUrl = sDialogUrl.concat( sProjectName ).concat( rtl::OUString( '.') ).concat( GetName() ).concat( rtl::OUString( "?location=document" ) ); - uno::Reference< awt::XDialogProvider > xProvider( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.DialogProvider")), aArgs ), uno::UNO_QUERY_THROW ); + uno::Reference< awt::XDialogProvider > xProvider( xFactory->createInstanceWithArguments( rtl::OUString( "com.sun.star.awt.DialogProvider"), aArgs ), uno::UNO_QUERY_THROW ); m_xDialog = xProvider->createDialog( sDialogUrl ); // create vba api object @@ -2700,7 +2700,7 @@ void SbUserFormModule::InitObject() aArgs[ 1 ] <<= m_xDialog; aArgs[ 2 ] <<= m_xModel; aArgs[ 3 ] <<= sProjectName; - pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) ); + pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( "ooo.vba.msforms.UserForm"), aArgs ) ) ); uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW ); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 9ffb643657b2..07ba8c01f214 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -224,7 +224,7 @@ sal_Bool needSecurityRestrictions( void ) if( !xSMgr.is() ) return sal_True; Reference< XBridgeFactory > xBridgeFac( xSMgr->createInstance - ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.bridge.BridgeFactory" )) ), UNO_QUERY ); + ( ::rtl::OUString("com.sun.star.bridge.BridgeFactory" ) ), UNO_QUERY ); Sequence< Reference< XBridge > > aBridgeSeq; sal_Int32 nBridgeCount = 0; @@ -294,7 +294,7 @@ sal_Bool hasUno( void ) Reference< XContentProviderManager > xManager( xSMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.ucb.UniversalContentBroker" )) ), UNO_QUERY ); - if ( !( xManager.is() && xManager->queryContentProvider( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "file:///" )) ).is() ) ) + if ( !( xManager.is() && xManager->queryContentProvider( ::rtl::OUString("file:///" ) ).is() ) ) { // No UCB bRetVal = sal_False; @@ -560,7 +560,7 @@ SbError SbiStream::Open if( xSMgr.is() ) { Reference< XSimpleFileAccess > - xSFI( xSMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY ); + xSFI( xSMgr->createInstance( ::rtl::OUString("com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY ); if( xSFI.is() ) { try diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index fa7d7a1efb0f..9a5bb7d4f163 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -199,7 +199,7 @@ static com::sun::star::uno::Reference< XSimpleFileAccess3 > getFileAccess( void if( xSMgr.is() ) { xSFI = com::sun::star::uno::Reference< XSimpleFileAccess3 >( xSMgr->createInstance - ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY ); + ( ::rtl::OUString("com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY ); } } return xSFI; @@ -2585,11 +2585,11 @@ RTLFUNC(Dir) { if( pRTLData->nCurDirPos == -2 ) { - aPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "." )); + aPath = ::rtl::OUString("." ); } else if( pRTLData->nCurDirPos == -1 ) { - aPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".." )); + aPath = ::rtl::OUString(".." ); } pRTLData->nCurDirPos++; } @@ -2692,11 +2692,11 @@ RTLFUNC(Dir) { if( pRTLData->nCurDirPos == -2 ) { - aPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "." )); + aPath = ::rtl::OUString("." ); } else if( pRTLData->nCurDirPos == -1 ) { - aPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".." )); + aPath = ::rtl::OUString(".." ); } pRTLData->nCurDirPos++; } @@ -3388,7 +3388,7 @@ rtl::OUString getBasicTypeName( SbxDataType eType ) String getObjectTypeName( SbxVariable* pVar ) { - rtl::OUString sRet( RTL_CONSTASCII_USTRINGPARAM("Object") ); + rtl::OUString sRet( "Object" ); if ( pVar ) { SbxBase* pObj = pVar->GetObject(); @@ -3428,7 +3428,7 @@ String getObjectTypeName( SbxVariable* pVar ) { try { - xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sRet; + xInv->getValue( rtl::OUString( "$GetTypeName" ) ) >>= sRet; } catch(const Exception& ) { diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 936328aa0a5b..4e5788ad45dc 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -76,7 +76,7 @@ static Reference< XCalendar3 > getLocaleCalendar( void ) if( xSMgr.is() ) { xCalendar = Reference< XCalendar3 >( xSMgr->createInstance - ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.LocaleCalendar" )) ), UNO_QUERY ); + ( ::rtl::OUString("com.sun.star.i18n.LocaleCalendar" ) ), UNO_QUERY ); } } @@ -2575,7 +2575,7 @@ void CallFunctionAccessFunction( const Sequence< Any >& aArgs, const rtl::OUStri Reference< XMultiServiceFactory > xFactory( getProcessServiceFactory() ); if( xFactory.is() ) { - xFunc.set( xFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.FunctionAccess"))), UNO_QUERY_THROW); + xFunc.set( xFactory->createInstance(::rtl::OUString("com.sun.star.sheet.FunctionAccess")), UNO_QUERY_THROW); } } Any aRet = xFunc->callFunction( sFuncName, aArgs ); @@ -2610,7 +2610,7 @@ RTLFUNC(SYD) aParams[ 2 ] <<= makeAny( rPar.Get(3)->GetDouble() ); aParams[ 3 ] <<= makeAny( rPar.Get(4)->GetDouble() ); - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SYD") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "SYD" ), rPar.Get( 0 ) ); } RTLFUNC(SLN) @@ -2633,7 +2633,7 @@ RTLFUNC(SLN) aParams[ 1 ] <<= makeAny( rPar.Get(2)->GetDouble() ); aParams[ 2 ] <<= makeAny( rPar.Get(3)->GetDouble() ); - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SLN") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "SLN" ), rPar.Get( 0 ) ); } RTLFUNC(Pmt) @@ -2678,7 +2678,7 @@ RTLFUNC(Pmt) aParams[ 3 ] <<= fv; aParams[ 4 ] <<= type; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Pmt") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "Pmt" ), rPar.Get( 0 ) ); } RTLFUNC(PPmt) @@ -2725,7 +2725,7 @@ RTLFUNC(PPmt) aParams[ 4 ] <<= fv; aParams[ 5 ] <<= type; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PPmt") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "PPmt" ), rPar.Get( 0 ) ); } RTLFUNC(PV) @@ -2770,7 +2770,7 @@ RTLFUNC(PV) aParams[ 3 ] <<= fv; aParams[ 4 ] <<= type; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PV") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "PV" ), rPar.Get( 0 ) ); } RTLFUNC(NPV) @@ -2798,7 +2798,7 @@ RTLFUNC(NPV) aParams[ 1 ] <<= aValues; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NPV") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "NPV" ), rPar.Get( 0 ) ); } RTLFUNC(NPer) @@ -2843,7 +2843,7 @@ RTLFUNC(NPer) aParams[ 3 ] <<= fv; aParams[ 4 ] <<= type; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NPer") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "NPer" ), rPar.Get( 0 ) ); } RTLFUNC(MIRR) @@ -2874,7 +2874,7 @@ RTLFUNC(MIRR) aParams[ 1 ] <<= makeAny( rPar.Get(2)->GetDouble() ); aParams[ 2 ] <<= makeAny( rPar.Get(3)->GetDouble() ); - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MIRR") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "MIRR" ), rPar.Get( 0 ) ); } RTLFUNC(IRR) @@ -2911,7 +2911,7 @@ RTLFUNC(IRR) aParams[ 0 ] <<= aValues; aParams[ 1 ] <<= guess; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IRR") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "IRR" ), rPar.Get( 0 ) ); } RTLFUNC(IPmt) @@ -2958,7 +2958,7 @@ RTLFUNC(IPmt) aParams[ 4 ] <<= fv; aParams[ 5 ] <<= type; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IPmt") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "IPmt" ), rPar.Get( 0 ) ); } RTLFUNC(FV) @@ -3003,7 +3003,7 @@ RTLFUNC(FV) aParams[ 3 ] <<= pv; aParams[ 4 ] <<= type; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FV") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "FV" ), rPar.Get( 0 ) ); } RTLFUNC(DDB) @@ -3042,7 +3042,7 @@ RTLFUNC(DDB) aParams[ 3 ] <<= period; aParams[ 4 ] <<= factor; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DDB") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "DDB" ), rPar.Get( 0 ) ); } RTLFUNC(Rate) @@ -3101,7 +3101,7 @@ RTLFUNC(Rate) aParams[ 4 ] <<= type; aParams[ 5 ] <<= guess; - CallFunctionAccessFunction( aParams, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Rate") ), rPar.Get( 0 ) ); + CallFunctionAccessFunction( aParams, rtl::OUString( "Rate" ), rPar.Get( 0 ) ); } RTLFUNC(StrReverse) diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index fff3a33d1001..7e3aee2a37a6 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -136,14 +136,14 @@ sal_Bool SfxScriptLibraryContainer::hasLibraryPassword( const String& rLibraryNa // Ctor for service SfxScriptLibraryContainer::SfxScriptLibraryContainer( void ) - :maScriptLanguage( RTL_CONSTASCII_USTRINGPARAM( "StarBasic" ) ) + :maScriptLanguage( "StarBasic" ) { // all initialisation has to be done // by calling XInitialization::initialize } SfxScriptLibraryContainer::SfxScriptLibraryContainer( const uno::Reference< embed::XStorage >& xStorage ) - :maScriptLanguage( RTL_CONSTASCII_USTRINGPARAM( "StarBasic" ) ) + :maScriptLanguage( "StarBasic" ) { init( OUString(), xStorage ); } @@ -191,7 +191,7 @@ void SAL_CALL SfxScriptLibraryContainer::writeLibraryElement // Create sax writer Reference< XExtendedDocumentHandler > xHandler( mxMSF->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY ); + OUString( "com.sun.star.xml.sax.Writer" ) ), UNO_QUERY ); if( !xHandler.is() ) { OSL_FAIL( "### couldn't create sax-writer component\n" ); @@ -219,16 +219,16 @@ void SAL_CALL SfxScriptLibraryContainer::writeLibraryElement switch( aModInfo.ModuleType ) { case ModuleType::NORMAL: - aMod.aModuleType = OUString( RTL_CONSTASCII_USTRINGPARAM("normal") ); + aMod.aModuleType = OUString( "normal" ); break; case ModuleType::CLASS: - aMod.aModuleType = OUString( RTL_CONSTASCII_USTRINGPARAM("class") ); + aMod.aModuleType = OUString( "class" ); break; case ModuleType::FORM: - aMod.aModuleType = OUString( RTL_CONSTASCII_USTRINGPARAM("form") ); + aMod.aModuleType = OUString( "form" ); break; case ModuleType::DOCUMENT: - aMod.aModuleType = OUString( RTL_CONSTASCII_USTRINGPARAM("document") ); + aMod.aModuleType = OUString( "document" ); break; case ModuleType::UNKNOWN: // nothing @@ -248,7 +248,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement Any aRetAny; Reference< XParser > xParser( mxMSF->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY ); + OUString( "com.sun.star.xml.sax.Parser" ) ), UNO_QUERY ); if( !xParser.is() ) { OSL_FAIL( "### couldn't create sax parser component\n" ); @@ -318,7 +318,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement { Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); - xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); + xFactory->createInstance( ::rtl::OUString( "ooo.vba.VBAGlobals" ) ); } catch(const Exception& ) { @@ -348,7 +348,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement { Reference<frame::XModel > xModel( mxOwnerDocument ); Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY_THROW ); - mxCodeNameAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider" ) ) ), UNO_QUERY ); + mxCodeNameAccess.set( xSF->createInstance( rtl::OUString("ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY ); } catch(const Exception& ) {} @@ -555,7 +555,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& if( bKillUncryptedFiles ) aElementInetObj.setExtension( maLibElementFileExtension ); else - aElementInetObj.setExtension( OUString( RTL_CONSTASCII_USTRINGPARAM("pba") ) ); + aElementInetObj.setExtension( OUString( "pba" ) ); String aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); if( mxSFI->exists( aElementPath ) ) @@ -689,7 +689,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, throw uno::RuntimeException(); String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) ); - OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") ); + OUString aMime( "text/xml" ); xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) ); // Set encryption key @@ -745,7 +745,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, sal_False, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); - aElementInetObj.setExtension( OUString( RTL_CONSTASCII_USTRINGPARAM("pba") ) ); + aElementInetObj.setExtension( OUString( "pba" ) ); String aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !isLibraryElementValid( pLib->getByName( aElementName ) ) ) @@ -773,7 +773,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, SbModule* pMod = pBasicLib->FindModule( aElementName ); if( pMod ) { - OUString aCodeStreamName( RTL_CONSTASCII_USTRINGPARAM("code.bin") ); + OUString aCodeStreamName( "code.bin" ); uno::Reference< io::XStream > xCodeStream = xElementRootStorage->openStreamElement( aCodeStreamName, @@ -796,7 +796,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, } // Write encrypted source stream - OUString aSourceStreamName( RTL_CONSTASCII_USTRINGPARAM("source.xml") ); + OUString aSourceStreamName( "source.xml" ); uno::Reference< io::XStream > xSourceStream; try @@ -825,7 +825,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, if ( !xProps.is() ) throw uno::RuntimeException(); String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) ); - OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") ); + OUString aMime( "text/xml" ); xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) ); Reference< XOutputStream > xOut = xSourceStream->getOutputStream(); @@ -1023,7 +1023,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, sal_False, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); - aElementInetObj.setExtension( OUString( RTL_CONSTASCII_USTRINGPARAM("pba") ) ); + aElementInetObj.setExtension( OUString( "pba" ) ); String aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); uno::Reference< embed::XStorage > xElementRootStorage; @@ -1049,7 +1049,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary } try { - OUString aCodeStreamName( RTL_CONSTASCII_USTRINGPARAM("code.bin") ); + OUString aCodeStreamName( "code.bin" ); uno::Reference< io::XStream > xCodeStream = xElementRootStorage->openStreamElement( aCodeStreamName, embed::ElementModes::READ ); @@ -1079,7 +1079,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary if( bLoadSource || bVerifyPasswordOnly ) { // Access encrypted source stream - OUString aSourceStreamName( RTL_CONSTASCII_USTRINGPARAM("source.xml") ); + OUString aSourceStreamName( "source.xml" ); try { uno::Reference< io::XStream > xSourceStream = xElementRootStorage->openEncryptedStreamElement( aSourceStreamName, @@ -1165,9 +1165,9 @@ Sequence< ::rtl::OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServ Sequence< OUString > SfxScriptLibraryContainer::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames( 2 ); - aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DocumentScriptLibraryContainer" )); + aServiceNames[0] = OUString("com.sun.star.script.DocumentScriptLibraryContainer" ); // plus, for compatibility: - aServiceNames[1] = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.ScriptLibraryContainer" )); + aServiceNames[1] = OUString("com.sun.star.script.ScriptLibraryContainer" ); return aServiceNames; } @@ -1179,7 +1179,7 @@ OUString SfxScriptLibraryContainer::getImplementationName_static() MutexGuard aGuard( Mutex::getGlobalMutex() ); if( bNeedsInit ) { - aImplName = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sfx2.ScriptLibraryContainer" )); + aImplName = OUString("com.sun.star.comp.sfx2.ScriptLibraryContainer" ); bNeedsInit = sal_False; } return aImplName; |