summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-23 15:14:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-26 15:44:49 +0100
commitacfa3917ab2eb3d3efd45f319ec48e6ccb87c5dd (patch)
treea2d0efb4e9adbd52474918275fe173568acb6ab5
parent4a59a8aba8c9d451edff790d9281d0095c1bd78e (diff)
remove unused enum value SvTLEntryFlags::IN_USE
Change-Id: Ieb09d4d28cc2084da4660165a96561ee57d2420d Reviewed-on: https://gerrit.libreoffice.org/64029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/unusedenumconstants.readonly.results2
-rw-r--r--include/vcl/treelistentry.hxx6
-rw-r--r--svtools/source/contnr/iconview.cxx28
-rw-r--r--vcl/source/treelist/treelistbox.cxx35
-rw-r--r--vcl/source/treelist/treelistentry.cxx6
5 files changed, 27 insertions, 50 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index 5e7a1dd16a29..2994af2a95fe 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1072,8 +1072,6 @@ include/vcl/salctype.hxx:41
enum ConvertDataFormat PDF
include/vcl/splitwin.hxx:37
enum SplitWindowItemFlags Invisible
-include/vcl/treelistentry.hxx:38
- enum SvTLEntryFlags IN_USE
include/vcl/vclenum.hxx:37
enum MenuItemBits POPUPSELECT
include/vcl/vclenum.hxx:143
diff --git a/include/vcl/treelistentry.hxx b/include/vcl/treelistentry.hxx
index b318bb3c440f..1cb234c7c98a 100644
--- a/include/vcl/treelistentry.hxx
+++ b/include/vcl/treelistentry.hxx
@@ -35,16 +35,15 @@ enum class SvTLEntryFlags
NONE = 0x0000,
CHILDREN_ON_DEMAND = 0x0001,
DISABLE_DROP = 0x0002,
- IN_USE = 0x0004,
// is set if RequestingChildren has not set any children
- NO_NODEBMP = 0x0008,
+ NO_NODEBMP = 0x0004,
// entry had or has children
HAD_CHILDREN = 0x0010,
SEMITRANSPARENT = 0x8000, // draw semi-transparent entry bitmaps
};
namespace o3tl
{
- template<> struct typed_flags<SvTLEntryFlags> : is_typed_flags<SvTLEntryFlags, 0x801f> {};
+ template<> struct typed_flags<SvTLEntryFlags> : is_typed_flags<SvTLEntryFlags, 0x8017> {};
}
class VCL_DLLPUBLIC SvTreeListEntry
@@ -104,7 +103,6 @@ public:
void SetUserData( void* pPtr );
void EnableChildrenOnDemand( bool bEnable=true );
bool HasChildrenOnDemand() const;
- bool HasInUseEmphasis() const;
SvTLEntryFlags GetFlags() const { return nEntryFlags;}
void SetFlags( SvTLEntryFlags nFlags );
diff --git a/svtools/source/contnr/iconview.cxx b/svtools/source/contnr/iconview.cxx
index f00e10b77b5e..31f80325f40d 100644
--- a/svtools/source/contnr/iconview.cxx
+++ b/svtools/source/contnr/iconview.cxx
@@ -101,7 +101,6 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY,
Color aBackupColor = rRenderContext.GetFillColor();
bool bCurFontIsSel = false;
- bool bInUse = rEntry.HasInUseEmphasis();
const WinBits nWindowStyle = GetStyle();
const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus();
const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
@@ -142,22 +141,19 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY,
if (pViewDataEntry->IsHighlighted())
{
Color aNewWallColor = rSettings.GetHighlightColor();
- if (!bInUse)
+ // if the face color is bright then the deactive color is also bright
+ // -> so you can't see any deactive selection
+ if (bHideSelection && !rSettings.GetFaceColor().IsBright()
+ && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
{
- // if the face color is bright then the deactive color is also bright
- // -> so you can't see any deactive selection
- if (bHideSelection && !rSettings.GetFaceColor().IsBright()
- && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
- {
- aNewWallColor = rSettings.GetDeactiveColor();
- }
- // set font color to highlight
- if (!bCurFontIsSel)
- {
- rRenderContext.SetTextColor(aHighlightTextColor);
- rRenderContext.SetFont(aHighlightFont);
- bCurFontIsSel = true;
- }
+ aNewWallColor = rSettings.GetDeactiveColor();
+ }
+ // set font color to highlight
+ if (!bCurFontIsSel)
+ {
+ rRenderContext.SetTextColor(aHighlightTextColor);
+ rRenderContext.SetFont(aHighlightFont);
+ bCurFontIsSel = true;
}
aWallpaper.SetColor(aNewWallColor);
}
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 6aea58ad91b4..8962b8410664 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2657,7 +2657,6 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
Color aBackupColor = rRenderContext.GetFillColor();
bool bCurFontIsSel = false;
- bool bInUse = rEntry.HasInUseEmphasis();
// if a ClipRegion was set from outside, we don't have to reset it
const WinBits nWindowStyle = GetStyle();
const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus();
@@ -2712,37 +2711,29 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
Wallpaper aWallpaper = rRenderContext.GetBackground();
bool bSelTab = bool(nFlags & SvLBoxTabFlags::SHOW_SELECTION);
- SvLBoxItemType nItemType = rItem.GetType();
if (pViewDataEntry->IsHighlighted() && bSelTab)
{
Color aNewWallColor = rSettings.GetHighlightColor();
- if (!bInUse || nItemType != SvLBoxItemType::ContextBmp)
+ // if the face color is bright then the deactive color is also bright
+ // -> so you can't see any deactive selection
+ if (bHideSelection && !rSettings.GetFaceColor().IsBright()
+ && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
{
- // if the face color is bright then the deactive color is also bright
- // -> so you can't see any deactive selection
- if (bHideSelection && !rSettings.GetFaceColor().IsBright()
- && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
- {
- aNewWallColor = rSettings.GetDeactiveColor();
- }
- // set font color to highlight
- if (!bCurFontIsSel)
- {
- rRenderContext.SetTextColor(aHighlightTextColor);
- rRenderContext.SetFont(aHighlightFont);
- bCurFontIsSel = true;
- }
+ aNewWallColor = rSettings.GetDeactiveColor();
+ }
+ // set font color to highlight
+ if (!bCurFontIsSel)
+ {
+ rRenderContext.SetTextColor(aHighlightTextColor);
+ rRenderContext.SetFont(aHighlightFont);
+ bCurFontIsSel = true;
}
aWallpaper.SetColor(aNewWallColor);
}
else // no selection
{
- if (bInUse && nItemType == SvLBoxItemType::ContextBmp)
- {
- aWallpaper.SetColor(rSettings.GetFieldColor());
- }
- else if (bCurFontIsSel || rEntry.GetTextColor())
+ if (bCurFontIsSel || rEntry.GetTextColor())
{
bCurFontIsSel = false;
if (const auto* pCustomTextColor = rEntry.GetTextColor())
diff --git a/vcl/source/treelist/treelistentry.cxx b/vcl/source/treelist/treelistentry.cxx
index 8bcca01a5eaf..35e0d80b6946 100644
--- a/vcl/source/treelist/treelistentry.cxx
+++ b/vcl/source/treelist/treelistentry.cxx
@@ -202,12 +202,6 @@ bool SvTreeListEntry::HasChildrenOnDemand() const
return static_cast<bool>(nEntryFlags & SvTLEntryFlags::CHILDREN_ON_DEMAND);
}
-bool SvTreeListEntry::HasInUseEmphasis() const
-{
- return static_cast<bool>(nEntryFlags & SvTLEntryFlags::IN_USE);
-}
-
-
void SvTreeListEntry::SetFlags( SvTLEntryFlags nFlags )
{
nEntryFlags = nFlags;