LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwpfribtext.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 14 23 60.9 %
Date: 2014-11-03 Functions: 14 25 56.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 2005           Created
      63             :  ************************************************************************/
      64             : #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRIBTEXT_HXX
      65             : #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRIBTEXT_HXX
      66             : 
      67             : #include "lwpfrib.hxx"
      68             : #include "lwpstory.hxx"
      69             : class LwpFribText : public LwpFrib
      70             : {
      71             : public:
      72             :     LwpFribText( LwpPara* pPara, bool bNoUnicode=false);
      73        1632 :     virtual ~LwpFribText(){}
      74             :     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) SAL_OVERRIDE;
      75             :     void XFConvert(XFContentContainer* pXFPara,LwpStory* pStory);
      76             : private:
      77             :     OUString m_Content;
      78             :     bool m_bNoUnicode;
      79             : public:
      80        1408 :     OUString GetText(){return m_Content;}
      81             : };
      82             : 
      83             : class LwpFribHardSpace : public LwpFrib
      84             : {
      85             : public:
      86           0 :     LwpFribHardSpace( LwpPara* pPara ) : LwpFrib(pPara){}
      87           0 :     virtual ~LwpFribHardSpace(){}
      88             : };
      89             : 
      90             : class LwpFribSoftHyphen : public LwpFrib
      91             : {
      92             : public:
      93           0 :     LwpFribSoftHyphen( LwpPara* pPara ) : LwpFrib(pPara){}
      94           0 :     virtual ~LwpFribSoftHyphen(){}
      95             : };
      96             : 
      97             : //add by , 02/03/2005
      98         436 : class LwpFribParaNumber : public LwpFrib
      99             : {
     100             : public:
     101         218 :     LwpFribParaNumber( LwpPara* pPara ) : LwpFrib(pPara),
     102         218 :         m_nStyleID(0), m_nNumberChar(0), m_nLevel(1), m_nStart(0){}
     103             :     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) SAL_OVERRIDE;
     104             : 
     105             :     inline sal_uInt16 GetStyleID() const;
     106             : 
     107             :     inline sal_uInt16 GetNumberChar() const;
     108             : 
     109             :     inline sal_uInt16 GetLevel() const;
     110             : 
     111             :     inline sal_uInt16 GetStart() const;
     112             : 
     113             : private:
     114             :     sal_uInt16 m_nStyleID;
     115             :     sal_uInt16 m_nNumberChar;
     116             :     sal_uInt16 m_nLevel;
     117             :     sal_uInt16 m_nStart;
     118             : };
     119         504 : inline sal_uInt16 LwpFribParaNumber::GetStyleID() const
     120             : {
     121         504 :     return m_nStyleID;
     122             : }
     123           0 : inline sal_uInt16 LwpFribParaNumber::GetNumberChar() const
     124             : {
     125           0 :     return m_nNumberChar;
     126             : }
     127             : inline sal_uInt16 LwpFribParaNumber::GetLevel() const
     128             : {
     129             :     return m_nLevel;
     130             : }
     131         234 : inline sal_uInt16 LwpFribParaNumber::GetStart() const
     132             : {
     133         234 :     return m_nStart;
     134             : }
     135             : 
     136             : class LwpFribDocVar : public LwpFrib
     137             : {
     138             : public:
     139             :     LwpFribDocVar( LwpPara* pPara );
     140             : 
     141             :     virtual ~LwpFribDocVar();
     142             : 
     143             :     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) SAL_OVERRIDE;
     144             : 
     145             :     void RegisterStyle(LwpFoundry* pFoundry) SAL_OVERRIDE;//add by ,05/5/27
     146             : 
     147             :     void XFConvert(XFContentContainer* pXFPara);//add by ,05/5/27
     148             : 
     149             : //  inline sal_uInt16 GetType() const;
     150             : 
     151             :     enum {
     152             :         FILENAME = 0x02,
     153             :         PATH = 0x03,
     154             :         SMARTMASTER = 0x04,
     155             :         DESCRIPTION = 0x05,
     156             :         DATECREATED = 0x06,
     157             :         DATELASTREVISION = 0x07,
     158             :         TOTALEDITTIME = 0x08,
     159             :         NUMPAGES= 0x09,
     160             :         NUMWORDS= 0x0a,
     161             :         NUMCHARS = 0x0b,
     162             :         DOCSIZE = 0x0c,
     163             :         DIVISIONNAME = 0x0d,
     164             :         SECTIONNAME = 0x0e,
     165             :         VERSIONCREATEBY = 0x0f,
     166             :         VERSIONCREATEDATE = 0x10,
     167             :         VERSIONOTHEREDITORS = 0x11,
     168             :         VERSIONNAME = 0x12,
     169             :         VERSIONNUMBER = 0x13,
     170             :         ALLVERSIONNAME = 0x14,
     171             :         VERSIONREMARK = 0x15,
     172             :         DOCUMENTCATEGORY = 0x16,
     173             :         VERSIONLASTDATE = 0x17,
     174             :         VERSIONLASTEDITOR = 0x18,
     175             :         KEYWORDS = 0x19,
     176             :         CREATEDBY = 0x1a,
     177             :         LASTEDIT = 0x1b,
     178             :         OTHEREDITORS = 0x1c,
     179             :         NUMOFREVISION = 0x1d,
     180             :         };
     181             : 
     182             : private:
     183             :     sal_uInt16 m_nType;
     184             :     LwpAtomHolder* m_pName;
     185             :     OUString m_TimeStyle;
     186             :     void RegisterDefaultTimeStyle();
     187             :     void RegisterTotalTimeStyle();
     188             : };
     189             : //inline sal_uInt16 LwpFribDocVar::GetType() const
     190             : //{
     191             : //  return m_nType;
     192             : //}
     193             : 
     194             : class LwpFribTab : public LwpFrib
     195             : {
     196             : public:
     197          62 :     LwpFribTab( LwpPara* pPara ) : LwpFrib(pPara){}
     198         124 :     virtual ~LwpFribTab(){}
     199             : };
     200             : 
     201             : class LwpFribUnicode: public LwpFrib
     202             : {
     203             : public:
     204           0 :     LwpFribUnicode( LwpPara* pPara ) : LwpFrib(pPara){}
     205           0 :     virtual ~LwpFribUnicode(){}
     206             :     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) SAL_OVERRIDE;
     207             :     void XFConvert(XFContentContainer* pXFPara,LwpStory* pStory);
     208             : private:
     209             :     OUString m_Content;
     210             : public:
     211           0 :     OUString GetText(){return m_Content;}
     212             : };
     213             : 
     214             : class LwpFribPageNumber : public LwpFrib
     215             : {
     216             : public:
     217          10 :     LwpFribPageNumber(LwpPara* pPara) : LwpFrib(pPara),
     218          10 :         m_nNumStyle(0), m_nStartNum(1), m_nStartOnPage(1), m_nFlag(0){}
     219          20 :     virtual ~LwpFribPageNumber(){}
     220             :     void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) SAL_OVERRIDE;
     221             :     void XFConvert(XFContentContainer* pXFPara);
     222             : private:
     223             :     sal_uInt16 m_nNumStyle;
     224             :     LwpAtomHolder m_aBefText;
     225             :     LwpAtomHolder m_aAfterText;
     226             :     sal_uInt16 m_nStartNum;
     227             :     sal_uInt16 m_nStartOnPage;
     228             :     sal_uInt16 m_nFlag;
     229             : };
     230             : 
     231             : #endif
     232             : 
     233             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10