summaryrefslogtreecommitdiff
path: root/ucb/source/core
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/core
parent06514ed3d609f63cca40f41aec2a8d9ffd0b1509 (diff)
Easy Hacks : RTL_CONSTASCII_USTRINGPARAM in libs-core
Diffstat (limited to 'ucb/source/core')
-rw-r--r--ucb/source/core/provprox.cxx16
-rw-r--r--ucb/source/core/ucb.cxx16
-rw-r--r--ucb/source/core/ucbcmds.cxx159
-rw-r--r--ucb/source/core/ucbprops.cxx8
-rw-r--r--ucb/source/core/ucbserv.cxx4
-rw-r--r--ucb/source/core/ucbstore.cxx132
6 files changed, 162 insertions, 173 deletions
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 );