summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/gio
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-11-13 09:00:53 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-13 09:00:53 +0100
commitc1fa0e476b9f61014c3ba17590753cb502ba1490 (patch)
tree267645156d07d0a6cf760b940f6c2cba07b534a1 /ucb/source/ucp/gio
parent06514ed3d609f63cca40f41aec2a8d9ffd0b1509 (diff)
Easy Hacks : RTL_CONSTASCII_USTRINGPARAM in libs-core
Diffstat (limited to 'ucb/source/ucp/gio')
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx30
-rw-r--r--ucb/source/ucp/gio/gio_datasupplier.cxx4
-rw-r--r--ucb/source/ucp/gio/gio_provider.cxx12
3 files changed, 23 insertions, 23 deletions
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