summaryrefslogtreecommitdiff
path: root/sd/source/ui/framework
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-05-17 11:51:41 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:37 +0100
commit54d820a7815af03a248c1aa424fae9bf9a4881f4 (patch)
tree39fbdc1950ed87d86c0cf936b26741927b591daf /sd/source/ui/framework
parente9c2d5b26b1e1b52bdf87192a76314b7362fa80c (diff)
add experimental option for sidebar to 'Advanced' pane.
Diffstat (limited to 'sd/source/ui/framework')
-rw-r--r--sd/source/ui/framework/module/ImpressModule.cxx10
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx17
2 files changed, 21 insertions, 6 deletions
diff --git a/sd/source/ui/framework/module/ImpressModule.cxx b/sd/source/ui/framework/module/ImpressModule.cxx
index 240a94a23cf3..cd417647f5cb 100644
--- a/sd/source/ui/framework/module/ImpressModule.cxx
+++ b/sd/source/ui/framework/module/ImpressModule.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include "sfx2/viewfrm.hxx"
#include "framework/ImpressModule.hxx"
#include "framework/FrameworkHelper.hxx"
@@ -45,9 +45,15 @@ void ImpressModule::Initialize (Reference<frame::XController>& rxController)
new SlideSorterModule(
rxController,
FrameworkHelper::msLeftImpressPaneURL);
+
+ bool bSidebar = SfxViewFrame::IsSidebarEnabled();
new ToolPanelModule(
rxController,
- FrameworkHelper::msSidebarViewURL);
+ bSidebar ? FrameworkHelper::msSidebarViewURL :
+ FrameworkHelper::msTaskPaneURL,
+ bSidebar ? FrameworkHelper::msSidebarPaneURL :
+ FrameworkHelper::msRightPaneURL
+ );
new ToolBarModule(rxController);
new ShellStackGuard(rxController);
}
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index ab98a7ac4779..88517327e1b1 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -19,6 +19,7 @@
#include <osl/time.h>
+#include "sfx2/viewfrm.hxx"
#include "framework/FrameworkHelper.hxx"
#include "framework/ConfigurationController.hxx"
@@ -608,6 +609,14 @@ Reference<XResourceId> FrameworkHelper::RequestSidebarPanel (
const OUString& rsTaskPanelURL,
const bool bEnsureTaskPaneIsVisible)
{
+ OUString aViewURL, aPaneURL;
+ bool bSidebar = SfxViewFrame::IsSidebarEnabled();
+
+ aViewURL = bSidebar ? FrameworkHelper::msSidebarViewURL :
+ FrameworkHelper::msTaskPaneURL;
+ aPaneURL = bSidebar ? FrameworkHelper::msSidebarPaneURL :
+ FrameworkHelper::msRightPaneURL;
+
try
{
if (mxConfigurationController.is())
@@ -619,7 +628,7 @@ Reference<XResourceId> FrameworkHelper::RequestSidebarPanel (
mxConfigurationController->getCurrentConfiguration());
if (xConfiguration.is())
if ( ! xConfiguration->hasResource(
- CreateResourceId(msSidebarViewURL, msSidebarPaneURL)))
+ CreateResourceId(aViewURL, aPaneURL)))
{
// Task pane is not active. Do not force it.
return NULL;
@@ -629,12 +638,12 @@ Reference<XResourceId> FrameworkHelper::RequestSidebarPanel (
// Create the resource id from URLs for the sidebar pane
// and view and the requested panel.
mxConfigurationController->requestResourceActivation(
- CreateResourceId(msSidebarPaneURL),
+ CreateResourceId(aPaneURL),
ResourceActivationMode_ADD);
mxConfigurationController->requestResourceActivation(
- CreateResourceId(msSidebarViewURL, msSidebarPaneURL),
+ CreateResourceId(aViewURL, aPaneURL),
ResourceActivationMode_REPLACE);
- Reference<XResourceId> xPanelId (CreateResourceId(rsTaskPanelURL, msSidebarViewURL, msSidebarPaneURL));
+ Reference<XResourceId> xPanelId (CreateResourceId(rsTaskPanelURL, aViewURL, aPanelURL));
mxConfigurationController->requestResourceActivation(
xPanelId,
ResourceActivationMode_REPLACE);