From b9e635d6a9f52edefd9d53b8feb68768381890e4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 16 May 2020 20:41:20 +0100 Subject: tdf#133079 ensure Sheet root is selected if nothing else would be MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I01d45bfa8f410dcf35a9ecc90b295b7c75ccc746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94369 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/ui/navipi/content.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sc/source/ui/navipi') diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 8b25b86de75f..edb574513b52 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 ) { -- cgit