diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-08-27 10:18:06 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-27 12:06:15 +0000 |
commit | 33b38082ca63813f7c478945be198cc504efde4b (patch) | |
tree | 030eb240e231d855e477d985c3edc36304dd2914 /include/tools | |
parent | 81a7aeb0806298c7a8571a46e09f485f3cf5ea13 (diff) |
put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/stream.hxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 7d5726a7e986..19d756b7431d 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -54,19 +54,18 @@ enum class StreamMode { SHARE_DENYREAD = 0x0200, // overrides denynone SHARE_DENYWRITE = 0x0400, // overrides denynone SHARE_DENYALL = 0x0800, // overrides denyread,write,none +// masks + READWRITE = READ | WRITE, + SHARE_DENYREADWRITE = SHARE_DENYREAD | SHARE_DENYWRITE, + STD_READ = READ | SHARE_DENYNONE | NOCREATE, + STD_WRITE = WRITE | SHARE_DENYALL, + STD_READWRITE = READWRITE | SHARE_DENYALL }; namespace o3tl { template<> struct typed_flags<StreamMode> : is_typed_flags<StreamMode, 0x0f1f> {}; } -#define STREAM_READWRITE (StreamMode::READ | StreamMode::WRITE) -#define STREAM_SHARE_DENYREADWRITE (StreamMode::SHARE_DENYREAD | StreamMode::SHARE_DENYWRITE) - -#define STREAM_STD_READ (StreamMode::READ | StreamMode::SHARE_DENYNONE | StreamMode::NOCREATE) -#define STREAM_STD_WRITE (StreamMode::WRITE | StreamMode::SHARE_DENYALL) -#define STREAM_STD_READWRITE (STREAM_READWRITE | StreamMode::SHARE_DENYALL) - #define STREAM_SEEK_TO_BEGIN 0L #define STREAM_SEEK_TO_END SAL_MAX_UINT64 |