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,
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 ************************************************************************/
57 * For LWP filter architecture prototype - table object
59 /*************************************************************************
62 ************************************************************************/
63 #ifndef _LWPTABLE_HXX_
64 #define _LWPTABLE_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"
78 * VO_SUPERTABLE object
80 class LwpSuperTable
: public LwpContent
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
);
95 * for VO_TABLE object reading
97 class LwpForkedNotifyList
100 LwpForkedNotifyList(){};
101 ~LwpForkedNotifyList() {};
102 void Read(LwpObjectStream
* pObjStrm
)
104 m_PersistentList
.Read(pObjStrm
);
108 LwpNotifyListPersistent m_PersistentList
;
114 class LwpTable
: public LwpContent
117 LwpTable(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
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();
131 LwpDLVListHeadTail m_RowCache
;
132 LwpDLVListHeadTail m_ColumnCache
;
133 LwpNotifyListPersistent m_CPTempVersionedNotifyList
;
134 LwpForkedNotifyList m_CPNotifyList
;
136 sal_uInt16 m_nRow
, m_nColumn
;
139 sal_Int32 m_nDefaultAutoGrowRowHeight
;
140 sal_uInt16 m_nAttributes
;
141 enum lTableAttributes
144 SIZING_VIA_MOUSE_ENABLED
= 0x02,
148 LwpObjectID m_Layout
;
149 LwpObjectID m_DefaultCellStyle
; // gCVirtualLayout
157 class LwpTableHint
: public LwpObject
160 LwpTableHint(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
161 virtual ~LwpTableHint();
163 virtual void Parse(IXFStream
* pOutputStream
);
167 LwpContentHintHead cCellHint
;
168 sal_Bool cRowContinued
;
170 //CCellNumberHintHead cCellNumberHint;
172 LwpObjectID cListNext
;
175 LwpObjectID cLayout
; // if the layout is complex then we
176 // store the parent not the left or
178 LwpObjectID cContent
;
181 //CNumberHintHead cNumberHint;
182 sal_uInt32 cLineNumber
;
183 LwpObjectID cPageHint
; // the page hint we belong to
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
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
201 * VO_TABLEHEADING object
203 class LwpTableHeading
: public LwpTable
206 LwpTableHeading(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
207 virtual ~LwpTableHeading();
209 virtual void Parse(IXFStream
* pOutputStream
);
214 class LwpParallelColumns
: public LwpTable
217 LwpParallelColumns(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
218 ~LwpParallelColumns();
221 LwpObjectID cDefaultLeftColumnStyle
;
222 LwpObjectID cDefaultRightColumnStyle
;
224 #define MAX_NUM_ROWS 8192
225 class LwpGlossary
: public LwpParallelColumns
228 LwpGlossary(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
232 sal_uInt16
GetNumIndexRows(void);