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 ************************************************************************/
60 /*************************************************************************
63 ************************************************************************/
64 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOOTNOTE_HXX
65 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOOTNOTE_HXX
67 #include "lwpfrib.hxx"
69 #include "lwpsection.hxx"
70 #include "lwpborderstuff.hxx"
72 // Footnote types are built up from these numbers
73 #define FN_MASK_ENDNOTE 0x80
74 #define FN_MASK_SEPARATE 0x40
75 #define FN_MASK_DEACTIVATED 0x20
76 #define FN_MASK_BASE (0x0f | FN_MASK_ENDNOTE)
77 #define FN_BASE_DONTCARE 0
78 #define FN_BASE_FOOTNOTE 1
79 #define FN_BASE_DIVISION (2 | FN_MASK_ENDNOTE)
80 #define FN_BASE_DIVISIONGROUP (3 | FN_MASK_ENDNOTE)
81 #define FN_BASE_DOCUMENT (4 | FN_MASK_ENDNOTE)
83 // Here are the real footnote types
84 #define FN_DONTCARE (FN_BASE_DONTCARE)
85 #define FN_FOOTNOTE (FN_BASE_FOOTNOTE)
86 #define FN_DIVISION (FN_BASE_DIVISION)
87 #define FN_DIVISION_SEPARATE (FN_BASE_DIVISION | FN_MASK_SEPARATE)
88 #define FN_DIVISIONGROUP (FN_BASE_DIVISIONGROUP)
89 #define FN_DIVISIONGROUP_SEPARATE (FN_BASE_DIVISIONGROUP | FN_MASK_SEPARATE)
90 #define FN_DOCUMENT (FN_BASE_DOCUMENT)
91 #define FN_DOCUMENT_SEPARATE (FN_BASE_DOCUMENT | FN_MASK_SEPARATE)
92 #define STRID_FOOTCONTINUEDFROM "Continued from previous page..."
93 #define STRID_FOOTCONTINUEDON "Continued on next page..."
94 //Footnote table types, the string may have to do with local language
95 #define STR_DivisionFootnote "DivisionFootnote"
96 #define STR_DivisionEndnote "DivisionEndnote"
97 #define STR_DivisionGroupEndnote "DivisionGroupEndnote"
98 #define STR_DocumentEndnote "DocumentEndnote"
101 * @brief Footnote frib object
104 class LwpFribFootnote
: public LwpFrib
108 LwpFribFootnote(LwpPara
* pPara
);
109 virtual ~LwpFribFootnote(){}
110 void Read(LwpObjectStream
* pObjStrm
, sal_uInt16 len
) SAL_OVERRIDE
;
111 void RegisterNewStyle();
112 void XFConvert(XFContentContainer
* pCont
);
113 LwpFootnote
* GetFootnote();
116 LwpObjectID m_Footnote
;
120 * @brief VO_FOOTNOTE object
122 class LwpEnSuperTableLayout
;
126 class LwpFootnote
: public LwpOrderedObject
129 LwpFootnote(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
130 virtual ~LwpFootnote();
131 void RegisterStyle() SAL_OVERRIDE
;
132 void XFConvert(XFContentContainer
* pCont
) SAL_OVERRIDE
;
134 void Read() SAL_OVERRIDE
;
138 LwpObjectID m_Content
;
140 sal_uInt16
GetType(){ return m_nType
;}
142 LwpCellLayout
* GetCellLayout();
143 LwpDocument
* GetFootnoteTableDivision();
144 LwpDocument
* GetEndnoteDivision(LwpDocument
* pPossible
);
145 LwpEnSuperTableLayout
* FindFootnoteTableLayout();
146 LwpContent
* FindFootnoteContent();
147 OUString
GetTableClass();
151 * @brief VO_FOOTNOTETABLE object
153 #include "lwptable.hxx"
154 class LwpFootnoteTable
: public LwpTable
157 LwpFootnoteTable(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
158 virtual ~LwpFootnoteTable(){}
160 void Read() SAL_OVERRIDE
;
164 * @brief footnote number options information
166 class LwpFootnoteNumberOptions
169 LwpFootnoteNumberOptions()
171 , m_nStartingNumber(0)
174 ~LwpFootnoteNumberOptions(){}
175 void Read(LwpObjectStream
* pObjStrm
);
178 sal_uInt16 m_nStartingNumber
;
179 LwpAtomHolder m_LeadingText
;
180 LwpAtomHolder m_TrailingText
;
184 RESET_DOCUMENT
= 0x00, // i.e., never reset the numbering
186 RESET_DIVISION
= 0x02,
187 RESET_DIVISIONGROUP
= 0x04,
188 RESET_MASK
= (RESET_PAGE
| RESET_DIVISION
| RESET_DIVISIONGROUP
|
190 SUPERSCRIPT_REFERENCE
= 0x10
193 sal_uInt16
GetStartingNumber(){ return m_nStartingNumber
;}
194 OUString
GetLeadingText(){ return m_LeadingText
.str();}
195 OUString
GetTrailingText(){ return m_TrailingText
.str();}
196 sal_uInt16
GetReset(){ return static_cast<sal_uInt16
>(m_nFlag
& RESET_MASK
);}
200 * @brief footnote separator options information
202 class LwpFootnoteSeparatorOptions
205 LwpFootnoteSeparatorOptions()
213 ~LwpFootnoteSeparatorOptions(){}
214 void Read(LwpObjectStream
* pObjStrm
);
217 sal_uInt32 m_nLength
;
218 sal_uInt32 m_nIndent
;
221 LwpBorderStuff m_BorderStuff
;
225 HAS_SEPARATOR
= 0x01,
229 sal_uInt32
GetFlag(){ return m_nFlag
;}
230 sal_uInt32
GetLength(){ return m_nLength
;}
231 sal_uInt32
GetIndent(){ return m_nIndent
;}
232 sal_uInt32
GetAbove(){ return m_nAbove
;}
233 sal_uInt32
GetBelow(){ return m_nBelow
;}
234 LwpBorderStuff
* GetBorderStuff(){ return &m_BorderStuff
;}
235 bool HasCustomLength(){ return (m_nFlag
& CUSTOM_LENGTH
) != 0;}
236 bool HasSeparator(){ return (m_nFlag
& HAS_SEPARATOR
) != 0;}
237 float GetTopBorderWidth(){ return m_BorderStuff
.GetSideWidth(LwpBorderStuff::TOP
);}
238 LwpColor
GetTopBorderColor(){ return m_BorderStuff
.GetSideColor(LwpBorderStuff::TOP
);}
242 * @brief VO_FOOTNOTEOPTS object
244 class LwpFootnoteOptions
: public LwpObject
247 LwpFootnoteOptions(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
248 virtual ~LwpFootnoteOptions();
249 void RegisterStyle() SAL_OVERRIDE
;
251 void Read() SAL_OVERRIDE
;
252 void RegisterFootnoteStyle();
253 void RegisterEndnoteStyle();
256 LwpFootnoteNumberOptions m_FootnoteNumbering
;
257 LwpFootnoteNumberOptions m_EndnoteDivisionNumbering
;
258 LwpFootnoteNumberOptions m_EndnoteDivisionGroupNumbering
;
259 LwpFootnoteNumberOptions m_EndnoteDocNumbering
;
260 LwpFootnoteSeparatorOptions m_FootnoteSeparator
;
261 LwpFootnoteSeparatorOptions m_FootnoteContinuedSeparator
;
262 LwpAtomHolder m_ContinuedOnMessage
;
263 LwpAtomHolder m_ContinuedFromMessage
;
264 OUString m_strMasterPage
;
268 FO_CONTINUEFROM
= 0x0002,
269 FO_CONTINUEON
= 0x0004,
270 FO_ON_CENTER
= 0x0008,
271 FO_ON_RIGHT
= 0x0010,
272 FO_ON_ALIGNMASK
= FO_ON_CENTER
| FO_ON_RIGHT
,
273 FO_FROM_CENTER
= 0x0020,
274 FO_FROM_RIGHT
= 0x0040,
275 FO_FROM_ALIGNMASK
= FO_FROM_CENTER
| FO_FROM_RIGHT
279 LwpFootnoteNumberOptions
* GetFootnoteNumbering(){ return &m_FootnoteNumbering
;}
280 LwpFootnoteNumberOptions
* GetEndnoteDivisionNumbering(){ return &m_EndnoteDivisionNumbering
;}
281 LwpFootnoteNumberOptions
* GetEndnoteDivisionGroupNumbering(){ return &m_EndnoteDivisionGroupNumbering
;}
282 LwpFootnoteNumberOptions
* GetEndnoteDocNumbering(){ return &m_EndnoteDocNumbering
;}
283 LwpFootnoteSeparatorOptions
* GetFootnoteSeparator(){ return &m_FootnoteSeparator
;}
284 LwpFootnoteSeparatorOptions
* GetFootnoteContinuedSeparator(){ return &m_FootnoteContinuedSeparator
;}
285 bool GetContinuedFrom(){ return ((m_nFlag
& FO_CONTINUEFROM
) != 0);}
286 bool GetContinuedOn(){ return ((m_nFlag
& FO_CONTINUEON
) != 0);}
287 OUString
GetContinuedOnMessage();
288 OUString
GetContinuedFromMessage();
289 void SetMasterPage(const OUString
& strMasterPage
){ m_strMasterPage
= strMasterPage
;}
294 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */