diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 12:06:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 14:43:34 +0200 |
commit | 6f50961e69406a17d6ec998956a6b33208b1001b (patch) | |
tree | 413c83df969e73c5cba1e11ef3740afc748ee1f5 /cppuhelper | |
parent | 4e729de73f2947155248f8df5897380611b87917 (diff) |
remove more rtl::OUString and OString prefixes
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
29 files changed, 528 insertions, 552 deletions
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx index 2a4bc64ab703..5df856146063 100644 --- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx +++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx @@ -209,7 +209,7 @@ namespace cppu_ifcontainer ::cppu::UnoType< ::sal_uInt32 >::get(), ::cppu::UnoType< ::sal_Int32 >::get(), ::cppu::UnoType< ::sal_Int16 >::get(), - ::cppu::UnoType< ::rtl::OUString >::get(), + ::cppu::UnoType< OUString >::get(), ::cppu::UnoType< ::sal_Int8 >::get() }; doContainerTest< cppu::OMultiTypeInterfaceContainerHelper, diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx index 5e8ce06b7ef0..2447c816522f 100644 --- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx @@ -63,7 +63,7 @@ public: css::uno::Reference< css::uno::XComponentContext > const & context): cppu::PropertySetMixin< css::lang::XComponent >( context, static_cast< Implements >(0), - css::uno::Sequence< rtl::OUString >()) + css::uno::Sequence< OUString >()) {} virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) @@ -121,7 +121,7 @@ public: static_cast< Implements >( IMPLEMENTS_PROPERTY_SET | IMPLEMENTS_FAST_PROPERTY_SET | IMPLEMENTS_PROPERTY_ACCESS), - css::uno::Sequence< rtl::OUString >()) + css::uno::Sequence< OUString >()) {} virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) @@ -167,8 +167,8 @@ css::uno::Any Empty2::queryInterface(css::uno::Type const & type) type); } -css::uno::Sequence< rtl::OUString > sequenceThird() { - css::uno::Sequence<OUString> s { rtl::OUString("Third") }; +css::uno::Sequence< OUString > sequenceThird() { + css::uno::Sequence<OUString> s { OUString("Third") }; return s; } @@ -273,7 +273,7 @@ sal_Int32 Full::getFirst() throw (css::uno::RuntimeException) { void Full::setFirst(sal_Int32 value) throw (css::uno::RuntimeException) { prepareSet( - rtl::OUString("First"), css::uno::Any(), + OUString("First"), css::uno::Any(), css::uno::Any(), 0); osl::MutexGuard g(m_mutex); m_a1 = value; @@ -302,7 +302,7 @@ void Full::setSecond( } BoundListeners l; prepareSet( - rtl::OUString("Second"), css::uno::Any(), + OUString("Second"), css::uno::Any(), v, &l); { osl::MutexGuard g(m_mutex); @@ -315,7 +315,7 @@ sal_Int32 Full::getThird() throw (css::beans::UnknownPropertyException, css::uno::RuntimeException) { throw css::beans::UnknownPropertyException( - rtl::OUString("Third"), + OUString("Third"), static_cast< cppu::OWeakObject * >(this)); } @@ -323,7 +323,7 @@ void Full::setThird(sal_Int32) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException) { throw css::beans::UnknownPropertyException( - rtl::OUString("Third"), + OUString("Third"), static_cast< cppu::OWeakObject * >(this)); } @@ -331,7 +331,7 @@ sal_Int32 Full::getFourth() throw (css::beans::UnknownPropertyException, css::uno::RuntimeException) { throw css::beans::UnknownPropertyException( - rtl::OUString("Fourth"), + OUString("Fourth"), static_cast< cppu::OWeakObject * >(this)); } @@ -339,7 +339,7 @@ void Full::setFourth(sal_Int32) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException) { throw css::beans::UnknownPropertyException( - rtl::OUString("Fourth"), + OUString("Fourth"), static_cast< cppu::OWeakObject * >(this)); } @@ -379,14 +379,14 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL create( return static_cast< cppu::OWeakObject * >(new Supplier(context)); } -rtl::OUString SAL_CALL getImplementationName() { - return rtl::OUString( +OUString SAL_CALL getImplementationName() { + return OUString( "test.cppuhelper.propertysetmixin.comp.CppSupplier"); } -css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() +css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() { - css::uno::Sequence< rtl::OUString > s { "test.cppuhelper.propertysetmixin.CppSupplier") }; + css::uno::Sequence< OUString > s { "test.cppuhelper.propertysetmixin.CppSupplier") }; return s; } diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx index 5fa8cd1794ce..cff87436ce2c 100644 --- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx @@ -68,8 +68,8 @@ namespace com { namespace sun { namespace star { namespace { -std::ostream & operator <<(std::ostream & out, rtl::OUString const & value) { - return out << rtl::OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); +std::ostream & operator <<(std::ostream & out, OUString const & value) { + return out << OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); } std::ostream & operator <<(std::ostream & out, css::uno::Type const & value) { @@ -254,34 +254,34 @@ void Test::testEmpty2( static_cast< sal_Int32 >(0), info->getProperties().getLength()); try { info->getPropertyByName( - rtl::OUString("any")); + OUString("any")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} CPPUNIT_ASSERT( !info->hasPropertyByName( - rtl::OUString("any"))); + OUString("any"))); try { empty2p->setPropertyValue( - rtl::OUString("any"), css::uno::Any()); + OUString("any"), css::uno::Any()); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { empty2p->getPropertyValue( - rtl::OUString("any")); + OUString("any")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} rtl::Reference< BoundListener > boundListener1(new BoundListener); - empty2p->addPropertyChangeListener(rtl::OUString(), boundListener1.get()); - empty2p->addPropertyChangeListener(rtl::OUString(), boundListener1.get()); + empty2p->addPropertyChangeListener(OUString(), boundListener1.get()); + empty2p->addPropertyChangeListener(OUString(), boundListener1.get()); rtl::Reference< BoundListener > boundListener2(new BoundListener); empty2p->removePropertyChangeListener( - rtl::OUString(), boundListener2.get()); + OUString(), boundListener2.get()); rtl::Reference< VetoListener > vetoListener1(new VetoListener); - empty2p->addVetoableChangeListener(rtl::OUString(), vetoListener1.get()); - empty2p->addVetoableChangeListener(rtl::OUString(), vetoListener1.get()); + empty2p->addVetoableChangeListener(OUString(), vetoListener1.get()); + empty2p->addVetoableChangeListener(OUString(), vetoListener1.get()); rtl::Reference< VetoListener > vetoListener2(new VetoListener); - empty2p->addVetoableChangeListener(rtl::OUString(), vetoListener2.get()); - empty2p->removeVetoableChangeListener(rtl::OUString(), vetoListener2.get()); + empty2p->addVetoableChangeListener(OUString(), vetoListener2.get()); + empty2p->removeVetoableChangeListener(OUString(), vetoListener2.get()); css::uno::Reference< css::beans::XFastPropertySet > empty2f( empty2, css::uno::UNO_QUERY); CPPUNIT_ASSERT(empty2f.is()); @@ -309,10 +309,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("any1"); + vs[0].Name = OUString("any1"); vs[0].Handle = -1; vs[0].State = css::beans::PropertyState_DIRECT_VALUE; - vs[0].Name = rtl::OUString("any2"); + vs[0].Name = OUString("any2"); vs[0].Handle = -1; vs[0].State = css::beans::PropertyState_DIRECT_VALUE; try { @@ -329,23 +329,23 @@ void Test::testEmpty2( CPPUNIT_ASSERT_EQUAL(2, vetoListener1->count()); CPPUNIT_ASSERT_EQUAL(0, vetoListener2->count()); empty2p->removePropertyChangeListener( - rtl::OUString(), boundListener1.get()); + OUString(), boundListener1.get()); empty2p->removePropertyChangeListener( - rtl::OUString(), boundListener2.get()); - empty2p->removeVetoableChangeListener(rtl::OUString(), vetoListener1.get()); - empty2p->removeVetoableChangeListener(rtl::OUString(), vetoListener2.get()); - empty2p->addPropertyChangeListener(rtl::OUString(), boundListener1.get()); - empty2p->addPropertyChangeListener(rtl::OUString(), boundListener2.get()); - empty2p->addVetoableChangeListener(rtl::OUString(), vetoListener1.get()); - empty2p->addVetoableChangeListener(rtl::OUString(), vetoListener2.get()); + OUString(), boundListener2.get()); + empty2p->removeVetoableChangeListener(OUString(), vetoListener1.get()); + empty2p->removeVetoableChangeListener(OUString(), vetoListener2.get()); + empty2p->addPropertyChangeListener(OUString(), boundListener1.get()); + empty2p->addPropertyChangeListener(OUString(), boundListener2.get()); + empty2p->addVetoableChangeListener(OUString(), vetoListener1.get()); + empty2p->addVetoableChangeListener(OUString(), vetoListener2.get()); try { empty2p->addPropertyChangeListener( - rtl::OUString(), + OUString(), css::uno::Reference< css::beans::XPropertyChangeListener >()); } catch (css::uno::RuntimeException &) {} try { empty2p->addVetoableChangeListener( - rtl::OUString(), + OUString(), css::uno::Reference< css::beans::XVetoableChangeListener >()); } catch (css::uno::RuntimeException &) {} CPPUNIT_ASSERT_EQUAL(3, boundListener1->count()); @@ -370,16 +370,16 @@ void Test::testFull( static_cast< sal_Int32 >(3), info->getProperties().getLength()); css::beans::Property prop( info->getPropertyByName( - rtl::OUString("First"))); + OUString("First"))); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("First"), prop.Name); + OUString("First"), prop.Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), prop.Handle); CPPUNIT_ASSERT_EQUAL(cppu::UnoType<sal_Int32>::get(), prop.Type); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int16 >(0), prop.Attributes); prop = info->getPropertyByName( - rtl::OUString("Second")); + OUString("Second")); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("Second"), prop.Name); + OUString("Second"), prop.Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(1), prop.Handle); CPPUNIT_ASSERT_EQUAL(cppu::UnoType<sal_Int32>::get(), prop.Type); CPPUNIT_ASSERT_EQUAL( @@ -393,13 +393,13 @@ void Test::testFull( prop.Attributes); try { info->getPropertyByName( - rtl::OUString("Third")); + OUString("Third")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} prop = info->getPropertyByName( - rtl::OUString("Fourth")); + OUString("Fourth")); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("Fourth"), prop.Name); + OUString("Fourth"), prop.Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(3), prop.Handle); CPPUNIT_ASSERT_EQUAL(cppu::UnoType<sal_Int32>::get(), prop.Type); CPPUNIT_ASSERT_EQUAL( @@ -407,93 +407,93 @@ void Test::testFull( prop.Attributes); try { info->getPropertyByName( - rtl::OUString("first")); + OUString("first")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} CPPUNIT_ASSERT( info->hasPropertyByName( - rtl::OUString("First"))); + OUString("First"))); CPPUNIT_ASSERT( info->hasPropertyByName( - rtl::OUString("Second"))); + OUString("Second"))); CPPUNIT_ASSERT( !info->hasPropertyByName( - rtl::OUString("Third"))); + OUString("Third"))); CPPUNIT_ASSERT( info->hasPropertyByName( - rtl::OUString("Fourth"))); + OUString("Fourth"))); CPPUNIT_ASSERT( !info->hasPropertyByName( - rtl::OUString("first"))); + OUString("first"))); CPPUNIT_ASSERT_EQUAL( css::uno::Any(static_cast< sal_Int32 >(0)), fullp->getPropertyValue( - rtl::OUString("First"))); + OUString("First"))); fullp->setPropertyValue( - rtl::OUString("First"), + OUString("First"), css::uno::Any(static_cast< sal_Int32 >(-100))); CPPUNIT_ASSERT_EQUAL( css::uno::Any(static_cast< sal_Int32 >(-100)), fullp->getPropertyValue( - rtl::OUString("First"))); + OUString("First"))); css::uno::Any voidAny; CPPUNIT_ASSERT_EQUAL( voidAny, fullp->getPropertyValue( - rtl::OUString("Second"))); + OUString("Second"))); fullp->setPropertyValue( - rtl::OUString("Second"), + OUString("Second"), css::uno::Any(static_cast< sal_Int32 >(100))); CPPUNIT_ASSERT_EQUAL( css::uno::Any(static_cast< sal_Int32 >(100)), fullp->getPropertyValue( - rtl::OUString("Second"))); + 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("Second"), + OUString("Second"), css::uno::Any()); CPPUNIT_ASSERT_EQUAL( voidAny, fullp->getPropertyValue( - rtl::OUString("Second"))); + 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("Third"), + OUString("Third"), css::uno::Any(static_cast< sal_Int32 >(100))); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->getPropertyValue( - rtl::OUString("Third")); + OUString("Third")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->setPropertyValue( - rtl::OUString("Fourth"), + OUString("Fourth"), css::uno::Any(static_cast< sal_Int32 >(100))); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->getPropertyValue( - rtl::OUString("Fourth")); + OUString("Fourth")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->setPropertyValue( - rtl::OUString("first"), + OUString("first"), css::uno::Any()); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->getPropertyValue( - rtl::OUString("first")); + OUString("first")); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} css::uno::Reference< css::beans::XFastPropertySet > fullf( @@ -520,13 +520,13 @@ void Test::testFull( fulla->getPropertyValues()); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(2), vs.getLength()); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("First"), vs[0].Name); + OUString("First"), vs[0].Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), vs[0].Handle); CPPUNIT_ASSERT_EQUAL( css::uno::Any(static_cast< sal_Int32 >(0)), vs[0].Value); CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DIRECT_VALUE, vs[0].State); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("Second"), vs[1].Name); + 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); @@ -537,12 +537,12 @@ void Test::testFull( vs = fulla->getPropertyValues(); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(2), vs.getLength()); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("First"), vs[0].Name); + OUString("First"), vs[0].Name); CPPUNIT_ASSERT_EQUAL( css::uno::Any(static_cast< sal_Int32 >(-100)), vs[0].Value); CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DIRECT_VALUE, vs[0].State); CPPUNIT_ASSERT_EQUAL( - rtl::OUString("Second"), vs[1].Name); + OUString("Second"), vs[1].Name); CPPUNIT_ASSERT_EQUAL( css::uno::Any(static_cast< sal_Int32 >(100)), vs[1].Value); CPPUNIT_ASSERT_EQUAL( @@ -555,76 +555,76 @@ void Test::testFull( css::uno::Reference< css::beans::XPropertyChangeListener > boundListener( new BoundListener); fullp->addPropertyChangeListener( - rtl::OUString("First"), boundListener); + OUString("First"), boundListener); fullp->removePropertyChangeListener( - rtl::OUString("First"), boundListener); + OUString("First"), boundListener); fullp->addPropertyChangeListener( - rtl::OUString("Second"), boundListener); + OUString("Second"), boundListener); fullp->removePropertyChangeListener( - rtl::OUString("Second"), boundListener); + OUString("Second"), boundListener); try { fullp->addPropertyChangeListener( - rtl::OUString("Third"), + OUString("Third"), boundListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->removePropertyChangeListener( - rtl::OUString("Third"), + OUString("Third"), boundListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} fullp->addPropertyChangeListener( - rtl::OUString("Fourth"), boundListener); + OUString("Fourth"), boundListener); fullp->removePropertyChangeListener( - rtl::OUString("Fourth"), boundListener); + OUString("Fourth"), boundListener); try { fullp->addPropertyChangeListener( - rtl::OUString("Fifth"), + OUString("Fifth"), boundListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->removePropertyChangeListener( - rtl::OUString("Fifth"), + OUString("Fifth"), boundListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} css::uno::Reference< css::beans::XVetoableChangeListener > vetoListener( new VetoListener); fullp->addVetoableChangeListener( - rtl::OUString("First"), vetoListener); + OUString("First"), vetoListener); fullp->removeVetoableChangeListener( - rtl::OUString("First"), vetoListener); + OUString("First"), vetoListener); fullp->addVetoableChangeListener( - rtl::OUString("Second"), vetoListener); + OUString("Second"), vetoListener); fullp->removeVetoableChangeListener( - rtl::OUString("Second"), vetoListener); + OUString("Second"), vetoListener); try { fullp->addVetoableChangeListener( - rtl::OUString("Third"), + OUString("Third"), vetoListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->removeVetoableChangeListener( - rtl::OUString("Third"), + OUString("Third"), vetoListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} fullp->addVetoableChangeListener( - rtl::OUString("Fourth"), vetoListener); + OUString("Fourth"), vetoListener); fullp->removeVetoableChangeListener( - rtl::OUString("Fourth"), vetoListener); + OUString("Fourth"), vetoListener); try { fullp->addVetoableChangeListener( - rtl::OUString("Fifth"), + OUString("Fifth"), vetoListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { fullp->removeVetoableChangeListener( - rtl::OUString("Fifth"), + OUString("Fifth"), vetoListener); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} diff --git a/cppuhelper/qa/unourl/cppu_unourl.cxx b/cppuhelper/qa/unourl/cppu_unourl.cxx index c9883993f37a..90f193620d87 100644 --- a/cppuhelper/qa/unourl/cppu_unourl.cxx +++ b/cppuhelper/qa/unourl/cppu_unourl.cxx @@ -75,7 +75,7 @@ namespace cppu_unourl bool bValid = false; try { - cppu::UnoUrlDescriptor aDescriptor(rtl::OUString::createFromAscii( + cppu::UnoUrlDescriptor aDescriptor(OUString::createFromAscii( aTests[i].pInput)); (void)aDescriptor; bValid = true; @@ -123,10 +123,10 @@ namespace cppu_unourl for (unsigned int i = 0; i < SAL_N_ELEMENTS(aTests); ++i) { bool bValid = false; - rtl::OUString aDescriptor; + OUString aDescriptor; try { - aDescriptor = cppu::UnoUrlDescriptor(rtl::OUString::createFromAscii( + aDescriptor = cppu::UnoUrlDescriptor(OUString::createFromAscii( aTests[i].pInput)). getDescriptor(); bValid = true; @@ -171,10 +171,10 @@ namespace cppu_unourl for (unsigned int i = 0; i < SAL_N_ELEMENTS(aTests); ++i) { bool bValid = false; - rtl::OUString aName; + OUString aName; try { - aName = cppu::UnoUrlDescriptor(rtl::OUString::createFromAscii( + aName = cppu::UnoUrlDescriptor(OUString::createFromAscii( aTests[i].pInput)).getName(); bValid = true; } @@ -219,9 +219,9 @@ namespace cppu_unourl bool bPresent = false; try { - bPresent = cppu::UnoUrlDescriptor(rtl::OUString::createFromAscii( + bPresent = cppu::UnoUrlDescriptor(OUString::createFromAscii( aTests[i].pInput)). - hasParameter(rtl::OUString::createFromAscii(aTests[i].pKey)); + hasParameter(OUString::createFromAscii(aTests[i].pKey)); bValid = true; } catch (rtl::MalformedUriException &) @@ -286,12 +286,12 @@ namespace cppu_unourl for (unsigned int i = 0; i < SAL_N_ELEMENTS(aTests); ++i) { bool bValid = false; - rtl::OUString aValue; + OUString aValue; try { - aValue = cppu::UnoUrlDescriptor(rtl::OUString::createFromAscii( + aValue = cppu::UnoUrlDescriptor(OUString::createFromAscii( aTests[i].pInput)). - getParameter(rtl::OUString::createFromAscii(aTests[i].pKey)); + getParameter(OUString::createFromAscii(aTests[i].pKey)); bValid = true; } catch (rtl::MalformedUriException &) @@ -331,7 +331,7 @@ namespace cppu_unourl bool bValid = false; try { - cppu::UnoUrl aUrl(rtl::OUString::createFromAscii(aTests[i].pInput)); + cppu::UnoUrl aUrl(OUString::createFromAscii(aTests[i].pInput)); (void)aUrl; bValid = true; } @@ -367,10 +367,10 @@ namespace cppu_unourl for (unsigned int i = 0; i < SAL_N_ELEMENTS(aTests); ++i) { bool bValid = false; - rtl::OUString aConnection; + OUString aConnection; try { - aConnection = cppu::UnoUrl(rtl::OUString::createFromAscii( + aConnection = cppu::UnoUrl(OUString::createFromAscii( aTests[i].pInput)). getConnection().getDescriptor(); bValid = true; @@ -401,10 +401,10 @@ namespace cppu_unourl for (unsigned int i = 0; i < SAL_N_ELEMENTS(aTests); ++i) { bool bValid = false; - rtl::OUString aProtocol; + OUString aProtocol; try { - aProtocol = cppu::UnoUrl(rtl::OUString::createFromAscii( + aProtocol = cppu::UnoUrl(OUString::createFromAscii( aTests[i].pInput)). getProtocol().getDescriptor(); bValid = true; @@ -438,10 +438,10 @@ namespace cppu_unourl for (unsigned int i = 0; i < SAL_N_ELEMENTS(aTests); ++i) { bool bValid = false; - rtl::OUString aObjectName; + OUString aObjectName; try { - aObjectName = cppu::UnoUrl(rtl::OUString::createFromAscii( + aObjectName = cppu::UnoUrl(OUString::createFromAscii( aTests[i].pInput)).getObjectName(); bValid = true; } diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx index 164db03314eb..6af654408ed0 100644 --- a/cppuhelper/source/access_control.cxx +++ b/cppuhelper/source/access_control.cxx @@ -30,8 +30,6 @@ using namespace ::osl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using rtl::OUString; - namespace { OUString str_ac_singleton() diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index c16d90681ab4..1eb11bfb486e 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -48,7 +48,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using rtl::Bootstrap; -using rtl::OUString; namespace cppu { @@ -57,7 +56,7 @@ BootstrapException::BootstrapException() { } -BootstrapException::BootstrapException( const ::rtl::OUString & rMessage ) +BootstrapException::BootstrapException( const OUString & rMessage ) :m_aMessage( rMessage ) { } @@ -77,7 +76,7 @@ BootstrapException & BootstrapException::operator=( const BootstrapException & e return *this; } -const ::rtl::OUString & BootstrapException::getMessage() const +const OUString & BootstrapException::getMessage() const { return m_aMessage; } @@ -93,7 +92,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() throw BootstrapException( "no soffice installation found!"); } - rtl::OUString p2; + OUString p2; #if defined(_WIN32) p2 = o3tl::toU(p1); free(p1); @@ -148,7 +147,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() != rtl_Random_E_None ) throw BootstrapException( "random pool error!" ); rtl_random_destroyPool( hPool ); - ::rtl::OUStringBuffer buf("uno"); + OUStringBuffer buf("uno"); for (unsigned char byte : bytes) buf.append( static_cast< sal_Int32 >( byte ) ); OUString sPipeName( buf.makeStringAndClear() ); diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx index 50e19bfa5b8e..a019626f4a6a 100644 --- a/cppuhelper/source/compat.cxx +++ b/cppuhelper/source/compat.cxx @@ -51,7 +51,7 @@ namespace cppu { SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::lang::XMultiComponentFactory > bootstrapInitialSF( - rtl::OUString const &) + OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } @@ -59,55 +59,55 @@ css::uno::Reference< css::lang::XMultiComponentFactory > bootstrapInitialSF( SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::uno::XComponentContext > SAL_CALL bootstrap_InitialComponentContext( css::uno::Reference< css::registry::XSimpleRegistry > const &, - rtl::OUString const &) + OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::registry::XSimpleRegistry > -SAL_CALL createNestedRegistry(rtl::OUString const &) { +SAL_CALL createNestedRegistry(OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::lang::XMultiServiceFactory > SAL_CALL createRegistryServiceFactory( - rtl::OUString const &, rtl::OUString const &, sal_Bool, - rtl::OUString const &) + OUString const &, OUString const &, sal_Bool, + OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::registry::XSimpleRegistry > -SAL_CALL createSimpleRegistry(rtl::OUString const &) { +SAL_CALL createSimpleRegistry(OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::reflection::XIdlClass * SAL_CALL createStandardClassWithSequence( css::uno::Reference< css::lang::XMultiServiceFactory > const &, - rtl::OUString const &, + OUString const &, css::uno::Reference< css::reflection::XIdlClass > const &, - css::uno::Sequence< rtl::OUString > const &) + css::uno::Sequence< OUString > const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference<css::uno::XInterface> SAL_CALL invokeStaticComponentFactory( - oslGenericFunction, rtl::OUString const &, + oslGenericFunction, OUString const &, css::uno::Reference<css::lang::XMultiServiceFactory> const &, css::uno::Reference<css::registry::XRegistryKey> const &, - rtl::OUString const &) + OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } SAL_DLLPUBLIC_EXPORT css::uno::Reference<css::uno::XInterface> SAL_CALL loadSharedLibComponentFactory( - rtl::OUString const &, rtl::OUString const &, rtl::OUString const &, + OUString const &, OUString const &, OUString const &, css::uno::Reference<css::lang::XMultiServiceFactory> const &, css::uno::Reference<css::registry::XRegistryKey> const &, - rtl::OUString const &) + OUString const &) { for (;;) { std::abort(); } // avoid "must return a value" warnings } diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index c9bd6a4a9b28..02019d53f254 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -32,9 +32,6 @@ using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using ::rtl::OString; -using ::rtl::OUStringToOString; - namespace cppu { diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index 62839c64d491..b64d8b624849 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -53,9 +53,6 @@ using namespace ::osl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -using rtl::OUString; -using rtl::OUStringBuffer; - namespace cppu { diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index 9f67fc8d3dd1..945268bf6444 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -23,8 +23,6 @@ #include <rtl/ref.hxx> #include <rtl/ustring.hxx> -using rtl::OUString; - #include "macro_expander.hxx" #include "paths.hxx" #include "servicemanager.hxx" @@ -32,10 +30,10 @@ using rtl::OUString; namespace { -rtl::OUString getBootstrapVariable( - rtl::Bootstrap const & bootstrap, rtl::OUString const & name) +OUString getBootstrapVariable( + rtl::Bootstrap const & bootstrap, OUString const & name) { - rtl::OUString v; + OUString v; if (!bootstrap.getFrom(name, v)) { throw css::uno::DeploymentException( "Cannot obtain " + name + " from uno ini"); @@ -46,7 +44,7 @@ rtl::OUString getBootstrapVariable( } css::uno::Reference< css::uno::XComponentContext > -cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) +cppu::defaultBootstrap_InitialComponentContext(OUString const & iniUri) { rtl::Bootstrap bs(iniUri); if (bs.getHandle() == nullptr) { @@ -83,12 +81,12 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) context_values.push_back( cppu::ContextEntry_Init( "/services/com.sun.star.security.AccessController/mode", - css::uno::Any(rtl::OUString("off")), false)); + css::uno::Any(OUString("off")), false)); context_values.push_back( cppu::ContextEntry_Init( "/singletons/com.sun.star.security.theAccessController", css::uno::Any( - rtl::OUString("com.sun.star.security.AccessController")), + OUString("com.sun.star.security.AccessController")), true)); assert(!context_values.empty()); css::uno::Reference< css::uno::XComponentContext > context( diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index ee08c612e4e1..97eb8f851077 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -54,8 +54,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::loader; using namespace com::sun::star::registry; -using ::rtl::OUString; - namespace cppu { diff --git a/cppuhelper/source/gcc3.map b/cppuhelper/source/gcc3.map index f1537e874020..d5af50655c1a 100644 --- a/cppuhelper/source/gcc3.map +++ b/cppuhelper/source/gcc3.map @@ -384,7 +384,7 @@ UDK_3.3 { # OOo 2.3 UDK_3.4 { # OOo 2.4 global: - _ZN4cppu19bootstrap_expandUriERKN3rtl8OUStringE; # rtl::OUString cppu::bootstrap_expandUri(rtl::OUString const &) + _ZN4cppu19bootstrap_expandUriERKN3rtl8OUStringE; # OUString cppu::bootstrap_expandUri(OUString const &) } UDK_3.3; UDK_3.5 { # OOo 3.0 @@ -427,7 +427,7 @@ global: LIBO_UDK_3.9 { # LibO 3.7 global: - _ZN4cppu15supportsServiceEPN3com3sun4star4lang12XServiceInfoERKN3rtl8OUStringE; # cppu::supportsService(com::sun::star::lang::XServiceInfo*, rtl::OUString const&) + _ZN4cppu15supportsServiceEPN3com3sun4star4lang12XServiceInfoERKN3rtl8OUStringE; # cppu::supportsService(com::sun::star::lang::XServiceInfo*, OUString const&) } UDK_3.8; LIBO_UDK_5.3 { # LibO 5.3 diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index c0f5477d2029..4372630a81a4 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -35,8 +35,6 @@ using namespace ::osl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using rtl::OUString; - namespace { class theImplHelperInitMutex : public rtl::Static<Mutex, theImplHelperInitMutex>{}; diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx index bd4ce00ffcc7..466d766558af 100644 --- a/cppuhelper/source/implementationentry.cxx +++ b/cppuhelper/source/implementationentry.cxx @@ -27,8 +27,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::registry; -using rtl::OUString; - namespace cppu { sal_Bool component_writeInfoHelper( diff --git a/cppuhelper/source/loadsharedlibcomponentfactory.hxx b/cppuhelper/source/loadsharedlibcomponentfactory.hxx index df6e2269e381..f496d61e687f 100644 --- a/cppuhelper/source/loadsharedlibcomponentfactory.hxx +++ b/cppuhelper/source/loadsharedlibcomponentfactory.hxx @@ -28,12 +28,12 @@ namespace rtl { class OUString; } namespace cppuhelper { namespace detail { css::uno::Environment getEnvironment( - rtl::OUString const & name, rtl::OUString const & implementation); + OUString const & name, OUString const & implementation); void loadSharedLibComponentFactory( - rtl::OUString const & uri, rtl::OUString const & environment, - rtl::OUString const & prefix, rtl::OUString const & implementation, - rtl::OUString const & constructor, + OUString const & uri, OUString const & environment, + OUString const & prefix, OUString const & implementation, + OUString const & constructor, css::uno::Reference<css::lang::XMultiServiceFactory> const & serviceManager, WrapperConstructorFn * constructorFunction, css::uno::Reference<css::uno::XInterface> * factory); diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index 2b8d5407ce81..7d9b763aac05 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -45,7 +45,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using rtl::Bootstrap; -using rtl::OUString; namespace cppu { @@ -76,8 +75,8 @@ static Bootstrap const & get_unorc() namespace cppuhelper { namespace detail { -rtl::OUString expandMacros(rtl::OUString const & text) { - rtl::OUString t(text); +OUString expandMacros(OUString const & text) { + OUString t(text); rtl_bootstrap_expandMacros_from_handle( cppu::get_unorc().getHandle(), &t.pData); return t; diff --git a/cppuhelper/source/macro_expander.hxx b/cppuhelper/source/macro_expander.hxx index 275fa1c4a57b..dc753de9663a 100644 --- a/cppuhelper/source/macro_expander.hxx +++ b/cppuhelper/source/macro_expander.hxx @@ -49,7 +49,7 @@ namespace detail { * If uriReference is a vnd.sun.star.expand URL reference that contains unknown * macros. */ -::rtl::OUString expandMacros(rtl::OUString const & text); +OUString expandMacros(OUString const & text); css::uno::Reference< css::lang::XSingleComponentFactory > create_bootstrap_macro_expander_factory(); diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx index 38584b38ee4d..6b7dcd443038 100644 --- a/cppuhelper/source/paths.cxx +++ b/cppuhelper/source/paths.cxx @@ -37,10 +37,10 @@ namespace { #ifndef ANDROID -rtl::OUString get_this_libpath() { - static rtl::OUString s_uri; +OUString get_this_libpath() { + static OUString s_uri; if (s_uri.isEmpty()) { - rtl::OUString uri; + OUString uri; osl::Module::getUrlFromAddress( reinterpret_cast< oslGenericFunction >(get_this_libpath), uri); sal_Int32 i = uri.lastIndexOf('/'); @@ -59,7 +59,7 @@ rtl::OUString get_this_libpath() { #endif } -rtl::OUString cppu::getUnoIniUri() { +OUString cppu::getUnoIniUri() { #if defined ANDROID // Wouldn't it be lovely to avoid this ugly hard-coding. // The problem is that the 'create_bootstrap_macro_expander_factory()' @@ -68,9 +68,9 @@ rtl::OUString cppu::getUnoIniUri() { // defaultBootstrap_InitialComponentContext // and since rtlBootstrapHandle is not ref-counted doing anything // clean here is hardish. - rtl::OUString uri("file:///assets/program"); + OUString uri("file:///assets/program"); #else - rtl::OUString uri(get_this_libpath()); + OUString uri(get_this_libpath()); #ifdef MACOSX // We keep both the LO and URE dylibs directly in "Frameworks" // (that is, LIBO_LIB_FOLDER) and rc files in "Resources" @@ -88,7 +88,7 @@ rtl::OUString cppu::getUnoIniUri() { return uri + "/" SAL_CONFIGFILE("uno"); } -bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) { +bool cppu::nextDirectoryItem(osl::Directory & directory, OUString * url) { assert(url != nullptr); for (;;) { osl::DirectoryItem i; @@ -110,7 +110,7 @@ bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) { } if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks // Ignore backup files: - rtl::OUString name(stat.getFileName()); + OUString name(stat.getFileName()); if (!(name.match(".") || name.endsWith("~"))) { *url = stat.getFileURL(); return true; @@ -119,7 +119,7 @@ bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) { } } -void cppu::decodeRdbUri(rtl::OUString * uri, bool * optional, bool * directory) +void cppu::decodeRdbUri(OUString * uri, bool * optional, bool * directory) { assert(uri != nullptr && optional != nullptr && directory != nullptr); if(!(uri->isEmpty())) diff --git a/cppuhelper/source/paths.hxx b/cppuhelper/source/paths.hxx index b7fde71d0726..f757d906b171 100644 --- a/cppuhelper/source/paths.hxx +++ b/cppuhelper/source/paths.hxx @@ -27,11 +27,11 @@ namespace rtl { class OUString; } namespace cppu { -rtl::OUString getUnoIniUri(); +OUString getUnoIniUri(); -bool nextDirectoryItem(osl::Directory & directory, rtl::OUString * url); +bool nextDirectoryItem(osl::Directory & directory, OUString * url); -void decodeRdbUri(rtl::OUString * uri, bool * optional, bool * directory); +void decodeRdbUri(OUString * uri, bool * optional, bool * directory); } diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index 0c4898fb00df..d04119cafe5b 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -90,29 +90,29 @@ struct PropertyData { }; struct Data: public salhelper::SimpleReferenceObject { - typedef std::map< rtl::OUString, PropertyData > PropertyMap; + typedef std::map< OUString, PropertyData > PropertyMap; PropertyMap properties; PropertyMap::const_iterator get( css::uno::Reference< css::uno::XInterface > const & object, - rtl::OUString const & name) const; + OUString const & name) const; protected: void initProperties( css::uno::Reference< css::reflection::XTypeDescription > const & type, - css::uno::Sequence< rtl::OUString > const & absentOptional, - std::vector< rtl::OUString > * handleNames) + css::uno::Sequence< OUString > const & absentOptional, + std::vector< OUString > * handleNames) { - std::set<rtl::OUString> seen; + std::set<OUString> seen; initProperties(type, absentOptional, handleNames, &seen); } private: void initProperties( css::uno::Reference< css::reflection::XTypeDescription > const & type, - css::uno::Sequence< rtl::OUString > const & absentOptional, - std::vector< rtl::OUString > * handleNames, std::set<rtl::OUString> * seen); + css::uno::Sequence< OUString > const & absentOptional, + std::vector< OUString > * handleNames, std::set<OUString> * seen); static css::uno::Reference< css::reflection::XTypeDescription > resolveTypedefs( @@ -121,7 +121,7 @@ private: Data::PropertyMap::const_iterator Data::get( css::uno::Reference< css::uno::XInterface > const & object, - rtl::OUString const & name) const + OUString const & name) const { PropertyMap::const_iterator i(properties.find(name)); if (i == properties.end() || !i->second.present) { @@ -132,8 +132,8 @@ Data::PropertyMap::const_iterator Data::get( void Data::initProperties( css::uno::Reference< css::reflection::XTypeDescription > const & type, - css::uno::Sequence< rtl::OUString > const & absentOptional, - std::vector< rtl::OUString > * handleNames, std::set<rtl::OUString> * seen) + css::uno::Sequence< OUString > const & absentOptional, + std::vector< OUString > * handleNames, std::set<OUString> * seen) { css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc( resolveTypedefs(type), css::uno::UNO_QUERY_THROW); @@ -148,8 +148,8 @@ void Data::initProperties( css::uno::Reference< css::reflection::XInterfaceMemberTypeDescription > > members( ifc->getMembers()); - rtl::OUString const * absentBegin = absentOptional.getConstArray(); - rtl::OUString const * absentEnd = + OUString const * absentBegin = absentOptional.getConstArray(); + OUString const * absentEnd = absentBegin + absentOptional.getLength(); for (sal_Int32 i = 0; i < members.getLength(); ++i) { if (members[i]->getTypeClass() @@ -234,13 +234,13 @@ void Data::initProperties( } t = args[0]; } - std::vector< rtl::OUString >::size_type handles + std::vector< OUString >::size_type handles = handleNames->size(); if (handles > SAL_MAX_INT32) { throw css::uno::RuntimeException( "interface type has too many attributes"); } - rtl::OUString name(members[i]->getMemberName()); + OUString name(members[i]->getMemberName()); if (!properties.emplace( name, PropertyData( @@ -280,9 +280,9 @@ public: virtual css::uno::Sequence< css::beans::Property > SAL_CALL getProperties() override; virtual css::beans::Property SAL_CALL getPropertyByName( - rtl::OUString const & name) override; + OUString const & name) override; - virtual sal_Bool SAL_CALL hasPropertyByName(rtl::OUString const & name) override; + virtual sal_Bool SAL_CALL hasPropertyByName(OUString const & name) override; private: rtl::Reference< Data > m_data; @@ -305,13 +305,13 @@ css::uno::Sequence< css::beans::Property > Info::getProperties() return s; } -css::beans::Property Info::getPropertyByName(rtl::OUString const & name) +css::beans::Property Info::getPropertyByName(OUString const & name) { return m_data->get(static_cast< cppu::OWeakObject * >(this), name)-> second.property; } -sal_Bool Info::hasPropertyByName(rtl::OUString const & name) +sal_Bool Info::hasPropertyByName(OUString const & name) { Data::PropertyMap::iterator i(m_data->properties.find(name)); return i != m_data->properties.end() && i->second.present; @@ -359,33 +359,33 @@ public: Impl( css::uno::Reference< css::uno::XComponentContext > const & context, Implements theImplements, - css::uno::Sequence< rtl::OUString > const & absentOptional, + css::uno::Sequence< OUString > const & absentOptional, css::uno::Type const & type); - rtl::OUString const & translateHandle( + OUString const & translateHandle( css::uno::Reference< css::uno::XInterface > const & object, sal_Int32 handle) const; void setProperty( css::uno::Reference< css::uno::XInterface > const & object, - rtl::OUString const & name, css::uno::Any const & value, + OUString const & name, css::uno::Any const & value, bool isAmbiguous, bool isDefaulted, sal_Int16 illegalArgumentPosition) const; css::uno::Any getProperty( css::uno::Reference< css::uno::XInterface > const & object, - rtl::OUString const & name, css::beans::PropertyState * state) const; + OUString const & name, css::beans::PropertyState * state) const; PropertySetMixinImpl::Implements implements; - css::uno::Sequence< rtl::OUString > handleMap; + css::uno::Sequence< OUString > handleMap; - typedef std::map< rtl::OUString, BoundListenerBag > BoundListenerMap; + typedef std::map< OUString, BoundListenerBag > BoundListenerMap; typedef std::multiset< css::uno::Reference< css::beans::XVetoableChangeListener > > VetoListenerBag; - typedef std::map< rtl::OUString, VetoListenerBag > VetoListenerMap; + typedef std::map< OUString, VetoListenerBag > VetoListenerMap; mutable osl::Mutex mutex; BoundListenerMap boundListeners; @@ -394,7 +394,7 @@ public: private: css::uno::Reference< css::reflection::XIdlClass > getReflection( - rtl::OUString const & typeName) const; + OUString const & typeName) const; static css::uno::Any wrapValue( css::uno::Reference< css::uno::XInterface > const & object, @@ -411,7 +411,7 @@ private: PropertySetMixinImpl::Impl::Impl( css::uno::Reference< css::uno::XComponentContext > const & context, Implements theImplements, - css::uno::Sequence< rtl::OUString > const & absentOptional, + css::uno::Sequence< OUString > const & absentOptional, css::uno::Type const & type): implements(theImplements), disposed(false), m_context(context), m_type(type) @@ -440,28 +440,28 @@ PropertySetMixinImpl::Impl::Impl( + e.Message, nullptr, anyEx ); } - std::vector< rtl::OUString > handleNames; + std::vector< OUString > handleNames; initProperties(ifc, absentOptional, &handleNames); - std::vector< rtl::OUString >::size_type size = handleNames.size(); + std::vector< OUString >::size_type size = handleNames.size(); assert(size <= SAL_MAX_INT32); handleMap.realloc(static_cast< sal_Int32 >(size)); std::copy(handleNames.begin(), handleNames.end(), handleMap.getArray()); } -rtl::OUString const & PropertySetMixinImpl::Impl::translateHandle( +OUString const & PropertySetMixinImpl::Impl::translateHandle( css::uno::Reference< css::uno::XInterface > const & object, sal_Int32 handle) const { if (handle < 0 || handle >= handleMap.getLength()) { throw css::beans::UnknownPropertyException( - "bad handle " + rtl::OUString::number(handle), object); + "bad handle " + OUString::number(handle), object); } return handleMap[handle]; } void PropertySetMixinImpl::Impl::setProperty( css::uno::Reference< css::uno::XInterface > const & object, - rtl::OUString const & name, css::uno::Any const & value, bool isAmbiguous, + OUString const & name, css::uno::Any const & value, bool isAmbiguous, bool isDefaulted, sal_Int16 illegalArgumentPosition) const { PropertyMap::const_iterator i(properties.find(name)); @@ -553,7 +553,7 @@ void PropertySetMixinImpl::Impl::setProperty( css::uno::Any PropertySetMixinImpl::Impl::getProperty( css::uno::Reference< css::uno::XInterface > const & object, - rtl::OUString const & name, css::beans::PropertyState * state) const + OUString const & name, css::beans::PropertyState * state) const { PropertyMap::const_iterator i(properties.find(name)); if (i == properties.end()) { @@ -710,7 +710,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty( } css::uno::Reference< css::reflection::XIdlClass > -PropertySetMixinImpl::Impl::getReflection(rtl::OUString const & typeName) const +PropertySetMixinImpl::Impl::getReflection(OUString const & typeName) const { return css::uno::Reference< css::reflection::XIdlClass >( css::reflection::theCoreReflection::get(m_context)->forName(typeName), @@ -832,7 +832,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( PropertySetMixinImpl::PropertySetMixinImpl( css::uno::Reference< css::uno::XComponentContext > const & context, Implements implements, - css::uno::Sequence< rtl::OUString > const & absentOptional, + css::uno::Sequence< OUString > const & absentOptional, css::uno::Type const & type) { m_impl = new Impl(context, implements, absentOptional, type); @@ -843,7 +843,7 @@ PropertySetMixinImpl::~PropertySetMixinImpl() { m_impl->release(); } -void PropertySetMixinImpl::checkUnknown(rtl::OUString const & propertyName) { +void PropertySetMixinImpl::checkUnknown(OUString const & propertyName) { if (!propertyName.isEmpty()) { m_impl->get( static_cast< css::beans::XPropertySet * >(this), propertyName); @@ -851,7 +851,7 @@ void PropertySetMixinImpl::checkUnknown(rtl::OUString const & propertyName) { } void PropertySetMixinImpl::prepareSet( - rtl::OUString const & propertyName, css::uno::Any const & oldValue, + OUString const & propertyName, css::uno::Any const & oldValue, css::uno::Any const & newValue, BoundListeners * boundListeners) { Impl::PropertyMap::const_iterator it(m_impl->properties.find(propertyName)); @@ -990,7 +990,7 @@ PropertySetMixinImpl::getPropertySetInfo() } void PropertySetMixinImpl::setPropertyValue( - rtl::OUString const & propertyName, css::uno::Any const & value) + OUString const & propertyName, css::uno::Any const & value) { m_impl->setProperty( static_cast< css::beans::XPropertySet * >(this), propertyName, value, @@ -998,14 +998,14 @@ void PropertySetMixinImpl::setPropertyValue( } css::uno::Any PropertySetMixinImpl::getPropertyValue( - rtl::OUString const & propertyName) + OUString const & propertyName) { return m_impl->getProperty( static_cast< css::beans::XPropertySet * >(this), propertyName, nullptr); } void PropertySetMixinImpl::addPropertyChangeListener( - rtl::OUString const & propertyName, + OUString const & propertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const & listener) { css::uno::Reference< css::beans::XPropertyChangeListener >( @@ -1027,7 +1027,7 @@ void PropertySetMixinImpl::addPropertyChangeListener( } void PropertySetMixinImpl::removePropertyChangeListener( - rtl::OUString const & propertyName, + OUString const & propertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const & listener) { assert(listener.is()); @@ -1044,7 +1044,7 @@ void PropertySetMixinImpl::removePropertyChangeListener( } void PropertySetMixinImpl::addVetoableChangeListener( - rtl::OUString const & propertyName, + OUString const & propertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const & listener) { css::uno::Reference< css::beans::XVetoableChangeListener >( @@ -1066,7 +1066,7 @@ void PropertySetMixinImpl::addVetoableChangeListener( } void PropertySetMixinImpl::removeVetoableChangeListener( - rtl::OUString const & propertyName, + OUString const & propertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const & listener) { assert(listener.is()); @@ -1138,7 +1138,7 @@ void PropertySetMixinImpl::setPropertyValues( { throw css::beans::UnknownPropertyException( ("name " + props[i].Name + " does not match handle " - + rtl::OUString::number(props[i].Handle)), + + OUString::number(props[i].Handle)), static_cast< css::beans::XPropertySet * >(this)); } m_impl->setProperty( diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 83e7726f0a35..46494e00c827 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -35,8 +35,6 @@ using namespace com::sun::star::beans; using namespace com::sun::star::lang; using namespace cppu; -using ::rtl::OUString; - namespace cppu { IPropertyArrayHelper::~IPropertyArrayHelper() diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 3fac957ebc3a..a9c06fa1bce9 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -74,14 +74,14 @@ void insertImplementationMap( void removeFromImplementationMap( cppuhelper::ServiceManager::Data::ImplementationMap * map, - std::vector< rtl::OUString > const & elements, + std::vector< OUString > const & elements, std::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > const & implementation) { // The underlying data structures make this function somewhat inefficient, // but the assumption is that it is rarely called: assert(map != nullptr); - for (std::vector< rtl::OUString >::const_iterator i(elements.begin()); + for (std::vector< OUString >::const_iterator i(elements.begin()); i != elements.end(); ++i) { cppuhelper::ServiceManager::Data::ImplementationMap::iterator j( @@ -105,7 +105,7 @@ void removeFromImplementationMap( class Parser { public: Parser( - rtl::OUString const & uri, + OUString const & uri, css::uno::Reference< css::uno::XComponentContext > const & alienContext, cppuhelper::ServiceManager::Data * data); @@ -121,21 +121,21 @@ private: void handleSingleton(); - rtl::OUString getNameAttribute(); + OUString getNameAttribute(); xmlreader::XmlReader reader_; css::uno::Reference< css::uno::XComponentContext > alienContext_; cppuhelper::ServiceManager::Data * data_; - rtl::OUString attrLoader_; - rtl::OUString attrUri_; - rtl::OUString attrEnvironment_; - rtl::OUString attrPrefix_; + OUString attrLoader_; + OUString attrUri_; + OUString attrEnvironment_; + OUString attrPrefix_; std::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > implementation_; }; Parser::Parser( - rtl::OUString const & uri, + OUString const & uri, css::uno::Reference< css::uno::XComponentContext > const & alienContext, cppuhelper::ServiceManager::Data * data): reader_(uri), alienContext_(alienContext), data_(data) @@ -239,10 +239,10 @@ Parser::Parser( } void Parser::handleComponent() { - attrLoader_ = rtl::OUString(); - attrUri_ = rtl::OUString(); - attrEnvironment_ = rtl::OUString(); - attrPrefix_ = rtl::OUString(); + attrLoader_ = OUString(); + attrUri_ = OUString(); + attrEnvironment_ = OUString(); + attrPrefix_ = OUString(); xmlreader::Span name; int nsId; while (reader_.nextAttribute(&nsId, &name)) { @@ -328,8 +328,8 @@ void Parser::handleComponent() { } void Parser::handleImplementation() { - rtl::OUString attrName; - rtl::OUString attrConstructor; + OUString attrName; + OUString attrConstructor; xmlreader::Span name; int nsId; while (reader_.nextAttribute(&nsId, &name)) { @@ -394,19 +394,19 @@ void Parser::handleImplementation() { } void Parser::handleService() { - rtl::OUString name(getNameAttribute()); + OUString name(getNameAttribute()); implementation_->info->services.push_back(name); data_->services[name].push_back(implementation_); } void Parser::handleSingleton() { - rtl::OUString name(getNameAttribute()); + OUString name(getNameAttribute()); implementation_->info->singletons.push_back(name); data_->singletons[name].push_back(implementation_); } -rtl::OUString Parser::getNameAttribute() { - rtl::OUString attrName; +OUString Parser::getNameAttribute() { + OUString attrName; xmlreader::Span name; int nsId; while (reader_.nextAttribute(&nsId, &name)) { @@ -566,11 +566,11 @@ private: createInstanceWithArguments( css::uno::Sequence< css::uno::Any > const & Arguments) override; - virtual rtl::OUString SAL_CALL getImplementationName() override; + virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) override; + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; rtl::Reference< cppuhelper::ServiceManager > manager_; @@ -614,19 +614,19 @@ ImplementationWrapper::createInstanceWithArguments( Arguments, manager_->getContext()); } -rtl::OUString ImplementationWrapper::getImplementationName() +OUString ImplementationWrapper::getImplementationName() { std::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > impl = implementation_.lock(); assert(impl); return impl->info->name; } -sal_Bool ImplementationWrapper::supportsService(rtl::OUString const & ServiceName) +sal_Bool ImplementationWrapper::supportsService(OUString const & ServiceName) { return cppu::supportsService(this, ServiceName); } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > ImplementationWrapper::getSupportedServiceNames() { std::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > impl = implementation_.lock(); @@ -639,10 +639,10 @@ ImplementationWrapper::getSupportedServiceNames() + " supports too many services"), static_cast< cppu::OWeakObject * >(this)); } - css::uno::Sequence< rtl::OUString > names( + css::uno::Sequence< OUString > names( static_cast< sal_Int32 >(impl->info->services.size())); sal_Int32 i = 0; - for (std::vector< rtl::OUString >::const_iterator j( + for (std::vector< OUString >::const_iterator j( impl->info->services.begin()); j != impl->info->services.end(); ++j) { @@ -762,7 +762,7 @@ void cppuhelper::ServiceManager::loadImplementation( return; } } - rtl::OUString uri; + OUString uri; try { uri = cppu::bootstrap_expandUri(implementation->info->uri); } catch (css::lang::IllegalArgumentException & e) { @@ -813,7 +813,7 @@ void cppuhelper::ServiceManager::loadImplementation( smgr->createInstanceWithContext(implementation->info->loader, ctxt), css::uno::UNO_QUERY_THROW); f0 = loader->activate( - implementation->info->name, rtl::OUString(), uri, + implementation->info->name, OUString(), uri, css::uno::Reference< css::registry::XRegistryKey >()); } css::uno::Reference<css::lang::XSingleComponentFactory> f1; @@ -916,22 +916,22 @@ void cppuhelper::ServiceManager::initialize( preloadImplementations(); } -rtl::OUString cppuhelper::ServiceManager::getImplementationName() +OUString cppuhelper::ServiceManager::getImplementationName() { - return rtl::OUString( + return OUString( "com.sun.star.comp.cppuhelper.bootstrap.ServiceManager"); } sal_Bool cppuhelper::ServiceManager::supportsService( - rtl::OUString const & ServiceName) + OUString const & ServiceName) { return cppu::supportsService(this, ServiceName); } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > cppuhelper::ServiceManager::getSupportedServiceNames() { - css::uno::Sequence< rtl::OUString > names(2); + css::uno::Sequence< OUString > names(2); names[0] = "com.sun.star.lang.MultiServiceFactory"; names[1] = "com.sun.star.lang.ServiceManager"; return names; @@ -939,7 +939,7 @@ cppuhelper::ServiceManager::getSupportedServiceNames() css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstance( - rtl::OUString const & aServiceSpecifier) + OUString const & aServiceSpecifier) { assert(context_.is()); return createInstanceWithContext(aServiceSpecifier, context_); @@ -947,7 +947,7 @@ cppuhelper::ServiceManager::createInstance( css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstanceWithArguments( - rtl::OUString const & ServiceSpecifier, + OUString const & ServiceSpecifier, css::uno::Sequence< css::uno::Any > const & Arguments) { assert(context_.is()); @@ -955,12 +955,12 @@ cppuhelper::ServiceManager::createInstanceWithArguments( ServiceSpecifier, Arguments, context_); } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > cppuhelper::ServiceManager::getAvailableServiceNames() { osl::MutexGuard g(rBHelper.rMutex); if (isDisposed()) { - return css::uno::Sequence< rtl::OUString >(); + return css::uno::Sequence< OUString >(); } Data::ImplementationMap::size_type n = data_.services.size(); if (n > static_cast< sal_uInt32 >(SAL_MAX_INT32)) { @@ -968,7 +968,7 @@ cppuhelper::ServiceManager::getAvailableServiceNames() "getAvailableServiceNames: too many services", static_cast< cppu::OWeakObject * >(this)); } - css::uno::Sequence< rtl::OUString > names(static_cast< sal_Int32 >(n)); + css::uno::Sequence< OUString > names(static_cast< sal_Int32 >(n)); sal_Int32 i = 0; for (Data::ImplementationMap::const_iterator j(data_.services.begin()); j != data_.services.end(); ++j) @@ -981,7 +981,7 @@ cppuhelper::ServiceManager::getAvailableServiceNames() css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstanceWithContext( - rtl::OUString const & aServiceSpecifier, + OUString const & aServiceSpecifier, css::uno::Reference< css::uno::XComponentContext > const & Context) { std::shared_ptr< Data::Implementation > impl( @@ -992,7 +992,7 @@ cppuhelper::ServiceManager::createInstanceWithContext( css::uno::Reference< css::uno::XInterface > cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext( - rtl::OUString const & ServiceSpecifier, + OUString const & ServiceSpecifier, css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) { @@ -1034,11 +1034,11 @@ void cppuhelper::ServiceManager::insert(css::uno::Any const & aElement) { css::uno::Sequence< css::beans::NamedValue > args; if (aElement >>= args) { - std::vector< rtl::OUString > uris; + std::vector< OUString > uris; css::uno::Reference< css::uno::XComponentContext > alienContext; for (sal_Int32 i = 0; i < args.getLength(); ++i) { if (args[i].Name == "uri") { - rtl::OUString uri; + OUString uri; if (!(args[i].Value >>= uri)) { throw css::lang::IllegalArgumentException( "Bad uri argument", @@ -1097,13 +1097,13 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) { css::uno::Sequence< css::beans::NamedValue > args; if (aElement >>= args) { - std::vector< rtl::OUString > uris; + std::vector< OUString > uris; for (sal_Int32 i = 0; i < args.getLength(); ++i) { if (args[i].Name != "uri") { throw css::lang::IllegalArgumentException( "Bad argument " + args[i].Name, static_cast< cppu::OWeakObject * >(this), 0); - } rtl::OUString uri; + } OUString uri; if (!(args[i].Value >>= uri)) { throw css::lang::IllegalArgumentException( "Bad uri argument", @@ -1123,7 +1123,7 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) } return; } - rtl::OUString impl; + OUString impl; if (aElement >>= impl) { // For live-removal of extensions: removeImplementation(impl); @@ -1135,7 +1135,7 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) css::uno::Reference< css::container::XEnumeration > cppuhelper::ServiceManager::createContentEnumeration( - rtl::OUString const & aServiceName) + OUString const & aServiceName) { std::vector< std::shared_ptr< Data::Implementation > > impls; { @@ -1191,7 +1191,7 @@ cppuhelper::ServiceManager::getPropertySetInfo() } void cppuhelper::ServiceManager::setPropertyValue( - rtl::OUString const & aPropertyName, css::uno::Any const &) + OUString const & aPropertyName, css::uno::Any const &) { if (aPropertyName == "DefaultContext") { throw css::beans::PropertyVetoException( @@ -1203,7 +1203,7 @@ void cppuhelper::ServiceManager::setPropertyValue( } css::uno::Any cppuhelper::ServiceManager::getPropertyValue( - rtl::OUString const & PropertyName) + OUString const & PropertyName) { if (PropertyName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1214,7 +1214,7 @@ css::uno::Any cppuhelper::ServiceManager::getPropertyValue( } void cppuhelper::ServiceManager::addPropertyChangeListener( - rtl::OUString const & aPropertyName, + OUString const & aPropertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const & xListener) { @@ -1227,7 +1227,7 @@ void cppuhelper::ServiceManager::addPropertyChangeListener( } void cppuhelper::ServiceManager::removePropertyChangeListener( - rtl::OUString const & aPropertyName, + OUString const & aPropertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const & aListener) { @@ -1240,7 +1240,7 @@ void cppuhelper::ServiceManager::removePropertyChangeListener( } void cppuhelper::ServiceManager::addVetoableChangeListener( - rtl::OUString const & PropertyName, + OUString const & PropertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const & aListener) { @@ -1253,7 +1253,7 @@ void cppuhelper::ServiceManager::addVetoableChangeListener( } void cppuhelper::ServiceManager::removeVetoableChangeListener( - rtl::OUString const & PropertyName, + OUString const & PropertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const & aListener) { @@ -1273,7 +1273,7 @@ cppuhelper::ServiceManager::getProperties() { } css::beans::Property cppuhelper::ServiceManager::getPropertyByName( - rtl::OUString const & aName) + OUString const & aName) { if (aName != "DefaultContext") { throw css::beans::UnknownPropertyException( @@ -1283,7 +1283,7 @@ css::beans::Property cppuhelper::ServiceManager::getPropertyByName( } sal_Bool cppuhelper::ServiceManager::hasPropertyByName( - rtl::OUString const & Name) + OUString const & Name) { return Name == "DefaultContext"; } @@ -1312,9 +1312,9 @@ void cppuhelper::ServiceManager::removeEventListenerFromComponent( } } -void cppuhelper::ServiceManager::init(rtl::OUString const & rdbUris) { +void cppuhelper::ServiceManager::init(OUString const & rdbUris) { for (sal_Int32 i = 0; i != -1;) { - rtl::OUString uri(rdbUris.getToken(0, ' ', i)); + OUString uri(rdbUris.getToken(0, ' ', i)); if (uri.isEmpty()) { continue; } @@ -1330,7 +1330,7 @@ void cppuhelper::ServiceManager::init(rtl::OUString const & rdbUris) { } void cppuhelper::ServiceManager::readRdbDirectory( - rtl::OUString const & uri, bool optional) + OUString const & uri, bool optional) { osl::Directory dir(uri); switch (dir.open()) { @@ -1348,7 +1348,7 @@ void cppuhelper::ServiceManager::readRdbDirectory( static_cast< cppu::OWeakObject * >(this)); } for (;;) { - rtl::OUString url; + OUString url; if (!cppu::nextDirectoryItem(dir, &url)) { break; } @@ -1357,7 +1357,7 @@ void cppuhelper::ServiceManager::readRdbDirectory( } void cppuhelper::ServiceManager::readRdbFile( - rtl::OUString const & uri, bool optional) + OUString const & uri, bool optional) { try { Parser( @@ -1382,7 +1382,7 @@ void cppuhelper::ServiceManager::readRdbFile( } } -bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) { +bool cppuhelper::ServiceManager::readLegacyRdbFile(OUString const & uri) { Registry reg; switch (reg.open(uri, RegAccessMode::READONLY)) { case RegError::NO_ERROR: @@ -1427,7 +1427,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) { for (sal_uInt32 i = 0; i != impls.getLength(); ++i) { RegistryKey implKey(impls.getElement(i)); assert(implKey.getName().match("/IMPLEMENTATIONS/")); - rtl::OUString name( + OUString name( implKey.getName().copy(RTL_CONSTASCII_LENGTH("/IMPLEMENTATIONS/"))); std::shared_ptr< Data::Implementation > impl( new Data::Implementation( @@ -1441,7 +1441,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) { } readLegacyRdbStrings( uri, implKey, "UNO/SERVICES", &impl->info->services); - for (std::vector< rtl::OUString >::const_iterator j( + for (std::vector< OUString >::const_iterator j( impl->info->services.begin()); j != impl->info->services.end(); ++j) { @@ -1449,7 +1449,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) { } readLegacyRdbStrings( uri, implKey, "UNO/SINGLETONS", &impl->info->singletons); - for (std::vector< rtl::OUString >::const_iterator j( + for (std::vector< OUString >::const_iterator j( impl->info->singletons.begin()); j != impl->info->singletons.end(); ++j) { @@ -1459,14 +1459,14 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) { return true; } -rtl::OUString cppuhelper::ServiceManager::readLegacyRdbString( - rtl::OUString const & uri, RegistryKey & key, rtl::OUString const & path) +OUString cppuhelper::ServiceManager::readLegacyRdbString( + OUString const & uri, RegistryKey & key, OUString const & path) { RegistryKey subkey; RegValueType t; sal_uInt32 s(0); if (key.openKey(path, subkey) != RegError::NO_ERROR - || subkey.getValueInfo(rtl::OUString(), &t, &s) != RegError::NO_ERROR + || subkey.getValueInfo(OUString(), &t, &s) != RegError::NO_ERROR || t != RegValueType::STRING || s == 0 || s > static_cast< sal_uInt32 >(SAL_MAX_INT32)) { @@ -1474,9 +1474,9 @@ rtl::OUString cppuhelper::ServiceManager::readLegacyRdbString( "Failure reading legacy rdb file " + uri, static_cast< cppu::OWeakObject * >(this)); } - rtl::OUString val; + OUString val; std::vector< char > v(s); // assuming sal_uInt32 fits into vector::size_type - if (subkey.getValue(rtl::OUString(), &v[0]) != RegError::NO_ERROR + if (subkey.getValue(OUString(), &v[0]) != RegError::NO_ERROR || v.back() != '\0' || !rtl_convertStringToUString( &val.pData, &v[0], static_cast< sal_Int32 >(s - 1), @@ -1493,8 +1493,8 @@ rtl::OUString cppuhelper::ServiceManager::readLegacyRdbString( } void cppuhelper::ServiceManager::readLegacyRdbStrings( - rtl::OUString const & uri, RegistryKey & key, rtl::OUString const & path, - std::vector< rtl::OUString > * strings) + OUString const & uri, RegistryKey & key, OUString const & path, + std::vector< OUString > * strings) { assert(strings != nullptr); RegistryKey subkey; @@ -1508,9 +1508,9 @@ void cppuhelper::ServiceManager::readLegacyRdbStrings( "Failure reading legacy rdb file " + uri, static_cast< cppu::OWeakObject * >(this)); } - rtl::OUString prefix(subkey.getName() + "/"); + OUString prefix(subkey.getName() + "/"); RegistryKeyNames names; - if (subkey.getKeyNames(rtl::OUString(), names) != RegError::NO_ERROR) { + if (subkey.getKeyNames(OUString(), names) != RegError::NO_ERROR) { throw css::uno::DeploymentException( "Failure reading legacy rdb file " + uri, static_cast< cppu::OWeakObject * >(this)); @@ -1522,11 +1522,11 @@ void cppuhelper::ServiceManager::readLegacyRdbStrings( } void cppuhelper::ServiceManager::insertRdbFiles( - std::vector< rtl::OUString > const & uris, + std::vector< OUString > const & uris, css::uno::Reference< css::uno::XComponentContext > const & alienContext) { Data extra; - for (std::vector< rtl::OUString >::const_iterator i(uris.begin()); + for (std::vector< OUString >::const_iterator i(uris.begin()); i != uris.end(); ++i) { try { @@ -1548,7 +1548,7 @@ void cppuhelper::ServiceManager::insertLegacyFactory( css::uno::Reference< css::lang::XServiceInfo > const & factoryInfo) { assert(factoryInfo.is()); - rtl::OUString name(factoryInfo->getImplementationName()); + OUString name(factoryInfo->getImplementationName()); css::uno::Reference< css::lang::XSingleComponentFactory > f1( factoryInfo, css::uno::UNO_QUERY); css::uno::Reference< css::lang::XSingleServiceFactory > f2; @@ -1570,7 +1570,7 @@ void cppuhelper::ServiceManager::insertLegacyFactory( extra.namedImplementations.emplace(name, impl); } extra.dynamicImplementations.emplace(factoryInfo, impl); - css::uno::Sequence< rtl::OUString > services( + css::uno::Sequence< OUString > services( factoryInfo->getSupportedServiceNames()); for (sal_Int32 i = 0; i != services.getLength(); ++i) { impl->info->services.push_back(services[i]); @@ -1631,7 +1631,7 @@ bool cppuhelper::ServiceManager::insertExtraData(Data const & extra) { extra.singletons.begin()); i != extra.singletons.end(); ++i) { - rtl::OUString name("/singletons/" + i->first); + OUString name("/singletons/" + i->first); //TODO: Update should be atomic: try { cont->removeByName(name + "/arguments"); @@ -1662,7 +1662,7 @@ bool cppuhelper::ServiceManager::insertExtraData(Data const & extra) { } void cppuhelper::ServiceManager::removeRdbFiles( - std::vector< rtl::OUString > const & uris) + std::vector< OUString > const & uris) { // The underlying data structures make this function somewhat inefficient, // but the assumption is that it is rarely called (and that if it is called, @@ -1670,7 +1670,7 @@ void cppuhelper::ServiceManager::removeRdbFiles( std::vector< std::shared_ptr< Data::Implementation > > clear; { osl::MutexGuard g(rBHelper.rMutex); - for (std::vector< rtl::OUString >::const_iterator i(uris.begin()); + for (std::vector< OUString >::const_iterator i(uris.begin()); i != uris.end(); ++i) { for (Data::NamedImplementations::iterator j( @@ -1732,7 +1732,7 @@ bool cppuhelper::ServiceManager::removeLegacyFactory( return true; } -void cppuhelper::ServiceManager::removeImplementation(const rtl::OUString & name) { +void cppuhelper::ServiceManager::removeImplementation(const OUString & name) { // The underlying data structures make this function somewhat inefficient, // but the assumption is that it is rarely called: std::shared_ptr< Data::Implementation > clear; @@ -1771,7 +1771,7 @@ void cppuhelper::ServiceManager::removeImplementation(const rtl::OUString & name std::shared_ptr< cppuhelper::ServiceManager::Data::Implementation > cppuhelper::ServiceManager::findServiceImplementation( css::uno::Reference< css::uno::XComponentContext > const & context, - rtl::OUString const & specifier) + OUString const & specifier) { std::shared_ptr< Data::Implementation > impl; bool loaded; @@ -1806,7 +1806,7 @@ cppuhelper::ServiceManager::findServiceImplementation( /// Make a simpler unique name for preload / progress reporting. #ifndef DISABLE_DYNLOADING -static rtl::OUString simplifyModule(const rtl::OUString &uri) +static OUString simplifyModule(const OUString &uri) { sal_Int32 nIdx; OUStringBuffer edit(uri); @@ -1837,7 +1837,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { #ifdef DISABLE_DYNLOADING abort(); #else - rtl::OUString aUri; + OUString aUri; osl::MutexGuard g(rBHelper.rMutex); css::uno::Environment aSourceEnv(css::uno::Environment::getCurrent()); @@ -1851,7 +1851,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { { try { - const rtl::OUString &aLibrary = iterator->second->info->uri; + const OUString &aLibrary = iterator->second->info->uri; if (aLibrary.isEmpty()) continue; @@ -1926,7 +1926,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { if (aSourceEnv.get() == aTargetEnv.get()) { // invoke function component factory - OString aImpl(rtl::OUStringToOString(iterator->second->info->name, RTL_TEXTENCODING_ASCII_US)); + OString aImpl(OUStringToOString(iterator->second->info->name, RTL_TEXTENCODING_ASCII_US)); xFactory.set(css::uno::Reference<css::uno::XInterface>(static_cast<css::uno::XInterface *>( (*fpComponentFactory)(aImpl.getStr(), this, nullptr)), SAL_NO_ACQUIRE)); } diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx index 2f7a749058bd..3d8a265aa750 100644 --- a/cppuhelper/source/servicemanager.hxx +++ b/cppuhelper/source/servicemanager.hxx @@ -71,48 +71,48 @@ public: struct ImplementationInfo { ImplementationInfo( - rtl::OUString const & theName, rtl::OUString const & theLoader, - rtl::OUString const & theUri, - rtl::OUString const & theEnvironment, - rtl::OUString const & theConstructor, - rtl::OUString const & thePrefix, + OUString const & theName, OUString const & theLoader, + OUString const & theUri, + OUString const & theEnvironment, + OUString const & theConstructor, + OUString const & thePrefix, css::uno::Reference< css::uno::XComponentContext > const & theAlienContext, - rtl::OUString const & theRdbFile): + OUString const & theRdbFile): name(theName), loader(theLoader), uri(theUri), environment(theEnvironment), constructor(theConstructor), prefix(thePrefix), alienContext(theAlienContext), rdbFile(theRdbFile) {} - explicit ImplementationInfo(rtl::OUString const & theName): + explicit ImplementationInfo(OUString const & theName): name(theName) {} ImplementationInfo(const ImplementationInfo&) = delete; const ImplementationInfo& operator=(const ImplementationInfo&) = delete; - rtl::OUString const name; - rtl::OUString const loader; - rtl::OUString const uri; - rtl::OUString const environment; - rtl::OUString const constructor; - rtl::OUString const prefix; + OUString const name; + OUString const loader; + OUString const uri; + OUString const environment; + OUString const constructor; + OUString const prefix; css::uno::Reference< css::uno::XComponentContext > const alienContext; - rtl::OUString const rdbFile; - std::vector< rtl::OUString > services; - std::vector< rtl::OUString > singletons; + OUString const rdbFile; + std::vector< OUString > services; + std::vector< OUString > singletons; }; struct Implementation { Implementation( - rtl::OUString const & name, rtl::OUString const & loader, - rtl::OUString const & uri, rtl::OUString const & environment, - rtl::OUString const & constructorName, - rtl::OUString const & prefix, + OUString const & name, OUString const & loader, + OUString const & uri, OUString const & environment, + OUString const & constructorName, + OUString const & prefix, css::uno::Reference< css::uno::XComponentContext > const & alienContext, - rtl::OUString const & rdbFile): + OUString const & rdbFile): info( new ImplementationInfo( name, loader, uri, environment, constructorName, prefix, @@ -121,7 +121,7 @@ public: {} Implementation( - rtl::OUString const & name, + OUString const & name, css::uno::Reference< css::lang::XSingleComponentFactory > const & theFactory1, css::uno::Reference< css::lang::XSingleServiceFactory > const & @@ -178,7 +178,7 @@ public: css::uno::Reference<css::uno::XInterface> const & instance); }; - typedef std::map< rtl::OUString, std::shared_ptr< Implementation > > + typedef std::map< OUString, std::shared_ptr< Implementation > > NamedImplementations; typedef @@ -189,7 +189,7 @@ public: typedef std::map< - rtl::OUString, + OUString, std::vector< std::shared_ptr< Implementation > > > ImplementationMap; @@ -207,7 +207,7 @@ public: using ServiceManagerBase::acquire; using ServiceManagerBase::release; - void init(rtl::OUString const & rdbUris); + void init(OUString const & rdbUris); void setContext( css::uno::Reference< css::uno::XComponentContext > const & context) @@ -236,32 +236,32 @@ private: virtual void SAL_CALL disposing() override; - virtual rtl::OUString SAL_CALL getImplementationName() override; + virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) override; + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( - rtl::OUString const & aServiceSpecifier) override; + OUString const & aServiceSpecifier) override; virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( - rtl::OUString const & ServiceSpecifier, + OUString const & ServiceSpecifier, css::uno::Sequence< css::uno::Any > const & Arguments) override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override; virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithContext( - rtl::OUString const & aServiceSpecifier, + OUString const & aServiceSpecifier, css::uno::Reference< css::uno::XComponentContext > const & Context) override; virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( - rtl::OUString const & ServiceSpecifier, + OUString const & ServiceSpecifier, css::uno::Sequence< css::uno::Any > const & Arguments, css::uno::Reference< css::uno::XComponentContext > const & Context) override; @@ -279,43 +279,43 @@ private: virtual void SAL_CALL remove(css::uno::Any const & aElement) override; virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL - createContentEnumeration(rtl::OUString const & aServiceName) override; + createContentEnumeration(OUString const & aServiceName) override; virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; virtual void SAL_CALL setPropertyValue( - rtl::OUString const & aPropertyName, css::uno::Any const & aValue) override; + OUString const & aPropertyName, css::uno::Any const & aValue) override; virtual css::uno::Any SAL_CALL getPropertyValue( - rtl::OUString const & PropertyName) override; + OUString const & PropertyName) override; virtual void SAL_CALL addPropertyChangeListener( - rtl::OUString const & aPropertyName, + OUString const & aPropertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const & xListener) override; virtual void SAL_CALL removePropertyChangeListener( - rtl::OUString const & aPropertyName, + OUString const & aPropertyName, css::uno::Reference< css::beans::XPropertyChangeListener > const & aListener) override; virtual void SAL_CALL addVetoableChangeListener( - rtl::OUString const & PropertyName, + OUString const & PropertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const & aListener) override; virtual void SAL_CALL removeVetoableChangeListener( - rtl::OUString const & PropertyName, + OUString const & PropertyName, css::uno::Reference< css::beans::XVetoableChangeListener > const & aListener) override; virtual css::uno::Sequence< css::beans::Property > SAL_CALL getProperties() override; virtual css::beans::Property SAL_CALL getPropertyByName( - rtl::OUString const & aName) override; + OUString const & aName) override; - virtual sal_Bool SAL_CALL hasPropertyByName(rtl::OUString const & Name) override; + virtual sal_Bool SAL_CALL hasPropertyByName(OUString const & Name) override; virtual void SAL_CALL disposing(css::lang::EventObject const & Source) override; @@ -329,22 +329,22 @@ private: void removeEventListenerFromComponent( css::uno::Reference< css::lang::XComponent > const & component); - void readRdbDirectory(rtl::OUString const & uri, bool optional); + void readRdbDirectory(OUString const & uri, bool optional); - void readRdbFile(rtl::OUString const & uri, bool optional); + void readRdbFile(OUString const & uri, bool optional); - bool readLegacyRdbFile(rtl::OUString const & uri); + bool readLegacyRdbFile(OUString const & uri); - rtl::OUString readLegacyRdbString( - rtl::OUString const & uri, RegistryKey & key, - rtl::OUString const & path); + OUString readLegacyRdbString( + OUString const & uri, RegistryKey & key, + OUString const & path); void readLegacyRdbStrings( - rtl::OUString const & uri, RegistryKey & key, - rtl::OUString const & path, std::vector< rtl::OUString > * strings); + OUString const & uri, RegistryKey & key, + OUString const & path, std::vector< OUString > * strings); void insertRdbFiles( - std::vector< rtl::OUString > const & uris, + std::vector< OUString > const & uris, css::uno::Reference< css::uno::XComponentContext > const & alientContext); @@ -353,17 +353,17 @@ private: bool insertExtraData(Data const & extra); - void removeRdbFiles(std::vector< rtl::OUString > const & uris); + void removeRdbFiles(std::vector< OUString > const & uris); bool removeLegacyFactory( css::uno::Reference< css::lang::XServiceInfo > const & factoryInfo, bool removeListener); - void removeImplementation(const rtl::OUString & name); + void removeImplementation(const OUString & name); std::shared_ptr< Data::Implementation > findServiceImplementation( css::uno::Reference< css::uno::XComponentContext > const & context, - rtl::OUString const & specifier); + OUString const & specifier); void preloadImplementations(); diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index b54d45ed0773..9f23f1160c03 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -39,15 +39,15 @@ #endif css::uno::Environment cppuhelper::detail::getEnvironment( - rtl::OUString const & name, rtl::OUString const & implementation) + OUString const & name, OUString const & implementation) { - rtl::OUString n(name); + OUString n(name); if (!implementation.isEmpty()) { static char const * log = std::getenv("UNO_ENV_LOG"); if (log != nullptr && *log != 0) { - rtl::OString imps(log); + OString imps(log); for (sal_Int32 i = 0; i != -1;) { - rtl::OString imp(imps.getToken(0, ';', i)); + OString imp(imps.getToken(0, ';', i)); //TODO: this assumes UNO_ENV_LOG only contains ASCII characters: if (implementation.equalsAsciiL(imp.getStr(), imp.getLength())) { @@ -66,11 +66,11 @@ namespace { css::uno::Environment getEnvironmentFromModule( osl::Module const & module, css::uno::Environment const & target, - rtl::OUString const & implementation, rtl::OUString const & prefix) + OUString const & implementation, OUString const & prefix) { char const * name = nullptr; css::uno::Environment env; - rtl::OUString fullPrefix(prefix); + OUString fullPrefix(prefix); if (!fullPrefix.isEmpty()) { fullPrefix += "_"; } @@ -80,7 +80,7 @@ css::uno::Environment getEnvironmentFromModule( if (fp1 != nullptr) { (*fp1)( &name, reinterpret_cast<uno_Environment **>(&env), - (rtl::OUStringToOString(implementation, RTL_TEXTENCODING_ASCII_US) + (OUStringToOString(implementation, RTL_TEXTENCODING_ASCII_US) .getStr()), target.get()); } else { @@ -95,7 +95,7 @@ css::uno::Environment getEnvironmentFromModule( } if (!env.is() && name != nullptr) { env = cppuhelper::detail::getEnvironment( - rtl::OUString::createFromAscii(name), implementation); + OUString::createFromAscii(name), implementation); } return env; } @@ -104,7 +104,7 @@ css::uno::Environment getEnvironmentFromModule( extern "C" void getFactory(va_list * args) { component_getFactoryFunc fn = va_arg(*args, component_getFactoryFunc); - rtl::OString const * implementation = va_arg(*args, rtl::OString const *); + OString const * implementation = va_arg(*args, OString const *); void * smgr = va_arg(*args, void *); void ** factory = va_arg(*args, void **); *factory = (*fn)(implementation->getStr(), smgr, nullptr); @@ -112,8 +112,8 @@ extern "C" void getFactory(va_list * args) { css::uno::Reference<css::uno::XInterface> invokeComponentFactory( css::uno::Environment const & source, css::uno::Environment const & target, - component_getFactoryFunc function, rtl::OUString const & uri, - rtl::OUString const & implementation, + component_getFactoryFunc function, OUString const & uri, + OUString const & implementation, css::uno::Reference<css::lang::XMultiServiceFactory> const & serviceManager) { if (!(source.is() && target.is())) { @@ -121,8 +121,8 @@ css::uno::Reference<css::uno::XInterface> invokeComponentFactory( "cannot get environments", css::uno::Reference<css::uno::XInterface>()); } - rtl::OString impl( - rtl::OUStringToOString(implementation, RTL_TEXTENCODING_ASCII_US)); + OString impl( + OUStringToOString(implementation, RTL_TEXTENCODING_ASCII_US)); if (source.get() == target.get()) { return css::uno::Reference<css::uno::XInterface>( static_cast<css::uno::XInterface *>( @@ -230,9 +230,9 @@ cppuhelper::WrapperConstructorFn mapConstructorFn( } void cppuhelper::detail::loadSharedLibComponentFactory( - rtl::OUString const & uri, rtl::OUString const & environment, - rtl::OUString const & prefix, rtl::OUString const & implementation, - rtl::OUString const & constructor, + OUString const & uri, OUString const & environment, + OUString const & prefix, OUString const & implementation, + OUString const & constructor, css::uno::Reference<css::lang::XMultiServiceFactory> const & serviceManager, WrapperConstructorFn * constructorFunction, css::uno::Reference<css::uno::XInterface> * factory) @@ -255,7 +255,7 @@ void cppuhelper::detail::loadSharedLibComponentFactory( if (curEnv.get() != env.get()) { std::abort();//TODO } - rtl::OUString name(prefix == "direct" ? implementation : uri); + OUString name(prefix == "direct" ? implementation : uri); SAL_INFO("cppuhelper.shlib", "prefix=" << prefix << " implementation=" << implementation << " uri=" << uri); lib_to_factory_mapping const * map = lo_get_factory_map(); component_getFactoryFunc fp = 0; @@ -299,7 +299,7 @@ void cppuhelper::detail::loadSharedLibComponentFactory( css::uno::Reference<css::uno::XInterface>()); } if (constructor.isEmpty()) { - rtl::OUString sym; + OUString sym; SAL_INFO("cppuhelper.shlib", "prefix=" << prefix << " implementation=" << implementation << " uri=" << uri); if (prefix == "direct") { sym = implementation.replace('.', '_') + "_" COMPONENT_GETFACTORY; @@ -345,8 +345,8 @@ void cppuhelper::detail::loadSharedLibComponentFactory( } css::uno::Reference<css::uno::XInterface> cppu::loadSharedLibComponentFactory( - rtl::OUString const & uri, rtl::OUString const & rPath, - rtl::OUString const & rImplName, + OUString const & uri, OUString const & rPath, + OUString const & rImplName, css::uno::Reference<css::lang::XMultiServiceFactory> const & xMgr, css::uno::Reference<css::registry::XRegistryKey> const & xKey) { @@ -373,7 +373,7 @@ extern "C" void writeInfo(va_list * args) { } void cppu::writeSharedLibComponentInfo( - rtl::OUString const & uri, rtl::OUString const & rPath, + OUString const & uri, OUString const & rPath, css::uno::Reference<css::lang::XMultiServiceFactory> const & xMgr, css::uno::Reference<css::registry::XRegistryKey> const & xKey) { diff --git a/cppuhelper/source/supportsservice.cxx b/cppuhelper/source/supportsservice.cxx index 612ed37eb7a8..629981310354 100644 --- a/cppuhelper/source/supportsservice.cxx +++ b/cppuhelper/source/supportsservice.cxx @@ -18,10 +18,10 @@ #include <sal/types.h> bool cppu::supportsService( - css::lang::XServiceInfo * implementation, rtl::OUString const & name) + css::lang::XServiceInfo * implementation, OUString const & name) { assert(implementation != nullptr); - css::uno::Sequence< rtl::OUString > s( + css::uno::Sequence< OUString > s( implementation->getSupportedServiceNames()); for (sal_Int32 i = 0; i != s.getLength(); ++i) { if (s[i] == name) { diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index b4aec385c956..a6336cab7833 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -56,8 +56,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::reflection; -using rtl::OUString; - namespace cppu { diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index ed811f03c44f..15702e624e59 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -55,8 +55,6 @@ #include <sal/macros.h> #include <sal/types.h> -using rtl::OUString; - #include <unoidl/unoidl.hxx> #include "paths.hxx" @@ -64,7 +62,7 @@ using rtl::OUString; namespace { -rtl::OUString makePrefix(rtl::OUString const & name) { +OUString makePrefix(OUString const & name) { return name.isEmpty() ? name : name + "."; } @@ -84,7 +82,7 @@ class SimpleTypeDescription: { public: SimpleTypeDescription( - css::uno::TypeClass typeClass, rtl::OUString const & name): + css::uno::TypeClass typeClass, OUString const & name): typeClass_(typeClass), name_(name) {} @@ -94,11 +92,11 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return typeClass_; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } css::uno::TypeClass typeClass_; - rtl::OUString name_; + OUString name_; }; class SequenceTypeDescription: @@ -107,7 +105,7 @@ class SequenceTypeDescription: public: SequenceTypeDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, rtl::OUString const & componentType): + OUString const & name, OUString const & componentType): manager_(manager), name_(name), componentType_(componentType) { assert(manager.is()); } @@ -117,7 +115,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_SEQUENCE; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -125,8 +123,8 @@ private: { return manager_->resolve(componentType_); } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; - rtl::OUString componentType_; + OUString name_; + OUString componentType_; }; class PublishableDescription: @@ -150,7 +148,7 @@ class ModuleDescription: public: ModuleDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::ModuleEntity > const & entity): manager_(manager), name_(name), entity_(entity) { assert(manager.is()); assert(entity.is()); } @@ -161,7 +159,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_MODULE; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual @@ -170,14 +168,14 @@ private: SAL_CALL getMembers() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::ModuleEntity > entity_; }; css::uno::Sequence< css::uno::Reference< css::reflection::XTypeDescription > > ModuleDescription::getMembers() { try { - std::vector< rtl::OUString > names(entity_->getMemberNames()); + std::vector< OUString > names(entity_->getMemberNames()); assert(names.size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(names.size()); css::uno::Sequence< @@ -200,7 +198,7 @@ EnumTypeDescription_Base; class EnumTypeDescription: public EnumTypeDescription_Base { public: EnumTypeDescription( - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::EnumTypeEntity > const & entity): EnumTypeDescription_Base(entity->isPublished()), name_(name), entity_(entity) @@ -212,25 +210,25 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_ENUM; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual sal_Int32 SAL_CALL getDefaultEnumValue() override { return entity_->getMembers()[0].value; } - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getEnumNames() override; + virtual css::uno::Sequence< OUString > SAL_CALL getEnumNames() override; virtual css::uno::Sequence< sal_Int32 > SAL_CALL getEnumValues() override; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::EnumTypeEntity > entity_; }; -css::uno::Sequence< rtl::OUString > EnumTypeDescription::getEnumNames() +css::uno::Sequence< OUString > EnumTypeDescription::getEnumNames() { assert(entity_->getMembers().size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(entity_->getMembers().size()); - css::uno::Sequence< rtl::OUString > s(n); + css::uno::Sequence< OUString > s(n); for (sal_Int32 i = 0; i != n; ++i) { s[i] = entity_->getMembers()[i].name; } @@ -256,7 +254,7 @@ class PlainStructTypeDescription: public PlainStructTypeDescription_Base { public: PlainStructTypeDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::PlainStructTypeEntity > const & entity): PlainStructTypeDescription_Base(entity->isPublished()), manager_(manager), name_(name), entity_(entity) @@ -268,7 +266,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_STRUCT; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -283,10 +281,10 @@ private: css::uno::Reference< css::reflection::XTypeDescription > > SAL_CALL getMemberTypes() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getMemberNames() override; + virtual css::uno::Sequence< OUString > SAL_CALL getMemberNames() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getTypeParameters() override - { return css::uno::Sequence< rtl::OUString >(); } + virtual css::uno::Sequence< OUString > SAL_CALL getTypeParameters() override + { return css::uno::Sequence< OUString >(); } virtual css::uno::Sequence< @@ -297,7 +295,7 @@ private: } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::PlainStructTypeEntity > entity_; }; @@ -314,11 +312,11 @@ PlainStructTypeDescription::getMemberTypes() return s; } -css::uno::Sequence< rtl::OUString > PlainStructTypeDescription::getMemberNames() +css::uno::Sequence< OUString > PlainStructTypeDescription::getMemberNames() { assert(entity_->getDirectMembers().size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(entity_->getDirectMembers().size()); - css::uno::Sequence< rtl::OUString > s(n); + css::uno::Sequence< OUString > s(n); for (sal_Int32 i = 0; i != n; ++i) { s[i] = entity_->getDirectMembers()[i].name; } @@ -330,7 +328,7 @@ class ParameterizedMemberTypeDescription: { public: explicit ParameterizedMemberTypeDescription( - rtl::OUString const & typeParameterName): + OUString const & typeParameterName): typeParameterName_(typeParameterName) {} @@ -340,10 +338,10 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_UNKNOWN; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return typeParameterName_; } - rtl::OUString typeParameterName_; + OUString typeParameterName_; }; typedef cppu::ImplInheritanceHelper< @@ -356,7 +354,7 @@ class PolymorphicStructTypeTemplateDescription: public: PolymorphicStructTypeTemplateDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > const & entity): PolymorphicStructTypeTemplateDescription_Base(entity->isPublished()), @@ -369,7 +367,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_STRUCT; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -381,9 +379,9 @@ private: css::uno::Reference< css::reflection::XTypeDescription > > SAL_CALL getMemberTypes() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getMemberNames() override; + virtual css::uno::Sequence< OUString > SAL_CALL getMemberNames() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getTypeParameters() override; + virtual css::uno::Sequence< OUString > SAL_CALL getTypeParameters() override; virtual css::uno::Sequence< @@ -394,7 +392,7 @@ private: } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > entity_; }; @@ -414,24 +412,24 @@ PolymorphicStructTypeTemplateDescription::getMemberTypes() return s; } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > PolymorphicStructTypeTemplateDescription::getMemberNames() { assert(entity_->getMembers().size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(entity_->getMembers().size()); - css::uno::Sequence< rtl::OUString > s(n); + css::uno::Sequence< OUString > s(n); for (sal_Int32 i = 0; i != n; ++i) { s[i] = entity_->getMembers()[i].name; } return s; } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > PolymorphicStructTypeTemplateDescription::getTypeParameters() { assert(entity_->getTypeParameters().size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(entity_->getTypeParameters().size()); - css::uno::Sequence< rtl::OUString > s(n); + css::uno::Sequence< OUString > s(n); for (sal_Int32 i = 0; i != n; ++i) { s[i] = entity_->getTypeParameters()[i]; } @@ -444,10 +442,10 @@ class InstantiatedPolymorphicStructTypeDescription: public: InstantiatedPolymorphicStructTypeDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > const & entity, - std::vector< rtl::OUString > const & arguments): + std::vector< OUString > const & arguments): manager_(manager), name_(name), entity_(entity), arguments_(arguments) { assert(manager.is()); @@ -461,7 +459,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_STRUCT; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -473,10 +471,10 @@ private: css::uno::Reference< css::reflection::XTypeDescription > > SAL_CALL getMemberTypes() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getMemberNames() override; + virtual css::uno::Sequence< OUString > SAL_CALL getMemberNames() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getTypeParameters() override - { return css::uno::Sequence< rtl::OUString >(); } + virtual css::uno::Sequence< OUString > SAL_CALL getTypeParameters() override + { return css::uno::Sequence< OUString >(); } virtual css::uno::Sequence< @@ -484,9 +482,9 @@ private: SAL_CALL getTypeArguments() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > entity_; - std::vector< rtl::OUString > arguments_; + std::vector< OUString > arguments_; }; css::uno::Sequence< css::uno::Reference< css::reflection::XTypeDescription > > @@ -497,9 +495,9 @@ InstantiatedPolymorphicStructTypeDescription::getMemberTypes() css::uno::Sequence< css::uno::Reference< css::reflection::XTypeDescription > > s(n); for (sal_Int32 i = 0; i != n; ++i) { - rtl::OUString type(entity_->getMembers()[i].type); + OUString type(entity_->getMembers()[i].type); if (entity_->getMembers()[i].parameterized) { - for (std::vector< rtl::OUString >::const_iterator j( + for (std::vector< OUString >::const_iterator j( entity_->getTypeParameters().begin()); j != entity_->getTypeParameters().end(); ++j) { @@ -516,12 +514,12 @@ InstantiatedPolymorphicStructTypeDescription::getMemberTypes() return s; } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > InstantiatedPolymorphicStructTypeDescription::getMemberNames() { assert(entity_->getMembers().size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(entity_->getMembers().size()); - css::uno::Sequence< rtl::OUString > s(n); + css::uno::Sequence< OUString > s(n); for (sal_Int32 i = 0; i != n; ++i) { s[i] = entity_->getMembers()[i].name; } @@ -548,7 +546,7 @@ class ExceptionTypeDescription: public ExceptionTypeDescription_Base { public: ExceptionTypeDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::ExceptionTypeEntity > const & entity): ExceptionTypeDescription_Base(entity->isPublished()), manager_(manager), name_(name), entity_(entity) @@ -560,7 +558,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_EXCEPTION; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -575,10 +573,10 @@ private: css::uno::Reference< css::reflection::XTypeDescription > > SAL_CALL getMemberTypes() override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getMemberNames() override; + virtual css::uno::Sequence< OUString > SAL_CALL getMemberNames() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::ExceptionTypeEntity > entity_; }; @@ -594,11 +592,11 @@ ExceptionTypeDescription::getMemberTypes() { return s; } -css::uno::Sequence< rtl::OUString > ExceptionTypeDescription::getMemberNames() +css::uno::Sequence< OUString > ExceptionTypeDescription::getMemberNames() { assert(entity_->getDirectMembers().size() <= SAL_MAX_INT32); sal_Int32 n = static_cast< sal_Int32 >(entity_->getDirectMembers().size()); - css::uno::Sequence< rtl::OUString > s(n); + css::uno::Sequence< OUString > s(n); for (sal_Int32 i = 0; i != n; ++i) { s[i] = entity_->getDirectMembers()[i].name; } @@ -612,7 +610,7 @@ class AttributeDescription: public: AttributeDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, unoidl::InterfaceTypeEntity::Attribute const & attribute, sal_Int32 position): manager_(manager), name_(name), attribute_(attribute), @@ -625,10 +623,10 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_INTERFACE_ATTRIBUTE; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } - virtual rtl::OUString SAL_CALL getMemberName() override + virtual OUString SAL_CALL getMemberName() override { return attribute_.name; } virtual sal_Int32 SAL_CALL getPosition() override @@ -655,7 +653,7 @@ private: SAL_CALL getSetExceptions() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; unoidl::InterfaceTypeEntity::Attribute attribute_; sal_Int32 position_; }; @@ -704,7 +702,7 @@ public: private: virtual ~MethodParameter() override {} - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return parameter_.name; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -744,7 +742,7 @@ class MethodDescription: public: MethodDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, unoidl::InterfaceTypeEntity::Method const & method, sal_Int32 position): manager_(manager), name_(name), method_(method), position_(position) { assert(manager.is()); } @@ -755,10 +753,10 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_INTERFACE_METHOD; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } - virtual rtl::OUString SAL_CALL getMemberName() override + virtual OUString SAL_CALL getMemberName() override { return method_.name; } virtual sal_Int32 SAL_CALL getPosition() override @@ -782,7 +780,7 @@ private: SAL_CALL getExceptions() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; unoidl::InterfaceTypeEntity::Method method_; sal_Int32 position_; }; @@ -831,7 +829,7 @@ private: css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > const & description); - std::set< rtl::OUString > set_; + std::set< OUString > set_; sal_Int32 offset_; }; @@ -876,7 +874,7 @@ class InterfaceTypeDescription: public InterfaceTypeDescription_Base { public: InterfaceTypeDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::InterfaceTypeEntity > const & entity): InterfaceTypeDescription_Base(entity->isPublished()), manager_(manager), name_(name), entity_(entity) @@ -888,7 +886,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_INTERFACE; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -918,7 +916,7 @@ private: SAL_CALL getOptionalBaseTypes() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::InterfaceTypeEntity > entity_; }; @@ -981,7 +979,7 @@ class ConstantDescription: { public: ConstantDescription( - rtl::OUString const & constantGroupName, + OUString const & constantGroupName, unoidl::ConstantGroupEntity::Member const & member); private: @@ -990,18 +988,18 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_CONSTANT; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Any SAL_CALL getConstantValue() override { return value_; } - rtl::OUString name_; + OUString name_; css::uno::Any value_; }; ConstantDescription::ConstantDescription( - rtl::OUString const & constantGroupName, + OUString const & constantGroupName, unoidl::ConstantGroupEntity::Member const & member): name_(makePrefix(constantGroupName) + member.name) { @@ -1048,7 +1046,7 @@ ConstantGroupDescription_Base; class ConstantGroupDescription: public ConstantGroupDescription_Base { public: ConstantGroupDescription( - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::ConstantGroupEntity > const & entity): ConstantGroupDescription_Base(entity->isPublished()), name_(name), entity_(entity) @@ -1060,7 +1058,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_CONSTANTS; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual @@ -1068,7 +1066,7 @@ private: css::uno::Reference< css::reflection::XConstantTypeDescription > > SAL_CALL getConstants() override; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::ConstantGroupEntity > entity_; }; @@ -1093,7 +1091,7 @@ class TypedefDescription: public TypedefDescription_Base { public: TypedefDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::TypedefEntity > const & entity): TypedefDescription_Base(entity->isPublished()), manager_(manager), name_(name), entity_(entity) @@ -1105,7 +1103,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_TYPEDEF; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -1113,7 +1111,7 @@ private: { return manager_->resolve(entity_->getType()); } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::TypedefEntity > entity_; }; @@ -1132,7 +1130,7 @@ public: private: virtual ~ConstructorParameter() override {} - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return parameter_.name; } virtual css::uno::Reference< css::reflection::XTypeDescription > SAL_CALL @@ -1175,7 +1173,7 @@ private: virtual sal_Bool SAL_CALL isDefaultConstructor() override { return constructor_.defaultConstructor; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return constructor_.name; } virtual @@ -1230,7 +1228,7 @@ class SingleInterfaceBasedServiceDescription: public: SingleInterfaceBasedServiceDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > const & entity): SingleInterfaceBasedServiceDescription_Base(entity->isPublished()), @@ -1243,7 +1241,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_SERVICE; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual @@ -1307,7 +1305,7 @@ private: SAL_CALL getConstructors() override; rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > entity_; }; @@ -1343,7 +1341,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_PROPERTY; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return property_.name; } virtual sal_Int16 SAL_CALL getPropertyFlags() override @@ -1367,7 +1365,7 @@ class AccumulationBasedServiceDescription: public: AccumulationBasedServiceDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::AccumulationBasedServiceEntity > const & entity): AccumulationBasedServiceDescription_Base(entity->isPublished()), @@ -1380,7 +1378,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_SERVICE; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual @@ -1426,7 +1424,7 @@ private: } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::AccumulationBasedServiceEntity > entity_; }; @@ -1531,7 +1529,7 @@ class InterfaceBasedSingletonDescription: public: InterfaceBasedSingletonDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::InterfaceBasedSingletonEntity > const & entity): InterfaceBasedSingletonDescription_Base(entity->isPublished()), manager_(manager), name_(name), entity_(entity) @@ -1543,7 +1541,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_SINGLETON; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XServiceTypeDescription > @@ -1561,7 +1559,7 @@ private: { return manager_->resolve(entity_->getBase()); } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::InterfaceBasedSingletonEntity > entity_; }; @@ -1575,7 +1573,7 @@ class ServiceBasedSingletonDescription: public: ServiceBasedSingletonDescription( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::ServiceBasedSingletonEntity > const & entity): ServiceBasedSingletonDescription_Base(entity_->isPublished()), manager_(manager), name_(name), entity_(entity) @@ -1587,7 +1585,7 @@ private: virtual css::uno::TypeClass SAL_CALL getTypeClass() override { return css::uno::TypeClass_SINGLETON; } - virtual rtl::OUString SAL_CALL getName() override + virtual OUString SAL_CALL getName() override { return name_; } virtual css::uno::Reference< css::reflection::XServiceTypeDescription > @@ -1605,7 +1603,7 @@ private: { return css::uno::Reference< css::reflection::XTypeDescription >(); } rtl::Reference< cppuhelper::TypeManager > manager_; - rtl::OUString name_; + OUString name_; rtl::Reference< unoidl::ServiceBasedSingletonEntity > entity_; }; @@ -1615,7 +1613,7 @@ class Enumeration: public: Enumeration( rtl::Reference< cppuhelper::TypeManager > const & manager, - rtl::OUString const & prefix, + OUString const & prefix, rtl::Reference< unoidl::MapCursor > const & cursor, css::uno::Sequence< css::uno::TypeClass > const & types, bool deep): manager_(manager), types_(types), deep_(deep) @@ -1643,13 +1641,13 @@ private: struct Position { Position( - rtl::OUString const & thePrefix, + OUString const & thePrefix, rtl::Reference< unoidl::MapCursor > const & theCursor): prefix(thePrefix), cursor(theCursor) { assert(theCursor.is()); } Position( - rtl::OUString const & thePrefix, + OUString const & thePrefix, rtl::Reference< unoidl::ConstantGroupEntity > const & theConstantGroup): prefix(thePrefix), constantGroup(theConstantGroup), @@ -1665,7 +1663,7 @@ private: } } - rtl::OUString prefix; + OUString prefix; rtl::Reference< unoidl::MapCursor > cursor; rtl::Reference< unoidl::ConstantGroupEntity > constantGroup; std::vector< unoidl::ConstantGroupEntity::Member >::const_iterator @@ -1678,13 +1676,13 @@ private: osl::Mutex mutex_; std::stack< Position > positions_; - rtl::OUString current_; + OUString current_; }; css::uno::Reference< css::reflection::XTypeDescription > Enumeration::nextTypeDescription() { - rtl::OUString name; + OUString name; { osl::MutexGuard g(mutex_); if (positions_.empty()) { @@ -1714,7 +1712,7 @@ void Enumeration::findNextMatch() { try { for (;;) { assert(!positions_.empty()); - rtl::OUString name; + OUString name; if (positions_.top().cursor.is()) { // root or module rtl::Reference< unoidl::Entity > ent( positions_.top().cursor->getNext(&name)); @@ -1808,7 +1806,7 @@ cppuhelper::TypeManager::TypeManager(): manager_(new unoidl::Manager) {} -css::uno::Any cppuhelper::TypeManager::find(rtl::OUString const & name) { +css::uno::Any cppuhelper::TypeManager::find(OUString const & name) { //TODO: caching? (here or in unoidl::Manager?) struct Simple { OUStringLiteral name; @@ -1856,7 +1854,7 @@ css::uno::Any cppuhelper::TypeManager::find(rtl::OUString const & name) { } i = name.lastIndexOf('.'); if (i != -1) { - rtl::OUString parent(name.copy(0, i)); + OUString parent(name.copy(0, i)); ent = findEntity(parent); if (ent.is()) { switch (ent->getSort()) { @@ -1878,7 +1876,7 @@ css::uno::Any cppuhelper::TypeManager::find(rtl::OUString const & name) { } css::uno::Reference< css::reflection::XTypeDescription > -cppuhelper::TypeManager::resolve(rtl::OUString const & name) { +cppuhelper::TypeManager::resolve(OUString const & name) { css::uno::Reference< css::reflection::XTypeDescription > desc( find(name), css::uno::UNO_QUERY); if (!desc.is()) { @@ -1893,19 +1891,19 @@ cppuhelper::TypeManager::~TypeManager() throw () {} void cppuhelper::TypeManager::disposing() {} //TODO -rtl::OUString cppuhelper::TypeManager::getImplementationName() +OUString cppuhelper::TypeManager::getImplementationName() { - return rtl::OUString( + return OUString( "com.sun.star.comp.cppuhelper.bootstrap.TypeManager"); } sal_Bool cppuhelper::TypeManager::supportsService( - rtl::OUString const & ServiceName) + OUString const & ServiceName) { return cppu::supportsService(this, ServiceName); } -css::uno::Sequence< rtl::OUString > +css::uno::Sequence< OUString > cppuhelper::TypeManager::getSupportedServiceNames() { css::uno::Sequence<OUString> names { "com.sun.star.reflection.TypeDescriptionManager" }; //TODO @@ -1913,7 +1911,7 @@ cppuhelper::TypeManager::getSupportedServiceNames() } css::uno::Any cppuhelper::TypeManager::getByHierarchicalName( - rtl::OUString const & aName) + OUString const & aName) { css::uno::Any desc(find(aName)); if (!desc.hasValue()) { @@ -1924,14 +1922,14 @@ css::uno::Any cppuhelper::TypeManager::getByHierarchicalName( } sal_Bool cppuhelper::TypeManager::hasByHierarchicalName( - rtl::OUString const & aName) + OUString const & aName) { return find(aName).hasValue(); } css::uno::Type cppuhelper::TypeManager::getElementType() { - return cppu::UnoType< rtl::OUString >::get(); + return cppu::UnoType< OUString >::get(); } sal_Bool cppuhelper::TypeManager::hasElements() @@ -1958,7 +1956,7 @@ sal_Bool cppuhelper::TypeManager::has(css::uno::Any const &) void cppuhelper::TypeManager::insert(css::uno::Any const & aElement) { - rtl::OUString uri; + OUString uri; if (!(aElement >>= uri)) { throw css::lang::IllegalArgumentException( ("css.uno.theTypeDescriptionManager.insert expects a string URI" @@ -1972,7 +1970,7 @@ void cppuhelper::TypeManager::insert(css::uno::Any const & aElement) void cppuhelper::TypeManager::remove(css::uno::Any const & aElement) { - rtl::OUString uri; + OUString uri; if (!(aElement >>= uri)) { throw css::lang::IllegalArgumentException( ("css.uno.theTypeDescriptionManager.remove expects a string URI" @@ -1984,7 +1982,7 @@ void cppuhelper::TypeManager::remove(css::uno::Any const & aElement) css::uno::Reference< css::reflection::XTypeDescriptionEnumeration > cppuhelper::TypeManager::createTypeDescriptionEnumeration( - rtl::OUString const & moduleName, + OUString const & moduleName, css::uno::Sequence< css::uno::TypeClass > const & types, css::reflection::TypeDescriptionSearchDepth depth) { @@ -2008,9 +2006,9 @@ cppuhelper::TypeManager::createTypeDescriptionEnumeration( depth == css::reflection::TypeDescriptionSearchDepth_INFINITE); } -void cppuhelper::TypeManager::init(rtl::OUString const & rdbUris) { +void cppuhelper::TypeManager::init(OUString const & rdbUris) { for (sal_Int32 i = 0; i != -1;) { - rtl::OUString uri(rdbUris.getToken(0, ' ', i)); + OUString uri(rdbUris.getToken(0, ' ', i)); if (uri.isEmpty()) { continue; } @@ -2026,7 +2024,7 @@ void cppuhelper::TypeManager::init(rtl::OUString const & rdbUris) { } void cppuhelper::TypeManager::readRdbDirectory( - rtl::OUString const & uri, bool optional) + OUString const & uri, bool optional) { osl::Directory dir(uri); switch (dir.open()) { @@ -2044,7 +2042,7 @@ void cppuhelper::TypeManager::readRdbDirectory( static_cast< cppu::OWeakObject * >(this)); } for (;;) { - rtl::OUString url; + OUString url; if (!cppu::nextDirectoryItem(dir, &url)) { break; } @@ -2053,7 +2051,7 @@ void cppuhelper::TypeManager::readRdbDirectory( } void cppuhelper::TypeManager::readRdbFile( - rtl::OUString const & uri, bool optional) + OUString const & uri, bool optional) { try { manager_->addProvider(uri); @@ -2073,7 +2071,7 @@ void cppuhelper::TypeManager::readRdbFile( } css::uno::Any cppuhelper::TypeManager::getSequenceType( - rtl::OUString const & name) + OUString const & name) { assert(name.startsWith("[]")); return css::uno::makeAny< @@ -2083,7 +2081,7 @@ css::uno::Any cppuhelper::TypeManager::getSequenceType( } css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct( - rtl::OUString const & name, sal_Int32 separator) + OUString const & name, sal_Int32 separator) { assert(name.indexOf('<') == separator && separator != -1); rtl::Reference< unoidl::Entity > ent(findEntity(name.copy(0, separator))); @@ -2096,7 +2094,7 @@ css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct( rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > ent2( static_cast< unoidl::PolymorphicStructTypeTemplateEntity * >( ent.get())); - std::vector< rtl::OUString > args; + std::vector< OUString > args; sal_Int32 i = separator; do { ++i; // skip '<' or ',' @@ -2133,7 +2131,7 @@ css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct( } css::uno::Any cppuhelper::TypeManager::getInterfaceMember( - rtl::OUString const & name, sal_Int32 separator) + OUString const & name, sal_Int32 separator) { assert(name.indexOf("::") == separator && separator != -1); css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc( @@ -2141,7 +2139,7 @@ css::uno::Any cppuhelper::TypeManager::getInterfaceMember( if (!ifc.is()) { return css::uno::Any(); } - rtl::OUString member(name.copy(separator + std::strlen("::"))); + OUString member(name.copy(separator + std::strlen("::"))); css::uno::Sequence< css::uno::Reference< css::reflection::XInterfaceMemberTypeDescription > > mems( @@ -2157,7 +2155,7 @@ css::uno::Any cppuhelper::TypeManager::getInterfaceMember( } css::uno::Any cppuhelper::TypeManager::getNamed( - rtl::OUString const & name, rtl::Reference< unoidl::Entity > const & entity) + OUString const & name, rtl::Reference< unoidl::Entity > const & entity) { assert(entity.is()); switch (entity->getSort()) { @@ -2250,7 +2248,7 @@ css::uno::Any cppuhelper::TypeManager::getNamed( css::uno::Any cppuhelper::TypeManager::getEnumMember( rtl::Reference< unoidl::EnumTypeEntity > const & entity, - rtl::OUString const & member) + OUString const & member) { for (std::vector< unoidl::EnumTypeEntity::Member >::const_iterator i( entity->getMembers().begin()); @@ -2264,9 +2262,9 @@ css::uno::Any cppuhelper::TypeManager::getEnumMember( } css::uno::Any cppuhelper::TypeManager::getConstant( - rtl::OUString const & constantGroupName, + OUString const & constantGroupName, rtl::Reference< unoidl::ConstantGroupEntity > const & entity, - rtl::OUString const & member) + OUString const & member) { for (std::vector< unoidl::ConstantGroupEntity::Member >::const_iterator i( entity->getMembers().begin()); @@ -2282,7 +2280,7 @@ css::uno::Any cppuhelper::TypeManager::getConstant( } rtl::Reference< unoidl::Entity > cppuhelper::TypeManager::findEntity( - rtl::OUString const & name) + OUString const & name) { try { return manager_->findEntity(name); diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx index 2ad52f836ff3..f2784aa0ea59 100644 --- a/cppuhelper/source/typemanager.hxx +++ b/cppuhelper/source/typemanager.hxx @@ -56,29 +56,29 @@ public: using TypeManager_Base::acquire; using TypeManager_Base::release; - void init(rtl::OUString const & rdbUris); + void init(OUString const & rdbUris); - css::uno::Any find(rtl::OUString const & name); + css::uno::Any find(OUString const & name); css::uno::Reference< css::reflection::XTypeDescription > resolve( - rtl::OUString const & name); + OUString const & name); private: virtual ~TypeManager() throw () override; virtual void SAL_CALL disposing() override; - virtual rtl::OUString SAL_CALL getImplementationName() override; + virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) override; + virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override; - virtual css::uno::Sequence< rtl::OUString > SAL_CALL + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; virtual css::uno::Any SAL_CALL getByHierarchicalName( - rtl::OUString const & aName) override; + OUString const & aName) override; - virtual sal_Bool SAL_CALL hasByHierarchicalName(rtl::OUString const & aName) override; + virtual sal_Bool SAL_CALL hasByHierarchicalName(OUString const & aName) override; virtual css::uno::Type SAL_CALL getElementType() override; @@ -95,36 +95,36 @@ private: virtual css::uno::Reference< css::reflection::XTypeDescriptionEnumeration > SAL_CALL createTypeDescriptionEnumeration( - rtl::OUString const & moduleName, + OUString const & moduleName, css::uno::Sequence< css::uno::TypeClass > const & types, css::reflection::TypeDescriptionSearchDepth depth) override; - void readRdbDirectory(rtl::OUString const & uri, bool optional); + void readRdbDirectory(OUString const & uri, bool optional); - void readRdbFile(rtl::OUString const & uri, bool optional); + void readRdbFile(OUString const & uri, bool optional); - css::uno::Any getSequenceType(rtl::OUString const & name); + css::uno::Any getSequenceType(OUString const & name); css::uno::Any getInstantiatedStruct( - rtl::OUString const & name, sal_Int32 separator); + OUString const & name, sal_Int32 separator); css::uno::Any getInterfaceMember( - rtl::OUString const & name, sal_Int32 separator); + OUString const & name, sal_Int32 separator); css::uno::Any getNamed( - rtl::OUString const & name, + OUString const & name, rtl::Reference< unoidl::Entity > const & entity); static css::uno::Any getEnumMember( rtl::Reference< unoidl::EnumTypeEntity > const & entity, - rtl::OUString const & member); + OUString const & member); static css::uno::Any getConstant( - rtl::OUString const & constantGroupName, + OUString const & constantGroupName, rtl::Reference< unoidl::ConstantGroupEntity > const & entity, - rtl::OUString const & member); + OUString const & member); - rtl::Reference< unoidl::Entity > findEntity(rtl::OUString const & name); + rtl::Reference< unoidl::Entity > findEntity(OUString const & name); rtl::Reference< unoidl::Manager > manager_; }; diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx index f131a81f68a6..c01c83cfa6dd 100644 --- a/cppuhelper/source/unourl.cxx +++ b/cppuhelper/source/unourl.cxx @@ -39,26 +39,26 @@ using cppu::UnoUrlDescriptor; class UnoUrlDescriptor::Impl { public: - typedef std::map< rtl::OUString, rtl::OUString > Parameters; + typedef std::map< OUString, OUString > Parameters; - rtl::OUString m_aDescriptor; - rtl::OUString m_aName; + OUString m_aDescriptor; + OUString m_aName; Parameters m_aParameters; /** @exception rtl::MalformedUriException */ - explicit inline Impl(rtl::OUString const & m_aDescriptor); + explicit inline Impl(OUString const & m_aDescriptor); Impl * clone() const { return new Impl(*this); } }; -inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) +inline UnoUrlDescriptor::Impl::Impl(OUString const & rDescriptor) { m_aDescriptor = rDescriptor; enum State { STATE_NAME0, STATE_NAME, STATE_KEY0, STATE_KEY, STATE_VALUE }; State eState = STATE_NAME0; sal_Int32 nStart = 0; - rtl::OUString aKey; + OUString aKey; for (sal_Int32 i = 0;; ++i) { bool bEnd = i == rDescriptor.getLength(); @@ -125,7 +125,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor) } } -UnoUrlDescriptor::UnoUrlDescriptor(rtl::OUString const & rDescriptor): +UnoUrlDescriptor::UnoUrlDescriptor(OUString const & rDescriptor): m_pImpl(new Impl(rDescriptor)) {} @@ -149,27 +149,27 @@ UnoUrlDescriptor & UnoUrlDescriptor::operator =(UnoUrlDescriptor const & rOther) return *this; } -rtl::OUString const & UnoUrlDescriptor::getDescriptor() const +OUString const & UnoUrlDescriptor::getDescriptor() const { return m_pImpl->m_aDescriptor; } -rtl::OUString const & UnoUrlDescriptor::getName() const +OUString const & UnoUrlDescriptor::getName() const { return m_pImpl->m_aName; } -bool UnoUrlDescriptor::hasParameter(rtl::OUString const & rKey) const +bool UnoUrlDescriptor::hasParameter(OUString const & rKey) const { return m_pImpl->m_aParameters.find(rKey.toAsciiLowerCase()) != m_pImpl->m_aParameters.end(); } -rtl::OUString UnoUrlDescriptor::getParameter(rtl::OUString const & rKey) const +OUString UnoUrlDescriptor::getParameter(OUString const & rKey) const { Impl::Parameters::const_iterator aIt(m_pImpl->m_aParameters.find(rKey.toAsciiLowerCase())); - return aIt == m_pImpl->m_aParameters.end() ? rtl::OUString() : aIt->second; + return aIt == m_pImpl->m_aParameters.end() ? OUString() : aIt->second; } class UnoUrl::Impl @@ -177,25 +177,25 @@ class UnoUrl::Impl public: UnoUrlDescriptor m_aConnection; UnoUrlDescriptor m_aProtocol; - rtl::OUString m_aObjectName; + OUString m_aObjectName; Impl * clone() const { return new Impl(*this); } /** @exception rtl::MalformedUriException */ - static inline Impl * create(rtl::OUString const & rUrl); + static inline Impl * create(OUString const & rUrl); private: - Impl(rtl::OUString const & rConnectionDescriptor, - rtl::OUString const & rProtocolDescriptor, - rtl::OUString const & rObjectName): + Impl(OUString const & rConnectionDescriptor, + OUString const & rProtocolDescriptor, + OUString const & rObjectName): m_aConnection(rConnectionDescriptor), m_aProtocol(rProtocolDescriptor), m_aObjectName(rObjectName) {} }; -inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) +inline UnoUrl::Impl * UnoUrl::Impl::create(OUString const & rUrl) { if (!rUrl.startsWithIgnoreAsciiCase("uno:")) throw rtl::MalformedUriException("UNO URL does not start with \"uno:\""); @@ -203,12 +203,12 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) sal_Int32 j = rUrl.indexOf(';', i); if (j < 0) throw rtl::MalformedUriException("UNO URL has too few semicolons"); - rtl::OUString aConnection(rUrl.copy(i, j - i)); + OUString aConnection(rUrl.copy(i, j - i)); i = j + 1; j = rUrl.indexOf(0x3B, i); // ';' if (j < 0) throw rtl::MalformedUriException("UNO URL has too few semicolons"); - rtl::OUString aProtocol(rUrl.copy(i, j - i)); + OUString aProtocol(rUrl.copy(i, j - i)); i = j + 1; if (i == rUrl.getLength()) throw rtl::MalformedUriException("UNO URL contains empty ObjectName"); @@ -227,7 +227,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl) return new Impl(aConnection, aProtocol, rUrl.copy(i)); } -UnoUrl::UnoUrl(rtl::OUString const & rUrl): m_pImpl(Impl::create(rUrl)) +UnoUrl::UnoUrl(OUString const & rUrl): m_pImpl(Impl::create(rUrl)) {} UnoUrl::UnoUrl(UnoUrl const & rOther): m_pImpl(rOther.m_pImpl->clone()) @@ -259,7 +259,7 @@ UnoUrlDescriptor const & UnoUrl::getProtocol() const return m_pImpl->m_aProtocol; } -rtl::OUString const & UnoUrl::getObjectName() const +OUString const & UnoUrl::getObjectName() const { return m_pImpl->m_aObjectName; } |