Kaydet (Commit) b71ff0db authored tarafından Noel Grandin's avatar Noel Grandin

convert ExtendedWinBits to a single bool flag

Change-Id: I2ff15a7f485ffdfb78eaabd529d19065faeb4c53
Reviewed-on: https://gerrit.libreoffice.org/41277Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst fb0bf569
...@@ -78,7 +78,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) ...@@ -78,7 +78,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
{ {
SetSpaceBetweenEntries(SPACEBETWEENENTRIES); SetSpaceBetweenEntries(SPACEBETWEENENTRIES);
SetSelectionMode( SelectionMode::NONE ); SetSelectionMode( SelectionMode::NONE );
SetExtendedWinBits( EWB_NO_AUTO_CURENTRY ); SetNoAutoCurEntry( true );
SetNodeDefaultImages( ); SetNodeDefaultImages( );
EnableEntryMnemonics(); EnableEntryMnemonics();
} }
......
...@@ -118,11 +118,6 @@ enum class SvTreeAccRoleType ...@@ -118,11 +118,6 @@ enum class SvTreeAccRoleType
TREE = 0x02 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}; enum class SvLBoxItemType {String, Button, ContextBmp};
class SvLBoxTab class SvLBoxTab
...@@ -595,7 +590,7 @@ protected: ...@@ -595,7 +590,7 @@ protected:
void AdjustEntryHeightAndRecalc(); void AdjustEntryHeightAndRecalc();
public: public:
void SetExtendedWinBits( ExtendedWinBits _nBits ); void SetNoAutoCurEntry( bool b );
void DisconnectFromModel(); void DisconnectFromModel();
......
...@@ -413,7 +413,7 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan ...@@ -413,7 +413,7 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
vcl::Region aClipRegion(GetClipRegionRect()); vcl::Region aClipRegion(GetClipRegionRect());
if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0)) if (!pCursor && !mbNoAutoCurEntry)
{ {
// do not select if multiselection or explicit set // do not select if multiselection or explicit set
bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION); bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
......
...@@ -55,7 +55,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS ...@@ -55,7 +55,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
, m_pStringSorter(nullptr) , m_pStringSorter(nullptr)
, aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL)) , aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL))
, aOutputSize(0, 0) , aOutputSize(0, 0)
, nExtendedWinBits(0) , mbNoAutoCurEntry(false)
, aSelEng(pLBView, nullptr) , aSelEng(pLBView, nullptr)
, nNextVerVisSize(0) , nNextVerVisSize(0)
{ {
...@@ -244,9 +244,9 @@ void SvImpLBox::SetStyle( WinBits i_nWinStyle ) ...@@ -244,9 +244,9 @@ void SvImpLBox::SetStyle( WinBits i_nWinStyle )
aSelEng.AddAlways( true ); aSelEng.AddAlways( true );
} }
void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits ) void SvImpLBox::SetNoAutoCurEntry( bool b )
{ {
nExtendedWinBits = _nBits; mbNoAutoCurEntry = b;
} }
// don't touch the model any more // don't touch the model any more
...@@ -924,7 +924,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle ...@@ -924,7 +924,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
rRenderContext.SetClipRegion(aClipRegion); rRenderContext.SetClipRegion(aClipRegion);
if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0)) if (!pCursor && !mbNoAutoCurEntry)
{ {
// do not select if multiselection or explicit set // do not select if multiselection or explicit set
bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION); bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
......
...@@ -1429,9 +1429,9 @@ void SvTreeListBox::dispose() ...@@ -1429,9 +1429,9 @@ void SvTreeListBox::dispose()
Control::dispose(); Control::dispose();
} }
void SvTreeListBox::SetExtendedWinBits( ExtendedWinBits _nBits ) void SvTreeListBox::SetNoAutoCurEntry( bool b )
{ {
pImpl->SetExtendedWindowBits( _nBits ); pImpl->SetNoAutoCurEntry( b );
} }
void SvTreeListBox::SetModel( SvTreeList* pNewModel ) void SvTreeListBox::SetModel( SvTreeList* pNewModel )
......
...@@ -208,7 +208,7 @@ protected: ...@@ -208,7 +208,7 @@ protected:
Size aOutputSize; Size aOutputSize;
LBoxFlags nFlags; LBoxFlags nFlags;
WinBits m_nStyle; WinBits m_nStyle;
ExtendedWinBits nExtendedWinBits; bool mbNoAutoCurEntry; // disable the behavior of automatically selecting a "CurEntry" upon painting the control
SelectionEngine aSelEng; SelectionEngine aSelEng;
sal_uLong nVisibleCount; // Number of lines in control sal_uLong nVisibleCount; // Number of lines in control
bool bInVScrollHdl : 1; bool bInVScrollHdl : 1;
...@@ -244,7 +244,7 @@ public: ...@@ -244,7 +244,7 @@ public:
void Clear(); void Clear();
void SetStyle( WinBits i_nWinStyle ); void SetStyle( WinBits i_nWinStyle );
void SetExtendedWindowBits( ExtendedWinBits _nBits ); void SetNoAutoCurEntry( bool b );
void SetModel( SvTreeList* pModel ) { pTree = pModel;} void SetModel( SvTreeList* pModel ) { pTree = pModel;}
void EntryInserted( SvTreeListEntry*); void EntryInserted( SvTreeListEntry*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment