From b8ce52aab9459773544f1696cfe6b7b6f171a389 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 12 Mar 2015 08:50:16 +0200 Subject: convert AccessibleStates to enum class Change-Id: Ie0d8c16bb768201e8646c3136d7ceca67e506a3c --- sw/inc/accmap.hxx | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'sw/inc') diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 29dab399a691..d831d95d505c 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -32,8 +32,9 @@ #include "fesh.hxx" #include #include -class SwAccessibleParagraph; +#include +class SwAccessibleParagraph; class SwViewShell; class Rectangle; class SwFrm; @@ -45,9 +46,7 @@ class SwAccessibleEventList_Impl; class SwAccessibleEventMap_Impl; class SwShapeList_Impl; class SdrObject; -namespace accessibility { - class AccessibleShape; -} +namespace accessibility { class AccessibleShape; } class SwAccessibleShapeMap_Impl; struct SwAccessibleEvent_Impl; class SwAccessibleSelectedParas_Impl; @@ -57,22 +56,23 @@ class SwAccPreviewData; struct PreviewPage; namespace vcl { class Window; } -// real states for events -#define ACC_STATE_EDITABLE 0x01 -#define ACC_STATE_OPAQUE 0x02 - -// pseudo states for events -#define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200 -#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100 -#define ACC_STATE_CARET 0x80 -#define ACC_STATE_RELATION_FROM 0x40 -#define ACC_STATE_RELATION_TO 0x20 - -#define ACC_STATE_RELATION_MASK 0x60 - -#define ACC_STATE_MASK 0x1F - -typedef sal_uInt16 tAccessibleStates; +enum class AccessibleStates +{ + NONE = 0x0000, + // real states for events + EDITABLE = 0x0001, + OPAQUE = 0x0002, + // pseudo states for events + TEXT_ATTRIBUTE_CHANGED = 0x0200, + TEXT_SELECTION_CHANGED = 0x0100, + CARET = 0x0080, + RELATION_FROM = 0x0040, + RELATION_TO = 0x0020, +}; +namespace o3tl +{ + template<> struct typed_flags : is_typed_flags {}; +} class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, public ::accessibility::IAccessibleParent @@ -212,7 +212,7 @@ public: // Invalidate state of whole tree. If an action is open, this call // is processed when the last action ends. - void InvalidateStates( tAccessibleStates _nStates, + void InvalidateStates( AccessibleStates _nStates, const SwFrm* _pFrm = 0 ); void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow ); -- cgit