summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 09:22:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 09:00:26 +0000
commit8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch)
tree2dbddceebf0f96492adc5652697e8efce8a8ba06 /cppuhelper
parentfe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff)
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx20
-rw-r--r--cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx114
-rw-r--r--cppuhelper/source/component.cxx4
-rw-r--r--cppuhelper/source/factory.cxx16
-rw-r--r--cppuhelper/source/implbase.cxx8
-rw-r--r--cppuhelper/source/propertysetmixin.cxx66
-rw-r--r--cppuhelper/source/shlib.cxx2
-rw-r--r--cppuhelper/source/unourl.cxx35
-rw-r--r--cppuhelper/test/bootstrap/TestEnv.cxx4
-rw-r--r--cppuhelper/test/bootstrap/bootstrap.test.cxx50
-rw-r--r--cppuhelper/test/cfg_test.cxx4
-rw-r--r--cppuhelper/test/loader/loader.test.cxx16
-rw-r--r--cppuhelper/test/testcmp/TestComponent.cxx4
-rw-r--r--cppuhelper/test/testhelper.cxx12
-rw-r--r--cppuhelper/test/testimplhelper.cxx86
-rw-r--r--cppuhelper/test/testpropshlp.cxx158
-rw-r--r--cppuhelper/test/testproptyphlp.cxx2
17 files changed, 290 insertions, 311 deletions
diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
index d81abf0452be..88919edeeef9 100644
--- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
+++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
@@ -170,7 +170,7 @@ css::uno::Any Empty2::queryInterface(css::uno::Type const & type)
css::uno::Sequence< rtl::OUString > sequenceThird() {
css::uno::Sequence< rtl::OUString > s(1);
- s[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third"));
+ s[0] = rtl::OUString("Third");
return s;
}
@@ -275,7 +275,7 @@ sal_Int32 Full::getFirst() throw (css::uno::RuntimeException) {
void Full::setFirst(sal_Int32 value) throw (css::uno::RuntimeException) {
prepareSet(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), css::uno::Any(),
+ rtl::OUString("First"), css::uno::Any(),
css::uno::Any(), 0);
osl::MutexGuard g(m_mutex);
m_a1 = value;
@@ -304,7 +304,7 @@ void Full::setSecond(
}
BoundListeners l;
prepareSet(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), css::uno::Any(),
+ rtl::OUString("Second"), css::uno::Any(),
v, &l);
{
osl::MutexGuard g(m_mutex);
@@ -317,7 +317,7 @@ sal_Int32 Full::getThird()
throw (css::beans::UnknownPropertyException, css::uno::RuntimeException)
{
throw css::beans::UnknownPropertyException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
static_cast< cppu::OWeakObject * >(this));
}
@@ -325,7 +325,7 @@ void Full::setThird(sal_Int32)
throw (css::beans::UnknownPropertyException, css::uno::RuntimeException)
{
throw css::beans::UnknownPropertyException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
static_cast< cppu::OWeakObject * >(this));
}
@@ -333,7 +333,7 @@ sal_Int32 Full::getFourth()
throw (css::beans::UnknownPropertyException, css::uno::RuntimeException)
{
throw css::beans::UnknownPropertyException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")),
+ rtl::OUString("Fourth"),
static_cast< cppu::OWeakObject * >(this));
}
@@ -341,7 +341,7 @@ void Full::setFourth(sal_Int32)
throw (css::beans::UnknownPropertyException, css::uno::RuntimeException)
{
throw css::beans::UnknownPropertyException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")),
+ rtl::OUString("Fourth"),
static_cast< cppu::OWeakObject * >(this));
}
@@ -384,15 +384,13 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL create(
rtl::OUString SAL_CALL getImplementationName() {
return rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "test.cppuhelper.propertysetmixin.comp.CppSupplier"));
+ "test.cppuhelper.propertysetmixin.comp.CppSupplier");
}
css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() {
css::uno::Sequence< rtl::OUString > s(1);
s[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "test.cppuhelper.propertysetmixin.CppSupplier"));
+ "test.cppuhelper.propertysetmixin.CppSupplier");
return s;
}
diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx
index 43cf415bbe42..9455752824d0 100644
--- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx
+++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx
@@ -256,20 +256,20 @@ void Test::testEmpty2(
static_cast< sal_Int32 >(0), info->getProperties().getLength());
try {
info->getPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any")));
+ rtl::OUString("any"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
CPPUNIT_ASSERT(
!info->hasPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any"))));
+ rtl::OUString("any")));
try {
empty2p->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any")), css::uno::Any());
+ rtl::OUString("any"), css::uno::Any());
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
empty2p->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any")));
+ rtl::OUString("any"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
rtl::Reference< BoundListener > boundListener1(new BoundListener);
@@ -311,10 +311,10 @@ void Test::testEmpty2(
empty2a->setPropertyValues(
css::uno::Sequence< css::beans::PropertyValue >());
css::uno::Sequence< css::beans::PropertyValue > vs(2);
- vs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any1"));
+ vs[0].Name = rtl::OUString("any1");
vs[0].Handle = -1;
vs[0].State = css::beans::PropertyState_DIRECT_VALUE;
- vs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any2"));
+ vs[0].Name = rtl::OUString("any2");
vs[0].Handle = -1;
vs[0].State = css::beans::PropertyState_DIRECT_VALUE;
try {
@@ -372,16 +372,16 @@ void Test::testFull(
static_cast< sal_Int32 >(3), info->getProperties().getLength());
css::beans::Property prop(
info->getPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First"))));
+ rtl::OUString("First")));
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), prop.Name);
+ rtl::OUString("First"), prop.Name);
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), prop.Handle);
CPPUNIT_ASSERT_EQUAL(getCppuType(static_cast< sal_Int32 * >(0)), prop.Type);
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int16 >(0), prop.Attributes);
prop = info->getPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")));
+ rtl::OUString("Second"));
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), prop.Name);
+ rtl::OUString("Second"), prop.Name);
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(1), prop.Handle);
CPPUNIT_ASSERT_EQUAL(getCppuType(static_cast< sal_Int32 * >(0)), prop.Type);
CPPUNIT_ASSERT_EQUAL(
@@ -395,13 +395,13 @@ void Test::testFull(
prop.Attributes);
try {
info->getPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")));
+ rtl::OUString("Third"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
prop = info->getPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")));
+ rtl::OUString("Fourth"));
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")), prop.Name);
+ rtl::OUString("Fourth"), prop.Name);
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(3), prop.Handle);
CPPUNIT_ASSERT_EQUAL(getCppuType(static_cast< sal_Int32 * >(0)), prop.Type);
CPPUNIT_ASSERT_EQUAL(
@@ -409,93 +409,93 @@ void Test::testFull(
prop.Attributes);
try {
info->getPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("first")));
+ rtl::OUString("first"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
CPPUNIT_ASSERT(
info->hasPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First"))));
+ rtl::OUString("First")));
CPPUNIT_ASSERT(
info->hasPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second"))));
+ rtl::OUString("Second")));
CPPUNIT_ASSERT(
!info->hasPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third"))));
+ rtl::OUString("Third")));
CPPUNIT_ASSERT(
info->hasPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth"))));
+ rtl::OUString("Fourth")));
CPPUNIT_ASSERT(
!info->hasPropertyByName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("first"))));
+ rtl::OUString("first")));
CPPUNIT_ASSERT_EQUAL(
css::uno::makeAny(static_cast< sal_Int32 >(0)),
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First"))));
+ rtl::OUString("First")));
fullp->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")),
+ rtl::OUString("First"),
css::uno::makeAny(static_cast< sal_Int32 >(-100)));
CPPUNIT_ASSERT_EQUAL(
css::uno::makeAny(static_cast< sal_Int32 >(-100)),
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First"))));
+ rtl::OUString("First")));
css::uno::Any voidAny;
CPPUNIT_ASSERT_EQUAL(
voidAny,
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second"))));
+ rtl::OUString("Second")));
fullp->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")),
+ rtl::OUString("Second"),
css::uno::makeAny(static_cast< sal_Int32 >(100)));
CPPUNIT_ASSERT_EQUAL(
css::uno::makeAny(static_cast< sal_Int32 >(100)),
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second"))));
+ rtl::OUString("Second")));
CPPUNIT_ASSERT(full->getSecond().Value.Value.IsPresent);
CPPUNIT_ASSERT_EQUAL(
static_cast< sal_Int32 >(100), full->getSecond().Value.Value.Value);
CPPUNIT_ASSERT(!full->getSecond().Value.IsDefaulted);
CPPUNIT_ASSERT(!full->getSecond().IsAmbiguous);
fullp->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")),
+ rtl::OUString("Second"),
css::uno::Any());
CPPUNIT_ASSERT_EQUAL(
voidAny,
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second"))));
+ rtl::OUString("Second")));
CPPUNIT_ASSERT(!full->getSecond().Value.Value.IsPresent);
CPPUNIT_ASSERT(!full->getSecond().Value.IsDefaulted);
CPPUNIT_ASSERT(!full->getSecond().IsAmbiguous);
try {
fullp->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
css::uno::makeAny(static_cast< sal_Int32 >(100)));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")));
+ rtl::OUString("Third"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")),
+ rtl::OUString("Fourth"),
css::uno::makeAny(static_cast< sal_Int32 >(100)));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")));
+ rtl::OUString("Fourth"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("first")),
+ rtl::OUString("first"),
css::uno::Any());
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("first")));
+ rtl::OUString("first"));
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
css::uno::Reference< css::beans::XFastPropertySet > fullf(
@@ -522,13 +522,13 @@ void Test::testFull(
fulla->getPropertyValues());
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(2), vs.getLength());
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), vs[0].Name);
+ rtl::OUString("First"), vs[0].Name);
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), vs[0].Handle);
CPPUNIT_ASSERT_EQUAL(
css::uno::makeAny(static_cast< sal_Int32 >(0)), vs[0].Value);
CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DIRECT_VALUE, vs[0].State);
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), vs[1].Name);
+ rtl::OUString("Second"), vs[1].Name);
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(1), vs[1].Handle);
CPPUNIT_ASSERT_EQUAL(voidAny, vs[1].Value);
CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DIRECT_VALUE, vs[1].State);
@@ -539,12 +539,12 @@ void Test::testFull(
vs = fulla->getPropertyValues();
CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(2), vs.getLength());
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), vs[0].Name);
+ rtl::OUString("First"), vs[0].Name);
CPPUNIT_ASSERT_EQUAL(
css::uno::makeAny(static_cast< sal_Int32 >(-100)), vs[0].Value);
CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DIRECT_VALUE, vs[0].State);
CPPUNIT_ASSERT_EQUAL(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), vs[1].Name);
+ rtl::OUString("Second"), vs[1].Name);
CPPUNIT_ASSERT_EQUAL(
css::uno::makeAny(static_cast< sal_Int32 >(100)), vs[1].Value);
CPPUNIT_ASSERT_EQUAL(
@@ -557,76 +557,76 @@ void Test::testFull(
css::uno::Reference< css::beans::XPropertyChangeListener > boundListener(
new BoundListener);
fullp->addPropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), boundListener);
+ rtl::OUString("First"), boundListener);
fullp->removePropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), boundListener);
+ rtl::OUString("First"), boundListener);
fullp->addPropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), boundListener);
+ rtl::OUString("Second"), boundListener);
fullp->removePropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), boundListener);
+ rtl::OUString("Second"), boundListener);
try {
fullp->addPropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
boundListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->removePropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
boundListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
fullp->addPropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")), boundListener);
+ rtl::OUString("Fourth"), boundListener);
fullp->removePropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")), boundListener);
+ rtl::OUString("Fourth"), boundListener);
try {
fullp->addPropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fifth")),
+ rtl::OUString("Fifth"),
boundListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->removePropertyChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fifth")),
+ rtl::OUString("Fifth"),
boundListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
css::uno::Reference< css::beans::XVetoableChangeListener > vetoListener(
new VetoListener);
fullp->addVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), vetoListener);
+ rtl::OUString("First"), vetoListener);
fullp->removeVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("First")), vetoListener);
+ rtl::OUString("First"), vetoListener);
fullp->addVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), vetoListener);
+ rtl::OUString("Second"), vetoListener);
fullp->removeVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second")), vetoListener);
+ rtl::OUString("Second"), vetoListener);
try {
fullp->addVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
vetoListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->removeVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Third")),
+ rtl::OUString("Third"),
vetoListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
fullp->addVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")), vetoListener);
+ rtl::OUString("Fourth"), vetoListener);
fullp->removeVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fourth")), vetoListener);
+ rtl::OUString("Fourth"), vetoListener);
try {
fullp->addVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fifth")),
+ rtl::OUString("Fifth"),
vetoListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
try {
fullp->removeVetoableChangeListener(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Fifth")),
+ rtl::OUString("Fifth"),
vetoListener);
CPPUNIT_FAIL("exception expected");
} catch (css::beans::UnknownPropertyException &) {}
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 4ae70ad679ab..c178e986fcc7 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -197,8 +197,8 @@ void OComponentHelper::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "unexpected UNO exception caught: ") ) +
+ OUString(
+ "unexpected UNO exception caught: ") +
exc.Message, Reference< XInterface >() );
}
}
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index ba2aeaf2233d..dc5cf91a0fee 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -228,7 +228,7 @@ Reference< XInterface > OSingleFactoryHelper::createInstanceWithArgumentsAndCont
xComp->dispose();
throw lang::IllegalArgumentException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("cannot pass arguments to component => no XInitialization implemented!") ),
+ OUString("cannot pass arguments to component => no XInitialization implemented!"),
Reference< XInterface >(), 0 );
}
}
@@ -818,7 +818,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
OUString aLocation;
Reference<XRegistryKey > xActivatorKey = xImplementationKey->openKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) );
+ OUString("/UNO/ACTIVATOR") );
if( xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII )
{
aActivatorUrl = xActivatorKey->getAsciiValue();
@@ -828,7 +828,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
aActivatorName = tmpActivator.getToken(0, ':', nIndex );
Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/LOCATION") ) );
+ OUString("/UNO/LOCATION") );
if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII )
aLocation = xLocationKey->getAsciiValue();
}
@@ -837,7 +837,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
// old style"url"
// the location of the program code of the implementation
Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/URL") ) );
+ OUString("/UNO/URL") );
// is the key of the right type ?
if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII )
{
@@ -846,14 +846,14 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
// search protocol delimiter
sal_Int32 nPos = aLocation.indexOf(
- OUString( RTL_CONSTASCII_USTRINGPARAM("://") ) );
+ OUString("://") );
if( nPos != -1 )
{
aActivatorName = aLocation.copy( 0, nPos );
if( aActivatorName.compareToAscii( "java" ) == 0 )
- aActivatorName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.Java") );
+ aActivatorName = OUString("com.sun.star.loader.Java");
else if( aActivatorName.compareToAscii( "module" ) == 0 )
- aActivatorName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary") );
+ aActivatorName = OUString("com.sun.star.loader.SharedLibrary");
aLocation = aLocation.copy( nPos + 3 );
}
}
@@ -884,7 +884,7 @@ Sequence< OUString > ORegistryFactoryHelper::getSupportedServiceNames(void)
try
{
Reference<XRegistryKey > xKey = xImplementationKey->openKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("UNO/SERVICES") ) );
+ OUString("UNO/SERVICES") );
if (xKey.is())
{
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index f983e881e911..4816c4a63832 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -287,8 +287,8 @@ void WeakComponentImplHelperBase::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "unexpected UNO exception caught: ") ) +
+ OUString(
+ "unexpected UNO exception caught: ") +
exc.Message, Reference< XInterface >() );
}
}
@@ -423,8 +423,8 @@ void WeakAggComponentImplHelperBase::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "unexpected UNO exception caught: ") ) +
+ OUString(
+ "unexpected UNO exception caught: ") +
exc.Message, Reference< XInterface >() );
}
}
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index d45409d4d021..12a3752a44e4 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -266,8 +266,7 @@ void Data::initProperties(
if (args.getLength() != 1) {
throw css::uno::RuntimeException(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "inconsistent UNO type registry")),
+ "inconsistent UNO type registry"),
css::uno::Reference< css::uno::XInterface >());
}
t = args[0];
@@ -277,8 +276,7 @@ void Data::initProperties(
if (handles > SAL_MAX_INT32) {
throw css::uno::RuntimeException(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "interface type has too many attributes")),
+ "interface type has too many attributes"),
css::uno::Reference< css::uno::XInterface >());
}
rtl::OUString name(members[i]->getMemberName());
@@ -297,8 +295,7 @@ void Data::initProperties(
{
throw css::uno::RuntimeException(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "inconsistent UNO type registry")),
+ "inconsistent UNO type registry"),
css::uno::Reference< css::uno::XInterface >());
}
handleNames->push_back(name);
@@ -517,7 +514,7 @@ rtl::OUString PropertySetMixinImpl::Impl::translateHandle(
{
if (handle < 0 || handle >= handleMap.getLength()) {
throw css::beans::UnknownPropertyException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bad handle "))
+ (rtl::OUString("bad handle ")
+ rtl::OUString::valueOf(handle)),
object);
}
@@ -589,8 +586,7 @@ void PropertySetMixinImpl::Impl::setProperty(
//TODO Clarify whether PropertyVetoException is the correct exception
// to throw when trying to set a read-only property:
throw css::beans::PropertyVetoException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("cannot set read-only property "))
+ (rtl::OUString("cannot set read-only property ")
+ name),
object);
} catch (css::lang::WrappedTargetRuntimeException & e) {
@@ -643,8 +639,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
} catch (css::lang::IllegalArgumentException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "unexpected com.sun.star.lang.IllegalArgumentException: "))
+ "unexpected com.sun.star.lang.IllegalArgumentException: ")
+ e.Message),
object);
} catch (css::lang::WrappedTargetRuntimeException & e) {
@@ -689,8 +684,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
try {
if (!(css::uno::Reference< css::reflection::XIdlField2 >(
ambiguous->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IsAmbiguous"))),
+ rtl::OUString("IsAmbiguous")),
css::uno::UNO_QUERY_THROW)->get(value)
>>= isAmbiguous))
{
@@ -704,7 +698,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
}
value = css::uno::Reference< css::reflection::XIdlField2 >(
ambiguous->getField(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value"))),
+ rtl::OUString("Value")),
css::uno::UNO_QUERY_THROW)->get(value);
} catch (css::lang::IllegalArgumentException & e) {
throw css::uno::RuntimeException(
@@ -727,8 +721,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
if (!(css::uno::Reference< css::reflection::XIdlField2 >(
defaulted->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IsDefaulted"))),
+ rtl::OUString("IsDefaulted")),
css::uno::UNO_QUERY_THROW)->get(value)
>>= isDefaulted))
{
@@ -742,7 +735,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
}
value = css::uno::Reference< css::reflection::XIdlField2 >(
defaulted->getField(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value"))),
+ rtl::OUString("Value")),
css::uno::UNO_QUERY_THROW)->get(value);
} catch (css::lang::IllegalArgumentException & e) {
throw css::uno::RuntimeException(
@@ -765,8 +758,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
bool present = false;
if (!(css::uno::Reference< css::reflection::XIdlField2 >(
optional->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IsPresent"))),
+ rtl::OUString("IsPresent")),
css::uno::UNO_QUERY_THROW)->get(value)
>>= present))
{
@@ -783,7 +775,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
}
value = css::uno::Reference< css::reflection::XIdlField2 >(
optional->getField(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value"))),
+ rtl::OUString("Value")),
css::uno::UNO_QUERY_THROW)->get(value);
} catch (css::lang::IllegalArgumentException & e) {
throw css::uno::RuntimeException(
@@ -798,8 +790,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
} else {
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "unexpected type of attribute "))
+ "unexpected type of attribute ")
+ name),
object);
}
@@ -826,8 +817,7 @@ PropertySetMixinImpl::Impl::getReflection(rtl::OUString const & typeName) const
refl.ifc = css::uno::Reference< css::reflection::XIdlReflection >(
factory->createInstanceWithContext(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.reflection.CoreReflection")),
+ "com.sun.star.reflection.CoreReflection"),
m_context),
css::uno::UNO_QUERY_THROW);
} catch (css::uno::RuntimeException &) {
@@ -865,8 +855,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
try {
css::uno::Reference< css::reflection::XIdlField2 > field(
type->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("Value"))),
+ rtl::OUString("Value")),
css::uno::UNO_QUERY_THROW);
field->set(
strct,
@@ -875,8 +864,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
wrapDefaulted, isDefaulted, wrapOptional));
css::uno::Reference< css::reflection::XIdlField2 >(
type->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IsAmbiguous"))),
+ rtl::OUString("IsAmbiguous")),
css::uno::UNO_QUERY_THROW)->set(
strct, css::uno::makeAny(isAmbiguous));
} catch (css::lang::IllegalArgumentException & e) {
@@ -906,8 +894,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
try {
css::uno::Reference< css::reflection::XIdlField2 > field(
type->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("Value"))),
+ rtl::OUString("Value")),
css::uno::UNO_QUERY_THROW);
field->set(
strct,
@@ -916,8 +903,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
false, false, wrapOptional));
css::uno::Reference< css::reflection::XIdlField2 >(
type->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IsDefaulted"))),
+ rtl::OUString("IsDefaulted")),
css::uno::UNO_QUERY_THROW)->set(
strct, css::uno::makeAny(isDefaulted));
} catch (css::lang::IllegalArgumentException & e) {
@@ -948,15 +934,13 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
try {
css::uno::Reference< css::reflection::XIdlField2 >(
type->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IsPresent"))),
+ rtl::OUString("IsPresent")),
css::uno::UNO_QUERY_THROW)->set(
strct, css::uno::makeAny(present));
if (present) {
css::uno::Reference< css::reflection::XIdlField2 > field(
type->getField(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("Value"))),
+ rtl::OUString("Value")),
css::uno::UNO_QUERY_THROW);
field->set(
strct,
@@ -986,8 +970,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
if (wrapAmbiguous || wrapDefaulted || wrapOptional) {
throw css::uno::RuntimeException(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "unexpected type of attribute")),
+ "unexpected type of attribute"),
object);
}
return value;
@@ -1027,7 +1010,7 @@ void PropertySetMixinImpl::prepareSet(
osl::MutexGuard g(m_impl->mutex);
if (m_impl->disposed) {
throw css::lang::DisposedException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("disposed")),
+ rtl::OUString("disposed"),
static_cast< css::beans::XPropertySet * >(this));
}
if ((it->second.property.Attributes
@@ -1393,10 +1376,9 @@ void PropertySetMixinImpl::setPropertyValues(
props[i].Handle)))
{
throw css::beans::UnknownPropertyException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name "))
+ (rtl::OUString("name ")
+ props[i].Name
- + rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(" does not match handle "))
+ + rtl::OUString(" does not match handle ")
+ rtl::OUString::valueOf(props[i].Handle)),
static_cast< css::beans::XPropertySet * >(this));
}
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index d2ed0cf8a524..180a05484b66 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -296,7 +296,7 @@ static void getLibEnv(oslModule lib,
const OString aStr( aEnv.getToken( 0, ';', nIndex ) );
if ( aStr.equals(implName) )
{
- *pSourceEnv_name += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":log"));
+ *pSourceEnv_name += ::rtl::OUString(":log");
break;
}
} while( nIndex != -1 );
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index 15e1d11df210..7179256f3a3a 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -78,8 +78,8 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
case STATE_NAME0:
if (bEnd || !isAlphanum(c))
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains bad descriptor name")));
+ rtl::OUString(
+ "UNO URL contains bad descriptor name"));
nStart = i;
eState = STATE_NAME;
break;
@@ -93,15 +93,15 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
}
else if (!isAlphanum(c))
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains bad descriptor name")));
+ rtl::OUString(
+ "UNO URL contains bad descriptor name"));
break;
case STATE_KEY0:
if (bEnd || !isAlphanum(c))
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains bad parameter key")));
+ rtl::OUString(
+ "UNO URL contains bad parameter key"));
nStart = i;
eState = STATE_KEY;
break;
@@ -115,8 +115,8 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
}
else if (bEnd || !isAlphanum(c))
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains bad parameter key")));
+ rtl::OUString(
+ "UNO URL contains bad parameter key"));
break;
case STATE_VALUE:
@@ -131,8 +131,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
RTL_TEXTENCODING_UTF8))).second)
throw rtl::MalformedUriException(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains duplicated parameter")));
+ "UNO URL contains duplicated parameter"));
eState = STATE_KEY0;
}
break;
@@ -223,8 +222,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
sal_Int32 j = rUrl.indexOf(';', i);
if (j < 0)
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL has too few semicolons")));
+ rtl::OUString(
+ "UNO URL has too few semicolons"));
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr< UnoUrlDescriptor::Impl >
xConnection(new UnoUrlDescriptor::Impl(rUrl.copy(i, j - i)));
@@ -233,8 +232,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
j = rUrl.indexOf(0x3B, i); // ';'
if (j < 0)
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL has too few semicolons")));
+ rtl::OUString(
+ "UNO URL has too few semicolons"));
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr< UnoUrlDescriptor::Impl >
xProtocol(new UnoUrlDescriptor::Impl(rUrl.copy(i, j - i)));
@@ -242,8 +241,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
i = j + 1;
if (i == rUrl.getLength())
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains empty ObjectName")));
+ rtl::OUString(
+ "UNO URL contains empty ObjectName"));
for (j = i; j < rUrl.getLength(); ++j)
{
sal_Unicode c = rUrl.getStr()[j];
@@ -255,8 +254,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
&& c != 0x3F && c != 0x40 && c != 0x5F // '?', '@', '_'
&& c != 0x7E) // '~'
throw rtl::MalformedUriException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "UNO URL contains invalid ObjectName")));
+ rtl::OUString(
+ "UNO URL contains invalid ObjectName"));
}
return new Impl(xConnection, xProtocol, rUrl.copy(i));
}
diff --git a/cppuhelper/test/bootstrap/TestEnv.cxx b/cppuhelper/test/bootstrap/TestEnv.cxx
index cf06790caa84..1a0d4065ea2c 100644
--- a/cppuhelper/test/bootstrap/TestEnv.cxx
+++ b/cppuhelper/test/bootstrap/TestEnv.cxx
@@ -96,10 +96,10 @@ int TestEnv::v_isValid(rtl::OUString * pReason)
int result = m_inCount & 1;
if (result)
- *pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OK"));
+ *pReason = rtl::OUString("OK");
else
- *pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not entered/invoked"));
+ *pReason = rtl::OUString("not entered/invoked");
return result;
}
diff --git a/cppuhelper/test/bootstrap/bootstrap.test.cxx b/cppuhelper/test/bootstrap/bootstrap.test.cxx
index ebbb5ca24cc6..861491072477 100644
--- a/cppuhelper/test/bootstrap/bootstrap.test.cxx
+++ b/cppuhelper/test/bootstrap/bootstrap.test.cxx
@@ -53,7 +53,7 @@ static bool s_check_object_is_in(void * pObject)
currentEnv.get()->pExtEnv->getObjectIdentifier(currentEnv.get()->pExtEnv, &pOId, pObject);
- uno::TypeDescription typeDescription(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")));
+ uno::TypeDescription typeDescription(rtl::OUString("com.sun.star.uno.XInterface"));
void * pRegisteredObject = NULL;
currentEnv.get()->pExtEnv->getRegisteredInterface(currentEnv.get()->pExtEnv,
@@ -92,11 +92,11 @@ static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPu
cppu::loadSharedLibComponentFactory(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX "TestComponent.uno" SAL_DLLEXTENSION)),
#ifdef WIN32
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ rtl::OUString(""),
#else
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file://../lib/")),
+ rtl::OUString("file://../lib/"),
#endif
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("impl.test.TestComponent")) + servicePurpose,
+ rtl::OUString("impl.test.TestComponent") + servicePurpose,
uno::Reference<lang::XMultiServiceFactory>(),
uno::Reference<registry::XRegistryKey>()
)
@@ -104,7 +104,7 @@ static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPu
if (!xItf.is())
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot no object - FAILURE\n"));
+ s_comment += rtl::OUString("\t\tgot no object - FAILURE\n");
return;
}
@@ -125,33 +125,33 @@ static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPu
static void s_test__loadSharedLibComponentFactory__free_free()
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__free_free\n"));
+ s_comment += rtl::OUString("\ts_test__loadSharedLibComponentFactory__free_free\n");
s_test__loadSharedLibComponentFactory(rtl::OUString(), rtl::OUString());
}
static void s_test__loadSharedLibComponentFactory__free_purpose()
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__free_purpose\n"));
+ s_comment += rtl::OUString("\ts_test__loadSharedLibComponentFactory__free_purpose\n");
s_test__loadSharedLibComponentFactory(rtl::OUString(),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")));
+ rtl::OUString(":testenv"));
}
static void s_test__loadSharedLibComponentFactory__purpose_free()
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__purpose_free\n"));
+ s_comment += rtl::OUString("\ts_test__loadSharedLibComponentFactory__purpose_free\n");
- s_test__loadSharedLibComponentFactory(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")),
+ s_test__loadSharedLibComponentFactory(rtl::OUString(":testenv"),
rtl::OUString());
}
static void s_test__loadSharedLibComponentFactory__purpose_purpose()
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__purpose_purpose\n"));
+ s_comment += rtl::OUString("\ts_test__loadSharedLibComponentFactory__purpose_purpose\n");
- s_test__loadSharedLibComponentFactory(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")));
+ s_test__loadSharedLibComponentFactory(rtl::OUString(":testenv"),
+ rtl::OUString(":testenv"));
}
static rtl::OUString s_getSDrive(void)
@@ -166,10 +166,10 @@ static rtl::OUString s_getSDrive(void)
path += rtl::OUString(tmp, rtl_str_getLength(tmp), RTL_TEXTENCODING_ASCII_US);
path += rtl::OUString(SAL_PATHDELIMITER);
#ifdef WIN32
- path += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bin"));
+ path += rtl::OUString("bin");
#else
- path += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("lib"));
+ path += rtl::OUString("lib");
#endif
tmp = getenv("UPDMINOREXT");
@@ -199,7 +199,7 @@ static void s_test__createSimpleRegistry(rtl::OUString const & clientPurpose)
if (!registry.is())
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot no object - FAILURE\n"));
+ s_comment += rtl::OUString("\t\tgot no object - FAILURE\n");
return;
}
@@ -213,16 +213,16 @@ static void s_test__createSimpleRegistry(rtl::OUString const & clientPurpose)
static void s_test__createSimpleRegistry__free(void)
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__createSimpleRegistry__free\n"));
+ s_comment += rtl::OUString("\ts_test__createSimpleRegistry__free\n");
s_test__createSimpleRegistry(rtl::OUString());
}
static void s_test__createSimpleRegistry__purpose(void)
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__createSimpleRegistry__purpose\n"));
+ s_comment += rtl::OUString("\ts_test__createSimpleRegistry__purpose\n");
- s_test__createSimpleRegistry(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")));
+ s_test__createSimpleRegistry(rtl::OUString(":testenv"));
}
@@ -247,7 +247,7 @@ static void s_test__bootstrap_InitialComponentContext(rtl::OUString const & clie
if (!xContext.is())
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot no object - FAILURE\n"));
+ s_comment += rtl::OUString("\t\tgot no object - FAILURE\n");
return;
}
@@ -264,16 +264,16 @@ static void s_test__bootstrap_InitialComponentContext(rtl::OUString const & clie
static void s_test__bootstrap_InitialComponentContext__free(void)
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__bootstrap_InitialComponentContext__free\n"));
+ s_comment += rtl::OUString("\ts_test__bootstrap_InitialComponentContext__free\n");
s_test__bootstrap_InitialComponentContext(rtl::OUString());
}
static void s_test__bootstrap_InitialComponentContext__purpose(void)
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__bootstrap_InitialComponentContext__purpose\n"));
+ s_comment += rtl::OUString("\ts_test__bootstrap_InitialComponentContext__purpose\n");
- s_test__bootstrap_InitialComponentContext(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")));
+ s_test__bootstrap_InitialComponentContext(rtl::OUString(":testenv"));
}
@@ -293,12 +293,12 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
int ret;
if (s_comment.indexOf("FAILURE") == -1)
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
+ s_comment += rtl::OUString("TESTS PASSED\n");
ret = 0;
}
else
{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
+ s_comment += rtl::OUString("TESTS _NOT_ PASSED\n");
ret = -1;
}
diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx
index 6dfece4a873f..4acc23c2e741 100644
--- a/cppuhelper/test/cfg_test.cxx
+++ b/cppuhelper/test/cfg_test.cxx
@@ -59,7 +59,7 @@ static Sequence< OUString > impl0_getSupportedServiceNames()
//--------------------------------------------------------------------------------------------------
static OUString impl0_getImplementationName()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.bootstrap.TestComponent0") );
+ return OUString("com.sun.star.comp.bootstrap.TestComponent0");
}
//--------------------------------------------------------------------------------------------------
static Sequence< OUString > impl1_getSupportedServiceNames()
@@ -70,7 +70,7 @@ static Sequence< OUString > impl1_getSupportedServiceNames()
//--------------------------------------------------------------------------------------------------
static OUString impl1_getImplementationName()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.bootstrap.TestComponent1") );
+ return OUString("com.sun.star.comp.bootstrap.TestComponent1");
}
//==================================================================================================
diff --git a/cppuhelper/test/loader/loader.test.cxx b/cppuhelper/test/loader/loader.test.cxx
index 466f243f52dc..cbaf7348d5e9 100644
--- a/cppuhelper/test/loader/loader.test.cxx
+++ b/cppuhelper/test/loader/loader.test.cxx
@@ -82,7 +82,7 @@ static rtl::OUString s_test__cppu_loadSharedLibComponentFactory(char const * pSe
rtl_str_getLength(pServicePurpose),
RTL_TEXTENCODING_ASCII_US);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__cppu_loadSharedLibComponentFactory "));
+ result += rtl::OUString("\ts_test__cppu_loadSharedLibComponentFactory ");
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(\""));
result += servicePurpose;
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\") - "));
@@ -92,14 +92,14 @@ static rtl::OUString s_test__cppu_loadSharedLibComponentFactory(char const * pSe
cppu::loadSharedLibComponentFactory(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX "TestComponent.uno" SAL_DLLEXTENSION)),
rtl::OUString(),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("impl.test.TestComponent")) + servicePurpose,
+ rtl::OUString("impl.test.TestComponent") + servicePurpose,
uno::Reference<lang::XMultiServiceFactory>(),
uno::Reference<registry::XRegistryKey>())
);
rtl::OUString envDcp_purpose(cppu::EnvDcp::getPurpose(g_envDcp));
if (envDcp_purpose == servicePurpose)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("passed\n"));
+ result += rtl::OUString("passed\n");
else
{
@@ -125,7 +125,7 @@ static rtl::OUString s_test__cppu_writeSharedLibComponentInfo(char const * pServ
rtl_str_getLength(pServicePurpose),
RTL_TEXTENCODING_ASCII_US);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__cppu_writeSharedLibComponentInfo "));
+ result += rtl::OUString("\ts_test__cppu_writeSharedLibComponentInfo ");
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(\""));
result += servicePurpose;
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\") - "));
@@ -146,7 +146,7 @@ static rtl::OUString s_test__cppu_writeSharedLibComponentInfo(char const * pServ
rtl::OUString envDcp_purpose(cppu::EnvDcp::getPurpose(g_envDcp));
if (envDcp_purpose == servicePurpose)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("passed\n"));
+ result += rtl::OUString("passed\n");
else
{
@@ -172,7 +172,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
rtl::OUString message;
message += rtl::OUString(argv[0], rtl_str_getLength(argv[0]), RTL_TEXTENCODING_ASCII_US);
- message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ message += rtl::OUString("\n");
message += s_test__cppu_loadSharedLibComponentFactory(":unsafe");
message += s_test__cppu_loadSharedLibComponentFactory(":affine");
@@ -183,11 +183,11 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
message += s_test__cppu_writeSharedLibComponentInfo("");
if (message.indexOf("FAILED") == -1)
- message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
+ message += rtl::OUString("TESTS PASSED\n");
else
{
- message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
+ message += rtl::OUString("TESTS _NOT_ PASSED\n");
result = -1;
}
diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx
index e23069ad047f..a5cd71daea35 100644
--- a/cppuhelper/test/testcmp/TestComponent.cxx
+++ b/cppuhelper/test/testcmp/TestComponent.cxx
@@ -98,7 +98,7 @@ uno::Reference<uno::XInterface> SAL_CALL TestComponent::create(
}
catch (std::bad_alloc &)
{
- throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")),
+ throw uno::RuntimeException(rtl::OUString("std::bad_alloc"),
uno::Reference<uno::XInterface>());
}
}
@@ -106,7 +106,7 @@ uno::Reference<uno::XInterface> SAL_CALL TestComponent::create(
uno::Sequence<rtl::OUString> SAL_CALL TestComponent::getSupportedServiceNames_Static()
{
uno::Sequence<rtl::OUString> serviceNames(1);
- serviceNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.ServiceInfo"));
+ serviceNames[0] = rtl::OUString("com.sun.star.lang.ServiceInfo");
return serviceNames;
}
diff --git a/cppuhelper/test/testhelper.cxx b/cppuhelper/test/testhelper.cxx
index 371e9aad4be0..30df8637ff43 100644
--- a/cppuhelper/test/testhelper.cxx
+++ b/cppuhelper/test/testhelper.cxx
@@ -54,21 +54,21 @@ SAL_IMPLEMENT_MAIN()
try
{
Reference< XMultiComponentFactory > xMgr( createRegistryServiceFactory(
- OUString( RTL_CONSTASCII_USTRINGPARAM("cpputest.rdb") ) ), UNO_QUERY );
+ OUString("cpputest.rdb") ), UNO_QUERY );
Reference< XComponentContext > xInitialContext;
OSL_VERIFY( Reference< beans::XPropertySet >( xMgr, UNO_QUERY )->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xInitialContext );
+ OUString("DefaultContext") ) >>= xInitialContext );
ContextEntry_Init aEntry;
aEntry.bLateInitService = false;
- aEntry.name = OUString( RTL_CONSTASCII_USTRINGPARAM("bla, bla") );
+ aEntry.name = OUString("bla, bla");
aEntry.value = makeAny( (sal_Int32)5 );
Reference< XComponentContext > xContext( createComponentContext( &aEntry, 1, xInitialContext ) );
OSL_ASSERT( xContext->getServiceManager() != xMgr ); // must be wrapped one
OSL_ASSERT(
Reference< beans::XPropertySet >(
xContext->getServiceManager(), UNO_QUERY )->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) != xInitialContext );
+ OUString("DefaultContext") ) != xInitialContext );
Reference< XMultiServiceFactory > x( xMgr, UNO_QUERY );
test_ImplHelper( x );
@@ -78,9 +78,9 @@ SAL_IMPLEMENT_MAIN()
test_interfacecontainer();
OSL_VERIFY( xContext->getValueByName(
- OUString( RTL_CONSTASCII_USTRINGPARAM("bla, bla") ) ) == (sal_Int32)5 );
+ OUString("bla, bla") ) == (sal_Int32)5 );
OSL_VERIFY( ! xInitialContext->getValueByName(
- OUString( RTL_CONSTASCII_USTRINGPARAM("bla, bla") ) ).hasValue() );
+ OUString("bla, bla") ).hasValue() );
Reference< XComponent >( xInitialContext, UNO_QUERY )->dispose();
xMgr.clear();
xContext.clear();
diff --git a/cppuhelper/test/testimplhelper.cxx b/cppuhelper/test/testimplhelper.cxx
index e00043bb36fb..37c6c3f7732b 100644
--- a/cppuhelper/test/testimplhelper.cxx
+++ b/cppuhelper/test/testimplhelper.cxx
@@ -94,25 +94,25 @@ struct TestImpl : public ImplHelper4< CA, DBA, FE, G >
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
+ { return OUString("a"); }
// BA
virtual OUString SAL_CALL ba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
+ { return OUString("ba"); }
// CA
virtual OUString SAL_CALL ca() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
+ { return OUString("ca"); }
// DBA
virtual OUString SAL_CALL dba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
+ { return OUString("dba"); }
// E
virtual OUString SAL_CALL e() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
+ { return OUString("e"); }
// FE
virtual OUString SAL_CALL fe() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
+ { return OUString("fe"); }
// G
virtual OUString SAL_CALL g() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
+ { return OUString("g"); }
};
//==================================================================================================
@@ -123,25 +123,25 @@ struct TestWeakAggImpl : public WeakAggImplHelper4< CA, DBA, FE, G >
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
+ { return OUString("a"); }
// BA
virtual OUString SAL_CALL ba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
+ { return OUString("ba"); }
// CA
virtual OUString SAL_CALL ca() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
+ { return OUString("ca"); }
// DBA
virtual OUString SAL_CALL dba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
+ { return OUString("dba"); }
// E
virtual OUString SAL_CALL e() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
+ { return OUString("e"); }
// FE
virtual OUString SAL_CALL fe() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
+ { return OUString("fe"); }
// G
virtual OUString SAL_CALL g() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
+ { return OUString("g"); }
};
//==================================================================================================
@@ -154,25 +154,25 @@ struct TestWeakImpl : public WeakImplHelper4< CA, DBA, FE, G >
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
+ { return OUString("a"); }
// BA
virtual OUString SAL_CALL ba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
+ { return OUString("ba"); }
// CA
virtual OUString SAL_CALL ca() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
+ { return OUString("ca"); }
// DBA
virtual OUString SAL_CALL dba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
+ { return OUString("dba"); }
// E
virtual OUString SAL_CALL e() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
+ { return OUString("e"); }
// FE
virtual OUString SAL_CALL fe() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
+ { return OUString("fe"); }
// G
virtual OUString SAL_CALL g() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
+ { return OUString("g"); }
protected:
TestWeakImpl(int) {}
@@ -203,25 +203,25 @@ struct TestWeakComponentImpl : public WeakComponentImplHelper4< CA, DBA, FE, G >
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
+ { return OUString("a"); }
// BA
virtual OUString SAL_CALL ba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
+ { return OUString("ba"); }
// CA
virtual OUString SAL_CALL ca() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
+ { return OUString("ca"); }
// DBA
virtual OUString SAL_CALL dba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
+ { return OUString("dba"); }
// E
virtual OUString SAL_CALL e() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
+ { return OUString("e"); }
// FE
virtual OUString SAL_CALL fe() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
+ { return OUString("fe"); }
// G
virtual OUString SAL_CALL g() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
+ { return OUString("g"); }
};
//==================================================================================================
@@ -239,25 +239,25 @@ struct TestWeakAggComponentImpl : public WeakAggComponentImplHelper4< CA, DBA, F
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
+ { return OUString("a"); }
// BA
virtual OUString SAL_CALL ba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
+ { return OUString("ba"); }
// CA
virtual OUString SAL_CALL ca() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
+ { return OUString("ca"); }
// DBA
virtual OUString SAL_CALL dba() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
+ { return OUString("dba"); }
// E
virtual OUString SAL_CALL e() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
+ { return OUString("e"); }
// FE
virtual OUString SAL_CALL fe() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
+ { return OUString("fe"); }
// G
virtual OUString SAL_CALL g() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
+ { return OUString("g"); }
};
//==================================================================================================
@@ -288,10 +288,10 @@ struct TestImplInh : public ImplInheritanceHelper2< TestWeakImpl, H, I >
// H
virtual OUString SAL_CALL h() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("h") ); }
+ { return OUString("h"); }
// I
virtual OUString SAL_CALL i() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("i") ); }
+ { return OUString("i"); }
};
//==================================================================================================
@@ -302,10 +302,10 @@ struct TestAggImplInh : public AggImplInheritanceHelper2< TestWeakAggImpl, H, I
// H
virtual OUString SAL_CALL h() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("h2") ); }
+ { return OUString("h2"); }
// I
virtual OUString SAL_CALL i() throw(RuntimeException)
- { return OUString( RTL_CONSTASCII_USTRINGPARAM("i2") ); }
+ { return OUString("i2"); }
};
@@ -485,7 +485,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
bool exc_succ = false;
lang::IllegalAccessException exc(
- OUString( RTL_CONSTASCII_USTRINGPARAM("testtest") ),
+ OUString("testtest"),
xWeakAggImpl );
// exception helper tests
try
@@ -532,7 +532,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
try
{
throwException( makeAny( RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("runtime exc") ), xImpl ) ) );
+ OUString("runtime exc"), xImpl ) ) );
}
catch (RuntimeException & rExc)
{
@@ -540,7 +540,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
try
{
throwException( makeAny( Exception(
- OUString( RTL_CONSTASCII_USTRINGPARAM("exc") ), rExc.Context ) ) );
+ OUString("exc"), rExc.Context ) ) );
}
catch (lang::IllegalAccessException &)
{
@@ -552,7 +552,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
try
{
throwException( makeAny( lang::IllegalAccessException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("axxess exc") ), rExc2.Context ) ) );
+ OUString("axxess exc"), rExc2.Context ) ) );
}
catch (lang::IllegalAccessException & rExc3)
{
diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx
index c04c4d8187ef..c67c1ecbf43e 100644
--- a/cppuhelper/test/testpropshlp.cxx
+++ b/cppuhelper/test/testpropshlp.cxx
@@ -52,17 +52,17 @@ static Property * getPropertyTable1()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString *)0) ,
+ Property( OUString("a"), 0, getCppuType( (OUString *)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //OUString
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ) ,
+ Property( OUString("b"), 1, getCppuCharType( ) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("c") ), 2, getCppuType( (sal_Int32*)0) ,
+ Property( OUString("c"), 2, getCppuType( (sal_Int32*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //sal_Int32
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("d") ), 5, getCppuType( (double*)0) ,
+ Property( OUString("d"), 5, getCppuType( (double*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //double
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("e") ), 7, getCppuBooleanType() ,
+ Property( OUString("e"), 7, getCppuBooleanType() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //BOOL
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any*)0) ,
+ Property( OUString("f"), 8, getCppuType( (Any*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) //Any
};
pTable = aTable;
@@ -81,17 +81,17 @@ static Property * getPropertyTable2()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any *)0) ,
+ Property( OUString("f"), 8, getCppuType( (Any *)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Any
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
+ Property( OUString("b"), 1, getCppuCharType( ),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
+ Property( OUString("a"), 0, getCppuType( (OUString*)0),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("d") ), 5, getCppuType( (double*)0) ,
+ Property( OUString("d"), 5, getCppuType( (double*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Double
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("c") ), 2, getCppuType( (sal_Int32*)0),
+ Property( OUString("c"), 2, getCppuType( (sal_Int32*)0),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // sal_Int32
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("e") ), 7, getCppuBooleanType() ,
+ Property( OUString("e"), 7, getCppuBooleanType() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Bool
};
pTable = aTable;
@@ -109,11 +109,11 @@ static Property * getPropertyTable3()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
+ Property( OUString("b"), 1, getCppuCharType( ),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any *)0) ,
+ Property( OUString("f"), 8, getCppuType( (Any *)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // any
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
+ Property( OUString("a"), 0, getCppuType( (OUString*)0),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // OUString
};
pTable = aTable;
@@ -132,11 +132,11 @@ static Property * getPropertyTable4()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
+ Property( OUString("a"), 0, getCppuType( (OUString*)0),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
+ Property( OUString("b"), 1, getCppuCharType( ),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 2, getCppuType( (Any *)0) ,
+ Property( OUString("f"), 2, getCppuType( (Any *)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Any
};
pTable = aTable;
@@ -220,10 +220,10 @@ void test_PropertyArrayHelper()
OSL_ENSURE( aP.Type == getPropertyTable1()[i].Type, "Type not correct" );
}
- OSL_ENSURE( !a1.hasPropertyByName( OUString( RTL_CONSTASCII_USTRINGPARAM("never exist") ) ), "hasPropertyByName not correct" );
+ OSL_ENSURE( !a1.hasPropertyByName( OUString("never exist") ), "hasPropertyByName not correct" );
try
{
- a1.getPropertyByName( OUString( RTL_CONSTASCII_USTRINGPARAM("never exist") ) );
+ a1.getPropertyByName( OUString("never exist") );
OSL_FAIL( "exeption not thrown" );
}
catch( UnknownPropertyException & )
@@ -239,7 +239,7 @@ void test_PropertyArrayHelper()
sal_Int32 Handle = a1.getHandleByName( getPropertyTable1()[i].Name );
OSL_ENSURE( Handle == getPropertyTable1()[i].Handle, "Handle not correct" );
}
- sal_Int32 Handle = a1.getHandleByName( OUString( RTL_CONSTASCII_USTRINGPARAM("asdaf") ) );
+ sal_Int32 Handle = a1.getHandleByName( OUString("asdaf") );
OSL_ENSURE( Handle == -1, "Handle not correct" );
}
@@ -277,10 +277,10 @@ void test_PropertyArrayHelper()
Sequence< OUString > aS( 4 );
sal_Int32 Handles[4];
// muss sortiert sein
- aS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("a") );
- aS.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("d") );
- aS.getArray()[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("f") );
- aS.getArray()[3] = OUString( RTL_CONSTASCII_USTRINGPARAM("t") );
+ aS.getArray()[0] = OUString("a");
+ aS.getArray()[1] = OUString("d");
+ aS.getArray()[2] = OUString("f");
+ aS.getArray()[3] = OUString("t");
sal_Int32 nHitCount = a1.fillHandles( Handles, aS );
OSL_ENSURE( nHitCount == 3, "wrong number of hits " );
OSL_ENSURE( Handles[0] == getPropertyTable1()[0].Handle, "Handle not correct" );
@@ -408,11 +408,11 @@ Property * getBasicProps()
static Property aBasicProps[PROPERTY_COUNT] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ) , PROPERTY_BOOL , getCppuBooleanType(), PropertyAttribute::READONLY ),
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ) , PROPERTY_INT16,
+ Property( OUString("BOOL") , PROPERTY_BOOL , getCppuBooleanType(), PropertyAttribute::READONLY ),
+ Property( OUString("INT16") , PROPERTY_INT16,
getCppuType( (sal_Int16*)0 ), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ),
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ) , PROPERTY_INT32, getCppuType( (sal_Int32*)0 ), PropertyAttribute::BOUND ),
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("TEST") ) , 55 , getCppuType( (sal_Int32*)0), PropertyAttribute::BOUND )
+ Property( OUString("INT32") , PROPERTY_INT32, getCppuType( (sal_Int32*)0 ), PropertyAttribute::BOUND ),
+ Property( OUString("TEST") , 55 , getCppuType( (sal_Int32*)0), PropertyAttribute::BOUND )
};
pTable = aBasicProps;
}
@@ -468,13 +468,13 @@ public:
case PROPERTY_BOOL:
{
OSL_FAIL( "PropertySetHelper: BOOL cannot change" );
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("BOOL"), "PropertySetHelper: wrong name" );
}
break;
case PROPERTY_INT16:
{
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("INT16"), "PropertySetHelper: wrong name" );
OSL_ENSURE( pExceptedListenerValues[nCurrent].getValueType().getTypeClass() == TypeClass_SHORT ,
"PropertySetHelper: wrong data type" );
@@ -493,7 +493,7 @@ public:
case PROPERTY_INT32:
{
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("INT32"), "PropertySetHelper: wrong name" );
sal_Int32 nInt32(0),nOldInt32(0);
@@ -526,13 +526,13 @@ public:
case PROPERTY_BOOL:
{
OSL_FAIL( "PropertySetHelper: BOOL cannot change" );
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("BOOL"), "PropertySetHelper: wrong name" );
}
break;
case PROPERTY_INT16:
{
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("INT16"), "PropertySetHelper: wrong name" );
sal_Int16 nInt16(0), nOldInt16(0);
pExceptedListenerValues[nCurrent] >>= nInt16;
@@ -554,7 +554,7 @@ public:
case PROPERTY_INT32:
{
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("INT32"), "PropertySetHelper: wrong name" );
sal_Int32 nInt32(0),nOldInt32(0);
pExceptedListenerValues[nCurrent] >>= nInt32;
@@ -589,13 +589,13 @@ public:
case PROPERTY_BOOL:
{
OSL_FAIL( "PropertySetHelper: BOOL cannot change" );
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("BOOL"), "PropertySetHelper: wrong name" );
}
break;
case PROPERTY_INT16:
{
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("INT16"), "PropertySetHelper: wrong name" );
sal_Int16 nInt16(0), nOldInt16(0);
pExceptedListenerValues[nCurrent] >>= nInt16;
@@ -611,7 +611,7 @@ public:
case PROPERTY_INT32:
{
- OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), "PropertySetHelper: wrong name" );
+ OSL_ENSURE( evt.PropertyName == OUString("INT32"), "PropertySetHelper: wrong name" );
sal_Int32 nInt32(0),nOldInt32(0);
@@ -804,26 +804,26 @@ void test_PropertySetHelper()
Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
- xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
+ xPS->addPropertyChangeListener( OUString("INT16"), xPS_L );
Sequence<OUString> szPN( 3 );
- szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
- szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
- szPN.getArray()[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ); // must ne ignored by the addPropertiesChangeListener method
+ szPN.getArray()[0] = OUString("BOOL");
+ szPN.getArray()[1] = OUString("INT32");
+ szPN.getArray()[2] = OUString("Does not exist"); // must ne ignored by the addPropertiesChangeListener method
pPS->addPropertiesChangeListener( szPN, x1 );
szPN = Sequence<OUString>();
pPS->addPropertiesChangeListener( szPN, x1 );
- pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
+ pPS->addVetoableChangeListener( OUString("INT16"), x2 );
- xPS->removePropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
+ xPS->removePropertyChangeListener( OUString("INT16"), xPS_L );
pPS->removePropertiesChangeListener( x1 );
pPS->removePropertiesChangeListener( x1 );
- pPS->removeVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
+ pPS->removeVetoableChangeListener( OUString("INT16"), x2 );
// this exception must thrown
try
{
- xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), xPS_L );
+ xPS->addPropertyChangeListener( OUString("Does not exist"), xPS_L );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( UnknownPropertyException & /*e*/ )
@@ -833,7 +833,7 @@ void test_PropertySetHelper()
try
{
- xPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), x2 );
+ xPS->addVetoableChangeListener( OUString("Does not exist"), x2 );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( UnknownPropertyException & /*e*/ )
@@ -849,14 +849,14 @@ void test_PropertySetHelper()
Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
- xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
+ xPS->addPropertyChangeListener( OUString("INT16"), xPS_L );
Sequence<OUString> szPN( 2 );
- szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
- szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
+ szPN.getArray()[0] = OUString("BOOL");
+ szPN.getArray()[1] = OUString("INT32");
pPS->addPropertiesChangeListener( szPN, x1 );
szPN = Sequence<OUString>();
pPS->addPropertiesChangeListener( szPN, x1 );
- pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
+ pPS->addVetoableChangeListener( OUString("INT16"), x2 );
pPS->dispose();
}
OSL_ENSURE( pPS_L->nDisposing == 4 , "PropertySetHelper: wrong disposing count" );
@@ -873,7 +873,7 @@ void test_PropertySetHelper()
sal_Bool b = sal_True;
Any aBool;
aBool.setValue( &b , getCppuBooleanType() );
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), aBool );
+ xPS->setPropertyValue( OUString("BOOL"), aBool );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( PropertyVetoException & /*e*/ )
@@ -900,7 +900,7 @@ void test_PropertySetHelper()
sal_Bool b = sal_True;
Any aBool;
aBool.setValue( &b , getCppuBooleanType() );
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), aBool );
+ xPS->setPropertyValue( OUString("Does not exist"), aBool );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( UnknownPropertyException & /*e*/ )
@@ -923,7 +923,7 @@ void test_PropertySetHelper()
try
{
Any aBool;
- aBool = xPS->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ) );
+ aBool = xPS->getPropertyValue( OUString("Does not exist") );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( UnknownPropertyException & /*e*/ )
@@ -944,7 +944,7 @@ void test_PropertySetHelper()
try
{
Any aBool;
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), aBool );
+ xPS->setPropertyValue( OUString("INT32"), aBool );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( IllegalArgumentException & /*e*/ )
@@ -966,7 +966,7 @@ void test_PropertySetHelper()
{
Any aINT32;
aINT32 <<= (sal_Int32 ) 16;
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), aINT32 );
+ xPS->setPropertyValue( OUString("INT16"), aINT32 );
OSL_FAIL( "PropertySetHelper: exeption not thrown" );
}
catch( IllegalArgumentException & /*e*/ )
@@ -987,7 +987,7 @@ void test_PropertySetHelper()
Any aValue;
- aValue = xPS->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ) );
+ aValue = xPS->getPropertyValue( OUString("BOOL") );
sal_Bool b = *( (sal_Bool*)aValue.getValue());
OSL_ENSURE( ! b, "PropertySetHelper: wrong BOOL value" );
aValue = ((XFastPropertySet *)pPS)->getFastPropertyValue( PROPERTY_BOOL );
@@ -997,8 +997,8 @@ void test_PropertySetHelper()
sal_Int16 n16(0);
aValue <<=(sal_Int16)22;
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), aValue );
- aValue = xPS->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ) );
+ xPS->setPropertyValue( OUString("INT16"), aValue );
+ aValue = xPS->getPropertyValue( OUString("INT16") );
aValue >>= n16;
OSL_ENSURE( 22 == n16 , "PropertySetHelper: wrong INT16 value" );
aValue <<= (sal_Int16)44;
@@ -1010,8 +1010,8 @@ void test_PropertySetHelper()
// widening conversion
aValue <<= (sal_Int16)55;
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), aValue );
- aValue = xPS->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ) );
+ xPS->setPropertyValue( OUString("INT32"), aValue );
+ aValue = xPS->getPropertyValue( OUString("INT32") );
sal_Int32 n32(0);
aValue >>= n32;
OSL_ENSURE( 55 == n32 , "PropertySetHelper: wrong INT32 value" );
@@ -1022,9 +1022,9 @@ void test_PropertySetHelper()
OSL_ENSURE( 66 == n32, "PropertySetHelper: wrong INT32 value" );
Sequence< OUString >valueNames = Sequence<OUString>( 3 );
- valueNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
- valueNames.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
- valueNames.getArray()[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
+ valueNames.getArray()[0] = OUString("BOOL");
+ valueNames.getArray()[1] = OUString("INT16");
+ valueNames.getArray()[2] = OUString("INT32");
Sequence< Any > aValues = pPS->getPropertyValues( valueNames );
b = *((sal_Bool*)aValues.getConstArray()[0].getValue());
@@ -1042,8 +1042,8 @@ void test_PropertySetHelper()
{
Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
- xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
- pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
+ xPS->addPropertyChangeListener( OUString("INT16"), xPS_L );
+ pPS->addVetoableChangeListener( OUString("INT16"), x2 );
pPS_L->nCount = 10;
Sequence< Any > aSeq( pPS_L->nCount );
@@ -1064,7 +1064,7 @@ void test_PropertySetHelper()
Any aValue;
aValue <<= (sal_Int16)22;
- xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), aValue );
+ xPS->setPropertyValue( OUString("INT16"), aValue );
aValue <<= (sal_Int16) 44;
((XFastPropertySet *)pPS)->setFastPropertyValue( PROPERTY_INT16, aValue );
aValue <<= (sal_Int16)100;// exception
@@ -1084,8 +1084,8 @@ void test_PropertySetHelper()
pPS_L->nCount = 0;
pPS_L->nCurrent = 0;
pPS_L->pExceptedListenerValues = NULL;
- xPS->removePropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
- pPS->removeVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
+ xPS->removePropertyChangeListener( OUString("INT16"), xPS_L );
+ pPS->removeVetoableChangeListener( OUString("INT16"), x2 );
}
// Test multi property set listener
@@ -1093,12 +1093,12 @@ void test_PropertySetHelper()
Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
- pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ) , x2 );
+ pPS->addVetoableChangeListener( OUString("INT16") , x2 );
Sequence<OUString> szPN( 4 );
- szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
- szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
- szPN.getArray()[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ); // must ne ignored by the addPropertiesChangeListener method
- szPN.getArray()[3] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
+ szPN.getArray()[0] = OUString("BOOL");
+ szPN.getArray()[1] = OUString("INT32");
+ szPN.getArray()[2] = OUString("Does not exist"); // must ne ignored by the addPropertiesChangeListener method
+ szPN.getArray()[3] = OUString("INT16");
pPS->addPropertiesChangeListener( szPN, x1 );
pPS_L->nCount = 6;
@@ -1114,8 +1114,8 @@ void test_PropertySetHelper()
pPS_L->pExceptedListenerValues[5] <<= (sal_Int32) 44; // new value bound
szPN = Sequence<OUString>( 2 );
- szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
- szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
+ szPN.getArray()[0] = OUString("INT16");
+ szPN.getArray()[1] = OUString("INT32");
Sequence< Any > aValues( 2 );
aValues.getArray()[0] <<= (sal_Int16) 22;
aValues.getArray()[1] <<= (sal_Int16) 44;
@@ -1136,8 +1136,8 @@ void test_PropertySetHelper()
//vetoable exception with multible
- szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
- szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
+ szPN.getArray()[0] = OUString("INT16");
+ szPN.getArray()[1] = OUString("INT16");
pPS->nINT32 = 0;
pPS->nINT16 = 0;
pPS_L->nCount = 4;
@@ -1160,7 +1160,7 @@ void test_PropertySetHelper()
OSL_ENSURE( pPS_L->nCount == pPS_L->nCurrent, "not all listeners called" );
pPS->removePropertiesChangeListener( x1 );
- pPS->removeVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
+ pPS->removeVetoableChangeListener( OUString("INT16"), x2 );
}
}
}
diff --git a/cppuhelper/test/testproptyphlp.cxx b/cppuhelper/test/testproptyphlp.cxx
index c4d3dae742a0..d52515bff05e 100644
--- a/cppuhelper/test/testproptyphlp.cxx
+++ b/cppuhelper/test/testproptyphlp.cxx
@@ -56,7 +56,7 @@ void testPropertyTypeHelper()
::com::sun::star::beans::Property prop;
- prop.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Huhu") );
+ prop.Name = rtl::OUString("Huhu");
prop.Handle = 5;
prop.Attributes = 3;