summaryrefslogtreecommitdiff
path: root/include/sfx2/signaturestate.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-13 13:21:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-04-15 11:35:03 +0000
commitd208cf834f4f191558ae27ea7a8c7a31b8e440a6 (patch)
tree4b318cdb42b9888197247089cb0a7349f122dd99 /include/sfx2/signaturestate.hxx
parent9782438a5887c40246016c1f2b5fe12401d2c68d (diff)
convert SIGNATURESTATE_ constants to scoped enum
Change-Id: I715e39599464a199a8b78ec274bfe47b90fc4bb7 Reviewed-on: https://gerrit.libreoffice.org/15301 Tested-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/sfx2/signaturestate.hxx')
-rw-r--r--include/sfx2/signaturestate.hxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/include/sfx2/signaturestate.hxx b/include/sfx2/signaturestate.hxx
index 0e795d5d5255..b2bccf3469c0 100644
--- a/include/sfx2/signaturestate.hxx
+++ b/include/sfx2/signaturestate.hxx
@@ -21,17 +21,20 @@
#define INCLUDED_SFX2_SIGNATURESTATE_HXX
// xmlsec05, check with SFX team
-#define SIGNATURESTATE_UNKNOWN (sal_Int16)(-1)
-#define SIGNATURESTATE_NOSIGNATURES (sal_Int16)0
-#define SIGNATURESTATE_SIGNATURES_OK (sal_Int16)1
-#define SIGNATURESTATE_SIGNATURES_BROKEN (sal_Int16)2
-// State was SIGNATURES_OK, but doc is modified now
-#define SIGNATURESTATE_SIGNATURES_INVALID (sal_Int16)3
-// signature is OK, but certificate could not be validated
-#define SIGNATURESTATE_SIGNATURES_NOTVALIDATED (sal_Int16)4
-//signatur and certificate are ok,but not al files are signed, as was the case in
-//OOo 2.x - OOo 3.1.1. This state is only used together with document signatures.
-#define SIGNATURESTATE_SIGNATURES_PARTIAL_OK (sal_Int16)5
+enum class SignatureState
+{
+ UNKNOWN = 0xffff, // used to be -1 when this was a sal_uInt16
+ NOSIGNATURES = 0,
+ OK = 1,
+ BROKEN = 2,
+ // State was SignatureState::OK, but doc is modified now
+ INVALID = 3,
+ // signature is OK, but certificate could not be validated
+ NOTVALIDATED = 4,
+ //signatur and certificate are ok,but not al files are signed, as was the case in
+ //OOo 2.x - OOo 3.1.1. This state is only used together with document signatures.
+ PARTIAL_OK = 5
+};
#endif // INCLUDED_SFX2_SIGNATURESTATE_HXX