include/svtools/brwbox.hxx | 6 +----- svtools/source/brwbox/brwbox1.cxx | 8 ++++---- svtools/source/brwbox/brwbox2.cxx | 4 ++-- 3 files changed, 7 insertions(+), 11 deletions(-)
New commits: commit ee120240f7021ce8f06c09fe2c2b26593c7de67e Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Feb 25 12:44:37 2014 +0100 BrowseBox::bHideCursor misuses sal_Bool for TriState (TRISTATE_INDET == "smart" is probably obvious enough to not warrant an extra enum.) Change-Id: I5fde5294c83c9f805d9df645089665b9dbcfec96 diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 8d172df..4581337 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 be9ad5d..55a0f77 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 fb39186..7bc82fc 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits