diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/app.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index ed0596250056..b1433520ca97 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -52,6 +52,7 @@ #include <sfx2/dockwin.hxx> #include <shellimpl.hxx> #include <comphelper/lok.hxx> +#include <sidebar/ControllerFactory.hxx> #include <svtools/helpopt.hxx> #include <unotools/viewoptions.hxx> @@ -96,6 +97,16 @@ SfxModule* SfxApplication::GetModule(SfxToolsModule nSharedLib) return g_pSfxApplication->pImpl->aModules[nSharedLib].get(); } +namespace { + css::uno::Reference<css::frame::XToolbarController> SfxWeldToolBoxControllerFactory( const css::uno::Reference< css::frame::XFrame >& rFrame, weld::Toolbar* pToolbar, weld::Builder* pBuilder, const OUString& aCommandURL ) + { + SolarMutexGuard aGuard; + + return sfx2::sidebar::ControllerFactory::CreateToolBoxController( + *pToolbar, *pBuilder, aCommandURL, rFrame, rFrame->getController(), false); + } +} + SfxApplication* SfxApplication::GetOrCreate() { // SFX on demand @@ -113,6 +124,7 @@ SfxApplication* SfxApplication::GetOrCreate() ::framework::SetRefreshToolbars( RefreshToolbars ); ::framework::SetToolBoxControllerCreator( SfxToolBoxControllerFactory ); + ::framework::SetWeldToolBoxControllerCreator( SfxWeldToolBoxControllerFactory ); ::framework::SetStatusBarControllerCreator( SfxStatusBarControllerFactory ); ::framework::SetDockingWindowCreator( SfxDockingWindowFactory ); ::framework::SetIsDockingWindowVisible( IsDockingWindowVisible ); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 1240100e9daa..99ae9ff3e7e5 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -56,6 +56,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/module.hxx> #include <sfx2/app.hxx> +#include <sidebar/ControllerFactory.hxx> #include <unoctitm.hxx> #include <ctrlfactoryimpl.hxx> |