LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwplaypiece.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 22 0.0 %
Date: 2014-04-14 Functions: 0 22 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             :  ************************************************************************/
      60             : /*************************************************************************
      61             :  * Change History
      62             :  Jan 28 2005            Created
      63             :  ************************************************************************/
      64             : #ifndef _LWPLAYOUTPIECE_HXX
      65             : #define _LWPLAYOUTPIECE_HXX
      66             : 
      67             : #include "lwppiece.hxx"
      68             : #include "lwpbasetype.hxx"
      69             : 
      70             : class LwpRotor
      71             : {
      72             : public:
      73             :     LwpRotor();
      74             :     ~LwpRotor();
      75             :     void Read(LwpObjectStream *pStrm);
      76             : private:
      77             :     sal_Int16 m_nRotation;  //angle
      78             : };
      79             : 
      80             : class LwpLayoutGeometry : public LwpVirtualPiece
      81             : {
      82             : public:
      83             :     LwpLayoutGeometry(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
      84             :     virtual ~LwpLayoutGeometry();
      85             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
      86           0 :     sal_Int32 GetWidth() { return m_nWidth; }
      87           0 :     sal_Int32 GetHeight() { return m_nHeight; }
      88           0 :     LwpPoint GetOrigin() { return m_Origin; }
      89           0 :     LwpPoint GetAbsoluteOrigin() { return m_AbsoluteOrigin; }
      90           0 :     sal_uInt8 GetContentOrientation(){ return m_ContentOrientation;}
      91             : 
      92             : protected:
      93             :     virtual void Read() SAL_OVERRIDE;
      94             : protected:
      95             :     sal_Int32 m_nWidth;
      96             :     sal_Int32 m_nHeight;
      97             :     LwpPoint m_Origin;
      98             :     LwpPoint m_AbsoluteOrigin;
      99             :     LwpRotor m_ContainerRotor;
     100             :     sal_uInt8 m_ContentOrientation;
     101             : };
     102             : 
     103             : class LwpLayoutScale : public LwpVirtualPiece
     104             : {
     105             : public:
     106             :     enum    {ORIGINAL_SIZE = 1, FIT_IN_FRAME = 2, PERCENTAGE = 4,
     107             :              CUSTOM = 8, MAINTAIN_ASPECT_RATIO = 16};
     108             : 
     109             :     enum    {CENTERED = 1, TILED = 2};
     110             :     LwpLayoutScale(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     111             :     virtual ~LwpLayoutScale();
     112             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     113           0 :     sal_uInt16 GetScaleMode(){return m_nScaleMode;}
     114           0 :     sal_uInt32 GetScalePercentage(){return m_nScalePercentage;}
     115             :     void SetScalePercentage(sal_uInt32 nVal){m_nScalePercentage = nVal;}
     116           0 :     sal_Int32 GetScaleWidth(){return m_nScaleWidth;}
     117             :     void SetScaleWidth(sal_Int32 nVal){m_nScaleWidth = nVal;}
     118           0 :     sal_Int32 GetScaleHeight(){return m_nScaleHeight;}
     119             :     void SetScaleHeight(sal_Int32 nVal){m_nScaleHeight = nVal;}
     120             :     sal_uInt16 GetContentRotation(){return m_nContentRotation;}
     121             :     void SetContentRotation(sal_uInt16 nVal){m_nContentRotation = nVal;}
     122           0 :     sal_uInt16 GetPlacement(){return m_nPlacement;}
     123             :     void SetPlacement(sal_uInt16 nVal){m_nPlacement = nVal;}
     124           0 :     inline LwpPoint* GetOffset() {return &m_Offset;}
     125             : protected:
     126             :     virtual void Read() SAL_OVERRIDE;
     127             : protected:
     128             :     sal_uInt16 m_nScaleMode;
     129             :     sal_uInt32 m_nScalePercentage;
     130             :     sal_Int32 m_nScaleWidth;
     131             :     sal_Int32 m_nScaleHeight;
     132             :     sal_uInt16 m_nContentRotation;
     133             :     LwpPoint m_Offset;
     134             :     sal_uInt16 m_nPlacement;
     135             : };
     136             : 
     137             : #include "lwpmargins.hxx"
     138             : 
     139             : class LwpLayoutMargins : public LwpVirtualPiece
     140             : {
     141             : public:
     142             :     LwpLayoutMargins(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     143             :     virtual ~LwpLayoutMargins();
     144             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     145           0 :     LwpMargins* GetMargins() { return &m_Margins; }
     146           0 :     LwpMargins* GetExtMargins(){ return &m_ExtMargins;}
     147             : protected:
     148             :     virtual void Read() SAL_OVERRIDE;
     149             : protected:
     150             :     LwpMargins m_Margins;
     151             :     LwpMargins m_ExtMargins;
     152             :     LwpMargins m_ExtraMargins;
     153             : };
     154             : 
     155             : #include "lwpborderstuff.hxx"
     156             : class LwpLayoutBorder : public LwpVirtualPiece
     157             : {
     158             : public:
     159             :     LwpLayoutBorder(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     160             :     virtual ~LwpLayoutBorder();
     161             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     162           0 :     LwpBorderStuff* GetBorderStuff(){ return &m_BorderStuff;}
     163             : protected:
     164             :     virtual void Read() SAL_OVERRIDE;
     165             : protected:
     166             :     LwpBorderStuff m_BorderStuff;
     167             : };
     168             : 
     169             : class LwpLayoutBackground : public LwpVirtualPiece
     170             : {
     171             : public:
     172             :     LwpLayoutBackground(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     173             :     virtual ~LwpLayoutBackground();
     174             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     175           0 :     LwpBackgroundStuff* GetBackgoudStuff(){return &m_BackgroundStuff;}
     176             : protected:
     177             :     virtual void Read() SAL_OVERRIDE;
     178             : protected:
     179             :     LwpBackgroundStuff m_BackgroundStuff;
     180             : };
     181             : 
     182             : class LwpExternalBorder
     183             : {
     184             : public:
     185             :     LwpExternalBorder();
     186             :     ~LwpExternalBorder();
     187             :     void Read(LwpObjectStream *pStrm);
     188             : private:
     189             :     LwpAtomHolder m_LeftName;
     190             :     LwpAtomHolder m_TopName;
     191             :     LwpAtomHolder m_RightName;
     192             :     LwpAtomHolder m_BottomName;
     193             : };
     194             : 
     195             : //It seems that this class is used for designer border. Only read now.
     196             : class LwpLayoutExternalBorder : public LwpVirtualPiece
     197             : {
     198             : public:
     199             :     LwpLayoutExternalBorder(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     200             :     virtual ~LwpLayoutExternalBorder();
     201             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     202             : protected:
     203             :     virtual void Read() SAL_OVERRIDE;
     204             : protected:
     205             :     LwpExternalBorder   m_ExtranalBorder;
     206             : };
     207             : 
     208             : class LwpColumnInfo
     209             : {
     210             : public:
     211             :     LwpColumnInfo();
     212             :     ~LwpColumnInfo();
     213             :     void Read(LwpObjectStream *pStrm);
     214           0 :     inline double GetWidth(){return LwpTools::ConvertFromUnitsToMetric(m_nWidth);}
     215             :     inline void SetWidth(sal_Int32 w){m_nWidth = w;}
     216           0 :     inline double GetGap(){return LwpTools::ConvertFromUnitsToMetric(m_nGap);}
     217             :     inline void SetGap(sal_Int32 g){m_nGap = g;}
     218             : private:
     219             :     sal_Int32 m_nWidth;
     220             :     sal_Int32 m_nGap;
     221             : };
     222             : 
     223             : class LwpLayoutColumns : public LwpVirtualPiece
     224             : {
     225             : public:
     226             :     LwpLayoutColumns(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     227             :     virtual ~LwpLayoutColumns();
     228             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     229           0 :     inline sal_uInt16 GetNumCols(){return m_nNumCols;}
     230             :     double GetColWidth(sal_uInt16 nIndex);
     231             :     double GetColGap(sal_uInt16 nIndex);
     232             : protected:
     233             :     virtual void Read() SAL_OVERRIDE;
     234             : protected:
     235             :     sal_uInt16 m_nNumCols;
     236             :     LwpColumnInfo* m_pColumns;
     237             : };
     238             : 
     239             : class LwpLayoutGutters : public LwpVirtualPiece
     240             : {
     241             : public:
     242             :     LwpLayoutGutters(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     243             :     virtual ~LwpLayoutGutters();
     244             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     245           0 :     inline virtual LwpBorderStuff* GetBorderStuff(){return &m_BorderBuffer;}
     246             : protected:
     247             :     virtual void Read() SAL_OVERRIDE;
     248             : protected:
     249             :     LwpBorderStuff m_BorderBuffer;
     250             : };
     251             : 
     252             : class LwpJoinStuff
     253             : {
     254             : public:
     255             :     LwpJoinStuff();
     256             :     ~LwpJoinStuff();
     257             :     void Read(LwpObjectStream *pStrm);
     258             : private:
     259             :     sal_uInt16 m_nPercentage;
     260             :     sal_uInt16 m_nCorners;
     261             :     sal_Int32 m_nWidth;
     262             :     sal_Int32 m_nHeight;
     263             : 
     264             :     enum JoinType
     265             :     {
     266             :         MITRE = 1,
     267             :         NEGATE = 2,
     268             :         ROUNDED = 3,
     269             :         RECTANGLE = 4,
     270             :         SPECIAL = 5,
     271             :         DIAGONAL = 6,
     272             :         NEGATE_NO_CROSS = 7,
     273             :         DOG_EAR_PAGE = 8,
     274             :         DESKTOP = 9,
     275             :         BOX_HIGHLIGHT = 10,
     276             :         STAR = 11,
     277             :         ROPE = 12,
     278             :         DECO1 = 13,
     279             :         DECO2 = 14,
     280             :         RAIN = 15,
     281             :         PIN = 16,
     282             :         ROSE = 17,
     283             :         SUNF = 18,
     284             :         DECO3 = 19,
     285             :         WARNING = 20,
     286             :         BUBBLE = 21,
     287             :         GIRDER = 22,
     288             :         SMILE = 23,
     289             :         ARROW = 24,
     290             :         MAXJOIN = 24
     291             :     };
     292             : 
     293             :     sal_uInt16 m_nID;//JoinType
     294             :     sal_uInt16 m_nScaling;
     295             :     LwpColor m_Color;
     296             : };
     297             : 
     298             : class LwpLayoutJoins : public LwpVirtualPiece
     299             : {
     300             : public:
     301             :     LwpLayoutJoins(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     302             :     virtual ~LwpLayoutJoins();
     303             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     304             : protected:
     305             :     virtual void Read() SAL_OVERRIDE;
     306             : protected:
     307             :     LwpJoinStuff m_JoinStuff;
     308             : };
     309             : 
     310             : #include "lwpshadow.hxx"
     311             : 
     312             : class LwpLayoutShadow : public LwpVirtualPiece
     313             : {
     314             : public:
     315             :     LwpLayoutShadow(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     316             :     virtual ~LwpLayoutShadow();
     317             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     318           0 :     LwpShadow* GetShadow(){return &m_Shadow;}
     319             : protected:
     320             :     virtual void Read() SAL_OVERRIDE;
     321             : protected:
     322             :     LwpShadow m_Shadow;
     323             : };
     324             : 
     325             : class LwpLayoutRelativityGuts
     326             : {
     327             : public:
     328             :     LwpLayoutRelativityGuts();
     329             :     void Read(LwpObjectStream *pStrm);
     330           0 :     sal_uInt8 GetRelativeType(){ return m_nRelType;}
     331             :     sal_uInt8 GetRelativeFromWhere(){ return m_nRelFromWhere;}
     332             :     LwpPoint GetRelativeDistance(){ return m_RelDistance;}
     333             :     sal_uInt8 GetTetherType(){ return m_nTether;}
     334             :     sal_uInt8 GetTetherWhere(){ return m_nTetherWhere;}
     335             : public:
     336             :     enum RelativeType
     337             :     {
     338             :         LAY_PARENT_RELATIVE = 1,
     339             :         LAY_PARA_RELATIVE,
     340             :         LAY_INLINE,
     341             :         LAY_INLINE_NEWLINE,
     342             :         LAY_CONTENT_RELATIVE,
     343             :         LAY_INLINE_VERTICAL
     344             :     };
     345             :     enum WhereType
     346             :     {
     347             :         LAY_UPPERLEFT = 1,
     348             :         LAY_MIDDLETOP,
     349             :         LAY_UPPERRIGHT,
     350             :         LAY_MIDDLELEFT,
     351             :         LAY_MIDDLERIGHT,
     352             :         LAY_LOWERLEFT,
     353             :         LAY_MIDDLEBOTTOM,
     354             :         LAY_LOWERRIGHT,
     355             :         LAY_MIDDLE
     356             :     };
     357             :     enum TetherWhereType
     358             :     {
     359             :         LAY_INTERNAL = 1,
     360             :         LAY_EXTERNAL,
     361             :         LAY_BORDER
     362             :     };
     363             : private:
     364             :     sal_uInt8   m_nRelType;
     365             :     sal_uInt8   m_nRelFromWhere;
     366             :     LwpPoint    m_RelDistance;
     367             :     sal_uInt8   m_nTether;
     368             :     sal_uInt8   m_nTetherWhere;
     369             :     sal_uInt8   m_nFlags;
     370             : };
     371             : 
     372             : class LwpLayoutRelativity: public LwpVirtualPiece
     373             : {
     374             : public:
     375             :     LwpLayoutRelativity(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
     376             :     virtual ~LwpLayoutRelativity();
     377             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     378           0 :     LwpLayoutRelativityGuts* GetRelGuts(){return &m_RelGuts;}
     379             : protected:
     380             :     virtual void Read() SAL_OVERRIDE;
     381             : protected:
     382             :     LwpLayoutRelativityGuts m_RelGuts;
     383             : };
     384             : 
     385             : #endif
     386             : 
     387             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10