diff options
-rw-r--r-- | include/svtools/brwbox.hxx | 6 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 8 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 8d172df324f4..4581337cf0ae 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -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 diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index be9ad5d96473..55a0f77493b9 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -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); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index fb3918610cf8..7bc82fc8578f 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -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; } |