diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-13 09:00:53 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-13 09:00:53 +0100 |
commit | c1fa0e476b9f61014c3ba17590753cb502ba1490 (patch) | |
tree | 267645156d07d0a6cf760b940f6c2cba07b534a1 /ucb | |
parent | 06514ed3d609f63cca40f41aec2a8d9ffd0b1509 (diff) |
Easy Hacks : RTL_CONSTASCII_USTRINGPARAM in libs-core
Diffstat (limited to 'ucb')
74 files changed, 1059 insertions, 1095 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 4d43cace003b..f91819b0a636 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -444,10 +444,10 @@ public: throw( RuntimeException ); }; -OUString CCRS_PropertySetInfo::m_aPropertyNameForCount( OUString::createFromAscii( "RowCount" ) ); -OUString CCRS_PropertySetInfo::m_aPropertyNameForFinalCount( OUString::createFromAscii( "IsRowCountFinal" ) ); -OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchSize( OUString::createFromAscii( "FetchSize" ) ); -OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchDirection( OUString::createFromAscii( "FetchDirection" ) ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForCount( RTL_CONSTASCII_USTRINGPARAM("RowCount") ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForFinalCount( RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal") ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchSize( RTL_CONSTASCII_USTRINGPARAM("FetchSize") ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchDirection( RTL_CONSTASCII_USTRINGPARAM("FetchDirection") ); CCRS_PropertySetInfo::CCRS_PropertySetInfo( Reference< XPropertySetInfo > xInfo ) @@ -972,10 +972,10 @@ XTYPEPROVIDER_IMPL_11( CachedContentResultSet //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSet" ), - OUString::createFromAscii( - CACHED_CONTENT_RESULTSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CONTENT_RESULTSET_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // XPropertySet methods. ( inherited ) @@ -2151,8 +2151,8 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter() m_bTriedToGetTypeConverter = sal_True; m_xTypeConverter = Reference< XTypeConverter >( m_xSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.script.Converter" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.script.Converter" )) ), UNO_QUERY ); OSL_ENSURE( m_xTypeConverter.is(), @@ -2201,10 +2201,10 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedContentResultSetFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSetFactory" ), - OUString::createFromAscii( - CACHED_CONTENT_RESULTSET_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSetFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CONTENT_RESULTSET_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index b4edc92072aa..0ccca6340cf1 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -51,8 +51,8 @@ CachedContentResultSetStub::CachedContentResultSetStub( Reference< XResultSet > , m_bFirstFetchSizePropagationDone( sal_False ) , m_nLastFetchSize( 1 )//this value is not important at all , m_bLastFetchDirection( sal_True )//this value is not important at all - , m_aPropertyNameForFetchSize( OUString::createFromAscii( "FetchSize" ) ) - , m_aPropertyNameForFetchDirection( OUString::createFromAscii( "FetchDirection" ) ) + , m_aPropertyNameForFetchSize( OUString(RTL_CONSTASCII_USTRINGPARAM("FetchSize")) ) + , m_aPropertyNameForFetchDirection( OUString(RTL_CONSTASCII_USTRINGPARAM("FetchDirection")) ) { impl_init(); } @@ -240,10 +240,10 @@ Sequence< Type > SAL_CALL CachedContentResultSetStub //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSetStub, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSetStub" ), - OUString::createFromAscii( - CACHED_CRS_STUB_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSetStub" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CRS_STUB_SERVICE_NAME )) ); //----------------------------------------------------------------- // XFetchProvider methods. @@ -599,10 +599,10 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetStubFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedContentResultSetStubFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSetStubFactory" ), - OUString::createFromAscii( - CACHED_CRS_STUB_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSetStubFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CRS_STUB_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index 762e6613d3d9..68a7bfa90665 100644 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.cxx @@ -121,10 +121,10 @@ XTYPEPROVIDER_IMPL_4( CachedDynamicResultSet //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSet" ), - OUString::createFromAscii( - CACHED_DRS_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // own methds. ( inherited ) @@ -177,10 +177,10 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedDynamicResultSetFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSetFactory" ), - OUString::createFromAscii( - CACHED_DRS_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSetFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index db46662e9bb0..60fe063d31e2 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx @@ -123,10 +123,10 @@ XTYPEPROVIDER_IMPL_5( CachedDynamicResultSetStub //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSetStub, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSetStub" ), - OUString::createFromAscii( - CACHED_DRS_STUB_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSetStub" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_STUB_SERVICE_NAME )) ); //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- @@ -167,10 +167,10 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetStubFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedDynamicResultSetStubFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory" ), - OUString::createFromAscii( - CACHED_DRS_STUB_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_STUB_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. @@ -217,8 +217,8 @@ void SAL_CALL CachedDynamicResultSetStubFactory try { xSortFactory = Reference< XSortedDynamicResultSetFactory >( - m_xSMgr->createInstance( OUString::createFromAscii( - "com.sun.star.ucb.SortedDynamicResultSetFactory" ) ), + m_xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.SortedDynamicResultSetFactory" )) ), UNO_QUERY ); } catch ( Exception const & ) diff --git a/ucb/source/cacher/cacheserv.cxx b/ucb/source/cacher/cacheserv.cxx index 32b41b2c2f60..8ff18650d925 100644 --- a/ucb/source/cacher/cacheserv.cxx +++ b/ucb/source/cacher/cacheserv.cxx @@ -46,9 +46,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const OUString & rImplementationName, Sequence< OUString > const & rServiceNames ) { - OUString aKeyName( OUString::createFromAscii( "/" ) ); + OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); aKeyName += rImplementationName; - aKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )); Reference< XRegistryKey > xKey; try diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index e49e40ef07e8..6b7d714b6936 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -320,7 +320,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper } aGuard.reacquire(); - rtl::OUString aName = OUString::createFromAscii( "ResultSetType" ); + rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("ResultSetType")); //find out, if we are ForwardOnly and cache the value: impl_init_xPropertySetOrigin(); diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 25bb6ec5dae3..97232c89c56a 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -428,8 +428,8 @@ void SAL_CALL DynamicResultSetWrapper { xStubFactory = Reference< XCachedDynamicResultSetStubFactory >( m_xSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), UNO_QUERY ); } catch ( Exception const & ) diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index 776040110ecd..664d85372baa 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -86,10 +86,10 @@ XTYPEPROVIDER_IMPL_3( UcbContentProviderProxyFactory, //========================================================================= XSERVICEINFO_IMPL_1( UcbContentProviderProxyFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" ), - OUString::createFromAscii( - PROVIDER_FACTORY_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROVIDER_FACTORY_SERVICE_NAME )) ); //========================================================================= // @@ -214,10 +214,10 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes() //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( UcbContentProviderProxy, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbContentProviderProxy" ), - OUString::createFromAscii( - PROVIDER_PROXY_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbContentProviderProxy" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROVIDER_PROXY_SERVICE_NAME )) ); //========================================================================= // diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 0542a431d61e..f944980f8971 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -351,10 +351,10 @@ void SAL_CALL UniversalContentBroker::removeEventListener( //========================================================================= XSERVICEINFO_IMPL_1( UniversalContentBroker, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UniversalContentBroker" ), - OUString::createFromAscii( - UCB_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UniversalContentBroker" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + UCB_SERVICE_NAME )) ); //========================================================================= // @@ -659,8 +659,8 @@ Any SAL_CALL UniversalContentBroker::execute( { ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -844,8 +844,8 @@ bool UniversalContentBroker::getContentProviderData( { uno::Reference< lang::XMultiServiceFactory > xConfigProv( m_xSMgr->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.configuration.ConfigurationProvider" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationProvider" )) ), uno::UNO_QUERY_THROW ); rtl::OUStringBuffer aFullPath; diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index dbbc39e9bf15..0447fac228db 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -249,12 +249,12 @@ CommandProcessorInfo::CommandProcessorInfo() (*m_pInfo)[ 0 ] = ucb::CommandInfo( - rtl::OUString::createFromAscii( GETCOMMANDINFO_NAME ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GETCOMMANDINFO_NAME )), // Name GETCOMMANDINFO_HANDLE, // Handle getCppuVoidType() ); // ArgType (*m_pInfo)[ 1 ] = ucb::CommandInfo( - rtl::OUString::createFromAscii( GLOBALTRANSFER_NAME ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GLOBALTRANSFER_NAME )), // Name GLOBALTRANSFER_HANDLE, // Handle getCppuType( static_cast< @@ -559,19 +559,19 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( "Target is no XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Target is no XCommandProcessor!")), rContext.xProcessor ); // Unreachable } uno::Sequence< beans::Property > aPropsToObtain( 1 ); aPropsToObtain[ 0 ].Name - = rtl::OUString::createFromAscii( "CreatableContentsInfo" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")); aPropsToObtain[ 0 ].Handle = -1; ucb::Command aGetPropsCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aPropsToObtain ) ); @@ -613,7 +613,7 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( "Target is no XContentCreator!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Target is no XContentCreator!")), rContext.xProcessor ); // Unreachable } @@ -634,7 +634,7 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( "No types creatable!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No types creatable!")), rContext.xProcessor ); // Unreachable } @@ -700,8 +700,8 @@ uno::Reference< ucb::XContent > createNew( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Unknown transfer operation!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unknown transfer operation!" )), rContext.xProcessor, -1 ) ), rContext.xOrigEnv ); @@ -721,7 +721,7 @@ uno::Reference< ucb::XContent > createNew( // First, try it using "CreatabeleContentsInfo" property and // "createNewContent" command -> the "new" way. ucb::Command aCreateNewCommand( - rtl::OUString::createFromAscii( "createNewContent" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("createNewContent")), -1, uno::makeAny( aTypesInfo[ n ] ) ); @@ -750,8 +750,8 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "createNewContent failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "createNewContent failed!" )), rContext.xProcessor ); // Unreachable } @@ -770,7 +770,7 @@ void transferProperties( throw( uno::Exception ) { ucb::Command aGetPropertySetInfoCommand( - rtl::OUString::createFromAscii( "getPropertySetInfo" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")), -1, uno::Any() ); @@ -791,8 +791,8 @@ void transferProperties( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get propertyset info from source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get propertyset info from source object!" )), rContext.xProcessor ); // Unreachable } @@ -800,7 +800,7 @@ void transferProperties( uno::Sequence< beans::Property > aAllProps = xInfo->getProperties(); ucb::Command aGetPropsCommand1( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aAllProps ) ); @@ -821,8 +821,8 @@ void transferProperties( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from source object!" )), rContext.xProcessor ); // Unreachable } @@ -893,7 +893,7 @@ void transferProperties( if ( !bHasTitle && ( rContext.aArg.NewTitle.getLength() > 0 ) ) { aPropValues[ nWritePos ].Name - = rtl::OUString::createFromAscii( "Title" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aPropValues[ nWritePos ].Handle = -1; aPropValues[ nWritePos ].Value <<= rContext.aArg.NewTitle; @@ -905,7 +905,7 @@ void transferProperties( == ucb::TransferCommandOperation_LINK ) ) { aPropValues[ nWritePos ].Name - = rtl::OUString::createFromAscii( "TargetURL" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); aPropValues[ nWritePos ].Handle = -1; aPropValues[ nWritePos ].Value <<= rContext.aArg.SourceURL; @@ -917,7 +917,7 @@ void transferProperties( // Set properties at new object. ucb::Command aSetPropsCommand( - rtl::OUString::createFromAscii( "setPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")), -1, uno::makeAny( aPropValues ) ); @@ -952,7 +952,7 @@ uno::Reference< io::XInputStream > getInputStream( aArg.Properties = uno::Sequence< beans::Property >( 0 ); // unused ucb::Command aOpenCommand( - rtl::OUString::createFromAscii( "open" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), -1, uno::makeAny( aArg ) ); @@ -980,7 +980,7 @@ uno::Reference< io::XInputStream > getInputStream( { uno::Reference< io::XOutputStream > xOutputStream( rContext.xSMgr->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.io.Pipe" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe")) ), uno::UNO_QUERY ); if ( xOutputStream.is() ) @@ -992,7 +992,7 @@ uno::Reference< io::XInputStream > getInputStream( aArg.Properties = uno::Sequence< beans::Property >( 0 ); ucb::Command aOpenCommand( - rtl::OUString::createFromAscii( "open" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), -1, uno::makeAny( aArg ) ); @@ -1025,11 +1025,11 @@ uno::Reference< sdbc::XResultSet > getResultSet( uno::Sequence< beans::Property > aProps( 3 ); - aProps[ 0 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + aProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProps[ 0 ].Handle = -1; /* unknown */ - aProps[ 1 ].Name = rtl::OUString::createFromAscii( "IsDocument" ); + aProps[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aProps[ 1 ].Handle = -1; /* unknown */ - aProps[ 2 ].Name = rtl::OUString::createFromAscii( "TargetURL" ); + aProps[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); aProps[ 2 ].Handle = -1; /* unknown */ ucb::OpenCommandArgument2 aArg; @@ -1038,7 +1038,7 @@ uno::Reference< sdbc::XResultSet > getResultSet( aArg.Sink = 0; aArg.Properties = aProps; - ucb::Command aOpenCommand( rtl::OUString::createFromAscii( "open" ), + ucb::Command aOpenCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), -1, uno::makeAny( aArg ) ); try @@ -1076,11 +1076,11 @@ void handleNameClashRename( // Obtain old title. uno::Sequence< beans::Property > aProps( 1 ); - aProps[ 0 ].Name = rtl::OUString::createFromAscii( "Title" ); + aProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aProps[ 0 ].Handle = -1; ucb::Command aGetPropsCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aProps ) ); @@ -1101,8 +1101,8 @@ void handleNameClashRename( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >( &aProps2, 1 ), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from new object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from new object!" )), rContext.xProcessor ); // Unreachable } @@ -1112,9 +1112,9 @@ void handleNameClashRename( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to get property 'Title' " - "from new object!" ), + "from new object!" )), rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1133,7 +1133,7 @@ void handleNameClashRename( aOldTitlePre = aOldTitle; if ( nPos > 0 ) - aOldTitlePre += rtl::OUString::createFromAscii( "_" ); + aOldTitlePre += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); sal_Bool bContinue = sal_True; do @@ -1194,8 +1194,8 @@ void handleNameClashRename( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >( &aProps2, 1 ), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Got no data stream from source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream from source!" )), rContext.xProcessor ); // Unreachable } @@ -1207,7 +1207,7 @@ void handleNameClashRename( aArg.ReplaceExisting = sal_False; ucb::Command aInsertCommand( - rtl::OUString::createFromAscii( "insert" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), -1, uno::makeAny( aArg ) ); @@ -1231,8 +1231,8 @@ void handleNameClashRename( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), rContext.xProcessor, ucb::NameClash::RENAME ) ), rContext.xOrigEnv ); @@ -1254,9 +1254,9 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to get property 'IsFolder' " - "from source object!" ), + "from source object!" )), rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1268,9 +1268,9 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to get property 'IsDocument' " - "from source object!" ), + "from source object!" )), rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1304,8 +1304,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "No matching content type at target!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No matching content type at target!" )), rContext.xProcessor ); // Unreachable } @@ -1333,8 +1333,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "New content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "New content is not a XCommandProcessor!" )), rContext.xProcessor ); // Unreachable } @@ -1356,8 +1356,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Source content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Source content is not a XCommandProcessor!" )), rContext.xProcessor ); // Unreachable } @@ -1426,7 +1426,7 @@ void globalTransfer_( try { ucb::Command aInsertCommand( - rtl::OUString::createFromAscii( "insert" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), -1, uno::makeAny( aArg ) ); @@ -1444,9 +1444,9 @@ void globalTransfer_( // No chance to solve name clashes, because I'm not able to detect // whether there is one. throw ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to resolve name clashes, no chance to detect " - "that there is one!" ), + "that there is one!" )), rContext.xProcessor, rContext.aArg.NameClash ); } @@ -1472,9 +1472,9 @@ void globalTransfer_( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "BUG: insert + replace == true MUST NOT " - "throw NameClashException." ), + "throw NameClashException." )), rContext.xProcessor, rContext.aArg.NameClash ) ), rContext.xOrigEnv ); @@ -1617,8 +1617,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from children of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from children of source!" )), rContext.xProcessor ); // Unreachable } @@ -1640,8 +1640,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get children of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get children of source!" )), rContext.xProcessor ); // Unreachable } @@ -1697,14 +1697,13 @@ void globalTransfer_( aAny = xcp->execute( ucb::Command( - rtl::OUString::createFromAscii("getCommandInfo"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")), -1, uno::Any()), 0, rContext.xEnv ); - const rtl::OUString cmdName = - rtl::OUString::createFromAscii("flush"); + const rtl::OUString cmdName(RTL_CONSTASCII_USTRINGPARAM("flush")); if((aAny >>= xci) && xci->hasCommandByName(cmdName)) xcp->execute( ucb::Command( @@ -1792,8 +1791,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Can't instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Can't instanciate target object!" )), this ); // Unreachable } @@ -1817,8 +1816,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target content is not a XCommandProcessor!" )), this ); // Unreachable } @@ -1838,7 +1837,7 @@ void UniversalContentBroker::globalTransfer( try { ucb::Command aCommand( - rtl::OUString::createFromAscii( "transfer" ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), // Name -1, // Handle uno::makeAny( aTransferArg ) ); // Argument @@ -1874,7 +1873,7 @@ void UniversalContentBroker::globalTransfer( ucb::NameClash::ERROR ); ucb::Command aCommand1( - rtl::OUString::createFromAscii( "transfer" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), -1, uno::makeAny( aTransferArg1 ) ); @@ -1981,8 +1980,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Can't instanciate source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Can't instanciate source object!" )), this ); // Unreachable } @@ -2002,8 +2001,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Source content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Source content is not a XCommandProcessor!" )), this ); // Unreachable } @@ -2012,17 +2011,17 @@ void UniversalContentBroker::globalTransfer( uno::Sequence< beans::Property > aProps( 4 ); - aProps[ 0 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + aProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProps[ 0 ].Handle = -1; /* unknown */ - aProps[ 1 ].Name = rtl::OUString::createFromAscii( "IsDocument" ); + aProps[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aProps[ 1 ].Handle = -1; /* unknown */ - aProps[ 2 ].Name = rtl::OUString::createFromAscii( "TargetURL" ); + aProps[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); aProps[ 2 ].Handle = -1; /* unknown */ - aProps[ 3 ].Name = rtl::OUString::createFromAscii( "BaseURI" ); + aProps[ 3 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")); aProps[ 3 ].Handle = -1; /* unknown */ ucb::Command aGetPropsCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aProps ) ); @@ -2042,8 +2041,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps2, 1), xEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from source object!" )), this ); // Unreachable } @@ -2076,7 +2075,7 @@ void UniversalContentBroker::globalTransfer( try { ucb::Command aCommand( - rtl::OUString::createFromAscii( "delete" ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), // Name -1, // Handle uno::makeAny( sal_Bool( sal_True ) ) ); // Argument diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx index 008d974d349f..2adba422c649 100644 --- a/ucb/source/core/ucbprops.cxx +++ b/ucb/source/core/ucbprops.cxx @@ -358,10 +358,10 @@ XTYPEPROVIDER_IMPL_3( UcbPropertiesManager, //========================================================================= XSERVICEINFO_IMPL_1( UcbPropertiesManager, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbPropertiesManager" ), - OUString::createFromAscii( - PROPERTIES_MANAGER_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbPropertiesManager" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROPERTIES_MANAGER_SERVICE_NAME )) ); //========================================================================= // diff --git a/ucb/source/core/ucbserv.cxx b/ucb/source/core/ucbserv.cxx index b54cc98436ab..73b1523ad1b9 100644 --- a/ucb/source/core/ucbserv.cxx +++ b/ucb/source/core/ucbserv.cxx @@ -47,9 +47,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const OUString & rImplementationName, Sequence< OUString > const & rServiceNames ) { - OUString aKeyName( OUString::createFromAscii( "/" ) ); + OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< XRegistryKey > xKey; try diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 8ca46ae8d510..912e2c94b395 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -244,10 +244,10 @@ XTYPEPROVIDER_IMPL_4( UcbStore, //========================================================================= XSERVICEINFO_IMPL_1( UcbStore, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbStore" ), - OUString::createFromAscii( - STORE_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbStore" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + STORE_SERVICE_NAME )) ); //========================================================================= // @@ -383,10 +383,10 @@ XTYPEPROVIDER_IMPL_4( PropertySetRegistry, //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( PropertySetRegistry, - OUString::createFromAscii( - "com.sun.star.comp.ucb.PropertySetRegistry" ), - OUString::createFromAscii( - PROPSET_REG_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PropertySetRegistry" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROPSET_REG_SERVICE_NAME )) ); //========================================================================= // @@ -461,7 +461,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create ) // // Set Values // xNameReplace->replaceByName( -// OUString::createFromAscii( "Values" ), +// OUString(RTL_CONSTASCII_USTRINGPARAM("Values")), // makeAny( ... ) ); // Insert new item. @@ -845,7 +845,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { rtl::OUString aOldValuesKey = makeHierarchalNameSegment( rOldKey ); - aOldValuesKey += OUString::createFromAscii( "/Values" ); + aOldValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Values")); Reference< XNameAccess > xOldNameAccess; xRootHierNameAccess->getByHierarchicalName( @@ -867,7 +867,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { rtl::OUString aNewValuesKey = makeHierarchalNameSegment( rNewKey ); - aNewValuesKey += OUString::createFromAscii( "/Values" ); + aNewValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Values")); Reference< XSingleServiceFactory > xNewFac; xRootHierNameAccess->getByHierarchicalName( @@ -891,16 +891,12 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, return; } - aOldValuesKey += OUString::createFromAscii( "/" ); + aOldValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - OUString aHandleKey - = OUString::createFromAscii( "/Handle" ); - OUString aValueKey - = OUString::createFromAscii( "/Value" ); - OUString aStateKey - = OUString::createFromAscii( "/State" ); - OUString aAttrKey - = OUString::createFromAscii( "/Attributes" ); + OUString aHandleKey(RTL_CONSTASCII_USTRINGPARAM("/Handle")); + OUString aValueKey(RTL_CONSTASCII_USTRINGPARAM("/Value")); + OUString aStateKey(RTL_CONSTASCII_USTRINGPARAM("/State")); + OUString aAttrKey(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); for ( sal_Int32 n = 0; n < nCount; ++n ) { @@ -931,7 +927,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "Handle" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Handle")), aAny ); // ... value @@ -941,7 +937,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), aAny ); // ... state @@ -951,7 +947,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "State" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("State")), aAny ); // ... attributes @@ -961,7 +957,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "Attributes" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Attributes")), aAny ); // Insert new item. @@ -1091,9 +1087,9 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider() m_pImpl->m_xConfigProvider = Reference< XMultiServiceFactory >( m_xSMgr->createInstance( - OUString::createFromAscii( + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration." - "ConfigurationProvider" ) ), + "ConfigurationProvider" )) ), UNO_QUERY ); OSL_ENSURE( m_pImpl->m_xConfigProvider.is(), @@ -1149,8 +1145,8 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess() m_pImpl->m_xRootReadAccess = m_pImpl->m_xConfigProvider->createInstanceWithArguments( - OUString::createFromAscii( - "com.sun.star.configuration.ConfigurationAccess" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" )), aArguments ); if ( m_pImpl->m_xRootReadAccess.is() ) @@ -1221,8 +1217,8 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess( m_pImpl->m_xRootWriteAccess = m_pImpl->m_xConfigProvider->createInstanceWithArguments( - OUString::createFromAscii( - "com.sun.star.configuration.ConfigurationUpdateAccess" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationUpdateAccess" )), aArguments ); OSL_ENSURE( m_pImpl->m_xRootWriteAccess.is(), @@ -1401,10 +1397,10 @@ XTYPEPROVIDER_IMPL_8( PersistentPropertySet, //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( PersistentPropertySet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.PersistentPropertySet" ), - OUString::createFromAscii( - PERS_PROPSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PersistentPropertySet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PERS_PROPSET_SERVICE_NAME )) ); //========================================================================= // @@ -1507,7 +1503,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( if ( xRootHierNameAccess.is() ) { OUString aFullPropName( getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( aPropertyName ); // Does property exist? @@ -1526,7 +1522,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( { // Obtain old value OUString aValueName = aFullPropName; - aValueName += OUString::createFromAscii( "/Value" ); + aValueName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); Any aOldValue = xRootHierNameAccess->getByHierarchicalName( aValueName ); @@ -1539,12 +1535,12 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( // Write value xNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), aValue ); // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( - OUString::createFromAscii( "State" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("State")), makeAny( sal_Int32( PropertyState_DIRECT_VALUE ) ) ); @@ -1557,7 +1553,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( { // Obtain handle aValueName = aFullPropName; - aValueName += OUString::createFromAscii( "/Handle" ); + aValueName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Handle")); sal_Int32 nHandle = -1; xRootHierNameAccess->getByHierarchicalName( aValueName ) >>= nHandle; @@ -1613,9 +1609,9 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue( if ( xNameAccess.is() ) { OUString aFullPropName( getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( PropertyName ); - aFullPropName += OUString::createFromAscii( "/Value" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); try { return xNameAccess->getByHierarchicalName( aFullPropName ); @@ -1774,7 +1770,7 @@ void SAL_CALL PersistentPropertySet::addProperty( { aFullValuesName = getFullKey(); OUString aFullPropName = aFullValuesName; - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( Name ); if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) @@ -1820,24 +1816,24 @@ void SAL_CALL PersistentPropertySet::addProperty( // Set handle xNameReplace->replaceByName( - OUString::createFromAscii( "Handle" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Handle")), makeAny( sal_Int32( -1 ) ) ); // Set default value xNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), DefaultValue ); // Set state ( always "default" ) xNameReplace->replaceByName( - OUString::createFromAscii( "State" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("State")), makeAny( sal_Int32( PropertyState_DEFAULT_VALUE ) ) ); // Set attributes xNameReplace->replaceByName( - OUString::createFromAscii( "Attributes" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Attributes")), makeAny( sal_Int32( Attributes ) ) ); // Insert new item. @@ -1930,7 +1926,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { aFullValuesName = getFullKey(); aFullPropName = aFullValuesName; - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( Name ); // Property in set? @@ -1941,7 +1937,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) try { OUString aFullAttrName = aFullPropName; - aFullAttrName += OUString::createFromAscii( "/Attributes" ); + aFullAttrName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); sal_Int32 nAttribs = 0; if ( xRootHierNameAccess->getByHierarchicalName( aFullAttrName ) @@ -2001,7 +1997,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { OUString aFullHandleName = aFullPropName; aFullHandleName - += OUString::createFromAscii( "/Handle" ); + += OUString(RTL_CONSTASCII_USTRINGPARAM("/Handle")); if ( ! ( xRootHierNameAccess->getByHierarchicalName( aFullHandleName ) >>= nHandle ) ) @@ -2135,12 +2131,9 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues() { Sequence< PropertyValue > aValues( nCount ); - const OUString aHandleName - = OUString::createFromAscii( "/Handle" ); - const OUString aValueName - = OUString::createFromAscii( "/Value" ); - const OUString aStateName - = OUString::createFromAscii( "/State" ); + const OUString aHandleName(RTL_CONSTASCII_USTRINGPARAM("/Handle")); + const OUString aValueName(RTL_CONSTASCII_USTRINGPARAM("/Value")); + const OUString aStateName(RTL_CONSTASCII_USTRINGPARAM("/State")); for ( sal_Int32 n = 0; n < nCount; ++n ) { @@ -2265,7 +2258,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( Events aEvents; OUString aFullPropNamePrefix( getFullKey() ); - aFullPropNamePrefix += OUString::createFromAscii( "/" ); + aFullPropNamePrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); // Iterate over given property value sequence. for ( sal_Int32 n = 0; n < nCount; ++n ) @@ -2292,23 +2285,23 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( { // Write handle xNameReplace->replaceByName( - OUString::createFromAscii( "Handle" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Handle")), makeAny( rNewValue.Handle ) ); // Save old value OUString aValueName = aFullPropName; - aValueName += OUString::createFromAscii( "/Value" ); + aValueName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); Any aOldValue = xRootHierNameAccess->getByHierarchicalName( aValueName ); // Write value xNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), rNewValue.Value ); // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( - OUString::createFromAscii( "State" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("State")), makeAny( sal_Int32( PropertyState_DIRECT_VALUE ) ) ); @@ -2545,12 +2538,9 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties() if ( xHierNameAccess.is() ) { - const OUString aHandleName - = OUString::createFromAscii( "/Handle" ); - const OUString aValueName - = OUString::createFromAscii( "/Value" ); - const OUString aAttrName - = OUString::createFromAscii( "/Attributes" ); + const OUString aHandleName(RTL_CONSTASCII_USTRINGPARAM("/Handle")); + const OUString aValueName(RTL_CONSTASCII_USTRINGPARAM("/Value")); + const OUString aAttrName(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); Property* pProps = pPropSeq->getArray(); @@ -2672,7 +2662,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( if ( xRootHierNameAccess.is() ) { OUString aFullPropName( m_pOwner->getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( aName ); // Does property exist? @@ -2685,7 +2675,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( // Obtain handle. OUString aKey = aFullPropName; - aKey += OUString::createFromAscii( "/Handle" ); + aKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Handle")); if ( !( xRootHierNameAccess->getByHierarchicalName( aKey ) >>= aProp.Handle ) ) @@ -2698,7 +2688,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( // Obtain Value and extract type. aKey = aFullPropName; - aKey += OUString::createFromAscii( "/Value" ); + aKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); Any aValue = xRootHierNameAccess->getByHierarchicalName( aKey ); if ( !aValue.hasValue() ) @@ -2713,7 +2703,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( // Obtain Attributes. aKey = aFullPropName; - aKey += OUString::createFromAscii( "/Attributes" ); + aKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); sal_Int32 nAttribs = 0; if ( xRootHierNameAccess->getByHierarchicalName( aKey ) @@ -2760,7 +2750,7 @@ sal_Bool SAL_CALL PropertySetInfo_Impl::hasPropertyByName( if ( xRootHierNameAccess.is() ) { OUString aFullPropName( m_pOwner->getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( Name ); return xRootHierNameAccess->hasByHierarchicalName( aFullPropName ); diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index 2cb85cb97446..551445df5e9d 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -136,10 +136,10 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSet, //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( SortedDynamicResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.SortedDynamicResultSet" ), - OUString::createFromAscii( - DYNAMIC_RESULTSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.SortedDynamicResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + DYNAMIC_RESULTSET_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // XComponent methods. @@ -255,8 +255,8 @@ SortedDynamicResultSet::connectToCache( { xStubFactory = Reference< XCachedDynamicResultSetStubFactory >( mxSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), UNO_QUERY ); } catch ( Exception const & ) @@ -341,7 +341,7 @@ SortedDynamicResultSet::impl_notify( const ListEvent& Changes ) Any aRet; try { - aRet = pCurSet->getPropertyValue( OUString::createFromAscii( "IsRowCountFinal" ) ); + aRet = pCurSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ); } catch ( UnknownPropertyException ) {} catch ( WrappedTargetException ) {} @@ -512,10 +512,10 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSetFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( SortedDynamicResultSetFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" ), - OUString::createFromAscii( - DYNAMIC_RESULTSET_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + DYNAMIC_RESULTSET_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. diff --git a/ucb/source/sorter/sortmain.cxx b/ucb/source/sorter/sortmain.cxx index e23b2e384761..fef1f52a9a3e 100644 --- a/ucb/source/sorter/sortmain.cxx +++ b/ucb/source/sorter/sortmain.cxx @@ -43,9 +43,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const OUString & rImplementationName, Sequence< OUString > const & rServiceNames ) { - OUString aKeyName( OUString::createFromAscii( "/" ) ); + OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< XRegistryKey > xKey; try diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 90a1d6601271..3d62a442a89a 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -248,10 +248,10 @@ XTYPEPROVIDER_IMPL_9( SortedResultSet, //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( SortedResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.SortedResultSet" ), - OUString::createFromAscii( - RESULTSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.SortedResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + RESULTSET_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // XComponent methods. @@ -951,7 +951,7 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName ) if ( bOrgFinal ) { aOrgRet = Reference< XPropertySet >::query(mxOriginal)-> - getPropertyValue( OUString::createFromAscii( "RowCount" ) ); + getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ); aOrgRet >>= nOrgCount; if ( nOrgCount == maS2O.Count() ) aRet <<= (sal_Bool) sal_True; @@ -1494,7 +1494,7 @@ void SortedResultSet::CheckProperties( long nOldCount, sal_Bool bWasFinal ) sal_Bool bIsFinal = sal_False; PropertyChangeEvent aEvt; - aEvt.PropertyName = OUString::createFromAscii( "RowCount" ); + aEvt.PropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); aEvt.Further = sal_False; aEvt.PropertyHandle = -1; aEvt.OldValue <<= nOldCount; @@ -1502,7 +1502,7 @@ void SortedResultSet::CheckProperties( long nOldCount, sal_Bool bWasFinal ) PropertyChanged( aEvt ); - OUString aName = OUString::createFromAscii( "IsRowCountFinal" ); + OUString aName = OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); Any aRet = getPropertyValue( aName ); if ( (aRet >>= bIsFinal) && bIsFinal != bWasFinal ) { @@ -2003,12 +2003,12 @@ void SimpleList::Replace( void* pData, sal_uInt32 nPos ) SRSPropertySetInfo::SRSPropertySetInfo() { - maProps[0].Name = OUString::createFromAscii( "RowCount" ); + maProps[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); maProps[0].Handle = -1; maProps[0].Type = ::getCppuType( (const OUString*) NULL ); maProps[0].Attributes = -1; - maProps[1].Name = OUString::createFromAscii( "IsRowCountFinal" ); + maProps[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); maProps[1].Handle = -1; maProps[1].Type = ::getBooleanCppuType(); maProps[1].Attributes = -1; diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index fba64800ca51..b83aa4f7b455 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -435,22 +435,22 @@ namespace ucb { namespace ucp { namespace ext else { // Append all Core Properties. - xRow->appendString ( Property( ::rtl::OUString::createFromAscii( "ContentType" ), + xRow->appendString ( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), ContentProvider::getArtificialNodeContentType() ); - xRow->appendString ( Property( ::rtl::OUString::createFromAscii( "Title" ), + xRow->appendString ( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), i_rTitle ); - xRow->appendBoolean( Property( ::rtl::OUString::createFromAscii( "IsDocument" ), + xRow->appendBoolean( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), sal_False ); - xRow->appendBoolean( Property( ::rtl::OUString::createFromAscii( "IsFolder" ), + xRow->appendBoolean( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), @@ -541,7 +541,7 @@ namespace ucb { namespace ucp { namespace ext for ( sal_Int32 n = 0; n < nCount; ++n, ++pValues ) { // all our properties are read-only ... - aRet[ n ] <<= IllegalAccessException( ::rtl::OUString::createFromAscii( "property is read-only." ), *this ); + aRet[ n ] <<= IllegalAccessException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("property is read-only.")), *this ); } return aRet; diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx index 4892a5fbb8b6..79927f9b427b 100644 --- a/ucb/source/ucp/ext/ucpext_provider.cxx +++ b/ucb/source/ucp/ext/ucpext_provider.cxx @@ -140,7 +140,7 @@ namespace ucb { namespace ucp { namespace ext throw( IllegalIdentifierException, RuntimeException ) { // Check URL scheme... - const ::rtl::OUString sScheme( rtl::OUString::createFromAscii( "vnd.sun.star.extension" ) ); + const ::rtl::OUString sScheme( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.extension") ); if ( !i_rIdentifier->getContentProviderScheme().equalsIgnoreAsciiCase( sScheme ) ) throw IllegalIdentifierException(); diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index f4ddfd769f4a..ae661d18dcf4 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -267,7 +267,7 @@ rtl::OUString SAL_CALL BaseContent::getImplementationName() throw( RuntimeException) { - return rtl::OUString::createFromAscii( "com.sun.star.comp.ucb.FileContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileContent")); } @@ -289,7 +289,7 @@ BaseContent::getSupportedServiceNames() throw( RuntimeException ) { Sequence< rtl::OUString > ret( 1 ); - ret[0] = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContent" ); + ret[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContent")); return ret; } @@ -421,7 +421,7 @@ BaseContent::execute( const Command& aCommand, { Sequence< beans::Property > seq(1); seq[0] = beans::Property( - rtl::OUString::createFromAscii("CasePreservingURL"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CasePreservingURL")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -530,7 +530,7 @@ BaseContent::getContentType() { // Who am I ? Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"), + seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -669,7 +669,7 @@ BaseContent::createNewContent( try { Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"), + seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -872,7 +872,7 @@ BaseContent::setPropertyValues( return Sequence< Any >( Values.getLength() ); } - const rtl::OUString Title = rtl::OUString::createFromAscii( "Title" ); + const rtl::OUString Title(RTL_CONSTASCII_USTRINGPARAM("Title")); // Special handling for files which have to be inserted if( m_nState & JustInserted ) @@ -926,7 +926,7 @@ BaseContent::setPropertyValues( // m_aUncPath contains parent's URI. if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += rtl::OUString::createFromAscii("/"); + m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); m_aUncPath += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -967,7 +967,7 @@ BaseContent::setPropertyValues( rtl::OUString aDstName = getParentName( m_aUncPath ); if( aDstName.lastIndexOf( sal_Unicode('/') ) != aDstName.getLength() - 1 ) - aDstName += rtl::OUString::createFromAscii("/"); + aDstName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aDstName += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -1129,7 +1129,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, // Is destination a document or a folder ? Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"), + seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -1152,7 +1152,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, // as child dstUncPath = m_aUncPath; - dstUncPath += ( rtl::OUString::createFromAscii( "/" ) + NewTitle ); + dstUncPath += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + NewTitle ); sal_Int32 NameClash = aTransferInfo.NameClash; @@ -1198,7 +1198,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, sal_Bool bDocument = false; Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"), + seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -1264,7 +1264,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, m_pMyShell->clearError( nMyCommandIdentifier ); m_aUncPath = getParentName( m_aUncPath ); if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += rtl::OUString::createFromAscii("/"); + m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); m_aUncPath += rtl::Uri::encode( aRequestImpl->newName(), rtl_UriCharClassPchar, diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index d17fcc646497..1c8e7eb63bfb 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -222,10 +222,10 @@ namespace fileaccess { rtl::OUString aParent = aFileName.copy( 0,lastIndex ); if( aParent[ aParent.getLength()-1] == sal_Unicode(':') && aParent.getLength() == 6 ) - aParent += rtl::OUString::createFromAscii( "/" ); + aParent += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if( 0 == aParent.compareToAscii( "file://" ) ) - aParent = rtl::OUString::createFromAscii( "file:///" ); + aParent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); return aParent; } @@ -536,8 +536,8 @@ namespace fileaccess { Sequence< ::rtl::OUString > aSeq( 1 ); aSeq[0] = ( errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND ) ? - rtl::OUString::createFromAscii( "Title" ) : - rtl::OUString::createFromAscii( "ContentType" ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) : + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")); aAny <<= MissingPropertiesException( rtl::OUString( @@ -603,7 +603,7 @@ namespace fileaccess { InteractiveAugmentedIOException excep; excep.Code = IOErrorCode_INVALID_CHARACTER; PropertyValue prop; - prop.Name = rtl::OUString::createFromAscii("ResourceName"); + prop.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")); prop.Handle = -1; rtl::OUString m_aClashingName( rtl::Uri::decode( diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx index 2738151fbf8a..66ac700013e6 100644 --- a/ucb/source/ucp/file/filinsreq.cxx +++ b/ucb/source/ucp/file/filinsreq.cxx @@ -207,7 +207,7 @@ XInteractionRequestImpl::getRequest() InteractiveAugmentedIOException excep; excep.Code = IOErrorCode_INVALID_CHARACTER; PropertyValue prop; - prop.Name = rtl::OUString::createFromAscii("ResourceName"); + prop.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")); prop.Handle = -1; prop.Value <<= m_aClashingName; Sequence<Any> seq(1); diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index 31246a8f9771..4bd7954917ef 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -56,7 +56,7 @@ sal_Bool convert( shell* pShell, { xConverter = uno::Reference< script::XTypeConverter >( pShell->m_xMultiServiceFactory->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.script.Converter" ) ),uno::UNO_QUERY ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")) ), uno::UNO_QUERY ); /* DBG_ASSERT( m_xTypeConverter.is(), "PropertyValueSet::getTypeConverter() - " diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index f2c3ec8e77ba..88b78ff61a1d 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -237,7 +237,7 @@ void XResultSet_impl::rowCountChanged() aOldValue = aNewValue-1; } beans::PropertyChangeEvent aEv; - aEv.PropertyName = rtl::OUString::createFromAscii( "RowCount" ); + aEv.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); aEv.Further = false; aEv.PropertyHandle = -1; aEv.OldValue <<= aOldValue; @@ -262,7 +262,7 @@ void XResultSet_impl::isFinalChanged() m_bRowCountFinal = true; } beans::PropertyChangeEvent aEv; - aEv.PropertyName = rtl::OUString::createFromAscii( "IsRowCountFinal" ); + aEv.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); aEv.Further = false; aEv.PropertyHandle = -1; sal_Bool fval = false; @@ -734,8 +734,8 @@ XResultSet_impl::connectToCache( xStubFactory = uno::Reference< ucb::XCachedDynamicResultSetStubFactory >( mxSMgr->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -806,12 +806,12 @@ XResultSet_impl::getPropertySetInfo() { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString::createFromAscii( "RowCount" ); + seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[0].Name = rtl::OUString::createFromAscii( "IsRowCountFinal" ); + seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; @@ -831,8 +831,8 @@ void SAL_CALL XResultSet_impl::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) || - aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) || + aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) return; throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } @@ -844,13 +844,13 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { uno::Any aAny; sal_Int32 count = sal::static_int_cast<sal_Int32>(m_aItems.size()); @@ -869,7 +869,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -878,7 +878,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -898,13 +898,13 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) && + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) && + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index d034538e47ff..6860acfeac41 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -303,8 +303,8 @@ XStream_impl::closeStream( if( err != osl::FileBase::E_None ) { io::IOException ex; - ex.Message = rtl::OUString::createFromAscii( - "could not close file"); + ex.Message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "could not close file")); throw ex; } diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index b167757eeac1..4292c5fefe87 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -56,9 +56,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< registry::XRegistryKey > xKey; try @@ -263,7 +263,7 @@ FileProvider::supportsService( const rtl::OUString& ServiceName ) throw( RuntimeException ) { - return ServiceName == rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ); + return ServiceName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")); } @@ -468,17 +468,17 @@ private: XPropertySetInfoImpl2::XPropertySetInfoImpl2() : m_seq( 3 ) { - m_seq[0] = Property( rtl::OUString::createFromAscii( "HostName" ), + m_seq[0] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HostName")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::READONLY ); - m_seq[1] = Property( rtl::OUString::createFromAscii( "HomeDirectory" ), + m_seq[1] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeDirectory")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::READONLY ); - m_seq[2] = Property( rtl::OUString::createFromAscii( "FileSystemNotation" ), + m_seq[2] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FileSystemNotation")), -1, getCppuType( static_cast< sal_Int32* >( 0 ) ), PropertyAttribute::READONLY ); diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 6b5ad1357c11..250d58db9b7f 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -167,24 +167,24 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF m_bWithConfig( bWithConfig ), m_pProvider( pProvider ), m_xMultiServiceFactory( xMultiServiceFactory ), - Title( rtl::OUString::createFromAscii( "Title" ) ), + Title( RTL_CONSTASCII_USTRINGPARAM("Title") ), CasePreservingURL( - rtl::OUString::createFromAscii( "CasePreservingURL" ) ), - IsDocument( rtl::OUString::createFromAscii( "IsDocument" ) ), - IsFolder( rtl::OUString::createFromAscii( "IsFolder" ) ), - DateModified( rtl::OUString::createFromAscii( "DateModified" ) ), - Size( rtl::OUString::createFromAscii( "Size" ) ), - IsVolume( rtl::OUString::createFromAscii( "IsVolume" ) ), - IsRemoveable( rtl::OUString::createFromAscii( "IsRemoveable" ) ), - IsRemote( rtl::OUString::createFromAscii( "IsRemote" ) ), - IsCompactDisc( rtl::OUString::createFromAscii( "IsCompactDisc" ) ), - IsFloppy( rtl::OUString::createFromAscii( "IsFloppy" ) ), - IsHidden( rtl::OUString::createFromAscii( "IsHidden" ) ), - ContentType( rtl::OUString::createFromAscii( "ContentType" ) ), - IsReadOnly( rtl::OUString::createFromAscii( "IsReadOnly" ) ), - CreatableContentsInfo( rtl::OUString::createFromAscii( "CreatableContentsInfo" ) ), - FolderContentType( rtl::OUString::createFromAscii( "application/vnd.sun.staroffice.fsys-folder" ) ), - FileContentType( rtl::OUString::createFromAscii( "application/vnd.sun.staroffice.fsys-file" ) ), + RTL_CONSTASCII_USTRINGPARAM("CasePreservingURL") ), + IsDocument( RTL_CONSTASCII_USTRINGPARAM("IsDocument") ), + IsFolder( RTL_CONSTASCII_USTRINGPARAM("IsFolder") ), + DateModified( RTL_CONSTASCII_USTRINGPARAM("DateModified") ), + Size( RTL_CONSTASCII_USTRINGPARAM("Size") ), + IsVolume( RTL_CONSTASCII_USTRINGPARAM("IsVolume") ), + IsRemoveable( RTL_CONSTASCII_USTRINGPARAM("IsRemoveable") ), + IsRemote( RTL_CONSTASCII_USTRINGPARAM("IsRemote") ), + IsCompactDisc( RTL_CONSTASCII_USTRINGPARAM("IsCompactDisc") ), + IsFloppy( RTL_CONSTASCII_USTRINGPARAM("IsFloppy") ), + IsHidden( RTL_CONSTASCII_USTRINGPARAM("IsHidden") ), + ContentType( RTL_CONSTASCII_USTRINGPARAM("ContentType") ), + IsReadOnly( RTL_CONSTASCII_USTRINGPARAM("IsReadOnly") ), + CreatableContentsInfo( RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo") ), + FolderContentType( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-folder") ), + FileContentType( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-file") ), m_sCommandInfo( 9 ) { // Title @@ -364,45 +364,45 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF | beans::PropertyAttribute::READONLY ) ); // Commands - m_sCommandInfo[0].Name = rtl::OUString::createFromAscii( "getCommandInfo" ); + m_sCommandInfo[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")); m_sCommandInfo[0].Handle = -1; m_sCommandInfo[0].ArgType = getCppuVoidType(); - m_sCommandInfo[1].Name = rtl::OUString::createFromAscii( "getPropertySetInfo" ); + m_sCommandInfo[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")); m_sCommandInfo[1].Handle = -1; m_sCommandInfo[1].ArgType = getCppuVoidType(); - m_sCommandInfo[2].Name = rtl::OUString::createFromAscii( "getPropertyValues" ); + m_sCommandInfo[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); m_sCommandInfo[2].Handle = -1; m_sCommandInfo[2].ArgType = getCppuType( static_cast< uno::Sequence< beans::Property >* >( 0 ) ); - m_sCommandInfo[3].Name = rtl::OUString::createFromAscii( "setPropertyValues" ); + m_sCommandInfo[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")); m_sCommandInfo[3].Handle = -1; m_sCommandInfo[3].ArgType = getCppuType( static_cast< uno::Sequence< beans::PropertyValue >* >( 0 ) ); - m_sCommandInfo[4].Name = rtl::OUString::createFromAscii( "open" ); + m_sCommandInfo[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); m_sCommandInfo[4].Handle = -1; m_sCommandInfo[4].ArgType = getCppuType( static_cast< OpenCommandArgument* >( 0 ) ); - m_sCommandInfo[5].Name = rtl::OUString::createFromAscii( "transfer" ); + m_sCommandInfo[5].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")); m_sCommandInfo[5].Handle = -1; m_sCommandInfo[5].ArgType = getCppuType( static_cast< TransferInfo* >( 0 ) ); - m_sCommandInfo[6].Name = rtl::OUString::createFromAscii( "delete" ); + m_sCommandInfo[6].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")); m_sCommandInfo[6].Handle = -1; m_sCommandInfo[6].ArgType = getCppuType( static_cast< sal_Bool* >( 0 ) ); - m_sCommandInfo[7].Name = rtl::OUString::createFromAscii( "insert" ); + m_sCommandInfo[7].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")); m_sCommandInfo[7].Handle = -1; m_sCommandInfo[7].ArgType = getCppuType( static_cast< InsertCommandArgument* > ( 0 ) ); - m_sCommandInfo[7].Name = rtl::OUString::createFromAscii( "createNewContent" ); + m_sCommandInfo[7].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("createNewContent")); m_sCommandInfo[7].Handle = -1; m_sCommandInfo[7].ArgType = getCppuType( static_cast< ucb::ContentInfo * > ( 0 ) ); if(m_bWithConfig) { - rtl::OUString Store = rtl::OUString::createFromAscii( "com.sun.star.ucb.Store" ); + rtl::OUString Store(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Store")); uno::Reference< XPropertySetRegistryFactory > xRegFac( m_xMultiServiceFactory->createInstance( Store ), uno::UNO_QUERY ); @@ -914,7 +914,7 @@ shell::setv( const rtl::OUString& aUnqPath, --propChanged; // unsuccessful setting uno::Sequence< uno::Any > names( 1 ); ret[0] <<= beans::PropertyValue( - rtl::OUString::createFromAscii("Uri"), -1, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(aUnqPath), beans::PropertyState_DIRECT_VALUE); IOErrorCode ioError(IOErrorCode_GENERAL); @@ -978,7 +978,7 @@ shell::setv( const rtl::OUString& aUnqPath, --propChanged; // unsuccessful setting uno::Sequence< uno::Any > names( 1 ); names[0] <<= beans::PropertyValue( - rtl::OUString::createFromAscii("Uri"), -1, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(aUnqPath), beans::PropertyState_DIRECT_VALUE); IOErrorCode ioError; @@ -1208,7 +1208,7 @@ shell::move( sal_Int32 CommandId, { newDstUnqPath = dstUnqPath; - rtl::OUString aPostFix( rtl::OUString::createFromAscii( "_" ) ); + rtl::OUString aPostFix( RTL_CONSTASCII_USTRINGPARAM("_") ); aPostFix += rtl::OUString::valueOf( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1438,7 +1438,7 @@ shell::copy( { newDstUnqPath = dstUnqPath; - rtl::OUString aPostFix( rtl::OUString::createFromAscii( "_" ) ); + rtl::OUString aPostFix( RTL_CONSTASCII_USTRINGPARAM("_") ); aPostFix += rtl::OUString::valueOf( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1981,7 +1981,7 @@ sal_Bool SAL_CALL shell::getUnqFromUrl( const rtl::OUString& Url,rtl::OUString& 0 == Url.compareToAscii( "file://localhost/" ) || 0 == Url.compareToAscii( "file://127.0.0.1/" ) ) { - Unq = rtl::OUString::createFromAscii( "file:///" ); + Unq = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); return false; } @@ -2062,7 +2062,7 @@ shell::copy_recursive( const rtl::OUString& srcUnqPath, RTL_TEXTENCODING_UTF8 ); if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 ) - newDstUnqPath += rtl::OUString::createFromAscii( "/" ); + newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); newDstUnqPath += tit; @@ -3033,7 +3033,7 @@ uno::Sequence< ucb::ContentInfo > shell::queryCreatableContentsInfo() uno::Sequence< beans::Property > props( 1 ); props[0] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), beans::PropertyAttribute::MAYBEVOID @@ -3056,20 +3056,20 @@ uno::Sequence< ucb::ContentInfo > shell::queryCreatableContentsInfo() void SAL_CALL shell::getScheme( rtl::OUString& Scheme ) { - Scheme = rtl::OUString::createFromAscii( "file" ); + Scheme = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")); } rtl::OUString SAL_CALL shell::getImplementationName_static( void ) { - return rtl::OUString::createFromAscii( "com.sun.star.comp.ucb.FileProvider" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileProvider")); } uno::Sequence< rtl::OUString > SAL_CALL shell::getSupportedServiceNames_static( void ) { - rtl::OUString Supported = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ) ; + rtl::OUString Supported(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")); com::sun::star::uno::Sequence< rtl::OUString > Seq( &Supported,1 ); return Seq; } diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 7b8ee427d001..0cd65184721d 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -177,10 +177,10 @@ XTYPEPROVIDER_IMPL_6( FTPContent, #define XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) XSERVICEINFO_IMPL_1( FTPContent, - rtl::OUString::createFromAscii( - "com.sun.star.comp.FTPContent"), - rtl::OUString::createFromAscii( - "com.sun.star.ucb.FTPContent")); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.FTPContent")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.FTPContent"))); @@ -194,7 +194,7 @@ XSERVICEINFO_IMPL_1( FTPContent, rtl::OUString SAL_CALL FTPContent::getContentType() throw( RuntimeException ) { - return rtl::OUString::createFromAscii(FTP_CONTENT_TYPE); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_TYPE)); } @@ -375,7 +375,7 @@ Any SAL_CALL FTPContent::execute( { Sequence<Any> seq(1); PropertyValue value; - value.Name = rtl::OUString::createFromAscii("Uri"); + value.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -410,7 +410,7 @@ Any SAL_CALL FTPContent::execute( { Sequence<Any> seq(1); PropertyValue value; - value.Name = rtl::OUString::createFromAscii("Uri"); + value.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -435,8 +435,8 @@ Any SAL_CALL FTPContent::execute( if(!(aCommand.Argument >>= Properties)) { aRet <<= IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >(this), -1); ucbhelper::cancelCommandExecution(aRet,Environment); @@ -450,8 +450,8 @@ Any SAL_CALL FTPContent::execute( if( ! ( aCommand.Argument >>= propertyValues ) ) { aRet <<= IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >(this), -1); ucbhelper::cancelCommandExecution(aRet,Environment); @@ -472,8 +472,8 @@ Any SAL_CALL FTPContent::execute( InsertCommandArgument aInsertArgument; if ( ! ( aCommand.Argument >>= aInsertArgument ) ) { aRet <<= IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >(this), -1); ucbhelper::cancelCommandExecution(aRet,Environment); @@ -488,8 +488,8 @@ Any SAL_CALL FTPContent::execute( OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { aRet <<= IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >(this), -1); @@ -533,7 +533,7 @@ Any SAL_CALL FTPContent::execute( Sequence<Any> seq(1); PropertyValue value; value.Name = - rtl::OUString::createFromAscii("Uri"); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -584,8 +584,8 @@ Any SAL_CALL FTPContent::execute( } else { aRet <<= IllegalArgumentException( - rtl::OUString::createFromAscii( - "Unexpected OpenMode!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unexpected OpenMode!" )), static_cast< cppu::OWeakObject * >(this), -1); @@ -597,8 +597,8 @@ Any SAL_CALL FTPContent::execute( ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >(this), -1)), Environment); @@ -635,13 +635,13 @@ Any SAL_CALL FTPContent::execute( } } -#define FTP_FILE rtl::OUString::createFromAscii( \ +#define FTP_FILE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( \ "application/" \ - "vnd.sun.staroffice.ftp-file") + "vnd.sun.staroffice.ftp-file")) -#define FTP_FOLDER rtl::OUString::createFromAscii( \ +#define FTP_FOLDER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( \ "application/" \ - "vnd.sun.staroffice.ftp-folder") + "vnd.sun.staroffice.ftp-folder")) Sequence<ContentInfo > SAL_CALL FTPContent::queryCreatableContentsInfo( ) @@ -662,7 +662,7 @@ FTPContent::queryCreatableContentsInfo_Static( ) | ContentInfoAttribute::KIND_DOCUMENT; Sequence< Property > props( 1 ); props[0] = Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::MAYBEVOID @@ -762,7 +762,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand, if(m_bInserted && !m_bTitleSet) { MissingPropertiesException excep; excep.Properties.realloc(1); - excep.Properties[0] = rtl::OUString::createFromAscii("Title"); + excep.Properties[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); Any aAny; aAny <<= excep; ucbhelper::cancelCommandExecution(aAny,Env); } @@ -915,7 +915,7 @@ Sequence<Any> FTPContent::setPropertyValues( rtl::OUString OldTitle = m_aFTPURL.ren(Title); evt.realloc(1); evt[0].PropertyName = - rtl::OUString::createFromAscii("Title"); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); evt[0].Further = false; evt[0].PropertyHandle = -1; evt[0].OldValue <<= OldTitle; @@ -936,8 +936,8 @@ Sequence<Any> FTPContent::setPropertyValues( for(sal_Int32 j = 0; j < props.getLength(); ++j) if(props[j].Name == seqPropVal[i].Name) { ret[i] <<= IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!")), //props[j].Attributes & PropertyAttribute::READONLY // ? "Property is read-only!" // : "Access denied!"), diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx index c9110a44c5f9..0a2ac9b306f0 100644 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx @@ -141,7 +141,7 @@ FTPContentIdentifier::getContentProviderScheme( com::sun::star::uno::RuntimeException ) { - return rtl::OUString::createFromAscii("ftp"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp")); } diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index 77b3655b9de5..9665d6fc1ce1 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -105,8 +105,8 @@ XTYPEPROVIDER_IMPL_3(FTPContentProvider, XSERVICEINFO_IMPL_1( FTPContentProvider, - rtl::OUString::createFromAscii("com.sun.star.comp.FTPContentProvider"), - rtl::OUString::createFromAscii(FTP_CONTENT_PROVIDER_SERVICE_NAME)); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.FTPContentProvider")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_PROVIDER_SERVICE_NAME))); //========================================================================= // @@ -160,7 +160,7 @@ FTPContentProvider::queryContent( this); if(!m_pProxyDecider->shouldUseProxy( - rtl::OUString::createFromAscii("ftp"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp")), aURL.host(), aURL.port().toInt32())) { diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index 54fb64bf489c..c861ebb8481e 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx @@ -72,8 +72,8 @@ ResultSetI::ResultSetI(const Reference<XMultiServiceFactory>& xMSF, const rtl::OUString& Name = seqProp[i].Name; if(Name.compareToAscii("ContentType") == 0 ) xRow->appendString(seqProp[i], - rtl::OUString::createFromAscii( - "application/ftp" )); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "application/ftp" ))); else if(Name.compareToAscii("Title") == 0) xRow->appendString(seqProp[i],dirvec[n].m_aName); else if(Name.compareToAscii("IsReadOnly") == 0) diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx index 7d7173277af3..93db7e67091b 100644 --- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx @@ -512,12 +512,12 @@ ResultSetBase::getPropertySetInfo() throw( uno::RuntimeException) { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString::createFromAscii( "RowCount" ); + seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[1].Name = rtl::OUString::createFromAscii( "IsRowCountFinal" ); + seq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); seq[1].Handle = -1; seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[1].Attributes = beans::PropertyAttribute::READONLY; @@ -537,8 +537,8 @@ void SAL_CALL ResultSetBase::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) || - aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) || + aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) return; throw beans::UnknownPropertyException(); @@ -551,13 +551,13 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { uno::Any aAny; sal_Int32 count = m_aItems.size(); @@ -576,7 +576,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -585,7 +585,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -605,13 +605,13 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) && + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) && + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); diff --git a/ucb/source/ucp/ftp/ftpservices.cxx b/ucb/source/ucp/ftp/ftpservices.cxx index 360de25278a7..1bb8ec694a7e 100644 --- a/ucb/source/ucp/ftp/ftpservices.cxx +++ b/ucb/source/ucp/ftp/ftpservices.cxx @@ -41,9 +41,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, uno::Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 5dda1fb5c5f1..b26e380aa037 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -139,9 +139,9 @@ FTPURL::FTPURL(const rtl::OUString& url, malformed_exception ) : m_pFCP(pFCP), - m_aUsername(rtl::OUString::createFromAscii("anonymous")), + m_aUsername(RTL_CONSTASCII_USTRINGPARAM("anonymous")), m_bShowPassword(false), - m_aPort(rtl::OUString::createFromAscii("21")) + m_aPort(RTL_CONSTASCII_USTRINGPARAM("21")) { parse(url); // can reset m_bShowPassword } @@ -406,7 +406,7 @@ namespace ftp { // Setting username:password #define SET_USER_PASSWORD(username,password) \ rtl::OUString combi(username + \ - rtl::OUString::createFromAscii(":") + \ + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + \ password); \ rtl::OString aUserPsswd(combi.getStr(), \ combi.getLength(), \ @@ -556,7 +556,7 @@ rtl::OUString FTPURL::net_title() const if(try_more && 1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); // add end-slash + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); // add end-slash else if(!try_more && 1+url.lastIndexOf(sal_Unicode('/')) == url.getLength()) url = url.copy(0,url.getLength()-1); // remove end-slash @@ -574,7 +574,7 @@ rtl::OUString FTPURL::net_title() const // Format of current working directory: // 257 "/bla/bla" is current directory sal_Int32 index1 = aNetTitle.lastIndexOf( - rtl::OUString::createFromAscii("257")); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("257"))); index1 = 1+aNetTitle.indexOf(sal_Unicode('"'),index1); sal_Int32 index2 = aNetTitle.indexOf(sal_Unicode('"'),index1); aNetTitle = aNetTitle.copy(index1,index2-index1); @@ -602,7 +602,7 @@ rtl::OUString FTPURL::net_title() const aNetTitle = decodePathSegment(m_aPathSegmentVec.back()); else // must be root - aNetTitle = rtl::OUString::createFromAscii("/"); + aNetTitle = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); try_more = false; } @@ -737,7 +737,7 @@ void FTPURL::mkdir(bool ReplaceExisting) const rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -777,7 +777,7 @@ rtl::OUString FTPURL::ren(const rtl::OUString& NewTitle) rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -828,7 +828,7 @@ void FTPURL::del() const rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); SET_URL(url); CURLcode err = curl_easy_perform(curl); diff --git a/ucb/source/ucp/ftp/test.cxx b/ucb/source/ucp/ftp/test.cxx index 49e2416bd6e9..6c88911cc341 100644 --- a/ucb/source/ucp/ftp/test.cxx +++ b/ucb/source/ucp/ftp/test.cxx @@ -113,7 +113,7 @@ // Reference<XContentIdentifier> xIdent( // new ftp::FTPContentIdentifier( -// rtl::OUString::createFromAscii("ftp://abi:psswd@abi-1/file"), +// rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp://abi:psswd@abi-1/file")), // pProvider)); // Reference<XContent> xContent = xProvider->queryContent(xIdent); @@ -132,7 +132,7 @@ // Sequence<NumberedSortingInfo>(0)); // Any aAny; aAny <<= aOpenCommand; -// Command aCommand(OUString::createFromAscii("open"), +// Command aCommand(OUString(RTL_CONSTASCII_USTRINGPARAM("open")), // -1, // aAny); @@ -232,9 +232,9 @@ int main(int argc,char* argv[]) // rtl::OUString lib,tmp,testlib; // std::vector<rtl::OUString> tests; -// sal_Int32 TEST = sce.indexOf(rtl::OUString::createFromAscii("TEST")); -// sal_Int32 WITH = sce.indexOf(rtl::OUString::createFromAscii("WITH")); -// sal_Int32 FROM = sce.indexOf(rtl::OUString::createFromAscii("FROM")); +// sal_Int32 TEST = sce.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEST"))); +// sal_Int32 WITH = sce.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WITH"))); +// sal_Int32 FROM = sce.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FROM"))); // lib = sce.copy(TEST+4,WITH-TEST-4).trim(); // tmp = sce.copy(WITH+4,FROM-WITH-4).trim(); @@ -263,9 +263,9 @@ int main(int argc,char* argv[]) // } // osl::Module mathLib; -// mathLib.load(rtl::OUString::createFromAscii("libm.so")); +// mathLib.load(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libm.so"))); // typedef double (*DF)(double); -// DF func = (DF)mathLib.getSymbol(rtl::OUString::createFromAscii("cos")); +// DF func = (DF)mathLib.getSymbol(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cos"))); // fprintf(stderr,"-------double %f ----------\n",(*func)(2.0)); // fprintf(stderr,"-------testing %s ----------\n",scefile); diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx index 6e8da47fa0da..851f5c3baf4b 100644 --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.cxx @@ -164,8 +164,8 @@ int test_ftplist(void) { FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString::createFromAscii( - "ftp://abi:psswd@abi-1/dir"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ftp://abi:psswd@abi-1/dir")), &provider); std::vector<ftp::FTPDirentry> vec = @@ -230,8 +230,8 @@ int test_ftpproperties(void) { FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString::createFromAscii( - "ftp://abi:psswd@abi-1/file"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ftp://abi:psswd@abi-1/file")), &provider); ftp::FTPDirentry ade(url.direntry()); @@ -251,8 +251,8 @@ int test_ftpopen(void) FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString::createFromAscii( - "ftp://abi:psswd@abi-1/file"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ftp://abi:psswd@abi-1/file")), &provider); FILE* file = url.open(); diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 6eb02232a59c..c8c397853fb5 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -150,8 +150,8 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { return isFolder(uno::Reference< ucb::XCommandEnvironment >()) - ? rtl::OUString::createFromAscii( GIO_FOLDER_TYPE ) - : rtl::OUString::createFromAscii( GIO_FILE_TYPE ); + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FOLDER_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FILE_TYPE )); } #define EXCEPT(aExcept) \ @@ -305,7 +305,7 @@ uno::Any Content::mapGIOError( GError *pError ) uno::Any Content::getBadArgExcept() { return uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong argument type!")), static_cast< cppu::OWeakObject * >( this ), -1) ); } @@ -529,7 +529,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( static lang::IllegalAccessException getReadOnlyException( const uno::Reference< uno::XInterface >& rContext ) { - return lang::IllegalAccessException ( rtl::OUString::createFromAscii( "Property is read-only!" ), rContext ); + return lang::IllegalAccessException ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), rContext ); } void Content::queryChildren( ContentRefList& rChildren ) @@ -545,7 +545,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Int32 nLen = aURL.getLength(); @@ -677,7 +677,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!( rValue.Value >>= aNewTitle )) { aRet[ n ] <<= beans::IllegalTypeException - ( rtl::OUString::createFromAscii( "Property value has wrong type!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -685,7 +685,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( aNewTitle.getLength() <= 0 ) { aRet[ n ] <<= lang::IllegalArgumentException - ( rtl::OUString::createFromAscii( "Empty title not allowed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), static_cast< cppu::OWeakObject * >( this ), -1 ); continue; @@ -701,7 +701,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( g_warning ("Set new name to '%s'", newName); #endif - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); if (oldName) aEvent.OldValue = uno::makeAny(rtl::OUString(oldName, strlen(oldName), RTL_TEXTENCODING_UTF8)); aEvent.NewValue = uno::makeAny(aNewTitle); @@ -745,7 +745,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!exchangeIdentity( xNewId ) ) { aRet[ nTitlePos ] <<= uno::Exception - ( rtl::OUString::createFromAscii( "Exchange failed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1102,19 +1102,19 @@ uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo( // Minimum set of props we really need uno::Sequence< beans::Property > props( 1 ); props[0] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); // file - seq[0].Type = rtl::OUString::createFromAscii( GIO_FILE_TYPE ); + seq[0].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FILE_TYPE )); seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT ); seq[0].Properties = props; // folder - seq[1].Type = rtl::OUString::createFromAscii( GIO_FOLDER_TYPE ); + seq[1].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FOLDER_TYPE )); seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; seq[1].Properties = props; @@ -1159,7 +1159,7 @@ uno::Reference< ucb::XContent > rtl::OUString aURL = m_xIdentifier->getContentIdentifier(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); name = create_document ? "[New_Content]" : "[New_Collection]"; aURL += rtl::OUString::createFromAscii( name ); @@ -1321,14 +1321,14 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) throw ( uno rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii("com.sun.star.comp.GIOContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.GIOContent")); } uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii("com.sun.star.ucb.GIOContent" ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.GIOContent")); return aSNS; } diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx index ded89864cb34..a45892633dfc 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.cxx +++ b/ucb/source/ucp/gio/gio_datasupplier.cxx @@ -130,7 +130,7 @@ DataSupplier::~DataSupplier() g_uri_escape_string( g_file_info_get_name(maResults[ nIndex ]->pInfo) , NULL, false); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += rtl::OUString::createFromAscii( escaped_name ); @@ -246,7 +246,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nInde xContent, uno::UNO_QUERY_THROW ); sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() ); ucb::Command aCmd; - aCmd.Name = rtl::OUString::createFromAscii( "getPropertyValues" ); + aCmd.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); aCmd.Handle = -1; aCmd.Argument <<= getResultSet()->getProperties(); uno::Any aResult( xCmdProc->execute( diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index ce1a7f3fe9fe..130b08e72670 100644 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.cxx @@ -94,10 +94,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, com::sun::star::ucb::XContentProvider ); XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.GIOContentProvider" ), - rtl::OUString::createFromAscii( - "com.sun.star.ucb.GIOContentProvider" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.GIOContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.GIOContentProvider" )) ); ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); @@ -106,9 +106,9 @@ ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); static sal_Bool writeInfo( void *pRegistryKey, const rtl::OUString &rImplementationName, uno::Sequence< rtl::OUString > const &rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index 1cfbf45be180..e4b3624ac377 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -249,15 +249,15 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii("com.sun.star.comp.GnomeVFSContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.GnomeVFSContent")); } uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - "com.sun.star.ucb.GnomeVFSContent" ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.GnomeVFSContent" )); return aSNS; } @@ -269,9 +269,9 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) ) - return rtl::OUString::createFromAscii( GVFS_FOLDER_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FOLDER_TYPE )); else - return rtl::OUString::createFromAscii( GVFS_FILE_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FILE_TYPE )); } // @@ -281,7 +281,7 @@ rtl::OUString SAL_CALL Content::getContentType() uno::Any Content::getBadArgExcept() { return uno::makeAny( lang::IllegalArgumentException - ( rtl::OUString::createFromAscii( "Wrong argument type!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong argument type!")), static_cast< cppu::OWeakObject * >( this ), -1 ) ); } @@ -461,19 +461,19 @@ uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo( // Minimum set of props we really need uno::Sequence< beans::Property > props( 1 ); props[0] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); // file - seq[0].Type = rtl::OUString::createFromAscii( GVFS_FILE_TYPE ); + seq[0].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FILE_TYPE )); seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT ); seq[0].Properties = props; // folder - seq[1].Type = rtl::OUString::createFromAscii( GVFS_FOLDER_TYPE ); + seq[1].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FOLDER_TYPE )); seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; seq[1].Properties = props; @@ -517,7 +517,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) rtl::OUString aURL = getOUURI(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); name = create_document ? "[New_Content]" : "[New_Collection]"; // This looks problematic to me cf. webdav @@ -706,7 +706,7 @@ static lang::IllegalAccessException getReadOnlyException( Content *ctnt ) { return lang::IllegalAccessException - ( rtl::OUString::createFromAscii( "Property is read-only!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), static_cast< cppu::OWeakObject * >( ctnt ) ); } @@ -715,7 +715,7 @@ Content::makeNewURL( const char */*newName*/ ) { rtl::OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); char *name = gnome_vfs_escape_string( m_info.name ); aNewURL += GnomeToOUString( name ); @@ -810,7 +810,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( rValue.Value >>= aNewTitle ) { if ( aNewTitle.getLength() <= 0 ) aRet[ n ] <<= lang::IllegalArgumentException - ( rtl::OUString::createFromAscii( "Empty title not allowed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), static_cast< cppu::OWeakObject * >( this ), -1 ); else { char *newName = OUStringToGnome( aNewTitle ); @@ -820,7 +820,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( g_warning ("Set new name to '%s'", newName); #endif - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( GnomeToOUString( newInfo.name ) ); aEvent.NewValue = uno::makeAny( aNewTitle ); aChanges.getArray()[ nChanged ] = aEvent; @@ -833,7 +833,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } } else aRet[ n ] <<= beans::IllegalTypeException - ( rtl::OUString::createFromAscii( "Property value has wrong type!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) || @@ -870,7 +870,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aGuard.clear(); if (!exchangeIdentity( xNewId ) ) aRet[ nTitlePos ] <<= uno::Exception - ( rtl::OUString::createFromAscii( "Exchange failed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -899,7 +899,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Int32 nLen = aURL.getLength(); @@ -1034,7 +1034,7 @@ void Content::transfer(const ucb::TransferInfo & /*rArgs*/, ucbhelper::cancelCommandExecution ( uno::makeAny ( ucb::InteractiveBadTransferURLException - ( rtl::OUString::createFromAscii( "Unsupported URL scheme!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported URL scheme!")), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); } @@ -1188,7 +1188,7 @@ uno::Any Content::mapVFSException( const GnomeVFSResult result, sal_Bool bWrite aArgs[ 0 ] <<= m_xIdentifier->getContentIdentifier(); aException <<= ucb::InteractiveAugmentedIOException - ( rtl::OUString::createFromAscii( "Not found!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not found!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx index c6e08f65f1ac..d1d8d6663ae1 100644 --- a/ucb/source/ucp/gvfs/gvfs_directory.cxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.cxx @@ -175,7 +175,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) escaped_name = gnome_vfs_escape_string( m_pImpl->m_aResults[ nIndex ]->aInfo.name ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += rtl::OUString::createFromAscii( escaped_name ); diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx b/ucb/source/ucp/gvfs/gvfs_provider.cxx index f192b9528d2b..203235b591fc 100644 --- a/ucb/source/ucp/gvfs/gvfs_provider.cxx +++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx @@ -86,10 +86,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.GnomeVFSContentProvider" ), - rtl::OUString::createFromAscii( - "com.sun.star.ucb.GnomeVFSContentProvider" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.GnomeVFSContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.GnomeVFSContentProvider" )) ); //========================================================================= // // Service factory implementation. @@ -151,9 +151,9 @@ writeInfo( void *pRegistryKey, const rtl::OUString &rImplementationName, uno::Sequence< rtl::OUString > const &rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try { diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index e9c5546dc496..583c558a007e 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -304,8 +304,8 @@ uno::Sequence< uno::Type > SAL_CALL HierarchyContent::getTypes() rtl::OUString SAL_CALL HierarchyContent::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.HierarchyContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.HierarchyContent" )); } //========================================================================= @@ -317,14 +317,14 @@ HierarchyContent::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_eKind == LINK ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - HIERARCHY_LINK_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_LINK_CONTENT_SERVICE_NAME )); else if ( m_eKind == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - HIERARCHY_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_FOLDER_CONTENT_SERVICE_NAME )); else - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME )); return aSNS; } @@ -387,8 +387,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -409,8 +409,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -421,8 +421,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -461,8 +461,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -487,8 +487,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -529,8 +529,8 @@ uno::Any SAL_CALL HierarchyContent::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -553,8 +553,8 @@ uno::Any SAL_CALL HierarchyContent::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -578,8 +578,8 @@ uno::Any SAL_CALL HierarchyContent::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -655,12 +655,12 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info ) "HierarchyContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( bCreateFolder ) - aURL += rtl::OUString::createFromAscii( "New_Folder" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); else - aURL += rtl::OUString::createFromAscii( "New_Link" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Link")); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -822,7 +822,7 @@ HierarchyContent::makeNewIdentifier( const rtl::OUString& rTitle ) // Assemble new content identifier... HierarchyUri aUri( m_xIdentifier->getContentIdentifier() ); rtl::OUString aNewURL = aUri.getParentUri(); - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += ::ucb_impl::urihelper::encodeSegment( rTitle ); return uno::Reference< ucb::XContentIdentifier >( @@ -848,7 +848,7 @@ void HierarchyContent::queryChildren( HierarchyContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -1062,28 +1062,28 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getContentType() ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // @@@ Might actually be read-only! beans::PropertyAttribute::BOUND ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1092,7 +1092,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( if ( rData.getIsDocument() ) xRow->appendString( - beans::Property( rtl::OUString::createFromAscii( "TargetURL" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), @@ -1101,7 +1101,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( rData.getTargetURL() ); xRow->appendObject( beans::Property( - rtl::OUString::createFromAscii( "CreatableContentsInfo" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -1172,8 +1172,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1181,8 +1181,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1190,8 +1190,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1199,8 +1199,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1209,8 +1209,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( isReadOnly() ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1245,8 +1245,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1254,8 +1254,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1266,8 +1266,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( isReadOnly() ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1299,8 +1299,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty target URL not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty target URL not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1308,16 +1308,16 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "TargetURL only supported by links!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "TargetURL only supported by links!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1371,8 +1371,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1406,14 +1406,14 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aOldTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1441,8 +1441,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1470,8 +1470,8 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not supported by root folder!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not supported by root folder!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1481,7 +1481,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( m_aProps.getTitle().getLength() == 0 ) { uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "Title" ); + aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -1529,7 +1529,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, do { rtl::OUString aNewId = xId->getContentIdentifier(); - aNewId += rtl::OUString::createFromAscii( "_" ); + aNewId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); aNewId += rtl::OUString::valueOf( ++nTry ); xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewId ); } @@ -1540,8 +1540,8 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1550,7 +1550,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, else { rtl::OUString aNewTitle( m_aProps.getTitle() ); - aNewTitle += rtl::OUString::createFromAscii( "_" ); + aNewTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); aNewTitle += rtl::OUString::valueOf( nTry ); m_aProps.setTitle( aNewTitle ); } @@ -1593,7 +1593,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1624,8 +1624,8 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1636,8 +1636,8 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not supported by root folder!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not supported by root folder!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1679,8 +1679,8 @@ void HierarchyContent::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1706,7 +1706,7 @@ void HierarchyContent::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -1725,8 +1725,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -1766,8 +1766,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate source object!" )), this ); // Unreachable } @@ -1777,8 +1777,8 @@ void HierarchyContent::transfer( ////////////////////////////////////////////////////////////////////// rtl::OUString aType = xSource->isFolder() - ? rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ); + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )); ucb::ContentInfo aContentInfo; aContentInfo.Type = aType; aContentInfo.Attributes = 0; @@ -1801,8 +1801,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "XContentCreator::createNewContent failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "XContentCreator::createNewContent failed!" )), this ); // Unreachable } @@ -1896,7 +1896,7 @@ void HierarchyContent::transfer( rtl::OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += rtl::OUString::createFromAscii( "/" ); + aChildId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aChildId += rResult.getName(); @@ -1936,8 +1936,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } @@ -1964,13 +1964,13 @@ HierarchyContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; uno::Sequence< beans::Property > aFolderProps( 1 ); aFolderProps.getArray()[ 0 ] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -1978,18 +1978,18 @@ HierarchyContentProperties::getCreatableContentsInfo() const // Link. aSeq.getArray()[ 1 ].Type - = rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_LINK; uno::Sequence< beans::Property > aLinkProps( 2 ); aLinkProps.getArray()[ 0 ] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); aLinkProps.getArray()[ 1 ] = beans::Property( - rtl::OUString::createFromAscii( "TargetURL" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index d082ee858533..9a1f49b9573d 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx @@ -71,14 +71,14 @@ public: HierarchyContentProperties( const HierarchyEntryData::Type & rType ) : m_aData( rType ), m_aContentType( rType == HierarchyEntryData::FOLDER - ? rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ) ) {} + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )) ) {} HierarchyContentProperties( const HierarchyEntryData & rData ) : m_aData( rData ), m_aContentType( rData.getType() == HierarchyEntryData::FOLDER - ? rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ) ) {} + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )) ) {} const rtl::OUString & getName() const { return m_aData.getName(); } void setName( const rtl::OUString & rName ) { m_aData.setName( rName ); }; diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 4957d94b29a5..4b8983e9e918 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -181,7 +181,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) if ( xRootReadAccess.is() ) { rtl::OUString aTitlePath = m_aPath; - aTitlePath += rtl::OUString::createFromAscii( "/Title" ); + aTitlePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Title")); // Note: Avoid NoSuchElementExceptions, because exceptions are // relatively 'expensive'. Checking for availability of @@ -206,7 +206,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) // Get TargetURL value. rtl::OUString aTargetURLPath = m_aPath; - aTargetURLPath += rtl::OUString::createFromAscii( "/TargetURL" ); + aTargetURLPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/TargetURL")); if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath ) >>= aValue ) ) { @@ -226,7 +226,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) rData.setTargetURL( aValue ); rtl::OUString aTypePath = m_aPath; - aTypePath += rtl::OUString::createFromAscii( "/Type" ); + aTypePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Type")); if ( xRootReadAccess->hasByHierarchicalName( aTypePath ) ) { // Might not be present since it was introduced long after @@ -349,7 +349,7 @@ sal_Bool HierarchyEntry::setData( else { xParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xNameAccess; } @@ -397,8 +397,8 @@ sal_Bool HierarchyEntry::setData( // Append new entry to parents child list, // which is a set of entries. xParentNameAccess->getByName( - rtl::OUString::createFromAscii( - "Children" ) ) >>= xFac; + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Children" )) ) >>= xFac; } OSL_ENSURE( xFac.is(), @@ -429,7 +429,7 @@ sal_Bool HierarchyEntry::setData( { // Set Title value. xNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), uno::makeAny( rData.getTitle() ) ); // Set TargetURL value. @@ -445,14 +445,14 @@ sal_Bool HierarchyEntry::setData( = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNameReplace->replaceByName( - rtl::OUString::createFromAscii( "TargetURL" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), uno::makeAny( aValue ) ); // Set Type value. sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Type" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), uno::makeAny( nType ) ); if ( xContainer.is() ) @@ -667,7 +667,7 @@ sal_Bool HierarchyEntry::move( else { xOldParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xOldNameContainer; } @@ -749,7 +749,7 @@ sal_Bool HierarchyEntry::move( else { xNewParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xNewNameContainer; } } @@ -760,7 +760,7 @@ sal_Bool HierarchyEntry::move( return sal_False; xNewNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), uno::makeAny( rData.getTitle() ) ); // TargetURL property may contain a reference to the Office @@ -772,11 +772,11 @@ sal_Bool HierarchyEntry::move( if ( m_xOfficeInstDirs.is() && ( aValue.getLength() > 0 ) ) aValue = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNewNameReplace->replaceByName( - rtl::OUString::createFromAscii( "TargetURL" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), uno::makeAny( aValue ) ); sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNewNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Type" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), uno::makeAny( nType ) ); xNewNameContainer->insertByName( aNewKey, aEntry ); @@ -892,7 +892,7 @@ sal_Bool HierarchyEntry::remove() // Append new entry to parents child list, // which is a set of entries. xParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xContainer; } @@ -960,7 +960,7 @@ sal_Bool HierarchyEntry::first( iterator& it ) if ( m_aPath.getLength() > 0 ) { rtl::OUString aPath = m_aPath; - aPath += rtl::OUString::createFromAscii( "/Children" ); + aPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Children")); xRootHierNameAccess->getByHierarchicalName( aPath ) >>= xNameAccess; @@ -1172,9 +1172,9 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const rtl::OUString aTargetURL = aTitle; rtl::OUString aType = aTitle; - aTitle += rtl::OUString::createFromAscii( "/Title" ); - aTargetURL += rtl::OUString::createFromAscii( "/TargetURL" ); - aType += rtl::OUString::createFromAscii( "/Type" ); + aTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Title")); + aTargetURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/TargetURL")); + aType += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Type")); rtl::OUString aValue; m_pImpl->dir->getByHierarchicalName( aTitle ) >>= aValue; diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index 9cb3f236d955..318b884b7cf1 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -268,14 +268,14 @@ XTYPEPROVIDER_IMPL_4( HierarchyDataSource, //========================================================================= XSERVICEINFO_IMPL_0( HierarchyDataSource, - rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.HierarchyDataSource" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.HierarchyDataSource" )) ) { uno::Sequence< rtl::OUString > aSNS( 2 ); - aSNS[ 0 ] = rtl::OUString::createFromAscii( - "com.sun.star.ucb.DefaultHierarchyDataSource" ); - aSNS[ 1 ] = rtl::OUString::createFromAscii( - "com.sun.star.ucb.HierarchyDataSource" ); + aSNS[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.DefaultHierarchyDataSource" )); + aSNS[ 1 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.HierarchyDataSource" )); return aSNS; } diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx index 32c19589d5d8..25bd6ef03e6e 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx @@ -163,7 +163,7 @@ rtl::OUString HierarchyResultSetDataSupplier::queryContentIdentifierString( = m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += m_pImpl->m_aResults[ nIndex ]->aData.getName(); @@ -370,9 +370,9 @@ HierarchyResultSetDataSupplier::queryPropertyValues( sal_uInt32 nIndex ) if ( getResult( nIndex ) ) { static rtl::OUString aFolderType( - rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) ); + RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE ) ); static rtl::OUString aLinkType( - rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ) ); + RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE ) ); HierarchyContentProperties aData( m_pImpl->m_aResults[ nIndex ]->aData ); diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index 1e5fdbfc3e79..2a594a0de784 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -102,10 +102,10 @@ XTYPEPROVIDER_IMPL_4( HierarchyContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( HierarchyContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.HierarchyContentProvider" ), - rtl::OUString::createFromAscii( - HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.HierarchyContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // diff --git a/ucb/source/ucp/hierarchy/hierarchyservices.cxx b/ucb/source/ucp/hierarchy/hierarchyservices.cxx index 21f594dcd6b8..f9cb6387c3f6 100644 --- a/ucb/source/ucp/hierarchy/hierarchyservices.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyservices.cxx @@ -42,9 +42,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, uno::Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx index 71fcb4660503..45d2bac0e9ac 100644 --- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx @@ -67,7 +67,7 @@ void HierarchyUri::init() const if ( ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 ) ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } @@ -139,17 +139,17 @@ void HierarchyUri::init() const if ( nStart == m_aUri.getLength() ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } // Empty path segments? if ( m_aUri.indexOf( - rtl::OUString::createFromAscii( "//" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("//")), nStart ) != -1 ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } @@ -159,7 +159,7 @@ void HierarchyUri::init() const if ( nEnd == nStart ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } @@ -167,7 +167,7 @@ void HierarchyUri::init() const { // Trailing slash missing. nEnd = m_aUri.getLength(); - m_aUri += rtl::OUString::createFromAscii( "/" ); + m_aUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } m_aService = m_aUri.copy( nStart, nEnd - nStart ); @@ -203,7 +203,7 @@ void HierarchyUri::init() const else { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } } } diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index f1cd571dd10f..4ac96ab5b4b3 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -179,7 +179,7 @@ rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! - return rtl::OUString::createFromAscii( "com.sun.star.comp.odma.Content" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.odma.Content")); } //========================================================================= @@ -190,7 +190,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() // @@@ Adjust macro name. uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( ODMA_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODMA_CONTENT_SERVICE_NAME )); return aSNS; } @@ -205,7 +205,7 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { // @@@ Adjust macro name ( def in odma_provider.hxx ). - return rtl::OUString::createFromAscii( ODMA_CONTENT_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODMA_CONTENT_TYPE )); } //========================================================================= @@ -702,27 +702,27 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_sContentType ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sTitle ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_bIsDocument ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -731,40 +731,40 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // @@@ Append other properties supported directly. xRow->appendTimestamp( - beans::Property( rtl::OUString::createFromAscii( "DateCreated" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")), -1, getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateCreated ); xRow->appendTimestamp( - beans::Property( rtl::OUString::createFromAscii( "DateModified" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")), -1, getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateModified ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsReadOnly" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_bIsReadOnly ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Author" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Author")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sAuthor ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Subject" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Subject")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sSubject ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Keywords" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Keywords")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), @@ -921,8 +921,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -955,7 +955,7 @@ void Content::insert( OSL_ENSURE( sal_False, "Content::insert - property value missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "zzzz" ); + aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zzzz")); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -1076,8 +1076,8 @@ void Content::changePropertyValue(const beans::PropertyValue& _rValue, if(bError) { _rRet[ _rnCurrentPos ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index 84c7038108b0..a5fb562a796e 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx @@ -151,8 +151,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! // @@@ Adjust service name. XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.odma.ContentProvider" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.odma.ContentProvider" )), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_PROVIDER_SERVICE_NAME) ) ); //========================================================================= diff --git a/ucb/source/ucp/odma/odma_services.cxx b/ucb/source/ucp/odma/odma_services.cxx index e6c56c759609..7720623fd961 100644 --- a/ucb/source/ucp/odma/odma_services.cxx +++ b/ucb/source/ucp/odma/odma_services.cxx @@ -43,9 +43,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); Reference< XRegistryKey > xKey; try diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 349d613a470b..e501dd09fde1 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -124,7 +124,7 @@ ContentProperties::getCreatableContentsInfo( PackageUri const & rUri ) const { uno::Sequence< beans::Property > aProps( 1 ); aProps.getArray()[ 0 ] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -246,11 +246,11 @@ Content* Content::create( ::rtl::OUString Content::getContentType( const ::rtl::OUString& aScheme, sal_Bool bFolder ) { - return ( rtl::OUString::createFromAscii( "application/" ) + return ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/")) + aScheme + ( bFolder - ? rtl::OUString::createFromAscii( "-folder" ) - : rtl::OUString::createFromAscii( "-stream" ) ) ); + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-folder")) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-stream")) ) ); } //========================================================================= @@ -424,8 +424,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.PackageContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PackageContent" )); } //========================================================================= @@ -436,12 +436,12 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( isFolder() ) aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( - PACKAGE_FOLDER_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + PACKAGE_FOLDER_CONTENT_SERVICE_NAME )); else aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( - PACKAGE_STREAM_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + PACKAGE_STREAM_CONTENT_SERVICE_NAME )); return aSNS; } @@ -488,8 +488,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -510,8 +510,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -522,8 +522,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -564,8 +564,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -587,8 +587,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -628,8 +628,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -650,8 +650,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -675,8 +675,8 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -708,8 +708,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot write file to disk!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot write file to disk!" )), this ); // Unreachable } @@ -774,13 +774,13 @@ Content::createNewContent( const ucb::ContentInfo& Info ) return uno::Reference< ucb::XContent >(); rtl::OUString aURL = m_aUri.getUri(); - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( Info.Type.equalsIgnoreAsciiCase( getContentType( m_aUri.getScheme(), sal_True ) ) ) - aURL += rtl::OUString::createFromAscii( "New_Folder" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); else - aURL += rtl::OUString::createFromAscii( "New_Stream" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream")); uno::Reference< ucb::XContentIdentifier > xId( new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ) ); @@ -979,7 +979,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Append all Core Properties. xRow->appendString ( beans::Property( - rtl::OUString::createFromAscii( "ContentType" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -987,14 +987,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.aContentType ); xRow->appendString( beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData.aTitle ); xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "IsDocument" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1002,7 +1002,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.bIsDocument ); xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "IsFolder" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1010,7 +1010,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.bIsFolder ); xRow->appendObject( beans::Property( - rtl::OUString::createFromAscii( "CreatableContentsInfo" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -1020,7 +1020,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.getCreatableContentsInfo( PackageUri( rContentId ) ) ) ); xRow->appendString( beans::Property( - rtl::OUString::createFromAscii( "MediaType" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), @@ -1031,7 +1031,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { xRow->appendLong( beans::Property( - rtl::OUString::createFromAscii( "Size" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")), -1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -1040,7 +1040,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "Compressed" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND ), @@ -1048,7 +1048,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "Encrypted" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND ), @@ -1061,7 +1061,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "HasEncryptedEntries" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasEncryptedEntries")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1133,8 +1133,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1142,8 +1142,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1151,8 +1151,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1160,8 +1160,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1171,8 +1171,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1201,8 +1201,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1211,8 +1211,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1238,8 +1238,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1248,8 +1248,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1276,16 +1276,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Compressed only supported by streams!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Compressed only supported by streams!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1313,16 +1313,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Encrypted only supported by streams!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Encrypted only supported by streams!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1331,8 +1331,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1364,16 +1364,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "EncryptionKey not supported by non-root folder!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "EncryptionKey not supported by non-root folder!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1426,8 +1426,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1439,7 +1439,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Assemble new content identifier... rtl::OUString aNewURL = m_aUri.getParentUri(); - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += ::ucb_impl::urihelper::encodeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL ); @@ -1462,14 +1462,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aNewTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( m_aProps.aTitle ); aEvent.NewValue = uno::makeAny( aNewTitle ); @@ -1500,8 +1500,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1577,7 +1577,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Got no data stream!")), this ); // Unreachable } @@ -1638,8 +1638,8 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1706,7 +1706,7 @@ void Content::insert( rtl::OUString aNewURL = m_aUri.getParentUri(); if (1 + aNewURL.lastIndexOf('/') != aNewURL.getLength()) - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += ::ucb_impl::urihelper::encodeSegment( m_aProps.aTitle ); PackageUri aNewUri( aNewURL ); @@ -1741,7 +1741,7 @@ void Content::insert( do { rtl::OUString aNew = aNewUri.getUri(); - aNew += rtl::OUString::createFromAscii( "_" ); + aNew += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); aNew += rtl::OUString::valueOf( ++nTry ); aNewUri.setUri( aNew ); } @@ -1752,8 +1752,8 @@ void Content::insert( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1761,7 +1761,7 @@ void Content::insert( } else { - m_aProps.aTitle += rtl::OUString::createFromAscii( "_" ); + m_aProps.aTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); m_aProps.aTitle += rtl::OUString::valueOf( nTry ); } } @@ -1807,7 +1807,7 @@ void Content::insert( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1845,8 +1845,8 @@ void Content::destroy( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1888,8 +1888,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1910,7 +1910,7 @@ void Content::transfer( // Is source not a parent of me / not me? rtl::OUString aId = m_aUri.getParentUri(); - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( rInfo.SourceURL.getLength() <= aId.getLength() ) { @@ -1928,8 +1928,8 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -1969,8 +1969,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate source object!" )), this ); // Unreachable } @@ -2003,8 +2003,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "XContentCreator::createNewContent failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "XContentCreator::createNewContent failed!" )), this ); // Unreachable } @@ -2119,7 +2119,7 @@ void Content::transfer( rtl::OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += rtl::OUString::createFromAscii( "/" ); + aChildId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aChildId += ::ucb_impl::urihelper::encodeSegment( aName ); @@ -2167,8 +2167,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } @@ -2267,7 +2267,7 @@ void Content::queryChildren( ContentRefList& rChildren ) OSL_ENSURE( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ), "Content::queryChildren - Invalid URL!" ); - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Int32 nLen = aURL.getLength(); @@ -2381,8 +2381,8 @@ sal_Bool Content::loadData( { uno::Any aHasEncryptedEntries = xPackagePropSet->getPropertyValue( - rtl::OUString::createFromAscii( - "HasEncryptedEntries" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "HasEncryptedEntries" )) ); if ( !( aHasEncryptedEntries >>= rProps.bHasEncryptedEntries ) ) { OSL_ENSURE( sal_False, @@ -2434,7 +2434,7 @@ sal_Bool Content::loadData( { uno::Any aMediaType = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "MediaType" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); if ( !( aMediaType >>= rProps.aMediaType ) ) { OSL_ENSURE( sal_False, @@ -2481,7 +2481,7 @@ sal_Bool Content::loadData( { uno::Any aSize = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "Size" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ); if ( !( aSize >>= rProps.nSize ) ) { OSL_ENSURE( sal_False, @@ -2507,7 +2507,7 @@ sal_Bool Content::loadData( { uno::Any aCompressed = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "Compressed" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")) ); if ( !( aCompressed >>= rProps.bCompressed ) ) { OSL_ENSURE( sal_False, @@ -2533,7 +2533,7 @@ sal_Bool Content::loadData( { uno::Any aEncrypted = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "Encrypted" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")) ); if ( !( aEncrypted >>= rProps.bEncrypted ) ) { OSL_ENSURE( sal_False, @@ -2635,7 +2635,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) try { xPackagePropSet->setPropertyValue( - rtl::OUString::createFromAscii( "EncryptionKey" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), uno::makeAny( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; } @@ -2768,7 +2768,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( m_nModifiedProps & MEDIATYPE_MODIFIED ) { xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "MediaType" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny( m_aProps.aMediaType ) ); m_nModifiedProps &= ~MEDIATYPE_MODIFIED; } @@ -2777,7 +2777,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "Compressed" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny( m_aProps.bCompressed ) ); m_nModifiedProps &= ~COMPRESSED_MODIFIED; @@ -2787,7 +2787,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "Encrypted" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")), uno::makeAny( m_aProps.bEncrypted ) ); m_nModifiedProps &= ~ENCRYPTED_MODIFIED; @@ -2797,7 +2797,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "EncryptionKey" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), uno::makeAny( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index 1d84f871b695..7f0dab5fc936 100644 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.cxx @@ -478,7 +478,7 @@ void DataSupplier::validate() sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += ::ucb_impl::urihelper::encodeSegment( aName ); aURL += aContURL.copy( nParam ); @@ -489,7 +489,7 @@ void DataSupplier::validate() sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += ::ucb_impl::urihelper::encodeSegment( aName ); } diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index 4392861fe0a0..906da6c080e0 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -183,10 +183,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.PackageContentProvider" ), - rtl::OUString::createFromAscii( - PACKAGE_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PackageContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + PACKAGE_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // @@ -278,8 +278,8 @@ ContentProvider::createPackage( const rtl::OUString & rName, const rtl::OUString uno::Reference< uno::XInterface > xIfc = m_xSMgr->createInstanceWithArguments( - rtl::OUString::createFromAscii( - "com.sun.star.packages.comp.ZipPackage" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.packages.comp.ZipPackage" )), aArguments ); if ( xIfc.is() ) diff --git a/ucb/source/ucp/package/pkgservices.cxx b/ucb/source/ucp/package/pkgservices.cxx index 9809eda95b3c..737dc78c7091 100644 --- a/ucb/source/ucp/package/pkgservices.cxx +++ b/ucb/source/ucp/package/pkgservices.cxx @@ -43,9 +43,9 @@ sal_Bool writeInfo( const rtl::OUString & rImplementationName, uno::Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 2a50f8d051b3..1c0634b79acf 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -319,8 +319,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.TransientDocumentsContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.TransientDocumentsContent" )); } //========================================================================= @@ -333,17 +333,17 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_aProps.getType() == STREAM ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_STREAM_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_STREAM_CONTENT_SERVICE_NAME )); else if ( m_aProps.getType() == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_FOLDER_CONTENT_SERVICE_NAME )); else if ( m_aProps.getType() == DOCUMENT ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_DOCUMENT_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_DOCUMENT_CONTENT_SERVICE_NAME )); else - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_ROOT_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_ROOT_CONTENT_SERVICE_NAME )); return aSNS; } @@ -410,8 +410,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -432,8 +432,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -444,8 +444,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -484,8 +484,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -541,8 +541,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -600,8 +600,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -641,8 +641,8 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -684,8 +684,8 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -774,12 +774,12 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "Content::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( bCreateFolder ) - aURL += rtl::OUString::createFromAscii( "New_Folder" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); else - aURL += rtl::OUString::createFromAscii( "New_Stream" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream")); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -842,7 +842,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -1104,7 +1104,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -1114,7 +1114,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ContentType eType = rData.getType(); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // Title is read-only for root and documents. @@ -1124,14 +1124,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( : 0 ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1139,7 +1139,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.getIsFolder() ); xRow->appendObject( beans::Property( - rtl::OUString::createFromAscii( "CreatableContentsInfo" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -1150,7 +1150,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Storage is only supported by folders. if ( eType == FOLDER ) xRow->appendObject( - beans::Property( rtl::OUString::createFromAscii( "Storage" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage")), -1, getCppuType( static_cast< @@ -1162,7 +1162,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // DocumentModel is only supported by documents. if ( eType == DOCUMENT ) xRow->appendObject( - beans::Property( rtl::OUString::createFromAscii( "DocumentModel" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentModel")), -1, getCppuType( static_cast< @@ -1234,8 +1234,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1243,8 +1243,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1252,8 +1252,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1261,8 +1261,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1273,8 +1273,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1304,8 +1304,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty Title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty Title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1313,8 +1313,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Title Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Title Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1326,16 +1326,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == FOLDER ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Storage property only supported by folders" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Storage property only supported by folders" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1346,17 +1346,17 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == DOCUMENT ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentModel property only supported by " - "documents" ), + "documents" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1409,8 +1409,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1442,14 +1442,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aOldTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1477,8 +1477,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1558,8 +1558,8 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1594,7 +1594,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Got no data stream!")), this ); // Unreachable } @@ -1656,8 +1656,8 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1785,8 +1785,8 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1842,7 +1842,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1880,8 +1880,8 @@ void Content::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2022,8 +2022,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2063,8 +2063,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Invalid source URI! Syntax!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Invalid source URI! Syntax!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2075,9 +2075,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " - "Must describe a folder or stream!" ), + "Must describe a folder or stream!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2090,7 +2090,7 @@ void Content::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -2109,8 +2109,8 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -2132,10 +2132,10 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " "Streams cannot be created as " - "children of document root!" ), + "children of document root!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -2162,9 +2162,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " - "Unabale to determine source type!" ), + "Unabale to determine source type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2207,7 +2207,7 @@ void Content::transfer( rtl::OUString aTargetUri = m_xIdentifier->getContentIdentifier(); if ( ( aTargetUri.lastIndexOf( '/' ) + 1 ) != aTargetUri.getLength() ) - aTargetUri += rtl::OUString::createFromAscii( "/" ); + aTargetUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( rInfo.NewTitle.getLength() > 0 ) aTargetUri += ::ucb_impl::urihelper::encodeSegment( rInfo.NewTitle ); @@ -2270,8 +2270,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate target object!" )), this ); // Unreachable } @@ -2315,8 +2315,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate target object!" )), this ); // Unreachable } @@ -2339,8 +2339,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } @@ -2360,8 +2360,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove additional properties of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove additional properties of source object!" )), this ); // Unreachable } @@ -3067,7 +3067,7 @@ ContentProperties::getCreatableContentsInfo() const { uno::Sequence< beans::Property > aProps( 1 ); aProps.getArray()[ 0 ] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -3080,7 +3080,7 @@ ContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( TDOC_FOLDER_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; aSeq.getArray()[ 0 ].Properties = aProps; @@ -3094,14 +3094,14 @@ ContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( TDOC_FOLDER_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; aSeq.getArray()[ 0 ].Properties = aProps; // Stream. aSeq.getArray()[ 1 ].Type - = rtl::OUString::createFromAscii( TDOC_STREAM_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_STREAM_CONTENT_TYPE )); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT; diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 17bcd643fadc..39792a372789 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx @@ -72,12 +72,12 @@ public: ContentProperties( const ContentType & rType, const rtl::OUString & rTitle ) : m_eType( rType ), m_aContentType( rType == STREAM - ? rtl::OUString::createFromAscii( TDOC_STREAM_CONTENT_TYPE ) + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_STREAM_CONTENT_TYPE )) : rType == FOLDER - ? rtl::OUString::createFromAscii( TDOC_FOLDER_CONTENT_TYPE ) + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )) : rType == DOCUMENT - ? rtl::OUString::createFromAscii( TDOC_DOCUMENT_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( TDOC_ROOT_CONTENT_TYPE ) ), + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_DOCUMENT_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_ROOT_CONTENT_TYPE )) ), m_aTitle( rTitle ) {} diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index 2d5236b77017..332b3753dbc1 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx @@ -462,7 +462,7 @@ ResultSetDataSupplier::assembleChildURL( const ::rtl::OUString& aName ) sal_Int32 nUrlEnd = aURL.lastIndexOf( '/' ); if ( nUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += aName; return aURL; diff --git a/ucb/source/ucp/tdoc/tdoc_services.cxx b/ucb/source/ucp/tdoc/tdoc_services.cxx index 12d7c210f154..230b0f74792f 100644 --- a/ucb/source/ucp/tdoc/tdoc_services.cxx +++ b/ucb/source/ucp/tdoc/tdoc_services.cxx @@ -44,9 +44,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, uno::Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx index 32524a1813ec..3205a3a590f4 100644 --- a/ucb/source/ucp/tdoc/tdoc_uri.cxx +++ b/ucb/source/ucp/tdoc/tdoc_uri.cxx @@ -128,7 +128,7 @@ void Uri::init() const if ( nSlash != - 1 ) m_aInternalPath = m_aPath.copy( nSlash ); else - m_aInternalPath = rtl::OUString::createFromAscii( "/" ); + m_aInternalPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } m_eState = VALID; diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 4db694f433f4..c026a2150774 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -105,13 +105,13 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) NeonUri aURI( rResource.uri ); m_aEscapedTitle = aURI.GetPathBaseName(); - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true ); } catch ( DAVException const & ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( rtl::OUString( @@ -141,11 +141,11 @@ ContentProperties::ContentProperties( : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( rTitle ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsDocument" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); } @@ -154,7 +154,7 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle ) : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( rTitle ), true ); } @@ -346,19 +346,19 @@ void ContentProperties::UCBNamesToHTTPNames( RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Last-Modified" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Last-Modified")) ); } else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Content-Type" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Type")) ); } else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Content-Length" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Length")) ); } else { @@ -465,7 +465,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateCreated" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")) ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::DISPLAYNAME ) ) @@ -480,7 +480,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rtl::OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName.equalsAsciiL( @@ -493,13 +493,13 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rtl::OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName.equals( DAVProperties::GETCONTENTTYPE ) ) { // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] = PropertyValue( rValue, true ); } else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Type" ) ) ) @@ -508,7 +508,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // Only DAV resources have this property. // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] = PropertyValue( rValue, true ); } // else if ( rName.equals( DAVProperties::GETETAG ) ) @@ -522,7 +522,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateModified" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] = PropertyValue( uno::makeAny( aDate ), true ); } else if ( rName.equalsAsciiL( @@ -537,7 +537,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateModified" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) ) @@ -553,14 +553,14 @@ void ContentProperties::addProperty( const rtl::OUString & rName, aValue.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "collection" ) ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsDocument" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "ContentType" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")) ] = PropertyValue( uno::makeAny( bFolder - ? rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ) - : rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ) ), true ); + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )) ), true ); } // else if ( rName.equals( DAVProperties::SOURCE ) ) // { diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 2ee9983b7380..0562ef0b91e1 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -34,32 +34,19 @@ using namespace webdav_ucp; -const ::rtl::OUString DAVProperties::CREATIONDATE = - ::rtl::OUString::createFromAscii( "DAV:creationdate" ); -const ::rtl::OUString DAVProperties::DISPLAYNAME = - ::rtl::OUString::createFromAscii( "DAV:displayname" ); -const ::rtl::OUString DAVProperties::GETCONTENTLANGUAGE = - ::rtl::OUString::createFromAscii( "DAV:getcontentlanguage" ); -const ::rtl::OUString DAVProperties::GETCONTENTLENGTH = - ::rtl::OUString::createFromAscii( "DAV:getcontentlength" ); -const ::rtl::OUString DAVProperties::GETCONTENTTYPE = - ::rtl::OUString::createFromAscii( "DAV:getcontenttype" ); -const ::rtl::OUString DAVProperties::GETETAG = - ::rtl::OUString::createFromAscii( "DAV:getetag" ); -const ::rtl::OUString DAVProperties::GETLASTMODIFIED = - ::rtl::OUString::createFromAscii( "DAV:getlastmodified" ); -const ::rtl::OUString DAVProperties::LOCKDISCOVERY = - ::rtl::OUString::createFromAscii( "DAV:lockdiscovery" ); -const ::rtl::OUString DAVProperties::RESOURCETYPE = - ::rtl::OUString::createFromAscii( "DAV:resourcetype" ); -const ::rtl::OUString DAVProperties::SOURCE = - ::rtl::OUString::createFromAscii( "DAV:source" ); -const ::rtl::OUString DAVProperties::SUPPORTEDLOCK = - ::rtl::OUString::createFromAscii( "DAV:supportedlock" ); - -const ::rtl::OUString DAVProperties::EXECUTABLE = - ::rtl::OUString::createFromAscii( - "http://apache.org/dav/props/executable" ); +const ::rtl::OUString DAVProperties::CREATIONDATE(RTL_CONSTASCII_USTRINGPARAM("DAV:creationdate")); +const ::rtl::OUString DAVProperties::DISPLAYNAME(RTL_CONSTASCII_USTRINGPARAM("DAV:displayname")); +const ::rtl::OUString DAVProperties::GETCONTENTLANGUAGE(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontentlanguage")); +const ::rtl::OUString DAVProperties::GETCONTENTLENGTH(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontentlength")); +const ::rtl::OUString DAVProperties::GETCONTENTTYPE(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontenttype")); +const ::rtl::OUString DAVProperties::GETETAG(RTL_CONSTASCII_USTRINGPARAM("DAV:getetag")); +const ::rtl::OUString DAVProperties::GETLASTMODIFIED(RTL_CONSTASCII_USTRINGPARAM("DAV:getlastmodified")); +const ::rtl::OUString DAVProperties::LOCKDISCOVERY(RTL_CONSTASCII_USTRINGPARAM("DAV:lockdiscovery")); +const ::rtl::OUString DAVProperties::RESOURCETYPE(RTL_CONSTASCII_USTRINGPARAM("DAV:resourcetype")); +const ::rtl::OUString DAVProperties::SOURCE(RTL_CONSTASCII_USTRINGPARAM("DAV:source")); +const ::rtl::OUString DAVProperties::SUPPORTEDLOCK(RTL_CONSTASCII_USTRINGPARAM("DAV:supportedlock")); + +const ::rtl::OUString DAVProperties::EXECUTABLE(RTL_CONSTASCII_USTRINGPARAM("http://apache.org/dav/props/executable")); // ------------------------------------------------------------------- // static @@ -181,11 +168,11 @@ void DAVProperties::createUCBPropName( const char * nspace, else { // Create property name that encodes, namespace and name ( XML ). - rFullName = rtl::OUString::createFromAscii( "<prop:" ); + rFullName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<prop:")); rFullName += aName; - rFullName += rtl::OUString::createFromAscii( " xmlns:prop=\"" ); + rFullName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " xmlns:prop=\"" )); rFullName += aNameSpace; - rFullName += rtl::OUString::createFromAscii( "\">" ); + rFullName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\">" )); } } diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 3267485af6f8..498c7fbed9f5 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -193,8 +193,8 @@ void DAVResourceAccess::OPTIONS( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( - "OPTIONS" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "OPTIONS" )), aHeaders ); m_xSession->OPTIONS( getRequestURI(), @@ -237,8 +237,8 @@ void DAVResourceAccess::PROPFIND( getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( - "PROPFIND" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "PROPFIND" )), aHeaders ); m_xSession->PROPFIND( getRequestURI(), @@ -280,8 +280,8 @@ void DAVResourceAccess::PROPFIND( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( - "PROPFIND" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "PROPFIND" )), aHeaders ); m_xSession->PROPFIND( getRequestURI(), @@ -321,8 +321,8 @@ void DAVResourceAccess::PROPPATCH( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( - "PROPPATCH" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "PROPPATCH" )), aHeaders ); m_xSession->PROPPATCH( getRequestURI(), @@ -362,7 +362,7 @@ void DAVResourceAccess::HEAD( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "HEAD" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HEAD")), aHeaders ); m_xSession->HEAD( getRequestURI(), @@ -402,7 +402,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "GET" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), aHeaders ); xStream = m_xSession->GET( getRequestURI(), @@ -443,7 +443,7 @@ void DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "GET" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), aHeaders ); m_xSession->GET( getRequestURI(), @@ -484,7 +484,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "GET" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), aHeaders ); xStream = m_xSession->GET( getRequestURI(), @@ -529,7 +529,7 @@ void DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "GET" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), aHeaders ); m_xSession->GET( getRequestURI(), @@ -616,7 +616,7 @@ void DAVResourceAccess::PUT( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "PUT" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PUT")), aHeaders ); m_xSession->PUT( getRequestURI(), @@ -668,7 +668,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "POST" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("POST")), aHeaders ); xStream = m_xSession->POST( getRequestURI(), @@ -731,7 +731,7 @@ void DAVResourceAccess::POST( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "POST" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("POST")), aHeaders ); m_xSession->POST( getRequestURI(), @@ -779,7 +779,7 @@ void DAVResourceAccess::MKCOL( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "MKCOL" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MKCOL")), aHeaders ); m_xSession->MKCOL( getRequestURI(), @@ -819,7 +819,7 @@ void DAVResourceAccess::COPY( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "COPY" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COPY")), aHeaders ); m_xSession->COPY( rSourcePath, @@ -861,7 +861,7 @@ void DAVResourceAccess::MOVE( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "MOVE" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MOVE")), aHeaders ); m_xSession->MOVE( rSourcePath, @@ -900,8 +900,8 @@ void DAVResourceAccess::DESTROY( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( - "DESTROY" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "DESTROY" )), aHeaders ); m_xSession->DESTROY( getRequestURI(), @@ -940,7 +940,7 @@ void DAVResourceAccess::LOCK( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "LOCK" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCK")), aHeaders ); m_xSession->LOCK( getRequestURI(), @@ -982,7 +982,7 @@ sal_Int64 DAVResourceAccess::LOCK( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "LOCK" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCK")), aHeaders ); nNewTimeout = m_xSession->LOCK( getRequestURI(), @@ -1024,7 +1024,7 @@ void DAVResourceAccess::UNLOCK( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString::createFromAscii( "UNLOCK" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNLOCK")), aHeaders ); m_xSession->UNLOCK( getRequestURI(), diff --git a/ucb/source/ucp/webdav/LinkSequence.cxx b/ucb/source/ucp/webdav/LinkSequence.cxx index 52dcda066a54..c638b3824a0e 100644 --- a/ucb/source/ucp/webdav/LinkSequence.cxx +++ b/ucb/source/ucp/webdav/LinkSequence.cxx @@ -204,9 +204,9 @@ bool LinkSequence::toXML( const uno::Sequence< ucb::Link > & rInData, sal_Int32 nCount = rInData.getLength(); if ( nCount ) { - rtl::OUString aPre( rtl::OUString::createFromAscii( "<link><src>" ) ); - rtl::OUString aMid( rtl::OUString::createFromAscii( "</src><dst>" ) ); - rtl::OUString aEnd( rtl::OUString::createFromAscii( "</dst></link>" ) ); + rtl::OUString aPre( RTL_CONSTASCII_USTRINGPARAM("<link><src>") ); + rtl::OUString aMid( RTL_CONSTASCII_USTRINGPARAM("</src><dst>") ); + rtl::OUString aEnd( RTL_CONSTASCII_USTRINGPARAM("</dst></link>") ); for ( sal_Int32 n = 0; n < nCount; ++n ) { diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index 5af0f432469b..807a255efcc3 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -143,7 +143,7 @@ extern "C" int NPFR_propfind_iter( void* userdata, RTL_CONSTASCII_STRINGPARAM( "<collection" ) ) == 0 ) { thePropertyValue.Value - <<= OUString::createFromAscii( "collection" ); + <<= OUString(RTL_CONSTASCII_USTRINGPARAM("collection")); } } diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 958b26dca153..eb87fc9c41ac 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -363,7 +363,7 @@ namespace { ::rtl::OUString GetHostnamePart( const ::rtl::OUString& _rRawString ) { ::rtl::OUString sPart; - ::rtl::OUString sPartId = ::rtl::OUString::createFromAscii( "CN=" ); + ::rtl::OUString sPartId(RTL_CONSTASCII_USTRINGPARAM("CN=")); sal_Int32 nContStart = _rRawString.indexOf( sPartId ); if ( nContStart != -1 ) { @@ -390,8 +390,8 @@ extern "C" int NeonSession_CertificationNotify( void *userdata, xCertificateContainer = uno::Reference< security::XCertificateContainer >( pSession->getMSF()->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.security.CertificateContainer" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.security.CertificateContainer" )) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -423,7 +423,7 @@ extern "C" int NeonSession_CertificationNotify( void *userdata, { xSEInitializer = uno::Reference< xml::crypto::XSEInitializer >( pSession->getMSF()->createInstance( - rtl::OUString::createFromAscii( SEINITIALIZER_COMPONENT ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_COMPONENT )) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -2147,7 +2147,7 @@ NeonSession::isDomainMatch( rtl::OUString certHostName ) if (hostName.equalsIgnoreAsciiCase( certHostName ) ) return sal_True; - if ( 0 == certHostName.indexOf( rtl::OUString::createFromAscii( "*" ) ) && + if ( 0 == certHostName.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) ) && hostName.getLength() >= certHostName.getLength() ) { rtl::OUString cmpStr = certHostName.copy( 1 ); diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index dd391c6c296e..a1ebbb0f94d4 100644 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.cxx @@ -192,14 +192,14 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) #if NEON_VERSION >= 0x0260 if ( pUri->query ) { - mPath += rtl::OUString::createFromAscii( "?" ); + mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?")); mPath += rtl::OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 ); } if ( pUri->fragment ) { - mPath += rtl::OUString::createFromAscii( "#" ); + mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")); mPath += rtl::OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } @@ -291,7 +291,7 @@ void NeonUri::calculateURI () return aTemp; } else - return rtl::OUString::createFromAscii ("/"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("/")); } bool NeonUri::operator== ( const NeonUri & rOther ) const @@ -307,7 +307,7 @@ bool NeonUri::operator== ( const NeonUri & rOther ) const void NeonUri::AppendPath (const rtl::OUString& rPath) { if (mPath.lastIndexOf ('/') != mPath.getLength () - 1) - mPath += rtl::OUString::createFromAscii ("/"); + mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("/")); mPath += rPath; calculateURI (); diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index 590b78706276..e7b5411487c5 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -50,32 +50,20 @@ struct UCBDeadPropertyValueParseContext }; // static -const rtl::OUString UCBDeadPropertyValue::aTypeString - = rtl::OUString::createFromAscii( "string" ); -const rtl::OUString UCBDeadPropertyValue::aTypeLong - = rtl::OUString::createFromAscii( "long" ); -const rtl::OUString UCBDeadPropertyValue::aTypeShort - = rtl::OUString::createFromAscii( "short" ); -const rtl::OUString UCBDeadPropertyValue::aTypeBoolean - = rtl::OUString::createFromAscii( "boolean" ); -const rtl::OUString UCBDeadPropertyValue::aTypeChar - = rtl::OUString::createFromAscii( "char" ); -const rtl::OUString UCBDeadPropertyValue::aTypeByte - = rtl::OUString::createFromAscii( "byte" ); -const rtl::OUString UCBDeadPropertyValue::aTypeHyper - = rtl::OUString::createFromAscii( "hyper" ); -const rtl::OUString UCBDeadPropertyValue::aTypeFloat - = rtl::OUString::createFromAscii( "float" ); -const rtl::OUString UCBDeadPropertyValue::aTypeDouble - = rtl::OUString::createFromAscii( "double" ); +const rtl::OUString UCBDeadPropertyValue::aTypeString(RTL_CONSTASCII_USTRINGPARAM("string")); +const rtl::OUString UCBDeadPropertyValue::aTypeLong(RTL_CONSTASCII_USTRINGPARAM("long")); +const rtl::OUString UCBDeadPropertyValue::aTypeShort(RTL_CONSTASCII_USTRINGPARAM("short")); +const rtl::OUString UCBDeadPropertyValue::aTypeBoolean(RTL_CONSTASCII_USTRINGPARAM("boolean")); +const rtl::OUString UCBDeadPropertyValue::aTypeChar(RTL_CONSTASCII_USTRINGPARAM("char")); +const rtl::OUString UCBDeadPropertyValue::aTypeByte(RTL_CONSTASCII_USTRINGPARAM("byte")); +const rtl::OUString UCBDeadPropertyValue::aTypeHyper(RTL_CONSTASCII_USTRINGPARAM("hyper")); +const rtl::OUString UCBDeadPropertyValue::aTypeFloat(RTL_CONSTASCII_USTRINGPARAM("float")); +const rtl::OUString UCBDeadPropertyValue::aTypeDouble(RTL_CONSTASCII_USTRINGPARAM("double")); // static -const rtl::OUString UCBDeadPropertyValue::aXMLPre - = rtl::OUString::createFromAscii( "<ucbprop><type>" ); -const rtl::OUString UCBDeadPropertyValue::aXMLMid - = rtl::OUString::createFromAscii( "</type><value>" ); -const rtl::OUString UCBDeadPropertyValue::aXMLEnd - = rtl::OUString::createFromAscii( "</value></ucbprop>" ); +const rtl::OUString UCBDeadPropertyValue::aXMLPre(RTL_CONSTASCII_USTRINGPARAM("<ucbprop><type>")); +const rtl::OUString UCBDeadPropertyValue::aXMLMid(RTL_CONSTASCII_USTRINGPARAM("</type><value>")); +const rtl::OUString UCBDeadPropertyValue::aXMLEnd(RTL_CONSTASCII_USTRINGPARAM("</value></ucbprop>")); #define STATE_TOP (1) @@ -403,7 +391,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeBoolean ) ) { if ( aStringValue.equalsIgnoreAsciiCase( - rtl::OUString::createFromAscii( "true" ) ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")) ) ) rOutData <<= sal_Bool( sal_True ); else rOutData <<= sal_Bool( sal_False ); diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index e7f36d16a619..81e96793e6e9 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -344,8 +344,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.WebDAVContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.WebDAVContent" )); } //========================================================================= @@ -355,7 +355,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() { uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( WEBDAV_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_SERVICE_NAME )); return aSNS; } @@ -384,9 +384,9 @@ rtl::OUString SAL_CALL Content::getContentType() } if ( bFolder ) - return rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )); - return rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )); } //========================================================================= @@ -423,8 +423,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -445,8 +445,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -457,8 +457,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -500,8 +500,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -522,8 +522,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -587,8 +587,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -609,8 +609,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -652,8 +652,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -952,7 +952,7 @@ Content::queryCreatableContentsInfo() // document. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT; @@ -967,7 +967,7 @@ Content::queryCreatableContentsInfo() // folder. aSeq.getArray()[ 1 ].Type - = rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; @@ -1001,18 +1001,18 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "WebdavContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Bool isCollection; if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( WEBDAV_COLLECTION_TYPE ) ) ) { - aURL += rtl::OUString::createFromAscii( "New_Collection" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Collection")); isCollection = sal_True; } else { - aURL += rtl::OUString::createFromAscii( "New_Content" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Content")); isCollection = sal_False; } @@ -1527,8 +1527,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -1541,8 +1541,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1550,8 +1550,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1559,8 +1559,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) @@ -1593,8 +1593,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( catch ( DAVException const & ) { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Invalid content identifier!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Invalid content identifier!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1602,8 +1602,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1611,8 +1611,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1632,8 +1632,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // PROPPATCH::set would add the property automatically, which // is not allowed for "setPropertyValues" command! aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Property is unknown!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is unknown!" )), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -1642,8 +1642,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1651,8 +1651,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1660,8 +1660,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1670,8 +1670,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Read-only property! // (but could be writable, if 'getcontenttype' would be) aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } if ( rName.equalsAsciiL( @@ -1679,8 +1679,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1745,8 +1745,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1810,7 +1810,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rtl::OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += NeonUri::escapeSegment( aNewTitle ); @@ -1853,7 +1853,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1871,7 +1871,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( aNewTitle ); @@ -2174,7 +2174,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -2236,7 +2236,7 @@ void Content::insert( OSL_ENSURE( sal_False, "Content::insert - Title missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "Title" ); + aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -2267,8 +2267,8 @@ void Content::insert( if ( !bTransient || ( bTransient && !bCollection ) ) { ucb::UnsupportedNameClashException aEx( - rtl::OUString::createFromAscii( - "Unable to write without overwrite!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to write without overwrite!" )), static_cast< cppu::OWeakObject * >( this ), ucb::NameClash::ERROR ); @@ -2315,8 +2315,8 @@ void Content::insert( "Content::insert - " "Unknown interaction selection!" ); throw ucb::CommandFailedException( - rtl::OUString::createFromAscii( - "Unknown interaction selection!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unknown interaction selection!" )), uno::Reference< uno::XInterface >(), aExAsAny ); // break; @@ -2335,7 +2335,7 @@ void Content::insert( // Assemble new content identifier... rtl::OUString aURL = getParentURL(); if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += aEscapedTitle; @@ -2489,19 +2489,19 @@ void Content::transfer( RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) { sourceURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); } else if ( aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) ) { sourceURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); } else if ( aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) ) { sourceURI.SetScheme( - rtl::OUString::createFromAscii( HTTPS_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTPS_URL_SCHEME )) ); } else { @@ -2513,8 +2513,8 @@ void Content::transfer( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::InteractiveBadTransferURLException( - rtl::OUString::createFromAscii( - "Unsupported URL scheme!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unsupported URL scheme!" )), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -2524,11 +2524,11 @@ void Content::transfer( if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) targetURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); else if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) ) targetURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); // @@@ This implementation of 'transfer' only works // if the source and target are located at same host. @@ -2541,8 +2541,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::InteractiveBadTransferURLException( - rtl::OUString::createFromAscii( - "Different hosts!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Different hosts!" )), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -2564,7 +2564,7 @@ void Content::transfer( rtl::OUString aTargetURL = xIdentifier->getContentIdentifier(); if ( ( aTargetURL.lastIndexOf( '/' ) + 1 ) != aTargetURL.getLength() ) - aTargetURL += rtl::OUString::createFromAscii( "/" ); + aTargetURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aTargetURL += aTitle; @@ -2770,7 +2770,7 @@ void Content::lock( uno::Any aOwnerAny; aOwnerAny - <<= rtl::OUString::createFromAscii( "http://ucb.openoffice.org" ); + <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://ucb.openoffice.org")); ucb::Lock aLock( ucb::LockScope_EXCLUSIVE, @@ -2904,7 +2904,7 @@ sal_Bool Content::isFolder( } uno::Sequence< beans::Property > aProperties( 1 ); - aProperties[ 0 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + aProperties[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProperties[ 0 ].Handle = -1; uno::Reference< sdbc::XRow > xRow( getPropertyValues( aProperties, xEnv ) ); if ( xRow.is() ) @@ -2933,13 +2933,13 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) { uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( - rtl::OUString::createFromAscii("Uri"), -1, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(m_xIdentifier->getContentIdentifier()), beans::PropertyState_DIRECT_VALUE); aException <<= ucb::InteractiveAugmentedIOException( - rtl::OUString::createFromAscii( "Not found!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not found!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, @@ -3021,7 +3021,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) #if 1 aException <<= ucb::InteractiveLockingLockedException( - rtl::OUString::createFromAscii( "Locked!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, m_xIdentifier->getContentIdentifier(), @@ -3030,13 +3030,13 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) { uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( - rtl::OUString::createFromAscii("Uri"), -1, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(m_xIdentifier->getContentIdentifier()), beans::PropertyState_DIRECT_VALUE); aException <<= ucb::InteractiveAugmentedIOException( - rtl::OUString::createFromAscii( "Locked!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_LOCKING_VIOLATION, @@ -3048,7 +3048,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_LOCKED_SELF: aException <<= ucb::InteractiveLockingLockedException( - rtl::OUString::createFromAscii( "Locked (self)!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked (self)!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, m_xIdentifier->getContentIdentifier(), @@ -3058,7 +3058,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_NOT_LOCKED: aException <<= ucb::InteractiveLockingNotLockedException( - rtl::OUString::createFromAscii( "Not locked!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not locked!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, m_xIdentifier->getContentIdentifier() ); @@ -3067,7 +3067,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_LOCK_EXPIRED: aException <<= ucb::InteractiveLockingLockExpiredException( - rtl::OUString::createFromAscii( "Lock expired!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lock expired!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, m_xIdentifier->getContentIdentifier() ); @@ -3175,13 +3175,13 @@ const Content::ResourceType & Content::getResourceType( std::vector< rtl::OUString > aPropNames; uno::Sequence< beans::Property > aProperties( 5 ); aProperties[ 0 ].Name - = rtl::OUString::createFromAscii( "IsFolder" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProperties[ 1 ].Name - = rtl::OUString::createFromAscii( "IsDocument" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aProperties[ 2 ].Name - = rtl::OUString::createFromAscii( "IsReadOnly" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly")); aProperties[ 3 ].Name - = rtl::OUString::createFromAscii( "MediaType" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); aProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK; diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index 63162e31644c..7f5a0b007d17 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -163,12 +163,12 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) = *( m_pImpl->m_aResults[ nIndex ]->pData ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += props.getEscapedTitle(); if ( props.isTrailingSlash() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); m_pImpl->m_aResults[ nIndex ]->aId = aId; return aId; diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index 536a0a0c2eba..13a5b6145612 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -95,10 +95,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.WebDAVContentProvider" ), - rtl::OUString::createFromAscii( - WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.WebDAVContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + WEBDAV_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // @@ -160,8 +160,8 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, WEBDAV_URL_SCHEME_LENGTH, - rtl::OUString::createFromAscii( - HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HTTP_URL_SCHEME )) ); bNewId = true; } else if ( aScheme.equalsAsciiL( @@ -169,8 +169,8 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, DAV_URL_SCHEME_LENGTH, - rtl::OUString::createFromAscii( - HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HTTP_URL_SCHEME )) ); bNewId = true; } else if ( aScheme.equalsAsciiL( @@ -178,8 +178,8 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, DAVS_URL_SCHEME_LENGTH, - rtl::OUString::createFromAscii( - HTTPS_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HTTPS_URL_SCHEME )) ); bNewId = true; } @@ -194,7 +194,7 @@ ContentProvider::queryContent( nPos = aURL.indexOf( '/', nPos + 1 ); if ( nPos == -1 ) { - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); bNewId = true; } } diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx index 1678d2c6fbe2..22b129d2e766 100644 --- a/ucb/source/ucp/webdav/webdavservices.cxx +++ b/ucb/source/ucp/webdav/webdavservices.cxx @@ -40,9 +40,9 @@ static sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, uno::Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index 7e64bacf23e4..eed407846786 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -236,7 +236,7 @@ rtl::OUString TestOutputStream::getStart() const { rtl::OUString sResult = m_sStart; if (m_bMore) - sResult += rtl::OUString::createFromAscii("..."); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")); return sResult; } @@ -285,13 +285,13 @@ rtl::OUString ProgressHandler::toString(const uno::Any & rStatus) if (aStart.Text.getLength() > 0) { sResult = aStart.Text; - sResult += rtl::OUString::createFromAscii(" "); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); } - sResult += rtl::OUString::createFromAscii("["); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[")); sResult += rtl::OUString::valueOf(aStart.Minimum); - sResult += rtl::OUString::createFromAscii(".."); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..")); sResult += rtl::OUString::valueOf(aStart.Maximum); - sResult += rtl::OUString::createFromAscii("]"); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]")); return sResult; } @@ -302,13 +302,13 @@ rtl::OUString ProgressHandler::toString(const uno::Any & rStatus) sal_Int32 nValue; if (rStatus >>= nValue) { - rtl::OUString sResult = rtl::OUString::createFromAscii(".."); + rtl::OUString sResult(RTL_CONSTASCII_USTRINGPARAM("..")); sResult += rtl::OUString::valueOf(nValue); - sResult += rtl::OUString::createFromAscii(".."); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..")); return rtl::OUString(sResult); } - return rtl::OUString::createFromAscii("(Unknown object)"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(Unknown object)")); } //============================================================================ @@ -328,7 +328,7 @@ ProgressHandler::queryInterface( const uno::Type & rType ) void SAL_CALL ProgressHandler::push(const uno::Any & rStatus) throw (uno::RuntimeException) { - rtl::OUString sMessage = rtl::OUString::createFromAscii("Status push: "); + rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("Status push: ")); sMessage += toString(rStatus); m_rPrinter.print(sMessage); } @@ -338,7 +338,7 @@ void SAL_CALL ProgressHandler::push(const uno::Any & rStatus) void SAL_CALL ProgressHandler::update(const uno::Any & rStatus) throw (uno::RuntimeException) { - rtl::OUString sMessage = rtl::OUString::createFromAscii("Status update: "); + rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("Status update: ")); sMessage += toString(rStatus); m_rPrinter.print(sMessage); } @@ -399,10 +399,10 @@ rtl::OUString Ucb::getUnoURL() rtl::OUString aUnoURL(rtl::OUString::createFromAscii( "uno:socket,host=localhost,port=8121;")); if (m_aProtocol.getLength() == 0) - aUnoURL += rtl::OUString::createFromAscii("urp"); + aUnoURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("urp")); else aUnoURL += m_aProtocol; - aUnoURL += rtl::OUString::createFromAscii(";UCB.Factory"); + aUnoURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";UCB.Factory")); return aUnoURL; } @@ -437,7 +437,7 @@ sal_Bool Ucb::init() uno::Sequence< uno::Any > aArgs(4); aArgs[0] <<= m_aConfigurationKey1; aArgs[1] <<= m_aConfigurationKey2; - aArgs[2] <<= rtl::OUString::createFromAscii("PIPE"); + aArgs[2] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PIPE")); aArgs[3] <<= aPipe; ::ucbhelper::ContentBroker::initialize( m_xFac, aArgs ); @@ -934,18 +934,18 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, return; } aArgument.Properties.realloc(5); - aArgument.Properties[0].Name = rtl::OUString::createFromAscii("Title"); + aArgument.Properties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aArgument.Properties[0].Handle = -1; aArgument.Properties[1].Name - = rtl::OUString::createFromAscii("DateCreated"); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")); aArgument.Properties[1].Handle = -1; - aArgument.Properties[2].Name = rtl::OUString::createFromAscii("Size"); + aArgument.Properties[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")); aArgument.Properties[2].Handle = -1; aArgument.Properties[3].Name - = rtl::OUString::createFromAscii("IsFolder"); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aArgument.Properties[3].Handle = -1; aArgument.Properties[4].Name - = rtl::OUString::createFromAscii("IsDocument"); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aArgument.Properties[4].Handle = -1; aArg <<= aArgument; } @@ -958,19 +958,19 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, // Property values which shall be in the result set... uno::Sequence< beans::Property > aProps( 5 ); beans::Property* pProps = aProps.getArray(); - pProps[ 0 ].Name = rtl::OUString::createFromAscii( "Title" ); + pProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); pProps[ 0 ].Handle = -1; // Important! /**/ pProps[ 0 ].Type = getCppuType(static_cast< rtl::OUString * >(0)); // HACK for sorting... - pProps[ 1 ].Name = rtl::OUString::createFromAscii( "DateCreated" ); + pProps[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")); pProps[ 1 ].Handle = -1; // Important! - pProps[ 2 ].Name = rtl::OUString::createFromAscii( "Size" ); + pProps[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")); pProps[ 2 ].Handle = -1; // Important! - pProps[ 3 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + pProps[ 3 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); pProps[ 3 ].Handle = -1; // Important! /**/ pProps[ 3 ].Type = getCppuType(static_cast< sal_Bool * >(0)); // HACK for sorting... - pProps[ 4 ].Name = rtl::OUString::createFromAscii( "IsDocument" ); + pProps[ 4 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); pProps[ 4 ].Handle = -1; // Important! aOpenArg.Properties = aProps; @@ -1307,7 +1307,7 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove ) rSourceURL, getURL(), rtl::OUString(), - //rtl::OUString::createFromAscii( "NewTitle" ), + //rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewTitle")), ucb::NameClash::ERROR ); ucb::Command aTransferCommand( rtl::OUString::createFromAscii( @@ -1347,9 +1347,9 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove ) uno::Any aArg; aArg <<= ucb::TransferInfo( bMove, rSourceURL, rtl::OUString(), ucb::NameClash::ERROR ); - executeCommand( rtl::OUString::createFromAscii( "transfer" ), aArg ); + executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), aArg ); -// executeCommand( rtl::OUString::createFromAscii( "flush" ), Any() ); +// executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), Any() ); #endif } @@ -1361,16 +1361,16 @@ void UcbContent::destroy() uno::Any aArg; aArg <<= sal_Bool( sal_True ); // delete physically, not only to trash. - executeCommand( rtl::OUString::createFromAscii( "delete" ), aArg ); + executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), aArg ); -// executeCommand( rtl::OUString::createFromAscii( "flush" ), Any() ); +// executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), Any() ); } //------------------------------------------------------------------------- uno::Sequence< ucb::CommandInfo > UcbContent::getCommands() { uno::Any aResult = executeCommand( - rtl::OUString::createFromAscii( "getCommandInfo" ), uno::Any() ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")), uno::Any() ); uno::Reference< ucb::XCommandInfo > xInfo; if ( aResult >>= xInfo ) @@ -1401,7 +1401,7 @@ uno::Sequence< ucb::CommandInfo > UcbContent::getCommands() uno::Sequence< beans::Property > UcbContent::getProperties() { uno::Any aResult = executeCommand( - rtl::OUString::createFromAscii( "getPropertySetInfo" ), uno::Any() ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")), uno::Any() ); uno::Reference< beans::XPropertySetInfo > xInfo; if ( aResult >>= xInfo ) @@ -1442,7 +1442,7 @@ uno::Any UcbContent::getPropertyValue( const rtl::OUString& rName ) aArg <<= aProps; uno::Any aResult = executeCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), aArg ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), aArg ); uno::Reference< sdbc::XRow > xValues; if ( aResult >>= xValues ) @@ -1490,10 +1490,10 @@ void UcbContent::setPropertyValue( const rtl::OUString& rName, uno::Any aArg; aArg <<= aProps; - executeCommand( rtl::OUString::createFromAscii( "setPropertyValues" ), + executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")), aArg ); -// executeCommand( rtl::OUString::createFromAscii( "flush" ), Any() ); +// executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), Any() ); } //---------------------------------------------------------------------------- @@ -2203,7 +2203,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) if ( m_pContent ) m_pContent->addStringProperty( aCmdLine, - rtl::OUString::createFromAscii( "DefaultValue" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultValue")) ); else print( "No content!" ); @@ -2229,7 +2229,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) if ( m_pContent ) m_pContent->setStringPropertyValue( aCmdLine, - rtl::OUString::createFromAscii( "NewValue" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewValue")) ); else print( "No content!" ); @@ -2237,7 +2237,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_OPEN: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("open"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2256,7 +2256,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_UPDATE: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("update"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("update")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2266,7 +2266,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_SYNCHRONIZE: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("synchronize"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("synchronize")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2276,7 +2276,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_SEARCH: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("search"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("search")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2402,7 +2402,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) uno::Any aArgument; if (nItemId == MYWIN_ITEMID_OFFLINE) { - aName = rtl::OUString::createFromAscii("goOffline"); + aName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goOffline")); uno::Sequence< uno::Reference< ucb::XContentIdentifier > > @@ -2413,7 +2413,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) aArgument <<= aIdentifiers; } else - aName = rtl::OUString::createFromAscii("goOnline"); + aName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goOnline")); UcbCommandProcessor(m_aUCB, xProcessor, m_pOutEdit). executeCommand(aName, aArgument); |