summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx6
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx6
-rw-r--r--include/svtools/treelistbox.hxx14
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
5 files changed, 17 insertions, 13 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index c031bcf0283a..2c33734abd30 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -436,10 +436,10 @@ namespace accessibility
if(getListBox())
{
- short nType = getListBox()->GetAllEntriesAccessibleRoleType();
- if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_TREE)
+ SvTreeAccRoleType nType = getListBox()->GetAllEntriesAccessibleRoleType();
+ if( nType == SvTreeAccRoleType::TREE)
return AccessibleRole::TREE;
- else if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_LIST)
+ else if( nType == SvTreeAccRoleType::LIST)
return AccessibleRole::LIST;
}
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 39e4cf2e7f53..7f68e1116ed9 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -416,10 +416,10 @@ namespace accessibility
SvTreeListBox* pBox = getListBox();
if(pBox)
{
- short nType = pBox->GetAllEntriesAccessibleRoleType();
- if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_TREE)
+ SvTreeAccRoleType nType = pBox->GetAllEntriesAccessibleRoleType();
+ if( nType == SvTreeAccRoleType::TREE)
return AccessibleRole::TREE_ITEM;
- else if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_LIST)
+ else if( nType == SvTreeAccRoleType::LIST)
return AccessibleRole::LIST_ITEM;
SvTreeFlags treeFlag = pBox->GetTreeFlags();
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index b687c2c99090..f06c3c6b6e67 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -113,8 +113,12 @@ 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
+enum class SvTreeAccRoleType
+{
+ NONE = 0x00,
+ LIST = 0x01,
+ TREE = 0x02
+};
typedef sal_Int64 ExtendedWinBits;
@@ -245,7 +249,7 @@ class SVT_DLLPUBLIC SvTreeListBox
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
- short nAllItemAccRoleType;
+ SvTreeAccRoleType nAllItemAccRoleType;
sal_uInt16 nFirstSelTab;
sal_uInt16 nLastSelTab;
long mnCheckboxItemWidth;
@@ -532,8 +536,8 @@ public:
void EnableCellFocus();
// For overwriting accessible role for all entries - normally 0, so each entry can be different
- void SetAllEntriesAccessibleRoleType( short n ) { nAllItemAccRoleType = n; }
- short GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
+ void SetAllEntriesAccessibleRoleType( SvTreeAccRoleType n ) { nAllItemAccRoleType = n; }
+ SvTreeAccRoleType GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
SvTreeFlags GetTreeFlags() const {return nTreeFlags;}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index ba2e0170ccee..e08f751786af 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1441,7 +1441,7 @@ void SvTreeListBox::InitTreeView()
nFirstSelTab = 0;
nLastSelTab = 0;
nFocusWidth = -1;
- nAllItemAccRoleType = 0;
+ nAllItemAccRoleType = SvTreeAccRoleType::NONE;
mnCheckboxItemWidth = 0;
Link* pLink = new Link( LINK(this,SvTreeListBox, DefaultCompare) );
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 305dc1bcd868..a0b3ac501966 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -371,7 +371,7 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh )
m_pTree->SetSelectionMode( MULTIPLE_SELECTION );
m_pTree->SetStyle(m_pTree->GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL);
m_pTree->SetSpaceBetweenEntries(0);
- m_pTree->SetAllEntriesAccessibleRoleType(TREEBOX_ALLITEM_ACCROLE_TYPE_TREE);
+ m_pTree->SetAllEntriesAccessibleRoleType(SvTreeAccRoleType::TREE);
if(bWeb)
{