Just use Any ctor instead of makeAny in cppu

Change-Id: Ie178e13251b7cb1b69facbbc12e530f6dc4632ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133836
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2022-05-04 18:37:25 +02:00
parent 86132d8188
commit cc6247a064
2 changed files with 6 additions and 6 deletions

View file

@ -475,7 +475,7 @@ void Test::testPolyStruct() {
CPPUNIT_ASSERT_EQUAL(
OUString(
"test.codemaker.cppumaker.Struct<char,short>"),
(css::uno::makeAny(
(css::uno::Any(
test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()).
getValueType().getTypeName()));
@ -494,7 +494,7 @@ void Test::testExceptions() {
test::codemaker::cppumaker::TestException1 e11(
"abc", nullptr, 1,
css::uno::makeAny(123.0),
css::uno::Any(123.0),
test::codemaker::cppumaker::HelperEnum_ONE,
test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, aEmptySequence), 2);
test::codemaker::cppumaker::TestException1 e12(e11);
@ -504,7 +504,7 @@ void Test::testExceptions() {
CPPUNIT_ASSERT_EQUAL(e11, e13);
test::codemaker::cppumaker::TestException2 e21(
"abc", nullptr, 1,
css::uno::makeAny(123.0),
css::uno::Any(123.0),
test::codemaker::cppumaker::HelperEnum_ONE,
test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, aEmptySequence), 2);
test::codemaker::cppumaker::TestException2 e22(e21);

View file

@ -49,12 +49,12 @@ public:
{
if (_type == cppu::UnoType<XInterface>::get())
{
return css::uno::makeAny<css::uno::Reference<css::uno::XInterface>>(
this);
return css::uno::Any(css::uno::Reference<css::uno::XInterface>(
this));
}
if (_type == cppu::UnoType<Interface1>::get())
{
return css::uno::makeAny<css::uno::Reference<Interface1>>(this);
return css::uno::Any(css::uno::Reference<Interface1>(this));
}
return Any();