From f391eb8768b00e1db5bdf8a510ba5cce3669f572 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 15 Mar 2010 13:53:19 +0100 Subject: slidecopy: initial version of a "Tool Panel" At the moment, this implementation is parallel to the existing TaskPane implementation, but on the medium term, it is intended to replace it. No change in functionality is planned for the moment, just the panel selection is done via a tab bar, instead of the the "jumping drawers". Pending tasks (as known so far): - Accessibility. No implementation at all, yet. - showing/hiding tool panels from the "View" drop down menu - connection to the resource framework. At the moment, de/activating panels completely bypasses the resource framework. - alternative implementation of the PanelDeckLayouter which mimics the old design. To be activated by default, for the moment. - removal of the (old, by then) TaskPane implementation. Care needs to be taken that the framework API stays unchanged, i.e., the current ToolPanel resource must be renamed back to RightPane when RightPane is not occupied anymore by the old implementation. Same for other resource names. --- .../ui/toolpanel/controls/SlideTransitionPanel.cxx | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx') diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx index eafffa494b25..cfef2ad7cb09 100644 --- a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx +++ b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx @@ -33,6 +33,7 @@ #include "SlideTransitionPanel.hxx" #include "taskpane/TaskPaneControlFactory.hxx" +#include "taskpane/ToolPanelViewShell.hxx" #include "strings.hrc" #include "sdresid.hxx" @@ -50,12 +51,22 @@ namespace toolpanel { namespace controls { SlideTransitionPanel::SlideTransitionPanel(TreeNode* pParent, ViewShellBase& rBase) : SubToolPanel (pParent), - maPreferredSize( 100, 200 ) + maPreferredSize( 100, 200 ), + m_pPanelViewShell( NULL ) { mpWrappedControl = createSlideTransitionPanel( pParent->GetWindow(), rBase ); mpWrappedControl->Show(); } +SlideTransitionPanel::SlideTransitionPanel(Window& i_rParentWindow, ToolPanelViewShell& i_rToolPanelShell) + :SubToolPanel( i_rParentWindow ) + ,maPreferredSize( 100, 200 ) + ,m_pPanelViewShell( &i_rToolPanelShell ) +{ + mpWrappedControl = createSlideTransitionPanel( &i_rParentWindow, i_rToolPanelShell.GetViewShellBase() ); + mpWrappedControl->Show(); +} + SlideTransitionPanel::~SlideTransitionPanel() { delete mpWrappedControl; @@ -67,6 +78,19 @@ std::auto_ptr SlideTransitionPanel::CreateControlFactory (ViewSh new ControlFactoryWithArgs1(rBase)); } +std::auto_ptr< ControlFactory > SlideTransitionPanel::CreateControlFactory( ToolPanelViewShell& i_rToolPanelShell ) +{ + return std::auto_ptr< ControlFactory >( + new RootControlFactoryWithArg< SlideTransitionPanel, ToolPanelViewShell >( i_rToolPanelShell ) ); +} + +TaskPaneShellManager* SlideTransitionPanel::GetShellManager() +{ + if ( m_pPanelViewShell ) + return &m_pPanelViewShell->GetSubShellManager(); + return SubToolPanel::GetShellManager(); +} + Size SlideTransitionPanel::GetPreferredSize() { return maPreferredSize; -- cgit From 644a203f684e5b9286c8c5b8c2b0c0e6455c7cd1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 22 Mar 2010 13:19:00 +0100 Subject: slidecopy: removed the remaints of the old task panel implementation - in particular, creating tool panels as non-roots of a control tree is not needed anymore by now --- sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx') diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx index cfef2ad7cb09..a61f2b83db33 100644 --- a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx +++ b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx @@ -49,15 +49,6 @@ namespace toolpanel { namespace controls { -SlideTransitionPanel::SlideTransitionPanel(TreeNode* pParent, ViewShellBase& rBase) - : SubToolPanel (pParent), - maPreferredSize( 100, 200 ), - m_pPanelViewShell( NULL ) -{ - mpWrappedControl = createSlideTransitionPanel( pParent->GetWindow(), rBase ); - mpWrappedControl->Show(); -} - SlideTransitionPanel::SlideTransitionPanel(Window& i_rParentWindow, ToolPanelViewShell& i_rToolPanelShell) :SubToolPanel( i_rParentWindow ) ,maPreferredSize( 100, 200 ) @@ -72,12 +63,6 @@ SlideTransitionPanel::~SlideTransitionPanel() delete mpWrappedControl; } -std::auto_ptr SlideTransitionPanel::CreateControlFactory (ViewShellBase& rBase) -{ - return std::auto_ptr( - new ControlFactoryWithArgs1(rBase)); -} - std::auto_ptr< ControlFactory > SlideTransitionPanel::CreateControlFactory( ToolPanelViewShell& i_rToolPanelShell ) { return std::auto_ptr< ControlFactory >( -- cgit