[Libreoffice-commits] core.git: 2 commits - avmedia/Library_avmediaMacAVF.mk avmedia/source solenv/bin UnoControls/Library_ctl.mk UnoControls/source UnoControls/util

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 4 06:33:35 UTC 2020


 UnoControls/Library_ctl.mk                      |    1 
 UnoControls/source/base/registercontrols.cxx    |  122 ------------------------
 UnoControls/source/controls/framecontrol.cxx    |   24 +---
 UnoControls/source/controls/progressbar.cxx     |   20 +--
 UnoControls/source/controls/progressmonitor.cxx |   18 +--
 UnoControls/source/controls/statusindicator.cxx |   21 +---
 UnoControls/source/inc/framecontrol.hxx         |    6 -
 UnoControls/source/inc/progressbar.hxx          |    6 -
 UnoControls/source/inc/progressmonitor.hxx      |    6 -
 UnoControls/source/inc/statusindicator.hxx      |    6 -
 UnoControls/util/ctl.component                  |   16 +--
 avmedia/Library_avmediaMacAVF.mk                |    1 
 avmedia/source/macavf/avmediaMacAVF.component   |    5 
 avmedia/source/macavf/framegrabber.hxx          |    4 
 avmedia/source/macavf/framegrabber.mm           |    2 
 avmedia/source/macavf/macavfcommon.hxx          |    3 
 avmedia/source/macavf/macavfuno.mm              |   55 ----------
 avmedia/source/macavf/manager.hxx               |    5 
 avmedia/source/macavf/manager.mm                |   26 +++--
 avmedia/source/macavf/player.hxx                |    3 
 avmedia/source/macavf/player.mm                 |   23 +---
 avmedia/source/macavf/window.hxx                |    5 
 avmedia/source/macavf/window.mm                 |    5 
 solenv/bin/native-code.py                       |    6 -
 24 files changed, 77 insertions(+), 312 deletions(-)

