summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--cui/source/options/fontsubs.cxx6
-rw-r--r--cui/source/options/optfltr.cxx6
-rw-r--r--cui/source/tabpages/autocdlg.cxx6
-rw-r--r--include/svtools/svtabbx.hxx8
-rw-r--r--include/svtools/treelistbox.hxx58
-rw-r--r--svtools/source/contnr/svimpbox.cxx20
-rw-r--r--svtools/source/contnr/svtabbx.cxx8
-rw-r--r--svtools/source/contnr/treelistbox.cxx52
-rw-r--r--svx/workben/msview/msview.cxx6
10 files changed, 92 insertions, 82 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index f81a931f74f7..117a4f47ee64 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2152,9 +2152,9 @@ void WatchTreeListBox::SetTabs()
{
SvLBoxTab* pTab = aTabs[i];
if( i == 2 )
- pTab->nFlags |= SV_LBOXTAB_EDITABLE;
+ pTab->nFlags |= SvLBoxTabFlags::EDITABLE;
else
- pTab->nFlags &= ~SV_LBOXTAB_EDITABLE;
+ pTab->nFlags &= ~SvLBoxTabFlags::EDITABLE;
}
}
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index a71e0bee28d8..955cac735640 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -415,15 +415,15 @@ void SvxFontSubstCheckListBox::Resize()
void SvxFontSubstCheckListBox::SetTabs()
{
SvSimpleTable::SetTabs();
- sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE;
+ SvLBoxTabFlags nAdjust = SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::ADJUST_NUMERIC|SvLBoxTabFlags::FORCE;
SvLBoxTab* pTab = aTabs[1];
pTab->nFlags &= ~nAdjust;
- pTab->nFlags |= SV_LBOXTAB_PUSHABLE|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_FORCE;
+ pTab->nFlags |= SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
pTab = aTabs[2];
pTab->nFlags &= ~nAdjust;
- pTab->nFlags |= SV_LBOXTAB_PUSHABLE|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_FORCE;
+ pTab->nFlags |= SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
}
void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt )
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index ab49d9dd8adc..f3f1df5d2013 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -341,19 +341,19 @@ SvTreeListEntry* OfaMSFilterTabPage2::GetEntry4Type( sal_IntPtr _nType ) const
void OfaMSFilterTabPage2::MSFltrSimpleTable::SetTabs()
{
SvSimpleTable::SetTabs();
- sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE;
+ SvLBoxTabFlags nAdjust = SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::ADJUST_NUMERIC|SvLBoxTabFlags::FORCE;
if( aTabs.size() > 1 )
{
SvLBoxTab* pTab = aTabs[1];
pTab->nFlags &= ~nAdjust;
- pTab->nFlags |= SV_LBOXTAB_PUSHABLE|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_FORCE;
+ pTab->nFlags |= SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
}
if( aTabs.size() > 2 )
{
SvLBoxTab* pTab = aTabs[2];
pTab->nFlags &= ~nAdjust;
- pTab->nFlags |= SV_LBOXTAB_PUSHABLE|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_FORCE;
+ pTab->nFlags |= SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
}
}
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 09f5808724b3..6a7d69015c1f 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -727,19 +727,19 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl)
void OfaACorrCheckListBox::SetTabs()
{
SvSimpleTable::SetTabs();
- sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE;
+ SvLBoxTabFlags nAdjust = SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::ADJUST_NUMERIC|SvLBoxTabFlags::FORCE;
if( aTabs.size() > 1 )
{
SvLBoxTab* pTab = aTabs[1];
pTab->nFlags &= ~nAdjust;
- pTab->nFlags |= SV_LBOXTAB_PUSHABLE|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_FORCE;
+ pTab->nFlags |= SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
}
if( aTabs.size() > 2 )
{
SvLBoxTab* pTab = aTabs[2];
pTab->nFlags &= ~nAdjust;
- pTab->nFlags |= SV_LBOXTAB_PUSHABLE|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_FORCE;
+ pTab->nFlags |= SvLBoxTabFlags::PUSHABLE|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE;
}
}
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 92c04fc489da..dcded33f9c90 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -27,10 +27,10 @@
enum SvTabJustify
{
- AdjustRight = SV_LBOXTAB_ADJUST_RIGHT,
- AdjustLeft = SV_LBOXTAB_ADJUST_LEFT,
- AdjustCenter = SV_LBOXTAB_ADJUST_CENTER,
- AdjustNumeric = SV_LBOXTAB_ADJUST_NUMERIC
+ AdjustRight = static_cast<int>(SvLBoxTabFlags::ADJUST_RIGHT),
+ AdjustLeft = static_cast<int>(SvLBoxTabFlags::ADJUST_LEFT),
+ AdjustCenter = static_cast<int>(SvLBoxTabFlags::ADJUST_CENTER),
+ AdjustNumeric = static_cast<int>(SvLBoxTabFlags::ADJUST_NUMERIC)
};
struct TabListBoxEventData
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 0af36c9584a8..be7b8b71c2dc 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -38,6 +38,7 @@
#include <svtools/treelist.hxx>
#include <svtools/transfer.hxx>
#include <vcl/idle.hxx>
+#include <o3tl/typed_flags_set.hxx>
class Application;
class SvTreeListBox;
@@ -70,21 +71,30 @@ enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE
// *************************** Tabulators ******************************
// *********************************************************************
-#define SV_LBOXTAB_DYNAMIC 0x0001 // Item's output column changes according to the Child Depth
-#define SV_LBOXTAB_ADJUST_RIGHT 0x0002 // Item's right margin at the tabulator
-#define SV_LBOXTAB_ADJUST_LEFT 0x0004 // Left margin
-#define SV_LBOXTAB_ADJUST_CENTER 0x0008 // Center the item at the tabulator
-#define SV_LBOXTAB_ADJUST_NUMERIC 0x0010 // Decimal point at the tabulator (strings)
-
-#define SV_LBOXTAB_SHOW_SELECTION 0x0040 // Visualize selection state
+enum class SvLBoxTabFlags
+{
+ NONE = 0x0000,
+ DYNAMIC = 0x0001, // Item's output column changes according to the Child Depth
+ ADJUST_RIGHT = 0x0002, // Item's right margin at the tabulator
+ ADJUST_LEFT = 0x0004, // Left margin
+ ADJUST_CENTER = 0x0008, // Center the item at the tabulator
+ ADJUST_NUMERIC = 0x0010, // Decimal point at the tabulator (strings)
+
+ SHOW_SELECTION = 0x0040, // Visualize selection state
// Item needs to be able to return the surrounding polygon (D'n'D cursor)
-#define SV_LBOXTAB_EDITABLE 0x0100 // Item editable at the tabulator
-#define SV_LBOXTAB_PUSHABLE 0x0200 // Item acts like a Button
-#define SV_LBOXTAB_INV_ALWAYS 0x0400 // Always delete the background
-#define SV_LBOXTAB_FORCE 0x0800 // Switch off the default calculation of the first tabulator
- // (on which Abo Tabpage/Extras/Option/Customize, etc. rely on)
- // The first tab's position corresponds precisely to the Flags set
- // and column widths
+ EDITABLE = 0x0100, // Item editable at the tabulator
+ PUSHABLE = 0x0200, // Item acts like a Button
+ INV_ALWAYS = 0x0400, // Always delete the background
+ FORCE = 0x0800, // Switch off the default calculation of the first tabulator
+ // (on which Abo Tabpage/Extras/Option/Customize, etc. rely on)
+ // The first tab's position corresponds precisely to the Flags set
+ // and column widths
+ ALL = 0x0f5f,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvLBoxTabFlags> : is_typed_flags<SvLBoxTabFlags, 0x0f5f> {};
+}
#define SV_TAB_BORDER 8
@@ -115,20 +125,20 @@ class SvLBoxTab
void* pUserData;
public:
SvLBoxTab();
- SvLBoxTab( long nPos, sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT );
+ SvLBoxTab( long nPos, SvLBoxTabFlags nFlags = SvLBoxTabFlags::ADJUST_LEFT );
SvLBoxTab( const SvLBoxTab& );
~SvLBoxTab();
- sal_uInt16 nFlags;
+ SvLBoxTabFlags nFlags;
void SetUserData( void* pPtr ) { pUserData = pPtr; }
void* GetUserData() const { return pUserData; }
- bool IsDynamic() const { return ((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
+ bool IsDynamic() const { return bool(nFlags & SvLBoxTabFlags::DYNAMIC); }
void SetPos( long nNewPos) { nPos = nNewPos; }
long GetPos() const { return nPos; }
long CalcOffset( long nItemLength, long nTabWidth );
- bool IsEditable() const { return ((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
- bool IsPushable() const { return ((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
+ bool IsEditable() const { return bool(nFlags & SvLBoxTabFlags::EDITABLE); }
+ bool IsPushable() const { return bool(nFlags & SvLBoxTabFlags::PUSHABLE); }
};
// *********************************************************************
@@ -540,7 +550,7 @@ protected:
SVT_DLLPRIVATE void ImpEntryInserted( SvTreeListEntry* pEntry );
SVT_DLLPRIVATE long PaintEntry1( SvTreeListEntry*, long nLine,
- sal_uInt16 nTabFlagMask=0xffff,
+ SvLBoxTabFlags nTabFlagMask = SvLBoxTabFlags::ALL,
bool bHasClipRegion=false );
SVT_DLLPRIVATE void InitTreeView();
@@ -558,13 +568,13 @@ protected:
// Is called automatically when inserting/changing Bitmaps, changing the Model etc.
virtual void SetTabs();
void SetTabs_Impl();
- void AddTab( long nPos,sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT,
+ void AddTab( long nPos, SvLBoxTabFlags nFlags=SvLBoxTabFlags::ADJUST_LEFT,
void* pUserData = 0 );
sal_uInt16 TabCount() const { return aTabs.size(); }
SvLBoxTab* GetFirstDynamicTab() const;
SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos ) const;
- SvLBoxTab* GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos );
- SvLBoxTab* GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos );
+ SvLBoxTab* GetFirstTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rTabPos );
+ SvLBoxTab* GetLastTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rTabPos );
SvLBoxTab* GetTab( SvTreeListEntry*, SvLBoxItem* ) const;
void ClearTabList();
@@ -718,7 +728,7 @@ public:
void PaintEntry( SvTreeListEntry* );
long PaintEntry( SvTreeListEntry*, long nLine,
- sal_uInt16 nTabFlagMask=0xffff );
+ SvLBoxTabFlags nTabFlagMask=SvLBoxTabFlags::ALL );
virtual Rectangle GetFocusRect( SvTreeListEntry*, long nLine );
// Respects indentation
virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 39eb1dc3ac88..0a26a91c5712 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -943,7 +943,7 @@ void SvImpLBox::Paint( const Rectangle& rRect )
for( sal_uInt16 n=0; n< nCount && pEntry; n++ )
{
/*long nMaxRight=*/
- pView->PaintEntry1( pEntry, nY, 0xffff, true );
+ pView->PaintEntry1( pEntry, nY, SvLBoxTabFlags::ALL, true );
nY += nEntryHeight;
pEntry = pView->NextVisible(pEntry);
}
@@ -1639,7 +1639,7 @@ void SvImpLBox::EntrySelected( SvTreeListEntry* pEntry, bool bSelect )
if( IsLineVisible( nY ) )
{
ShowCursor( false );
- pView->PaintEntry1( pEntry, nY, 0xffff ); // because of ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
+ pView->PaintEntry1( pEntry, nY, SvLBoxTabFlags::ALL ); // because of ItemsetBrowser SvLBoxTabFlags::SHOW_SELECTION );
ShowCursor( true );
}
}
@@ -1907,8 +1907,8 @@ bool SvImpLBox::ButtonDownCheckCtrl(
pView->CaptureMouse();
pActiveButton->SetStateHilighted( true );
pView->PaintEntry1( pActiveEntry, nY,
- SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
- SV_LBOXTAB_ADJUST_RIGHT );
+ SvLBoxTabFlags::PUSHABLE | SvLBoxTabFlags::ADJUST_CENTER |
+ SvLBoxTabFlags::ADJUST_RIGHT );
return true;
}
else
@@ -1930,8 +1930,8 @@ bool SvImpLBox::MouseMoveCheckCtrl(const MouseEvent& rMEvt, SvTreeListEntry* pEn
pActiveButton->SetStateHilighted(true );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY,
- SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
- SV_LBOXTAB_ADJUST_RIGHT );
+ SvLBoxTabFlags::PUSHABLE | SvLBoxTabFlags::ADJUST_CENTER |
+ SvLBoxTabFlags::ADJUST_RIGHT );
}
}
else
@@ -1940,7 +1940,7 @@ bool SvImpLBox::MouseMoveCheckCtrl(const MouseEvent& rMEvt, SvTreeListEntry* pEn
{
pActiveButton->SetStateHilighted(false );
nY = GetEntryLine( pActiveEntry );
- pView->PaintEntry1( pActiveEntry, nY, SV_LBOXTAB_PUSHABLE );
+ pView->PaintEntry1( pActiveEntry, nY, SvLBoxTabFlags::PUSHABLE );
}
}
return true;
@@ -1961,8 +1961,8 @@ bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
pView->GetItem( pActiveEntry, nMouseX ) == pActiveButton )
pActiveButton->ClickHdl( pView, pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY,
- SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
- SV_LBOXTAB_ADJUST_RIGHT );
+ SvLBoxTabFlags::PUSHABLE | SvLBoxTabFlags::ADJUST_CENTER |
+ SvLBoxTabFlags::ADJUST_RIGHT );
if( pCursor == pActiveEntry )
ShowCursor( true );
pActiveButton = 0;
@@ -2872,7 +2872,7 @@ void SvImpLBox::SelAllDestrAnch(
{
long nY = GetEntryLine( pEntry );
if( IsLineVisible( nY ) )
- pView->PaintEntry1( pEntry, nY, 0xffff ); // because of ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
+ pView->PaintEntry1( pEntry, nY ); // because of ItemsetBrowser SvLBoxTabFlags::SHOW_SELECTION );
}
}
pEntry = pTree->Next( pEntry );
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index b078a9c559a2..691f8942fa14 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
#define MYTABMASK \
- ( SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC )
+ SvLBoxTabFlags( SvLBoxTabFlags::ADJUST_RIGHT | SvLBoxTabFlags::ADJUST_LEFT | SvLBoxTabFlags::ADJUST_CENTER | SvLBoxTabFlags::ADJUST_NUMERIC )
// SvTreeListBox callback
@@ -139,7 +139,7 @@ void SvTabListBox::SetTabs(const long* pTabs, MapUnit eMapUnit)
aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
long nNewTab = aSize.Width();
pTabList[nIdx].SetPos( nNewTab );
- pTabList[nIdx].nFlags=(SV_LBOXTAB_ADJUST_LEFT| SV_LBOXTAB_INV_ALWAYS);
+ pTabList[nIdx].nFlags=(SvLBoxTabFlags::ADJUST_LEFT| SvLBoxTabFlags::INV_ALWAYS);
}
SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
if( IsUpdateMode() )
@@ -473,9 +473,9 @@ void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
if( nTab >= nTabCount )
return;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- sal_uInt16 nFlags = pTab->nFlags;
+ SvLBoxTabFlags nFlags = pTab->nFlags;
nFlags &= (~MYTABMASK);
- nFlags |= (sal_uInt16)eJustify;
+ nFlags |= static_cast<SvLBoxTabFlags>(eJustify);
pTab->nFlags = nFlags;
SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
if( IsUpdateMode() )
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index b30be935ffb1..7685334aca95 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -273,10 +273,10 @@ SvLBoxTab::SvLBoxTab()
{
nPos = 0;
pUserData = 0;
- nFlags = 0;
+ nFlags = SvLBoxTabFlags::NONE;
}
-SvLBoxTab::SvLBoxTab( long nPosition, sal_uInt16 nTabFlags )
+SvLBoxTab::SvLBoxTab( long nPosition, SvLBoxTabFlags nTabFlags )
{
nPos = nPosition;
pUserData = 0;
@@ -298,15 +298,15 @@ SvLBoxTab::~SvLBoxTab()
long SvLBoxTab::CalcOffset( long nItemWidth, long nTabWidth )
{
long nOffset = 0;
- if ( nFlags & SV_LBOXTAB_ADJUST_RIGHT )
+ if ( nFlags & SvLBoxTabFlags::ADJUST_RIGHT )
{
nOffset = nTabWidth - nItemWidth;
if( nOffset < 0 )
nOffset = 0;
}
- else if ( nFlags & SV_LBOXTAB_ADJUST_CENTER )
+ else if ( nFlags & SvLBoxTabFlags::ADJUST_CENTER )
{
- if( nFlags & SV_LBOXTAB_FORCE )
+ if( nFlags & SvLBoxTabFlags::FORCE )
{
// correct implementation of centering
nOffset = ( nTabWidth - nItemWidth ) / 2;
@@ -1641,16 +1641,16 @@ void SvTreeListBox::Resize()
#define NODE_AND_CHECK_BUTTONS 2
#define CHECK_BUTTONS 3
-#define TABFLAGS_TEXT (SV_LBOXTAB_DYNAMIC | \
- SV_LBOXTAB_ADJUST_LEFT | \
- SV_LBOXTAB_EDITABLE | \
- SV_LBOXTAB_SHOW_SELECTION)
+#define TABFLAGS_TEXT (SvLBoxTabFlags::DYNAMIC | \
+ SvLBoxTabFlags::ADJUST_LEFT | \
+ SvLBoxTabFlags::EDITABLE | \
+ SvLBoxTabFlags::SHOW_SELECTION)
-#define TABFLAGS_CONTEXTBMP (SV_LBOXTAB_DYNAMIC | SV_LBOXTAB_ADJUST_CENTER)
+#define TABFLAGS_CONTEXTBMP (SvLBoxTabFlags::DYNAMIC | SvLBoxTabFlags::ADJUST_CENTER)
-#define TABFLAGS_CHECKBTN (SV_LBOXTAB_DYNAMIC | \
- SV_LBOXTAB_ADJUST_CENTER | \
- SV_LBOXTAB_PUSHABLE)
+#define TABFLAGS_CHECKBTN (SvLBoxTabFlags::DYNAMIC | \
+ SvLBoxTabFlags::ADJUST_CENTER | \
+ SvLBoxTabFlags::PUSHABLE)
#define TAB_STARTPOS 2
@@ -2861,12 +2861,12 @@ void SvTreeListBox::InvalidateEntry( SvTreeListEntry* pEntry )
}
}
-long SvTreeListBox::PaintEntry(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nTabFlags)
+long SvTreeListBox::PaintEntry(SvTreeListEntry* pEntry, long nLine, SvLBoxTabFlags nTabFlags)
{
return PaintEntry1(pEntry,nLine,nTabFlags);
}
-long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nTabFlags,
+long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, SvLBoxTabFlags nTabFlags,
bool bHasClipRegion )
{
@@ -2930,7 +2930,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT
SvLBoxTab* pNextTab = nNextTab < nTabCount ? aTabs[nNextTab] : 0;
SvLBoxItem* pItem = nCurItem < nItemCount ? pEntry->GetItem(nCurItem) : 0;
- sal_uInt16 nFlags = pTab->nFlags;
+ SvLBoxTabFlags nFlags = pTab->nFlags;
Size aSize( SvLBoxItem::GetSize( pViewDataEntry, nCurItem ));
long nTabPos = GetTabPos( pEntry, pTab );
@@ -2945,7 +2945,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT
}
long nX;
- if( pTab->nFlags & SV_LBOXTAB_ADJUST_RIGHT )
+ if( pTab->nFlags & SvLBoxTabFlags::ADJUST_RIGHT )
// avoid cutting the right edge off the tab separation
nX = nTabPos + pTab->CalcOffset(aSize.Width(), (nNextTabPos-SV_TAB_BORDER-1) -nTabPos);
else
@@ -2965,7 +2965,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT
Wallpaper aWallpaper = GetBackground();
- int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
+ bool bSelTab = bool(nFlags & SvLBoxTabFlags::SHOW_SELECTION);
sal_uInt16 nItemType = pItem->GetType();
if (pViewDataEntry->IsHighlighted() && bSelTab && !pViewDataEntry->IsCursored())
@@ -3186,7 +3186,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine )
nRealWidth -= GetMapMode().GetOrigin().X();
sal_uInt16 nCurTab;
- SvLBoxTab* pTab = GetFirstTab( SV_LBOXTAB_SHOW_SELECTION, nCurTab );
+ SvLBoxTab* pTab = GetFirstTab( SvLBoxTabFlags::SHOW_SELECTION, nCurTab );
long nTabPos = 0;
if( pTab )
nTabPos = GetTabPos( pEntry, pTab );
@@ -3231,7 +3231,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine )
SvLBoxTab* pLastTab = NULL; // default to select whole width
sal_uInt16 nLastTab;
- GetLastTab(SV_LBOXTAB_SHOW_SELECTION,nLastTab);
+ GetLastTab(SvLBoxTabFlags::SHOW_SELECTION,nLastTab);
nLastTab++;
if( nLastTab < aTabs.size() ) // is there another one?
pLastTab = aTabs[ nLastTab ];
@@ -3418,7 +3418,7 @@ SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX )
return GetItem_Impl( pEntry, nX, &pDummyTab, 0 );
}
-void SvTreeListBox::AddTab(long nTabPos,sal_uInt16 nFlags,void* pUserData )
+void SvTreeListBox::AddTab(long nTabPos, SvLBoxTabFlags nFlags, void* pUserData )
{
nFocusWidth = -1;
SvLBoxTab* pTab = new SvLBoxTab( nTabPos, nFlags );
@@ -3428,11 +3428,11 @@ void SvTreeListBox::AddTab(long nTabPos,sal_uInt16 nFlags,void* pUserData )
{
sal_uInt16 nPos = aTabs.size() - 1;
if( nPos >= nFirstSelTab && nPos <= nLastSelTab )
- pTab->nFlags |= SV_LBOXTAB_SHOW_SELECTION;
+ pTab->nFlags |= SvLBoxTabFlags::SHOW_SELECTION;
else
// string items usually have to be selected -- turn this off
// explicitly
- pTab->nFlags &= ~SV_LBOXTAB_SHOW_SELECTION;
+ pTab->nFlags &= ~SvLBoxTabFlags::SHOW_SELECTION;
}
}
@@ -3445,7 +3445,7 @@ SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( sal_uInt16& rPos ) const
while( nCurTab < nTabCount )
{
SvLBoxTab* pTab = aTabs[nCurTab];
- if( pTab->nFlags & SV_LBOXTAB_DYNAMIC )
+ if( pTab->nFlags & SvLBoxTabFlags::DYNAMIC )
{
rPos = nCurTab;
return pTab;
@@ -3556,7 +3556,7 @@ void SvTreeListBox::RemoveParentKeepChildren( SvTreeListEntry* pParent )
pModel->Remove( pParent );
}
-SvLBoxTab* SvTreeListBox::GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rPos )
+SvLBoxTab* SvTreeListBox::GetFirstTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rPos )
{
sal_uInt16 nTabCount = aTabs.size();
for( sal_uInt16 nPos = 0; nPos < nTabCount; nPos++ )
@@ -3572,7 +3572,7 @@ SvLBoxTab* SvTreeListBox::GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rPos )
return 0;
}
-SvLBoxTab* SvTreeListBox::GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos )
+SvLBoxTab* SvTreeListBox::GetLastTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rTabPos )
{
sal_uInt16 nPos = (sal_uInt16)aTabs.size();
while( nPos )
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index 9a05f388a0e0..89bb27ef5e1c 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -575,11 +575,11 @@ void AtomContainerTreeListBox::SetTabs()
long nContextWidthDIV2 = nNodeWidthPixel >> 1;
long nStartPos = 2 + ( nIndent + nContextWidthDIV2 );
- AddTab( nStartPos, SV_LBOXTAB_DYNAMIC | SV_LBOXTAB_ADJUST_CENTER );
+ AddTab( nStartPos, SvLBoxTabFlags::DYNAMIC | SvLBoxTabFlags::ADJUST_CENTER );
nStartPos += nNodeWidthPixel + 5;
- AddTab( nStartPos, SV_LBOXTAB_DYNAMIC | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_SHOW_SELECTION );
+ AddTab( nStartPos, SvLBoxTabFlags::DYNAMIC | SvLBoxTabFlags::ADJUST_CENTER | SvLBoxTabFlags::SHOW_SELECTION );
nStartPos += nContextWidthDIV2 + 5;
- AddTab( nStartPos, SV_LBOXTAB_DYNAMIC|SV_LBOXTAB_ADJUST_LEFT | SV_LBOXTAB_SHOW_SELECTION );
+ AddTab( nStartPos, SvLBoxTabFlags::DYNAMIC|SvLBoxTabFlags::ADJUST_LEFT | SvLBoxTabFlags::SHOW_SELECTION );
}
void AtomContainerTreeListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& aStr,