LibreOffice Module lotuswordpro (master) 1
lwpfribtext.hxx
Go to the documentation of this file.
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#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRIBTEXT_HXX
62#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRIBTEXT_HXX
63
64#include <lwpfrib.hxx>
65#include "lwpstory.hxx"
66class LwpFribText : public LwpFrib
67{
68public:
69 LwpFribText( LwpPara* pPara, bool bNoUnicode);
70 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
71 void XFConvert(XFContentContainer* pXFPara,LwpStory* pStory);
72private:
73 OUString m_Content;
75public:
76 const OUString& GetText() const {return m_Content;}
77};
78
80{
81public:
82 explicit LwpFribHardSpace( LwpPara* pPara ) : LwpFrib(pPara){}
83};
84
86{
87public:
88 explicit LwpFribSoftHyphen( LwpPara* pPara ) : LwpFrib(pPara){}
89};
90
92{
93public:
94 explicit LwpFribParaNumber( LwpPara* pPara ) : LwpFrib(pPara),
96 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
97
98 inline sal_uInt16 GetStyleID() const;
99
100 inline sal_uInt16 GetNumberChar() const;
101
102 inline sal_uInt16 GetStart() const;
103
104private:
105 sal_uInt16 m_nStyleID;
106 sal_uInt16 m_nNumberChar;
107 sal_uInt16 m_nLevel;
108 sal_uInt16 m_nStart;
109};
110inline sal_uInt16 LwpFribParaNumber::GetStyleID() const
111{
112 return m_nStyleID;
113}
114inline sal_uInt16 LwpFribParaNumber::GetNumberChar() const
115{
116 return m_nNumberChar;
117}
118inline sal_uInt16 LwpFribParaNumber::GetStart() const
119{
120 return m_nStart;
121}
122
123class LwpFribDocVar : public LwpFrib
124{
125public:
126 explicit LwpFribDocVar( LwpPara* pPara );
127
128 virtual ~LwpFribDocVar() override;
129
130 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
131
132 void RegisterStyle(LwpFoundry* pFoundry) override;
133
134 void XFConvert(XFContentContainer* pXFPara);
135
136 enum {
137 FILENAME = 0x02,
138 PATH = 0x03,
144 NUMPAGES= 0x09,
145 NUMWORDS= 0x0a,
146 NUMCHARS = 0x0b,
147 DOCSIZE = 0x0c,
160 KEYWORDS = 0x19,
161 CREATEDBY = 0x1a,
162 LASTEDIT = 0x1b,
165 };
166
167private:
168 sal_uInt16 m_nType;
170 OUString m_TimeStyle;
173};
174
175class LwpFribTab : public LwpFrib
176{
177public:
178 explicit LwpFribTab( LwpPara* pPara ) : LwpFrib(pPara){}
179};
180
182{
183public:
184 explicit LwpFribUnicode( LwpPara* pPara ) : LwpFrib(pPara){}
185 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
186 void XFConvert(XFContentContainer* pXFPara,LwpStory* pStory);
187private:
188 OUString m_Content;
189public:
190 const OUString& GetText() const {return m_Content;}
191};
192
194{
195public:
196 explicit LwpFribPageNumber(LwpPara* pPara) : LwpFrib(pPara),
198 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
199 void XFConvert(XFContentContainer* pXFPara);
200private:
201 sal_uInt16 m_nNumStyle;
204 sal_uInt16 m_nStartNum;
205 sal_uInt16 m_nStartOnPage;
206 sal_uInt16 m_nFlag;
207};
208
209#endif
210
211/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AtomHolder class of Word Pro to hold a string.
void XFConvert(XFContentContainer *pXFPara)
: convert the doc info field
void RegisterStyle(LwpFoundry *pFoundry) override
: register style for doc field (text style,date style)
sal_uInt16 m_nType
LwpAtomHolder m_aName
void RegisterDefaultTimeStyle()
: register default time style for doc field
LwpFribDocVar(LwpPara *pPara)
: default constructor of LwpFribDocVar
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
: Reading mothed of document variable frib.
virtual ~LwpFribDocVar() override
: destructor of LwpFribDocVar
OUString m_TimeStyle
void RegisterTotalTimeStyle()
LwpFribHardSpace(LwpPara *pPara)
Definition: lwpfribtext.hxx:82
LwpAtomHolder m_aAfterText
sal_uInt16 m_nFlag
sal_uInt16 m_nNumStyle
sal_uInt16 m_nStartOnPage
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
: Read page number
LwpFribPageNumber(LwpPara *pPara)
LwpAtomHolder m_aBefText
sal_uInt16 m_nStartNum
void XFConvert(XFContentContainer *pXFPara)
sal_uInt16 GetNumberChar() const
LwpFribParaNumber(LwpPara *pPara)
Definition: lwpfribtext.hxx:94
sal_uInt16 m_nNumberChar
sal_uInt16 GetStyleID() const
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
: Reading mothed of paranumber frib.
sal_uInt16 m_nStart
sal_uInt16 m_nLevel
sal_uInt16 m_nStyleID
sal_uInt16 GetStart() const
LwpFribSoftHyphen(LwpPara *pPara)
Definition: lwpfribtext.hxx:88
LwpFribTab(LwpPara *pPara)
const OUString & GetText() const
Definition: lwpfribtext.hxx:76
OUString m_Content
Definition: lwpfribtext.hxx:73
void XFConvert(XFContentContainer *pXFPara, LwpStory *pStory)
Definition: lwpfribtext.cxx:99
bool m_bNoUnicode
Definition: lwpfribtext.hxx:74
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
Definition: lwpfribtext.cxx:78
LwpFribText(LwpPara *pPara, bool bNoUnicode)
Definition: lwpfribtext.cxx:74
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
: Read unicode
void XFConvert(XFContentContainer *pXFPara, LwpStory *pStory)
OUString m_Content
LwpFribUnicode(LwpPara *pPara)
const OUString & GetText() const
stream class for LwpObject body data provide stream like interface to read object data
Definition: lwpobjstrm.hxx:77
A container for content.