1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_RECHEAD_HXX 25cdf0e10cSrcweir #define SC_RECHEAD_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <tools/stream.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir // ID's fuer Dateien: 30cdf0e10cSrcweir 31cdf0e10cSrcweir #define SCID_SIZES 0x4200 32cdf0e10cSrcweir 33cdf0e10cSrcweir #define SCID_POOLS 0x4210 34cdf0e10cSrcweir #define SCID_DOCPOOL 0x4211 35cdf0e10cSrcweir #define SCID_STYLEPOOL 0x4212 36cdf0e10cSrcweir #define SCID_NEWPOOLS 0x4213 // ID fuer SC 3.0a 37cdf0e10cSrcweir #define SCID_EDITPOOL 0x4214 38cdf0e10cSrcweir 39cdf0e10cSrcweir #define SCID_DOCUMENT 0x4220 40cdf0e10cSrcweir #define SCID_DOCFLAGS 0x4221 41cdf0e10cSrcweir #define SCID_TABLE 0x4222 42cdf0e10cSrcweir #define SCID_DRAWING 0x4223 43cdf0e10cSrcweir #define SCID_RANGENAME 0x4224 44cdf0e10cSrcweir #define SCID_DBAREAS 0x4225 45cdf0e10cSrcweir #define SCID_PIVOT 0x4226 46cdf0e10cSrcweir #define SCID_CHARTS 0x4227 47cdf0e10cSrcweir #define SCID_NUMFORMAT 0x4228 48cdf0e10cSrcweir #define SCID_DOCOPTIONS 0x4229 49cdf0e10cSrcweir #define SCID_VIEWOPTIONS 0x422a 50cdf0e10cSrcweir #define SCID_PRINTSETUP 0x422b 51cdf0e10cSrcweir #define SCID_CHARSET 0x422c 52cdf0e10cSrcweir #define SCID_NEWDOCUMENT 0x422d // ID fuer SC 3.0a 53cdf0e10cSrcweir #define SCID_DDELINKS 0x422e 54cdf0e10cSrcweir #define SCID_AREALINKS 0x422f 55cdf0e10cSrcweir #define SCID_CONDFORMATS 0x4230 56cdf0e10cSrcweir #define SCID_VALIDATION 0x4231 57cdf0e10cSrcweir #define SCID_COLNAMERANGES 0x4232 58cdf0e10cSrcweir #define SCID_ROWNAMERANGES 0x4233 59cdf0e10cSrcweir #define SCID_DETOPLIST 0x4234 60cdf0e10cSrcweir #define SCID_CONSOLIDATA 0x4235 61cdf0e10cSrcweir #define SCID_CHANGETRACK 0x4236 62cdf0e10cSrcweir #define SCID_CHGVIEWSET 0x4237 63cdf0e10cSrcweir #define SCID_LINKUPMODE 0x4238 64cdf0e10cSrcweir #define SCID_DATAPILOT 0x4239 65cdf0e10cSrcweir 66cdf0e10cSrcweir #define SCID_COLUMNS 0x4240 67cdf0e10cSrcweir #define SCID_COLROWFLAGS 0x4241 68cdf0e10cSrcweir #define SCID_TABOPTIONS 0x4242 69cdf0e10cSrcweir #define SCID_TABLINK 0x4243 70cdf0e10cSrcweir 71cdf0e10cSrcweir #define SCID_COLDATA 0x4250 72cdf0e10cSrcweir #define SCID_COLNOTES 0x4251 73cdf0e10cSrcweir #define SCID_COLATTRIB 0x4252 74cdf0e10cSrcweir 75cdf0e10cSrcweir #define SCID_DRAWPOOL 0x4260 76cdf0e10cSrcweir #define SCID_DRAWMODEL 0x4261 77cdf0e10cSrcweir 78cdf0e10cSrcweir 79cdf0e10cSrcweir 80cdf0e10cSrcweir // Dateiversion 81cdf0e10cSrcweir // Falls das obere Byte inkrementiert wird, wird das Doc von 82cdf0e10cSrcweir // aelteren SCs nicht mehr geladen! 83cdf0e10cSrcweir 84cdf0e10cSrcweir #define SC_INITIAL_VERSION 0x0001 85cdf0e10cSrcweir #define SC_FORMULA_LCLVER 0x0002 // Formalen mit lokaler VerNr 86cdf0e10cSrcweir //-------------------------------- 87cdf0e10cSrcweir #define SC_NEW_TOKEN_ARRAYS 0x0003 // neues TokenArray-Format 88cdf0e10cSrcweir #define SC_FORMULA_VALUES 0x0004 // Werte in Formelzellen 89cdf0e10cSrcweir #define SC_FORMULA_VALUES2 0x0005 // Werte in Formelzellen 90cdf0e10cSrcweir #define SC_DATABYTES 0x0006 // Datenbytes, kleine Tables 91cdf0e10cSrcweir #define SC_DATABYTES2 0x0007 // Datenbytes, kleine Tables 92cdf0e10cSrcweir #define SC_NUMFMT 0x0008 // Zahlenformat an Formelzelle 93cdf0e10cSrcweir #define SC_NEWIF 0x0009 // neue Codierung von ocIf (komp.) 94cdf0e10cSrcweir //-------------------------------- 95cdf0e10cSrcweir #define SC_RELATIVE_REFS 0x0010 // relative Referenzen 96cdf0e10cSrcweir #define SC_SUBTOTAL_FLAG 0x0011 // bSubTotal der Formelzelle 97cdf0e10cSrcweir #define SC_COLROWNAME_RANGEPAIR 0x0012 // ColRowNameRanges als ScRangePair 98cdf0e10cSrcweir //-------------------------------- 99cdf0e10cSrcweir #define SC_31_EXPORT_VER 0x0012 // Version bei 3.1-Export 100cdf0e10cSrcweir //-------------------------------- ab 4.0 101cdf0e10cSrcweir #define SC_32K_ROWS 0x0100 // 32000 Zeilen - inkompatibel 102cdf0e10cSrcweir #define SC_FONTCHARSET 0x0101 // Font-CharSets muessen stimmen 103cdf0e10cSrcweir //-------------------------------- 104cdf0e10cSrcweir #define SC_40_EXPORT_VER 0x0101 // Version bei 4.0-Export 105cdf0e10cSrcweir //-------------------------------- ab 5.0 106cdf0e10cSrcweir #define SC_RECALC_MODE_BITS 0x0201 // TokenArray RecalcMode 107cdf0e10cSrcweir #define SC_MATRIX_DOUBLEREF 0x0202 // DoubleRef implizite Schnittmenge 108cdf0e10cSrcweir #define SC_VERSION_EDITPOOL 0x0203 // EditCells mit EditPool 109cdf0e10cSrcweir #define SC_SUBTOTAL_BUGFIX 0x0204 // bSubTotal der Formelzelle wirklich 110cdf0e10cSrcweir //-------------------------------- ab 5.2 111cdf0e10cSrcweir #define SC_CONVERT_RECALC_ON_LOAD 0x0205 // #73616# CONVERT function recalculated on each load 112cdf0e10cSrcweir //-------------------------------- 113cdf0e10cSrcweir #define SC_CURRENT_VERSION 0x0205 114cdf0e10cSrcweir 115cdf0e10cSrcweir 116cdf0e10cSrcweir // alles ueber SC_31_EXPORT_VER muss auch beim Speichern abgefragt werden, 117cdf0e10cSrcweir // weil 3.1-Export diese Versionsnummer schreibt. 118cdf0e10cSrcweir 119cdf0e10cSrcweir // btw: 10 nach 09 ist kein Zaehlfehler sondern eine absichtliche Luecke, 120cdf0e10cSrcweir // weil nicht klar war, wie lange die RelRefs Entwicklung dauern wuerde.. :) 121cdf0e10cSrcweir 122cdf0e10cSrcweir class SvStream; 123cdf0e10cSrcweir 124cdf0e10cSrcweir // ----------------------------------------------------------------------- 125cdf0e10cSrcweir 126cdf0e10cSrcweir // Header mit Groessenangaben fuer mehrere Objekte 127cdf0e10cSrcweir 128cdf0e10cSrcweir class ScMultipleReadHeader 129cdf0e10cSrcweir { 130cdf0e10cSrcweir private: 131cdf0e10cSrcweir SvStream& rStream; 132cdf0e10cSrcweir sal_uInt8* pBuf; 133cdf0e10cSrcweir SvMemoryStream* pMemStream; 134cdf0e10cSrcweir sal_uLong nEndPos; 135cdf0e10cSrcweir sal_uLong nEntryEnd; 136cdf0e10cSrcweir sal_uLong nTotalEnd; 137cdf0e10cSrcweir 138cdf0e10cSrcweir public: 139cdf0e10cSrcweir ScMultipleReadHeader(SvStream& rNewStream); 140cdf0e10cSrcweir ~ScMultipleReadHeader(); 141cdf0e10cSrcweir 142cdf0e10cSrcweir void StartEntry(); 143cdf0e10cSrcweir void EndEntry(); 144cdf0e10cSrcweir sal_uLong BytesLeft() const; 145cdf0e10cSrcweir }; 146cdf0e10cSrcweir 147cdf0e10cSrcweir class ScMultipleWriteHeader 148cdf0e10cSrcweir { 149cdf0e10cSrcweir private: 150cdf0e10cSrcweir SvStream& rStream; 151cdf0e10cSrcweir SvMemoryStream aMemStream; 152cdf0e10cSrcweir sal_uLong nDataPos; 153cdf0e10cSrcweir sal_uInt32 nDataSize; 154cdf0e10cSrcweir sal_uLong nEntryStart; 155cdf0e10cSrcweir 156cdf0e10cSrcweir public: 157cdf0e10cSrcweir ScMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0); 158cdf0e10cSrcweir ~ScMultipleWriteHeader(); 159cdf0e10cSrcweir 160cdf0e10cSrcweir void StartEntry(); 161cdf0e10cSrcweir void EndEntry(); 162cdf0e10cSrcweir }; 163cdf0e10cSrcweir 164cdf0e10cSrcweir #endif 165cdf0e10cSrcweir 166cdf0e10cSrcweir 167