LCOV - code coverage report
Current view: top level - sc/source/filter/inc - scflt.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 89 0.0 %
Date: 2014-11-03 Functions: 0 50 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 INCLUDED_SC_SOURCE_FILTER_INC_SCFLT_HXX
      21             : #define INCLUDED_SC_SOURCE_FILTER_INC_SCFLT_HXX
      22             : 
      23             : #include "viewopti.hxx"
      24             : #include "collect.hxx"
      25             : #include <tools/solar.h>
      26             : 
      27             : // Error numbers
      28             : #define errUnknownFormat    1
      29             : #define errUnknownID        2
      30             : #define errOutOfMemory      3
      31             : 
      32             : // Identifiers in 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             : // Row/Column Flags
      45             : #define crfSoftBreak        1
      46             : #define crfHardBreak        2
      47             : #define crfHidden           4
      48             : 
      49             : // Cell types
      50             : #define ctValue             1
      51             : #define ctString            2
      52             : #define ctFormula           3
      53             : #define ctNote              4
      54             : 
      55             : // Font Styles
      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             : // Font Weight
      64             : #define fwNormal            400
      65             : 
      66             : // Font attributes
      67             : #define atNone              0
      68             : #define atBold              1
      69             : #define atItalic            2
      70             : #define atUnderline         4
      71             : #define atStrikeOut         8
      72             : 
      73             : // Horizontal alignment
      74             : #define hjNone              0
      75             : #define hjLeft              1
      76             : #define hjCenter            2
      77             : #define hjRight             3
      78             : 
      79             : // Vertical alignment
      80             : #define vjNone              0
      81             : #define vjTop               1
      82             : #define vjCenter            2
      83             : #define vjBottom            3
      84             : 
      85             : // Allignment flags
      86             : #define ojWordBreak         0x01
      87             : #define ojBottomTop         0x02
      88             : #define ojTopBottom         0x04
      89             : 
      90             : // Cell grid
      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             : // Cell protection
      99             : #define paProtect           1
     100             : #define paHideFormula       2
     101             : #define paHideAll           4
     102             : #define paHidePrint         8
     103             : 
     104             : // Number format flags
     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             : // Date format flags
     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             : // Time format flags
     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             : // Attributes for format template
     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             : // Display flags for table
     154             : #define dfFormula           0x0001      // formula
     155             : #define dfZerro             0x0002      // zero values
     156             : #define dfGrid              0x0004      // grid
     157             : #define dfPageBreak         0x0008      // PageBreak
     158             : #define dfColRowBar         0x0010      // Row/Col heads (Dummy)
     159             : #define dfSyntax            0x0020      // Syntax Highlighting
     160             : #define dfPrintPage         0x0040      // PrintView (Dummy)
     161             : #define dfObjectAll         0x0080      // show objects
     162             : #define dfObjectFrame       0x0100      // objects as place holder
     163             : #define dfObjectNone        0x0200      // do not show objects
     164             : #define dfNoteMark          0x0400      // NoteMark
     165             : #define dfProtectMark       0x0800      // ProtectMark
     166             : 
     167             : // Object types
     168             : #define otNone              0           // see below
     169             : #define otOle               1
     170             : #define otImage             2
     171             : #define otChart             3
     172             : 
     173             : // Grafic types
     174             : #define gtNone              0           // not possible
     175             : #define gtOle               1           // Ole 1.0 Object
     176             : #define gtImage             2           // Image (Bitmap or Metafile)
     177             : #define gtChart             3           // Chart
     178             : 
     179             : // Date/Time
     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             : // Number formats
     191             : struct Sc10ValueFormat
     192             : {
     193             :     sal_uInt8       Format;         // number, currency, percentage,...
     194             :     sal_uInt8       Info;           // number of decimals, or positions, or Date/Time format
     195           0 :     Sc10ValueFormat()
     196             :         : Format(0)
     197           0 :         , Info(0)
     198             :     {
     199           0 :     }
     200             : };
     201             : 
     202             : // Font definition
     203             : struct Sc10LogFont
     204             : {
     205             :     sal_Int16       lfHeight;
     206             :     sal_Int16       lfWidth;
     207             :     sal_Int16       lfEscapement;
     208             :     sal_Int16       lfOrientation;
     209             :     sal_Int16       lfWeight;
     210             :     sal_uInt8       lfItalic;
     211             :     sal_uInt8       lfUnderline;
     212             :     sal_uInt8       lfStrikeOut;
     213             :     sal_uInt8       lfCharSet;
     214             :     sal_uInt8       lfOutPrecision;
     215             :     sal_uInt8       lfClipPrecision;
     216             :     sal_uInt8       lfQuality;
     217             :     sal_uInt8       lfPitchAndFamily;
     218             :     sal_Char    lfFaceName[32];
     219             : 
     220           0 :     Sc10LogFont()
     221             :         : lfHeight(0)
     222             :         , lfWidth(0)
     223             :         , lfEscapement(0)
     224             :         , lfOrientation(0)
     225             :         , lfWeight(0)
     226             :         , lfItalic(0)
     227             :         , lfUnderline(0)
     228             :         , lfStrikeOut(0)
     229             :         , lfCharSet(0)
     230             :         , lfOutPrecision(0)
     231             :         , lfClipPrecision(0)
     232             :         , lfQuality(0)
     233           0 :         , lfPitchAndFamily(0)
     234             :     {
     235           0 :         memset(lfFaceName, 0, sizeof(lfFaceName));
     236           0 :     }
     237             : 
     238             :     bool operator==( const Sc10LogFont& rData ) const;
     239             : };
     240             : 
     241             : // RGB-Color values
     242             : struct Sc10Color
     243             : {
     244             :     sal_uInt8       Dummy;
     245             :     sal_uInt8       Blue;
     246             :     sal_uInt8       Green;
     247             :     sal_uInt8       Red;
     248             :     bool operator==( const Sc10Color& rColor ) const;
     249           0 :     Sc10Color()
     250             :         : Dummy(0)
     251             :         , Blue(0)
     252             :         , Green(0)
     253           0 :         , Red(0)
     254             :     {
     255           0 :     }
     256             : };
     257             : 
     258             : // Block definition
     259             : struct Sc10BlockRect
     260             : {
     261             :     sal_Int16       x1;
     262             :     sal_Int16       y1;
     263             :     sal_Int16       x2;
     264             :     sal_Int16       y2;
     265           0 :     Sc10BlockRect()
     266             :         : x1(0)
     267             :         , y1(0)
     268             :         , x2(0)
     269           0 :         , y2(0)
     270             :     {
     271           0 :     }
     272             : };
     273             : 
     274             : // Data range
     275             : struct Sc10DataBaseRec
     276             : {
     277             :     sal_Char        Name[32];
     278             :     SCTAB           Tab;
     279             :     Sc10BlockRect   Block;
     280             :     sal_uInt8           RowHeader;
     281             :     sal_Int16           SortField0;
     282             :     sal_uInt8           SortUpOrder0;
     283             :     sal_Int16           SortField1;
     284             :     sal_uInt8           SortUpOrder1;
     285             :     sal_Int16           SortField2;
     286             :     sal_uInt8           SortUpOrder2;
     287             :     sal_uInt8           IncludeFormat;
     288             :     sal_Int16           QueryField0;
     289             :     sal_Int16           QueryOp0;
     290             :     sal_uInt8           QueryByString0;
     291             :     sal_Char        QueryString0[64];
     292             :     double          QueryValue0;
     293             :     sal_Int16           QueryConnect1;
     294             :     sal_Int16           QueryField1;
     295             :     sal_Int16           QueryOp1;
     296             :     sal_uInt8           QueryByString1;
     297             :     sal_Char        QueryString1[64];
     298             :     double          QueryValue1;
     299             :     sal_Int16           QueryConnect2;
     300             :     sal_Int16           QueryField2;
     301             :     sal_Int16           QueryOp2;
     302             :     sal_uInt8           QueryByString2;
     303             :     sal_Char        QueryString2[64];
     304             :     double          QueryValue2;
     305           0 :     Sc10DataBaseRec()
     306             :         : Tab(0)
     307             :         , RowHeader(0)
     308             :         , SortField0(0)
     309             :         , SortUpOrder0(0)
     310             :         , SortField1(0)
     311             :         , SortUpOrder1(0)
     312             :         , SortField2(0)
     313             :         , SortUpOrder2(0)
     314             :         , IncludeFormat(0)
     315             :         , QueryField0(0)
     316             :         , QueryOp0(0)
     317             :         , QueryByString0(0)
     318             :         , QueryValue0(0.0)
     319             :         , QueryConnect1(0)
     320             :         , QueryField1(0)
     321             :         , QueryOp1(0)
     322             :         , QueryByString1(0)
     323             :         , QueryValue1(0.0)
     324             :         , QueryConnect2(0)
     325             :         , QueryField2(0)
     326             :         , QueryOp2(0)
     327             :         , QueryByString2(0)
     328           0 :         , QueryValue2(0.0)
     329             :     {
     330           0 :         memset(Name, 0, sizeof(Name));
     331           0 :         memset(QueryString0, 0, sizeof(QueryString0));
     332           0 :         memset(QueryString1, 0, sizeof(QueryString1));
     333           0 :         memset(QueryString2, 0, sizeof(QueryString2));
     334           0 :     }
     335             : };
     336             : 
     337             : // Header/Footer
     338           0 : struct Sc10HeadFootLine
     339             : {
     340             :     sal_Char        Title[128];
     341             :     Sc10LogFont     LogFont;
     342             :     sal_uInt8           HorJustify;
     343             :     sal_uInt8           VerJustify;
     344             :     sal_uInt16          Raster;
     345             :     sal_uInt16          Frame;
     346             :     Sc10Color       TextColor;
     347             :     Sc10Color       BackColor;
     348             :     Sc10Color       RasterColor;
     349             :     sal_uInt16          FrameColor; // Nibble coded colors left-top right-bottom
     350             :     sal_uInt16          Reserved;
     351             : 
     352             :     bool operator==( const Sc10HeadFootLine& rData ) const;
     353             : };
     354             : 
     355             : // page format
     356           0 : struct Sc10PageFormat
     357             : {
     358             :     Sc10HeadFootLine    HeadLine;
     359             :     Sc10HeadFootLine    FootLine;
     360             :     sal_Int16               Orientation;
     361             :     sal_Int16               Width;
     362             :     sal_Int16               Height;
     363             :     sal_Int16               NonPrintableX;
     364             :     sal_Int16               NonPrintableY;
     365             :     sal_Int16               Left;
     366             :     sal_Int16               Top;
     367             :     sal_Int16               Right;
     368             :     sal_Int16               Bottom;
     369             :     sal_Int16               Head;
     370             :     sal_Int16               Foot;
     371             :     sal_uInt8               HorCenter;
     372             :     sal_uInt8               VerCenter;
     373             :     sal_uInt8               PrintGrid;
     374             :     sal_uInt8               PrintColRow;
     375             :     sal_uInt8               PrintNote;
     376             :     sal_uInt8               TopBottomDir;
     377             :     sal_Char            PrintAreaName[32];
     378             :     Sc10BlockRect       PrintArea;
     379             :     sal_Char            PrnZoom[6]; // Pascal 6 Byte RealNumber
     380             :     SCTAB               FirstPageNo;
     381             :     sal_Int16               RowRepeatStart;
     382             :     sal_Int16               RowRepeatEnd;
     383             :     sal_Int16               ColRepeatStart;
     384             :     sal_Int16               ColRepeatEnd;
     385             :     sal_Char            Reserved[26];
     386             : 
     387             :     bool operator==( const Sc10PageFormat& rData ) const;
     388             : };
     389             : 
     390             : // Table protection
     391             : struct Sc10TableProtect
     392             : {
     393             :     sal_Char    PassWord[16];
     394             :     sal_uInt16      Flags;
     395             :     sal_uInt8       Protect;
     396             : };
     397             : 
     398             : // Document protection
     399             : struct Sc10SheetProtect
     400             : {
     401             :     sal_Char    PassWord[16];
     402             :     sal_uInt16      Flags;
     403             :     sal_uInt8       Protect;
     404           0 :     Sc10SheetProtect()
     405             :         : Flags(0)
     406           0 :         , Protect(0)
     407             :     {
     408           0 :         memset(PassWord, 0, sizeof(PassWord));
     409           0 :     }
     410             : };
     411             : 
     412             : // FileHeader StarCalc 1.0 Datei
     413             : struct Sc10FileHeader
     414             : {
     415             :     sal_Char    CopyRight[30];
     416             :     sal_uInt16      Version;
     417             :     sal_Char    Reserved[32];
     418             : };
     419             : 
     420             : // User-Defined File Definition
     421             : struct Sc10FileInfo
     422             : {
     423             :     sal_Char        Title[64];
     424             :     sal_Char        Thema[64];
     425             :     sal_Char        Keys[64];
     426             :     sal_Char        Note[256];
     427             :     sal_Char        InfoLabel0[16];
     428             :     sal_Char        InfoLabel1[16];
     429             :     sal_Char        InfoLabel2[16];
     430             :     sal_Char        InfoLabel3[16];
     431             :     sal_Char        Info0[32];
     432             :     sal_Char        Info1[32];
     433             :     sal_Char        Info2[32];
     434             :     sal_Char        Info3[32];
     435             :     sal_Char        CreateAuthor[64];
     436             :     sal_Char        ChangeAuthor[64];
     437             :     sal_Char        PrintAuthor[64];
     438             :     Sc10DateTime    CreateDate;
     439             :     Sc10DateTime    ChangeDate;
     440             :     Sc10DateTime    PrintDate;
     441             :     sal_uInt32      PageCount;
     442             :     sal_uInt32      ChartCount;
     443             :     sal_uInt32      PictureCount;
     444             :     sal_uInt32      GraphCount;
     445             :     sal_uInt32      OleCount;
     446             :     sal_uInt32      NoteCount;
     447             :     sal_uInt32      TextCellCount;
     448             :     sal_uInt32      ValueCellCount;
     449             :     sal_uInt32      FormulaCellCount;
     450             :     sal_uInt32      CellCount;
     451             :     sal_Char        Reserved[52];
     452             : };
     453             : 
     454             : // Last Cursor position
     455             : struct Sc10EditStateInfo
     456             : {
     457             :     // Cursor Position
     458             :     sal_uInt16      CarretX;
     459             :     sal_uInt16      CarretY;
     460             :     sal_uInt16      CarretZ;
     461             :     // left-top corner of the table
     462             :     sal_uInt16      DeltaX;
     463             :     sal_uInt16      DeltaY;
     464             :     sal_uInt16      DeltaZ;
     465             :     // redundant in StarCalc 3.0
     466             :     sal_uInt8       DataBaseMode;
     467             :     sal_Char    Reserved[51];
     468             : };
     469             : 
     470             : // Attribut entry
     471             : struct Sc10ColData
     472             : {
     473             :     sal_uInt16      Row;
     474             :     sal_uInt16      Value;
     475             : };
     476             : 
     477             : // Cell-Attribute definition
     478             : struct Sc10ColAttr
     479             : {
     480             :     sal_uInt16          Count;
     481             :     Sc10ColData*    pData;
     482             : 
     483           0 :     Sc10ColAttr()
     484             :         : Count(0)
     485           0 :         , pData(NULL)
     486             :     {
     487           0 :     }
     488           0 :     ~Sc10ColAttr() { delete [] pData; }
     489             : };
     490             : 
     491             : // GraphHeader
     492           0 : struct Sc10GraphHeader
     493             : {
     494             :     sal_uInt8       Typ;            // Type of Grafik (Ole-Objekt, Image (Bitmap of MetaFile), Chart-Object)
     495             :     sal_Int16       CarretX;        // Cell Position of Grafik
     496             :     sal_Int16       CarretY;
     497             :     sal_Int16       CarretZ;
     498             :     sal_Int32       x;              // x,y distance to cell border in pixels (pixels, as Grafics are stored in window)
     499             :     sal_Int32       y;
     500             :     sal_Int32       w;              // w,h width and height in pixels
     501             :     sal_Int32       h;
     502             :     sal_uInt8       IsRelPos;       // position relativ to cell, or absolute in the table
     503             :     sal_uInt8       DoPrint;        // print Grafic?
     504             :     sal_uInt16      FrameType;      // Frame type around Grafic (none, simple, double, simple thick, double thick)
     505             :     sal_uInt8       IsTransparent;  // show background?
     506             :     Sc10Color   FrameColor;         // FrameColor as RGB value
     507             :     Sc10Color   BackColor;          // BackGroundColor as RGB value
     508             :     sal_Char    Reserved[32];       // Reserved
     509             : };
     510             : 
     511             : // ImageHeader
     512             : struct Sc10ImageHeader
     513             : {
     514             :     sal_Char    FileName[128];      // file name of the original inserted image
     515             :     sal_Int16   Typ;                // image type (Bitmap or Metafile)
     516             :     sal_uInt8   Linked;             // not possible
     517             :     sal_Int16   x1;                 // original image size (only for Metafiles)
     518             :     sal_Int16   y1;
     519             :     sal_Int16   x2;
     520             :     sal_Int16   y2;
     521             :     sal_uInt32 Size;                // image size in BYTES
     522             : };
     523             : 
     524             : // ChartHeader
     525             : struct Sc10ChartHeader
     526             : {
     527             :     sal_Int16   MM;                 // Meatfile structure MapMode, Width, Hight
     528             :     sal_Int16   xExt;
     529             :     sal_Int16   yExt;
     530             :     sal_uInt32 Size;                // image size in BYTES
     531             : };
     532             : 
     533             : // ChartSheetData
     534             : struct Sc10ChartSheetData
     535             : {
     536             :     sal_uInt8       HasTitle;       // has the Chart a title in the table
     537             :     sal_Int16       TitleX;         // cell position of title
     538             :     sal_Int16       TitleY;
     539             :     sal_uInt8       HasSubTitle;    // has the Chart a sub-title in the table
     540             :     sal_Int16       SubTitleX;      // cell position of sub-title
     541             :     sal_Int16       SubTitleY;
     542             :     sal_uInt8       HasLeftTitle;   // has the Chart a left-title in the table
     543             :     sal_Int16       LeftTitleX;     // cell position of left-title
     544             :     sal_Int16       LeftTitleY;
     545             :     sal_uInt8       HasLegend;      // has the Chart a legend in the table
     546             :     sal_Int16       LegendX1;       // cells for legend
     547             :     sal_Int16       LegendY1;
     548             :     sal_Int16       LegendX2;
     549             :     sal_Int16       LegendY2;
     550             :     sal_uInt8       HasLabel;       // has the Chart axis labels in the table
     551             :     sal_Int16       LabelX1;        // cells for axis labels
     552             :     sal_Int16       LabelY1;
     553             :     sal_Int16       LabelX2;
     554             :     sal_Int16       LabelY2;
     555             :     sal_Int16       DataX1;         // cells for Data
     556             :     sal_Int16       DataY1;
     557             :     sal_Int16       DataX2;
     558             :     sal_Int16       DataY2;
     559             :     sal_Char    Reserved[64];
     560             : };
     561             : 
     562             : typedef sal_Char Sc10ChartText[30];
     563             : 
     564             : struct Sc10ChartTypeData
     565             : {
     566             :     sal_Int16           NumSets;
     567             :     sal_Int16           NumPoints;
     568             :     sal_Int16           DrawMode;
     569             :     sal_Int16           GraphType;
     570             :     sal_Int16           GraphStyle;
     571             :     sal_Char        GraphTitle[80];
     572             :     sal_Char        BottomTitle[80];
     573             :     sal_Int16           SymbolData[256];
     574             :     sal_Int16           ColorData[256];
     575             :     sal_Int16           ThickLines[256];
     576             :     sal_Int16           PatternData[256];
     577             :     sal_Int16           LinePatternData[256];
     578             :     sal_Int16           NumGraphStyles[11];
     579             :     sal_Int16           ShowLegend;
     580             :     Sc10ChartText   LegendText[256];
     581             :     sal_Int16           ExplodePie;
     582             :     sal_Int16           FontUse;
     583             :     sal_Int16           FontFamily[5];
     584             :     sal_Int16           FontStyle[5];
     585             :     sal_Int16           FontSize[5];
     586             :     sal_Int16           GridStyle;
     587             :     sal_Int16           Labels;
     588             :     sal_Int16           LabelEvery;
     589             :     Sc10ChartText   LabelText[50];
     590             :     sal_Char        LeftTitle[80];
     591             :     sal_Char        Reserved[4646];
     592             : };
     593             : 
     594             : // FontAttribut
     595           0 : class Sc10FontData : public ScDataObject
     596             : {
     597             : public:
     598             :     sal_Int16               Height;
     599             :     sal_uInt8               CharSet;
     600             :     sal_uInt8               PitchAndFamily;
     601             :     sal_Char            FaceName[32];
     602             : 
     603           0 :     Sc10FontData( const Sc10FontData& rData )
     604             :         : ScDataObject( rData )
     605             :         , Height( rData.Height )
     606             :         , CharSet( rData.CharSet )
     607           0 :         , PitchAndFamily( rData.PitchAndFamily )
     608             :     {
     609           0 :         strncpy( FaceName, rData.FaceName, sizeof(FaceName) );
     610           0 :         FaceName[sizeof(FaceName)-1] = 0;
     611           0 :     }
     612             :     Sc10FontData( SvStream& rStream );
     613           0 :     virtual ScDataObject*   Clone() const SAL_OVERRIDE { return new Sc10FontData(*this); }
     614             : };
     615             : 
     616             : // Font-Collection
     617           0 : class Sc10FontCollection : public ScCollection
     618             : {
     619             : protected:
     620             :     sal_uLong nError;
     621             : public:
     622             :                         Sc10FontCollection( SvStream& rStream );
     623           0 :     sal_uLong           GetError() { return nError; }
     624           0 :     Sc10FontData*       At(sal_uInt16 nIndex) { return static_cast<Sc10FontData*>(ScCollection::At(nIndex)); }
     625             : private:
     626             :     using               ScCollection::At;
     627             : };
     628             : 
     629             : //Range-Data
     630           0 : class Sc10NameData : public ScDataObject
     631             : {
     632             : public :
     633             :     sal_Char            Name[32];
     634             :     sal_Char            Reference[64];
     635             :     sal_Char            Reserved[12];
     636             : 
     637           0 :                         Sc10NameData(const Sc10NameData& rData) :
     638           0 :                             ScDataObject( rData )
     639             :                         {
     640           0 :                             strncpy(Name, rData.Name, sizeof(Name));
     641           0 :                             Name[sizeof(Name)-1] = 0;
     642           0 :                             strncpy(Reference, rData.Reference, sizeof(Reference));
     643           0 :                             Reference[sizeof(Reference)-1] = 0;
     644           0 :                             memcpy(Reserved, rData.Reserved, sizeof(Reserved));
     645           0 :                         }
     646             :                         Sc10NameData(SvStream& rStream);
     647           0 :     virtual ScDataObject*   Clone() const SAL_OVERRIDE { return new Sc10NameData(*this); }
     648             : };
     649             : 
     650             : // Range-Collection
     651           0 : class Sc10NameCollection : public ScCollection
     652             : {
     653             : protected:
     654             :     sal_uLong           nError;
     655             : public:
     656             :                         Sc10NameCollection(SvStream& rStream);
     657           0 :     sal_uLong           GetError() { return nError; }
     658           0 :     Sc10NameData*       At(sal_uInt16 nIndex) { return static_cast<Sc10NameData*>(ScCollection::At(nIndex)); }
     659             : private:
     660             :     using               ScCollection::At;
     661             : };
     662             : 
     663             : // Template-Data
     664           0 : class Sc10PatternData : public ScDataObject
     665             : {
     666             : public:
     667             :     sal_Char            Name[32];
     668             :     Sc10ValueFormat     ValueFormat;
     669             :     Sc10LogFont         LogFont;
     670             :     sal_uInt16              Attr;
     671             :     sal_uInt16              Justify;
     672             :     sal_uInt16              Frame;
     673             :     sal_uInt16              Raster;
     674             :     sal_uInt16              nColor;
     675             :     sal_uInt16              FrameColor;
     676             :     sal_uInt16              Flags;
     677             :     sal_uInt16              FormatFlags;
     678             :     sal_Char            Reserved[8];
     679             : 
     680           0 :                         Sc10PatternData(const Sc10PatternData& rData) :
     681           0 :                             ScDataObject( rData )
     682             :                         {
     683           0 :                             strncpy(Name, rData.Name, sizeof(Name));
     684           0 :                             Name[sizeof(Name)-1] = 0;
     685           0 :                             memcpy(&ValueFormat, &rData.ValueFormat, sizeof(ValueFormat));
     686           0 :                             memcpy(&LogFont, &rData.LogFont, sizeof(LogFont));
     687           0 :                             Attr = rData.Attr;
     688           0 :                             Justify = rData.Justify;
     689           0 :                             Frame = rData.Frame;
     690           0 :                             Raster = rData.Raster;
     691           0 :                             nColor = rData.nColor;
     692           0 :                             FrameColor = rData.FrameColor;
     693           0 :                             Flags = rData.Flags;
     694           0 :                             FormatFlags = rData.FormatFlags;
     695           0 :                             memcpy(Reserved, rData.Reserved, sizeof(Reserved));
     696           0 :                         }
     697             :                         Sc10PatternData(SvStream& rStream);
     698           0 : virtual ScDataObject*       Clone() const SAL_OVERRIDE { return new Sc10PatternData(*this); }
     699             : };
     700             : 
     701             : // Template-Collection
     702           0 : class Sc10PatternCollection : public ScCollection
     703             : {
     704             : protected:
     705             :     sal_uLong           nError;
     706             : public:
     707             :                         Sc10PatternCollection(SvStream& rStream);
     708           0 :     sal_uLong           GetError() { return nError; }
     709           0 :     Sc10PatternData*    At(sal_uInt16 nIndex) { return static_cast<Sc10PatternData*>(ScCollection::At(nIndex)); }
     710             : private:
     711             :     using               ScCollection::At;
     712             : };
     713             : 
     714             : // DataBank-Data
     715           0 : class Sc10DataBaseData : public ScDataObject
     716             : {
     717             : public:
     718             :     Sc10DataBaseRec     DataBaseRec;
     719             : 
     720           0 :                         Sc10DataBaseData(const Sc10DataBaseData& rData) :
     721           0 :                             ScDataObject( rData )
     722             :                         {
     723           0 :                             memcpy(&DataBaseRec, &rData.DataBaseRec, sizeof(DataBaseRec));
     724           0 :                         }
     725             :                         Sc10DataBaseData(SvStream& rStream);
     726           0 : virtual ScDataObject*       Clone() const SAL_OVERRIDE { return new Sc10DataBaseData(*this); }
     727             : };
     728             : 
     729             : // DataBank-Collection
     730           0 : class Sc10DataBaseCollection : public ScCollection
     731             : {
     732             : protected:
     733             :     sal_uLong           nError;
     734             :     sal_Char            ActName[32];
     735             : public:
     736             :                         Sc10DataBaseCollection(SvStream& rStream);
     737           0 :     sal_uLong           GetError() { return nError; }
     738           0 :     Sc10DataBaseData*   At(sal_uInt16 nIndex) { return static_cast<Sc10DataBaseData*>(ScCollection::At(nIndex)); }
     739             : private:
     740             :     using               ScCollection::At;
     741             : };
     742             : 
     743           0 : class Sc10PageData : public ScDataObject
     744             : {
     745             : public:
     746             :     Sc10PageFormat      aPageFormat;
     747           0 :                         Sc10PageData( const Sc10PageFormat& rFormat ) : aPageFormat(rFormat) {}
     748             :     bool                operator==( const Sc10PageData& rData ) const
     749             :                             { return aPageFormat == rData.aPageFormat; }
     750             :     virtual ScDataObject*   Clone() const SAL_OVERRIDE;
     751             : };
     752             : 
     753             : // PageFormat-Collection
     754           0 : class Sc10PageCollection : public ScCollection
     755             : {
     756             : public:
     757           0 :                         Sc10PageCollection() : ScCollection(1,1) {};
     758           0 :     Sc10PageData*       At(sal_uInt16 nIndex) { return static_cast<Sc10PageData*>(ScCollection::At(nIndex)); }
     759             :     sal_uInt16              InsertFormat( const Sc10PageFormat& rData );
     760             :     void                PutToDoc( ScDocument* pDoc );
     761             : private:
     762             :     using               ScCollection::At;
     763             : };
     764             : 
     765             : class ScfStreamProgressBar;
     766             : 
     767             : // Import-Class
     768             : class Sc10Import
     769             : {
     770             :     SvStream&               rStream;
     771             :     ScDocument*             pDoc;
     772             :     Sc10Color               TextPalette[16];
     773             :     Sc10Color               BackPalette[16];
     774             :     Sc10Color               RasterPalette[16];
     775             :     Sc10Color               FramePalette[16];
     776             :     Sc10SheetProtect        SheetProtect;
     777             :     Sc10FontCollection*     pFontCollection;
     778             :     Sc10NameCollection*     pNameCollection;
     779             :     Sc10PatternCollection*  pPatternCollection;
     780             :     Sc10DataBaseCollection* pDataBaseCollection;
     781             :     sal_uLong                   nError;
     782             :     SCTAB                   nShowTab;
     783             :     ScViewOptions           aSc30ViewOpt;
     784             :     ScfStreamProgressBar*   pPrgrsBar;
     785             : 
     786             : public:
     787             :                               Sc10Import( SvStream& rStr, ScDocument* pDocument );
     788             :                               ~Sc10Import();
     789             : 
     790             :     sal_uLong                   Import();
     791             :     void                    LoadFileHeader();
     792             :     void                    LoadFileInfo();
     793             :     void                    LoadEditStateInfo();
     794             :     void                    LoadProtect();
     795             :     void                    LoadViewColRowBar();
     796             :     void                    LoadScrZoom();
     797             :     void                    LoadPalette();
     798             :     void                    LoadFontCollection();
     799             :     void                    LoadNameCollection();
     800             :     void                    ImportNameCollection();
     801             :     void                    LoadPatternCollection();
     802             :     void                    LoadDataBaseCollection();
     803             :     void                    LoadTables();
     804             :     void                    LoadCol(SCCOL Col, SCTAB Tab);
     805             :     void                    LoadColAttr(SCCOL Col, SCTAB Tab);
     806             :     void                    LoadAttr(Sc10ColAttr& rAttr);
     807             :     void                    ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey);
     808             :     void                    LoadObjects();
     809             : };
     810             : 
     811             : #endif
     812             : 
     813             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10