tdf#133079 ensure Sheet root is selected if nothing else would be
Change-Id: I01d45bfa8f410dcf35a9ecc90b295b7c75ccc746
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94369
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 8b25b86..edb5745 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1568,7 +1568,15 @@ void ScContentTree::ApplyNavigatorSettings()
if( pSettings )
{
ScContentId nRootSel = pSettings->GetRootSelected();
sal_uLong nChildSel = pSettings->GetChildSelected();
auto nChildSel = pSettings->GetChildSelected();
// tdf#133079 ensure Sheet root is selected if nothing
// else would be
if (nRootSel == ScContentId::ROOT)
{
nRootSel = ScContentId::TABLE;
nChildSel = SC_CONTENT_NOCHILD;
}
for( int i = 1; i <= int(ScContentId::LAST); ++i )
{