[Libreoffice-commits] core.git: solenv/bin ucb/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 22 06:31:00 UTC 2020
solenv/bin/native-code.py | 3 +
ucb/source/ucp/expand/ucpexpand.cxx | 55 ++++-------------------------
ucb/source/ucp/expand/ucpexpand1.component | 5 +-
3 files changed, 14 insertions(+), 49 deletions(-)
New commits:
commit b625194763b43ed09872947165bf3ad4431eb355
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Tue Jul 21 21:22:56 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jul 22 08:30:21 2020 +0200
ucb/expand: create instances with uno constructors
See tdf#74608 for motivation.
Change-Id: I83f75a1d107a74c1c9707243caf323b630f0b33f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99178
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index ef80e4886ed3..343c0d44c30a 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -25,7 +25,6 @@ core_factory_list = [
("libi18npoollo.a", "i18npool_component_getFactory"),
("libsmlo.a", "sm_component_getFactory"),
("libucb1.a", "ucb_component_getFactory"),
- ("libucpexpand1lo.a", "ucpexpand1_component_getFactory", "#ifdef ANDROID"),
("libucpfile1.a", "ucpfile_component_getFactory"),
("libxstor.a", "xstor_component_getFactory"),
("libodfflatxmllo.a", "odfflatxml_component_getFactory"),
@@ -331,6 +330,8 @@ core_constructor_list = [
"stardiv_Toolkit_VCLXPointer_get_implementation",
"stardiv_Toolkit_VCLXPopupMenu_get_implementation",
"stardiv_Toolkit_VCLXToolkit_get_implementation",
+# ucb/source/ucp/expand/ucpexpand1.component
+ ("ucb_expand_ExpandContentProviderImpl_get_implementation.a", "#ifdef ANDROID"),
# ucb/source/sorter/srtrs1.component
"ucb_SortedDynamicResultSetFactory_get_implementation",
# ucb/source/tdoc/ucptdoc1.component
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx
index 8cd7818d6037..aa2f7a87dd2e 100644
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -102,41 +102,22 @@ void ExpandContentProviderImpl::disposing()
}
-uno::Reference< uno::XInterface > create(
- uno::Reference< uno::XComponentContext > const & xComponentContext )
-{
- return static_cast< ::cppu::OWeakObject * >(
- new ExpandContentProviderImpl( xComponentContext ) );
-}
-
-
-OUString implName()
-{
- return "com.sun.star.comp.ucb.ExpandContentProvider";
-}
-
-
-uno::Sequence< OUString > supportedServices()
-{
- return uno::Sequence< OUString > {
- OUString("com.sun.star.ucb.ExpandContentProvider"),
- OUString("com.sun.star.ucb.ContentProvider")
- };
-}
-
// XServiceInfo
OUString ExpandContentProviderImpl::getImplementationName()
{
check();
- return implName();
+ return "com.sun.star.comp.ucb.ExpandContentProvider";
}
uno::Sequence< OUString > ExpandContentProviderImpl::getSupportedServiceNames()
{
check();
- return supportedServices();
+ return {
+ "com.sun.star.ucb.ExpandContentProvider",
+ "com.sun.star.ucb.ContentProvider"
+ };
}
sal_Bool ExpandContentProviderImpl::supportsService(OUString const & serviceName )
@@ -204,32 +185,14 @@ sal_Int32 ExpandContentProviderImpl::compareContentIds(
}
}
-const ::cppu::ImplementationEntry s_entries [] =
-{
- {
- create,
- implName,
- supportedServices,
- ::cppu::createSingleComponentFactory,
- nullptr, 0
- },
- { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
}
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * ucpexpand1_component_getFactory(
- const char * pImplName,
- void * pServiceManager,
- void * pRegistryKey )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+ucb_expand_ExpandContentProviderImpl_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return ::cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, s_entries );
-}
-
+ return cppu::acquire(new ExpandContentProviderImpl(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/expand/ucpexpand1.component b/ucb/source/ucp/expand/ucpexpand1.component
index ba7c7e90e005..480974a4d313 100644
--- a/ucb/source/ucp/expand/ucpexpand1.component
+++ b/ucb/source/ucp/expand/ucpexpand1.component
@@ -18,8 +18,9 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="ucpexpand1" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.ucb.ExpandContentProvider">
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.ucb.ExpandContentProvider"
+ constructor="ucb_expand_ExpandContentProviderImpl_get_implementation">
<service name="com.sun.star.ucb.ExpandContentProvider"/>
</implementation>
</component>
More information about the Libreoffice-commits
mailing list