LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwpsdwdrawheader.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 40 0.0 %
Date: 2014-11-03 Functions: 0 12 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             :  *
       4             :  *  The Contents of this file are made available subject to the terms of
       5             :  *  either of the following licenses
       6             :  *
       7             :  *         - GNU Lesser General Public License Version 2.1
       8             :  *         - Sun Industry Standards Source License Version 1.1
       9             :  *
      10             :  *  Sun Microsystems Inc., October, 2000
      11             :  *
      12             :  *  GNU Lesser General Public License Version 2.1
      13             :  *  =============================================
      14             :  *  Copyright 2000 by Sun Microsystems, Inc.
      15             :  *  901 San Antonio Road, Palo Alto, CA 94303, USA
      16             :  *
      17             :  *  This library is free software; you can redistribute it and/or
      18             :  *  modify it under the terms of the GNU Lesser General Public
      19             :  *  License version 2.1, as published by the Free Software Foundation.
      20             :  *
      21             :  *  This library is distributed in the hope that it will be useful,
      22             :  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
      23             :  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      24             :  *  Lesser General Public License for more details.
      25             :  *
      26             :  *  You should have received a copy of the GNU Lesser General Public
      27             :  *  License along with this library; if not, write to the Free Software
      28             :  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
      29             :  *  MA  02111-1307  USA
      30             :  *
      31             :  *
      32             :  *  Sun Industry Standards Source License Version 1.1
      33             :  *  =================================================
      34             :  *  The contents of this file are subject to the Sun Industry Standards
      35             :  *  Source License Version 1.1 (the "License"); You may not use this file
      36             :  *  except in compliance with the License. You may obtain a copy of the
      37             :  *  License at http://www.openoffice.org/license.html.
      38             :  *
      39             :  *  Software provided under this License is provided on an "AS IS" basis,
      40             :  *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
      41             :  *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
      42             :  *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
      43             :  *  See the License for the specific provisions governing your rights and
      44             :  *  obligations concerning the Software.
      45             :  *
      46             :  *  The Initial Developer of the Original Code is: IBM Corporation
      47             :  *
      48             :  *  Copyright: 2008 by IBM Corporation
      49             :  *
      50             :  *  All Rights Reserved.
      51             :  *
      52             :  *  Contributor(s): _______________________________________
      53             :  *
      54             :  *
      55             :  ************************************************************************/
      56             : /**
      57             :  * @file
      58             :  * For LWP filter architecture prototype
      59             :  * The file declares structures and enums used by Lwp-Drawing-Module
      60             :  */
      61             : 
      62             : #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWDRAWHEADER_HXX
      63             : #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWDRAWHEADER_HXX
      64             : 
      65             : #include "lwpheader.hxx"
      66             : #include "lwptools.hxx"
      67             : 
      68             : const sal_uInt8 DRAW_FACESIZE = 32;
      69             : const double THRESHOLD = 0.0001;
      70             : 
      71             : enum DrawObjectType
      72             : {
      73             :     OT_UNDEFINED   = 0,
      74             : 
      75             :     OT_SELECT      = 0,
      76             :     OT_HAND        = 1,
      77             :     OT_LINE        = 2,
      78             :     OT_PERPLINE    = 3,
      79             :     OT_POLYLINE    = 4,
      80             :     OT_POLYGON     = 5,
      81             :     OT_RECT        = 6,
      82             :     OT_SQUARE      = 7,
      83             :     OT_RNDRECT     = 8,
      84             :     OT_RNDSQUARE   = 9,
      85             :     OT_OVAL        = 10,
      86             :     OT_CIRCLE      = 11,
      87             :     OT_ARC         = 12,
      88             :     OT_TEXT        = 13,
      89             :     OT_GROUP       = 14,
      90             :     OT_CHART       = 15,
      91             :     OT_METAFILE    = 16,
      92             :     OT_METAFILEIMG = 17,
      93             :     OT_BITMAP      = 18,
      94             :     OT_TEXTART     = 19,
      95             :     OT_BIGBITMAP   = 20
      96             : };
      97             : 
      98             : enum DrawFillType
      99             : {
     100             :     FT_TRANSPARENT    = 0,
     101             :     FT_VLTGRAY        = 1,
     102             :     FT_LTGRAY         = 2,
     103             :     FT_GRAY           = 3,
     104             :     FT_DKGRAY         = 4,
     105             :     FT_SOLID          = 5,
     106             :     FT_HORZHATCH      = 6,
     107             :     FT_VERTHATCH      = 7,
     108             :     FT_FDIAGHATCH     = 8,
     109             :     FT_BDIAGHATCH     = 9,
     110             :     FT_CROSSHATCH     = 10,
     111             :     FT_DIAGCROSSHATCH = 11,
     112             :     FT_PATTERN        = 12
     113             : };
     114             : 
     115             : enum DrawLineStyle
     116             : {
     117             :     LS_SOLID       = 0,
     118             :     LS_DASH        = 1,
     119             :     LS_DOT         = 2,
     120             :     LS_DASHDOT     = 3,
     121             :     LS_DASHDOTDOT  = 4,
     122             :     LS_NULL        = 5,
     123             :     LS_INSIDEFRAME = 6
     124             : };
     125             : 
     126             : // Text Attributes as stored in Draw files V1.2 and earlier
     127             : enum DrawTextAttribute
     128             : {
     129             :     TA_BOLD           = 0x0001, /* bolded font */
     130             :     TA_ITALIC         = 0x0002, /* italic font */
     131             :     TA_UNDERLINE      = 0x0004, /* underlined font */
     132             :     TA_WORDUNDERLINE  = 0x0008, /* broken underline */
     133             :     TA_ALLCAPS        = 0x0010, /* capitalized font */
     134             :     TA_SMALLCAPS      = 0x0020, /* all small capital letters */
     135             :     TA_DOUBLEUNDER    = 0x0040, /* double underline */
     136             :     TA_STRIKETHRU     = 0x0080, /* strikethru */
     137             :     TA_SUPERSCRIPT    = 0x0100, /* superscript */
     138             :     TA_SUBSCRIPT      = 0x0200  /* subscript */
     139             : };
     140             : 
     141             : enum DrawArrowHead
     142             : {
     143             :     AH_ARROW_NONE = 0,
     144             :     AH_ARROW_FULLARROW = 1,
     145             :     AH_ARROW_HALFARROW = 2,
     146             :     AH_ARROW_LINEARROW = 3,
     147             :     AH_ARROW_INVFULLARROW = 4,
     148             :     AH_ARROW_INVHALFARROW = 5,
     149             :     AH_ARROW_INVLINEARROW = 6,
     150             :     AH_ARROW_TEE = 7,
     151             :     AH_ARROW_SQUARE = 8,
     152             :     AH_ARROW_CIRCLE = 9
     153             : };
     154             : 
     155             : struct SdwPoint
     156             : {
     157             :     sal_Int16 x;
     158             :     sal_Int16 y;
     159           0 :     SdwPoint()
     160             :         : x(0)
     161           0 :         , y(0)
     162             :     {
     163           0 :     }
     164             : };
     165             : 
     166             : struct SdwColor
     167             : {
     168             :     sal_uInt8 nR;
     169             :     sal_uInt8 nG;
     170             :     sal_uInt8 nB;
     171             :     sal_uInt8 unused;
     172           0 :     SdwColor()
     173             :         : nR(0)
     174             :         , nG(0)
     175             :         , nB(0)
     176           0 :         , unused(0)
     177             :     {
     178           0 :     }
     179             : };
     180             : 
     181             : struct SdwClosedObjStyleRec
     182             : {
     183             :     sal_uInt8 nLineWidth;
     184             :     sal_uInt8 nLineStyle;
     185             :     SdwColor aPenColor;
     186             :     SdwColor aForeColor;
     187             :     SdwColor aBackColor;
     188             :     sal_uInt16 nFillType;
     189             :     sal_uInt8 pFillPattern[8];
     190           0 :     SdwClosedObjStyleRec()
     191             :         : nLineWidth(0)
     192             :         , nLineStyle(0)
     193           0 :         , nFillType(0)
     194             :     {
     195           0 :         memset(pFillPattern, 0, sizeof(pFillPattern));
     196           0 :     }
     197             : };
     198             : 
     199             : struct SdwDrawObjHeader
     200             : {
     201             :     sal_uInt16 nRecLen;
     202             :     sal_Int16 nLeft;
     203             :     sal_Int16 nTop;
     204             :     sal_Int16 nRight;
     205             :     sal_Int16 nBottom;
     206           0 :     SdwDrawObjHeader()
     207             :         : nRecLen(0)
     208             :         , nLeft(0)
     209             :         , nTop(0)
     210             :         , nRight(0)
     211           0 :         , nBottom(0)
     212             :     {
     213           0 :     }
     214             : };
     215             : 
     216             : struct SdwLineRecord
     217             : {
     218             :     sal_Int16 nStartX;
     219             :     sal_Int16 nStartY;
     220             :     sal_Int16 nEndX;
     221             :     sal_Int16 nEndY;
     222             :     sal_uInt8 nLineWidth;
     223             :     sal_uInt8 nLineEnd;
     224             :     sal_uInt8 nLineStyle;
     225             :     SdwColor aPenColor;
     226           0 :     SdwLineRecord()
     227             :         : nStartX(0)
     228             :         , nStartY(0)
     229             :         , nEndX(0)
     230             :         , nEndY(0)
     231             :         , nLineWidth(0)
     232             :         , nLineEnd(0)
     233           0 :         , nLineStyle(0)
     234             :     {
     235           0 :     }
     236             : };
     237             : 
     238             : struct SdwPolyLineRecord
     239             : {
     240             :     sal_uInt8 nLineWidth;
     241             :     sal_uInt8 nLineEnd;
     242             :     sal_uInt8 nLineStyle;
     243             :     SdwColor aPenColor;
     244             :     sal_uInt16 nNumPoints;
     245           0 :     SdwPolyLineRecord()
     246             :         : nLineWidth(0)
     247             :         , nLineEnd(0)
     248             :         , nLineStyle(0)
     249           0 :         , nNumPoints(0)
     250             :     {
     251           0 :     }
     252             : };
     253             : 
     254             : struct SdwArcRecord
     255             : {
     256             :     sal_uInt8 nLineWidth;
     257             :     sal_uInt8 nLineEnd;
     258             :     sal_uInt8 nLineStyle;
     259             :     SdwColor aPenColor;
     260           0 :     SdwArcRecord()
     261             :         : nLineWidth(0)
     262             :         , nLineEnd(0)
     263           0 :         , nLineStyle(0)
     264             :     {
     265           0 :     }
     266             : };
     267             : 
     268           0 : struct SdwTextBoxRecord
     269             : {
     270             :     sal_Int16 nTextWidth;
     271             :     sal_Int16 nTextHeight;
     272             :     sal_Int16 nTextSize;
     273             :     SdwColor aTextColor;
     274             :     sal_uInt8 tmpTextFaceName[DRAW_FACESIZE];
     275             :     sal_uInt16 nTextAttrs;
     276             :     sal_uInt16 nTextCharacterSet;
     277             :     sal_Int16 nTextRotation;
     278             :     sal_Int16 nTextExtraSpacing;
     279             :     sal_uInt8* pTextString;
     280             : };
     281             : 
     282             : struct SdwFMPATH
     283             : {
     284             :     sal_uInt16 n;
     285             :     SdwPoint* pPts;
     286           0 :     SdwFMPATH()
     287             :         : n(0)
     288           0 :         , pPts(NULL)
     289             :     {
     290           0 :     }
     291             : };
     292             : 
     293             : struct SdwTextArt : public SdwTextBoxRecord
     294             : {
     295             :     sal_uInt8 nIndex;
     296             :     sal_Int16 nRotation;
     297             :     sal_uInt16 nTextLen;
     298             :     SdwFMPATH aPath[2];
     299           0 :     SdwTextArt()
     300             :         : nIndex(0)
     301             :         , nRotation(0)
     302           0 :         , nTextLen(0)
     303             :     {
     304           0 :     }
     305             : };
     306             : 
     307             : struct SdwBmpRecord
     308             : {
     309             :     sal_uInt16 nTranslation;
     310             :     sal_uInt16 nRotation;
     311             :     sal_uInt32 nFileSize;
     312           0 :     SdwBmpRecord()
     313             :         : nTranslation(0)
     314             :         , nRotation(0)
     315           0 :         , nFileSize(0)
     316             :     {
     317           0 :     }
     318             : };
     319             : 
     320             : struct BmpInfoHeader
     321             : {
     322             :     sal_uInt32 nHeaderLen;
     323             :     sal_uInt16 nWidth;
     324             :     sal_uInt16 nHeight;
     325             :     sal_uInt16 nPlanes;
     326             :     sal_uInt16 nBitCount;
     327             : };
     328             : 
     329             : struct BmpInfoHeader2
     330             : {
     331             :     sal_uInt32 nHeaderLen;
     332             :     sal_uInt32 nWidth;
     333             :     sal_uInt32 nHeight;
     334             :     sal_uInt16 nPlanes;
     335             :     sal_uInt16 nBitCount;
     336             : };
     337             : 
     338             : struct DrawingOffsetAndScale
     339             : {
     340             :     double fOffsetX;
     341             :     double fOffsetY;
     342             :     double fScaleX;
     343             :     double fScaleY;
     344             :     double fLeftMargin;
     345             :     double fTopMargin;
     346             : 
     347           0 :     DrawingOffsetAndScale()
     348             :     {
     349           0 :         fOffsetX = 0.00;
     350           0 :         fOffsetY = 0.00;
     351           0 :         fScaleX = 1.00;
     352           0 :         fScaleY = 1.00;
     353           0 :         fLeftMargin = 0.00;
     354           0 :         fTopMargin = 0.00;
     355           0 :     }
     356             : };
     357             : 
     358             : #endif
     359             : 
     360             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10