LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - lwpmarker.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 11 25 44.0 %
Date: 2012-08-25 Functions: 12 31 38.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 18 22.2 %

           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                 :            :  Mar 2005           Created
      63                 :            :  ************************************************************************/
      64                 :            : 
      65                 :            : 
      66                 :            : #ifndef _LWPMARKER_HXX_
      67                 :            : #define _LWPMARKER_HXX_
      68                 :            : 
      69                 :            : #include "lwpobj.hxx"
      70                 :            : #include "lwpobjid.hxx"
      71                 :            : #include "lwpdlvlist.hxx"
      72                 :            : #include "lwpfrib.hxx"
      73                 :            : #include "xfilter/xftextspan.hxx"
      74                 :            : 
      75                 :            : class LwpMarker : public LwpDLNFPVList
      76                 :            : {
      77                 :            : public:
      78                 :            :     LwpMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm);
      79         [ -  + ]:          6 :     ~LwpMarker(){}
      80                 :            :     void Read();
      81                 :            :     OUString GetNamedProperty(OUString name);
      82                 :            : protected:
      83                 :            :     enum{
      84                 :            :         MARKER_START=1,
      85                 :            :         MARKER_END=2
      86                 :            :     };
      87                 :            : private:
      88                 :            :     sal_uInt16 m_nFlag;
      89                 :            :     sal_uInt16 m_nPageNumber;
      90                 :            :     sal_uInt16 m_nNeedUpdate;
      91                 :            :     LwpObjectID m_objLayout;
      92                 :            :     LwpObjectID m_objMarkerList;
      93                 :            :     LwpObjectID m_objContent;
      94                 :            : 
      95                 :            : };
      96                 :            : 
      97                 :            : class LwpFribRange
      98                 :            : {
      99                 :            : public:
     100                 :          6 :     LwpFribRange(){}
     101                 :          6 :     ~LwpFribRange(){}
     102                 :            :     void Read(LwpObjectStream* pObjStrm);
     103                 :            : private:
     104                 :            :     LwpObjectID m_StartPara;
     105                 :            :     LwpObjectID m_EndPara;
     106                 :            : };
     107                 :            : 
     108                 :            : class LwpStoryMarker : public LwpMarker
     109                 :            : {
     110                 :            : public:
     111                 :            :     LwpStoryMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm);
     112         [ -  + ]:          6 :     ~LwpStoryMarker(){}
     113                 :            :     void Read();
     114                 :            : private:
     115                 :            :     LwpFribRange m_Range;
     116                 :            :     sal_uInt16 m_nFlag;
     117                 :            : };
     118                 :            : 
     119                 :            : class LwpCHBlkMarker : public LwpStoryMarker
     120                 :            : {
     121                 :            : public:
     122                 :            :     LwpCHBlkMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm);
     123 [ #  # ][ #  # ]:          0 :     ~LwpCHBlkMarker(){}
                 [ #  # ]
     124                 :            :     void Read();
     125                 :          0 :     sal_uInt16 GetAction(){return m_nAction;}
     126                 :            :     void ConvertCHBlock(XFContentContainer* pXFPara,sal_uInt8 nType);
     127                 :            :     enum{
     128                 :            :         CLICKHERE_CHBEHAVIORTEXT=1,
     129                 :            :         CLICKHERE_CHBEHAVIORTABLE=2,
     130                 :            :         CLICKHERE_CHBEHAVIORPICTURE=3,
     131                 :            :         CLICKHERE_CHBEHAVIOROLEOBJECT=4,
     132                 :            :         CLICKHERE_CHBEHAVIORCHART=5,
     133                 :            :         CLICKHERE_CHBEHAVIORDRAWING=6,
     134                 :            :         CLICKHERE_CHBEHAVIORFILE=7,
     135                 :            :         CLICKHERE_CHBEHAVIORGLOSSARY=8,
     136                 :            :         CLICKHERE_CHBEHAVIOREQUATION=9,
     137                 :            :         CLICKHERE_CHBEHAVIORINTERNETLINK=10,
     138                 :            :         CLICKHERE_CHBEHAVIORSTRINGLIST=11,
     139                 :            :         CLICKHERE_CHBEHAVIORDATETIME=12,
     140                 :            :         CLICKHERE_CHBEHAVIORSYMBOL=13,
     141                 :            :         CLICKHERE_CHBEHAVIORDOCFIELD=14,
     142                 :            :         CLICKHERE_CHBEHAVIORPAGENUM=15
     143                 :            :     };
     144                 :            : private:
     145                 :            :     void ProcessPlaceHolder(XFContentContainer* pXFPara,sal_uInt16 nAction,sal_uInt8 nType);
     146                 :            :     void ProcessOtherCHB(XFContentContainer* pXFPara,sal_uInt8 nType);
     147                 :            :     void ProcessKeylist(XFContentContainer* pXFPara,sal_uInt8 nType);
     148                 :            :     sal_Bool IsHasFilled();
     149                 :            :     sal_Bool IsBubbleHelp();
     150                 :            :     OUString GetPromptText();
     151                 :            :     void EnumAllKeywords();
     152                 :            : private:
     153                 :            :     enum{
     154                 :            :         CHB_PROMPT = 0x01,
     155                 :            :         CHB_EDIT = 0x02,
     156                 :            :         CHB_HELP = 0x04,
     157                 :            :         CHB_TAB = 0x08,
     158                 :            :         CHB_HIDDEN = 0x10,
     159                 :            :         CHB_ALLOWVALUESNOTINLIST = 0x20,
     160                 :            :         CHB_ALLOWMULTIVALUES = 0x40,
     161                 :            :         CHB_RETURN = 0x80,
     162                 :            :         CHB_NOEARS = 0x100,
     163                 :            :         CHB_MAGNETIC = 0x200,
     164                 :            :         CHB_PERSISTENT = (CHB_PROMPT+CHB_HELP+CHB_TAB+CHB_HIDDEN
     165                 :            :             +CHB_ALLOWVALUESNOTINLIST+CHB_ALLOWMULTIVALUES
     166                 :            :             +CHB_RETURN+CHB_NOEARS+CHB_MAGNETIC)
     167                 :            :     };
     168                 :            :     LwpObjectID m_objPromptStory;
     169                 :            :     sal_uInt32 m_nTab;
     170                 :            :     sal_uInt16 m_nFlag;
     171                 :            :     sal_uInt16 m_nAction;
     172                 :            :     LwpAtomHolder m_Help;
     173                 :            :     LwpAtomHolder m_Mirror;
     174                 :            :     std::vector<OUString> m_Keylist;
     175                 :            : };
     176                 :            : 
     177                 :            : class LwpBookMark : public LwpDLNFVList
     178                 :            : {
     179                 :            : public:
     180                 :            :     LwpBookMark(LwpObjectHeader &objHdr, LwpSvStream *pStrm);
     181         [ #  # ]:          0 :     ~LwpBookMark(){}
     182                 :            : protected:
     183                 :            :     void Read();
     184                 :            : public:
     185                 :            :     sal_Bool IsRightMarker(LwpObjectID objMarker);
     186                 :            :     OUString GetName();
     187                 :            : private:
     188                 :            :     enum {  BKMK_NOTESFX = 0x0001,
     189                 :            :         BKMK_OLDNOTESFX = 0x0002
     190                 :            :         };
     191                 :            :     LwpObjectID m_objMarker;
     192                 :            :     sal_Bool m_bHint;
     193                 :            :     sal_uInt16 m_nFlag;
     194                 :            : };
     195                 :            : 
     196                 :            : class LwpFieldMark : public LwpStoryMarker
     197                 :            : {
     198                 :            : public:
     199                 :            :     LwpFieldMark(LwpObjectHeader &objHdr, LwpSvStream *pStrm);
     200 [ +  - ][ -  + ]:         12 :     ~LwpFieldMark(){}
     201                 :            :     void Read();
     202                 :            :     void ParseIndex(OUString& sKey1,OUString& sKey2);
     203                 :            :     void ParseTOC(OUString& sLevel,OUString& sText);
     204                 :         30 :     sal_uInt16 GetFieldType(){return m_nFieldType;}
     205                 :            :     sal_Bool IsFormulaInsert();
     206                 :            :     sal_Bool IsDateTimeField(sal_uInt8& type,OUString& formula);
     207                 :            :     sal_Bool IsCrossRefField(sal_uInt8& nType, OUString& sMarkName);
     208                 :            :     sal_Bool IsDocPowerField(sal_uInt8& nType,OUString& sFormula);
     209                 :          9 :     OUString GetFormula(){return m_Formula.str();}
     210                 :          0 :     void SetStyleFlag(sal_Bool bFalg){m_bHasStyle = bFalg;}
     211                 :          6 :     sal_Bool GetStyleFlag(){return m_bHasStyle;}
     212                 :          6 :     sal_Bool GetStart(){return m_bHasStart;}
     213                 :          6 :     void SetStart(sal_Bool bFlag){m_bHasStart = bFlag;}
     214                 :          0 :     LwpFrib* GetStartFrib(){return m_pFrib;}
     215                 :          0 :     void SetStartFrib(LwpFrib* pFrib){m_pFrib = pFrib;}
     216                 :         24 :     sal_Bool GetRevisionFlag(){return m_bRevisionFlag;}
     217                 :          0 :     void SetRevisionFlag(sal_Bool bFlag){m_bRevisionFlag = bFlag;}
     218                 :            : 
     219                 :            :     enum{
     220                 :            :         FLD_FIELD = 0x0003,
     221                 :            :         FLD_INDEX = 0x0008,
     222                 :            :         FLD_TOC = 0x000B
     223                 :            :     };
     224                 :            :     enum{
     225                 :            :         FF_FORMULAINSERTED = 0X0008,
     226                 :            :     };
     227                 :            :     enum{
     228                 :            :         CROSSREF_INVALID = 0,
     229                 :            :         CROSSREF_TEXT = 1,
     230                 :            :         CROSSREF_PAGE = 2,
     231                 :            :         CROSSREF_PARANUMBER = 3
     232                 :            :     };
     233                 :            :     enum{
     234                 :            :         DATETIME_SKIP = 0,
     235                 :            :         DATETIME_NOW = 1,
     236                 :            :         DATETIME_CREATE = 2,
     237                 :            :         DATETIME_LASTEDIT = 3,
     238                 :            :         DATETIME_TOTALTIME = 4
     239                 :            :     };
     240                 :            :     enum{
     241                 :            :         DOC_DESCRIPTION = 1,
     242                 :            :         DOC_NUMPAGES = 2,
     243                 :            :         DOC_NUMWORDS = 3,
     244                 :            :         DOC_NUMCHARS = 4,
     245                 :            :     };
     246                 :            : private:
     247                 :            :     LwpObjectID m_objFormulaStory;
     248                 :            :     LwpObjectID m_objResultContent;
     249                 :            :     sal_uInt8* m_nExtra;
     250                 :            :     sal_uInt16 m_nFlag;
     251                 :            :     sal_uInt16 m_nFieldType;
     252                 :            :     LwpAtomHolder m_Formula;
     253                 :            : 
     254                 :            :     sal_Bool m_bHasStyle;
     255                 :            :     sal_Bool m_bHasStart;
     256                 :            : 
     257                 :            :     LwpFrib* m_pFrib;
     258                 :            :     sal_Bool m_bRevisionFlag;
     259                 :            : };
     260                 :            : 
     261                 :            : class LwpRubyMarker : public LwpStoryMarker
     262                 :            : {
     263                 :            : public:
     264                 :            :     LwpRubyMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm);
     265         [ #  # ]:          0 :     ~LwpRubyMarker(){}
     266                 :            :     void Read();
     267                 :          0 :     OUString GetRubyText(){return m_strRubyText;}
     268                 :          0 :     void SetRubyText(OUString sText){m_strRubyText = sText;}
     269                 :          0 :     OUString GetTextStyleName(){return m_TextStye;}
     270                 :          0 :     void SetTextStyleName(OUString sName){m_TextStye = sName;}
     271                 :          0 :     OUString GetRubyStyleName(){return m_RubyStyle;}
     272                 :          0 :     void SetRubyStyleName(OUString sName){m_RubyStyle = sName;}
     273                 :            : private:
     274                 :            :     LwpObjectID m_objLayout;
     275                 :            :     OUString m_strRubyText;
     276                 :            :     OUString m_RubyStyle;
     277                 :            :     OUString m_TextStye;
     278                 :            : };
     279                 :            : #endif
     280                 :            : 
     281                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10