summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-16 20:41:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-17 20:50:39 +0200
commitb9e635d6a9f52edefd9d53b8feb68768381890e4 (patch)
tree4573501eec310e3bd8a8e3d9c24204405d55fc56
parent9786f2b0b7979a4cb781ea52b4510eecfd15dc49 (diff)
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>
-rw-r--r--sc/source/ui/navipi/content.cxx10
1 files changed, 9 insertions, 1 deletions
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 )
{