[API CHANGE] Remove unused cppu::invokeStaticComponentFactory again

...that has neither been intended for external use anyway, nor has it ever been
used internally since its dead-on-arrival inception in
b16ab7a751 "Add invokeStaticComponentFactory() for
statically linked components: Will be used for iOS at least."  Sigh.

Change-Id: I17795b2a1945809688deba0a5492415fbe877400
This commit is contained in:
Stephan Bergmann
2013-10-01 00:08:26 +02:00
parent 69f1846f40
commit c91f5851d0
3 changed files with 21 additions and 50 deletions

View File

@@ -21,9 +21,11 @@
#include <cstdlib>
#include "com/sun/star/loader/CannotActivateFactoryException.hpp"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
#include "osl/module.h"
#include "sal/types.h"
namespace com { namespace sun { namespace star {
@@ -32,8 +34,14 @@ namespace com { namespace sun { namespace star {
class XMultiServiceFactory;
}
namespace reflection { class XIdlClass; }
namespace registry { class XSimpleRegistry; }
namespace uno { class XComponentContext; }
namespace registry {
class XRegistryKey;
class XSimpleRegistry;
}
namespace uno {
class XComponentContext;
class XInterface;
}
} } }
namespace rtl { class OUString; }
@@ -84,6 +92,17 @@ createStandardClassWithSequence(
for (;;) { std::abort(); } // avoid "must return a value" warnings
}
SAL_DLLPUBLIC_EXPORT css::uno::Reference<css::uno::XInterface> SAL_CALL
invokeStaticComponentFactory(
oslGenericFunction, rtl::OUString const &,
css::uno::Reference<css::lang::XMultiServiceFactory> const &,
css::uno::Reference<css::registry::XRegistryKey> const &,
rtl::OUString const &)
SAL_THROW((css::loader::CannotActivateFactoryException))
{
for (;;) { std::abort(); } // avoid "must return a value" warnings
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -456,33 +456,6 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
return xRet;
}
Reference< XInterface > SAL_CALL invokeStaticComponentFactory(
oslGenericFunction pGetter,
OUString const & rImplName,
Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr,
Reference< ::com::sun::star::registry::XRegistryKey > const & xKey,
OUString const & rPrefix )
SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) )
{
Reference< XInterface > xRet;
oslModule pExe;
OUString aExePath("MAIN");
osl_getModuleHandle( NULL, &pExe );
OUString aExcMsg;
xRet = invokeComponentFactory( pGetter, pExe, aExePath, rImplName, xMgr, xKey, rPrefix, aExcMsg );
if (! xRet.is())
{
SAL_WARN("cppuhelper", "### cannot activate factory: " << aExcMsg);
throw loader::CannotActivateFactoryException(
aExcMsg,
Reference< XInterface >() );
}
return xRet;
}
#ifndef DISABLE_DYNLOADING
//==============================================================================

View File

@@ -19,7 +19,6 @@
#ifndef _CPPUHELPER_SHLIB_HXX_
#define _CPPUHELPER_SHLIB_HXX_
#include <osl/module.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
@@ -77,26 +76,6 @@ SAL_CALL loadSharedLibComponentFactory(
::rtl::OUString const & rPrefix )
SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) );
/** Gets the factory out of an already loaded (for instance statically linked) component.
@param pGetter the component's component_getFactory function
@param rImplName implementation to be retrieved from the library
@param xMgr service manager to be provided to the component
@param xKey registry key to be provided to the component
@param rPrefix optional component prefix
@return
factory instance (com::sun::star::lang::XSingleComponentFactory or legacy
com::sun::star::lang::XSingleServiceFactory)
*/
CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL invokeStaticComponentFactory(
oslGenericFunction pGetter,
::rtl::OUString const & rImplName,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr,
::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey,
::rtl::OUString const & rPrefix )
SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) );
/** Invokes component_writeInfo() function of specified component library. You can give either
a fully qualified libname or single lib name. The libname need not be pre/postfixed
(e.g. xxx.dll). You can give parameter rPath to force lookup of the library in a specific