summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx')
-rw-r--r--sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx
index 4c09330ec..b333e3d3d 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<ControlFactory> SlideTransitionPanel::CreateControlFactory (ViewSh
new ControlFactoryWithArgs1<SlideTransitionPanel,ViewShellBase>(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;