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

           Branch data     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 _SGFBRAM_HXX
      21                 :            : #define _SGFBRAM_HXX
      22                 :            : 
      23                 :            : #include <tools/solar.h>
      24                 :            : 
      25                 :            : #define SgfBitImag0   1 /* Bitmap                      */
      26                 :            : #define SgfBitImag1   4 /* Bitmap                      */
      27                 :            : #define SgfBitImag2   5 /* Bitmap                      */
      28                 :            : #define SgfBitImgMo   6 /* Monochrome Bitmap           */
      29                 :            : #define SgfSimpVect   2 /* Einfaches Vectorformat      */
      30                 :            : #define SgfPostScrp   3 /* Postscript file             */
      31                 :            : #define SgfStarDraw   7 /* StarDraw SGV-Datei          */
      32                 :            : #define SgfDontKnow 255 /* Unbekannt oder kein SGF/SGV */
      33                 :            : 
      34                 :            : // Konstanten fr SgfHeader.SwGrCol
      35                 :            : #define SgfBlckWhit 1 /* Schwarz/Wei?Bild                  Ä¿ SimpVector,  */
      36                 :            : #define SgfGrayscal 2 /* Bild mit Graustufen                 ?StarDraw und */
      37                 :            : #define Sgf16Colors 3 /* Farbbild (16 Farben)               ÄÙ Bit Image    */
      38                 :            : #define SgfVectFarb 4 /* Farben fr Linien verwenden        Ä¿              */
      39                 :            : #define SgfVectGray 5 /* Graustufen fr Linien verwenden     ?Nur fr      */
      40                 :            : #define SgfVectWdth 6 /* Strichst„rken fr Linien verwenden ÄÙ SimpVector   */
      41                 :            : 
      42                 :            : 
      43                 :            : #define SgfHeaderSize 42
      44                 :            : class SgfHeader
      45                 :            : {
      46                 :            : public:
      47                 :            :     sal_uInt16 Magic;
      48                 :            :     sal_uInt16 Version;
      49                 :            :     sal_uInt16 Typ;
      50                 :            :     sal_uInt16 Xsize;
      51                 :            :     sal_uInt16 Ysize;
      52                 :            :     sal_Int16  Xoffs;
      53                 :            :     sal_Int16  Yoffs;
      54                 :            :     sal_uInt16 Planes;    // Layer
      55                 :            :     sal_uInt16 SwGrCol;
      56                 :            :     char   Autor[10];
      57                 :            :     char   Programm[10];
      58                 :            :     sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (38 mod 4 =2) !
      59                 :            : 
      60                 :            :     sal_uInt32 GetOffset();
      61                 :            :     friend SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead);
      62                 :            :     sal_Bool   ChkMagic();
      63                 :            : };
      64                 :            : 
      65                 :            : #define SgfEntrySize 22
      66                 :            : class SgfEntry
      67                 :            : {
      68                 :            : public:
      69                 :            :     sal_uInt16 Typ;
      70                 :            :     sal_uInt16 iFrei;
      71                 :            :     sal_uInt16 lFreiLo,lFreiHi;
      72                 :            :     char   cFrei[10];
      73                 :            :     sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (18 mod 4 =2) !
      74                 :            : 
      75                 :            :     sal_uInt32 GetOffset();
      76                 :            :     friend SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr);
      77                 :            : };
      78                 :            : 
      79                 :            : #define SgfVectorSize 10
      80                 :            : class SgfVector
      81                 :            : {
      82                 :            : public:
      83                 :            :     sal_uInt16 Flag;
      84                 :            :     sal_Int16 x;
      85                 :            :     sal_Int16 y;
      86                 :            :     sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (6 mod 4 =2) !
      87                 :            : 
      88                 :            :     friend SvStream& operator>>(SvStream& rIStream, SgfVector& rEntr);
      89                 :            : };
      90                 :            : 
      91                 :            : extern long SgfVectXofs;
      92                 :            : extern long SgfVectYofs;
      93                 :            : extern long SgfVectXmul;
      94                 :            : extern long SgfVectYmul;
      95                 :            : extern long SgfVectXdiv;
      96                 :            : extern long SgfVectYdiv;
      97                 :            : extern sal_Bool SgfVectScal;
      98                 :            : 
      99                 :            : ////////////////////////////////////////////////////////////////////////////////////////////////////
     100                 :            : // Windows BMP /////////////////////////////////////////////////////////////////////////////////////
     101                 :            : ////////////////////////////////////////////////////////////////////////////////////////////////////
     102                 :            : 
     103                 :            : #define BmpFileHeaderSize 14
     104                 :            : class BmpFileHeader
     105                 :            : {
     106                 :            : public:
     107                 :            :     sal_uInt16 Typ;            // = "BM"
     108                 :            :     sal_uInt16 SizeLo,SizeHi;  // Filesize in Bytes
     109                 :            :     sal_uInt16 Reserve1;       // Reserviert
     110                 :            :     sal_uInt16 Reserve2;       // Reserviert
     111                 :            :     sal_uInt16 OfsLo,OfsHi;    // Offset?
     112                 :            : 
     113                 :            :     void   SetSize(sal_uInt32 Size);
     114                 :            :     void   SetOfs(sal_uInt32 Size);
     115                 :            :     sal_uInt32 GetOfs();
     116                 :            :     friend SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead);
     117                 :            : };
     118                 :            : 
     119                 :            : #define BmpInfoHeaderSize 40
     120                 :            : class BmpInfoHeader
     121                 :            : {
     122                 :            : public:
     123                 :            :     sal_uInt32 Size;       // GrӇe des BmpInfoHeaders
     124                 :            :     sal_Int32  Width;      // Breite in Pixel
     125                 :            :     sal_Int32  Hight;      // H”he in Pixel
     126                 :            :     sal_uInt16 Planes;     // Anzahl der Planes (immer 1)
     127                 :            :     sal_uInt16 PixBits;    // Anzahl der Bit je Pixel (1,4,8,oder 24)
     128                 :            :     sal_uInt32 Compress;   // Datenkompression
     129                 :            :     sal_uInt32 ImgSize;    // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
     130                 :            :     sal_Int32  xDpmm;      // Dot per Meter (0 ist erlaubt)
     131                 :            :     sal_Int32  yDpmm;      // Dot per Meter (0 ist erlaubt)
     132                 :            :     sal_uInt32 ColUsed;    // Anzahl der verwendeten Farben (0=alle)
     133                 :            :     sal_uInt32 ColMust;    // Anzahl der wichtigen Farben (0=alle)
     134                 :            : 
     135                 :            :     friend SvStream& operator<<(SvStream& rOStream, BmpInfoHeader& rHead);
     136                 :            : };
     137                 :            : 
     138                 :            : #define RGBQuadSize 4
     139                 :            : class RGBQuad {
     140                 :            : private:
     141                 :            :     sal_uInt8 Red;
     142                 :            :     sal_uInt8 Grn;
     143                 :            :     sal_uInt8 Blu;
     144                 :            :     sal_uInt8 Fil;
     145                 :            : public:
     146                 :          0 :     RGBQuad(sal_uInt8 R, sal_uInt8 G, sal_uInt8 B) { Red=R; Grn=G; Blu=B; Fil=0; }
     147                 :            : };
     148                 :            : 
     149                 :            : #endif //_SGFBRAM_HXX
     150                 :            : 
     151                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10