diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-18 12:14:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-18 13:02:39 +0200 |
commit | b71ff0db856c7fbc3505f2663aee568fa47fc067 (patch) | |
tree | 23dc10b5587ca72ff980af112156b809c50bb0b4 | |
parent | fb0bf56948d7f968717f4a3f53ce56e320cd5f36 (diff) |
convert ExtendedWinBits to a single bool flag
Change-Id: I2ff15a7f485ffdfb78eaabd529d19065faeb4c53
Reviewed-on: https://gerrit.libreoffice.org/41277
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 2 | ||||
-rw-r--r-- | include/svtools/treelistbox.hxx | 7 | ||||
-rw-r--r-- | svtools/source/contnr/iconviewimpl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 8 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 4 | ||||
-rw-r--r-- | svtools/source/inc/svimpbox.hxx | 4 |
6 files changed, 11 insertions, 16 deletions
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 67d3d92d79f5..eac3e20a74ad 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -78,7 +78,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) { SetSpaceBetweenEntries(SPACEBETWEENENTRIES); SetSelectionMode( SelectionMode::NONE ); - SetExtendedWinBits( EWB_NO_AUTO_CURENTRY ); + SetNoAutoCurEntry( true ); SetNodeDefaultImages( ); EnableEntryMnemonics(); } diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 07ac32a61652..d7abdee515d0 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -118,11 +118,6 @@ enum class SvTreeAccRoleType TREE = 0x02 }; -typedef sal_Int64 ExtendedWinBits; - -// disable the behavior of automatically selecting a "CurEntry" upon painting the control -#define EWB_NO_AUTO_CURENTRY 0x00000001 - enum class SvLBoxItemType {String, Button, ContextBmp}; class SvLBoxTab @@ -595,7 +590,7 @@ protected: void AdjustEntryHeightAndRecalc(); public: - void SetExtendedWinBits( ExtendedWinBits _nBits ); + void SetNoAutoCurEntry( bool b ); void DisconnectFromModel(); diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx index 78b5148b264a..d1221169afb4 100644 --- a/svtools/source/contnr/iconviewimpl.cxx +++ b/svtools/source/contnr/iconviewimpl.cxx @@ -413,7 +413,7 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan vcl::Region aClipRegion(GetClipRegionRect()); - if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0)) + if (!pCursor && !mbNoAutoCurEntry) { // do not select if multiselection or explicit set bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index b0e3132596ff..de8a49889e5c 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -55,7 +55,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS , m_pStringSorter(nullptr) , aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL)) , aOutputSize(0, 0) - , nExtendedWinBits(0) + , mbNoAutoCurEntry(false) , aSelEng(pLBView, nullptr) , nNextVerVisSize(0) { @@ -244,9 +244,9 @@ void SvImpLBox::SetStyle( WinBits i_nWinStyle ) aSelEng.AddAlways( true ); } -void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits ) +void SvImpLBox::SetNoAutoCurEntry( bool b ) { - nExtendedWinBits = _nBits; + mbNoAutoCurEntry = b; } // don't touch the model any more @@ -924,7 +924,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle rRenderContext.SetClipRegion(aClipRegion); - if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0)) + if (!pCursor && !mbNoAutoCurEntry) { // do not select if multiselection or explicit set bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 0b216898002e..2ca55b745920 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1429,9 +1429,9 @@ void SvTreeListBox::dispose() Control::dispose(); } -void SvTreeListBox::SetExtendedWinBits( ExtendedWinBits _nBits ) +void SvTreeListBox::SetNoAutoCurEntry( bool b ) { - pImpl->SetExtendedWindowBits( _nBits ); + pImpl->SetNoAutoCurEntry( b ); } void SvTreeListBox::SetModel( SvTreeList* pNewModel ) diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 26e9794f6648..cb1ad90dc93e 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -208,7 +208,7 @@ protected: Size aOutputSize; LBoxFlags nFlags; WinBits m_nStyle; - ExtendedWinBits nExtendedWinBits; + bool mbNoAutoCurEntry; // disable the behavior of automatically selecting a "CurEntry" upon painting the control SelectionEngine aSelEng; sal_uLong nVisibleCount; // Number of lines in control bool bInVScrollHdl : 1; @@ -244,7 +244,7 @@ public: void Clear(); void SetStyle( WinBits i_nWinStyle ); - void SetExtendedWindowBits( ExtendedWinBits _nBits ); + void SetNoAutoCurEntry( bool b ); void SetModel( SvTreeList* pModel ) { pTree = pModel;} void EntryInserted( SvTreeListEntry*); |