Kaydet (Commit) a65a423e authored tarafından Michael Meeks's avatar Michael Meeks

more reverts, first cut at making sidebar optional.

üst 54d820a7
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "DrawDocShell.hxx" #include "DrawDocShell.hxx"
#include "GraphicDocShell.hxx" #include "GraphicDocShell.hxx"
#include "SlideSorterViewShell.hxx" #include "SlideSorterViewShell.hxx"
#include "taskpane/ToolPanelViewShell.hxx"
#include "FactoryIds.hxx" #include "FactoryIds.hxx"
#include "sdmod.hxx" #include "sdmod.hxx"
#include "app.hrc" #include "app.hrc"
...@@ -114,6 +115,11 @@ void SdDLL::RegisterInterfaces() ...@@ -114,6 +115,11 @@ void SdDLL::RegisterInterfaces()
// View shells for the side panes. // View shells for the side panes.
::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod); ::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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -126,6 +126,7 @@ void SdDLL::RegisterControllers() ...@@ -126,6 +126,7 @@ void SdDLL::RegisterControllers()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod); ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod); ::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod);
::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod); ::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod);
::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod);
::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(0, pMod); ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(0, pMod);
SvxFillToolBoxControl::RegisterControl(0, pMod); SvxFillToolBoxControl::RegisterControl(0, pMod);
......
...@@ -92,6 +92,29 @@ LeftDrawPaneShell::~LeftDrawPaneShell (void) ...@@ -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 } // end of namespace ::sd
......
...@@ -45,7 +45,8 @@ namespace { ...@@ -45,7 +45,8 @@ namespace {
CenterPaneId, CenterPaneId,
FullScreenPaneId, FullScreenPaneId,
LeftImpressPaneId, LeftImpressPaneId,
LeftDrawPaneId LeftDrawPaneId,
RightPaneId
}; };
static const sal_Int32 gnConfigurationUpdateStartEvent(0); static const sal_Int32 gnConfigurationUpdateStartEvent(0);
...@@ -219,6 +220,11 @@ void SAL_CALL BasicPaneFactory::initialize (const Sequence<Any>& aArguments) ...@@ -219,6 +220,11 @@ void SAL_CALL BasicPaneFactory::initialize (const Sequence<Any>& aArguments)
aDescriptor.mePaneId = LeftDrawPaneId; aDescriptor.mePaneId = LeftDrawPaneId;
mpPaneContainer->push_back(aDescriptor); mpPaneContainer->push_back(aDescriptor);
xCC->addResourceFactory(aDescriptor.msPaneURL, this); 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. // Register as configuration change listener.
...@@ -287,6 +293,7 @@ Reference<XResource> SAL_CALL BasicPaneFactory::createResource ( ...@@ -287,6 +293,7 @@ Reference<XResource> SAL_CALL BasicPaneFactory::createResource (
case LeftImpressPaneId: case LeftImpressPaneId:
case LeftDrawPaneId: case LeftDrawPaneId:
case RightPaneId:
xPane = CreateChildWindowPane( xPane = CreateChildWindowPane(
rxPaneId, rxPaneId,
*iDescriptor); *iDescriptor);
...@@ -472,6 +479,11 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane ( ...@@ -472,6 +479,11 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
nChildWindowId = ::sd::LeftPaneDrawChildWindow::GetChildWindowId(); nChildWindowId = ::sd::LeftPaneDrawChildWindow::GetChildWindowId();
break; break;
case RightPaneId:
pShell.reset(new ToolPanelPaneShell());
nChildWindowId = ::sd::ToolPanelChildWindow::GetChildWindowId();
break;
default: default:
break; break;
} }
......
...@@ -59,6 +59,7 @@ namespace sd { namespace framework { ...@@ -59,6 +59,7 @@ namespace sd { namespace framework {
private:resource/pane/FullScreenPane private:resource/pane/FullScreenPane
private:resource/pane/LeftImpressPane private:resource/pane/LeftImpressPane
private:resource/pane/LeftDrawPane private:resource/pane/LeftDrawPane
private:resource/pane/RightPane
There are two left panes because this is (seems to be) the only way to 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. show different titles for the left pane in Draw and Impress.
*/ */
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "DrawViewShell.hxx" #include "DrawViewShell.hxx"
#include "GraphicViewShell.hxx" #include "GraphicViewShell.hxx"
#include "OutlineViewShell.hxx" #include "OutlineViewShell.hxx"
#include "taskpane/ToolPanelViewShell.hxx"
#include "PresentationViewShell.hxx" #include "PresentationViewShell.hxx"
#include "SlideSorterViewShell.hxx" #include "SlideSorterViewShell.hxx"
#include "FrameView.hxx" #include "FrameView.hxx"
...@@ -318,6 +319,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) ...@@ -318,6 +319,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
mxConfigurationController->addResourceFactory(FrameworkHelper::msNotesViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msNotesViewURL, this);
mxConfigurationController->addResourceFactory(FrameworkHelper::msHandoutViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msHandoutViewURL, this);
mxConfigurationController->addResourceFactory(FrameworkHelper::msPresentationViewURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msPresentationViewURL, this);
mxConfigurationController->addResourceFactory(FrameworkHelper::msTaskPaneURL, this);
mxConfigurationController->addResourceFactory(FrameworkHelper::msSlideSorterURL, this); mxConfigurationController->addResourceFactory(FrameworkHelper::msSlideSorterURL, this);
} }
catch (RuntimeException&) catch (RuntimeException&)
...@@ -456,6 +458,15 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) ...@@ -456,6 +458,15 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
pFrameView, pFrameView,
bIsCenterPane); bIsCenterPane);
} }
else if (rsViewURL.equals(FrameworkHelper::msTaskPaneURL))
{
pViewShell.reset(
new ::sd::toolpanel::ToolPanelViewShell(
&rFrame,
*mpBase,
&rWindow,
pFrameView));
}
return pViewShell; return pViewShell;
} }
...@@ -522,6 +533,8 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r ...@@ -522,6 +533,8 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r
FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftDrawPaneURL)); FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftDrawPaneURL));
maCacheableResources.push_back(pHelper->CreateResourceId( maCacheableResources.push_back(pHelper->CreateResourceId(
FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftImpressPaneURL)); FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftImpressPaneURL));
maCacheableResources.push_back(pHelper->CreateResourceId(
FrameworkHelper::msTaskPaneURL, FrameworkHelper::msRightPaneURL));
} }
::std::vector<Reference<XResourceId> >::const_iterator iId; ::std::vector<Reference<XResourceId> >::const_iterator iId;
......
...@@ -42,9 +42,10 @@ namespace sd { namespace framework { ...@@ -42,9 +42,10 @@ namespace sd { namespace framework {
ToolPanelModule::ToolPanelModule ( ToolPanelModule::ToolPanelModule (
const Reference<frame::XController>& rxController, const Reference<frame::XController>& rxController,
const OUString& rsSidebarPaneURL) const OUString& rsViewURL,
const OUString& rsPaneURL)
: ResourceManager(rxController, : ResourceManager(rxController,
FrameworkHelper::CreateResourceId(FrameworkHelper::msSidebarViewURL, rsSidebarPaneURL)), FrameworkHelper::CreateResourceId(rsViewURL, rsPaneURL)),
mxControllerManager(rxController,UNO_QUERY) mxControllerManager(rxController,UNO_QUERY)
{ {
if (mxConfigurationController.is()) if (mxConfigurationController.is())
......
...@@ -35,7 +35,7 @@ class ToolPanelModule ...@@ -35,7 +35,7 @@ class ToolPanelModule
public: public:
ToolPanelModule ( ToolPanelModule (
const css::uno::Reference<css::frame::XController>& rxController, const css::uno::Reference<css::frame::XController>& rxController,
const OUString& rsRightPaneURL); const OUString& rsViewURL, const OUString& rsPaneURL);
virtual ~ToolPanelModule (void); virtual ~ToolPanelModule (void);
virtual void SaveResourceState (void); virtual void SaveResourceState (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment