summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-05-17 13:48:27 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:37 +0100
commit052ac10a6f9b28b9b06884dd3ed41879722be6c9 (patch)
treebc411acf431ce9971bf954ce6c26e9f837860d6c /sd
parenta65a423e22fc03d0b7850bbf20dfc30f6cfa34dd (diff)
tentatively restore more UNO / task-pane goo ...
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx4
-rw-r--r--sd/source/ui/unoidl/facreg.cxx38
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx1
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx13
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx2
-rw-r--r--sd/util/sd.component3
6 files changed, 59 insertions, 2 deletions
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 88517327e1b1..c820476dc698 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -197,12 +197,14 @@ const OUString FrameworkHelper::msViewTabBarURL( msToolBarURLPrefix + "ViewTabBa
// Task panel URLs.
-// FIXME: MMeeks - this set of urls changed:
const OUString FrameworkHelper::msTaskPanelURLPrefix( "private:resource/toolpanel/" );
const OUString FrameworkHelper::msMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "MasterPages");
+
+// these three appear to be unused ...
const OUString FrameworkHelper::msAllMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "AllMasterPages" );
const OUString FrameworkHelper::msRecentMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "RecentMasterPages" );
const OUString FrameworkHelper::msUsedMasterPagesTaskPanelURL( msTaskPanelURLPrefix + "UsedMasterPages" );
+
const OUString FrameworkHelper::msLayoutTaskPanelURL( msTaskPanelURLPrefix + "Layouts" );
const OUString FrameworkHelper::msTableDesignPanelURL( msTaskPanelURLPrefix + "TableDesign" );
const OUString FrameworkHelper::msCustomAnimationTaskPanelURL( msTaskPanelURLPrefix + "CustomAnimations" );
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index df50159dc2e7..c1445b5beb8d 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -113,6 +113,13 @@ extern OUString BasicViewFactory_getImplementationName(void) throw (uno::Runtime
extern uno::Sequence<OUString> SAL_CALL BasicViewFactory_getSupportedServiceNames (void)
throw (uno::RuntimeException);
+extern uno::Reference<uno::XInterface> SAL_CALL TaskPanelFactory_createInstance(
+ const uno::Reference<uno::XComponentContext>& rxContext)
+ throw(uno::Exception);
+extern OUString TaskPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
+extern uno::Sequence<OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
+ throw (uno::RuntimeException);
+
extern uno::Reference<uno::XInterface> SAL_CALL ResourceId_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
throw(uno::Exception);
@@ -140,6 +147,16 @@ extern uno::Sequence<OUString> SAL_CALL PanelFactory_getSupportedServiceNames (v
} }
+namespace sd { namespace toolpanel {
+extern uno::Reference<uno::XInterface> SAL_CALL ToolPanelFactory_createInstance(
+ const uno::Reference<uno::XComponentContext>& rxContext)
+ throw(uno::Exception);
+extern OUString ToolPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
+extern uno::Sequence<OUString> SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
+ throw (uno::RuntimeException);
+
+} }
+
namespace sd { namespace presenter {
extern uno::Reference<uno::XInterface> SAL_CALL SlideRenderer_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
@@ -198,6 +215,7 @@ using namespace ::sd::framework;
using namespace ::sd::presenter;
using namespace ::sd::slidesorter;
using namespace ::sd::sidebar;
+using namespace ::sd::toolpanel;
@@ -220,6 +238,8 @@ enum FactoryId
BasicPaneFactoryFactoryId,
BasicToolBarFactoryFactoryId,
BasicViewFactoryFactoryId,
+ TaskPanelFactoryFactoryId,
+ ToolPanelFactoryFactoryId,
PanelFactoryFactoryId,
ResourceIdFactoryId,
PresentationFactoryProviderFactoryId,
@@ -253,7 +273,9 @@ static ::boost::shared_ptr<FactoryMap> spFactoryMap;
(*spFactoryMap)[BasicPaneFactory_getImplementationName()] = BasicPaneFactoryFactoryId;
(*spFactoryMap)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId;
(*spFactoryMap)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId;
- (*spFactoryMap)[sidebar::PanelFactory_getImplementationName()] = PanelFactoryFactoryId;
+ (*spFactoryMap)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId;
+ (*spFactoryMap)[ToolPanelFactory_getImplementationName()] = ToolPanelFactoryFactoryId;
+ (*spFactoryMap)[PanelFactory_getImplementationName()] = PanelFactoryFactoryId;
(*spFactoryMap)[ResourceId_getImplementationName()] = ResourceIdFactoryId;
(*spFactoryMap)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId;
(*spFactoryMap)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId;
@@ -376,6 +398,20 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory(
sd::framework::BasicViewFactory_getSupportedServiceNames());
break;
+ case TaskPanelFactoryFactoryId:
+ xComponentFactory = ::cppu::createSingleComponentFactory(
+ sd::framework::TaskPanelFactory_createInstance,
+ sd::framework::TaskPanelFactory_getImplementationName(),
+ sd::framework::TaskPanelFactory_getSupportedServiceNames());
+ break;
+
+ case ToolPanelFactoryFactoryId:
+ xComponentFactory = ::cppu::createSingleComponentFactory(
+ sd::toolpanel::ToolPanelFactory_createInstance,
+ sd::toolpanel::ToolPanelFactory_getImplementationName(),
+ sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
+ break;
+
case PanelFactoryFactoryId:
xComponentFactory = ::cppu::createSingleComponentFactory(
sd::sidebar::PanelFactory_createInstance,
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index c5be674a8b3c..d0188211bc1d 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1199,6 +1199,7 @@ void ToolBarRules::MainViewShellChanged (ViewShell::ShellType nShellType)
case ViewShell::ST_NONE:
case ViewShell::ST_PRESENTATION:
+ case ViewShell::ST_TASK_PANE:
case ViewShell::ST_SIDEBAR:
default:
break;
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 3348c198ff76..91091c49bb1e 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -54,6 +54,7 @@
#include "PresentationViewShell.hxx"
#include "FormShellManager.hxx"
#include "ToolBarManager.hxx"
+#include "taskpane/PanelId.hxx"
#include "SidebarPanelId.hxx"
#include "Window.hxx"
#include "framework/ConfigurationController.hxx"
@@ -697,6 +698,13 @@ void ViewShellBase::Execute (SfxRequest& rRequest)
framework::FrameworkHelper::msSlideSorterURL);
break;
+ case SID_TASKPANE:
+ mpImpl->SetPaneVisibility(
+ rRequest,
+ framework::FrameworkHelper::msRightPaneURL,
+ framework::FrameworkHelper::msTaskPaneURL);
+ break;
+
case SID_NORMAL_MULTI_PANE_GUI:
case SID_SLIDE_SORTER_MULTI_PANE_GUI:
case SID_DRAWINGMODE:
@@ -1387,6 +1395,11 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet)
xContext, FrameworkHelper::msLeftDrawPaneURL);
break;
+ case SID_TASKPANE:
+ xResourceId = ResourceId::create(
+ xContext, FrameworkHelper::msRightPaneURL);
+ break;
+
case SID_NORMAL_MULTI_PANE_GUI:
xResourceId = ResourceId::createWithAnchorURL(
xContext,
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 84c31813b5d8..07048c05f2c3 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -40,6 +40,7 @@
#include "FrameView.hxx"
#include "DrawViewShell.hxx"
#include "ViewShellHint.hxx"
+#include "taskpane/PanelId.hxx"
#include "SidebarPanelId.hxx"
#include "framework/FrameworkHelper.hxx"
@@ -330,6 +331,7 @@ sal_uInt16 ViewShell::Implementation::GetViewId (void)
// Since we have to return a view id for every possible shell type
// and there is not (yet) a proper ViewShellBase sub class for the
// remaining types we chose the Impress factory as a fall back.
+ case ViewShell::ST_TASK_PANE:
case ViewShell::ST_SIDEBAR:
case ViewShell::ST_NONE:
default:
diff --git a/sd/util/sd.component b/sd/util/sd.component
index a5881659edcc..ff6d79c2f123 100644
--- a/sd/util/sd.component
+++ b/sd/util/sd.component
@@ -63,6 +63,9 @@
<implementation name="com.sun.star.comp.Draw.framework.ResourceId">
<service name="com.sun.star.drawing.framework.ResourceId"/>
</implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.TaskPanelFactory">
+ <service name="com.sun.star.drawing.framework.TaskPanelFactory"/>
+ </implementation>
<implementation name="org.openoffice.comp.Draw.framework.PanelFactory">
<service name="com.sun.star.drawing.framework.PanelFactory"/>
</implementation>