LCOV - code coverage report
Current view: top level - sc/source/filter/inc - scflt.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 60 0.0 %
Date: 2012-08-25 Functions: 0 41 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 30 0.0 %

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

Generated by: LCOV version 1.10