summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-29 23:47:47 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-29 23:47:47 -0500
commitaf659d4ca2769669fe1066514f6d6279f1b8b8cb (patch)
treed7aed1461ed19d51ba0eda03b75756a0d0572d7d /svtools
parent949a4e15de7560f72481f2ff90f9f3b3571a8e90 (diff)
Let's make it so that selected = highlighted + logically selected.
Being selected but not highlighted makes no sense. This way, an entry can be highlighted without being selected, but can never be selected without being highlighted. Change-Id: I6c469a1d2cf0df79c2e5e4ff4120af5efd5f6103
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/viewdataentry.hxx6
-rw-r--r--svtools/source/contnr/treelistbox.cxx4
-rw-r--r--svtools/source/contnr/viewdataentry.cxx3
3 files changed, 6 insertions, 7 deletions
diff --git a/svtools/inc/svtools/viewdataentry.hxx b/svtools/inc/svtools/viewdataentry.hxx
index 304b5fa4f4de..9fc04084dbd0 100644
--- a/svtools/inc/svtools/viewdataentry.hxx
+++ b/svtools/inc/svtools/viewdataentry.hxx
@@ -36,9 +36,9 @@ struct SvViewDataItem
* SvTreeListBox::CreateViewData(). The item array contains the same number
* of items as that of the items in its corresponding tree list entry.
*
- * When an entry is selected, it is both logically and visually selected.
- * When an entry is highlighted, it appears selected visually, but it's not
- * logically selected.
+ * When an entry is selected, it is logically selected and visually
+ * highlighted. When an entry is only highlighted, it looks visually
+ * highlighted, but not logically selected.
*/
class SVT_DLLPUBLIC SvViewDataEntry
{
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 945fbb77015f..f55ef953dfcf 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3007,9 +3007,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT
int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
sal_uInt16 nItemType = pItem->GetType();
- bool bHighlighted = pViewDataEntry->IsHighlighted() || pViewDataEntry->IsSelected();
-
- if (bHighlighted && bSelTab && !pViewDataEntry->IsCursored())
+ if (pViewDataEntry->IsHighlighted() && bSelTab && !pViewDataEntry->IsCursored())
{
Color aNewWallColor = rSettings.GetHighlightColor();
if ( !bInUse || nItemType != SV_ITEM_ID_LBOXCONTEXTBMP )
diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx
index a7f1a9093a5a..c9c75f3f21ca 100644
--- a/svtools/source/contnr/viewdataentry.cxx
+++ b/svtools/source/contnr/viewdataentry.cxx
@@ -45,7 +45,7 @@ SvViewDataEntry::SvViewDataEntry() :
SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) :
nVisPos(rData.nVisPos),
mbSelected(false),
- mbHighlighted(rData.mbHighlighted),
+ mbHighlighted(false),
mbExpanded(rData.mbExpanded),
mbFocused(false),
mbCursored(rData.mbCursored),
@@ -105,6 +105,7 @@ void SvViewDataEntry::SetCursored( bool bCursored )
void SvViewDataEntry::SetSelected( bool bSelected )
{
mbSelected = bSelected;
+ mbHighlighted = bSelected;
}
void SvViewDataEntry::SetHighlighted( bool bHighlighted )