1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
10 * Sun Microsystems Inc., October, 2000
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
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.
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.
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,
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.
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.
46 * The Initial Developer of the Original Code is: IBM Corporation
48 * Copyright: 2008 by IBM Corporation
50 * All Rights Reserved.
52 * Contributor(s): _______________________________________
55 ************************************************************************/
61 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOOTNOTE_HXX
62 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOOTNOTE_HXX
64 #include "lwpfrib.hxx"
66 #include "lwpsection.hxx"
67 #include "lwpborderstuff.hxx"
69 // Footnote types are built up from these numbers
70 #define FN_MASK_ENDNOTE 0x80
71 #define FN_MASK_SEPARATE 0x40
72 #define FN_MASK_DEACTIVATED 0x20
73 #define FN_MASK_BASE (0x0f | FN_MASK_ENDNOTE)
74 #define FN_BASE_DONTCARE 0
75 #define FN_BASE_FOOTNOTE 1
76 #define FN_BASE_DIVISION (2 | FN_MASK_ENDNOTE)
77 #define FN_BASE_DIVISIONGROUP (3 | FN_MASK_ENDNOTE)
78 #define FN_BASE_DOCUMENT (4 | FN_MASK_ENDNOTE)
80 // Here are the real footnote types
81 #define FN_DONTCARE (FN_BASE_DONTCARE)
82 #define FN_FOOTNOTE (FN_BASE_FOOTNOTE)
83 #define FN_DIVISION (FN_BASE_DIVISION)
84 #define FN_DIVISION_SEPARATE (FN_BASE_DIVISION | FN_MASK_SEPARATE)
85 #define FN_DIVISIONGROUP (FN_BASE_DIVISIONGROUP)
86 #define FN_DIVISIONGROUP_SEPARATE (FN_BASE_DIVISIONGROUP | FN_MASK_SEPARATE)
87 #define FN_DOCUMENT (FN_BASE_DOCUMENT)
88 #define FN_DOCUMENT_SEPARATE (FN_BASE_DOCUMENT | FN_MASK_SEPARATE)
89 #define STRID_FOOTCONTINUEDFROM "Continued from previous page..."
90 #define STRID_FOOTCONTINUEDON "Continued on next page..."
91 //Footnote table types, the string may have to do with local language
92 #define STR_DivisionFootnote "DivisionFootnote"
93 #define STR_DivisionEndnote "DivisionEndnote"
94 #define STR_DivisionGroupEndnote "DivisionGroupEndnote"
95 #define STR_DocumentEndnote "DocumentEndnote"
98 * @brief Footnote frib object
101 class LwpFribFootnote
: public LwpFrib
105 explicit LwpFribFootnote(LwpPara
* pPara
);
106 virtual ~LwpFribFootnote(){}
107 void Read(LwpObjectStream
* pObjStrm
, sal_uInt16 len
) override
;
108 void RegisterNewStyle();
109 void XFConvert(XFContentContainer
* pCont
);
110 LwpFootnote
* GetFootnote();
113 LwpObjectID m_Footnote
;
117 * @brief VO_FOOTNOTE object
119 class LwpEnSuperTableLayout
;
123 class LwpFootnote
: public LwpOrderedObject
126 LwpFootnote(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
127 virtual ~LwpFootnote();
128 void RegisterStyle() override
;
129 void XFConvert(XFContentContainer
* pCont
) override
;
131 void Read() override
;
135 LwpObjectID m_Content
;
137 sal_uInt16
GetType(){ return m_nType
;}
139 LwpCellLayout
* GetCellLayout();
140 LwpDocument
* GetFootnoteTableDivision();
141 LwpDocument
* GetEndnoteDivision(LwpDocument
* pPossible
);
142 LwpEnSuperTableLayout
* FindFootnoteTableLayout();
143 LwpContent
* FindFootnoteContent();
144 OUString
GetTableClass();
148 * @brief VO_FOOTNOTETABLE object
150 #include "lwptable.hxx"
151 class LwpFootnoteTable
: public LwpTable
154 LwpFootnoteTable(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
155 virtual ~LwpFootnoteTable(){}
157 void Read() override
;
161 * @brief footnote number options information
163 class LwpFootnoteNumberOptions
166 LwpFootnoteNumberOptions()
168 , m_nStartingNumber(0)
171 ~LwpFootnoteNumberOptions(){}
172 void Read(LwpObjectStream
* pObjStrm
);
175 sal_uInt16 m_nStartingNumber
;
176 LwpAtomHolder m_LeadingText
;
177 LwpAtomHolder m_TrailingText
;
181 RESET_DOCUMENT
= 0x00, // i.e., never reset the numbering
183 RESET_DIVISION
= 0x02,
184 RESET_DIVISIONGROUP
= 0x04,
185 RESET_MASK
= (RESET_PAGE
| RESET_DIVISION
| RESET_DIVISIONGROUP
|
187 SUPERSCRIPT_REFERENCE
= 0x10
190 sal_uInt16
GetStartingNumber(){ return m_nStartingNumber
;}
191 OUString
GetLeadingText(){ return m_LeadingText
.str();}
192 OUString
GetTrailingText(){ return m_TrailingText
.str();}
193 sal_uInt16
GetReset(){ return static_cast<sal_uInt16
>(m_nFlag
& RESET_MASK
);}
197 * @brief footnote separator options information
199 class LwpFootnoteSeparatorOptions
202 LwpFootnoteSeparatorOptions()
210 ~LwpFootnoteSeparatorOptions(){}
211 void Read(LwpObjectStream
* pObjStrm
);
214 sal_uInt32 m_nLength
;
215 sal_uInt32 m_nIndent
;
218 LwpBorderStuff m_BorderStuff
;
222 HAS_SEPARATOR
= 0x01,
225 sal_uInt32
GetLength(){ return m_nLength
;}
226 sal_uInt32
GetIndent(){ return m_nIndent
;}
227 sal_uInt32
GetAbove(){ return m_nAbove
;}
228 sal_uInt32
GetBelow(){ return m_nBelow
;}
229 bool HasCustomLength(){ return (m_nFlag
& CUSTOM_LENGTH
) != 0;}
230 bool HasSeparator(){ return (m_nFlag
& HAS_SEPARATOR
) != 0;}
231 float GetTopBorderWidth(){ return m_BorderStuff
.GetSideWidth(LwpBorderStuff::TOP
);}
232 LwpColor
GetTopBorderColor(){ return m_BorderStuff
.GetSideColor(LwpBorderStuff::TOP
);}
236 * @brief VO_FOOTNOTEOPTS object
238 class LwpFootnoteOptions
: public LwpObject
241 LwpFootnoteOptions(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
242 void RegisterStyle() override
;
244 void Read() override
;
245 void RegisterFootnoteStyle();
246 void RegisterEndnoteStyle();
248 virtual ~LwpFootnoteOptions();
251 LwpFootnoteNumberOptions m_FootnoteNumbering
;
252 LwpFootnoteNumberOptions m_EndnoteDivisionNumbering
;
253 LwpFootnoteNumberOptions m_EndnoteDivisionGroupNumbering
;
254 LwpFootnoteNumberOptions m_EndnoteDocNumbering
;
255 LwpFootnoteSeparatorOptions m_FootnoteSeparator
;
256 LwpFootnoteSeparatorOptions m_FootnoteContinuedSeparator
;
257 LwpAtomHolder m_ContinuedOnMessage
;
258 LwpAtomHolder m_ContinuedFromMessage
;
259 OUString m_strMasterPage
;
263 FO_CONTINUEFROM
= 0x0002,
264 FO_CONTINUEON
= 0x0004,
265 FO_ON_CENTER
= 0x0008,
266 FO_ON_RIGHT
= 0x0010,
267 FO_ON_ALIGNMASK
= FO_ON_CENTER
| FO_ON_RIGHT
,
268 FO_FROM_CENTER
= 0x0020,
269 FO_FROM_RIGHT
= 0x0040,
270 FO_FROM_ALIGNMASK
= FO_FROM_CENTER
| FO_FROM_RIGHT
274 LwpFootnoteSeparatorOptions
& GetFootnoteSeparator(){ return m_FootnoteSeparator
;}
275 bool GetContinuedFrom(){ return ((m_nFlag
& FO_CONTINUEFROM
) != 0);}
276 bool GetContinuedOn(){ return ((m_nFlag
& FO_CONTINUEON
) != 0);}
277 OUString
GetContinuedOnMessage();
278 OUString
GetContinuedFromMessage();
279 void SetMasterPage(const OUString
& strMasterPage
){ m_strMasterPage
= strMasterPage
;}
284 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */