summaryrefslogtreecommitdiff
path: root/stoc/test/tdmanager/testtdmanager.cxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 16:12:08 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 16:48:34 -0500
commitacb7bd175abe6c7f793cc673feaab46c90b9a260 (patch)
tree206be73ecd4a2af07310e8efe348f9647382d331 /stoc/test/tdmanager/testtdmanager.cxx
parentd29d9399d48f85989cc8040f5ba334c38b40a544 (diff)
targeted string re-work
Change-Id: I145731d9f28faf0065f5960f2c5a32f27d8c8620
Diffstat (limited to 'stoc/test/tdmanager/testtdmanager.cxx')
-rw-r--r--stoc/test/tdmanager/testtdmanager.cxx73
1 files changed, 27 insertions, 46 deletions
diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx
index 9789f20520bd..69bc43e0708d 100644
--- a/stoc/test/tdmanager/testtdmanager.cxx
+++ b/stoc/test/tdmanager/testtdmanager.cxx
@@ -134,9 +134,8 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments)
css::uno::Reference< css::container::XHierarchicalNameAccess > manager(
m_context->getValueByName(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
"/singletons/"
- "com.sun.star.reflection.theTypeDescriptionManager"))),
+ "com.sun.star.reflection.theTypeDescriptionManager")),
css::uno::UNO_QUERY_THROW);
////////////////////////////////////////
@@ -155,17 +154,15 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments)
css::uno::Reference<css::registry::XSimpleRegistry> xReg(
m_context->getServiceManager()->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry") ),
+ rtl::OUString( "com.sun.star.registry.SimpleRegistry" ),
m_context ), css::uno::UNO_QUERY_THROW );
xReg->open( url, true /* read-only */, false /* ! create */ );
css::uno::Any arg( css::uno::makeAny(xReg) );
css::uno::Reference<css::container::XHierarchicalNameAccess> xTDprov(
m_context->getServiceManager()->
createInstanceWithArgumentsAndContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.stoc."
- "RegistryTypeDescriptionProvider") ),
+ rtl::OUString( "com.sun.star.comp.stoc."
+ "RegistryTypeDescriptionProvider" ),
css::uno::Sequence<css::uno::Any>( &arg, 1 ), m_context ),
css::uno::UNO_QUERY_THROW );
try {
@@ -186,79 +183,67 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments)
css::uno::Reference< css::reflection::XIndirectTypeDescription > sequence(
manager->getByHierarchicalName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]boolean"))),
+ rtl::OUString("[][]boolean")),
css::uno::UNO_QUERY_THROW);
assertEqual(css::uno::TypeClass_SEQUENCE, sequence->getTypeClass());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]boolean")),
+ rtl::OUString("[][]boolean"),
sequence->getName());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]boolean")),
+ rtl::OUString("[]boolean"),
sequence->getReferencedType()->getName());
css::uno::Reference< css::reflection::XStructTypeDescription > structure(
manager->getByHierarchicalName(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "test.tdmanager.Struct<boolean,test.tdmanager.Struct<"
- "any,com.sun.star.uno.XInterface>>"))),
+ rtl::OUString( "test.tdmanager.Struct<boolean,test.tdmanager.Struct<"
+ "any,com.sun.star.uno.XInterface>>")),
css::uno::UNO_QUERY_THROW);
assertEqual(css::uno::TypeClass_STRUCT, structure->getTypeClass());
assertEqual(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "test.tdmanager.Struct<boolean,test.tdmanager.Struct<"
- "any,com.sun.star.uno.XInterface>>")),
+ rtl::OUString( "test.tdmanager.Struct<boolean,test.tdmanager.Struct<"
+ "any,com.sun.star.uno.XInterface>>"),
structure->getName());
assertEqual< bool >(false, structure->getBaseType().is());
assertEqual< sal_Int32 >(1, structure->getMemberTypes().getLength());
assertEqual(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>")),
+ rtl::OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"),
structure->getMemberTypes()[0]->getName());
assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("s")),
+ rtl::OUString("s"),
structure->getMemberNames()[0]);
assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength());
assertEqual< sal_Int32 >(2, structure->getTypeArguments().getLength());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("boolean")),
+ rtl::OUString("boolean"),
structure->getTypeArguments()[0]->getName());
assertEqual(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>")),
+ rtl::OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"),
structure->getTypeArguments()[1]->getName());
css::uno::Reference< css::reflection::XInterfaceMethodTypeDescription >
method(
manager->getByHierarchicalName(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uno.XComponentContext::getValueByName"))),
+ rtl::OUString( "com.sun.star.uno.XComponentContext::getValueByName")),
css::uno::UNO_QUERY_THROW);
assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass());
assertEqual(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uno.XComponentContext::getValueByName")),
+ rtl::OUString( "com.sun.star.uno.XComponentContext::getValueByName"),
method->getName());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getValueByName")),
+ rtl::OUString("getValueByName"),
method->getMemberName());
assertEqual< sal_Int32 >(3, method->getPosition());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any")),
+ rtl::OUString("any"),
method->getReturnType()->getName());
assertEqual< bool >(false, method->isOneway());
assertEqual< sal_Int32 >(1, method->getParameters().getLength());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")),
+ rtl::OUString("Name"),
method->getParameters()[0]->getName());
assertEqual(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("string")),
+ rtl::OUString("string"),
method->getParameters()[0]->getType()->getName());
assertEqual< bool >(true, method->getParameters()[0]->isIn());
assertEqual< bool >(false, method->getParameters()[0]->isOut());
@@ -269,25 +254,21 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments)
css::uno::Reference< css::reflection::XPublished >(
css::uno::Reference< css::reflection::XTypeDescription >(
manager->getByHierarchicalName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]boolean"))),
+ rtl::OUString("[]boolean")),
css::uno::UNO_QUERY_THROW),
css::uno::UNO_QUERY).is());
assertFalse(
css::uno::Reference< css::reflection::XPublished >(
css::uno::Reference< css::reflection::XTypeDescription >(
manager->getByHierarchicalName(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.beans.XIntroTest::ObjectName"))),
+ rtl::OUString( "com.sun.star.beans.XIntroTest::ObjectName")),
css::uno::UNO_QUERY_THROW),
css::uno::UNO_QUERY).is());
assertFalse(
css::uno::Reference< css::reflection::XPublished >(
css::uno::Reference< css::reflection::XTypeDescription >(
manager->getByHierarchicalName(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.beans.XIntroTest::writeln"))),
+ rtl::OUString( "com.sun.star.beans.XIntroTest::writeln")),
css::uno::UNO_QUERY_THROW),
css::uno::UNO_QUERY).is());
//TODO: check that the reflection of a property of an accumulation-based
@@ -297,7 +278,7 @@ sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments)
}
rtl::OUString Service::getImplementationName() {
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test.tdmanager.impl"));
+ return rtl::OUString("test.tdmanager.impl");
}
css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames() {
@@ -333,9 +314,9 @@ namespace {
bool writeInfo(void * registryKey, rtl::OUString const & implementationName,
css::uno::Sequence< rtl::OUString > const & serviceNames) {
- rtl::OUString keyName(RTL_CONSTASCII_USTRINGPARAM("/"));
+ rtl::OUString keyName("/");
keyName += implementationName;
- keyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
+ keyName += rtl::OUString("/UNO/SERVICES");
css::uno::Reference< css::registry::XRegistryKey > key;
try {
key = static_cast< css::registry::XRegistryKey * >(registryKey)->