diff options
Diffstat (limited to 'sd/source/ui/toolpanel')
-rw-r--r-- | sd/source/ui/toolpanel/ToolPanelFactory.cxx | 4 | ||||
-rwxr-xr-x | sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sd/source/ui/toolpanel/ToolPanelFactory.cxx b/sd/source/ui/toolpanel/ToolPanelFactory.cxx index a0315ed30fd0..db4602c991d0 100644 --- a/sd/source/ui/toolpanel/ToolPanelFactory.cxx +++ b/sd/source/ui/toolpanel/ToolPanelFactory.cxx @@ -172,7 +172,7 @@ namespace sd { namespace toolpanel } } - if ( !pViewFrame || !pViewFrame->HasChildWindow( SID_RIGHT_PANE ) ) + if ( !pViewFrame || !pViewFrame->HasChildWindow( SID_TASKPANE ) ) throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal frame." ) ), *this, @@ -180,7 +180,7 @@ namespace sd { namespace toolpanel ); // retrieve the task pane - ToolPanelChildWindow* pToolPanelWindow( dynamic_cast< ToolPanelChildWindow* >( pViewFrame->GetChildWindow( SID_RIGHT_PANE ) ) ); + ToolPanelChildWindow* pToolPanelWindow( dynamic_cast< ToolPanelChildWindow* >( pViewFrame->GetChildWindow( SID_TASKPANE ) ) ); if ( !pToolPanelWindow ) throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No Impress document, or no Impress Task Pane." ) ), diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx index 26cb270950f3..0d7eeea99190 100755 --- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx +++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx @@ -34,6 +34,7 @@ #include "taskpane/TaskPaneControlFactory.hxx" #include "controls/MasterPagesPanel.hxx" #include "LayoutMenu.hxx" +#include "DrawDocShell.hxx" #include "controls/TableDesignPanel.hxx" #include "controls/CustomAnimationPanel.hxx" #include "controls/SlideTransitionPanel.hxx" @@ -366,9 +367,13 @@ TYPEINIT1(ToolPanelViewShell, ViewShell); // --------------------------------------------------------------------------------------------------------------------- ToolPanelViewShell_Impl::InitialPanel ToolPanelViewShell_Impl::impl_determineInitialPanel() { + InitialPanel aPanelToActivate; + if ( GetAntiImpl().GetViewShellBase().GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW ) + // for Draw, rely on SFX's default handling, which is to activate the previously active panel + return aPanelToActivate; + // Default to Layout panel, but check whether the requested configuration already contains a tool panel, in this case, // use that one. - InitialPanel aPanelToActivate; aPanelToActivate.sPanelResourceURL = FrameworkHelper::msLayoutTaskPanelURL; aPanelToActivate.bActivateDirectly = false; try |