LCOV - code coverage report
Current view: top level - libreoffice/sc/source/filter/inc - scflt.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 60 0.0 %
Date: 2012-12-27 Functions: 0 41 0.0 %
Legend: Lines: hit not hit

          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             :     int 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             :     int 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             :     int 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             :     int 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() : pData(NULL) {}
     411           0 :     ~Sc10ColAttr() { delete [] pData; }
     412             : };
     413             : 
     414             : // GraphHeader
     415             : struct Sc10GraphHeader
     416             : {
     417             :     sal_uInt8       Typ;            // Typ der Grafik (Ole-Objekt, Image (Bitmap oder MetaFile), Chart-Object)
     418             :     sal_Int16       CarretX;        // ZellPosition der Grafik
     419             :     sal_Int16       CarretY;
     420             :     sal_Int16       CarretZ;
     421             :     sal_Int32       x;              // x,y Abstand zum Zellrand in Pixel (Pixel weil ich Grafiken in Fenstern ablege)
     422             :     sal_Int32       y;
     423             :     sal_Int32       w;              // w,h Breite und Hoehe in Pixel
     424             :     sal_Int32       h;
     425             :     sal_uInt8       IsRelPos;       // Ist die Position relativ zur Zelle oder absolute in der Tabelle
     426             :     sal_uInt8       DoPrint;        // Soll die Grafik ausgedruckt werden
     427             :     sal_uInt16      FrameType;      // Art der Umrandung um die Grafik (Keine, Einfach, Doppelt, Einfach Dick, Doppelt Dick)
     428             :     sal_uInt8       IsTransparent;  // Soll der Hintergrund gezeichnet werden
     429             :     Sc10Color   FrameColor;     // Umrandungsfarbe als RGB-Wert
     430             :     Sc10Color   BackColor;      // Hintergrundfarbe als RGB-Wert
     431             :     sal_Char    Reserved[32];   // Na was wohl
     432             : };
     433             : 
     434             : // ImageHeader
     435             : struct Sc10ImageHeader
     436             : {
     437             :     sal_Char    FileName[128];  // Dateiname des urspruenglich eingefuegten Bildes
     438             :     sal_Int16   Typ;                // Typ der Grafik (Bitmap oder Metafile)
     439             :     sal_uInt8   Linked;             // Kann nicht vorkommen
     440             :     sal_Int16   x1;                 // Urspruengliche Groesse der Grafik (nur fuer Metafiles)
     441             :     sal_Int16   y1;
     442             :     sal_Int16   x2;
     443             :     sal_Int16   y2;
     444             :     sal_uInt32 Size;                // Groesse der Grafik in BYTES
     445             : };
     446             : 
     447             : // ChartHeader
     448             : struct Sc10ChartHeader
     449             : {
     450             :     sal_Int16   MM;                 // Meatfile Struktur MapMode, Breite, Hoehe
     451             :     sal_Int16   xExt;
     452             :     sal_Int16   yExt;
     453             :     sal_uInt32 Size;                // Groesse der Grafik in BYTES
     454             : };
     455             : 
     456             : // ChartSheetData
     457             : struct Sc10ChartSheetData
     458             : {
     459             :     sal_uInt8       HasTitle;       // Hat das Chart Daten aus der Tabell fuer einen Titel
     460             :     sal_Int16       TitleX;         // Zellposition des Titels
     461             :     sal_Int16       TitleY;
     462             :     sal_uInt8       HasSubTitle;    // Hat das Chart Daten aus der Tabell fuer einen Untertitel
     463             :     sal_Int16       SubTitleX;      // Zellposition des Untertitels
     464             :     sal_Int16       SubTitleY;
     465             :     sal_uInt8       HasLeftTitle;   // Hat das Chart Daten aus der Tabelle fuer einen Linken-Titel
     466             :     sal_Int16       LeftTitleX;     // Zellposition des Linken-Titels
     467             :     sal_Int16       LeftTitleY;
     468             :     sal_uInt8       HasLegend;      // Hat das Chart Daten aus der Tabelle fuer eine Legende
     469             :     sal_Int16       LegendX1;       // Zellen der Legende
     470             :     sal_Int16       LegendY1;
     471             :     sal_Int16       LegendX2;
     472             :     sal_Int16       LegendY2;
     473             :     sal_uInt8       HasLabel;       // Hat das Chart Daten aus der Tabelle fuer die Achsbeschriftung
     474             :     sal_Int16       LabelX1;        // Zellen der Achsbeschriftung
     475             :     sal_Int16       LabelY1;
     476             :     sal_Int16       LabelX2;
     477             :     sal_Int16       LabelY2;
     478             :     sal_Int16       DataX1;         // Zellen der Daten
     479             :     sal_Int16       DataY1;
     480             :     sal_Int16       DataX2;
     481             :     sal_Int16       DataY2;
     482             :     sal_Char    Reserved[64];
     483             : };
     484             : 
     485             : typedef sal_Char Sc10ChartText[30];
     486             : 
     487             : struct Sc10ChartTypeData
     488             : {
     489             :     sal_Int16           NumSets;
     490             :     sal_Int16           NumPoints;
     491             :     sal_Int16           DrawMode;
     492             :     sal_Int16           GraphType;
     493             :     sal_Int16           GraphStyle;
     494             :     sal_Char        GraphTitle[80];
     495             :     sal_Char        BottomTitle[80];
     496             :     sal_Int16           SymbolData[256];
     497             :     sal_Int16           ColorData[256];
     498             :     sal_Int16           ThickLines[256];
     499             :     sal_Int16           PatternData[256];
     500             :     sal_Int16           LinePatternData[256];
     501             :     sal_Int16           NumGraphStyles[11];
     502             :     sal_Int16           ShowLegend;
     503             :     Sc10ChartText   LegendText[256];
     504             :     sal_Int16           ExplodePie;
     505             :     sal_Int16           FontUse;
     506             :     sal_Int16           FontFamily[5];
     507             :     sal_Int16           FontStyle[5];
     508             :     sal_Int16           FontSize[5];
     509             :     sal_Int16           GridStyle;
     510             :     sal_Int16           Labels;
     511             :     sal_Int16           LabelEvery;
     512             :     Sc10ChartText   LabelText[50];
     513             :     sal_Char        LeftTitle[80];
     514             :     sal_Char        Reserved[4646];
     515             : };
     516             : 
     517             : 
     518             : // FontAttribut
     519           0 : class Sc10FontData : public ScDataObject
     520             : {
     521             : public:
     522             :     sal_Int16               Height;
     523             :     sal_uInt8               CharSet;
     524             :     sal_uInt8               PitchAndFamily;
     525             :     sal_Char            FaceName[32];
     526             : 
     527           0 :                         Sc10FontData( const Sc10FontData& rData ) :
     528             :                             ScDataObject( rData ),
     529             :                             Height( rData.Height ),
     530             :                             CharSet( rData.CharSet ),
     531           0 :                             PitchAndFamily( rData.PitchAndFamily )
     532             :                                 {
     533           0 :                                     strncpy( FaceName, rData.FaceName, sizeof(FaceName) );
     534           0 :                                     FaceName[sizeof(FaceName)-1] = 0;
     535           0 :                                 }
     536             :                         Sc10FontData( SvStream& rStream );
     537           0 :     virtual ScDataObject*   Clone() const { return new Sc10FontData(*this); }
     538             : };
     539             : 
     540             : 
     541             : // Font-Collection
     542           0 : class Sc10FontCollection : public ScCollection
     543             : {
     544             : protected:
     545             :     sal_uLong nError;
     546             : public:
     547             :                         Sc10FontCollection( SvStream& rStream );
     548           0 :     sal_uLong               GetError() { return nError; }
     549           0 :     Sc10FontData*       At(sal_uInt16 nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); }
     550             : private:
     551             :     using               ScCollection::At;
     552             : };
     553             : 
     554             : 
     555             : //BereichsDaten
     556           0 : class Sc10NameData : public ScDataObject
     557             : {
     558             : public :
     559             :     sal_Char            Name[32];
     560             :     sal_Char            Reference[64];
     561             :     sal_Char            Reserved[12];
     562             : 
     563           0 :                         Sc10NameData(const Sc10NameData& rData) :
     564           0 :                             ScDataObject( rData )
     565             :                         {
     566           0 :                             strncpy(Name, rData.Name, sizeof(Name));
     567           0 :                             Name[sizeof(Name)-1] = 0;
     568           0 :                             strncpy(Reference, rData.Reference, sizeof(Reference));
     569           0 :                             Reference[sizeof(Reference)-1] = 0;
     570           0 :                             memcpy(Reserved, rData.Reserved, sizeof(Reserved));
     571           0 :                         }
     572             :                         Sc10NameData(SvStream& rStream);
     573           0 :     virtual ScDataObject*   Clone() const { return new Sc10NameData(*this); }
     574             : };
     575             : 
     576             : 
     577             : // Bereichs-Collection
     578           0 : class Sc10NameCollection : public ScCollection
     579             : {
     580             : protected:
     581             :     sal_uLong               nError;
     582             : public:
     583             :                         Sc10NameCollection(SvStream& rStream);
     584           0 : sal_uLong                   GetError() { return nError; }
     585           0 : Sc10NameData*           At(sal_uInt16 nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); }
     586             : private:
     587             :     using               ScCollection::At;
     588             : };
     589             : 
     590             : 
     591             : // Vorlage-Daten
     592           0 : class Sc10PatternData : public ScDataObject
     593             : {
     594             : public:
     595             :     sal_Char            Name[32];
     596             :     Sc10ValueFormat     ValueFormat;
     597             :     Sc10LogFont         LogFont;
     598             :     sal_uInt16              Attr;
     599             :     sal_uInt16              Justify;
     600             :     sal_uInt16              Frame;
     601             :     sal_uInt16              Raster;
     602             :     sal_uInt16              nColor;
     603             :     sal_uInt16              FrameColor;
     604             :     sal_uInt16              Flags;
     605             :     sal_uInt16              FormatFlags;
     606             :     sal_Char            Reserved[8];
     607             : 
     608           0 :                         Sc10PatternData(const Sc10PatternData& rData) :
     609           0 :                             ScDataObject( rData )
     610             :                         {
     611           0 :                             strncpy(Name, rData.Name, sizeof(Name));
     612           0 :                             Name[sizeof(Name)-1] = 0;
     613           0 :                             memcpy(&ValueFormat, &rData.ValueFormat, sizeof(ValueFormat));
     614           0 :                             memcpy(&LogFont, &rData.LogFont, sizeof(LogFont));
     615           0 :                             Attr = rData.Attr;
     616           0 :                             Justify = rData.Justify;
     617           0 :                             Frame = rData.Frame;
     618           0 :                             Raster = rData.Raster;
     619           0 :                             nColor = rData.nColor;
     620           0 :                             FrameColor = rData.FrameColor;
     621           0 :                             Flags = rData.Flags;
     622           0 :                             FormatFlags = rData.FormatFlags;
     623           0 :                             memcpy(Reserved, rData.Reserved, sizeof(Reserved));
     624           0 :                         }
     625             :                         Sc10PatternData(SvStream& rStream);
     626           0 : virtual ScDataObject*       Clone() const { return new Sc10PatternData(*this); }
     627             : };
     628             : 
     629             : 
     630             : // Vorlage-Collection
     631           0 : class Sc10PatternCollection : public ScCollection
     632             : {
     633             : protected:
     634             :     sal_uLong               nError;
     635             : public:
     636             :                         Sc10PatternCollection(SvStream& rStream);
     637           0 :     sal_uLong               GetError() { return nError; }
     638           0 :     Sc10PatternData*    At(sal_uInt16 nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); }
     639             : private:
     640             :     using               ScCollection::At;
     641             : };
     642             : 
     643             : 
     644             : // DatenBank-Daten
     645           0 : class Sc10DataBaseData : public ScDataObject
     646             : {
     647             : public:
     648             :     Sc10DataBaseRec     DataBaseRec;
     649             : 
     650           0 :                         Sc10DataBaseData(const Sc10DataBaseData& rData) :
     651           0 :                             ScDataObject( rData )
     652             :                         {
     653           0 :                             memcpy(&DataBaseRec, &rData.DataBaseRec, sizeof(DataBaseRec));
     654           0 :                         }
     655             :                         Sc10DataBaseData(SvStream& rStream);
     656           0 : virtual ScDataObject*       Clone() const { return new Sc10DataBaseData(*this); }
     657             : };
     658             : 
     659             : 
     660             : // DatenBank-Collection
     661           0 : class Sc10DataBaseCollection : public ScCollection
     662             : {
     663             : protected:
     664             :     sal_uLong               nError;
     665             :     sal_Char            ActName[32];
     666             : public:
     667             :                         Sc10DataBaseCollection(SvStream& rStream);
     668           0 :     sal_uLong               GetError() { return nError; }
     669           0 :     Sc10DataBaseData*   At(sal_uInt16 nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); }
     670             : private:
     671             :     using               ScCollection::At;
     672             : };
     673             : 
     674             : 
     675           0 : class Sc10PageData : public ScDataObject
     676             : {
     677             : public:
     678             :     Sc10PageFormat      aPageFormat;
     679           0 :                         Sc10PageData( const Sc10PageFormat& rFormat ) : aPageFormat(rFormat) {}
     680             :     int                 operator==( const Sc10PageData& rData ) const
     681             :                             { return aPageFormat == rData.aPageFormat; }
     682             :     virtual ScDataObject*   Clone() const;
     683             : };
     684             : 
     685             : // Seitenformat-Collection
     686           0 : class Sc10PageCollection : public ScCollection
     687             : {
     688             : public:
     689           0 :                         Sc10PageCollection() : ScCollection(1,1) {};
     690           0 :     Sc10PageData*       At(sal_uInt16 nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); }
     691             :     sal_uInt16              InsertFormat( const Sc10PageFormat& rData );
     692             :     void                PutToDoc( ScDocument* pDoc );
     693             : private:
     694             :     using               ScCollection::At;
     695             : };
     696             : 
     697             : 
     698             : class ScfStreamProgressBar;
     699             : 
     700             : // Import-Klasse
     701             : class Sc10Import
     702             : {
     703             :     SvStream&               rStream;
     704             :     ScDocument*             pDoc;
     705             :     Sc10Color               TextPalette[16];
     706             :     Sc10Color               BackPalette[16];
     707             :     Sc10Color               RasterPalette[16];
     708             :     Sc10Color               FramePalette[16];
     709             :     Sc10SheetProtect        SheetProtect;
     710             :     Sc10FontCollection*     pFontCollection;
     711             :     Sc10NameCollection*     pNameCollection;
     712             :     Sc10PatternCollection*  pPatternCollection;
     713             :     Sc10DataBaseCollection* pDataBaseCollection;
     714             :     sal_uLong                   nError;
     715             :     SCTAB                   nShowTab;
     716             :     ScViewOptions           aSc30ViewOpt;
     717             :     ScfStreamProgressBar*   pPrgrsBar;
     718             : 
     719             : public:
     720             :                               Sc10Import( SvStream& rStr, ScDocument* pDocument );
     721             :                               ~Sc10Import();
     722             : 
     723             :     sal_uLong                   Import();
     724             :     void                    LoadFileHeader();
     725             :     void                    LoadFileInfo();
     726             :     void                    LoadEditStateInfo();
     727             :     void                    LoadProtect();
     728             :     void                    LoadViewColRowBar();
     729             :     void                    LoadScrZoom();
     730             :     void                    LoadPalette();
     731             :     void                    LoadFontCollection();
     732             :     void                    LoadNameCollection();
     733             :     void                    ImportNameCollection();
     734             :     void                    LoadPatternCollection();
     735             :     void                    LoadDataBaseCollection();
     736             :     void                    LoadTables();
     737             :     void                    LoadCol(SCCOL Col, SCTAB Tab);
     738             :     void                    LoadColAttr(SCCOL Col, SCTAB Tab);
     739             :     void                    LoadAttr(Sc10ColAttr& rAttr);
     740             :     void                    ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey);
     741             :     void                    LoadObjects();
     742             : };
     743             : 
     744             : #endif
     745             : 
     746             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10