diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-12-30 19:54:25 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-12-31 00:08:07 +0100 |
commit | 33bec7973ecb626ff5e2b40a6bf695e00adec6a7 (patch) | |
tree | b96ed8874b16364676bead95d12cac993a0c6522 | |
parent | 0d3c9d26e83bbfebade5d696e80ef10f4a63de8c (diff) |
pdf: change define constants to constexpr
Change-Id: I55dec1364d1329884270a86a6a200d050c08686c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86033
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index ac580202a35b..4ce4d7d9aea8 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -62,14 +62,13 @@ class SvStream; class SvMemoryStream; // the maximum password length -#define ENCRYPTED_PWD_SIZE 32 -#define MD5_DIGEST_SIZE 16 -#define SECUR_40BIT_KEY 5 +constexpr sal_Int32 ENCRYPTED_PWD_SIZE = 32; +constexpr sal_Int32 MD5_DIGEST_SIZE = 16; // security 128 bit -#define SECUR_128BIT_KEY 16 +constexpr sal_Int32 SECUR_128BIT_KEY = 16; // maximum length of MD5 digest input, in step 2 of algorithm 3.1 // PDF spec ver. 1.4: see there for details -#define MAXIMUM_RC4_KEY_LENGTH (SECUR_128BIT_KEY+3+2) +constexpr sal_Int32 MAXIMUM_RC4_KEY_LENGTH = SECUR_128BIT_KEY + 3 + 2; enum class GraphicsStateUpdateFlags { Font = 0x0001, |