diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-05 13:18:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-06 09:01:29 +0200 |
commit | ba121a3269d17f87c6d09b9e46aaaf921af40ef6 (patch) | |
tree | 2e14725bf0d3d47c8286a1a488e6356fa410fa93 /include/unotools | |
parent | bfcb2a1a75ae0ff780bff0747ea90c1e79a56fc3 (diff) |
convert USER_OPT constants to scoped enum
Change-Id: I85a1c9f89ac79e0e54fcd8dfd1908325fae9a8ac
Diffstat (limited to 'include/unotools')
-rw-r--r-- | include/unotools/useroptions.hxx | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/include/unotools/useroptions.hxx b/include/unotools/useroptions.hxx index e518d9f2c0d9..0b3db72d4f31 100644 --- a/include/unotools/useroptions.hxx +++ b/include/unotools/useroptions.hxx @@ -26,24 +26,27 @@ #include <memory> // define ---------------------------------------------------------------- - -#define USER_OPT_CITY ((sal_uInt16)0) -#define USER_OPT_COMPANY ((sal_uInt16)1) -#define USER_OPT_COUNTRY ((sal_uInt16)2) -#define USER_OPT_EMAIL ((sal_uInt16)3) -#define USER_OPT_FAX ((sal_uInt16)4) -#define USER_OPT_FIRSTNAME ((sal_uInt16)5) -#define USER_OPT_LASTNAME ((sal_uInt16)6) -#define USER_OPT_POSITION ((sal_uInt16)7) -#define USER_OPT_STATE ((sal_uInt16)8) -#define USER_OPT_STREET ((sal_uInt16)9) -#define USER_OPT_TELEPHONEHOME ((sal_uInt16)10) -#define USER_OPT_TELEPHONEWORK ((sal_uInt16)11) -#define USER_OPT_TITLE ((sal_uInt16)12) -#define USER_OPT_ID ((sal_uInt16)13) -#define USER_OPT_ZIP ((sal_uInt16)14) -#define USER_OPT_FATHERSNAME ((sal_uInt16)15) -#define USER_OPT_APARTMENT ((sal_uInt16)16) +enum class UserOptToken +{ + City = 0, + Company = 1, + Country = 2, + Email = 3, + Fax = 4, + FirstName = 5, + LastName = 6, + Position = 7, + State = 8, + Street = 9, + TelephoneHome = 10, + TelephoneWork = 11, + Title = 12, + ID = 13, + Zip = 14, + FathersName = 15, + Apartment = 16, + LAST = Apartment, +}; // class SvtUserOptions -------------------------------------------------- @@ -74,9 +77,9 @@ public: OUString GetFullName () const; - bool IsTokenReadonly (sal_uInt16 nToken) const; - OUString GetToken (sal_uInt16 nToken) const; - void SetToken (sal_uInt16 nToken, OUString const& rNewToken); + bool IsTokenReadonly (UserOptToken nToken) const; + OUString GetToken (UserOptToken nToken) const; + void SetToken (UserOptToken nToken, OUString const& rNewToken); private: class Impl; |