New commits:
commit 43d2f3d5f1ab360cb40de7ccb45c2c0dd6b33ccb
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Jul 3 20:35:15 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 4 08:33:02 2020 +0200

    avmedia/mac: create instances with uno constructors
    
    See tdf#74608 for motivation.
    
    Change-Id: I7dfb9933c1625b4e0b68cf8ab459eebcd3db9d44
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97893
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/avmedia/Library_avmediaMacAVF.mk b/avmedia/Library_avmediaMacAVF.mk
index 877efd97ac36..de6373632df7 100644
--- a/avmedia/Library_avmediaMacAVF.mk
+++ b/avmedia/Library_avmediaMacAVF.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,avmediaMacAVF,\
 
 $(eval $(call gb_Library_add_objcxxobjects,avmediaMacAVF,\
 	avmedia/source/macavf/framegrabber \
-	avmedia/source/macavf/macavfuno \
 	avmedia/source/macavf/manager \
 	avmedia/source/macavf/player \
 	avmedia/source/macavf/window \
diff --git a/avmedia/source/macavf/avmediaMacAVF.component b/avmedia/source/macavf/avmediaMacAVF.component
index 376576ff5d2d..3cb9966c1287 100644
--- a/avmedia/source/macavf/avmediaMacAVF.component
+++ b/avmedia/source/macavf/avmediaMacAVF.component
@@ -18,8 +18,9 @@
  -->
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="avmediaMacAVF" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.avmedia.Manager_MacAVF">
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.avmedia.Manager_MacAVF"
+        constructor="com_sun_star_comp_avmedia_Manager_MacAVF_get_implementation">
     <service name="com.sun.star.media.Manager_MacAVF"/>
   </implementation>
 </component>
diff --git a/avmedia/source/macavf/framegrabber.hxx b/avmedia/source/macavf/framegrabber.hxx
index 0b199991edaa..5e0c749d944b 100644
--- a/avmedia/source/macavf/framegrabber.hxx
+++ b/avmedia/source/macavf/framegrabber.hxx
@@ -31,7 +31,7 @@ class FrameGrabber : public ::cppu::WeakImplHelper< css::media::XFrameGrabber,
 {
 public:
 
-    explicit FrameGrabber( const css::uno::Reference< css::lang::XMultiServiceFactory >& );
+    explicit FrameGrabber();
     virtual  ~FrameGrabber() override;
 
     bool    create( AVAsset* pMovie );
@@ -46,8 +46,6 @@ public:
 
 private:
 
-    css::uno::Reference< css::lang::XMultiServiceFactory >    mxMgr;
-
     AVAssetImageGenerator* mpImageGen;
 };
 
diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm
index 71180010305b..31566bef3876 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -30,7 +30,7 @@ using namespace ::com::sun::star;
 
 namespace avmedia::macavf {
 
-FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& /*rxMgr*/ )
+FrameGrabber::FrameGrabber()
 :   mpImageGen( nullptr )
 {}
 
diff --git a/avmedia/source/macavf/macavfcommon.hxx b/avmedia/source/macavf/macavfcommon.hxx
index 699f495a0ddf..b031f1ecc51f 100644
--- a/avmedia/source/macavf/macavfcommon.hxx
+++ b/avmedia/source/macavf/macavfcommon.hxx
@@ -45,9 +45,6 @@
 #include <com/sun/star/media/XManager.hpp>
 
 
-#define AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_MacAVF"
-#define AVMEDIA_MACAVF_MANAGER_SERVICENAME "com.sun.star.media.Manager_MacAVF"
-
 #define AVMEDIA_MACAVF_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_MacAVF"
 #define AVMEDIA_MACAVF_PLAYER_SERVICENAME "com.sun.star.media.Player_MacAVF"
 
diff --git a/avmedia/source/macavf/macavfuno.mm b/avmedia/source/macavf/macavfuno.mm
deleted file mode 100644
index dbee2e8cea49..000000000000
--- a/avmedia/source/macavf/macavfuno.mm
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "macavfcommon.hxx"
-#include "manager.hxx"
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
-using namespace ::com::sun::star;
-
-static uno::Reference< uno::XInterface > create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
-{
-    return uno::Reference< uno::XInterface >( *new ::avmedia::macavf::Manager( rxFact ) );
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void* avmediaMacAVF_component_getFactory( const char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
-{
-    uno::Reference< lang::XSingleServiceFactory > xFactory;
-    void*                                   pRet = nullptr;
-
-    if( rtl_str_compare( pImplName, AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME ) == 0 )
-    {
-        const OUString aServiceName( AVMEDIA_MACAVF_MANAGER_SERVICENAME );
-
-        xFactory.set( ::cppu::createSingleFactory(
-                        static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
-                        AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME,
-                        create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
-    }
-
-    if( xFactory.is() )
-    {
-        xFactory->acquire();
-        pRet = xFactory.get();
-    }
-
-    return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/macavf/manager.hxx b/avmedia/source/macavf/manager.hxx
index fbdcb61b3caf..9072b3800680 100644
--- a/avmedia/source/macavf/manager.hxx
+++ b/avmedia/source/macavf/manager.hxx
@@ -32,7 +32,7 @@ class Manager : public ::cppu::WeakImplHelper< css::media::XManager,
 {
 public:
 
-    Manager( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr );
+    Manager();
     virtual ~Manager() override;
 
     // XManager
@@ -42,9 +42,6 @@ public:
     virtual OUString SAL_CALL getImplementationName(  ) override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
-private:
-
-    css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr;
 };
 
 } // namespace avmedia::macavf
diff --git a/avmedia/source/macavf/manager.mm b/avmedia/source/macavf/manager.mm
index 7f3036c86faf..44768b54c4e3 100644
--- a/avmedia/source/macavf/manager.mm
+++ b/avmedia/source/macavf/manager.mm
@@ -21,13 +21,13 @@
 #include "player.hxx"
 #include <tools/urlobj.hxx>
 #include <osl/diagnose.h>
+#include <rtl/ref.hxx>
 
 using namespace ::com::sun::star;
 
 namespace avmedia::macavf {
 
-Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
-    mxMgr( rxMgr )
+Manager::Manager()
 {
 }
 
@@ -38,34 +38,40 @@ Manager::~Manager()
 
 uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString& rURL )
 {
-    Player*                             pPlayer( new Player( mxMgr ) );
-    uno::Reference< media::XPlayer >    xRet( pPlayer );
+    rtl::Reference<Player>              xPlayer( new Player() );
     INetURLObject                       aURL( rURL );
 
-    if( !pPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) )  )
-        xRet.clear();
+    if( !xPlayer->create( aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) )  )
+        return {};
 
-    return xRet;
+    return uno::Reference<media::XPlayer>(xPlayer.get());
 }
 
 
 OUString SAL_CALL Manager::getImplementationName(  )
 {
-    return AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME;
+    return "com.sun.star.comp.avmedia.Manager_MacAVF";
 }
 
 
 sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName )
 {
-    return ServiceName == AVMEDIA_MACAVF_MANAGER_SERVICENAME;
+    return ServiceName == "com.sun.star.media.Manager_MacAVF";
 }
 
 
 uno::Sequence< OUString > SAL_CALL Manager::getSupportedServiceNames(  )
 {
-    return { AVMEDIA_MACAVF_MANAGER_SERVICENAME };
+    return { "com.sun.star.media.Manager_MacAVF" };
 }
 
 } // namespace avmedia::macavf
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+com_sun_star_comp_avmedia_Manager_MacAVF_get_implementation(
+    css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new ::avmedia::macavf::Manager());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/macavf/player.hxx b/avmedia/source/macavf/player.hxx
index b9b49cc8cdac..3dc41b347d30 100644
--- a/avmedia/source/macavf/player.hxx
+++ b/avmedia/source/macavf/player.hxx
@@ -33,7 +33,7 @@ class Player
                                    css::lang::XServiceInfo >
 {
 public:
-    explicit Player( const css::uno::Reference< css::lang::XMultiServiceFactory >& );
+    explicit Player();
     virtual  ~Player() override;
 
     bool create( const OUString& rURL );
@@ -68,7 +68,6 @@ public:
     virtual bool handleObservation( NSString* pKeyPath ) override;
 
 private:
-    css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr;
 
     AVPlayer*           mpPlayer;
 
diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm
index dfe558524073..7fdc58247f50 100644
--- a/avmedia/source/macavf/player.mm
+++ b/avmedia/source/macavf/player.mm
@@ -20,6 +20,7 @@
 #include "player.hxx"
 #include "framegrabber.hxx"
 #include "window.hxx"
+#include <rtl/ref.hxx>
 
 #include <cmath> // for log10()
 
@@ -71,9 +72,8 @@ MacAVObserverObject* MacAVObserverHandler::getObserver()
 }
 
 
-Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr )
-:   mxMgr( rxMgr )
-,   mpPlayer( nullptr )
+Player::Player()
+:   mpPlayer( nullptr )
 ,   mfUnmutedVolume( 0 )
 ,   mfStopTime( DBL_MAX )
 ,   mbMuted( false )
