Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sc / rechead.hxx
blobab4ecac3629908752deefbfd506905062b3a5113
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rechead.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_RECHEAD_HXX
32 #define SC_RECHEAD_HXX
34 #ifndef _STREAM_HXX //autogen
35 #include <tools/stream.hxx>
36 #endif
37 class SvStream;
38 namespace binfilter {
40 // ID's fuer Dateien:
42 #define SCID_SIZES 0x4200
44 #define SCID_POOLS 0x4210
45 #define SCID_DOCPOOL 0x4211
46 #define SCID_STYLEPOOL 0x4212
47 #define SCID_NEWPOOLS 0x4213 // ID fuer SC 3.0a
48 #define SCID_EDITPOOL 0x4214
50 #define SCID_DOCUMENT 0x4220
51 #define SCID_DOCFLAGS 0x4221
52 #define SCID_TABLE 0x4222
53 #define SCID_DRAWING 0x4223
54 #define SCID_RANGENAME 0x4224
55 #define SCID_DBAREAS 0x4225
56 #define SCID_PIVOT 0x4226
57 #define SCID_CHARTS 0x4227
58 #define SCID_NUMFORMAT 0x4228
59 #define SCID_DOCOPTIONS 0x4229
60 #define SCID_VIEWOPTIONS 0x422a
61 #define SCID_PRINTSETUP 0x422b
62 #define SCID_CHARSET 0x422c
63 #define SCID_NEWDOCUMENT 0x422d // ID fuer SC 3.0a
64 #define SCID_DDELINKS 0x422e
65 #define SCID_AREALINKS 0x422f
66 #define SCID_CONDFORMATS 0x4230
67 #define SCID_VALIDATION 0x4231
68 #define SCID_COLNAMERANGES 0x4232
69 #define SCID_ROWNAMERANGES 0x4233
70 #define SCID_DETOPLIST 0x4234
71 #define SCID_CONSOLIDATA 0x4235
72 #define SCID_CHANGETRACK 0x4236
73 #define SCID_CHGVIEWSET 0x4237
74 #define SCID_LINKUPMODE 0x4238
75 #define SCID_DATAPILOT 0x4239
77 #define SCID_COLUMNS 0x4240
78 #define SCID_COLROWFLAGS 0x4241
79 #define SCID_TABOPTIONS 0x4242
80 #define SCID_TABLINK 0x4243
82 #define SCID_COLDATA 0x4250
83 #define SCID_COLNOTES 0x4251
84 #define SCID_COLATTRIB 0x4252
86 #define SCID_DRAWPOOL 0x4260
87 #define SCID_DRAWMODEL 0x4261
91 // Dateiversion
92 // Falls das obere Byte inkrementiert wird, wird das Doc von
93 // aelteren SCs nicht mehr geladen!
95 #define SC_INITIAL_VERSION 0x0001
96 #define SC_FORMULA_LCLVER 0x0002 // Formalen mit lokaler VerNr
97 //--------------------------------
98 #define SC_NEW_TOKEN_ARRAYS 0x0003 // neues TokenArray-Format
99 #define SC_FORMULA_VALUES 0x0004 // Werte in Formelzellen
100 #define SC_FORMULA_VALUES2 0x0005 // Werte in Formelzellen
101 #define SC_DATABYTES 0x0006 // Datenbytes, kleine Tables
102 #define SC_DATABYTES2 0x0007 // Datenbytes, kleine Tables
103 #define SC_NUMFMT 0x0008 // Zahlenformat an Formelzelle
104 #define SC_NEWIF 0x0009 // neue Codierung von ocIf (komp.)
105 //--------------------------------
106 #define SC_RELATIVE_REFS 0x0010 // relative Referenzen
107 #define SC_SUBTOTAL_FLAG 0x0011 // bSubTotal der Formelzelle
108 #define SC_COLROWNAME_RANGEPAIR 0x0012 // ColRowNameRanges als ScRangePair
109 //--------------------------------
110 #define SC_31_EXPORT_VER 0x0012 // Version bei 3.1-Export
111 //-------------------------------- ab 4.0
112 #define SC_32K_ROWS 0x0100 // 32000 Zeilen - inkompatibel
113 #define SC_FONTCHARSET 0x0101 // Font-CharSets muessen stimmen
114 //--------------------------------
115 #define SC_40_EXPORT_VER 0x0101 // Version bei 4.0-Export
116 //-------------------------------- ab 5.0
117 #define SC_RECALC_MODE_BITS 0x0201 // TokenArray RecalcMode
118 #define SC_MATRIX_DOUBLEREF 0x0202 // DoubleRef implizite Schnittmenge
119 #define SC_VERSION_EDITPOOL 0x0203 // EditCells mit EditPool
120 #define SC_SUBTOTAL_BUGFIX 0x0204 // bSubTotal der Formelzelle wirklich
121 //-------------------------------- ab 5.2
122 #define SC_CONVERT_RECALC_ON_LOAD 0x0205 // #73616# CONVERT function recalculated on each load
123 //--------------------------------
124 #define SC_CURRENT_VERSION 0x0205
127 // alles ueber SC_31_EXPORT_VER muss auch beim Speichern abgefragt werden,
128 // weil 3.1-Export diese Versionsnummer schreibt.
130 // btw: 10 nach 09 ist kein Zaehlfehler sondern eine absichtliche Luecke,
131 // weil nicht klar war, wie lange die RelRefs Entwicklung dauern wuerde.. :)
134 // -----------------------------------------------------------------------
136 // "Automatischer" Record-Header mit Groessenangabe
138 class ScReadHeader
140 private:
141 SvStream& rStream;
142 ULONG nDataEnd;
144 public:
145 ScReadHeader(SvStream& rNewStream);
146 ~ScReadHeader();
148 ULONG BytesLeft() const;
151 class ScWriteHeader
153 private:
154 SvStream& rStream;
155 ULONG nDataPos;
156 sal_uInt32 nDataSize;
158 public:
159 ScWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0);
160 ~ScWriteHeader();
163 // Header mit Groessenangaben fuer mehrere Objekte
165 class ScMultipleReadHeader
167 private:
168 SvStream& rStream;
169 BYTE* pBuf;
170 SvMemoryStream* pMemStream;
171 ULONG nEndPos;
172 ULONG nEntryEnd;
173 ULONG nTotalEnd;
175 public:
176 ScMultipleReadHeader(SvStream& rNewStream);
177 ~ScMultipleReadHeader();
179 void StartEntry();
180 void EndEntry();
181 ULONG BytesLeft() const;
184 class ScMultipleWriteHeader
186 private:
187 SvStream& rStream;
188 SvMemoryStream aMemStream;
189 ULONG nDataPos;
190 sal_uInt32 nDataSize;
191 ULONG nEntryStart;
193 public:
194 ScMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0);
195 ~ScMultipleWriteHeader();
197 void StartEntry();
198 void EndEntry();
201 } //namespace binfilter
202 #endif