summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /cppu
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'cppu')
-rw-r--r--cppu/qa/test_any.cxx85
-rw-r--r--cppu/source/uno/lbenv.cxx3
-rw-r--r--cppu/source/uno/lbmap.cxx2
3 files changed, 23 insertions, 67 deletions
diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index 415f2a402c42..404f1b81e2c2 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -308,9 +308,7 @@ void Test::testVoid() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -408,9 +406,7 @@ void Test::testBoolean() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -509,9 +505,7 @@ void Test::testByte() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -610,9 +604,7 @@ void Test::testShort() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -713,9 +705,7 @@ void Test::testUnsignedShort() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -810,9 +800,7 @@ void Test::testLong() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -907,9 +895,7 @@ void Test::testUnsignedLong() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1004,9 +990,7 @@ void Test::testHyper() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1101,9 +1085,7 @@ void Test::testUnsignedHyper() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1198,9 +1180,7 @@ void Test::testFloat() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1295,9 +1275,7 @@ void Test::testDouble() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1397,9 +1375,7 @@ void Test::testChar() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1494,9 +1470,7 @@ void Test::testString() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- (a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", (a >>= b) && b == "1" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1591,9 +1565,7 @@ void Test::testType() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1689,9 +1661,7 @@ void Test::testSequence() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1792,9 +1762,7 @@ void Test::testEnum() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1893,9 +1861,7 @@ void Test::testStruct() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -1949,10 +1915,7 @@ void Test::testStruct() {
void Test::testPoly() {
css::uno::Any a;
a <<= Poly< css::uno::Sequence< ::sal_Unicode > >();
- CPPUNIT_ASSERT_MESSAGE(
- "type name",
- a.getValueType().getTypeName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("Poly<[]char>")));
+ CPPUNIT_ASSERT_MESSAGE( "type name", a.getValueType().getTypeName() == "Poly<[]char>" );
CPPUNIT_ASSERT_MESSAGE(
"constructor",
a == css::uno::Any(Poly< css::uno::Sequence< ::sal_Unicode > >()));
@@ -2018,9 +1981,7 @@ void Test::testException() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -2136,9 +2097,7 @@ void Test::testInterface() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
@@ -2252,9 +2211,7 @@ void Test::testNull() {
}
{
rtl::OUString b(RTL_CONSTASCII_USTRINGPARAM("2"));
- CPPUNIT_ASSERT_MESSAGE(
- "rtl::OUString",
- !(a >>= b) && b.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")));
+ CPPUNIT_ASSERT_MESSAGE( "rtl::OUString", !(a >>= b) && b == "2" );
}
{
css::uno::Type b(getCppuType< rtl::OUString >());
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 7a4d493ccc76..47ca98f3158e 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -217,8 +217,7 @@ inline InterfaceEntry * ObjectEntry::find(
OUString const & type_name =
OUString::unacquired(
&((typelib_TypeDescription *) pTypeDescr_)->pTypeName );
- if (type_name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.uno.XInterface") ))
+ if ( type_name == "com.sun.star.uno.XInterface" )
{
return &aInterfaces[ 0 ];
}
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 0dab9016732c..f7aad32d6062 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -427,7 +427,7 @@ static Mapping loadExternalMapping(
oslModule hModule = 0;
OUString aName;
- if (EnvDcp::getTypeName(rFrom.getTypeName()).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_LB_UNO) ))
+ if ( EnvDcp::getTypeName(rFrom.getTypeName()) == UNO_LB_UNO )
hModule = loadModule( aName = getBridgeName( rTo, rFrom, rAddPurpose ) );
if (! hModule)
hModule = loadModule( aName = getBridgeName( rFrom, rTo, rAddPurpose ) );