diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-24 10:24:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-24 09:17:34 +0000 |
commit | 48e83f7be240cd0af5b9f1ee5b87c4d9376c102e (patch) | |
tree | 15ccd05d11aca0461309670987ae71316a6232ca /cppuhelper | |
parent | 3422dfc1b61c15d7d3a6b0e1ee16c50457946cc0 (diff) |
makeAny->Any in cppuhelper..cui
Change-Id: Ia54e6e9b71df68bd04c304a0bb02da8ebac74420
Reviewed-on: https://gerrit.libreoffice.org/34603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx | 26 | ||||
-rw-r--r-- | cppuhelper/source/component_context.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/defaultbootstrap.cxx | 10 | ||||
-rw-r--r-- | cppuhelper/source/factory.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/propertysetmixin.cxx | 6 | ||||
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 8 |
6 files changed, 28 insertions, 28 deletions
diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx index ab9412928c07..5fa8cd1794ce 100644 --- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx @@ -426,14 +426,14 @@ void Test::testFull( !info->hasPropertyByName( rtl::OUString("first"))); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(0)), + css::uno::Any(static_cast< sal_Int32 >(0)), fullp->getPropertyValue( rtl::OUString("First"))); fullp->setPropertyValue( rtl::OUString("First"), - css::uno::makeAny(static_cast< sal_Int32 >(-100))); + css::uno::Any(static_cast< sal_Int32 >(-100))); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(-100)), + css::uno::Any(static_cast< sal_Int32 >(-100)), fullp->getPropertyValue( rtl::OUString("First"))); css::uno::Any voidAny; @@ -443,9 +443,9 @@ void Test::testFull( rtl::OUString("Second"))); fullp->setPropertyValue( rtl::OUString("Second"), - css::uno::makeAny(static_cast< sal_Int32 >(100))); + css::uno::Any(static_cast< sal_Int32 >(100))); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(100)), + css::uno::Any(static_cast< sal_Int32 >(100)), fullp->getPropertyValue( rtl::OUString("Second"))); CPPUNIT_ASSERT(full->getSecond().Value.Value.IsPresent); @@ -466,7 +466,7 @@ void Test::testFull( try { fullp->setPropertyValue( rtl::OUString("Third"), - css::uno::makeAny(static_cast< sal_Int32 >(100))); + css::uno::Any(static_cast< sal_Int32 >(100))); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { @@ -477,7 +477,7 @@ void Test::testFull( try { fullp->setPropertyValue( rtl::OUString("Fourth"), - css::uno::makeAny(static_cast< sal_Int32 >(100))); + css::uno::Any(static_cast< sal_Int32 >(100))); CPPUNIT_FAIL("exception expected"); } catch (css::beans::UnknownPropertyException &) {} try { @@ -500,12 +500,12 @@ void Test::testFull( full, css::uno::UNO_QUERY); CPPUNIT_ASSERT(fullf.is()); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(-100)), + css::uno::Any(static_cast< sal_Int32 >(-100)), fullf->getFastPropertyValue(0)); fullf->setFastPropertyValue( - 0, css::uno::makeAny(static_cast< sal_Int32 >(0))); + 0, css::uno::Any(static_cast< sal_Int32 >(0))); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(0)), + css::uno::Any(static_cast< sal_Int32 >(0)), fullf->getFastPropertyValue(0)); try { fullf->getFastPropertyValue(-1); @@ -523,7 +523,7 @@ void Test::testFull( rtl::OUString("First"), vs[0].Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), vs[0].Handle); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(0)), vs[0].Value); + 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); @@ -539,12 +539,12 @@ void Test::testFull( CPPUNIT_ASSERT_EQUAL( rtl::OUString("First"), vs[0].Name); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(-100)), vs[0].Value); + 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); CPPUNIT_ASSERT_EQUAL( - css::uno::makeAny(static_cast< sal_Int32 >(100)), vs[1].Value); + css::uno::Any(static_cast< sal_Int32 >(100)), vs[1].Value); CPPUNIT_ASSERT_EQUAL( css::beans::PropertyState_AMBIGUOUS_VALUE, vs[1].State); CPPUNIT_ASSERT(full->getSecond().Value.Value.IsPresent); diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index 3311770281e6..08e2e7ad4737 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -378,7 +378,7 @@ Any ComponentContext::getValueByName( OUString const & rName ) if (m_xDelegate.is()) return m_xDelegate->getValueByName( rName ); else - return makeAny( Reference<XComponentContext>(this) ); + return Any( Reference<XComponentContext>(this) ); } Any ret( lookupMap( rName ) ); @@ -538,7 +538,7 @@ ComponentContext::ComponentContext( if (xProps.is()) { Reference< XComponentContext > xThis( this ); - xProps->setPropertyValue( "DefaultContext", makeAny( xThis ) ); + xProps->setPropertyValue( "DefaultContext", Any( xThis ) ); } } catch (...) diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index f7c909f939c3..9f67fc8d3dd1 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -62,32 +62,32 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) context_values.push_back( cppu::ContextEntry_Init( "/singletons/com.sun.star.lang.theServiceManager", - css::uno::makeAny( + css::uno::Any( css::uno::Reference< css::uno::XInterface >( static_cast< cppu::OWeakObject * >(smgr.get()))), false)); context_values.push_back( cppu::ContextEntry_Init( "/singletons/com.sun.star.reflection.theTypeDescriptionManager", - css::uno::makeAny( + css::uno::Any( css::uno::Reference< css::uno::XInterface >( static_cast< cppu::OWeakObject * >(tmgr.get()))), false)); context_values.push_back( //TODO: from services.rdb? cppu::ContextEntry_Init( "/singletons/com.sun.star.util.theMacroExpander", - css::uno::makeAny( + css::uno::Any( cppuhelper::detail::create_bootstrap_macro_expander_factory()), true)); smgr->addSingletonContextEntries(&context_values); context_values.push_back( cppu::ContextEntry_Init( "/services/com.sun.star.security.AccessController/mode", - css::uno::makeAny(rtl::OUString("off")), false)); + css::uno::Any(rtl::OUString("off")), false)); context_values.push_back( cppu::ContextEntry_Init( "/singletons/com.sun.star.security.theAccessController", - css::uno::makeAny( + css::uno::Any( rtl::OUString("com.sun.star.security.AccessController")), true)); assert(!context_values.empty()); diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 4c55ad7aaf91..55b4f55b90d3 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -297,7 +297,7 @@ Any SAL_CALL OFactoryComponentHelper::queryInterface( const Type & rType ) { if( rType == cppu::UnoType<XUnloadingPreference>::get() ) { - return makeAny( + return Any( Reference< XUnloadingPreference >( static_cast< XUnloadingPreference * >(this) ) ); } diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index c6de17a7d23b..00769d590454 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -737,7 +737,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( wrapDefaulted, isDefaulted, wrapOptional)); css::uno::Reference< css::reflection::XIdlField2 >( type->getField("IsAmbiguous"), css::uno::UNO_QUERY_THROW)->set( - strct, css::uno::makeAny(isAmbiguous)); + strct, css::uno::Any(isAmbiguous)); } catch (css::lang::IllegalArgumentException & e) { throw css::uno::RuntimeException( ("unexpected com.sun.star.lang.IllegalArgumentException: " @@ -765,7 +765,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( false, false, wrapOptional)); css::uno::Reference< css::reflection::XIdlField2 >( type->getField("IsDefaulted"), css::uno::UNO_QUERY_THROW)->set( - strct, css::uno::makeAny(isDefaulted)); + strct, css::uno::Any(isDefaulted)); } catch (css::lang::IllegalArgumentException & e) { throw css::uno::RuntimeException( ("unexpected com.sun.star.lang.IllegalArgumentException: " @@ -787,7 +787,7 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue( try { css::uno::Reference< css::reflection::XIdlField2 >( type->getField("IsPresent"), css::uno::UNO_QUERY_THROW)->set( - strct, css::uno::makeAny(present)); + strct, css::uno::Any(present)); if (present) { css::uno::Reference< css::reflection::XIdlField2 > field( type->getField("Value"), css::uno::UNO_QUERY_THROW); diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 1fd8bba105c1..e3ddaee00798 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -1183,13 +1183,13 @@ cppuhelper::ServiceManager::createContentEnumeration( } } if (impl->factory1.is()) { - factories.push_back(css::uno::makeAny(impl->factory1)); + factories.push_back(css::uno::Any(impl->factory1)); } else if (impl->factory2.is()) { - factories.push_back(css::uno::makeAny(impl->factory2)); + factories.push_back(css::uno::Any(impl->factory2)); } else { css::uno::Reference< css::lang::XSingleComponentFactory > factory( new ImplementationWrapper(this, *i)); - factories.push_back(css::uno::makeAny(factory)); + factories.push_back(css::uno::Any(factory)); } } return new ContentEnumeration(factories); @@ -1221,7 +1221,7 @@ css::uno::Any cppuhelper::ServiceManager::getPropertyValue( PropertyName, static_cast< cppu::OWeakObject * >(this)); } assert(context_.is()); - return css::uno::makeAny(context_); + return css::uno::Any(context_); } void cppuhelper::ServiceManager::addPropertyChangeListener( |