Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I'm sorry, forgot to send also to devlist.

On 25 June 2011 11:41, Matúš Kukan <matus.kukan@gmail.com> wrote:
On 24 June 2011 16:08, Michael Meeks <michael.meeks@novell.com> wrote:
       Fun - perhaps there is a mapfile problem - whereby we are punching a
hole through the map file for the old component_getFactory name, and not
for the new foo_component_getFactory; at least I added a unit test to
cppuhelper and struggled with this for a bit myself ;-)

I really don't know what kind of problem there is.
It seems to be alright, also we can call comphelp_component_ function.
The only thing caused by diff in comphelper is that at the end of make check,
soffice.bin does not end. It's running somewhere inside vcl. And
CPPUNIT_ASSERT(desktop->terminate()); fails.
I have no idea how that's related and how I could find the problem.

I'm also sending cleaning diff for comphelper, maybe we could push that.

       Anyhow - I've merged your core patches, reverted the ABI break in
cppuhelper and done that another way (with a polymorphic impl. instead
of a default argument type). I attach a 'redo.diff' - this doesn't
really solve the problem I think, we need to add a 'prefix' parameter to
this framework macro so we can specify that as being different for each
component I think - can you hack that up ?

Sure, it was not good, so attached new diff for framework. (Maybe I
could add parameter also to LOG_REGISTRATION_GETFACTORY ?)
And also small change to dllcomponentloader in stoc is needed.
And then if it's not too slow to call loadSharedLibComponentFactory
through active() in factory.cxx we could also change that.

Regards,
Matus

diff --git a/comphelper/inc/comphelper/componentmodule.hxx 
b/comphelper/inc/comphelper/componentmodule.hxx
index 1cab942..f09d3b7 100644
--- a/comphelper/inc/comphelper/componentmodule.hxx
+++ b/comphelper/inc/comphelper/componentmodule.hxx
@@ -355,12 +355,12 @@ namespace comphelper
     //= implementing the API of a component library (component_*)
 
 #define IMPLEMENT_COMPONENT_LIBRARY_API( module_class, initializer_function )   \
