BrowseBox::bHideCursor misuses sal_Bool for TriState
(TRISTATE_INDET == "smart" is probably obvious enough to not warrant an extra enum.) Change-Id: I5fde5294c83c9f805d9df645089665b9dbcfec96
This commit is contained in:
@@ -210,10 +210,6 @@ class SVT_DLLPUBLIC BrowseBox
|
||||
,public DropTargetHelper
|
||||
,public svt::IAccessibleTableProvider
|
||||
{
|
||||
#define NO_CURSOR_HIDE 0
|
||||
#define HARD_CURSOR_HIDE 1
|
||||
#define SMART_CURSOR_HIDE 2
|
||||
|
||||
friend class BrowserDataWin;
|
||||
friend class ::svt::BrowseBoxImpl;
|
||||
|
||||
@@ -268,7 +264,7 @@ private:
|
||||
sal_Bool bNotToggleSel; // set while in ToggleSelection() etc.
|
||||
sal_Bool bHasFocus; // set/unset in Get/LoseFocus
|
||||
sal_Bool bHideSelect; // hide selection (highlight)
|
||||
sal_Bool bHideCursor; // hide cursor (frame)
|
||||
TriState bHideCursor; // hide cursor (frame)
|
||||
Range aSelRange; // for selection expansion
|
||||
|
||||
BrowserColumns* pCols; // array of column-descriptions
|
||||
|
@@ -96,7 +96,7 @@ void BrowseBox::ConstructImpl( BrowserMode nMode )
|
||||
bHit = sal_False;
|
||||
mbInteractiveRowHeight = sal_False;
|
||||
bHideSelect = sal_False;
|
||||
bHideCursor = NO_CURSOR_HIDE;
|
||||
bHideCursor = TRISTATE_FALSE;
|
||||
nRowCount = 0;
|
||||
m_bFocusOnlyCursor = sal_True;
|
||||
m_aCursorColor = COL_TRANSPARENT;
|
||||
@@ -2291,15 +2291,15 @@ void BrowseBox::SetMode( BrowserMode nMode )
|
||||
|
||||
bHideSelect = ((nMode & BROWSER_HIDESELECT) == BROWSER_HIDESELECT);
|
||||
// default: do not hide the cursor at all (untaken scrolling and such)
|
||||
bHideCursor = NO_CURSOR_HIDE;
|
||||
bHideCursor = TRISTATE_FALSE;
|
||||
|
||||
if ( BROWSER_SMART_HIDECURSOR == ( nMode & BROWSER_SMART_HIDECURSOR ) )
|
||||
{ // smart cursor hide overrules hard cursor hide
|
||||
bHideCursor = SMART_CURSOR_HIDE;
|
||||
bHideCursor = TRISTATE_INDET;
|
||||
}
|
||||
else if ( BROWSER_HIDECURSOR == ( nMode & BROWSER_HIDECURSOR ) )
|
||||
{
|
||||
bHideCursor = HARD_CURSOR_HIDE;
|
||||
bHideCursor = TRISTATE_TRUE;
|
||||
}
|
||||
|
||||
m_bFocusOnlyCursor = ((nMode & BROWSER_CURSOR_WO_FOCUS) == 0);
|
||||
|
@@ -383,12 +383,12 @@ void BrowseBox::ToggleSelection( sal_Bool bForce )
|
||||
void BrowseBox::DrawCursor()
|
||||
{
|
||||
bool bReallyHide = false;
|
||||
if ( SMART_CURSOR_HIDE == bHideCursor )
|
||||
if ( bHideCursor == TRISTATE_INDET )
|
||||
{
|
||||
if ( !GetSelectRowCount() && !GetSelectColumnCount() )
|
||||
bReallyHide = true;
|
||||
}
|
||||
else if ( HARD_CURSOR_HIDE == bHideCursor )
|
||||
else if ( bHideCursor == TRISTATE_TRUE )
|
||||
{
|
||||
bReallyHide = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user