LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwpframelayout.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 5 10 50.0 %
Date: 2015-06-13 12:38:46 Functions: 6 12 50.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             :  *  the class for VO_FrameLayout
      59             :  ************************************************************************/
      60             : /*************************************************************************
      61             :  * Change History
      62             : Mar 2005            Created
      63             :  ************************************************************************/
      64             : 
      65             : #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRAMELAYOUT_HXX
      66             : #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRAMELAYOUT_HXX
      67             : 
      68             : #include "lwplayout.hxx"
      69             : #include "lwpstory.hxx"
      70             : #include "lwpmarker.hxx"
      71             : /**
      72             :  * @brief       For register frame style and parse frame
      73             :  *
      74             :  */
      75             : 
      76             : class LwpFrame
      77             : {
      78             : public:
      79             :     LwpFrame(LwpPlacableLayout* pLayout);
      80             :     ~LwpFrame();
      81             :     void RegisterStyle(XFFrameStyle* pFrameStyle);
      82             :     void Parse(XFFrame* pXFFrame, sal_Int32 nPageNo = 0);
      83             :     void XFConvert(XFContentContainer* pCont);
      84             : private:
      85             :     void ApplyWrapType(XFFrameStyle* pFrameStyle);
      86             :     void ApplyMargins(XFFrameStyle* pFrameStyle);
      87             :     void ApplyPadding(XFFrameStyle* pFrameStyle);
      88             :     void ApplyBorders(XFFrameStyle* pFrameStyle);
      89             :     void ApplyColumns(XFFrameStyle* pFrameStyle);
      90             :     void ApplyShadow(XFFrameStyle* pFrameStyle);
      91             :     void ApplyBackColor(XFFrameStyle* pFrameStyle);
      92             :     void ApplyProtect(XFFrameStyle* pFrameStyle);
      93             :     void ApplyTextDir(XFFrameStyle* pFrameStyle);
      94             :     void ApplyPosType(XFFrameStyle* pFrameStyle);
      95             :     void ApplyWatermark(XFFrameStyle* pFrameStyle);
      96             :     // add by , 06/01/2005
      97             :     void ApplyPatternFill(XFFrameStyle* pFrameStyle);
      98             :     void ApplyBackGround(XFFrameStyle* pFrameStyle);
      99             :     // end add
     100             :     void ParseAnchorType(XFFrame* pXFFrame);
     101             :     bool IsLeftWider();
     102             : private:
     103             :     LwpPlacableLayout* m_pLayout;
     104             :     OUString m_StyleName;
     105             : };
     106             : 
     107             : /**
     108             :  * @brief       Frame link information
     109             :  *
     110             :  */
     111             : class LwpFrameLink
     112             : {
     113             : public:
     114             :     LwpFrameLink();
     115             :     ~LwpFrameLink();
     116             :     void Read(LwpObjectStream* pStrm);
     117          13 :     LwpObjectID& GetNextLayout(){ return m_NextLayout;}
     118          13 :     LwpObjectID& GetPreviousLayout(){ return m_PreviousLayout;}
     119             : private:
     120             :     LwpObjectID m_PreviousLayout;
     121             :     LwpObjectID m_NextLayout;
     122             : };
     123             : 
     124             : /**
     125             :  * @brief       VO_FRAMELAYOUT object
     126             :  *
     127             :  */
     128             : class LwpFrameLayout: public LwpPlacableLayout
     129             : {
     130             : public:
     131             :     LwpFrameLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     132             :     virtual ~LwpFrameLayout();
     133          80 :     virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_FRAME_LAYOUT;}
     134             :     virtual void RegisterStyle() SAL_OVERRIDE;
     135             :     virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
     136             :     void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) SAL_OVERRIDE;
     137             :     OUString GetNextLinkName();
     138             :     bool HasPreviousLinkLayout();
     139             :     bool IsForWaterMark() SAL_OVERRIDE;
     140             :     double GetWidth() SAL_OVERRIDE;
     141             :     void ApplyGraphicSize(XFFrame* pXFFrame);
     142             : protected:
     143             :     void Read() SAL_OVERRIDE;
     144             : private:
     145             :     double GetMaxWidth();
     146             : 
     147             : private:
     148             :     LwpFrameLink m_Link;
     149             :     LwpFrame* m_pFrame;
     150             : };
     151             : 
     152             : /**
     153             :  * @brief       VO_GROUPLAYOUT object , information for frame group layout
     154             :  *
     155             :  */
     156             : class LwpGroupLayout: public LwpPlacableLayout
     157             : {
     158             : public:
     159             :     LwpGroupLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     160             :     virtual ~LwpGroupLayout();
     161           0 :     virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_GROUP_LAYOUT;}
     162             :     virtual void RegisterStyle() SAL_OVERRIDE;
     163             :     virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
     164             :     void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) SAL_OVERRIDE;
     165             : protected:
     166             :     void Read() SAL_OVERRIDE;
     167             : private:
     168             :     LwpFrame* m_pFrame;
     169             : 
     170             : };
     171             : 
     172             : /**
     173             :  * @brief       VO_GROUPFRAME object , information for frame group contents
     174             :  *
     175             :  */
     176             : class LwpGroupFrame: public LwpContent
     177             : {
     178             : public:
     179             :     LwpGroupFrame(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     180             :     virtual ~LwpGroupFrame();
     181             :     virtual void RegisterStyle() SAL_OVERRIDE;
     182             :     virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
     183             : protected:
     184             :     void Read() SAL_OVERRIDE;
     185             : };
     186             : 
     187             : class LwpStory;
     188             : class LwpFoundry;
     189             : class LwpDropcapLayout : public LwpFrameLayout
     190             : {
     191             : public:
     192             :     LwpDropcapLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     193           8 :     virtual ~LwpDropcapLayout(){}
     194           9 :     virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_DROPCAP_LAYOUT;}
     195             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     196             :     virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
     197           0 :     sal_uInt16 GetLines(){return m_nLines;}
     198           0 :     void SetChars(sal_uInt32 nChars){ m_nChars += nChars;}
     199           0 :     sal_uInt32 GetChars() const {return m_nChars;}
     200             :     LwpStory* GetContentStory();
     201             :     void RegisterStyle(LwpFoundry* pFoundry);
     202             :     void RegisterStyle() SAL_OVERRIDE;
     203             : protected:
     204             :     void Read() SAL_OVERRIDE;
     205             : private:
     206             :     sal_uInt16 m_nLines;
     207             :     sal_uInt32 m_nChars;
     208             : };
     209             : 
     210             : class LwpRubyLayout : public LwpFrameLayout
     211             : {
     212             : public:
     213             :     LwpRubyLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     214           0 :     virtual ~LwpRubyLayout(){}
     215             :     LwpRubyMarker* GetMarker();
     216             :     void ConvertContentText();
     217             :     LwpStory* GetContentStory();
     218             :     sal_uInt8 GetPosition(){return m_nPlacement;}
     219             :     sal_uInt8 GetAlignment(){return m_nAlignment;}
     220             :     void RegisterStyle() SAL_OVERRIDE;
     221             :     enum{
     222             :     LEFT = 4,
     223             :     RIGHT = 5,
     224             :     CENTER = 2,
     225             :     TOP = 1,
     226             :     BOTTOM = 3
     227             :     };
     228             : protected:
     229             :     void Read() SAL_OVERRIDE;
     230             : private:
     231             :     sal_uInt8 m_nPlacement;
     232             :     sal_uInt8 m_nAlignment;
     233             :     sal_uInt16 m_nStateFlag;
     234             :     sal_Int32 m_nXOffset;
     235             :     sal_Int32 m_nYOffset;
     236             :     LwpObjectID m_objRubyMarker;
     237             : };
     238             : 
     239             : #endif
     240             : 
     241             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11