@@ -318,27 +318,22 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
     NSView* pParentView = reinterpret_cast<NSView*>(nNSViewPtr);
 
     // check the window parameters
-    uno::Reference< ::media::XPlayerWindow > xRet;
     if( (aSize.Width <= 0) || (aSize.Height <= 0) || (pParentView == nullptr) )
-         return xRet;
+         return {};
 
     // create the window
-    ::avmedia::macavf::Window* pWindow = new ::avmedia::macavf::Window( mxMgr, *this, pParentView );
-    xRet = pWindow;
-    return xRet;
+    return new ::avmedia::macavf::Window( *this, pParentView );
 }
 
 
 uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
 {
-    uno::Reference< media::XFrameGrabber > xRet;
-
-    FrameGrabber* pGrabber = new FrameGrabber( mxMgr );
+    rtl::Reference<FrameGrabber> pGrabber = new FrameGrabber();
     AVAsset* pMovie = [[mpPlayer currentItem] asset];
-    if( pGrabber->create( pMovie ) )
-        xRet = pGrabber;
+    if( !pGrabber->create( pMovie ) )
+        return {};
 
-    return xRet;
+    return pGrabber.get();
 }
 
 
diff --git a/avmedia/source/macavf/window.hxx b/avmedia/source/macavf/window.hxx
index c494b6deffd4..cfaae6f47d3b 100644
--- a/avmedia/source/macavf/window.hxx
+++ b/avmedia/source/macavf/window.hxx
@@ -44,8 +44,7 @@ class Window
 {
 public:
 
-            Window( const css::uno::Reference< css::lang::XMultiServiceFactory >& i_rxMgr,
-                    Player& i_rPlayer,
+            Window( Player& i_rPlayer,
                     NSView* i_pParentView
                     );
     virtual ~Window() override;
@@ -92,8 +91,6 @@ public:
 
 private:
 
-    css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr;
-
     ::osl::Mutex                                maMutex;
     ::cppu::OMultiTypeInterfaceContainerHelper  maListeners;
     css::media::ZoomLevel                       meZoomLevel;
diff --git a/avmedia/source/macavf/window.mm b/avmedia/source/macavf/window.mm
index 3c39a0725277..fdb2e50655e8 100644
--- a/avmedia/source/macavf/window.mm
+++ b/avmedia/source/macavf/window.mm
@@ -28,9 +28,8 @@ using namespace ::com::sun::star;
 
 namespace avmedia::macavf {
 
-Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Player& i_rPlayer, NSView* i_pParentView )
-:   mxMgr( i_rxMgr )
-,   maListeners( maMutex )
+Window::Window( Player& i_rPlayer, NSView* i_pParentView )
+:   maListeners( maMutex )
 ,   meZoomLevel( media::ZoomLevel_NOT_AVAILABLE )
 ,   mrPlayer( i_rPlayer )
 ,   mnPointerType( awt::SystemPointer::ARROW )
commit 78639945dab254e2de5315c49e82c333e1056170
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Jul 3 19:39:03 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 4 08:32:56 2020 +0200

    UnoControl: create instances with uno constructors
    
    See tdf#74608 for motivation.
    
    Change-Id: I3df173e3c7064d3d925d3abe5c652b8cbe6c8ea5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97892
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/UnoControls/Library_ctl.mk b/UnoControls/Library_ctl.mk
index f7953e80e5a2..f6ef205f9615 100644
--- a/UnoControls/Library_ctl.mk
+++ b/UnoControls/Library_ctl.mk
@@ -31,7 +31,6 @@ $(eval $(call gb_Library_add_exception_objects,ctl,\
     UnoControls/source/base/basecontainercontrol \
     UnoControls/source/base/basecontrol \
     UnoControls/source/base/multiplexer \
-    UnoControls/source/base/registercontrols \
     UnoControls/source/controls/OConnectionPointContainerHelper \
     UnoControls/source/controls/OConnectionPointHelper \
     UnoControls/source/controls/framecontrol \
diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx
deleted file mode 100644
index 40a51b8e85e0..000000000000
--- a/UnoControls/source/base/registercontrols.cxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sal/config.h>
-
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/factory.hxx>
-
-#include <framecontrol.hxx>
-#include <progressbar.hxx>
-#include <progressmonitor.hxx>
-#include <statusindicator.hxx>
-
-namespace com::sun::star::lang { class XMultiServiceFactory; }
-
-namespace {
-
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> FrameControl_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const &
-        rServiceManager)
-{
-    return static_cast<cppu::OWeakObject *>(
-        new unocontrols::FrameControl(
-            comphelper::getComponentContext(rServiceManager)));
-}
-
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> ProgressBar_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const &
-        rServiceManager)
-{
-    return static_cast<cppu::OWeakObject *>(
-        new unocontrols::ProgressBar(
-            comphelper::getComponentContext(rServiceManager)));
-}
-
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface>
-ProgressMonitor_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const &
-        rServiceManager)
-{
-    return static_cast<cppu::OWeakObject *>(
-        new unocontrols::ProgressMonitor(
-            comphelper::getComponentContext(rServiceManager)));
-}
-
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface>
-StatusIndicator_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const &
-        rServiceManager)
-{
-    return static_cast<cppu::OWeakObject *>(
-        new unocontrols::StatusIndicator(
-            comphelper::getComponentContext(rServiceManager)));
-}
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * ctl_component_getFactory(
-    char const * pImplName, void * pServiceManager, SAL_UNUSED_PARAMETER void *)
-{
-    css::uno::Reference<css::lang::XMultiServiceFactory > smgr(
-        static_cast<css::lang::XMultiServiceFactory *>(pServiceManager));
-    css::uno::Reference<css::lang::XSingleServiceFactory> fac;
-    if (unocontrols::FrameControl::impl_getStaticImplementationName()
-        .equalsAscii(pImplName))
-    {
-        fac = cppu::createSingleFactory(
-            smgr, unocontrols::FrameControl::impl_getStaticImplementationName(),
-            &FrameControl_createInstance,
-            unocontrols::FrameControl::impl_getStaticSupportedServiceNames());
-    } else if (unocontrols::ProgressBar::impl_getStaticImplementationName()
-               .equalsAscii(pImplName))
-    {
-        fac = cppu::createSingleFactory(
-            smgr, unocontrols::ProgressBar::impl_getStaticImplementationName(),
-            &ProgressBar_createInstance,
-            unocontrols::ProgressBar::impl_getStaticSupportedServiceNames());
-    } else if (unocontrols::ProgressMonitor::impl_getStaticImplementationName()
-               .equalsAscii(pImplName))
-    {
-        fac = cppu::createSingleFactory(
-            smgr,
-            unocontrols::ProgressMonitor::impl_getStaticImplementationName(),
-            &ProgressMonitor_createInstance,
-            unocontrols::ProgressMonitor::impl_getStaticSupportedServiceNames());
-    } else if (unocontrols::StatusIndicator::impl_getStaticImplementationName()
-               .equalsAscii(pImplName))
-    {
-        fac = cppu::createSingleFactory(
-            smgr,
-            unocontrols::StatusIndicator::impl_getStaticImplementationName(),
-            &StatusIndicator_createInstance,
-            unocontrols::StatusIndicator::impl_getStaticSupportedServiceNames());
-    }
-    if (fac.is()) {
-        fac->acquire();
-    }
-    return fac.get();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 004facf6f942..8ecc73cf2d1a 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -155,12 +155,12 @@ Any SAL_CALL FrameControl::queryAggregation( const Type& aType )
 
 OUString FrameControl::getImplementationName()
 {
-    return impl_getStaticImplementationName();
+    return "stardiv.UnoControls.FrameControl";
 }
 
 css::uno::Sequence<OUString> FrameControl::getSupportedServiceNames()
 {
-    return impl_getStaticSupportedServiceNames();
+    return { "com.sun.star.frame.FrameControl" };
 }
 
 //  XControl
@@ -252,20 +252,6 @@ void SAL_CALL FrameControl::unadvise(   const   Type&                       aTyp
     m_aConnectionPointContainer->unadvise( aType, xListener );
 }
 
-//  impl but public method to register service
-
-Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames()
-{
-    return { "com.sun.star.frame.FrameControl" };
-}
-
-//  impl but public method to register service
-
-OUString FrameControl::impl_getStaticImplementationName()
-{
-    return "stardiv.UnoControls.FrameControl";
-}
-
 //  OPropertySetHelper
 
 sal_Bool FrameControl::convertFastPropertyValue(        Any&        rConvertedValue ,
@@ -467,4 +453,10 @@ void FrameControl::impl_deleteFrame()
 
 }   // namespace unocontrols
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+stardiv_UnoControls_FrameControl_get_implementation(
+    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new unocontrols::FrameControl(context));
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index d8c9b889f2b5..6b8de14f0b0f 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -283,20 +283,6 @@ Reference< XControlModel > SAL_CALL ProgressBar::getModel()
     return Reference< XControlModel >();
 }
 
-//  impl but public method to register service
-
-Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames()
-{
-    return css::uno::Sequence<OUString>();
-}
-
-//  impl but public method to register service
-
-OUString ProgressBar::impl_getStaticImplementationName()
-{
-    return "stardiv.UnoControls.ProgressBar";
-}
-
 //  protected method
 
 void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGraphics > & rGraphics )
