merge the formfield patch from ooo-build
[ooovba.git] / lotuswordpro / source / filter / lwptable.hxx
blob9c18158ef7723cc13a439d709ca370752032fc99
1 /*************************************************************************
3 * The Contents of this file are made available subject to the terms of
4 * either of the following licenses
6 * - GNU Lesser General Public License Version 2.1
7 * - Sun Industry Standards Source License Version 1.1
9 * Sun Microsystems Inc., October, 2000
11 * GNU Lesser General Public License Version 2.1
12 * =============================================
13 * Copyright 2000 by Sun Microsystems, Inc.
14 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License version 2.1, as published by the Free Software Foundation.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 * MA 02111-1307 USA
31 * Sun Industry Standards Source License Version 1.1
32 * =================================================
33 * The contents of this file are subject to the Sun Industry Standards
34 * Source License Version 1.1 (the "License"); You may not use this file
35 * except in compliance with the License. You may obtain a copy of the
36 * License at http://www.openoffice.org/license.html.
38 * Software provided under this License is provided on an "AS IS" basis,
39 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
40 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
41 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
42 * See the License for the specific provisions governing your rights and
43 * obligations concerning the Software.
45 * The Initial Developer of the Original Code is: IBM Corporation
47 * Copyright: 2008 by IBM Corporation
49 * All Rights Reserved.
51 * Contributor(s): _______________________________________
54 ************************************************************************/
55 /**
56 * @file
57 * For LWP filter architecture prototype - table object
59 /*************************************************************************
60 * Change History
61 Mar 2005 Created
62 ************************************************************************/
63 #ifndef _LWPTABLE_HXX_
64 #define _LWPTABLE_HXX_
66 #include "lwpobj.hxx"
67 #include "lwpobjhdr.hxx"
68 #include "lwpobjid.hxx"
69 #include "lwpstory.hxx"
70 #include "lwppara.hxx"
71 #include "lwppagehint.hxx"
72 #include "lwptools.hxx"
73 #include "lwptablelayout.hxx"
75 class LwpTableLayout;
76 /**
77 * @brief
78 * VO_SUPERTABLE object
80 class LwpSuperTable: public LwpContent
82 public:
83 LwpSuperTable(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
84 virtual ~LwpSuperTable();
86 virtual void Parse(IXFStream* pOutputStream);
87 //Added by for XFConvert refactor, 03/31/2005
88 virtual void XFConvert(XFContentContainer* pCont);
89 //End of Add
90 protected:
91 void Read();
93 /**
94 * @brief
95 * for VO_TABLE object reading
97 class LwpForkedNotifyList
99 public:
100 LwpForkedNotifyList(){};
101 ~LwpForkedNotifyList() {};
102 void Read(LwpObjectStream* pObjStrm)
104 m_PersistentList.Read(pObjStrm);
107 protected:
108 LwpNotifyListPersistent m_PersistentList;
111 * @brief
112 * VO_TABLE object
114 class LwpTable: public LwpContent
116 public:
117 LwpTable(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
118 virtual ~LwpTable();
120 virtual void Parse(IXFStream* pOutputStream);
121 double GetWidth() {return LwpTools::ConvertFromUnitsToMetric(m_nWidth);};
122 double GetHeight() {return LwpTools::ConvertFromUnitsToMetric(m_nHeight);};
123 LwpObjectID * GetDefaultCellStyle() {return &m_DefaultCellStyle;};
124 sal_uInt16 GetRow() {return m_nRow;};
125 sal_uInt16 GetColumn() {return m_nColumn;};
126 LwpTableLayout * GetTableLayout(){return static_cast<LwpTableLayout *>(GetLayout(NULL));};
127 sal_Bool IsNumberDown();
128 virtual sal_Bool IsTable(){ return sal_True;};
129 LwpSuperTableLayout* GetSuperTableLayout();
130 protected:
131 LwpDLVListHeadTail m_RowCache;
132 LwpDLVListHeadTail m_ColumnCache;
133 LwpNotifyListPersistent m_CPTempVersionedNotifyList;
134 LwpForkedNotifyList m_CPNotifyList;
136 sal_uInt16 m_nRow, m_nColumn;
137 sal_Int32 m_nHeight;
138 sal_Int32 m_nWidth;
139 sal_Int32 m_nDefaultAutoGrowRowHeight;
140 sal_uInt16 m_nAttributes;
141 enum lTableAttributes
143 NUMBER_DOWN = 0x01,
144 SIZING_VIA_MOUSE_ENABLED = 0x02,
145 NUMBER_RESET = 0x04
148 LwpObjectID m_Layout;
149 LwpObjectID m_DefaultCellStyle; // gCVirtualLayout
150 void Read();
154 * @brief
157 class LwpTableHint : public LwpObject
159 public:
160 LwpTableHint(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
161 virtual ~LwpTableHint();
163 virtual void Parse(IXFStream* pOutputStream);
164 protected:
165 void Read();
166 sal_uInt16 cRow;
167 LwpContentHintHead cCellHint;
168 sal_Bool cRowContinued;
169 LwpObjectID cTable;
170 //CCellNumberHintHead cCellNumberHint;
172 LwpObjectID cListNext;
174 LwpFribPtr cStart;
175 LwpObjectID cLayout; // if the layout is complex then we
176 // store the parent not the left or
177 // right
178 LwpObjectID cContent;
179 sal_uInt8 cFlags;
180 LwpObjectID cParent;
181 //CNumberHintHead cNumberHint;
182 sal_uInt32 cLineNumber;
183 LwpObjectID cPageHint; // the page hint we belong to
185 // cFlags
186 enum
188 HF_INVALID = 0x01, // hint should not be used to start flowing
189 HF_LASTPAGE = 0x02, // content ends with this hint
190 HF_REGISTERED = 0x04, // the hint has been registered with a
191 // paragraph
192 HF_DIDBULLET = 0x08, // We flowed bullet text right before
193 // the end of this stream
194 HF_PROBLEMPARA = 0x10 // This hint's paragraph changed from disk
200 * @brief
201 * VO_TABLEHEADING object
203 class LwpTableHeading : public LwpTable
205 public:
206 LwpTableHeading(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
207 virtual ~LwpTableHeading();
209 virtual void Parse(IXFStream* pOutputStream);
210 protected:
211 void Read();
214 class LwpParallelColumns : public LwpTable
216 public:
217 LwpParallelColumns(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
218 ~LwpParallelColumns();
219 protected:
220 void Read();
221 LwpObjectID cDefaultLeftColumnStyle;
222 LwpObjectID cDefaultRightColumnStyle;
224 #define MAX_NUM_ROWS 8192
225 class LwpGlossary : public LwpParallelColumns
227 public:
228 LwpGlossary(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
229 ~LwpGlossary();
230 protected:
231 void Read();
232 sal_uInt16 GetNumIndexRows(void);
236 #endif