diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-17 12:25:23 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:37 +0100 |
commit | a65a423e22fc03d0b7850bbf20dfc30f6cfa34dd (patch) | |
tree | 62a827ad19f933b858e822241e17cef8ea971487 /sd | |
parent | add experimental option for sidebar to 'Advanced' pane. (diff) | |
download | core-a65a423e22fc03d0b7850bbf20dfc30f6cfa34dd.tar.gz core-a65a423e22fc03d0b7850bbf20dfc30f6cfa34dd.zip |
more reverts, first cut at making sidebar optional.
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/app/sddll1.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/app/sddll2.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/PaneShells.cxx | 23 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/BasicPaneFactory.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/BasicPaneFactory.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/BasicViewFactory.cxx | 13 | ||||
-rw-r--r-- | sd/source/ui/framework/module/ToolPanelModule.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/framework/module/ToolPanelModule.hxx | 2 |
8 files changed, 61 insertions, 4 deletions
diff --git a/sd/source/ui/app/sddll1.cxx b/sd/source/ui/app/sddll1.cxx index 09a7346bc33d..100f52777395 100644 --- a/sd/source/ui/app/sddll1.cxx +++ b/sd/source/ui/app/sddll1.cxx @@ -37,6 +37,7 @@ #include "DrawDocShell.hxx" #include "GraphicDocShell.hxx" #include "SlideSorterViewShell.hxx" +#include "taskpane/ToolPanelViewShell.hxx" #include "FactoryIds.hxx" #include "sdmod.hxx" #include "app.hrc" @@ -114,6 +115,11 @@ void SdDLL::RegisterInterfaces() // View shells for the side panes. ::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod); + + ::sd::toolpanel::ToolPanelViewShell::RegisterInterface(pMod); + // Tell the tool panel view shell to register the interfaces of its + // controls. + ::sd::toolpanel::ToolPanelViewShell::RegisterControls(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx index 308841523265..d28257dcc0f7 100644 --- a/sd/source/ui/app/sddll2.cxx +++ b/sd/source/ui/app/sddll2.cxx @@ -126,6 +126,7 @@ void SdDLL::RegisterControllers() ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod); ::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod); ::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod); + ::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod); ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(0, pMod); SvxFillToolBoxControl::RegisterControl(0, pMod); diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx index 023dbcc810a4..d3338ab411d2 100644 --- a/sd/source/ui/dlg/PaneShells.cxx +++ b/sd/source/ui/dlg/PaneShells.cxx @@ -92,6 +92,29 @@ LeftDrawPaneShell::~LeftDrawPaneShell (void) { } +//===== ToolPanelPaneShell ======================================================== + +SFX_SLOTMAP( ToolPanelPaneShell ) +{ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +SFX_IMPL_INTERFACE( ToolPanelPaneShell, SfxShell, SdResId( STR_TOOL_PANEL_SHELL ) ) +{ + SFX_CHILDWINDOW_REGISTRATION( ::sd::ToolPanelChildWindow::GetChildWindowId() ); +} + +TYPEINIT1( ToolPanelPaneShell, SfxShell ); + +ToolPanelPaneShell::ToolPanelPaneShell() + :SfxShell() +{ + SetName(OUString("ToolPanel")); +} + +ToolPanelPaneShell::~ToolPanelPaneShell(void) +{ +} } // end of namespace ::sd diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx index 5c5a043d41c7..c91265f3446f 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx @@ -45,7 +45,8 @@ namespace { CenterPaneId, FullScreenPaneId, LeftImpressPaneId, - LeftDrawPaneId + LeftDrawPaneId, + RightPaneId }; static const sal_Int32 gnConfigurationUpdateStartEvent(0); @@ -219,6 +220,11 @@ void SAL_CALL BasicPaneFactory::initialize (const Sequence<Any>& aArguments) aDescriptor.mePaneId = LeftDrawPaneId; mpPaneContainer->push_back(aDescriptor); xCC->addResourceFactory(aDescriptor.msPaneURL, this); + + aDescriptor.msPaneURL = FrameworkHelper::msRightPaneURL; + aDescriptor.mePaneId = RightPaneId; + mpPaneContainer->push_back(aDescriptor); + xCC->addResourceFactory(aDescriptor.msPaneURL, this); } // Register as configuration change listener. @@ -287,6 +293,7 @@ Reference<XResource> SAL_CALL BasicPaneFactory::createResource ( case LeftImpressPaneId: case LeftDrawPaneId: + case RightPaneId: xPane = CreateChildWindowPane( rxPaneId, *iDescriptor); @@ -472,6 +479,11 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane ( nChildWindowId = ::sd::LeftPaneDrawChildWindow::GetChildWindowId(); break; + case RightPaneId: + pShell.reset(new ToolPanelPaneShell()); + nChildWindowId = ::sd::ToolPanelChildWindow::GetChildWindowId(); + break; + default: break; } diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx index de9c81b9d564..472609a17677 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx @@ -59,6 +59,7 @@ namespace sd { namespace framework { private:resource/pane/FullScreenPane private:resource/pane/LeftImpressPane private:resource/pane/LeftDrawPane + private:resource/pane/RightPane There are two left panes because this is (seems to be) the only way to show different titles for the left pane in Draw and Impress. */ diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 78d79888a9bc..08b903b560fb 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -33,6 +33,7 @@ #include "DrawViewShell.hxx" #include "GraphicViewShell.hxx" #include "OutlineViewShell.hxx" +#include "taskpane/ToolPanelViewShell.hxx" #include "PresentationViewShell.hxx" #include "SlideSorterViewShell.hxx" #include "FrameView.hxx" @@ -318,6 +319,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) mxConfigurationController->addResourceFactory(FrameworkHelper::msNotesViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msHandoutViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msPresentationViewURL, this); + mxConfigurationController->addResourceFactory(FrameworkHelper::msTaskPaneURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msSlideSorterURL, this); } catch (RuntimeException&) @@ -456,6 +458,15 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) pFrameView, bIsCenterPane); } + else if (rsViewURL.equals(FrameworkHelper::msTaskPaneURL)) + { + pViewShell.reset( + new ::sd::toolpanel::ToolPanelViewShell( + &rFrame, + *mpBase, + &rWindow, + pFrameView)); + } return pViewShell; } @@ -522,6 +533,8 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftDrawPaneURL)); maCacheableResources.push_back(pHelper->CreateResourceId( FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftImpressPaneURL)); + maCacheableResources.push_back(pHelper->CreateResourceId( + FrameworkHelper::msTaskPaneURL, FrameworkHelper::msRightPaneURL)); } ::std::vector<Reference<XResourceId> >::const_iterator iId; diff --git a/sd/source/ui/framework/module/ToolPanelModule.cxx b/sd/source/ui/framework/module/ToolPanelModule.cxx index c607fbd3820a..273a22abe3e8 100644 --- a/sd/source/ui/framework/module/ToolPanelModule.cxx +++ b/sd/source/ui/framework/module/ToolPanelModule.cxx @@ -42,9 +42,10 @@ namespace sd { namespace framework { ToolPanelModule::ToolPanelModule ( const Reference<frame::XController>& rxController, - const OUString& rsSidebarPaneURL) + const OUString& rsViewURL, + const OUString& rsPaneURL) : ResourceManager(rxController, - FrameworkHelper::CreateResourceId(FrameworkHelper::msSidebarViewURL, rsSidebarPaneURL)), + FrameworkHelper::CreateResourceId(rsViewURL, rsPaneURL)), mxControllerManager(rxController,UNO_QUERY) { if (mxConfigurationController.is()) diff --git a/sd/source/ui/framework/module/ToolPanelModule.hxx b/sd/source/ui/framework/module/ToolPanelModule.hxx index ce28ef826330..112ffbfff80d 100644 --- a/sd/source/ui/framework/module/ToolPanelModule.hxx +++ b/sd/source/ui/framework/module/ToolPanelModule.hxx @@ -35,7 +35,7 @@ class ToolPanelModule public: ToolPanelModule ( const css::uno::Reference<css::frame::XController>& rxController, - const OUString& rsRightPaneURL); + const OUString& rsViewURL, const OUString& rsPaneURL); virtual ~ToolPanelModule (void); virtual void SaveResourceState (void); |