@@ -407,4 +393,10 @@ void ProgressBar::impl_recalcRange ()
 
 }   // namespace unocontrols
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+stardiv_UnoControls_ProgressBar_get_implementation(
+    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new unocontrols::ProgressBar(context));
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index 78278250942d..46f6fda8bcec 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -530,18 +530,6 @@ void SAL_CALL ProgressMonitor::setPosSize ( sal_Int32 nX, sal_Int32 nY, sal_Int3
     }
 }
 
-//  impl but public method to register service
-Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames()
-{
-    return css::uno::Sequence<OUString>();
-}
-
-//  impl but public method to register service
-OUString ProgressMonitor::impl_getStaticImplementationName()
-{
-    return "stardiv.UnoControls.ProgressMonitor";
-}
-
 //  protected method
 void ProgressMonitor::impl_paint ( sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< XGraphics > & rGraphics )
 {
@@ -865,4 +853,10 @@ bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic )
 
 }   // namespace unocontrols
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+stardiv_UnoControls_ProgressMonitor_get_implementation(
+    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new unocontrols::ProgressMonitor(context));
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index 033c787d01c2..9c70f92dcd88 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -343,20 +343,6 @@ void SAL_CALL StatusIndicator::setPosSize (
     }
 }
 
-//  impl but public method to register service
-
-Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames()
-{
-    return css::uno::Sequence<OUString>();
-}
-
-//  impl but public method to register service
-
-OUString StatusIndicator::impl_getStaticImplementationName()
-{
-    return "stardiv.UnoControls.StatusIndicator";
-}
-
 //  protected method
 
 WindowDescriptor StatusIndicator::impl_getWindowDescriptor( const css::uno::Reference< XWindowPeer >& xParentPeer )
