From 0dba4ed331f539285d8ede0503760b5385bdca8e Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Wed, 29 Jan 2020 15:55:05 -0900 Subject: tdf#129625 Calc Navigator: Gray out content types with no content Change-Id: I298894bbb338b97fe6891e33b23f16302acaec37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87714 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 54d96a88d2623b4ffcc00f4b8a8479edab5fbb6f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87741 Reviewed-by: Adolfo Jayme Barrientos --- sc/source/ui/navipi/content.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index bb3168956dd2..b3800f9505e6 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1647,6 +1647,18 @@ void ScContentTree::ApplyNavigatorSettings() ScContentId nEntry = static_cast(i); if( pRootNodes[ nEntry ] ) { + // gray or ungray + if( GetChildCount( pRootNodes[ nEntry ] ) == 0 ) + { + pRootNodes[ nEntry ]->SetFlags( pRootNodes[ nEntry ]->GetFlags() | SvTLEntryFlags::SEMITRANSPARENT ); + pRootNodes[ nEntry ]->SetTextColor( COL_GRAY ); + } + else + { + pRootNodes[ nEntry ]->SetFlags( pRootNodes[ nEntry ]->GetFlags() & ~SvTLEntryFlags::SEMITRANSPARENT ); + pRootNodes[ nEntry ]->SetTextColor( GetTextColor() ); + } + // expand bool bExp = pSettings->IsExpanded( nEntry ); if( bExp != IsExpanded( pRootNodes[ nEntry ] ) ) -- cgit