From 35fbf454055a18c8431808b955b54f2cf3200bb0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 14 Jan 2020 15:27:56 +0100 Subject: 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 --- cppuhelper/source/shlib.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'cppuhelper') 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()); } *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; -- cgit