summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/taskpane.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/taskpane.cxx')
-rw-r--r--sfx2/source/dialog/taskpane.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 2c99035d96..f1339fca85 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -253,10 +253,11 @@ namespace sfx2
pWindow->SetHelpId( HID_TASKPANE_WINDOW );
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
- pWindow->Show();
dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
SetHideNotDelete( TRUE );
+
+ pWindow->Show();
}
//------------------------------------------------------------------------------------------------------------------
@@ -593,6 +594,7 @@ namespace sfx2
return;
::rtl::OUString sFirstVisiblePanelResource;
+ ::rtl::OUString sFirstPanelResource;
const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() );
for ( const ::rtl::OUString* resource = aUIElements.getConstArray();
@@ -603,6 +605,8 @@ namespace sfx2
if ( !impl_isToolPanelResource( *resource ) )
continue;
+ sFirstPanelResource = *resource;
+
::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) );
::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) );
@@ -629,6 +633,9 @@ namespace sfx2
sFirstVisiblePanelResource = *resource;
}
+ if ( sFirstVisiblePanelResource.getLength() == 0 )
+ sFirstVisiblePanelResource = sFirstPanelResource;
+
if ( sFirstVisiblePanelResource.getLength() )
{
::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) );