-    extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(    \
+    extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL comphelp_component_getImplementationEnvironment( 
\
         const sal_Char **ppEnvTypeName, uno_Environment ** /*ppEnv*/ )  \
     {   \
         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;    \
     }   \
-    extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( \
+    extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL comphelp_component_getFactory( \
         const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) \
     { \
         initializer_function(); \
diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component
index 10d23d4..d29468b 100644
--- a/comphelper/util/comphelp.component
+++ b/comphelper/util/comphelp.component
@@ -26,7 +26,7 @@
 *
 **********************************************************************-->
 
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="comphelp"
     xmlns="http://openoffice.org/2010/uno-components";>
   <implementation name="AnyCompareFactory">
     <service name="com.sun.star.ucb.AnyCompareFactory"/>
diff --git a/comphelper/inc/comphelper/servicedecl.hxx b/comphelper/inc/comphelper/servicedecl.hxx
index b0c0d71..3dfe80c 100644
--- a/comphelper/inc/comphelper/servicedecl.hxx
+++ b/comphelper/inc/comphelper/servicedecl.hxx
@@ -29,16 +29,10 @@
 #define COMPHELPER_SERVICEDECL_HXX_INCLUDED
 
 #include <comphelper/comphelperdllapi.h>
-#include <cppuhelper/implbase1.hxx>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <uno/environment.h>
 #include <boost/utility.hpp>
 #include <boost/function.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
 
 namespace comphelper {
 namespace service_decl {
@@ -149,277 +143,9 @@ private:
     char const m_cDelim;
 };
 
-/** To specify whether the implementation class expects arguments
-    (uno::Sequence<uno::Any>).
-*/
-template <bool> struct with_args;
-
-/// @internal
-namespace detail {
-template <typename ImplT>
-class OwnServiceImpl
-    : public ImplT,
-      private ::boost::noncopyable
-{
-    typedef ImplT BaseT;
-    
-public:    
-    OwnServiceImpl(
-        ServiceDecl const& rServiceDecl,
-        css::uno::Sequence<css::uno::Any> const& args,
-        css::uno::Reference<css::uno::XComponentContext> const& xContext )
-        :BaseT(args, xContext), m_rServiceDecl(rServiceDecl) {}
-    OwnServiceImpl(
-        ServiceDecl const& rServiceDecl,
-        css::uno::Reference<css::uno::XComponentContext> const& xContext )
-        : BaseT(xContext), m_rServiceDecl(rServiceDecl) {}
-    
-    // XServiceInfo
-    virtual ::rtl::OUString SAL_CALL getImplementationName()
-        throw (css::uno::RuntimeException) {
-        return m_rServiceDecl.getImplementationName();
-    }
-    virtual sal_Bool SAL_CALL supportsService( ::rtl::OUString const& name )
-        throw (css::uno::RuntimeException) {
-        return m_rServiceDecl.supportsService(name);
-    }
-    virtual css::uno::Sequence< ::rtl::OUString>
-    SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) {
-        return m_rServiceDecl.getSupportedServiceNames();
-    }
-    
-private:
-    ServiceDecl const& m_rServiceDecl;
-};
-
-template <typename ImplT>
-class ServiceImpl : public OwnServiceImpl< 
::cppu::ImplInheritanceHelper1<ImplT,css::lang::XServiceInfo> >
-{
-typedef OwnServiceImpl< ::cppu::ImplInheritanceHelper1<ImplT,css::lang::XServiceInfo> > 
ServiceImpl_BASE;
-public:
-    ServiceImpl(
-        ServiceDecl const& rServiceDecl,
-        css::uno::Sequence<css::uno::Any> const& args,
-        css::uno::Reference<css::uno::XComponentContext> const& xContext )
-        : ServiceImpl_BASE(rServiceDecl, args, xContext) {}
-    ServiceImpl(
-        ServiceDecl const& rServiceDecl,
-        css::uno::Reference<css::uno::XComponentContext> const& xContext )
-        : ServiceImpl_BASE(rServiceDecl, xContext) {}
-};
-
-template <typename ServiceImplT>
-struct PostProcessDefault {
-    css::uno::Reference<css::uno::XInterface>
-    operator()( ServiceImplT * p ) const {
-        return static_cast<css::lang::XServiceInfo *>(p);
-    }
-};
-
-template <typename ImplT, typename PostProcessFuncT, typename WithArgsT>
-struct CreateFunc;
-
-template <typename ImplT, typename PostProcessFuncT>
-struct CreateFunc<ImplT, PostProcessFuncT, with_args<false> > {
-    PostProcessFuncT const m_postProcessFunc;
-    explicit CreateFunc( PostProcessFuncT const& postProcessFunc )
-        : m_postProcessFunc(postProcessFunc) {}
-    
-    css::uno::Reference<css::uno::XInterface>
-    operator()( ServiceDecl const& rServiceDecl,
-                css::uno::Sequence<css::uno::Any> const&,
-                css::uno::Reference<css::uno::XComponentContext>
-                const& xContext ) const
-    {
-        return m_postProcessFunc(
-            new ImplT( rServiceDecl, xContext ) );
-    }
-};
-
-template <typename ImplT, typename PostProcessFuncT>
-struct CreateFunc<ImplT, PostProcessFuncT, with_args<true> > {
-    PostProcessFuncT const m_postProcessFunc;
-    explicit CreateFunc( PostProcessFuncT const& postProcessFunc )
-        : m_postProcessFunc(postProcessFunc) {}
-    
-    css::uno::Reference<css::uno::XInterface>
-    operator()( ServiceDecl const& rServiceDecl,
-                css::uno::Sequence<css::uno::Any> const& args,
-                css::uno::Reference<css::uno::XComponentContext>
-                const& xContext ) const
-    {
-        return m_postProcessFunc(
-            new ImplT( rServiceDecl, args, xContext ) );
-    }
-};
-
-} // namespace detail
-
-/** Defines a service implementation class.
-    
-    @tpl ImplT_ service implementation class
-    @WithArgsT whether the implementation class ctor expects arguments
-               (uno::Sequence<uno::Any>, uno::Reference<uno::XComponentContext>)
-               or just (uno::Reference<uno::XComponentContext>)
-*/
-template <typename ImplT_, typename WithArgsT = with_args<false> >
-struct serviceimpl_base {
-    typedef ImplT_ ImplT;
-    
-    detail::CreateFuncF const m_createFunc;
-    
-    typedef detail::PostProcessDefault<ImplT> PostProcessDefaultT;
-
-    /** Default ctor.  Implementation class without args, expecting
-        component context as single argument.
-    */
-    serviceimpl_base() : m_createFunc(
-        detail::CreateFunc<ImplT, PostProcessDefaultT, WithArgsT>(
-            PostProcessDefaultT() ) ) {}
-
-    /** Ctor to pass a post processing function/functor.
-        
-        @tpl PostProcessDefaultT let your compiler deduce this
-        @param postProcessFunc function/functor that gets the yet unacquired
-                               ImplT_ pointer returning a
-                               uno::Reference<uno::XInterface>
-    */
-    template <typename PostProcessFuncT>
-    explicit serviceimpl_base( PostProcessFuncT const& postProcessFunc )
-        : m_createFunc( detail::CreateFunc<ImplT, PostProcessFuncT, WithArgsT>(
-                            postProcessFunc ) ) {}
-};
-
-template <typename ImplT_, typename WithArgsT = with_args<false> >
-struct class_ : public serviceimpl_base< detail::ServiceImpl<ImplT_>, WithArgsT >
-{
-    typedef serviceimpl_base< detail::ServiceImpl<ImplT_>, WithArgsT > baseT;
-    /** Default ctor.  Implementation class without args, expecting
-        component context as single argument.
-    */
-    class_() : baseT() {}
-    template <typename PostProcessFuncT>
-    /** Ctor to pass a post processing function/functor.
-        
-        @tpl PostProcessDefaultT let your compiler deduce this
-        @param postProcessFunc function/functor that gets the yet unacquired
-                               ImplT_ pointer returning a
-                               uno::Reference<uno::XInterface>
-    */
-    explicit class_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {}
-};
-
-//
-// component_... helpers with arbitrary service declarations:
-//
-
-#define COMPHELPER_SERVICEDECL_getFactory(z_, n_, unused_) \
-    if (pRet == 0) \
-        pRet = BOOST_PP_CAT(s, n_).getFactory(pImplName);
-
-/** The following preprocessor repetitions generate functions like
-    
-    <pre>
-        inline void * component_getFactoryHelper(
-            sal_Char const* pImplName,
-            ::com::sun::star::lang::XMultiServiceFactory *,
-            ::com::sun::star::registry::XRegistryKey * xRegistryKey,
-            ServiceDecl const& s0, ServiceDecl const& s1, ... );
-    </pre>
-    
-    which call on the passed service declarations.
-    
-    The maximum number of service declarations can be set by defining
-    COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS; its default is 8.
-*/
-#define COMPHELPER_SERVICEDECL_make(z_, n_, unused_) \
-inline void * component_getFactoryHelper( \
-    sal_Char const* pImplName, \
-    ::com::sun::star::lang::XMultiServiceFactory *, \
-    ::com::sun::star::registry::XRegistryKey *, \
-    BOOST_PP_ENUM_PARAMS(n_, ServiceDecl const& s) ) \
-{ \
-    void * pRet = 0; \
-    BOOST_PP_REPEAT(n_, COMPHELPER_SERVICEDECL_getFactory, ~) \
-    return pRet; \
-}
-
-#if ! defined(COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS)
-#define COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS 8
-#endif
-
-BOOST_PP_REPEAT_FROM_TO(1, COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS,
-                        COMPHELPER_SERVICEDECL_make, ~)
-
-#undef COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS
-#undef COMPHELPER_SERVICEDECL_make
-#undef COMPHELPER_SERVICEDECL_getFactory
-
 } // namespace service_decl
 } // namespace comphelper
 
-/** The following preprocessor macro generates the C access functions,
-    that are used to initialize and register the components of a
-    shared library object.
-    
-    If you have, say, written a lib that contains three distinct
-    components, each with its own ServiceDecl object, you might want
-    to employ the following code:
-
-    <pre>
-        // must reside outside _any_ namespace
-        COMPHELPER_SERVICEDECL_EXPORTS3(yourServiceDecl1, 
-                                       yourServiceDecl2, 
-                                       yourServiceDecl3);
-    </pre>
-
-    For your convenience, the COMPHELPER_SERVICEDECL_EXPORTS<N> macro
-    comes pre-defined up to N=8, if you should need more arguments,
-    call COMPHELPER_SERVICEDECL_make_exports directly, like this:
-
-    <pre>
-        // must reside outside _any_ namespace
-        
COMPHELPER_SERVICEDECL_make_exports((yourServiceDecl1)(yourServiceDecl2)...(yourServiceDeclN));
-    </pre>
-
-    Note the missing colons between the bracketed arguments.
- */
-#define COMPHELPER_SERVICEDECL_make_exports(varargs_ )  \
-extern "C" \
-{ \
-    SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char**  
ppEnvTypeName, \
-                                                          uno_Environment** /*ppEnv*/ ) \
-    { \
-        *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; \
-    } \
- \
-    SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( sal_Char const*                      
          pImplName, \
-                                         ::com::sun::star::lang::XMultiServiceFactory*  
pServiceManager, \
-                                         ::com::sun::star::registry::XRegistryKey*      
pRegistryKey ) \
-    { \
-        return component_getFactoryHelper( pImplName, pServiceManager, \
-                                           pRegistryKey, \
-                                           BOOST_PP_SEQ_ENUM(varargs_) ); \
-    } \
-}
-
-#define COMPHELPER_SERVICEDECL_EXPORTS1(comp0_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_))
-#define COMPHELPER_SERVICEDECL_EXPORTS2(comp0_,comp1_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_))
-#define COMPHELPER_SERVICEDECL_EXPORTS3(comp0_,comp1_,comp2_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_)(comp2_))
-#define COMPHELPER_SERVICEDECL_EXPORTS4(comp0_,comp1_,comp2_,comp3_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_)(comp2_)(comp3_))
-#define COMPHELPER_SERVICEDECL_EXPORTS5(comp0_,comp1_,comp2_,comp3_,comp4_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_)(comp2_)(comp3_)(comp4_))
-#define COMPHELPER_SERVICEDECL_EXPORTS6(comp0_,comp1_,comp2_,comp3_,comp4_,comp5_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_)(comp2_)(comp3_)(comp4_)(comp5_))
-#define COMPHELPER_SERVICEDECL_EXPORTS7(comp0_,comp1_,comp2_,comp3_,comp4_,comp5_,comp6_) \
-    COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_)(comp2_)(comp3_)(comp4_)(comp5_)(comp6_))
-#define COMPHELPER_SERVICEDECL_EXPORTS8(comp0_,comp1_,comp2_,comp3_,comp4_,comp5_,comp6_,comp7_) \
-    
COMPHELPER_SERVICEDECL_make_exports((comp0_)(comp1_)(comp2_)(comp3_)(comp4_)(comp5_)(comp6_)(comp7_))
-
 #endif //  ! defined(COMPHELPER_SERVICEDECL_HXX_INCLUDED)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/macros/debug/registration.hxx 
