LibreOffice Module lotuswordpro (master) 1
lwpfootnote.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 ************************************************************************/
61#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOOTNOTE_HXX
62#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOOTNOTE_HXX
63
64#include <lwpfrib.hxx>
65#include <lwpobj.hxx>
66#include "lwpsection.hxx"
67#include "lwpborderstuff.hxx"
68#include "lwptable.hxx"
69
70// Footnote types are built up from these numbers
71#define FN_MASK_ENDNOTE 0x80
72#define FN_MASK_SEPARATE 0x40
73#define FN_MASK_DEACTIVATED 0x20
74#define FN_MASK_BASE (0x0f | FN_MASK_ENDNOTE)
75#define FN_BASE_DONTCARE 0
76#define FN_BASE_FOOTNOTE 1
77#define FN_BASE_DIVISION (2 | FN_MASK_ENDNOTE)
78#define FN_BASE_DIVISIONGROUP (3 | FN_MASK_ENDNOTE)
79#define FN_BASE_DOCUMENT (4 | FN_MASK_ENDNOTE)
80
81// Here are the real footnote types
82#define FN_DONTCARE (FN_BASE_DONTCARE)
83#define FN_FOOTNOTE (FN_BASE_FOOTNOTE)
84#define FN_DIVISION (FN_BASE_DIVISION)
85#define FN_DIVISION_SEPARATE (FN_BASE_DIVISION | FN_MASK_SEPARATE)
86#define FN_DIVISIONGROUP (FN_BASE_DIVISIONGROUP)
87#define FN_DIVISIONGROUP_SEPARATE (FN_BASE_DIVISIONGROUP | FN_MASK_SEPARATE)
88#define FN_DOCUMENT (FN_BASE_DOCUMENT)
89#define FN_DOCUMENT_SEPARATE (FN_BASE_DOCUMENT | FN_MASK_SEPARATE)
90inline constexpr OUStringLiteral STRID_FOOTCONTINUEDFROM = u"Continued from previous page...";
91inline constexpr OUStringLiteral STRID_FOOTCONTINUEDON = u"Continued on next page...";
92//Footnote table types, the string may have to do with local language
93inline constexpr OUStringLiteral STR_DivisionFootnote = u"DivisionFootnote";
94inline constexpr OUStringLiteral STR_DivisionEndnote = u"DivisionEndnote";
95inline constexpr OUStringLiteral STR_DivisionGroupEndnote = u"DivisionGroupEndnote";
96inline constexpr OUStringLiteral STR_DocumentEndnote = u"DocumentEndnote";
97
101class LwpFootnote;
103{
104
105public:
106 explicit LwpFribFootnote(LwpPara* pPara );
107 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
108 void RegisterNewStyle();
109 void XFConvert(XFContentContainer* pCont);
111
112private:
114};
115
120class LwpCellLayout;
121class LwpDocument;
122class LwpTable;
124{
125public:
126 LwpFootnote(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
127 virtual ~LwpFootnote() override;
128 void RegisterStyle() override;
129 void XFConvert(XFContentContainer * pCont) override;
130protected:
131 void Read() override;
132private:
133 sal_uInt16 m_nType;
134 sal_uInt16 m_nRow;
136public:
137 sal_uInt16 GetType() const { return m_nType;}
138private:
144 OUString GetTableClass() const;
145};
146
151{
152public:
153 LwpFootnoteTable(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
154protected:
155 void Read() override;
156};
157
162{
163public:
165 : m_nFlag(0)
167 {}
168
169 void Read(LwpObjectStream* pObjStrm);
170private:
171 sal_uInt16 m_nFlag;
175public:
176 enum // for flag
177 {
178 RESET_DOCUMENT = 0x00, // i.e., never reset the numbering
185 };
186public:
187 sal_uInt16 GetStartingNumber() const { return m_nStartingNumber;}
188 OUString const & GetLeadingText() const { return m_LeadingText.str();}
189 OUString const & GetTrailingText() const { return m_TrailingText.str();}
190 sal_uInt16 GetReset() const { return static_cast<sal_uInt16>(m_nFlag & RESET_MASK);}
191};
192
197{
198public:
200 : m_nFlag(0)
201 , m_nLength(0)
202 , m_nIndent(0)
203 , m_nAbove(0)
204 , m_nBelow(0)
205 {}
206
207 void Read(LwpObjectStream* pObjStrm);
208private:
209 sal_uInt16 m_nFlag;
210 sal_uInt32 m_nLength;
211 sal_uInt32 m_nIndent;
212 sal_uInt32 m_nAbove;
213 sal_uInt32 m_nBelow;
215public:
216 enum // for flag
217 {
219 CUSTOM_LENGTH = 0x02
220 };
221 sal_uInt32 GetLength() const { return m_nLength;}
222 sal_uInt32 GetIndent() const { return m_nIndent;}
223 sal_uInt32 GetAbove() const { return m_nAbove;}
224 sal_uInt32 GetBelow() const { return m_nBelow;}
225 bool HasCustomLength() const { return (m_nFlag & CUSTOM_LENGTH) != 0;}
226 bool HasSeparator() const { return (m_nFlag & HAS_SEPARATOR) != 0;}
229};
230
234class LwpFootnoteOptions final : public LwpObject
235{
236public:
237 LwpFootnoteOptions(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
238 void RegisterStyle() override;
239private:
240 void Read() override;
243 virtual ~LwpFootnoteOptions() override;
244
245 sal_uInt16 m_nFlag;
255 enum
256 {
257 FO_REPEAT = 0x0001,
260 FO_ON_CENTER = 0x0008,
261 FO_ON_RIGHT = 0x0010,
266 };
267
268public:
270 bool GetContinuedFrom() const { return ((m_nFlag & FO_CONTINUEFROM) != 0);}
271 bool GetContinuedOn() const { return ((m_nFlag & FO_CONTINUEON) != 0);}
272 OUString GetContinuedOnMessage() const;
273 OUString GetContinuedFromMessage() const;
274 void SetMasterPage(const OUString& strMasterPage){ m_strMasterPage = strMasterPage;}
275};
276
277#endif
278
279/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AtomHolder class of Word Pro to hold a string.
const OUString & str() const
float GetSideWidth(sal_uInt16 side)
LwpColor GetSideColor(sal_uInt16 side)
VO_CELLLAYOUT object.
lwpcolor class (red, green, blue, extra)
Definition: lwpcolor.hxx:71
Base class of all Lwp content objects.
Definition: lwpcontent.hxx:74
Document object, represent document and division.
Definition: lwpdoc.hxx:76
VO_ENSUPERTABLELAYOUT object.
footnote number options information
LwpAtomHolder m_LeadingText
sal_uInt16 GetStartingNumber() const
sal_uInt16 GetReset() const
OUString const & GetTrailingText() const
LwpAtomHolder m_TrailingText
void Read(LwpObjectStream *pObjStrm)
@descr Read footnote number options information
OUString const & GetLeadingText() const
VO_FOOTNOTEOPTS object.
void Read() override
@descr Register footnote options object
void SetMasterPage(const OUString &strMasterPage)
LwpFootnoteSeparatorOptions m_FootnoteContinuedSeparator
void RegisterStyle() override
@descr Register footnote options style
OUString GetContinuedFromMessage() const
@descr Get continue from message
LwpFootnoteNumberOptions m_EndnoteDivisionGroupNumbering
LwpFootnoteOptions(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
bool GetContinuedOn() const
virtual ~LwpFootnoteOptions() override
LwpAtomHolder m_ContinuedFromMessage
OUString GetContinuedOnMessage() const
@descr Get continue on message
bool GetContinuedFrom() const
OUString m_strMasterPage
LwpFootnoteNumberOptions m_EndnoteDocNumbering
LwpFootnoteSeparatorOptions m_FootnoteSeparator
void RegisterFootnoteStyle()
@descr Register footnote configuration information
void RegisterEndnoteStyle()
@descr Register endnote configuration information
LwpFootnoteSeparatorOptions & GetFootnoteSeparator()
LwpAtomHolder m_ContinuedOnMessage
LwpFootnoteNumberOptions m_EndnoteDivisionNumbering
LwpFootnoteNumberOptions m_FootnoteNumbering
footnote separator options information
sal_uInt32 GetLength() const
sal_uInt32 GetIndent() const
void Read(LwpObjectStream *pObjStrm)
@descr Read footnote separator options information
sal_uInt32 GetBelow() const
sal_uInt32 GetAbove() const
VO_FOOTNOTETABLE object.
LwpFootnoteTable(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void Read() override
@descr default read function
sal_uInt16 m_nType
LwpCellLayout * GetCellLayout()
@descr Get endnote cell layout which contains current endnote content
LwpObjectID m_Content
LwpDocument * GetFootnoteTableDivision()
@descr Get division which footnote table contains current footnote content, copy from lwp source code
OUString GetTableClass() const
@descr Get footnote table class name
LwpFootnote(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
sal_uInt16 m_nRow
virtual ~LwpFootnote() override
LwpEnSuperTableLayout * FindFootnoteTableLayout()
@descr Find footnote tablelayout, copy from lwp source code
void XFConvert(XFContentContainer *pCont) override
@descr Parse footnote
LwpContent * FindFootnoteContent()
@descr Find footnote contents
void Read() override
@descr Read foonote object
sal_uInt16 GetType() const
void RegisterStyle() override
@descr Register footnote style
LwpDocument * GetEndnoteDivision(LwpDocument *pPossible)
@descr Get division which endnote table contains current endnote content, copy from lwp source code
void RegisterNewStyle()
@descr Register footnote style by calling LwpFootnote::RegisterStyle()
Definition: lwpfootnote.cxx:86
LwpFootnote * GetFootnote()
@descr Get foonote object
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
@descr read footnote frib information
Definition: lwpfootnote.cxx:78
void XFConvert(XFContentContainer *pCont)
@descr Parse footnote by calling LwpFootnote::XFConvert()
LwpObjectID m_Footnote
LwpFribFootnote(LwpPara *pPara)
Definition: lwpfootnote.cxx:70
Base class of all Lwp VO objects.
Definition: lwpobjhdr.hxx:71
object id class
Definition: lwpobjid.hxx:79
stream class for LwpObject body data provide stream like interface to read object data
Definition: lwpobjstrm.hxx:77
Base class of all Lwp VO objects.
Definition: lwpobj.hxx:83
encapsulate XInputStream to provide SvStream like interfaces
Definition: lwpsvstream.hxx:69
VO_TABLE object.
Definition: lwptable.hxx:107
A container for content.
float u
constexpr OUStringLiteral STRID_FOOTCONTINUEDFROM
Definition: lwpfootnote.hxx:90
constexpr OUStringLiteral STR_DivisionFootnote
Definition: lwpfootnote.hxx:93
constexpr OUStringLiteral STR_DocumentEndnote
Definition: lwpfootnote.hxx:96
constexpr OUStringLiteral STRID_FOOTCONTINUEDON
Definition: lwpfootnote.hxx:91
constexpr OUStringLiteral STR_DivisionGroupEndnote
Definition: lwpfootnote.hxx:95
constexpr OUStringLiteral STR_DivisionEndnote
Definition: lwpfootnote.hxx:94
Base class of all Lwp VO objects.
For LWP filter architecture prototype - table object.