summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2020-08-03 01:09:20 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2020-08-11 09:16:55 +0200
commitc8c386c57d7ee822c304051f0a1be44f88e53635 (patch)
tree74f819285c087497e68eed29d0bff2e8762a01d7 /sfx2
parentc2b655bb60e23f3849b8b653e74aa1b00269e113 (diff)
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@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/ControllerFactory.cxx23
1 files changed, 0 insertions, 23 deletions
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);