Kaydet (Commit) acfa3917 authored tarafından Noel Grandin's avatar Noel Grandin

remove unused enum value SvTLEntryFlags::IN_USE

Change-Id: Ieb09d4d28cc2084da4660165a96561ee57d2420d
Reviewed-on: https://gerrit.libreoffice.org/64029
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 4a59a8ab
......@@ -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
......
......@@ -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 );
......
......@@ -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);
}
......
......@@ -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())
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment