diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-07 11:53:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-07 12:53:39 +0200 |
commit | 306f04830300c239fd74677bcc61efcb5a4532ea (patch) | |
tree | 99e45a78bdf3a7ed307ac87306737e976302b649 /include | |
parent | f536699304e951ab2e104118ad36335ee0f1b268 (diff) |
fdo#84938: convert COMPRESSMODE_ #defines to 'enum class'
Change-Id: Ica501fc73e7e5f9dbd30dd9da3f337b2dc7e6f02
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svdmodel.hxx | 1 | ||||
-rw-r--r-- | include/tools/stream.hxx | 18 |
2 files changed, 12 insertions, 7 deletions
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index bbca71019c30..30db1efdb21a 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -205,7 +205,6 @@ protected: bool bSaveNative:1; bool bStarDrawPreviewMode:1; bool mbDisableTextEditUsesCommonUndoManager:1; - sal_uInt16 nStreamCompressMode; // write compressedly? SvStreamEndian nStreamNumberFormat; sal_uInt16 nDefaultTabulator; sal_uInt32 nMaxUndoCount; diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index e80d0978e845..59561de1d9c2 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -79,9 +79,15 @@ namespace o3tl enum class SvStreamEndian { BIG, LITTLE }; -#define COMPRESSMODE_NONE (sal_uInt16)0x0000 -#define COMPRESSMODE_ZBITMAP (sal_uInt16)0x0001 -#define COMPRESSMODE_NATIVE (sal_uInt16)0x0010 +enum class SvStreamCompressFlags { + NONE = 0x0000, + ZBITMAP = 0x0001, + NATIVE = 0x0010, +}; +namespace o3tl +{ + template<> struct typed_flags<SvStreamCompressFlags> : is_typed_flags<SvStreamCompressFlags, 0x0011> {}; +} class SvStream; @@ -222,7 +228,7 @@ private: bool bIsEof; sal_uInt32 nError; SvStreamEndian nEndian; - sal_uInt16 nCompressMode; + SvStreamCompressFlags nCompressMode; LineEnd eLineDelimiter; rtl_TextEncoding eStreamCharSet; @@ -278,9 +284,9 @@ public: /// returns status of endian swap flag bool IsEndianSwap() const { return bSwap; } - void SetCompressMode( sal_uInt16 nNewMode ) + void SetCompressMode( SvStreamCompressFlags nNewMode ) { nCompressMode = nNewMode; } - sal_uInt16 GetCompressMode() const { return nCompressMode; } + SvStreamCompressFlags GetCompressMode() const { return nCompressMode; } void SetCryptMaskKey(const OString& rCryptMaskKey); const OString& GetCryptMaskKey() const { return m_aCryptMaskKey; } |