LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwpparaproperty.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 37 39 94.9 %
Date: 2012-08-25 Functions: 24 26 92.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 8 50.0 %

           Branch data     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 2005           Created
      63                 :            :  ************************************************************************/
      64                 :            : #ifndef _LWPPARAPROPERTY_HXX_
      65                 :            : #define _LWPPARAPROPERTY_HXX_
      66                 :            : 
      67                 :            : #include "lwpobj.hxx"
      68                 :            : #include "lwpobjstrm.hxx"
      69                 :            : #include "lwpdllist.hxx"
      70                 :            : 
      71                 :            : #include "lwpoverride.hxx"
      72                 :            : #include "lwppiece.hxx"
      73                 :            : 
      74                 :            : /* paragraph property ID's */
      75                 :            : #define PP_OUTLINE_SHOW         0x53484f4cUL    /* "SHOW" */
      76                 :            : #define PP_OUTLINE_HIDE         0x48494445UL    /* "HIDE" */
      77                 :            : #define PP_LOCAL_ALIGN          0x414c494eUL    /* "ALIN" */
      78                 :            : #define PP_LOCAL_INDENT         0x494e444eUL    /* "INDN" */
      79                 :            : #define PP_LOCAL_SPACING        0x5350434eUL    /* "SPCN" */
      80                 :            : #define PP_LOCAL_TABRACK        0x54414253UL    /* "TABS" */
      81                 :            : #define PP_LOCAL_BREAKS         0x42524b53UL    /* "BRKS" */
      82                 :            : #define PP_LOCAL_BULLET         0x42554c4cUL    /* "BULL" */
      83                 :            : #define PP_LOCAL_BORDER         0x424f5244UL    /* "BORD" */
      84                 :            : #define PP_LOCAL_BACKGROUND     0x4241434bUL    /* "BACK" */
      85                 :            : #define PP_LOCAL_NUMBERING      0x4e4d4252UL    /* "NMBR" */
      86                 :            : #define PP_LOCAL_KINSOKU        0x4b494e53UL    /* "KINS" */
      87                 :            : #define PP_PROPLIST             0x50524f50UL    /* "PROP" */
      88                 :            : 
      89                 :            : class LwpParaProperty : public LwpDLList
      90                 :            : {
      91                 :            : public:
      92                 :       1209 :     LwpParaProperty(){}
      93         [ -  + ]:       1209 :     virtual ~LwpParaProperty(void){}
      94                 :            :     virtual sal_uInt32  GetType(void) = 0;
      95                 :            :     inline  LwpParaProperty* GetNext(void);
      96                 :            :     inline  LwpParaProperty* GetPrevious(void);
      97                 :            : 
      98                 :            :     static LwpParaProperty* ReadPropertyList(LwpObjectStream* pFile,LwpObject* Whole);
      99                 :            : 
     100                 :            : };
     101                 :            : 
     102                 :       2562 : inline LwpParaProperty* LwpParaProperty::GetNext(void)
     103                 :            : {
     104                 :       2562 :     return static_cast<LwpParaProperty*>(LwpDLList::GetNext());
     105                 :            : }
     106                 :            : 
     107                 :            : inline LwpParaProperty* LwpParaProperty::GetPrevious(void)
     108                 :            : {
     109                 :            :     return static_cast<LwpParaProperty*>(LwpDLList::GetPrevious());
     110                 :            : }
     111                 :            : 
     112                 :            : //align/indent/spacing
     113                 :            : //TO DO:border/backgroud etc
     114                 :            : 
     115                 :            : 
     116                 :            : class LwpParaAlignProperty : public LwpParaProperty
     117                 :            : {
     118                 :            : public:
     119                 :            : //      LwpParaAlignProperty(LwpParaAlignProperty* pOther);
     120                 :            :         LwpParaAlignProperty(LwpObjectStream* pFile);
     121                 :            :         virtual ~LwpParaAlignProperty(void);
     122                 :            :         LwpAlignmentOverride* GetAlignment(void);
     123                 :            :         sal_uInt32  GetType(void);
     124                 :            : 
     125                 :            : private:
     126                 :            :         LwpAlignmentOverride* m_pAlignment;
     127                 :            : };
     128                 :            : 
     129                 :         12 : inline LwpAlignmentOverride* LwpParaAlignProperty::GetAlignment(void)
     130                 :            : {
     131                 :         12 :     return m_pAlignment;
     132                 :            : }
     133                 :            : 
     134                 :            : class LwpParaIndentProperty : public LwpParaProperty
     135                 :            : {
     136                 :            : public:
     137                 :            :         LwpParaIndentProperty(LwpObjectStream* pFile);
     138                 :            :         virtual ~LwpParaIndentProperty(void);
     139                 :            :         LwpIndentOverride* GetIndent(void);
     140                 :            :         sal_uInt32 GetType(void);
     141                 :            :         inline LwpObjectID GetIndentID();
     142                 :            : 
     143                 :            : private:
     144                 :            :         LwpObjectID m_aIndentID;
     145                 :            :         LwpIndentOverride* m_pIndent;
     146                 :            : };
     147                 :          0 : inline LwpObjectID LwpParaIndentProperty::GetIndentID()
     148                 :            : {
     149                 :          0 :     return m_aIndentID;
     150                 :            : }
     151                 :        390 : inline LwpIndentOverride* LwpParaIndentProperty::GetIndent(void)
     152                 :            : {
     153                 :        390 :     return m_pIndent;
     154                 :            : }
     155                 :            : 
     156                 :            : class LwpParaSpacingProperty : public LwpParaProperty
     157                 :            : {
     158                 :            : public:
     159                 :            :         LwpParaSpacingProperty(LwpObjectStream* pFile);
     160                 :            :         virtual ~LwpParaSpacingProperty(void);
     161                 :            :         LwpSpacingOverride* GetSpacing(void);
     162                 :            :         sal_uInt32 GetType(void);
     163                 :            : private:
     164                 :            :         LwpSpacingOverride* m_pSpacing;
     165                 :            : 
     166                 :            : };
     167                 :            : 
     168                 :        336 : inline LwpSpacingOverride* LwpParaSpacingProperty::GetSpacing(void)
     169                 :            : {
     170                 :        336 :     return m_pSpacing;
     171                 :            : }
     172                 :            : 
     173                 :            : class LwpParaBorderOverride;
     174         [ -  + ]:         12 : class LwpParaBorderProperty : public LwpParaProperty
     175                 :            : {
     176                 :            : public:
     177                 :            :     LwpParaBorderProperty(LwpObjectStream* pStrm);
     178                 :            : 
     179                 :            :     inline sal_uInt32 GetType();
     180                 :            : 
     181                 :            :     inline LwpParaBorderOverride* GetLocalParaBorder();
     182                 :            : 
     183                 :            : private:
     184                 :            :     LwpParaBorderOverride* m_pParaBorderOverride;
     185                 :            : };
     186                 :            : 
     187                 :          6 : inline LwpParaBorderOverride* LwpParaBorderProperty::GetLocalParaBorder()
     188                 :            : {
     189                 :          6 :     return m_pParaBorderOverride;
     190                 :            : }
     191                 :            : 
     192                 :          6 : inline sal_uInt32 LwpParaBorderProperty::GetType()
     193                 :            : {
     194                 :          6 :     return PP_LOCAL_BORDER;
     195                 :            : }
     196                 :            : 
     197         [ -  + ]:        762 : class LwpParaBreaksProperty : public LwpParaProperty
     198                 :            : {
     199                 :            : public:
     200                 :            :     LwpParaBreaksProperty(LwpObjectStream* pStrm);
     201                 :            : 
     202                 :            :     inline sal_uInt32 GetType();
     203                 :            : 
     204                 :            :     inline LwpBreaksOverride* GetLocalParaBreaks();
     205                 :            : 
     206                 :            : private:
     207                 :            :     LwpBreaksOverride* m_pBreaks;
     208                 :            : 
     209                 :            : };
     210                 :            : 
     211                 :        429 : inline sal_uInt32 LwpParaBreaksProperty::GetType()
     212                 :            : {
     213                 :        429 :     return PP_LOCAL_BREAKS;
     214                 :            : }
     215                 :        381 : inline LwpBreaksOverride* LwpParaBreaksProperty::GetLocalParaBreaks()
     216                 :            : {
     217                 :        381 :     return m_pBreaks;
     218                 :            : }
     219                 :            : 
     220                 :            : 
     221                 :            : class LwpParaBulletProperty : public LwpParaProperty
     222                 :            : {
     223                 :            : public:
     224                 :            :     LwpParaBulletProperty(LwpObjectStream* pStrm);
     225                 :            : 
     226                 :            :     virtual ~LwpParaBulletProperty();
     227                 :            : 
     228                 :            :     inline sal_uInt32 GetType();
     229                 :            : 
     230                 :            :     inline LwpBulletOverride* GetLocalParaBullet();
     231                 :            : 
     232                 :            : private:
     233                 :            :     LwpBulletOverride* m_pBullet;
     234                 :            : };
     235                 :            : 
     236                 :         12 : inline sal_uInt32 LwpParaBulletProperty::GetType()
     237                 :            : {
     238                 :         12 :     return PP_LOCAL_BULLET;
     239                 :            : }
     240                 :         12 : inline LwpBulletOverride* LwpParaBulletProperty::GetLocalParaBullet()
     241                 :            : {
     242                 :         12 :     return m_pBullet;
     243                 :            : }
     244                 :            : 
     245                 :            : 
     246         [ -  + ]:         24 : class LwpParaNumberingProperty : public LwpParaProperty
     247                 :            : {
     248                 :            : public:
     249                 :            :     LwpParaNumberingProperty(LwpObjectStream* pStrm);
     250                 :            : 
     251                 :            :     inline sal_uInt32 GetType();
     252                 :            : 
     253                 :            :     inline LwpNumberingOverride* GetLocalNumbering() const;
     254                 :            : private:
     255                 :            :     LwpNumberingOverride* m_pNumberingOverride;
     256                 :            : };
     257                 :         12 : inline sal_uInt32 LwpParaNumberingProperty::GetType()
     258                 :            : {
     259                 :         12 :     return PP_LOCAL_NUMBERING;
     260                 :            : }
     261                 :         12 : inline LwpNumberingOverride* LwpParaNumberingProperty::GetLocalNumbering() const
     262                 :            : {
     263                 :         12 :     return m_pNumberingOverride;
     264                 :            : }
     265                 :            : 
     266                 :            : class LwpParaTabRackProperty : public LwpParaProperty
     267                 :            : {
     268                 :            : public:
     269                 :            :     LwpParaTabRackProperty(LwpObjectStream* pStrm);
     270                 :            :     ~LwpParaTabRackProperty(void);
     271                 :            :     inline sal_uInt32 GetType();
     272                 :            : 
     273                 :            :     inline LwpTabOverride* GetTab();
     274                 :            : 
     275                 :            : private:
     276                 :            :     LwpTabOverride* m_pTabOverride;
     277                 :            : };
     278                 :            : 
     279                 :          6 : inline LwpTabOverride* LwpParaTabRackProperty::GetTab()
     280                 :            : {
     281                 :          6 :     return m_pTabOverride;
     282                 :            : }
     283                 :            : 
     284                 :         12 : inline sal_uInt32 LwpParaTabRackProperty::GetType(void)
     285                 :            : {
     286                 :         12 :     return PP_LOCAL_TABRACK;
     287                 :            : }
     288                 :            : 
     289                 :            : 
     290                 :            : class LwpParaBackGroundProperty : public LwpParaProperty
     291                 :            : {
     292                 :            : public:
     293                 :            :     LwpParaBackGroundProperty(LwpObjectStream* pFile);
     294                 :            :     virtual ~LwpParaBackGroundProperty(void);
     295                 :            :     LwpBackgroundOverride* GetBackground(void);
     296                 :            :     sal_uInt32 GetType(void);
     297                 :            : private:
     298                 :            :     LwpBackgroundOverride* m_pBackground;
     299                 :            : };
     300                 :            : 
     301                 :         54 : inline LwpBackgroundOverride* LwpParaBackGroundProperty::GetBackground(void)
     302                 :            : {
     303                 :         54 :     return m_pBackground;
     304                 :            : }
     305                 :            : 
     306                 :         54 : inline sal_uInt32 LwpParaBackGroundProperty::GetType()
     307                 :            : {
     308                 :         54 :     return PP_LOCAL_BACKGROUND;
     309                 :            : }
     310                 :            : 
     311                 :            : #endif
     312                 :            : 
     313                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10