diff options
author | baltasarq <baltasarq@gmail.com> | 2016-02-24 14:43:38 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-26 07:18:25 +0000 |
commit | 2d162b1c70c1bc16d682b74ee1d0b13a9a80717d (patch) | |
tree | 64389d1eef8a090804348864364cc52f3ed13503 /basic/source/inc | |
parent | 393f11f88648e1c7cace6224aa7afcbf9d68ddd6 (diff) |
tdf#84938 Eliminate B_xxx defines in filefmt.hxx for FileOffset scoped enum.
Second step: Make SbiOpenRecord() accept a FileOffset as second parameter
This is a [partial] patch The objective is to substitute all apparitions of
#defined constants for enum class.
The victim here is the series of constants B_xxx that were located in
filefmt.hxx and were changed for a FileOffset enum class.
Obviously some other files where the type is used must be changed too.
Change-Id: I7406bdc8e780ee89802ab6823f9c91c4c9b765c0
Reviewed-on: https://gerrit.libreoffice.org/22697
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic/source/inc')
-rw-r--r-- | basic/source/inc/filefmt.hxx | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/basic/source/inc/filefmt.hxx b/basic/source/inc/filefmt.hxx index c9d6ba7c8f95..d6ef8c8be0f4 100644 --- a/basic/source/inc/filefmt.hxx +++ b/basic/source/inc/filefmt.hxx @@ -57,23 +57,26 @@ class SvStream; // all the file-offsets in records are relative to the module's start! -#define B_LIBRARY 0x4C42 // BL Library Record -#define B_MODULE 0x4D42 // BM Module Record -#define B_NAME 0x4E4D // MN module name -#define B_COMMENT 0x434D // MC comment -#define B_SOURCE 0x4353 // SC source code -#define B_PCODE 0x4350 // PC p-code -#define B_OLDPUBLICS 0x7550 // Pu publics -#define B_PUBLICS 0x5550 // PU publics -#define B_POOLDIR 0x4450 // PD symbol pool directory -#define B_SYMPOOL 0x5953 // SY symbol pool -#define B_STRINGPOOL 0x5453 // ST symbol pool -#define B_LINERANGES 0x524C // LR line ranges for publics -#define B_MODEND 0x454D // ME module end -#define B_SBXOBJECTS 0x5853 // SX SBX objects -#define B_EXTSOURCE 0x5345 // ES extended source - -#define B_USERTYPES 0x4369 // UT user defined types +enum class FileOffset { + Library = 0x4C42, // BL Library Record + Module = 0x4D42, // BM Module Record + Name = 0x4E4D, // MN module name + Comment = 0x434D, // MC comment + Source = 0x4353, // SC source code + PCode = 0x4350, // PC p-code + OldPublics = 0x7550, // Pu publics + Publics = 0x5550, // PU publics + PoolDir = 0x4450, // PD symbol pool directory + SymPool = 0x5953, // SY symbol pool + StringPool = 0x5453, // ST symbol pool + LineRanges = 0x524C, // LR line ranges for publics + ModEnd = 0x454D, // ME module end + SbxObjects = 0x5853, // SX SBX objects + ExtSource = 0x5345, // ES extended source + UserTypes = 0x4369, // UT user defined types + + LastValue = UserTypes +}; // A library record contains only module records |