Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / sc / inc / rechead.hxx
blobf7c4cad8136e0f677233fdc9892b2b0ca1789a35
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_RECHEAD_HXX
21 #define SC_RECHEAD_HXX
23 #include <tools/stream.hxx>
25 // ID's for files:
27 #define SCID_SIZES 0x4200
29 #define SCID_POOLS 0x4210
30 #define SCID_DOCPOOL 0x4211
31 #define SCID_STYLEPOOL 0x4212
32 #define SCID_NEWPOOLS 0x4213 // ID for SC 3.0a
33 #define SCID_EDITPOOL 0x4214
35 #define SCID_DOCUMENT 0x4220
36 #define SCID_DOCFLAGS 0x4221
37 #define SCID_TABLE 0x4222
38 #define SCID_DRAWING 0x4223
39 #define SCID_RANGENAME 0x4224
40 #define SCID_DBAREAS 0x4225
41 #define SCID_PIVOT 0x4226
42 #define SCID_CHARTS 0x4227
43 #define SCID_NUMFORMAT 0x4228
44 #define SCID_DOCOPTIONS 0x4229
45 #define SCID_VIEWOPTIONS 0x422a
46 #define SCID_PRINTSETUP 0x422b
47 #define SCID_CHARSET 0x422c
48 #define SCID_NEWDOCUMENT 0x422d // ID for SC 3.0a
49 #define SCID_DDELINKS 0x422e
50 #define SCID_AREALINKS 0x422f
51 #define SCID_CONDFORMATS 0x4230
52 #define SCID_VALIDATION 0x4231
53 #define SCID_COLNAMERANGES 0x4232
54 #define SCID_ROWNAMERANGES 0x4233
55 #define SCID_DETOPLIST 0x4234
56 #define SCID_CONSOLIDATA 0x4235
57 #define SCID_CHANGETRACK 0x4236
58 #define SCID_CHGVIEWSET 0x4237
59 #define SCID_LINKUPMODE 0x4238
60 #define SCID_DATAPILOT 0x4239
62 #define SCID_COLUMNS 0x4240
63 #define SCID_COLROWFLAGS 0x4241
64 #define SCID_TABOPTIONS 0x4242
65 #define SCID_TABLINK 0x4243
67 #define SCID_COLDATA 0x4250
68 #define SCID_COLNOTES 0x4251
69 #define SCID_COLATTRIB 0x4252
71 #define SCID_DRAWPOOL 0x4260
72 #define SCID_DRAWMODEL 0x4261
76 // file version
77 // if the high-byte is incremented, the document won't be opened by older SCs
78 #define SC_INITIAL_VERSION 0x0001
79 #define SC_FORMULA_LCLVER 0x0002 // formula with local version no.
80 //--------------------------------
81 #define SC_NEW_TOKEN_ARRAYS 0x0003 // new TokenArray format
82 #define SC_FORMULA_VALUES 0x0004 // values in formula cells
83 #define SC_FORMULA_VALUES2 0x0005 // values in formula cells
84 #define SC_DATABYTES 0x0006 // data bytes, small tables
85 #define SC_DATABYTES2 0x0007 // data bytes, small tables
86 #define SC_NUMFMT 0x0008 // number format of formula cell
87 #define SC_NEWIF 0x0009 // new coding of ocIf (komp.)
88 //--------------------------------
89 #define SC_RELATIVE_REFS 0x0010 // relative references
90 #define SC_SUBTOTAL_FLAG 0x0011 // bSubTotal of formula cell
91 #define SC_COLROWNAME_RANGEPAIR 0x0012 // ColRowNameRanges as ScRangePair
92 //--------------------------------
93 #define SC_31_EXPORT_VER 0x0012 // version for 3.1-export
94 //-------------------------------- since 4.0
95 #define SC_32K_ROWS 0x0100 // 32000 rows - incompatibel
96 #define SC_FONTCHARSET 0x0101 // Font-CharSets have to be right
97 //--------------------------------
98 #define SC_40_EXPORT_VER 0x0101 // version for 4.0-Export
99 //-------------------------------- since 5.0
100 #define SC_RECALC_MODE_BITS 0x0201 // TokenArray RecalcMode
101 #define SC_MATRIX_DOUBLEREF 0x0202 // DoubleRef implicit intersection
102 #define SC_VERSION_EDITPOOL 0x0203 // EditCells with EditPool
103 #define SC_SUBTOTAL_BUGFIX 0x0204 // bSubTotal of formula cell (true)
104 //-------------------------------- since 5.2
105 #define SC_CONVERT_RECALC_ON_LOAD 0x0205 // CONVERT function recalculated on each load
106 //--------------------------------
107 #define SC_CURRENT_VERSION 0x0205
110 // all above SC_31_EXPORT_VER has to be queried during saving,
111 // because 3.1-export writes this version number.
113 // btw: 10 following 09 is not a counting error but an intentional gap,
114 // because it was not clear, how long the RelRefs development would take. :)
116 class SvStream;
118 // -----------------------------------------------------------------------
120 // Header with size specification for multiple objects
122 class ScMultipleReadHeader
124 private:
125 SvStream& rStream;
126 sal_uInt8* pBuf;
127 SvMemoryStream* pMemStream;
128 sal_uLong nEndPos;
129 sal_uLong nEntryEnd;
130 sal_uLong nTotalEnd;
132 public:
133 ScMultipleReadHeader(SvStream& rNewStream);
134 ~ScMultipleReadHeader();
136 void StartEntry();
137 void EndEntry();
138 sal_uLong BytesLeft() const;
141 class ScMultipleWriteHeader
143 private:
144 SvStream& rStream;
145 SvMemoryStream aMemStream;
146 sal_uLong nDataPos;
147 sal_uInt32 nDataSize;
148 sal_uLong nEntryStart;
150 public:
151 ScMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0);
152 ~ScMultipleWriteHeader();
154 void StartEntry();
155 void EndEntry();
158 #endif
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */