callcatcher: post-unotools cleanup this is now unused
This commit is contained in:
@@ -54,9 +54,6 @@ namespace rtl {
|
|||||||
class OUString;
|
class OUString;
|
||||||
}
|
}
|
||||||
namespace com { namespace sun { namespace star {
|
namespace com { namespace sun { namespace star {
|
||||||
namespace uno {
|
|
||||||
class XInterface;
|
|
||||||
}
|
|
||||||
namespace lang {
|
namespace lang {
|
||||||
class XSingleServiceFactory;
|
class XSingleServiceFactory;
|
||||||
class XMultiServiceFactory;
|
class XMultiServiceFactory;
|
||||||
@@ -70,41 +67,6 @@ namespace com { namespace sun { namespace star {
|
|||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* Get an instance of the component <code>rImplementationName</code> located
|
|
||||||
* in library <code>rLibraryName</code>. The instance must then be queried
|
|
||||||
* for the desired interface with a queryInterface call.
|
|
||||||
* The library name must be constructed with the macro
|
|
||||||
* <code>LLCF_LIBNAME( name )</code> if it is a library from the normal build
|
|
||||||
* process which includes build number and platform name.
|
|
||||||
*
|
|
||||||
* @example:C++
|
|
||||||
* <listing>
|
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
|
||||||
using namespace ::com::sun::star::uno;
|
|
||||||
Reference< whatever::XYourComponent > xComp;
|
|
||||||
// library name, e.g. xyz603mi.dll or libxyz603.so
|
|
||||||
::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( LLCF_LIBNAME( "xyz" ) ) );
|
|
||||||
::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.whatever.YourComponent" ) );
|
|
||||||
Reference< Xinterface > xI = ::comphelper::getComponentInstance( aLibName, aImplName );
|
|
||||||
if ( xI.is() )
|
|
||||||
{
|
|
||||||
Any x = xI->queryInterface( ::getCppuType((const Reference< whatever::XYourComponent >*)0) );
|
|
||||||
x >>= xComp;
|
|
||||||
}
|
|
||||||
if ( !xComp.is() )
|
|
||||||
// you're lost
|
|
||||||
|
|
||||||
* </listing>
|
|
||||||
*/
|
|
||||||
COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
|
|
||||||
getComponentInstance(
|
|
||||||
const ::rtl::OUString & rLibraryName,
|
|
||||||
const ::rtl::OUString & rImplementationName
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >
|
::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >
|
||||||
loadLibComponentFactory(
|
loadLibComponentFactory(
|
||||||
const ::rtl::OUString & rLibraryName,
|
const ::rtl::OUString & rLibraryName,
|
||||||
|
@@ -46,27 +46,6 @@ using namespace ::rtl;
|
|||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
Reference< XInterface > getComponentInstance(
|
|
||||||
const OUString & rLibraryName,
|
|
||||||
const OUString & rImplementationName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Reference< XInterface > xI;
|
|
||||||
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
|
|
||||||
if ( xMSF.is() )
|
|
||||||
xI = xMSF->createInstance( rImplementationName );
|
|
||||||
if( !xI.is() )
|
|
||||||
{
|
|
||||||
Reference< XSingleServiceFactory > xSSF =
|
|
||||||
loadLibComponentFactory( rLibraryName, rImplementationName,
|
|
||||||
Reference< XMultiServiceFactory >(), Reference< XRegistryKey >() );
|
|
||||||
if (xSSF.is())
|
|
||||||
xI = xSSF->createInstance();
|
|
||||||
}
|
|
||||||
return xI;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Reference< XSingleServiceFactory > loadLibComponentFactory(
|
Reference< XSingleServiceFactory > loadLibComponentFactory(
|
||||||
const OUString & rLibName,
|
const OUString & rLibName,
|
||||||
const OUString & rImplName,
|
const OUString & rImplName,
|
||||||
|
Reference in New Issue
Block a user