fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / lotuswordpro / source / filter / lwpfnlayout.cxx
blob86ddc5fb54525468a1091e2210c8b08071b9c735
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 * For LWP filter architecture prototype - footnote layouts
60 /*************************************************************************
61 * Change History
62 Mar 2005 Created
63 ************************************************************************/
65 #include "lwpfnlayout.hxx"
67 LwpFootnoteLayout::LwpFootnoteLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
68 :LwpTableLayout(objHdr, pStrm)
72 LwpFootnoteLayout::~LwpFootnoteLayout()
75 /**
76 * @descr Read object info
78 void LwpFootnoteLayout::Read()
80 LwpTableLayout::Read();
81 m_pObjStrm->SkipExtra();
84 /**
85 * @descr Do nothing
87 void LwpFootnoteLayout::RegisterStyle()
91 /**
92 * @descr Do nothing
94 void LwpFootnoteLayout::XFConvert(XFContentContainer * /*pCont*/)
98 LwpFnRowLayout::LwpFnRowLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
99 :LwpRowLayout(objHdr, pStrm)
103 LwpFnRowLayout::~LwpFnRowLayout()
107 * @descr Read object info
109 void LwpFnRowLayout::Read()
111 LwpRowLayout::Read();
112 m_pObjStrm->SkipExtra();
116 * @descr Register footnote/endnote contents style
118 void LwpFnRowLayout::RegisterStyle()
120 // register cells' style
121 LwpObjectID& rCellID = GetChildHead();
122 LwpCellLayout * pCellLayout = static_cast<LwpCellLayout *>(rCellID.obj().get());
124 while(pCellLayout)
126 pCellLayout->SetFoundry(m_pFoundry);
127 pCellLayout->RegisterStyle();
128 rCellID = pCellLayout->GetNext();
129 pCellLayout = static_cast<LwpCellLayout *>(rCellID.obj().get());
134 * @descr Do nothing
136 void LwpFnRowLayout::XFConvert(XFContentContainer * /*pCont*/)
140 LwpFnCellLayout::LwpFnCellLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
141 :LwpCellLayout(objHdr, pStrm)
145 LwpFnCellLayout::~LwpFnCellLayout()
149 * @descr Read object info
151 void LwpFnCellLayout::Read()
153 LwpCellLayout::Read();
154 m_pObjStrm->SkipExtra();
158 * @descr Register footnote/endnote contents style
160 void LwpFnCellLayout::RegisterStyle()
162 // content object register styles
163 rtl::Reference<LwpObject> pObj = m_Content.obj();
164 if (pObj.is())
166 pObj->SetFoundry(m_pFoundry);
167 pObj->RegisterStyle();
172 * @descr Do nothing
174 void LwpFnCellLayout::XFConvert(XFContentContainer * /*pCont*/)
178 LwpEndnoteLayout::LwpEndnoteLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
179 :LwpTableLayout(objHdr, pStrm)
183 LwpEndnoteLayout::~LwpEndnoteLayout()
187 * @descr Read object info
189 void LwpEndnoteLayout::Read()
191 LwpTableLayout::Read();
192 m_pObjStrm->SkipExtra();
196 * @descr Register footnote/endnote contents style
198 void LwpEndnoteLayout::RegisterStyle()
200 // register style of rows
201 LwpObjectID& rRowID = GetChildHead();
202 LwpRowLayout * pRowLayout = static_cast<LwpRowLayout *>(rRowID.obj().get());
203 while (pRowLayout)
205 pRowLayout->SetFoundry(m_pFoundry);
206 pRowLayout->RegisterStyle();
208 rRowID = pRowLayout->GetNext();
209 pRowLayout = static_cast<LwpRowLayout *>(rRowID.obj().get());
214 * @descr Do nothing
216 void LwpEndnoteLayout::XFConvert(XFContentContainer * /*pCont*/)
220 LwpEnSuperTableLayout::LwpEnSuperTableLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
221 :LwpSuperTableLayout(objHdr, pStrm)
225 LwpEnSuperTableLayout::~LwpEnSuperTableLayout()
229 * @descr Read object info
231 void LwpEnSuperTableLayout::Read()
233 LwpSuperTableLayout::Read();
234 m_pObjStrm->SkipExtra();
237 void LwpEnSuperTableLayout::RegisterStyle()
239 // if this layout is style of real table entry
240 LwpVirtualLayout* pTableLayout = GetMainTableLayout();
241 if (pTableLayout != NULL)
243 pTableLayout->SetFoundry(m_pFoundry);
244 pTableLayout->RegisterStyle();
249 * @descr Do nothing
251 void LwpEnSuperTableLayout::XFConvert(XFContentContainer * /*pCont*/)
256 * @short Get child endnote layout
257 * @return pointer to endnote layout
259 LwpVirtualLayout* LwpEnSuperTableLayout::GetMainTableLayout()
261 LwpObjectID& rID = GetChildTail();
263 while(!rID.IsNull())
265 LwpVirtualLayout * pLayout = static_cast<LwpVirtualLayout *>(rID.obj().get());
266 if(!pLayout)
268 break;
270 if (pLayout && pLayout->GetLayoutType() == LWP_ENDNOTE_LAYOUT)
272 return pLayout;
274 rID = pLayout->GetPrevious();
277 return NULL;
280 LwpFnSuperTableLayout::LwpFnSuperTableLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
281 :LwpEnSuperTableLayout(objHdr, pStrm)
285 LwpFnSuperTableLayout::~LwpFnSuperTableLayout()
289 * @descr Read object info
291 void LwpFnSuperTableLayout::Read()
293 LwpEnSuperTableLayout::Read();
294 m_pObjStrm->SkipExtra();
298 * @descr Do nothing
300 void LwpFnSuperTableLayout::RegisterStyle()
305 * @descr Do nothing
307 void LwpFnSuperTableLayout::XFConvert(XFContentContainer * /*pCont*/)
312 * @short Get child footnote layout
313 * @return pointer to footnote layout
315 LwpVirtualLayout* LwpFnSuperTableLayout::GetMainTableLayout()
317 LwpObjectID& rID = GetChildTail();
319 while(!rID.IsNull())
321 LwpVirtualLayout * pLayout = static_cast<LwpVirtualLayout *>(rID.obj().get());
322 if(!pLayout)
324 break;
326 if (pLayout && pLayout->GetLayoutType() == LWP_FOOTNOTE_LAYOUT)
328 return pLayout;
330 rID = pLayout->GetPrevious();
333 return NULL;
336 LwpContFromLayout::LwpContFromLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
337 :LwpPlacableLayout(objHdr, pStrm)
341 LwpContFromLayout::~LwpContFromLayout()
345 * @descr Read object info
347 void LwpContFromLayout::Read()
349 LwpPlacableLayout::Read();
350 m_pObjStrm->SkipExtra();
354 * @descr Do nothing
356 void LwpContFromLayout::RegisterStyle()
361 * @descr Do nothing
363 void LwpContFromLayout::XFConvert(XFContentContainer * /*pCont*/)
367 LwpContOnLayout::LwpContOnLayout(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
368 :LwpPlacableLayout(objHdr, pStrm)
372 LwpContOnLayout::~LwpContOnLayout()
376 * @descr Read object info
378 void LwpContOnLayout::Read()
380 LwpPlacableLayout::Read();
381 m_pObjStrm->SkipExtra();
385 * @descr Do nothing
387 void LwpContOnLayout::RegisterStyle()
392 * @descr Do nothing
394 void LwpContOnLayout::XFConvert(XFContentContainer * /*pCont*/)
398 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */