From 2ef6b7f9dbbf826817a14640cb3118c495db5bc4 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 8 Dec 2024 20:41:14 +0500 Subject: [PATCH] Drop some OTypeCollection uses Change-Id: Ia1467c44998961f5e0820fb4d0621a4189d49d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178095 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- comphelper/source/property/propertycontainer2.cxx | 5 +---- cppuhelper/source/component.cxx | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/comphelper/source/property/propertycontainer2.cxx b/comphelper/source/property/propertycontainer2.cxx index 5a3bfa4be285..7a57ed57c03b 100644 --- a/comphelper/source/property/propertycontainer2.cxx +++ b/comphelper/source/property/propertycontainer2.cxx @@ -33,10 +33,7 @@ OPropertyContainer2::~OPropertyContainer2() {} Sequence OPropertyContainer2::getBaseTypes() { // just the types from our one and only base class - ::cppu::OTypeCollection aTypes(cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get()); - return aTypes.getTypes(); + return comphelper::OPropertySetHelper::getTypes(); } bool OPropertyContainer2::convertFastPropertyValue(std::unique_lock& /*rGuard*/, diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index 5c7226f93a1a..3861f35f03bd 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -107,13 +107,13 @@ void OComponentHelper::release() noexcept Sequence< Type > OComponentHelper::getTypes() { - static OTypeCollection s_aTypes( + static const Sequence s_aTypes { cppu::UnoType::get(), cppu::UnoType::get(), cppu::UnoType::get(), - cppu::UnoType::get() ); + cppu::UnoType::get() }; - return s_aTypes.getTypes(); + return s_aTypes; } // XComponent