diff options
author | Oromidayo Owolabi <owolabioromidayo16@gmail.com> | 2024-10-16 15:56:21 +0100 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2024-11-12 15:27:34 +0100 |
commit | 7a7ba9cbee91485a9254949d1594352b3629c070 (patch) | |
tree | cebad247722bd7467a9ef2cb57707784f1122604 /extensions/source | |
parent | 006541afcf9cf68425ad3eea466c5d9e129f3b63 (diff) |
tdf#145614 Convert #define to enum class
Converted #define to enum class
Change-Id: I16195a439643bcf0111c591a829272b5bf70179d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175027
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/abpilot/abspilot.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index fc135ec80c8f..fb2be7e8ab33 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -44,10 +44,7 @@ namespace abp #define STATE_MANUAL_FIELD_MAPPING 3 #define STATE_FINAL_CONFIRM 4 -#define PATH_COMPLETE 1 -#define PATH_NO_SETTINGS 2 -#define PATH_NO_FIELDS 3 -#define PATH_NO_SETTINGS_NO_FIELDS 4 + using namespace ::com::sun::star::uno; @@ -57,26 +54,26 @@ namespace abp ,m_aNewDataSource(_rxORB) ,m_eNewDataSourceType( AST_INVALID ) { - declarePath( PATH_COMPLETE, + declarePath(PathId::COMPLETE, {STATE_SELECT_ABTYPE, STATE_INVOKE_ADMIN_DIALOG, STATE_TABLE_SELECTION, STATE_MANUAL_FIELD_MAPPING, STATE_FINAL_CONFIRM} ); - declarePath( PATH_NO_SETTINGS, + declarePath(PathId::NO_SETTINGS, {STATE_SELECT_ABTYPE, STATE_TABLE_SELECTION, STATE_MANUAL_FIELD_MAPPING, STATE_FINAL_CONFIRM} ); - declarePath( PATH_NO_FIELDS, + declarePath(PathId::NO_FIELDS, {STATE_SELECT_ABTYPE, STATE_INVOKE_ADMIN_DIALOG, STATE_TABLE_SELECTION, STATE_FINAL_CONFIRM} ); - declarePath( PATH_NO_SETTINGS_NO_FIELDS, + declarePath(PathId::NO_SETTINGS_NO_FIELDS, {STATE_SELECT_ABTYPE, STATE_TABLE_SELECTION, STATE_FINAL_CONFIRM} @@ -422,19 +419,19 @@ namespace abp void OAddressBookSourcePilot::typeSelectionChanged( AddressSourceType _eType ) { - PathId nCurrentPathID( PATH_COMPLETE ); + PathId nCurrentPathID( PathId::COMPLETE ); bool bSettingsPage = needAdminInvokationPage( _eType ); bool bFieldsPage = needManualFieldMapping( _eType ); if ( !bSettingsPage ) if ( !bFieldsPage ) - nCurrentPathID = PATH_NO_SETTINGS_NO_FIELDS; + nCurrentPathID = PathId::NO_SETTINGS_NO_FIELDS; else - nCurrentPathID = PATH_NO_SETTINGS; + nCurrentPathID = PathId::NO_SETTINGS; else if ( !bFieldsPage ) - nCurrentPathID = PATH_NO_FIELDS; + nCurrentPathID = PathId::NO_FIELDS; else - nCurrentPathID = PATH_COMPLETE; + nCurrentPathID = PathId::COMPLETE; activatePath( nCurrentPathID, true ); m_aNewDataSource.disconnect(); |