diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-01-14 15:27:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-14 16:31:57 +0100 |
commit | 35fbf454055a18c8431808b955b54f2cf3200bb0 (patch) | |
tree | 7fdc2fa81be84f15eb571973def8fb914301144c /cppuhelper | |
parent | 1e5edbc5ac1be50c68a670879bd9c64514cf2f58 (diff) |
Remove unused prefix="direct" feature
It got introduced with b6cebf4a3e2997e6489bba77b358b306f8f435ce "Allow UNO
component libraries to have each implementation in its own function", then
ae3a0c8da50b36db395984637f5ad74d3b4887bc "Add .component <implementation
constructor='...' feature" removed all of its uses and noted: "[...] (which had
previously been adapted to use the prefix="direct" feature, which may become
unnecessary again in the end, depending on how to handle single-instance
services/singletons)." Handling of single-instance services/singletons has been
added with 997d21183322a0a94b96868073808841d2773902 "Support for singleton
constructor functions" and the feature has really become unnecessary again.
Change-Id: I1ab910805d61421f892a244313c8778cd453f98c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/shlib.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index c5979e642393..89ce8b8554db 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -255,20 +255,19 @@ void cppuhelper::detail::loadSharedLibComponentFactory( if (curEnv.get() != env.get()) { std::abort();//TODO } - 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; for (int i = 0; map[i].name != 0; ++i) { - if (name.equalsAscii(map[i].name)) { + if (uri.equalsAscii(map[i].name)) { fp = map[i].component_getFactory_function; break; } } if (fp == 0) { - SAL_WARN("cppuhelper", "unknown factory name \"" << name << "\""); + SAL_WARN("cppuhelper", "unknown factory name \"" << uri << "\""); throw css::loader::CannotActivateFactoryException( - "unknown factory name \"" + name + "\"", + "unknown factory name \"" + uri + "\"", css::uno::Reference<css::uno::XInterface>()); } *factory = invokeComponentFactory( @@ -301,9 +300,7 @@ void cppuhelper::detail::loadSharedLibComponentFactory( if (constructor.isEmpty()) { OUString sym; SAL_INFO("cppuhelper.shlib", "prefix=" << prefix << " implementation=" << implementation << " uri=" << uri); - if (prefix == "direct") { - sym = implementation.replace('.', '_') + "_" COMPONENT_GETFACTORY; - } else if (!prefix.isEmpty()) { + if (!prefix.isEmpty()) { sym = prefix + "_" COMPONENT_GETFACTORY; } else { sym = COMPONENT_GETFACTORY; |