LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwpcelllayout.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 3 14 21.4 %
Date: 2014-11-03 Functions: 3 14 21.4 %
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 - cell layouts
      59             :  */
      60             : /*************************************************************************
      61             :  * Change History
      62             :  Mar 2005           Created
      63             :  ************************************************************************/
      64             : #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPCELLLAYOUT_HXX
      65             : #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPCELLLAYOUT_HXX
      66             : #include <vector>
      67             : #include <map>
      68             : #include "lwplayout.hxx"
      69             : #include "lwptablelayout.hxx"
      70             : 
      71             : typedef enum
      72             : {
      73             :     enumWholeBorder = 0,
      74             :     enumNoLeftBorder,
      75             :     enumNoBottomBorder,
      76             :     enumNoLeftNoBottomBorder,
      77             :     enumCellBorderTopLimit = 4,
      78             : } LwpCellBorderType;
      79             : 
      80             : class XFCell;
      81             : class XFCellStyle;
      82             : class LwpCellList;
      83             : class LwpTable;
      84             : class LwpTableLayout;
      85             : /**
      86             :  * @brief
      87             :  * VO_CELLLAYOUT object
      88             :  */
      89             : class LwpCellLayout : public LwpMiddleLayout
      90             : {
      91             : public:
      92             :     LwpCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
      93             :     virtual ~LwpCellLayout();
      94           2 :     virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_CELL_LAYOUT;}
      95             :     virtual XFCell* ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol);
      96           0 :     sal_uInt16 GetRowID(){return crowid;}
      97           0 :     sal_uInt8 GetColID(){return ccolid;}
      98             :     void RegisterStyle() SAL_OVERRIDE;
      99           0 :     LwpObjectID& GetNumericsObject() {return cLayNumerics;}
     100             :     LwpObjectID * GetPreviousCellStory();
     101             :     virtual LwpPara* GetLastParaOfPreviousStory() SAL_OVERRIDE;
     102             :     LwpTableLayout * GetTableLayout();
     103             :     virtual void SetCellMap(void);
     104             :     double GetActualWidth();
     105           0 :     OUString GetNumfmtName(){return m_NumfmtName;}
     106             : protected:
     107             :     void Read() SAL_OVERRIDE;
     108             :     LwpTable * GetTable();
     109             :     void ApplyPadding(XFCellStyle* pCellStyle);
     110             :     void ApplyBorders(XFCellStyle* pCellStyle);
     111             :     void ApplyPatternFill(XFCellStyle* pCellStyle);
     112             :     void ApplyBackGround(XFCellStyle* pCellStyle);
     113             :     void ApplyBackColor(XFCellStyle* pCellStyle);
     114             :     void ApplyWatermark(XFCellStyle* pCellStyle);
     115             :     void ApplyProtect(XFCell * pCell, LwpObjectID aTableID);
     116             :     void ApplyFmtStyle(XFCellStyle *pCellStyle);
     117             :     OUString GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
     118             :     void RegisterDefaultCell();
     119             :     virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
     120             :     LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
     121          40 :     virtual sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
     122          40 :     virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow){return nRow + 1; };
     123             : 
     124             :     sal_uInt16 crowid;
     125             :     sal_uInt8   ccolid;
     126             :     LwpObjectID cLayNumerics;
     127             :     LwpObjectID cLayDiagonalLine;
     128             : 
     129             :     enum LeaderDotType
     130             :     {
     131             :         LDT_NONE = 0,
     132             :         LDT_DOTS = 1,
     133             :         LDT_DASHES = 2,
     134             :         LDT_UNDERSCORES = 3
     135             :     };
     136             :     LeaderDotType cType;
     137             :     OUString m_CellStyleNames[enumCellBorderTopLimit];
     138             : 
     139             :     OUString m_NumfmtName;//Add to support number color
     140             : private:
     141             :     LwpCellList* GetCellList(LwpFoundry* pFoundry, LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt8 nCol);
     142             : };
     143             : 
     144             : /**
     145             :  * @brief
     146             :  * VO_HIDDENCELLLAYOUT object
     147             :  */
     148             : class LwpHiddenCellLayout : public LwpCellLayout
     149             : {
     150             : public:
     151             :     LwpHiddenCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     152             :     virtual ~LwpHiddenCellLayout();
     153           0 :     virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_HIDDEN_CELL_LAYOUT;}
     154             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     155             :     virtual XFCell* ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) SAL_OVERRIDE;
     156           0 :     void RegisterStyle() SAL_OVERRIDE {}
     157             :     virtual void SetCellMap(void) SAL_OVERRIDE;
     158             : protected:
     159             :     void Read() SAL_OVERRIDE;
     160             :     LwpObjectID cconnectedlayout;
     161             : };
     162             : 
     163             : /**
     164             :  * @brief
     165             :  * VO_CONNECTEDCELLLAYOUT object
     166             :  */
     167             : class LwpConnectedCellLayout : public LwpCellLayout
     168             : {
     169             : public:
     170             :     LwpConnectedCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     171             :     virtual ~LwpConnectedCellLayout();
     172           0 :     virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_CONNECTED_CELL_LAYOUT;}
     173             :     virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
     174             :     virtual XFCell* ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) SAL_OVERRIDE;
     175           0 :     sal_uInt16 GetNumrows(){return m_nRealrowspan;}
     176           0 :     sal_uInt8 GetNumcols(){return m_nRealcolspan;}
     177             :     virtual void SetCellMap(void) SAL_OVERRIDE;
     178           0 :     void SetNumrows(sal_uInt16 nVal){m_nRealrowspan = nVal;}
     179             :     void SetNumcols(sal_uInt8 nVal){m_nRealcolspan = nVal;}
     180             : protected:
     181             :     void Read() SAL_OVERRIDE;
     182           0 :     virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow) SAL_OVERRIDE {return nRow + m_nRealrowspan; };
     183             :     virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout) SAL_OVERRIDE;
     184             :     sal_uInt16  cnumrows;
     185             :     sal_uInt8       cnumcols;
     186             : //  sal_Bool m_bSplitFlag;
     187             :     sal_uInt16  m_nRealrowspan;
     188             :     sal_uInt8   m_nRealcolspan;
     189             : };
     190             : /**
     191             :  * @brief
     192             :  * VO_PCOLBLOCK object
     193             :  */
     194             : 
     195             : class LwpParallelColumnsBlock : public LwpCellLayout
     196             : {
     197             : public:
     198             :     LwpParallelColumnsBlock(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
     199             :     virtual ~LwpParallelColumnsBlock();
     200             : protected:
     201             :     void Read() SAL_OVERRIDE;
     202             : 
     203             : };
     204             : 
     205             : #endif
     206             : 
     207             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10