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 @@
#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: */
......@@ -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);
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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.
*/
......
......@@ -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;
......
......@@ -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())
......
......@@ -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);
......
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