@@ -459,4 +445,11 @@ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent )
 
 }   // namespace unocontrols
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+stardiv_UnoControls_StatusIndicator_get_implementation(
+    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new unocontrols::StatusIndicator(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx
index dad27d8f8f2f..4224a95bfbec 100644
--- a/UnoControls/source/inc/framecontrol.hxx
+++ b/UnoControls/source/inc/framecontrol.hxx
@@ -124,12 +124,6 @@ public:
         const css::uno::Reference< css::uno::XInterface >&    xListener
     ) override;
 
-    //  impl but public methods to register service!
-
-    static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
-
-    static OUString impl_getStaticImplementationName();
-
 private:
 
     using OPropertySetHelper::getFastPropertyValue;
diff --git a/UnoControls/source/inc/progressbar.hxx b/UnoControls/source/inc/progressbar.hxx
index a85fd731de4a..1f735286377b 100644
--- a/UnoControls/source/inc/progressbar.hxx
+++ b/UnoControls/source/inc/progressbar.hxx
@@ -112,12 +112,6 @@ public:
 
     virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override;
 
-    //  BaseControl
-
-    static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
-
-    static OUString impl_getStaticImplementationName();
-
 private:
     virtual void impl_paint(
         sal_Int32 nX ,
diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx
index 77927020582f..4f407eeda2e6 100644
--- a/UnoControls/source/inc/progressmonitor.hxx
+++ b/UnoControls/source/inc/progressmonitor.hxx
@@ -206,12 +206,6 @@ public:
                                         sal_Int32   nHeight ,
                                         sal_Int16   nFlags  ) override;
 
-    //  BaseControl
-
-    static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
-
-    static OUString impl_getStaticImplementationName();
-
 private:
     virtual void impl_paint( sal_Int32 nX ,
                              sal_Int32 nY ,
diff --git a/UnoControls/source/inc/statusindicator.hxx b/UnoControls/source/inc/statusindicator.hxx
index 658062c1512c..f47a52cbd814 100644
--- a/UnoControls/source/inc/statusindicator.hxx
+++ b/UnoControls/source/inc/statusindicator.hxx
@@ -148,12 +148,6 @@ public:
                                         sal_Int32   nHeight ,
                                         sal_Int16   nFlags  ) override;
 
-    //  BaseControl
-
-    static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
-
-    static OUString impl_getStaticImplementationName();
-
 private:
     virtual css::awt::WindowDescriptor impl_getWindowDescriptor(
         const css::uno::Reference< css::awt::XWindowPeer >& xParentPeer
diff --git a/UnoControls/util/ctl.component b/UnoControls/util/ctl.component
index 3c0437d966b5..43c978bfba8e 100644
--- a/UnoControls/util/ctl.component
+++ b/UnoControls/util/ctl.component
@@ -18,11 +18,15 @@
  -->
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    prefix="ctl" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="stardiv.UnoControls.FrameControl">
-    <service name="com.sun.star.frame.FrameControl"/>
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="stardiv.UnoControls.FrameControl"
+      constructor="stardiv_UnoControls_FrameControl_get_implementation">
+    <service name="com.sun.star.frame.FrameControl" />
   </implementation>
-  <implementation name="stardiv.UnoControls.ProgressBar"/>
-  <implementation name="stardiv.UnoControls.ProgressMonitor"/>
-  <implementation name="stardiv.UnoControls.StatusIndicator"/>
+  <implementation name="stardiv.UnoControls.ProgressBar"
+      constructor="stardiv_UnoControls_ProgressBar_get_implementation"/>
+  <implementation name="stardiv.UnoControls.ProgressMonitor"
+      constructor="stardiv_UnoControls_ProgressMonitor_get_implementation"/>
+  <implementation name="stardiv.UnoControls.StatusIndicator"
+      constructor="stardiv_UnoControls_StatusIndicator_get_implementation"/>
 </component>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index ec0cd0f75c25..4713dff269e6 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -61,7 +61,6 @@ core_factory_list = [
     ("libpdffilterlo.a", "pdffilter_component_getFactory"),
     ("libsvgiolo.a", "svgio_component_getFactory"),
     ("libsvtlo.a", "svt_component_getFactory"),
-    ("libctllo.a", "ctl_component_getFactory"),
     ("libMacOSXSpelllo.a", "MacOSXSpell_component_getFactory", "#ifdef IOS"),
     ("libcuilo.a", "cui_component_getFactory"),
     ("libproxyfaclo.a", "proxyfac_component_getFactory"),
@@ -71,6 +70,11 @@ core_factory_list = [
     ]
 
 core_constructor_list = [
+# UnoControls/util/ctl.component
+    "stardiv_UnoControls_FrameControl_get_implementation",
+    "stardiv_UnoControls_ProgressBar_get_implementation",
+    "stardiv_UnoControls_ProgressMonitor_get_implementation",
+    "stardiv_UnoControls_StatusIndicator_get_implementation",
 # canvas/source/factory/canvasfactory.component
     "com_sun_star_comp_rendering_CanvasFactory_get_implementation",
 # chart2/source/chartcore.component


More information about the Libreoffice-commits mailing list