summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorKevin Hunter <hunteke@earlham.edu>2010-11-19 10:07:01 -0500
committerDavid Tardon <dtardon@redhat.com>2010-11-20 11:22:38 +0100
commit8e401df9f064a6f7da0266bfe8461c481c0c0958 (patch)
tree561977859bf04d5e5e4d29ffe21c2ca7195df002 /bridges
parent5ea8804a166ce06dd33d363b96a250e012bf3951 (diff)
EasyHack: RTL_CONST macro from createFromAscii
They're only in the tests, but it compiles, and the createFromAscii messed with my grep-age!
Diffstat (limited to 'bridges')
-rw-r--r--bridges/test/java_uno/acquire/testacquire.cxx10
-rw-r--r--bridges/test/java_uno/equals/testequals.cxx9
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx26
-rw-r--r--bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx18
-rw-r--r--bridges/test/testcomp.cxx4
-rw-r--r--bridges/test/testoffice.cxx4
-rw-r--r--bridges/test/testserver.cxx2
7 files changed, 28 insertions, 45 deletions
diff --git a/bridges/test/java_uno/acquire/testacquire.cxx b/bridges/test/java_uno/acquire/testacquire.cxx
index 95a4a0241d20..2852437672cc 100644
--- a/bridges/test/java_uno/acquire/testacquire.cxx
+++ b/bridges/test/java_uno/acquire/testacquire.cxx
@@ -494,14 +494,12 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments)
}
rtl::OUString Service::getImplementationName_static() {
- return rtl::OUString::createFromAscii(
- "com.sun.star.test.bridges.testacquire.impl");
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.test.bridges.testacquire.impl" ));
}
css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames_static() {
css::uno::Sequence< rtl::OUString > names(1);
- names[0] = rtl::OUString::createFromAscii(
- "com.sun.star.test.bridges.testacquire");
+ names[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.test.bridges.testacquire" ));
return names;
}
@@ -543,9 +541,9 @@ namespace {
bool writeInfo(void * registryKey, rtl::OUString const & implementationName,
css::uno::Sequence< rtl::OUString > const & serviceNames) {
- rtl::OUString keyName(rtl::OUString::createFromAscii("/"));
+ rtl::OUString keyName( RTL_CONSTASCII_USTRINGPARAM( "/" ));
keyName += implementationName;
- keyName += rtl::OUString::createFromAscii("/UNO/SERVICES");
+ keyName += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ));
css::uno::Reference< css::registry::XRegistryKey > key;
try {
key = static_cast< css::registry::XRegistryKey * >(registryKey)->
diff --git a/bridges/test/java_uno/equals/testequals.cxx b/bridges/test/java_uno/equals/testequals.cxx
index ff38371bc6ca..0abaeb3db4f2 100644
--- a/bridges/test/java_uno/equals/testequals.cxx
+++ b/bridges/test/java_uno/equals/testequals.cxx
@@ -123,7 +123,7 @@ void Service::connect(rtl::OUString const & rConnection,
css::connection::Connector::create(m_xContext)->connect(rConnection));
css::uno::Reference< css::bridge::XBridgeFactory > xBridgeFactory(
m_xContext->getServiceManager()->createInstanceWithContext(
- rtl::OUString::createFromAscii("com.sun.star.bridge.BridgeFactory"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.bridge.BridgeFactory" )),
m_xContext),
css::uno::UNO_QUERY);
m_xBridge = xBridgeFactory->createBridge(rtl::OUString(), rProtocol,
@@ -139,8 +139,7 @@ Service::get(rtl::OUString const & rName) throw (css::uno::RuntimeException)
css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames_static()
{
css::uno::Sequence< rtl::OUString > aNames(1);
- aNames[0] = rtl::OUString::createFromAscii(
- "com.sun.star.test.bridges.testequals");
+ aNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.test.bridges.testequals" ));
return aNames;
}
@@ -197,9 +196,9 @@ namespace {
bool writeInfo(void * pRegistryKey, sal_Char const * pImplementationName,
css::uno::Sequence< rtl::OUString > const & rServiceNames)
{
- rtl::OUString aKeyName(rtl::OUString::createFromAscii("/"));
+ rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" ));
aKeyName += rtl::OUString::createFromAscii(pImplementationName);
- aKeyName += rtl::OUString::createFromAscii("/UNO/SERVICES");
+ aKeyName += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ));
css::uno::Reference< css::registry::XRegistryKey > xKey;
try
{
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
index 425b93a271e4..039d903b4c71 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
@@ -88,30 +88,27 @@ sal_Int32 Client::run(css::uno::Sequence< rtl::OUString > const &)
context->getServiceManager());
if (!factory.is()) {
throw new css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
- "no component context service manager"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no component context service manager" )),
static_cast< cppu::OWeakObject * >(this));
}
css::uno::Reference< test::javauno::nativethreadpool::XRelay > relay;
try {
relay = css::uno::Reference< test::javauno::nativethreadpool::XRelay >(
factory->createInstanceWithContext(
- rtl::OUString::createFromAscii(
- "test.javauno.nativethreadpool.Relay"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "test.javauno.nativethreadpool.Relay" )),
context),
css::uno::UNO_QUERY_THROW);
} catch (css::uno::RuntimeException &) {
throw;
} catch (css::uno::Exception & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "creating test.javauno.nativethreadpool.Relay service"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "creating test.javauno.nativethreadpool.Relay service" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
}
relay->start(this);
if (!data.setData(reinterpret_cast< void * >(12345))) {
throw new css::uno::RuntimeException(
- rtl::OUString::createFromAscii("osl::ThreadData::setData failed"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "osl::ThreadData::setData failed" )),
static_cast< cppu::OWeakObject * >(this));
}
css::uno::Reference< test::javauno::nativethreadpool::XSource > source;
@@ -119,23 +116,19 @@ sal_Int32 Client::run(css::uno::Sequence< rtl::OUString > const &)
source
= css::uno::Reference< test::javauno::nativethreadpool::XSource >(
css::bridge::UnoUrlResolver::create(context)->resolve(
- rtl::OUString::createFromAscii(
- "uno:socket,host=localhost,port=3830;urp;test")),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "uno:socket,host=localhost,port=3830;urp;test" ))),
css::uno::UNO_QUERY_THROW);
} catch (css::connection::NoConnectException & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "com.sun.star.uno.UnoUrlResolver.resolve"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.UnoUrlResolver.resolve" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
} catch (css::connection::ConnectionSetupException & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "com.sun.star.uno.UnoUrlResolver.resolve"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.UnoUrlResolver.resolve" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
} catch (css::lang::IllegalArgumentException & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "com.sun.star.uno.UnoUrlResolver.resolve"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.UnoUrlResolver.resolve" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
}
bool success = source->get() == 12345;
@@ -155,8 +148,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL create(
}
rtl::OUString SAL_CALL getImplementationName() {
- return rtl::OUString::createFromAscii(
- "test.javauno.nativethreadpool.client");
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "test.javauno.nativethreadpool.client" ));
}
css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() {
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
index c055faa1aa29..dbd2c4dc5a11 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
@@ -77,8 +77,7 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) {
context->getServiceManager());
if (!factory.is()) {
throw new css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
- "no component context service manager"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no component context service manager" )),
static_cast< cppu::OWeakObject * >(this));
}
css::uno::Reference< test::javauno::nativethreadpool::XSource > source;
@@ -87,23 +86,19 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) {
source
= css::uno::Reference< test::javauno::nativethreadpool::XSource >(
css::bridge::UnoUrlResolver::create(context)->resolve(
- rtl::OUString::createFromAscii(
- "uno:socket,host=127.0.0.1,port=3831;urp;test")),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "uno:socket,host=127.0.0.1,port=3831;urp;test" ))),
css::uno::UNO_QUERY_THROW);
} catch (css::connection::NoConnectException & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "com.sun.star.uno.UnoUrlResolver.resolve"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.UnoUrlResolver.resolve" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
} catch (css::connection::ConnectionSetupException & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "com.sun.star.uno.UnoUrlResolver.resolve"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.UnoUrlResolver.resolve" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
} catch (css::lang::IllegalArgumentException & e) {
throw css::lang::WrappedTargetRuntimeException(
- rtl::OUString::createFromAscii(
- "com.sun.star.uno.UnoUrlResolver.resolve"),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.UnoUrlResolver.resolve" )),
static_cast< cppu::OWeakObject * >(this), css::uno::makeAny(e));
}
return source->get();
@@ -117,8 +112,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL create(
}
rtl::OUString SAL_CALL getImplementationName() {
- return rtl::OUString::createFromAscii(
- "test.javauno.nativethreadpool.server");
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "test.javauno.nativethreadpool.server" ));
}
css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() {
diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx
index 53ea34d716bf..864279827a6b 100644
--- a/bridges/test/testcomp.cxx
+++ b/bridges/test/testcomp.cxx
@@ -774,7 +774,7 @@ Reference <XInterface > createComponent( const ::rtl::OUString &sService ,
// erst registrieren
Reference < XImplementationRegistration > rReg (
rSMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" )),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.ImplementationRegistration" ))),
UNO_QUERY );
OSL_ASSERT( rReg.is() );
@@ -783,7 +783,7 @@ Reference <XInterface > createComponent( const ::rtl::OUString &sService ,
try
{
rReg->registerImplementation(
- OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.SharedLibrary" )),
aDllName,
Reference< XSimpleRegistry > () );
rInterface = rSMgr->createInstance( sService );
diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx
index 0d87089b6921..9e90702e036c 100644
--- a/bridges/test/testoffice.cxx
+++ b/bridges/test/testoffice.cxx
@@ -87,7 +87,7 @@ void mygetchar()
void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
{
Reference < XOutputStream > rOut(
- rSmgr->createInstance( OUString::createFromAscii( "com.sun.star.io.Pipe" ) ),
+ rSmgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" )) ),
UNO_QUERY );
OSL_ASSERT( rOut.is() );
@@ -195,7 +195,7 @@ void doSomething( const Reference < XInterface > &r )
{
printf( "got the remote naming service !\n" );
Reference < XInterface > rXsmgr = rName->getRegisteredObject(
- OUString::createFromAscii( "StarOffice.ServiceManager" ) );
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ServiceManager" )) );
Reference < XMultiServiceFactory > rSmgr( rXsmgr , UNO_QUERY );
if( rSmgr.is() )
diff --git a/bridges/test/testserver.cxx b/bridges/test/testserver.cxx
index 1e9b70cf13d3..fe85514872dd 100644
--- a/bridges/test/testserver.cxx
+++ b/bridges/test/testserver.cxx
@@ -160,7 +160,7 @@ void MyThread::run()
OUString( RTL_CONSTASCII_USTRINGPARAM("my test string")) , 2 );
}
printf( "all oneway are send\n" );
- rCallMe->call( OUString::createFromAscii( "reverse call me test finished" ) , 0 );
+ rCallMe->call( OUString( RTL_CONSTASCII_USTRINGPARAM( "reverse call me test finished" )) , 0 );
printf( "revers callme test finished\n" );
}
}