[Libreoffice-commits] core.git: sfx2/source

Maxim Monastirsky (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 11 07:17:43 UTC 2020


 sfx2/source/sidebar/ControllerFactory.cxx |   23 -----------------------
 1 file changed, 23 deletions(-)

New commits:
commit c8c386c57d7ee822c304051f0a1be44f88e53635
Author:     Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Mon Aug 3 01:09:20 2020 +0300
Commit:     Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Tue Aug 11 09:16:55 2020 +0200

    Avoid double init of sidebar controls
    
    The welded sidebar contains only controls with officecfg based
    registration. Such controls are created by the service manager,
    which already calls the initialize method on its own, so there
    is no point in doing it again. This code was copy-pasted from
    the vcl based sidebar code path, but there it is guarded by a
    condition to not apply to such controls since commit 2c1d6e59
    ("tdf#103624 Avoid double init of controls in SidebarToolBox").
    
    Change-Id: I926f67f65b78799b6c3929184010be8af495817f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100448
    Tested-by: Jenkins
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx
index 50ba57a00b1f..2d887bd48536 100644
--- a/sfx2/source/sidebar/ControllerFactory.cxx
+++ b/sfx2/source/sidebar/ControllerFactory.cxx
@@ -163,29 +163,6 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController(
             UNO_QUERY);
     }
 
-    // Initialize the controller with eg a service factory.
-    Reference<lang::XInitialization> xInitialization (xController, UNO_QUERY);
-    if (/*!bFactoryHasController &&*/ xInitialization.is())
-    {
-        beans::PropertyValue aPropValue;
-        std::vector<Any> aPropertyVector;
-
-        aPropValue.Name = "Frame";
-        aPropValue.Value <<= rxFrame;
-        aPropertyVector.push_back(makeAny(aPropValue));
-
-        aPropValue.Name = "ServiceManager";
-        aPropValue.Value <<= ::comphelper::getProcessServiceFactory();
-        aPropertyVector.push_back(makeAny(aPropValue));
-
-        aPropValue.Name = "CommandURL";
-        aPropValue.Value <<= rsCommandName;
-        aPropertyVector.push_back(makeAny(aPropValue));
-
-        Sequence<Any> aArgs (comphelper::containerToSequence(aPropertyVector));
-        xInitialization->initialize(aArgs);
-    }
-
     if (xController.is())
     {
         xController->createItemWindow(xWidget);


More information about the Libreoffice-commits mailing list