summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-01-29 15:55:05 -0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-30 07:22:40 +0100
commit54d96a88d2623b4ffcc00f4b8a8479edab5fbb6f (patch)
tree484e5a8a4d32dcc1a232c8d25d44bb98aa2d6689
parent5d7a526ee784abc3d83835b9e43047baf5dbe0b9 (diff)
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 <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/navipi/content.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 1d33a9e15c01..a64e772ac138 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1648,6 +1648,18 @@ void ScContentTree::ApplyNavigatorSettings()
ScContentId nEntry = static_cast<ScContentId>(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 ] ) )