fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / lotuswordpro / source / filter / lwpfootnote.hxx
blobd05cb4803c2f38c14793e0e6972015b00cf1bf0f
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,
29 * MA 02111-1307 USA
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 ************************************************************************/
56 /**
57 * @file
58 * footnote
60 /*************************************************************************
61 * Change History
62 Mar 2005 Created
63 ************************************************************************/
64 #ifndef _LWPFRIBFOOTNOTE_HXX_
65 #define _LWPFRIBFOOTNOTE_HXX_
67 #include "lwpfrib.hxx"
68 #include "lwpobj.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
103 class LwpFootnote;
104 class LwpFribFootnote: public LwpFrib
107 public:
108 LwpFribFootnote(LwpPara* pPara );
109 ~LwpFribFootnote(){}
110 void Read(LwpObjectStream* pObjStrm, sal_uInt16 len);
111 void RegisterNewStyle();
112 void XFConvert(XFContentContainer* pCont);
113 LwpFootnote* GetFootnote();
115 private:
116 LwpObjectID m_Footnote;
120 * @brief VO_FOOTNOTE object
122 class LwpEnSuperTableLayout;
123 class LwpCellLayout;
124 class LwpDocument;
125 class LwpTable;
126 class LwpFootnote : public LwpOrderedObject
128 public:
129 LwpFootnote(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
130 ~LwpFootnote();
131 void RegisterStyle();
132 void XFConvert(XFContentContainer * pCont);
133 protected:
134 void Read();
135 private:
136 sal_uInt16 m_nType;
137 sal_uInt16 m_nRow;
138 LwpObjectID m_Content;
139 public:
140 sal_uInt16 GetType(){ return m_nType;}
141 private:
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
156 public:
157 LwpFootnoteTable(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
158 ~LwpFootnoteTable(){}
159 protected:
160 void Read();
164 * @brief footnote number options information
166 class LwpFootnoteNumberOptions
168 public:
169 LwpFootnoteNumberOptions(){}
170 ~LwpFootnoteNumberOptions(){}
171 void Read(LwpObjectStream* pObjStrm);
172 private:
173 sal_uInt16 m_nFlag;
174 sal_uInt16 m_nStartingNumber;
175 LwpAtomHolder m_LeadingText;
176 LwpAtomHolder m_TrailingText;
177 public:
178 enum // for flag
180 RESET_DOCUMENT = 0x00, // i.e., never reset the numbering
181 RESET_PAGE = 0x01,
182 RESET_DIVISION = 0x02,
183 RESET_DIVISIONGROUP = 0x04,
184 RESET_MASK = (RESET_PAGE | RESET_DIVISION | RESET_DIVISIONGROUP |
185 RESET_DOCUMENT),
186 SUPERSCRIPT_REFERENCE = 0x10
188 public:
189 sal_uInt16 GetStartingNumber(){ return m_nStartingNumber;}
190 OUString GetLeadingText(){ return m_LeadingText.str();}
191 OUString GetTrailingText(){ return m_TrailingText.str();}
192 sal_uInt16 GetReset(){ return static_cast<sal_uInt16>(m_nFlag & RESET_MASK);}
196 * @brief footnote separator options information
198 class LwpFootnoteSeparatorOptions
200 public:
201 LwpFootnoteSeparatorOptions(){}
202 ~LwpFootnoteSeparatorOptions(){}
203 void Read(LwpObjectStream* pObjStrm);
204 private:
205 sal_uInt16 m_nFlag;
206 sal_uInt32 m_nLength;
207 sal_uInt32 m_nIndent;
208 sal_uInt32 m_nAbove;
209 sal_uInt32 m_nBelow;
210 LwpBorderStuff m_BorderStuff;
211 public:
212 enum // for flag
214 HAS_SEPARATOR = 0x01,
215 CUSTOM_LENGTH = 0x02
217 public:
218 sal_uInt32 GetFlag(){ return m_nFlag;}
219 sal_uInt32 GetLength(){ return m_nLength;}
220 sal_uInt32 GetIndent(){ return m_nIndent;}
221 sal_uInt32 GetAbove(){ return m_nAbove;}
222 sal_uInt32 GetBelow(){ return m_nBelow;}
223 LwpBorderStuff* GetBorderStuff(){ return &m_BorderStuff;}
224 sal_Bool HasCustomLength(){ return (m_nFlag & CUSTOM_LENGTH) != 0;}
225 sal_Bool HasSeparator(){ return (m_nFlag & HAS_SEPARATOR) != 0;}
226 float GetTopBorderWidth(){ return m_BorderStuff.GetSideWidth(LwpBorderStuff::TOP);}
227 LwpColor GetTopBorderColor(){ return m_BorderStuff.GetSideColor(LwpBorderStuff::TOP);}
231 * @brief VO_FOOTNOTEOPTS object
233 class LwpFootnoteOptions : public LwpObject
235 public:
236 LwpFootnoteOptions(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
237 ~LwpFootnoteOptions();
238 void RegisterStyle();
239 protected:
240 void Read();
241 void RegisterFootnoteStyle();
242 void RegisterEndnoteStyle();
243 private:
244 sal_uInt16 m_nFlag;
245 LwpFootnoteNumberOptions m_FootnoteNumbering;
246 LwpFootnoteNumberOptions m_EndnoteDivisionNumbering;
247 LwpFootnoteNumberOptions m_EndnoteDivisionGroupNumbering;
248 LwpFootnoteNumberOptions m_EndnoteDocNumbering;
249 LwpFootnoteSeparatorOptions m_FootnoteSeparator;
250 LwpFootnoteSeparatorOptions m_FootnoteContinuedSeparator;
251 LwpAtomHolder m_ContinuedOnMessage;
252 LwpAtomHolder m_ContinuedFromMessage;
253 OUString m_strMasterPage;
254 enum
256 FO_REPEAT = 0x0001,
257 FO_CONTINUEFROM = 0x0002,
258 FO_CONTINUEON = 0x0004,
259 FO_ON_CENTER = 0x0008,
260 FO_ON_RIGHT = 0x0010,
261 FO_ON_ALIGNMASK = FO_ON_CENTER | FO_ON_RIGHT,
262 FO_FROM_CENTER = 0x0020,
263 FO_FROM_RIGHT = 0x0040,
264 FO_FROM_ALIGNMASK = FO_FROM_CENTER | FO_FROM_RIGHT
267 public:
268 LwpFootnoteNumberOptions* GetFootnoteNumbering(){ return &m_FootnoteNumbering;}
269 LwpFootnoteNumberOptions* GetEndnoteDivisionNumbering(){ return &m_EndnoteDivisionNumbering;}
270 LwpFootnoteNumberOptions* GetEndnoteDivisionGroupNumbering(){ return &m_EndnoteDivisionGroupNumbering;}
271 LwpFootnoteNumberOptions* GetEndnoteDocNumbering(){ return &m_EndnoteDocNumbering;}
272 LwpFootnoteSeparatorOptions* GetFootnoteSeparator(){ return &m_FootnoteSeparator;}
273 LwpFootnoteSeparatorOptions* GetFootnoteContinuedSeparator(){ return &m_FootnoteContinuedSeparator;}
274 sal_Bool GetContinuedFrom(){ return ((m_nFlag & FO_CONTINUEFROM) != 0);}
275 sal_Bool GetContinuedOn(){ return ((m_nFlag & FO_CONTINUEON) != 0);}
276 OUString GetContinuedOnMessage();
277 OUString GetContinuedFromMessage();
278 void SetMasterPage(OUString strMasterPage){ m_strMasterPage = strMasterPage;}
281 #endif
283 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */