stgelem.hxx (297a844a) | stgelem.hxx (40300343) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 28 unchanged lines hidden (view full) --- 37class SvStream; 38class String; 39 40SvStream& operator>>( SvStream&, ClsId& ); 41SvStream& operator<<( SvStream&, const ClsId& ); 42 43class StgHeader 44{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 28 unchanged lines hidden (view full) --- 37class SvStream; 38class String; 39 40SvStream& operator>>( SvStream&, ClsId& ); 41SvStream& operator<<( SvStream&, const ClsId& ); 42 43class StgHeader 44{ |
45 sal_uInt8 cSignature[ 8 ]; // 00 signature (see below) 46 ClsId aClsId; // 08 Class ID 47 sal_Int32 nVersion; // 18 version number 48 sal_uInt16 nByteOrder; // 1C Unicode byte order indicator 49 sal_Int16 nPageSize; // 1E 1 << nPageSize = block size 50 sal_Int16 nDataPageSize; // 20 1 << this size == data block size 51 sal_uInt8 bDirty; // 22 internal dirty flag 52 sal_uInt8 cReserved[ 9 ]; // 23 53 sal_Int32 nFATSize; // 2C total number of FAT pages 54 sal_Int32 nTOCstrm; // 30 starting page for the TOC stream 55 sal_Int32 nReserved; // 34 56 sal_Int32 nThreshold; // 38 minimum file size for big data 57 sal_Int32 nDataFAT; // 3C page # of 1st data FAT block 58 sal_Int32 nDataFATSize; // 40 # of data fat blocks 59 sal_Int32 nMasterChain; // 44 chain to the next master block 60 sal_Int32 nMaster; // 48 # of additional master blocks 61 sal_Int32 nMasterFAT[ 109 ]; // 4C first 109 master FAT pages | 45 static const sal_uInt8 cFATPagesInHeader = 109; 46 47 sal_uInt8 cSignature[ 8 ]; // 00 signature (see below) 48 ClsId aClsId; // 08 Class ID 49 sal_Int32 nVersion; // 18 version number 50 sal_uInt16 nByteOrder; // 1C Unicode byte order indicator 51 sal_Int16 nPageSize; // 1E 1 << nPageSize = block size 52 sal_Int16 nDataPageSize; // 20 1 << this size == data block size 53 sal_uInt8 bDirty; // 22 internal dirty flag 54 sal_uInt8 cReserved[ 9 ]; // 23 55 sal_Int32 nFATSize; // 2C total number of FAT pages 56 sal_Int32 nTOCstrm; // 30 starting page for the TOC stream 57 sal_Int32 nReserved; // 34 58 sal_Int32 nThreshold; // 38 minimum file size for big data 59 sal_Int32 nDataFAT; // 3C page # of 1st data FAT block 60 sal_Int32 nDataFATSize; // 40 # of data fat blocks 61 sal_Int32 nMasterChain; // 44 chain to the next master block 62 sal_Int32 nMaster; // 48 # of additional master blocks 63 sal_Int32 nMasterFAT[ cFATPagesInHeader ]; // 4C first [cFATPagesInHeader] master FAT pages |
62public: 63 StgHeader(); 64 65 void Init(); // initialize the header 66 sal_Bool Load( StgIo& ); 67 sal_Bool Load( SvStream& ); 68 sal_Bool Store( StgIo& ); 69 sal_Bool Check(); // check the signature and version | 64public: 65 StgHeader(); 66 67 void Init(); // initialize the header 68 sal_Bool Load( StgIo& ); 69 sal_Bool Load( SvStream& ); 70 sal_Bool Store( StgIo& ); 71 sal_Bool Check(); // check the signature and version |
70 short GetByteOrder() const { return nByteOrder; } 71 sal_Int32 GetTOCStart() const { return nTOCstrm; } | 72 short GetByteOrder() const { return nByteOrder; } 73 sal_Int32 GetTOCStart() const { return nTOCstrm; } |
72 void SetTOCStart( sal_Int32 n ); | 74 void SetTOCStart( sal_Int32 n ); |
73 sal_Int32 GetDataFATStart() const { return nDataFAT; } | 75 sal_Int32 GetDataFATStart() const { return nDataFAT; } |
74 void SetDataFATStart( sal_Int32 n ); | 76 void SetDataFATStart( sal_Int32 n ); |
75 sal_Int32 GetDataFATSize() const { return nDataFATSize; } | 77 sal_Int32 GetDataFATSize() const { return nDataFATSize; } |
76 void SetDataFATSize( sal_Int32 n ); | 78 void SetDataFATSize( sal_Int32 n ); |
77 sal_Int32 GetThreshold() const { return nThreshold; } 78 short GetPageSize() const { return nPageSize; } 79 short GetDataPageSize() const { return nDataPageSize; } 80 sal_Int32 GetFATSize() const { return nFATSize; } | 79 sal_Int32 GetThreshold() const { return nThreshold; } 80 short GetPageSize() const { return nPageSize; } 81 short GetDataPageSize() const { return nDataPageSize; } 82 sal_Int32 GetFATSize() const { return nFATSize; } |
81 void SetFATSize( sal_Int32 n ); | 83 void SetFATSize( sal_Int32 n ); |
82 sal_Int32 GetFATChain() const { return nMasterChain; } | 84 sal_Int32 GetFATChain() const { return nMasterChain; } |
83 void SetFATChain( sal_Int32 n ); | 85 void SetFATChain( sal_Int32 n ); |
84 sal_Int32 GetMasters() const { return nMaster; } | 86 sal_Int32 GetMasters() const { return nMaster; } |
85 void SetMasters( sal_Int32 n ); | 87 void SetMasters( sal_Int32 n ); |
86 short GetFAT1Size() const { return 109; } | 88 short GetFAT1Size() const { return cFATPagesInHeader; } |
87 const ClsId& GetClassId() const { return aClsId; } 88 void SetClassId( const ClsId& ); 89 sal_Int32 GetFATPage( short ) const; 90 void SetFATPage( short, sal_Int32 ); 91}; 92 93enum StgEntryType { // dir entry types: 94 STG_EMPTY = 0, --- 69 unchanged lines hidden --- | 89 const ClsId& GetClassId() const { return aClsId; } 90 void SetClassId( const ClsId& ); 91 sal_Int32 GetFATPage( short ) const; 92 void SetFATPage( short, sal_Int32 ); 93}; 94 95enum StgEntryType { // dir entry types: 96 STG_EMPTY = 0, --- 69 unchanged lines hidden --- |