Commits

Anonymous committed dc5ebd5

fs33a: when all panels claim to be invisible, make the first one visible

  • Participants
  • Parent commits c2af43c

Comments (0)

Files changed (1)

File sfx2/source/dialog/taskpane.cxx

             return;
 
         ::rtl::OUString sFirstVisiblePanelResource;
+        ::rtl::OUString sFirstPanelResource;
 
         const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() );
         for (   const ::rtl::OUString* resource = aUIElements.getConstArray();
             if ( !impl_isToolPanelResource( *resource ) )
                 continue;
 
+            sFirstPanelResource = *resource;
+
             ::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) );
             ::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) );
 
                 sFirstVisiblePanelResource = *resource;
         }
 
+        if ( sFirstVisiblePanelResource.getLength() == 0 )
+            sFirstVisiblePanelResource = sFirstPanelResource;
+
         if ( sFirstVisiblePanelResource.getLength() )
         {
             ::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) );