From e2e2cc61144cb22227eebfadff0ea24b51ccfbd0 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Mon, 6 May 2013 16:32:22 +0200 Subject: remove usage of RTL_CONSTASCII_USTRINGPARAM Mechanical removal of usage together with OUString ctor, done by compiler plugin. Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5 --- cppuhelper/source/component_context.cxx | 2 +- cppuhelper/source/macro_expander.cxx | 2 +- cppuhelper/source/propertysetmixin.cxx | 51 +++++++++++---------------------- cppuhelper/source/tdmgr.cxx | 2 +- cppuhelper/source/unourl.cxx | 4 +-- 5 files changed, 22 insertions(+), 39 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index b95d50e1f304..7d417788238f 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -860,7 +860,7 @@ Reference< XComponentContext > SAL_CALL createComponentContext( SAL_THROW(()) { uno::Environment curr_env(Environment::getCurrent()); - uno::Environment source_env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))); + uno::Environment source_env(rtl::OUString(CPPU_STRINGIFY(CPPU_ENV))); uno::Mapping curr2source(curr_env, source_env); uno::Mapping source2curr(source_env, curr_env); diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index 3553d182b70c..72ff90a4114e 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -197,7 +197,7 @@ Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_facto s_get_service_names() )); uno::Environment curr_env(Environment::getCurrent()); - uno::Environment target_env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))); + uno::Environment target_env(rtl::OUString(CPPU_STRINGIFY(CPPU_ENV))); uno::Mapping target2curr(target_env, curr_env); diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index 12a3752a44e4..f1d7c5261046 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -485,18 +485,16 @@ PropertySetMixinImpl::Impl::Impl( css::uno::Reference< css::container::XHierarchicalNameAccess >( m_context->getValueByName( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.reflection." - "theTypeDescriptionManager"))), + "theTypeDescriptionManager")), css::uno::UNO_QUERY_THROW)->getByHierarchicalName( m_type.getTypeName()), css::uno::UNO_QUERY_THROW); } catch (css::container::NoSuchElementException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.container.NoSuchElementException: ")) + " com.sun.star.container.NoSuchElementException: ") + e.Message), css::uno::Reference< css::uno::XInterface >()); } @@ -541,9 +539,8 @@ void PropertySetMixinImpl::Impl::setProperty( { throw css::lang::IllegalArgumentException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "flagging as ambiguous/defaulted non-ambiguous/defaulted" - " property ")) + " property ") + name), object, illegalArgumentPosition); } @@ -576,9 +573,8 @@ void PropertySetMixinImpl::Impl::setProperty( } else { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalArgumentException: ")) + " com.sun.star.lang.IllegalArgumentException: ") + e.Message), object); } @@ -690,10 +686,9 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty( { throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected type of" " com.sun.star.beans.Ambiguous IsAmbiguous" - " member")), + " member"), object); } value = css::uno::Reference< css::reflection::XIdlField2 >( @@ -703,9 +698,8 @@ 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: ")) + "IllegalArgumentException: ") + e.Message), object); } @@ -727,10 +721,9 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty( { throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected type of" " com.sun.star.beans.Defaulted IsDefaulted" - " member")), + " member"), object); } value = css::uno::Reference< css::reflection::XIdlField2 >( @@ -740,9 +733,8 @@ 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: ")) + "IllegalArgumentException: ") + e.Message), object); } @@ -764,9 +756,8 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty( { throw css::uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected type of com.sun.star.beans.Optional" - " IsPresent member")), + " IsPresent member"), object); } if (!present) { @@ -780,9 +771,8 @@ 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: ")) + "IllegalArgumentException: ") + e.Message), object); } @@ -825,9 +815,8 @@ PropertySetMixinImpl::Impl::getReflection(rtl::OUString const & typeName) const } catch (css::uno::Exception & e) { throw css::uno::DeploymentException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "component context fails to supply service" - " com.sun.star.reflection.CoreReflection: ")) + " com.sun.star.reflection.CoreReflection: ") + e.Message), m_context); } @@ -870,17 +859,15 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( } catch (css::lang::IllegalArgumentException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalArgumentException: ")) + " com.sun.star.lang.IllegalArgumentException: ") + e.Message), object); } catch (css::lang::IllegalAccessException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalAccessException: ")) + " com.sun.star.lang.IllegalAccessException: ") + e.Message), object); } @@ -909,17 +896,15 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( } catch (css::lang::IllegalArgumentException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalArgumentException: ")) + " com.sun.star.lang.IllegalArgumentException: ") + e.Message), object); } catch (css::lang::IllegalAccessException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalAccessException: ")) + " com.sun.star.lang.IllegalAccessException: ") + e.Message), object); } @@ -951,17 +936,15 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( } catch (css::lang::IllegalArgumentException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalArgumentException: ")) + " com.sun.star.lang.IllegalArgumentException: ") + e.Message), object); } catch (css::lang::IllegalAccessException & e) { throw css::uno::RuntimeException( (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "unexpected" - " com.sun.star.lang.IllegalAccessException: ")) + " com.sun.star.lang.IllegalAccessException: ") + e.Message), object); } diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index e230c1514689..f838adfdd8c7 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -748,7 +748,7 @@ sal_Bool SAL_CALL installTypeDescriptionManager( SAL_THROW(()) { uno::Environment curr_env(Environment::getCurrent()); - uno::Environment target_env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))); + uno::Environment target_env(rtl::OUString(CPPU_STRINGIFY(CPPU_ENV))); uno::Mapping curr2target(curr_env, target_env); diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx index 7179256f3a3a..3e7f5578cef5 100644 --- a/cppuhelper/source/unourl.cxx +++ b/cppuhelper/source/unourl.cxx @@ -216,8 +216,8 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) { if (!rUrl.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("uno:"), 0)) throw rtl::MalformedUriException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "UNO URL does not start with \"uno:\""))); + rtl::OUString( + "UNO URL does not start with \"uno:\"")); sal_Int32 i = RTL_CONSTASCII_LENGTH("uno:"); sal_Int32 j = rUrl.indexOf(';', i); if (j < 0) -- cgit