diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-08-25 13:29:38 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-08-25 13:29:38 +0200 |
commit | 081f3c9e3fd4e3491994028e6b5eb19ff3ed7018 (patch) | |
tree | 209a81d1867b5dda932d5ddc6dc8b0ded83d8f66 /sfx2 | |
parent | f13ce448ff464d557a9b360eb413f914276cc4e3 (diff) |
fs33a: when all panels claim to be invisible, make the first one visible
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index f25485a1401c..5d763f81744d 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -584,6 +584,7 @@ namespace sfx2 return; ::rtl::OUString sFirstVisiblePanelResource; + ::rtl::OUString sFirstPanelResource; const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() ); for ( const ::rtl::OUString* resource = aUIElements.getConstArray(); @@ -594,6 +595,8 @@ namespace sfx2 if ( !impl_isToolPanelResource( *resource ) ) continue; + sFirstPanelResource = *resource; + ::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) ); ::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) ); @@ -620,6 +623,9 @@ namespace sfx2 sFirstVisiblePanelResource = *resource; } + if ( sFirstVisiblePanelResource.getLength() == 0 ) + sFirstVisiblePanelResource = sFirstPanelResource; + if ( sFirstVisiblePanelResource.getLength() ) { ::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) ); |