diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-08-05 20:11:40 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-08-05 23:17:24 +0200 |
commit | 5a2a266d4bb493a7e9e71616d567cb4ccdf82269 (patch) | |
tree | 45d1ce6e5a24df2d9502f83654300691dc8362bd /sfx2 | |
parent | 848f685ae8f614ad62d205ef628f259cafb738b3 (diff) |
support more command in chart sidebar
We now have a complete toolbar controller in chart2.
Change-Id: I007d9b058e3d6800204ac035cc2aef5e93c1208b
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/ControllerFactory.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/PanelTitleBar.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarToolBox.cxx | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx index ff457c298824..62523c573db6 100644 --- a/sfx2/source/sidebar/ControllerFactory.cxx +++ b/sfx2/source/sidebar/ControllerFactory.cxx @@ -42,6 +42,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController( const sal_uInt16 nItemId, const OUString& rsCommandName, const Reference<frame::XFrame>& rxFrame, + const Reference<frame::XController>& rxController, const Reference<awt::XWindow>& rxParentWindow, const sal_Int32 nWidth) { @@ -49,7 +50,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController( CreateToolBarController( pToolBox, rsCommandName, - rxFrame, + rxFrame, rxController, nWidth)); // Create a controller for the new item. @@ -137,13 +138,14 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBarController( ToolBox* pToolBox, const OUString& rsCommandName, const Reference<frame::XFrame>& rxFrame, + const Reference<frame::XController>& rxController, const sal_Int32 nWidth) { try { Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); Reference<frame::XUIControllerFactory> xFactory = frame::theToolbarControllerFactory::get( xContext ); - OUString sModuleName (Tools::GetModuleName(rxFrame->getController())); + OUString sModuleName (Tools::GetModuleName(rxController)); if (xFactory.is() && xFactory->hasController(rsCommandName, sModuleName)) { diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index 479bd2e86206..4dac533bc4bf 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -69,7 +69,8 @@ void PanelTitleBar::dispose() } void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName, - const css::uno::Reference<css::frame::XFrame>& rxFrame) + const css::uno::Reference<css::frame::XFrame>& rxFrame, + const css::uno::Reference<css::frame::XController>& rxController) { if (!rsCommandName.equals(msMoreOptionsCommand)) { @@ -89,7 +90,7 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName, maToolBox.get(), mnMenuItemIndex, msMoreOptionsCommand, - rxFrame, + rxFrame, rxController, VCLUnoHelper::GetInterface(maToolBox.get()), 0)); maToolBox->SetController(mnMenuItemIndex, xController, msMoreOptionsCommand); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c7c40f754af2..6482717b00cc 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -669,7 +669,7 @@ void SidebarController::SwitchToDeck ( { pTitleBar->SetMoreOptionsCommand( rPanelContexDescriptor.msMenuCommand, - mxFrame); + mxFrame, xController); } ++nWriteIndex; diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 18ae5db91a76..ce02e9ebb2ed 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -140,7 +140,7 @@ void SidebarToolBox::CreateController ( const OUString sCommandName (GetItemCommand(nItemId)); aDescriptor.mxController = sfx2::sidebar::ControllerFactory::CreateToolBoxController( - this, nItemId, sCommandName, rxFrame, + this, nItemId, sCommandName, rxFrame, rxFrame->getController(), VCLUnoHelper::GetInterface(this), nItemWidth); if (aDescriptor.mxController.is()) { |