diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-11 15:37:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-11 20:41:58 +0200 |
commit | dad7593cf6bb91ecf95153e983723dd2cd03b469 (patch) | |
tree | e96a0cbcc659e037a5c9c596505df298cabca8ac /vcl | |
parent | 528008104bcb7433f818ab3e8bf10bf1296e09b9 (diff) |
GetDontKnowNodeBmp is always empty
so this is dead code, remove most of it, but recover setting
aControlValue.setTristateVal(ButtonValue::DontKnow) when the
possibility of expansion resulting in children is unknown
Change-Id: Idc2abd9af70402a92d02ed2273ab1df6684b16fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134194
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svimpbox.hxx | 7 | ||||
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 16 |
2 files changed, 2 insertions, 21 deletions
diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx index 9649708ddbfc..994a25f095ee 100644 --- a/vcl/inc/svimpbox.hxx +++ b/vcl/inc/svimpbox.hxx @@ -107,7 +107,6 @@ private: { NodeExpanded = 0, // node is expanded ( usually a bitmap showing a minus ) NodeCollapsed, // node is collapsed ( usually a bitmap showing a plus ) - NodeDontKnow, // don't know the node state EntryDefExpanded, // default for expanded entries EntryDefCollapsed, // default for collapsed entries LAST = EntryDefCollapsed @@ -280,7 +279,6 @@ public: inline const Image& GetExpandedNodeBmp( ); inline const Image& GetCollapsedNodeBmp( ); - inline const Image& GetDontKnowNodeBmp( ); inline void SetDefaultEntryExpBmp( const Image& _rImg ); inline void SetDefaultEntryColBmp( const Image& _rImg ); @@ -338,11 +336,6 @@ inline void SvImpLBox::SetCollapsedNodeBmp( const Image& rImg ) SetNodeBmpWidth( rImg ); } -inline const Image& SvImpLBox::GetDontKnowNodeBmp( ) -{ - return implGetImageLocation( ImageType::NodeDontKnow ); -} - inline const Image& SvImpLBox::GetExpandedNodeBmp( ) { return implGetImageLocation( ImageType::NodeExpanded ); diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 51c9d1f4c57c..3e231d257f93 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -2801,18 +2801,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl: if (IsExpanded(&rEntry)) pImg = &pImpl->GetExpandedNodeBmp(); else - { - if ((!rEntry.HasChildren()) && rEntry.HasChildrenOnDemand() && - (!(rEntry.GetFlags() & SvTLEntryFlags::HAD_CHILDREN)) && - pImpl->GetDontKnowNodeBmp().GetSizePixel().Width()) - { - pImg = &pImpl->GetDontKnowNodeBmp( ); - } - else - { - pImg = &pImpl->GetCollapsedNodeBmp( ); - } - } + pImg = &pImpl->GetCollapsedNodeBmp(); aPos.AdjustY((nTempEntryHeight - pImg->GetSizePixel().Height()) / 2 ); DrawImageFlags nStyle = DrawImageFlags::NONE; @@ -2835,8 +2824,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl: else { if ((!rEntry.HasChildren()) && rEntry.HasChildrenOnDemand() && - (!(rEntry.GetFlags() & SvTLEntryFlags::HAD_CHILDREN)) && - pImpl->GetDontKnowNodeBmp().GetSizePixel().Width()) + (!(rEntry.GetFlags() & SvTLEntryFlags::HAD_CHILDREN))) { aControlValue.setTristateVal( ButtonValue::DontKnow ); //don't know } |