b/framework/inc/macros/debug/registration.hxx
index bbb328e..ea07236 100644
--- a/framework/inc/macros/debug/registration.hxx
+++ b/framework/inc/macros/debug/registration.hxx
@@ -57,7 +57,7 @@
     #define    LOG_REGISTRATION_GETFACTORY( SINFOTEXT )                                            
                                                                            \
                 {                                                                                  
                                                                                                    
        \
                     ::rtl::OStringBuffer sOut( 1024 );                                             
                                                                    \
-                    sOut.append( "component_getFactory():" );                                      
                                                            \
+                    sOut.append( "fw?_component_getFactory():" );                                  
             \
                     sOut.append( SINFOTEXT                 );                                      
                                                            \
                     WRITE_LOGFILE( LOGFILE_REGISTRATION, sOut.makeStringAndClear() )               
                                    \
                 }
diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx
index f5510af..ab53b56 100644
--- a/framework/inc/macros/registration.hxx
+++ b/framework/inc/macros/registration.hxx
@@ -57,8 +57,8 @@
     Please use follow public macros only!
 
     IFFACTORY( CLASS )                                                 => use it as parameter for 
COMPONENT_GETFACTORY( IFFACTORIES )
-    COMPONENTGETIMPLEMENTATIONENVIRONMENT              => use it to define exported function 
component_getImplementationEnvironment()
-    COMPONENTGETFACTORY( IFFACTORIES )                 => use it to define exported function 
component_getFactory()
+    COMPONENTGETIMPLEMENTATIONENVIRONMENT( LIB )    => use it to define exported function 
component_getImplementationEnvironment()
+    COMPONENTGETFACTORY( LIB, IFFACTORIES )                    => use it to define exported 
function LIB_component_getFactory()
 
 
_________________________________________________________________________________________________________________*/
 
