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/source | |
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/source')
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
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 } |