LibreOffice Module lotuswordpro (master) 1
lwpfnlayout.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
6 *
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
9 *
10 * Sun Microsystems Inc., October, 2000
11 *
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
16 *
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.
20 *
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.
25 *
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
30 *
31 *
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.
38 *
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.
45 *
46 * The Initial Developer of the Original Code is: IBM Corporation
47 *
48 * Copyright: 2008 by IBM Corporation
49 *
50 * All Rights Reserved.
51 *
52 * Contributor(s): _______________________________________
53 *
54 *
55 ************************************************************************/
61#include "lwpfnlayout.hxx"
63
65 : LwpTableLayout(objHdr, pStrm)
66{
67}
68
70
75{
77 m_pObjStrm->SkipExtra();
78}
79
84
89
91 : LwpRowLayout(objHdr, pStrm)
92{
93}
94
96
101{
103 m_pObjStrm->SkipExtra();
104}
105
110{
111 // register cells' style
112 LwpObjectID* pCellID = &GetChildHead();
113 LwpCellLayout* pCellLayout = dynamic_cast<LwpCellLayout*>(pCellID->obj().get());
114
116 while (pCellLayout)
117 {
118 bool bAlreadySeen = !aSeen.insert(pCellLayout).second;
119 if (bAlreadySeen)
120 throw std::runtime_error("loop in conversion");
121 pCellLayout->SetFoundry(m_pFoundry);
122 pCellLayout->RegisterStyle();
123 pCellID = &pCellLayout->GetNext();
124 pCellLayout = dynamic_cast<LwpCellLayout*>(pCellID->obj().get());
125 }
126}
127
132
134 : LwpCellLayout(objHdr, pStrm)
135{
136}
137
139
144{
146 m_pObjStrm->SkipExtra();
147}
148
153{
154 // content object register styles
156 if (pObj.is())
157 {
158 pObj->SetFoundry(m_pFoundry);
159 pObj->DoRegisterStyle();
160 }
161}
162
167
169 : LwpTableLayout(objHdr, pStrm)
170{
171}
172
174
179{
181 m_pObjStrm->SkipExtra();
182}
183
188{
189 // register style of rows
190 LwpObjectID* pRowID = &GetChildHead();
191 LwpRowLayout* pRowLayout = dynamic_cast<LwpRowLayout*>(pRowID->obj().get());
192 while (pRowLayout)
193 {
194 pRowLayout->SetFoundry(m_pFoundry);
195 pRowLayout->RegisterStyle();
196
197 pRowID = &pRowLayout->GetNext();
198 pRowLayout = dynamic_cast<LwpRowLayout*>(pRowID->obj().get());
199 }
200}
201
206
208 : LwpSuperTableLayout(objHdr, pStrm)
209{
210}
211
213
218{
220 m_pObjStrm->SkipExtra();
221}
222
224{
225 // if this layout is style of real table entry
226 LwpVirtualLayout* pTableLayout = GetMainTableLayout();
227 if (pTableLayout != nullptr)
228 {
229 pTableLayout->SetFoundry(m_pFoundry);
230 pTableLayout->DoRegisterStyle();
231 }
232}
233
238
244{
245 LwpObjectID* pID = &GetChildTail();
246
248 while (!pID->IsNull())
249 {
250 LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(pID->obj().get());
251 if (!pLayout)
252 break;
253 bool bAlreadySeen = !aSeen.insert(pLayout).second;
254 if (bAlreadySeen)
255 throw std::runtime_error("loop in conversion");
256 if (pLayout->GetLayoutType() == LWP_ENDNOTE_LAYOUT)
257 return pLayout;
258 pID = &pLayout->GetPrevious();
259 }
260
261 return nullptr;
262}
263
265 : LwpEnSuperTableLayout(objHdr, pStrm)
266{
267}
268
270
275{
277 m_pObjStrm->SkipExtra();
278}
279
284
289
295{
296 LwpObjectID* pID = &GetChildTail();
297
298 while (pID && !pID->IsNull())
299 {
300 LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(pID->obj().get());
301 if (!pLayout)
302 {
303 break;
304 }
305 if (pLayout->GetLayoutType() == LWP_FOOTNOTE_LAYOUT)
306 {
307 return pLayout;
308 }
309 pID = &pLayout->GetPrevious();
310 }
311
312 return nullptr;
313}
314
316 : LwpPlacableLayout(objHdr, pStrm)
317{
318}
319
321
326{
328 m_pObjStrm->SkipExtra();
329}
330
335
340
342 : LwpPlacableLayout(objHdr, pStrm)
343{
344}
345
347
352{
354 m_pObjStrm->SkipExtra();
355}
356
361
366
367/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VO_CELLLAYOUT object.
void Read() override
Read cell layout.
void RegisterStyle() override
Register 4 types of cell style and register content styles.
LwpContFromLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
void Read() override
@descr Read object info
void RegisterStyle() override
@descr Do nothing
virtual ~LwpContFromLayout() override
void Read() override
@descr Read object info
void RegisterStyle() override
@descr Do nothing
void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
virtual ~LwpContOnLayout() override
LwpContOnLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpObjectID & GetChildHead()
Definition: lwpdlvlist.hxx:109
LwpObjectID & GetChildTail()
Definition: lwpdlvlist.hxx:110
LwpObjectID & GetPrevious()
Definition: lwpdlvlist.hxx:76
LwpObjectID & GetNext()
Definition: lwpdlvlist.hxx:75
VO_ENSUPERTABLELAYOUT object.
virtual ~LwpEnSuperTableLayout() override
void RegisterStyle() override
@descr default register style function
virtual LwpVirtualLayout * GetMainTableLayout()
Get child endnote layout.
void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
void Read() override
@descr Read object info
LwpEnSuperTableLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void Read() override
@descr Read object info
virtual ~LwpEndnoteLayout() override
void RegisterStyle() override
@descr Register footnote/endnote contents style
virtual void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
LwpEndnoteLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void RegisterStyle() override
@descr Register footnote/endnote contents style
virtual ~LwpFnCellLayout() override
LwpFnCellLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
void Read() override
@descr Read object info
void RegisterStyle() override
@descr Register footnote/endnote contents style
virtual ~LwpFnRowLayout() override
Definition: lwpfnlayout.cxx:95
void Read() override
@descr Read object info
LwpFnRowLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwpfnlayout.cxx:90
virtual void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
virtual ~LwpFnSuperTableLayout() override
LwpFnSuperTableLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
virtual LwpVirtualLayout * GetMainTableLayout() override
Get child footnote layout.
void Read() override
@descr Read object info
void RegisterStyle() override
@descr Do nothing
virtual void XFConvert(XFContentContainer *pCont) override
@descr Do nothing
Definition: lwpfnlayout.cxx:88
virtual ~LwpFootnoteLayout() override
Definition: lwpfnlayout.cxx:69
void RegisterStyle() override
@descr Do nothing
Definition: lwpfnlayout.cxx:83
LwpFootnoteLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwpfnlayout.cxx:64
void Read() override
@descr Read object info
Definition: lwpfnlayout.cxx:74
LwpObjectID m_Content
Definition: lwplayout.hxx:401
Base class of all Lwp VO objects.
Definition: lwpobjhdr.hxx:71
object id class
Definition: lwpobjid.hxx:79
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
Definition: lwpobjid.cxx:183
bool IsNull() const
Definition: lwpobjid.hxx:110
void DoRegisterStyle()
Definition: lwpobj.hxx:107
void SetFoundry(LwpFoundry *pFoundry)
Definition: lwpobj.hxx:137
LwpFoundry * m_pFoundry
Definition: lwpobj.hxx:91
std::unique_ptr< LwpObjectStream > m_pObjStrm
Definition: lwpobj.hxx:90
void Read() override
@descr Read name of LwpDLNFVList from object stream
Definition: lwplayout.cxx:1936
VO_ROWLAYOUT obj.
void Read() override
register row style
virtual void RegisterStyle() override
register row style
VO_SUPERTABLELAYOUT object.
void Read() override
Read super table layout record.
encapsulate XInputStream to provide SvStream like interfaces
Definition: lwpsvstream.hxx:69
VO_TABLELAYOUT object and functions for registering styles and converting tables.
void Read() override
read table layout
virtual LWP_LAYOUT_TYPE GetLayoutType()
Definition: lwplayout.hxx:291
A container for content.
std::pair< const_iterator, bool > insert(Value &&x)
For LWP filter architecture prototype - footnote layouts.