Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef SC_SCFLT_HXX
21 : #define SC_SCFLT_HXX
22 :
23 : #include "viewopti.hxx"
24 : #include "collect.hxx"
25 : #include <tools/solar.h>
26 :
27 : // FehlerNummern
28 : #define errUnknownFormat 1
29 : #define errUnknownID 2
30 : #define errOutOfMemory 3
31 :
32 : // Identifiers im FileFormat
33 : #define ColWidthID 1
34 : #define ColAttrID 2
35 : #define RowHeightID 3
36 : #define RowAttrID 4
37 : #define FontID 5
38 : #define NameID 6
39 : #define TableID 7
40 : #define ObjectID 8
41 : #define PatternID 9
42 : #define DataBaseID 10
43 :
44 : // Zeilen/Spalten Flags
45 : #define crfSoftBreak 1
46 : #define crfHardBreak 2
47 : #define crfHidden 4
48 :
49 : // Zelltypen
50 : #define ctValue 1
51 : #define ctString 2
52 : #define ctFormula 3
53 : #define ctNote 4
54 :
55 : // FontStyles
56 : #define ffDontCare 0x00
57 : #define ffRoman 0x10
58 : #define ffSwiss 0x20
59 : #define ffModern 0x30
60 : #define ffScript 0x40
61 : #define ffDecorative 0x50
62 :
63 : // FontWeight
64 : #define fwNormal 400
65 :
66 : // FontAttribute
67 : #define atNone 0
68 : #define atBold 1
69 : #define atItalic 2
70 : #define atUnderline 4
71 : #define atStrikeOut 8
72 :
73 : // Horizontale Ausrichtung
74 : #define hjNone 0
75 : #define hjLeft 1
76 : #define hjCenter 2
77 : #define hjRight 3
78 :
79 : // Vertikale Ausrichtung
80 : #define vjNone 0
81 : #define vjTop 1
82 : #define vjCenter 2
83 : #define vjBottom 3
84 :
85 : // AusrichtungsFlags
86 : #define ojWordBreak 0x01
87 : #define ojBottomTop 0x02
88 : #define ojTopBottom 0x04
89 :
90 : // ZellRaster
91 : #define raNone 0
92 : #define raGray12 1
93 : #define raGray25 2
94 : #define raGray50 3
95 : #define raGray75 4
96 : #define raGray100 5
97 :
98 : // Zellschutz
99 : #define paProtect 1
100 : #define paHideFormula 2
101 : #define paHideAll 4
102 : #define paHidePrint 8
103 :
104 : // ZahlenFormatFlags
105 : #define vfStandard 0
106 : #define vfMoney 1
107 : #define vfThousend 2
108 : #define vfPercent 3
109 : #define vfExponent 4
110 : #define vfZerro 5
111 : #define vfDate 6
112 : #define vfTime 7
113 : #define vfBoolean 8
114 : #define vfStandardRed 9
115 : #define vfMoneyRed 10
116 : #define vfThousendRed 11
117 : #define vfPercentRed 12
118 : #define vfExponentRed 13
119 : #define vfFormula 14
120 : #define vfString 15
121 : #define vfNone 16
122 :
123 : // DatumsFormatFlags
124 : #define df_NDMY_Long 0
125 : #define df_DMY_Long 1
126 : #define df_MY_Long 2
127 : #define df_NDM_Long 3
128 : #define df_DM_Long 4
129 : #define df_M_Long 5
130 : #define df_NDMY_Short 6
131 : #define df_DMY_Short 7
132 : #define df_MY_Short 8
133 : #define df_NDM_Short 9
134 : #define df_DM_Short 10
135 : #define df_M_Short 11
136 : #define df_Q_Long 12
137 : #define df_Q_Short 13
138 :
139 : // ZeitFormatFlags
140 : #define tf_HMS_Long 0
141 : #define tf_HM_Long 1
142 : #define tf_HMS_Short 2
143 : #define tf_HM_Short 3
144 :
145 : // Attribute fuer FormatVorlage
146 : #define pfValue 0x01
147 : #define pfFont 0x02
148 : #define pfJustify 0x04
149 : #define pfFrame 0x08
150 : #define pfRaster 0x10
151 : #define pfProtection 0x20
152 :
153 : // Displayflags fuer die Tabelle
154 : #define dfFormula 0x0001 // Formeln
155 : #define dfZerro 0x0002 // Nullwerte
156 : #define dfGrid 0x0004 // Gitternetz
157 : #define dfPageBreak 0x0008 // Seitenumbruch
158 : #define dfColRowBar 0x0010 // Zeilen/Spalten Koepfe (Dummy)
159 : #define dfSyntax 0x0020 // Syntax Highlighting
160 : #define dfPrintPage 0x0040 // Druckbildansicht (Dummy)
161 : #define dfObjectAll 0x0080 // Objekte anzeigen
162 : #define dfObjectFrame 0x0100 // Objekte als Platzhalter
163 : #define dfObjectNone 0x0200 // Objekte nicht anzeigen
164 : #define dfNoteMark 0x0400 // Notizanzeiger
165 : #define dfProtectMark 0x0800 // Schutzanzeiger
166 :
167 : // Objekt Typen
168 : #define otNone 0 // s.u.
169 : #define otOle 1
170 : #define otImage 2
171 : #define otChart 3
172 :
173 : // Grafik Typen
174 : #define gtNone 0 // Kann nicht vorkommen
175 : #define gtOle 1 // Ole 1.0 Objekt
176 : #define gtImage 2 // Image (Bitmap oder Metafile)
177 : #define gtChart 3 // Chart
178 :
179 : // Datum/Uhrzeit
180 : struct Sc10DateTime
181 : {
182 : sal_uInt16 Year;
183 : sal_uInt16 Month;
184 : sal_uInt16 Day;
185 : sal_uInt16 Hour;
186 : sal_uInt16 Min;
187 : sal_uInt16 Sec;
188 : };
189 :
190 : // ZahlenFormate
191 : struct Sc10ValueFormat
192 : {
193 : sal_uInt8 Format; // Zahl, Waehrung, Prozent etc.
194 : sal_uInt8 Info; // Anzahl Nachkommastellen, Anzahl Stellen, bzw. Datums/Zeitformat
195 : };
196 :
197 : // Fontbeschreibung
198 : struct Sc10LogFont
199 : {
200 : sal_Int16 lfHeight;
201 : sal_Int16 lfWidth;
202 : sal_Int16 lfEscapement;
203 : sal_Int16 lfOrientation;
204 : sal_Int16 lfWeight;
205 : sal_uInt8 lfItalic;
206 : sal_uInt8 lfUnderline;
207 : sal_uInt8 lfStrikeOut;
208 : sal_uInt8 lfCharSet;
209 : sal_uInt8 lfOutPrecision;
210 : sal_uInt8 lfClipPrecision;
211 : sal_uInt8 lfQuality;
212 : sal_uInt8 lfPitchAndFamily;
213 : sal_Char lfFaceName[32];
214 :
215 : bool operator==( const Sc10LogFont& rData ) const;
216 : };
217 :
218 : // RGB-Frabwerte
219 : struct Sc10Color
220 : {
221 : sal_uInt8 Dummy;
222 : sal_uInt8 Blue;
223 : sal_uInt8 Green;
224 : sal_uInt8 Red;
225 : bool operator==( const Sc10Color& rColor ) const;
226 : };
227 :
228 : // Blockbeschreibung
229 : struct Sc10BlockRect
230 : {
231 : sal_Int16 x1;
232 : sal_Int16 y1;
233 : sal_Int16 x2;
234 : sal_Int16 y2;
235 : };
236 :
237 : // Datenbank-Bereich
238 : struct Sc10DataBaseRec
239 : {
240 : sal_Char Name[32];
241 : SCTAB Tab;
242 : Sc10BlockRect Block;
243 : sal_uInt8 RowHeader;
244 : sal_Int16 SortField0;
245 : sal_uInt8 SortUpOrder0;
246 : sal_Int16 SortField1;
247 : sal_uInt8 SortUpOrder1;
248 : sal_Int16 SortField2;
249 : sal_uInt8 SortUpOrder2;
250 : sal_uInt8 IncludeFormat;
251 : sal_Int16 QueryField0;
252 : sal_Int16 QueryOp0;
253 : sal_uInt8 QueryByString0;
254 : sal_Char QueryString0[64];
255 : double QueryValue0;
256 : sal_Int16 QueryConnect1;
257 : sal_Int16 QueryField1;
258 : sal_Int16 QueryOp1;
259 : sal_uInt8 QueryByString1;
260 : sal_Char QueryString1[64];
261 : double QueryValue1;
262 : sal_Int16 QueryConnect2;
263 : sal_Int16 QueryField2;
264 : sal_Int16 QueryOp2;
265 : sal_uInt8 QueryByString2;
266 : sal_Char QueryString2[64];
267 : double QueryValue2;
268 : };
269 :
270 : // Kopf/Fusszeilen-Beschreibung
271 : struct Sc10HeadFootLine
272 : {
273 : sal_Char Title[128];
274 : Sc10LogFont LogFont;
275 : sal_uInt8 HorJustify;
276 : sal_uInt8 VerJustify;
277 : sal_uInt16 Raster;
278 : sal_uInt16 Frame;
279 : Sc10Color TextColor;
280 : Sc10Color BackColor;
281 : Sc10Color RasterColor;
282 : sal_uInt16 FrameColor; // Nibble Codierte Farben link oben rechts unten
283 : sal_uInt16 Reserved;
284 :
285 : bool operator==( const Sc10HeadFootLine& rData ) const;
286 : };
287 :
288 : // Seitenformat
289 : struct Sc10PageFormat
290 : {
291 : Sc10HeadFootLine HeadLine;
292 : Sc10HeadFootLine FootLine;
293 : sal_Int16 Orientation;
294 : sal_Int16 Width;
295 : sal_Int16 Height;
296 : sal_Int16 NonPrintableX;
297 : sal_Int16 NonPrintableY;
298 : sal_Int16 Left;
299 : sal_Int16 Top;
300 : sal_Int16 Right;
301 : sal_Int16 Bottom;
302 : sal_Int16 Head;
303 : sal_Int16 Foot;
304 : sal_uInt8 HorCenter;
305 : sal_uInt8 VerCenter;
306 : sal_uInt8 PrintGrid;
307 : sal_uInt8 PrintColRow;
308 : sal_uInt8 PrintNote;
309 : sal_uInt8 TopBottomDir;
310 : sal_Char PrintAreaName[32];
311 : Sc10BlockRect PrintArea;
312 : sal_Char PrnZoom[6]; // Pascal 6 Byte Realzahl
313 : SCTAB FirstPageNo;
314 : sal_Int16 RowRepeatStart;
315 : sal_Int16 RowRepeatEnd;
316 : sal_Int16 ColRepeatStart;
317 : sal_Int16 ColRepeatEnd;
318 : sal_Char Reserved[26];
319 :
320 : bool operator==( const Sc10PageFormat& rData ) const;
321 : };
322 :
323 : // Tabellenschutz
324 : struct Sc10TableProtect
325 : {
326 : sal_Char PassWord[16];
327 : sal_uInt16 Flags;
328 : sal_uInt8 Protect;
329 : };
330 :
331 : // Documentschutz
332 : struct Sc10SheetProtect
333 : {
334 : sal_Char PassWord[16];
335 : sal_uInt16 Flags;
336 : sal_uInt8 Protect;
337 : };
338 :
339 : // Dateikopf StarCalc 1.0 Datei
340 : struct Sc10FileHeader
341 : {
342 : sal_Char CopyRight[30];
343 : sal_uInt16 Version;
344 : sal_Char Reserved[32];
345 : };
346 :
347 : // Benutzer-Definierte Datei-Beschreibung
348 : struct Sc10FileInfo
349 : {
350 : sal_Char Title[64];
351 : sal_Char Thema[64];
352 : sal_Char Keys[64];
353 : sal_Char Note[256];
354 : sal_Char InfoLabel0[16];
355 : sal_Char InfoLabel1[16];
356 : sal_Char InfoLabel2[16];
357 : sal_Char InfoLabel3[16];
358 : sal_Char Info0[32];
359 : sal_Char Info1[32];
360 : sal_Char Info2[32];
361 : sal_Char Info3[32];
362 : sal_Char CreateAuthor[64];
363 : sal_Char ChangeAuthor[64];
364 : sal_Char PrintAuthor[64];
365 : Sc10DateTime CreateDate;
366 : Sc10DateTime ChangeDate;
367 : Sc10DateTime PrintDate;
368 : sal_uInt32 PageCount;
369 : sal_uInt32 ChartCount;
370 : sal_uInt32 PictureCount;
371 : sal_uInt32 GraphCount;
372 : sal_uInt32 OleCount;
373 : sal_uInt32 NoteCount;
374 : sal_uInt32 TextCellCount;
375 : sal_uInt32 ValueCellCount;
376 : sal_uInt32 FormulaCellCount;
377 : sal_uInt32 CellCount;
378 : sal_Char Reserved[52];
379 : };
380 :
381 : // Letze Cursorposition
382 : struct Sc10EditStateInfo
383 : {
384 : // Cursor Position
385 : sal_uInt16 CarretX;
386 : sal_uInt16 CarretY;
387 : sal_uInt16 CarretZ;
388 : // Linke obere Ecke der Tabelle im Fenster
389 : sal_uInt16 DeltaX;
390 : sal_uInt16 DeltaY;
391 : sal_uInt16 DeltaZ;
392 : // Ueberfluessig in StarCalc 3.0
393 : sal_uInt8 DataBaseMode;
394 : sal_Char Reserved[51];
395 : };
396 :
397 : // Attribut-Eintrag
398 : struct Sc10ColData
399 : {
400 : sal_uInt16 Row;
401 : sal_uInt16 Value;
402 : };
403 :
404 : // ZellAttribut-Beschreibung
405 : struct Sc10ColAttr
406 : {
407 : sal_uInt16 Count;
408 : Sc10ColData* pData;
409 :
410 0 : Sc10ColAttr()
411 : : Count(0)
412 0 : , pData(NULL)
413 : {
414 0 : }
415 0 : ~Sc10ColAttr() { delete [] pData; }
416 : };
417 :
418 : // GraphHeader
419 : struct Sc10GraphHeader
420 : {
421 : sal_uInt8 Typ; // Typ der Grafik (Ole-Objekt, Image (Bitmap oder MetaFile), Chart-Object)
422 : sal_Int16 CarretX; // ZellPosition der Grafik
423 : sal_Int16 CarretY;
424 : sal_Int16 CarretZ;
425 : sal_Int32 x; // x,y Abstand zum Zellrand in Pixel (Pixel weil ich Grafiken in Fenstern ablege)
426 : sal_Int32 y;
427 : sal_Int32 w; // w,h Breite und Hoehe in Pixel
428 : sal_Int32 h;
429 : sal_uInt8 IsRelPos; // Ist die Position relativ zur Zelle oder absolute in der Tabelle
430 : sal_uInt8 DoPrint; // Soll die Grafik ausgedruckt werden
431 : sal_uInt16 FrameType; // Art der Umrandung um die Grafik (Keine, Einfach, Doppelt, Einfach Dick, Doppelt Dick)
432 : sal_uInt8 IsTransparent; // Soll der Hintergrund gezeichnet werden
433 : Sc10Color FrameColor; // Umrandungsfarbe als RGB-Wert
434 : Sc10Color BackColor; // Hintergrundfarbe als RGB-Wert
435 : sal_Char Reserved[32]; // Na was wohl
436 : };
437 :
438 : // ImageHeader
439 : struct Sc10ImageHeader
440 : {
441 : sal_Char FileName[128]; // Dateiname des urspruenglich eingefuegten Bildes
442 : sal_Int16 Typ; // Typ der Grafik (Bitmap oder Metafile)
443 : sal_uInt8 Linked; // Kann nicht vorkommen
444 : sal_Int16 x1; // Urspruengliche Groesse der Grafik (nur fuer Metafiles)
445 : sal_Int16 y1;
446 : sal_Int16 x2;
447 : sal_Int16 y2;
448 : sal_uInt32 Size; // Groesse der Grafik in BYTES
449 : };
450 :
451 : // ChartHeader
452 : struct Sc10ChartHeader
453 : {
454 : sal_Int16 MM; // Meatfile Struktur MapMode, Breite, Hoehe
455 : sal_Int16 xExt;
456 : sal_Int16 yExt;
457 : sal_uInt32 Size; // Groesse der Grafik in BYTES
458 : };
459 :
460 : // ChartSheetData
461 : struct Sc10ChartSheetData
462 : {
463 : sal_uInt8 HasTitle; // Hat das Chart Daten aus der Tabell fuer einen Titel
464 : sal_Int16 TitleX; // Zellposition des Titels
465 : sal_Int16 TitleY;
466 : sal_uInt8 HasSubTitle; // Hat das Chart Daten aus der Tabell fuer einen Untertitel
467 : sal_Int16 SubTitleX; // Zellposition des Untertitels
468 : sal_Int16 SubTitleY;
469 : sal_uInt8 HasLeftTitle; // Hat das Chart Daten aus der Tabelle fuer einen Linken-Titel
470 : sal_Int16 LeftTitleX; // Zellposition des Linken-Titels
471 : sal_Int16 LeftTitleY;
472 : sal_uInt8 HasLegend; // Hat das Chart Daten aus der Tabelle fuer eine Legende
473 : sal_Int16 LegendX1; // Zellen der Legende
474 : sal_Int16 LegendY1;
475 : sal_Int16 LegendX2;
476 : sal_Int16 LegendY2;
477 : sal_uInt8 HasLabel; // Hat das Chart Daten aus der Tabelle fuer die Achsbeschriftung
478 : sal_Int16 LabelX1; // Zellen der Achsbeschriftung
479 : sal_Int16 LabelY1;
480 : sal_Int16 LabelX2;
481 : sal_Int16 LabelY2;
482 : sal_Int16 DataX1; // Zellen der Daten
483 : sal_Int16 DataY1;
484 : sal_Int16 DataX2;
485 : sal_Int16 DataY2;
486 : sal_Char Reserved[64];
487 : };
488 :
489 : typedef sal_Char Sc10ChartText[30];
490 :
491 : struct Sc10ChartTypeData
492 : {
493 : sal_Int16 NumSets;
494 : sal_Int16 NumPoints;
495 : sal_Int16 DrawMode;
496 : sal_Int16 GraphType;
497 : sal_Int16 GraphStyle;
498 : sal_Char GraphTitle[80];
499 : sal_Char BottomTitle[80];
500 : sal_Int16 SymbolData[256];
501 : sal_Int16 ColorData[256];
502 : sal_Int16 ThickLines[256];
503 : sal_Int16 PatternData[256];
504 : sal_Int16 LinePatternData[256];
505 : sal_Int16 NumGraphStyles[11];
506 : sal_Int16 ShowLegend;
507 : Sc10ChartText LegendText[256];
508 : sal_Int16 ExplodePie;
509 : sal_Int16 FontUse;
510 : sal_Int16 FontFamily[5];
511 : sal_Int16 FontStyle[5];
512 : sal_Int16 FontSize[5];
513 : sal_Int16 GridStyle;
514 : sal_Int16 Labels;
515 : sal_Int16 LabelEvery;
516 : Sc10ChartText LabelText[50];
517 : sal_Char LeftTitle[80];
518 : sal_Char Reserved[4646];
519 : };
520 :
521 :
522 : // FontAttribut
523 0 : class Sc10FontData : public ScDataObject
524 : {
525 : public:
526 : sal_Int16 Height;
527 : sal_uInt8 CharSet;
528 : sal_uInt8 PitchAndFamily;
529 : sal_Char FaceName[32];
530 :
531 0 : Sc10FontData( const Sc10FontData& rData ) :
532 : ScDataObject( rData ),
533 : Height( rData.Height ),
534 : CharSet( rData.CharSet ),
535 0 : PitchAndFamily( rData.PitchAndFamily )
536 : {
537 0 : strncpy( FaceName, rData.FaceName, sizeof(FaceName) );
538 0 : FaceName[sizeof(FaceName)-1] = 0;
539 0 : }
540 : Sc10FontData( SvStream& rStream );
541 0 : virtual ScDataObject* Clone() const SAL_OVERRIDE { return new Sc10FontData(*this); }
542 : };
543 :
544 :
545 : // Font-Collection
546 0 : class Sc10FontCollection : public ScCollection
547 : {
548 : protected:
549 : sal_uLong nError;
550 : public:
551 : Sc10FontCollection( SvStream& rStream );
552 0 : sal_uLong GetError() { return nError; }
553 0 : Sc10FontData* At(sal_uInt16 nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); }
554 : private:
555 : using ScCollection::At;
556 : };
557 :
558 :
559 : //BereichsDaten
560 0 : class Sc10NameData : public ScDataObject
561 : {
562 : public :
563 : sal_Char Name[32];
564 : sal_Char Reference[64];
565 : sal_Char Reserved[12];
566 :
567 0 : Sc10NameData(const Sc10NameData& rData) :
568 0 : ScDataObject( rData )
569 : {
570 0 : strncpy(Name, rData.Name, sizeof(Name));
571 0 : Name[sizeof(Name)-1] = 0;
572 0 : strncpy(Reference, rData.Reference, sizeof(Reference));
573 0 : Reference[sizeof(Reference)-1] = 0;
574 0 : memcpy(Reserved, rData.Reserved, sizeof(Reserved));
575 0 : }
576 : Sc10NameData(SvStream& rStream);
577 0 : virtual ScDataObject* Clone() const SAL_OVERRIDE { return new Sc10NameData(*this); }
578 : };
579 :
580 :
581 : // Bereichs-Collection
582 0 : class Sc10NameCollection : public ScCollection
583 : {
584 : protected:
585 : sal_uLong nError;
586 : public:
587 : Sc10NameCollection(SvStream& rStream);
588 0 : sal_uLong GetError() { return nError; }
589 0 : Sc10NameData* At(sal_uInt16 nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); }
590 : private:
591 : using ScCollection::At;
592 : };
593 :
594 :
595 : // Vorlage-Daten
596 0 : class Sc10PatternData : public ScDataObject
597 : {
598 : public:
599 : sal_Char Name[32];
600 : Sc10ValueFormat ValueFormat;
601 : Sc10LogFont LogFont;
602 : sal_uInt16 Attr;
603 : sal_uInt16 Justify;
604 : sal_uInt16 Frame;
605 : sal_uInt16 Raster;
606 : sal_uInt16 nColor;
607 : sal_uInt16 FrameColor;
608 : sal_uInt16 Flags;
609 : sal_uInt16 FormatFlags;
610 : sal_Char Reserved[8];
611 :
612 0 : Sc10PatternData(const Sc10PatternData& rData) :
613 0 : ScDataObject( rData )
614 : {
615 0 : strncpy(Name, rData.Name, sizeof(Name));
616 0 : Name[sizeof(Name)-1] = 0;
617 0 : memcpy(&ValueFormat, &rData.ValueFormat, sizeof(ValueFormat));
618 0 : memcpy(&LogFont, &rData.LogFont, sizeof(LogFont));
619 0 : Attr = rData.Attr;
620 0 : Justify = rData.Justify;
621 0 : Frame = rData.Frame;
622 0 : Raster = rData.Raster;
623 0 : nColor = rData.nColor;
624 0 : FrameColor = rData.FrameColor;
625 0 : Flags = rData.Flags;
626 0 : FormatFlags = rData.FormatFlags;
627 0 : memcpy(Reserved, rData.Reserved, sizeof(Reserved));
628 0 : }
629 : Sc10PatternData(SvStream& rStream);
630 0 : virtual ScDataObject* Clone() const SAL_OVERRIDE { return new Sc10PatternData(*this); }
631 : };
632 :
633 :
634 : // Vorlage-Collection
635 0 : class Sc10PatternCollection : public ScCollection
636 : {
637 : protected:
638 : sal_uLong nError;
639 : public:
640 : Sc10PatternCollection(SvStream& rStream);
641 0 : sal_uLong GetError() { return nError; }
642 0 : Sc10PatternData* At(sal_uInt16 nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); }
643 : private:
644 : using ScCollection::At;
645 : };
646 :
647 :
648 : // DatenBank-Daten
649 0 : class Sc10DataBaseData : public ScDataObject
650 : {
651 : public:
652 : Sc10DataBaseRec DataBaseRec;
653 :
654 0 : Sc10DataBaseData(const Sc10DataBaseData& rData) :
655 0 : ScDataObject( rData )
656 : {
657 0 : memcpy(&DataBaseRec, &rData.DataBaseRec, sizeof(DataBaseRec));
658 0 : }
659 : Sc10DataBaseData(SvStream& rStream);
660 0 : virtual ScDataObject* Clone() const SAL_OVERRIDE { return new Sc10DataBaseData(*this); }
661 : };
662 :
663 :
664 : // DatenBank-Collection
665 0 : class Sc10DataBaseCollection : public ScCollection
666 : {
667 : protected:
668 : sal_uLong nError;
669 : sal_Char ActName[32];
670 : public:
671 : Sc10DataBaseCollection(SvStream& rStream);
672 0 : sal_uLong GetError() { return nError; }
673 0 : Sc10DataBaseData* At(sal_uInt16 nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); }
674 : private:
675 : using ScCollection::At;
676 : };
677 :
678 :
679 0 : class Sc10PageData : public ScDataObject
680 : {
681 : public:
682 : Sc10PageFormat aPageFormat;
683 0 : Sc10PageData( const Sc10PageFormat& rFormat ) : aPageFormat(rFormat) {}
684 : bool operator==( const Sc10PageData& rData ) const
685 : { return aPageFormat == rData.aPageFormat; }
686 : virtual ScDataObject* Clone() const SAL_OVERRIDE;
687 : };
688 :
689 : // Seitenformat-Collection
690 0 : class Sc10PageCollection : public ScCollection
691 : {
692 : public:
693 0 : Sc10PageCollection() : ScCollection(1,1) {};
694 0 : Sc10PageData* At(sal_uInt16 nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); }
695 : sal_uInt16 InsertFormat( const Sc10PageFormat& rData );
696 : void PutToDoc( ScDocument* pDoc );
697 : private:
698 : using ScCollection::At;
699 : };
700 :
701 :
702 : class ScfStreamProgressBar;
703 :
704 : // Import-Klasse
705 : class Sc10Import
706 : {
707 : SvStream& rStream;
708 : ScDocument* pDoc;
709 : Sc10Color TextPalette[16];
710 : Sc10Color BackPalette[16];
711 : Sc10Color RasterPalette[16];
712 : Sc10Color FramePalette[16];
713 : Sc10SheetProtect SheetProtect;
714 : Sc10FontCollection* pFontCollection;
715 : Sc10NameCollection* pNameCollection;
716 : Sc10PatternCollection* pPatternCollection;
717 : Sc10DataBaseCollection* pDataBaseCollection;
718 : sal_uLong nError;
719 : SCTAB nShowTab;
720 : ScViewOptions aSc30ViewOpt;
721 : ScfStreamProgressBar* pPrgrsBar;
722 :
723 : public:
724 : Sc10Import( SvStream& rStr, ScDocument* pDocument );
725 : ~Sc10Import();
726 :
727 : sal_uLong Import();
728 : void LoadFileHeader();
729 : void LoadFileInfo();
730 : void LoadEditStateInfo();
731 : void LoadProtect();
732 : void LoadViewColRowBar();
733 : void LoadScrZoom();
734 : void LoadPalette();
735 : void LoadFontCollection();
736 : void LoadNameCollection();
737 : void ImportNameCollection();
738 : void LoadPatternCollection();
739 : void LoadDataBaseCollection();
740 : void LoadTables();
741 : void LoadCol(SCCOL Col, SCTAB Tab);
742 : void LoadColAttr(SCCOL Col, SCTAB Tab);
743 : void LoadAttr(Sc10ColAttr& rAttr);
744 : void ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey);
745 : void LoadObjects();
746 : };
747 :
748 : #endif
749 :
750 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|