@@ -81,8 +81,8 @@ ________________________________________________________________________________
 //     public
 //     define helper to get information about service environment
 
//*****************************************************************************************************************
-#define        COMPONENTGETIMPLEMENTATIONENVIRONMENT                                               
                                                                                                    
                                \
-    extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const    
    sal_Char**                      ppEnvironmentTypeName   ,                               \
+#define        COMPONENTGETIMPLEMENTATIONENVIRONMENT( LIB )                                        
                                            \
+    extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL LIB##_component_getImplementationEnvironment( 
const sal_Char** ppEnvironmentTypeName,   \
                                                                              uno_Environment**     
                            )                               \
     {                                                                                              
                                                                                                    
                                                                \
         *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;                              
                                                                                                    
\
@@ -92,8 +92,8 @@ ________________________________________________________________________________
 //     public
 //     define method to instanciate new services
 
//*****************************************************************************************************************
-#define        COMPONENTGETFACTORY( IFFACTORIES )                                                  
                                                                                                    
                                        \
-    extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(       const   sal_Char*   
    pImplementationName     ,                                                                       
                \
+#define        COMPONENTGETFACTORY( LIB, IFFACTORIES )                                             
                                                                                                    
                                        \
+    extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL LIB##_component_getFactory( const sal_Char* 
pImplementationName,                           \
                                                             void*              pServiceManager     
    ,                                                                                       \
                                                             void*        /*pRegistryKey*/          
    )                                                                                       \
     {                                                                                              
                                                                                                    
                                                                \
diff --git a/framework/source/register/register3rdcomponents.cxx 
b/framework/source/register/register3rdcomponents.cxx
index a5a15b7..ea71424 100644
--- a/framework/source/register/register3rdcomponents.cxx
+++ b/framework/source/register/register3rdcomponents.cxx
@@ -58,9 +58,10 @@
 #include <dispatch/systemexec.hxx>
 #include <jobs/shelljob.hxx>
 
-COMPONENTGETIMPLEMENTATIONENVIRONMENT
+COMPONENTGETIMPLEMENTATIONENVIRONMENT( fwm )
 
-COMPONENTGETFACTORY    (       IFFACTORY( ::framework::HelpOnStartup           ) else
+COMPONENTGETFACTORY ( fwm,
+                        IFFACTORY( ::framework::HelpOnStartup       ) else
                         IFFACTORY( ::framework::TabWinFactory          ) else
                         IFFACTORY( ::framework::SystemExec             ) else
                         IFFACTORY( ::framework::ShellJob               )
diff --git a/framework/source/register/registerservices.cxx 
b/framework/source/register/registerservices.cxx
index 6250b71..e884685 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -91,9 +91,10 @@
 #include <services/substitutepathvars.hxx>
 #include <services/pathsettings.hxx>
 
-COMPONENTGETIMPLEMENTATIONENVIRONMENT
+COMPONENTGETIMPLEMENTATIONENVIRONMENT( fwk )
 
-COMPONENTGETFACTORY    (       IFFACTORY( ::framework::URLTransformer                              
            )       else
+COMPONENTGETFACTORY ( fwk,
+                        IFFACTORY( ::framework::URLTransformer                                     
    )       else
                         IFFACTORY( ::framework::Desktop                                            
                    )       else
                         IFFACTORY( ::framework::Frame                                   )   else
                         IFFACTORY( ::framework::JobExecutor                             )   else
diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx
index 0947b9c..8a19e17 100644
--- a/framework/source/register/registertemp.cxx
+++ b/framework/source/register/registertemp.cxx
@@ -76,9 +76,10 @@
 #include <uielement/toolbarsmenucontroller.hxx>
 #include <uielement/popupmenucontroller.hxx>
 
-COMPONENTGETIMPLEMENTATIONENVIRONMENT
+COMPONENTGETIMPLEMENTATIONENVIRONMENT( fwl )
 
-COMPONENTGETFACTORY    (       IFFACTORY( ::framework::MediaTypeDetectionHelper                )   
    
+COMPONENTGETFACTORY ( fwl,
+                        IFFACTORY( ::framework::MediaTypeDetectionHelper                )
                         IFFACTORY( ::framework::MailToDispatcher                        ) else
                         IFFACTORY( ::framework::ServiceHandler                          )   else
                         IFFACTORY( ::framework::LogoTextStatusbarController             )      else
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index c460ecb..0e206d1 100755
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -26,7 +26,7 @@
 *
 **********************************************************************-->
 
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="fwk"
     xmlns="http://openoffice.org/2010/uno-components";>
   <implementation name="com.sun.star.comp.frame.SessionListener">
     <service name="com.sun.star.frame.SessionListener"/>
diff --git a/framework/util/fwl.component b/framework/util/fwl.component
index 99c5ca7..5fca040 100755
--- a/framework/util/fwl.component
+++ b/framework/util/fwl.component
@@ -26,7 +26,7 @@
 *
 **********************************************************************-->
 
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="fwl"
     xmlns="http://openoffice.org/2010/uno-components";>
   <implementation name="com.sum.star.comp.framework.LanguageSelectionMenuController">
     <service name="com.sun.star.frame.PopupMenuController"/>
diff --git a/framework/util/fwm.component b/framework/util/fwm.component
index 624249f..8b2c4e6 100755
--- a/framework/util/fwm.component
+++ b/framework/util/fwm.component
@@ -26,7 +26,7 @@
 *
 **********************************************************************-->
 
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="fwm"
     xmlns="http://openoffice.org/2010/uno-components";>
   <implementation name="com.sun.star.comp.framework.HelpOnStartup">
     <service name="com.sun.star.task.Job"/>
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index 9c27a1f..34c79b1 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -209,7 +209,7 @@ Reference<XInterface> SAL_CALL DllComponentLoader::activate(
                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) );
         if (xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII )
         {
-            Reference<XRegistryKey > xPrefixKey = xActivatorKey->openKey(
+            Reference<XRegistryKey > xPrefixKey = xKey->openKey(
                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/PREFIX") ) );
             if( xPrefixKey.is() && xPrefixKey->getValueType() == RegistryValueType_ASCII )
             {
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index f86fd32..74eb3e8 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -834,7 +834,6 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
     OUString aActivatorUrl;
     OUString aActivatorName;
     OUString aLocation;
-    OUString aPrefix;
 
     Reference<XRegistryKey > xActivatorKey = xImplementationKey->openKey(
         OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) );
@@ -850,15 +849,6 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
             OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/LOCATION") ) );
         if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII )
             aLocation = xLocationKey->getAsciiValue();
-
-        Reference<XRegistryKey > xPrefixKey = xImplementationKey->openKey(
-            OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/PREFIX") ) );
-        if( xPrefixKey.is() && xPrefixKey->getValueType() == RegistryValueType_ASCII )
-        {
-            aPrefix = xPrefixKey->getAsciiValue();
-            if( aPrefix.getLength() != 0 )
-                aPrefix = aPrefix + OUSTR("_");
-        }
     }
     else
     {
@@ -893,17 +883,6 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
         Reference<XInterface > x = xSMgr->createInstance( aActivatorName );
         Reference<XImplementationLoader > xLoader( x, UNO_QUERY );
         Reference<XInterface > xMF;
-        if( aActivatorName == OUString( 
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary") ) )
-        {
-            try
-            {
-                return loadSharedLibComponentFactory( bootstrap_expandUri( aLocation ), 
OUString(),  aImplementationName, xSMgr, xImplementationKey, aPrefix );
-            }
-            catch ( IllegalArgumentException & e )
-            {
-                throw RuntimeException( e.Message, e.Context );
-            }
-        }
         if (xLoader.is())
         {
             xFactory = xLoader->activate( aImplementationName, aActivatorUrl, aLocation, 
xImplementationKey );

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.