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/source/ucp/gvfs | |
parent | 06514ed3d609f63cca40f41aec2a8d9ffd0b1509 (diff) |
Easy Hacks : RTL_CONSTASCII_USTRINGPARAM in libs-core
Diffstat (limited to 'ucb/source/ucp/gvfs')
-rw-r--r-- | ucb/source/ucp/gvfs/gvfs_content.cxx | 38 | ||||
-rw-r--r-- | ucb/source/ucp/gvfs/gvfs_directory.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gvfs/gvfs_provider.cxx | 12 |
3 files changed, 26 insertions, 26 deletions
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 { |