summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-20 15:50:47 +0200
committerNoel Grandin <noel@peralex.com>2015-04-22 10:28:41 +0200
commit8d3eefd3b2b6dad051247fbd4a8097bb154617e1 (patch)
treed3f5b29d0006197893da0b8b94ab455a230c9bfb
parent923de833be3131c36cd2b5952f3311f810aac01b (diff)
convert TREEFLAG_ constants to scoped enum
Change-Id: Ibf9eab757fbe94dbff3fd09472f3ca74fffd5094
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx4
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx22
-rw-r--r--include/svtools/treelistbox.hxx20
-rw-r--r--svtools/source/contnr/simptabl.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx2
-rw-r--r--svtools/source/contnr/svtabbx.cxx8
-rw-r--r--svtools/source/contnr/treelistbox.cxx64
-rw-r--r--svx/source/dialog/ctredlin.cxx2
-rw-r--r--svx/source/dialog/fontlb.cxx2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx2
10 files changed, 67 insertions, 61 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index b7af42d8ba09..c031bcf0283a 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -414,7 +414,7 @@ namespace accessibility
}
bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
- if( !(getListBox()->GetTreeFlags() & TREEFLAG_CHKBTN) )
+ if( !(getListBox()->GetTreeFlags() & SvTreeFlags::CHKBTN) )
{
if( bHasButtons )
nCase = 1;
@@ -445,7 +445,7 @@ namespace accessibility
//o is: return AccessibleRole::TREE;
bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
- if(!bHasButtons && (getListBox()->GetTreeFlags() & TREEFLAG_CHKBTN))
+ if(!bHasButtons && (getListBox()->GetTreeFlags() & SvTreeFlags::CHKBTN))
return AccessibleRole::LIST;
else
if (GetRoleType() == 0)
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 991b165af3d7..39e4cf2e7f53 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -393,7 +393,7 @@ namespace accessibility
}
bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
- if( !(getListBox()->GetTreeFlags() & TREEFLAG_CHKBTN) )
+ if( !(getListBox()->GetTreeFlags() & SvTreeFlags::CHKBTN) )
{
if( bHasButtons )
nCase = 1;
@@ -422,8 +422,8 @@ namespace accessibility
else if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_LIST)
return AccessibleRole::LIST_ITEM;
- sal_uInt16 treeFlag = pBox->GetTreeFlags();
- if(treeFlag & TREEFLAG_CHKBTN )
+ SvTreeFlags treeFlag = pBox->GetTreeFlags();
+ if(treeFlag & SvTreeFlags::CHKBTN )
{
SvTreeListEntry* pEntry = pBox->GetEntryFromPath( m_aEntryPath );
SvButtonState eState = pBox->GetCheckButtonState( pEntry );
@@ -757,9 +757,9 @@ namespace accessibility
// three actions supported
SvTreeListBox* pBox = getListBox();
- sal_uInt16 treeFlag = pBox->GetTreeFlags();
+ SvTreeFlags treeFlag = pBox->GetTreeFlags();
bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
- if( (treeFlag & TREEFLAG_CHKBTN) && !bHasButtons)
+ if( (treeFlag & SvTreeFlags::CHKBTN) && !bHasButtons)
{
sal_Int16 role = getAccessibleRole();
if ( role == AccessibleRole::CHECK_BOX )
@@ -781,8 +781,8 @@ namespace accessibility
checkActionIndex_Impl( nIndex );
EnsureIsAlive();
- sal_uInt16 treeFlag = getListBox()->GetTreeFlags();
- if( nIndex == 0 && (treeFlag & TREEFLAG_CHKBTN) )
+ SvTreeFlags treeFlag = getListBox()->GetTreeFlags();
+ if( nIndex == 0 && (treeFlag & SvTreeFlags::CHKBTN) )
{
if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
{
@@ -794,7 +794,7 @@ namespace accessibility
getListBox()->SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
}
}
- else if( (nIndex == 1 && (treeFlag & TREEFLAG_CHKBTN) ) || (nIndex == 0) )
+ else if( (nIndex == 1 && (treeFlag & SvTreeFlags::CHKBTN) ) || (nIndex == 0) )
{
SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
if ( pEntry )
@@ -823,8 +823,8 @@ namespace accessibility
// sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
SvButtonState state = getListBox()->GetCheckButtonState( pEntry );
- sal_uInt16 treeFlag = getListBox()->GetTreeFlags();
- if(nIndex == 0 && (treeFlag & TREEFLAG_CHKBTN))
+ SvTreeFlags treeFlag = getListBox()->GetTreeFlags();
+ if(nIndex == 0 && (treeFlag & SvTreeFlags::CHKBTN))
{
if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
{
@@ -838,7 +838,7 @@ namespace accessibility
//Sometimes, a List or Tree may have both checkbox and label at the same time
return OUString();
}
- }else if( (nIndex == 1 && (treeFlag & TREEFLAG_CHKBTN)) || nIndex == 0 )
+ }else if( (nIndex == 1 && (treeFlag & SvTreeFlags::CHKBTN)) || nIndex == 0 )
{
if( pEntry->HasChildren() || pEntry->HasChildrenOnDemand() )
return getListBox()->IsExpanded( pEntry ) ? \
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index be7b8b71c2dc..b687c2c99090 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -100,10 +100,18 @@ namespace o3tl
#define SV_ENTRYHEIGHTOFFS_PIXEL 2
-#define TREEFLAG_CHKBTN 0x0001
-#define TREEFLAG_USESEL 0x0002
-#define TREEFLAG_MANINS 0x0004
-#define TREEFLAG_RECALCTABS 0x0008
+enum class SvTreeFlags
+{
+ CHKBTN = 0x01,
+ USESEL = 0x02,
+ MANINS = 0x04,
+ RECALCTABS = 0x08,
+ FIXEDHEIGHT = 0x10,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvTreeFlags> : is_typed_flags<SvTreeFlags, 0x1f> {};
+}
#define TREEBOX_ALLITEM_ACCROLE_TYPE_LIST 0x01
#define TREEBOX_ALLITEM_ACCROLE_TYPE_TREE 0x02
@@ -261,7 +269,7 @@ protected:
SvTreeListEntry* pTargetEntry;
SvLBoxButtonData* pCheckButtonData;
std::vector<SvLBoxTab*> aTabs;
- sal_uInt16 nTreeFlags;
+ SvTreeFlags nTreeFlags;
sal_uInt16 nImpFlags;
// Move/CopySelection: Position of the current Entry in SelectionList
sal_uInt16 nCurEntrySelPos;
@@ -527,7 +535,7 @@ public:
void SetAllEntriesAccessibleRoleType( short n ) { nAllItemAccRoleType = n; }
short GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
- sal_uInt16 GetTreeFlags() const {return nTreeFlags;}
+ SvTreeFlags GetTreeFlags() const {return nTreeFlags;}
OUString headString;
OUString SearchEntryTextWithHeadTitle(SvTreeListEntry* pEntry);
diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index 511a70046bb4..36e0bb5479e6 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -435,7 +435,7 @@ SvLBoxItem* SvSimpleTable::GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nP
nPos++;
- if( nTreeFlags & TREEFLAG_CHKBTN ) nPos++;
+ if( nTreeFlags & SvTreeFlags::CHKBTN ) nPos++;
if( nPos < nCount )
{
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 0a26a91c5712..c1789f3beff7 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3257,7 +3257,7 @@ void SvImpLBox::SetUpdateMode( bool bMode )
bool SvImpLBox::SetMostRight( SvTreeListEntry* pEntry )
{
- if( pView->nTreeFlags & TREEFLAG_RECALCTABS )
+ if( pView->nTreeFlags & SvTreeFlags::RECALCTABS )
{
nFlags |= F_IGNORE_CHANGED_TABS;
pView->SetTabs();
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 691f8942fa14..67f18c210efa 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -141,7 +141,7 @@ void SvTabListBox::SetTabs(const long* pTabs, MapUnit eMapUnit)
pTabList[nIdx].SetPos( nNewTab );
pTabList[nIdx].nFlags=(SvLBoxTabFlags::ADJUST_LEFT| SvLBoxTabFlags::INV_ALWAYS);
}
- SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
+ SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS;
if( IsUpdateMode() )
Invalidate();
}
@@ -158,7 +158,7 @@ void SvTabListBox::SetTab( sal_uInt16 nTab,long nValue,MapUnit eMapUnit )
aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
nValue = aSize.Width();
pTabList[ nTab ].SetPos( nValue );
- SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
+ SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS;
if( IsUpdateMode() )
Invalidate();
}
@@ -477,14 +477,14 @@ void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
nFlags &= (~MYTABMASK);
nFlags |= static_cast<SvLBoxTabFlags>(eJustify);
pTab->nFlags = nFlags;
- SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
+ SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS;
if( IsUpdateMode() )
Invalidate();
}
long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
- if( SvTreeListBox::nTreeFlags & TREEFLAG_RECALCTABS )
+ if( SvTreeListBox::nTreeFlags & SvTreeFlags::RECALCTABS )
((SvTabListBox*)this)->SetTabs();
DBG_ASSERT(nTab<nTabCount,"GetTabPos:Invalid Tab");
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 7685334aca95..ba2e0170ccee 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1429,8 +1429,6 @@ Link SvTreeListBox::GetDragFinishedHdl() const
- SetSpaceBetweenEntries: offset is not taken into account in SetEntryHeight
*/
-#define TREEFLAG_FIXEDHEIGHT 0x0010
-
#define SV_LBOX_DEFAULT_INDENT_PIXEL 20
void SvTreeListBox::InitTreeView()
@@ -1449,7 +1447,7 @@ void SvTreeListBox::InitTreeView()
Link* pLink = new Link( LINK(this,SvTreeListBox, DefaultCompare) );
mpImpl->m_pLink = pLink;
- nTreeFlags = TREEFLAG_RECALCTABS;
+ nTreeFlags = SvTreeFlags::RECALCTABS;
nIndent = SV_LBOX_DEFAULT_INDENT_PIXEL;
nEntryHeightOffs = SV_ENTRYHEIGHTOFFS_PIXEL;
pImp = new SvImpLBox( this, GetModel(), GetStyle() );
@@ -1659,7 +1657,7 @@ void SvTreeListBox::SetTabs()
{
if( IsEditingActive() )
EndEditing( true );
- nTreeFlags &= (~TREEFLAG_RECALCTABS);
+ nTreeFlags &= (~SvTreeFlags::RECALCTABS);
nFocusWidth = -1;
const WinBits nStyle( GetStyle() );
bool bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
@@ -1671,7 +1669,7 @@ void SvTreeListBox::SetTabs()
// pCheckButtonData->Width() knows nothing about the native checkbox width,
// so we have mnCheckboxItemWidth which becomes valid when something is added.
long nCheckWidth = 0;
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
nCheckWidth = mnCheckboxItemWidth;
long nCheckWidthDIV2 = nCheckWidth / 2;
@@ -1681,7 +1679,7 @@ void SvTreeListBox::SetTabs()
ClearTabList();
int nCase = NO_BUTTONS;
- if( !(nTreeFlags & TREEFLAG_CHKBTN) )
+ if( !(nTreeFlags & SvTreeFlags::CHKBTN) )
{
if( bHasButtons )
nCase = NODE_BUTTONS;
@@ -1760,7 +1758,7 @@ void SvTreeListBox::InitEntry(SvTreeListEntry* pEntry,
SvLBoxString* pString;
SvLBoxContextBmp* pContextBmp;
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
{
SvLBoxButton* pButton= new SvLBoxButton( pEntry,eButtonKind,0,pCheckButtonData );
pEntry->AddItem( pButton );
@@ -1814,7 +1812,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry(
SvLBoxButtonKind eButtonKind
)
{
- nTreeFlags |= TREEFLAG_MANINS;
+ nTreeFlags |= SvTreeFlags::MANINS;
const Image& rDefExpBmp = pImp->GetDefaultEntryExpBmp( );
const Image& rDefColBmp = pImp->GetDefaultEntryColBmp( );
@@ -1835,7 +1833,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry(
aPrevInsertedExpBmp = rDefExpBmp;
aPrevInsertedColBmp = rDefColBmp;
- nTreeFlags &= (~TREEFLAG_MANINS);
+ nTreeFlags &= (~SvTreeFlags::MANINS);
return pEntry;
}
@@ -1845,7 +1843,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry( const OUString& rText,
SvTreeListEntry* pParent, bool bChildrenOnDemand, sal_uLong nPos, void* pUser,
SvLBoxButtonKind eButtonKind )
{
- nTreeFlags |= TREEFLAG_MANINS;
+ nTreeFlags |= SvTreeFlags::MANINS;
aCurInsertedExpBmp = aExpEntryBmp;
aCurInsertedColBmp = aCollEntryBmp;
@@ -1864,7 +1862,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry( const OUString& rText,
aPrevInsertedExpBmp = aExpEntryBmp;
aPrevInsertedColBmp = aCollEntryBmp;
- nTreeFlags &= (~TREEFLAG_MANINS);
+ nTreeFlags &= (~SvTreeFlags::MANINS);
return pEntry;
}
@@ -1925,7 +1923,7 @@ void SvTreeListBox::ImpEntryInserted( SvTreeListEntry* pEntry )
pParent->SetFlags( nFlags );
}
- if(!((nTreeFlags & TREEFLAG_MANINS) &&
+ if(!((nTreeFlags & SvTreeFlags::MANINS) &&
(aPrevInsertedExpBmp == aCurInsertedExpBmp) &&
(aPrevInsertedColBmp == aCurInsertedColBmp) ))
{
@@ -1933,18 +1931,18 @@ void SvTreeListBox::ImpEntryInserted( SvTreeListEntry* pEntry )
if( aSize.Width() > nContextBmpWidthMax )
{
nContextBmpWidthMax = (short)aSize.Width();
- nTreeFlags |= TREEFLAG_RECALCTABS;
+ nTreeFlags |= SvTreeFlags::RECALCTABS;
}
aSize = GetExpandedEntryBmp( pEntry ).GetSizePixel();
if( aSize.Width() > nContextBmpWidthMax )
{
nContextBmpWidthMax = (short)aSize.Width();
- nTreeFlags |= TREEFLAG_RECALCTABS;
+ nTreeFlags |= SvTreeFlags::RECALCTABS;
}
}
SetEntryHeight( (SvTreeListEntry*)pEntry );
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
{
SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if( pItem )
@@ -1953,7 +1951,7 @@ void SvTreeListBox::ImpEntryInserted( SvTreeListEntry* pEntry )
if( mnCheckboxItemWidth < nWidth )
{
mnCheckboxItemWidth = nWidth;
- nTreeFlags |= TREEFLAG_RECALCTABS;
+ nTreeFlags |= SvTreeFlags::RECALCTABS;
}
}
}
@@ -1963,7 +1961,7 @@ void SvTreeListBox::ImpEntryInserted( SvTreeListEntry* pEntry )
void SvTreeListBox::SetCheckButtonState( SvTreeListEntry* pEntry, SvButtonState eState)
{
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
{
SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if(!(pItem && pItem->CheckModification()))
@@ -1988,7 +1986,7 @@ void SvTreeListBox::SetCheckButtonState( SvTreeListEntry* pEntry, SvButtonState
void SvTreeListBox::SetCheckButtonInvisible( SvTreeListEntry* pEntry)
{
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
{
SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
pItem->SetStateInvisible();
@@ -1999,7 +1997,7 @@ void SvTreeListBox::SetCheckButtonInvisible( SvTreeListEntry* pEntry)
SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) const
{
SvButtonState eState = SV_BUTTON_UNCHECKED;
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
{
SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if(!pItem)
@@ -2094,11 +2092,11 @@ void SvTreeListBox::EnableCheckButton( SvLBoxButtonData* pData )
{
DBG_ASSERT(!GetEntryCount(),"EnableCheckButton: Entry count != 0");
if( !pData )
- nTreeFlags &= (~TREEFLAG_CHKBTN);
+ nTreeFlags &= (~SvTreeFlags::CHKBTN);
else
{
SetCheckButtonData( pData );
- nTreeFlags |= TREEFLAG_CHKBTN;
+ nTreeFlags |= SvTreeFlags::CHKBTN;
pData->SetLink( LINK(this, SvTreeListBox, CheckButtonClick));
}
@@ -2220,7 +2218,7 @@ void SvTreeListBox::ModelHasCleared()
SetDefaultExpandedEntryBmp( GetDefaultExpandedEntryBmp() );
SetDefaultCollapsedEntryBmp( GetDefaultCollapsedEntryBmp() );
- if( !(nTreeFlags & TREEFLAG_FIXEDHEIGHT ))
+ if( !(nTreeFlags & SvTreeFlags::FIXEDHEIGHT ))
nEntryHeight = 0;
AdjustEntryHeight( GetFont() );
AdjustEntryHeight( GetDefaultExpandedEntryBmp() );
@@ -2326,9 +2324,9 @@ void SvTreeListBox::SetEntryHeight( short nHeight, bool bAlways )
{
nEntryHeight = nHeight;
if( nEntryHeight )
- nTreeFlags |= TREEFLAG_FIXEDHEIGHT;
+ nTreeFlags |= SvTreeFlags::FIXEDHEIGHT;
else
- nTreeFlags &= ~TREEFLAG_FIXEDHEIGHT;
+ nTreeFlags &= ~SvTreeFlags::FIXEDHEIGHT;
Control::SetFont( GetFont() );
pImp->SetEntryHeight( nHeight );
}
@@ -2554,7 +2552,7 @@ void SvTreeListBox::AdjustEntryHeightAndRecalc( const vcl::Font& rFont )
void SvTreeListBox::Paint( const Rectangle& rRect )
{
Control::Paint( rRect );
- if( nTreeFlags & TREEFLAG_RECALCTABS )
+ if( nTreeFlags & SvTreeFlags::RECALCTABS )
SetTabs();
pImp->Paint( rRect );
//Add visual focus draw
@@ -2829,7 +2827,7 @@ void SvTreeListBox::ImplInitStyle()
const WinBits nWindowStyle = GetStyle();
- nTreeFlags |= TREEFLAG_RECALCTABS;
+ nTreeFlags |= SvTreeFlags::RECALCTABS;
if( nWindowStyle & WB_SORT )
{
GetModel()->SetSortMode( SortAscending );
@@ -2877,7 +2875,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, SvLBoxTabFl
pImp->UpdateContextBmpWidthMax( pEntry );
- if( nTreeFlags & TREEFLAG_RECALCTABS )
+ if( nTreeFlags & SvTreeFlags::RECALCTABS )
SetTabs();
short nTempEntryHeight = GetEntryHeight();
@@ -3003,7 +3001,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, SvLBoxTabFl
}
// draw background
- if( !(nTreeFlags & TREEFLAG_USESEL))
+ if( !(nTreeFlags & SvTreeFlags::USESEL))
{
// only draw the area that is used by the item
aRectSize.Width() = aSize.Width();
@@ -3035,7 +3033,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, SvLBoxTabFl
// A custom selection that starts at a tab position > 0, do not fill
// the background of the 0th item, else e.g. we might not be able to
// realize tab listboxes with lines.
- if( !(nCurTab==0 && (nTreeFlags & TREEFLAG_USESEL) && nFirstSelTab) )
+ if( !(nCurTab==0 && (nTreeFlags & SvTreeFlags::USESEL) && nFirstSelTab) )
{
SetFillColor( aWallpaper.GetColor() );
// this case may occur for smaller horizontal resizes
@@ -3203,7 +3201,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine )
nNextTabPos += 50;
}
- bool bUserSelection = ( nTreeFlags & TREEFLAG_USESEL ) != 0;
+ bool bUserSelection = bool( nTreeFlags & SvTreeFlags::USESEL );
if( !bUserSelection )
{
if( pTab && nCurTab < pEntry->ItemCount() )
@@ -3424,7 +3422,7 @@ void SvTreeListBox::AddTab(long nTabPos, SvLBoxTabFlags nFlags, void* pUserData
SvLBoxTab* pTab = new SvLBoxTab( nTabPos, nFlags );
pTab->SetUserData( pUserData );
aTabs.push_back( pTab );
- if( nTreeFlags & TREEFLAG_USESEL )
+ if( nTreeFlags & SvTreeFlags::USESEL )
{
sal_uInt16 nPos = aTabs.size() - 1;
if( nPos >= nFirstSelTab && nPos <= nLastSelTab )
@@ -3519,7 +3517,7 @@ void SvTreeListBox::SetHighlightRange( sal_uInt16 nStart, sal_uInt16 nEnd)
{
sal_uInt16 nTemp;
- nTreeFlags |= TREEFLAG_USESEL;
+ nTreeFlags |= SvTreeFlags::USESEL;
if( nStart > nEnd )
{
nTemp = nStart;
@@ -3527,7 +3525,7 @@ void SvTreeListBox::SetHighlightRange( sal_uInt16 nStart, sal_uInt16 nEnd)
nEnd = nTemp;
}
// select all tabs that lie within the area
- nTreeFlags |= TREEFLAG_RECALCTABS;
+ nTreeFlags |= SvTreeFlags::RECALCTABS;
nFirstSelTab = nStart;
nLastSelTab = nEnd;
pImp->RecalcFocusRect();
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 3cd2d2628c2b..5406ba14804d 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -334,7 +334,7 @@ SvTreeListEntry* SvxRedlinTable::CreateEntry() const
void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
const Image& rColl, const Image& rExp, SvLBoxButtonKind eButtonKind)
{
- if (nTreeFlags & TREEFLAG_CHKBTN)
+ if (nTreeFlags & SvTreeFlags::CHKBTN)
{
pEntry->AddItem(new SvLBoxButton(pEntry, eButtonKind, 0, pCheckButtonData));
}
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index 5ae4c21b651d..d36bc4291d44 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -136,7 +136,7 @@ void SvxFontListBox::InitEntry(
{
if( mbUseFont )
{
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
pEntry->AddItem( new SvLBoxButton( pEntry, eButtonKind, 0,
pCheckButtonData ) );
pEntry->AddItem( new SvLBoxContextBmp(pEntry, 0, rCollImg, rExpImg, true) );
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 9d8b6e68b5bd..bfb4240d74e4 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -318,7 +318,7 @@ SvLBoxItem* DictionaryList::getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16
{
sal_uInt16 nCount = pEntry->ItemCount();
nColumn++;
- if( nTreeFlags & TREEFLAG_CHKBTN )
+ if( nTreeFlags & SvTreeFlags::CHKBTN )
nColumn++;
if( nColumn < nCount )
pItem = pEntry->GetItem( nColumn );