LibreOffice Module lotuswordpro (master) 1
lwptblcell.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 <lwpfilehdr.hxx>
62#include <lwpobjid.hxx>
63#include "lwptblcell.hxx"
64
66 : LwpDLVList(objHdr, pStrm)
67 , cColumn(0)
68{
69}
70
72
74{
75 // CDLFVList read construction
77
78 LwpDLVListHeadTail cChild;
79 cChild.Read(m_pObjStrm.get());
80
82
84 m_pObjStrm->SkipExtra();
85
87
88 LwpObjectID cDependent;
89 cDependent.ReadIndexed(m_pObjStrm.get());
90
91 cColumn = static_cast<sal_uInt8>(m_pObjStrm->QuickReaduInt16()); // written as a sal_uInt16
92 // sal_uInt8 cCellFlags = (sal_uInt8) m_pObjStrm->QuickReaduInt16(); // written as a sal_uInt16
93 m_pObjStrm->SeekRel(2); //CellFlags
94 m_pObjStrm->SkipExtra();
95}
96
97void LwpCellList::Parse(IXFStream* /*pOutputStream*/) {}
98
99void LwpCellList::Convert(XFCell* pCell, LwpTableLayout* /*pCellsMap*/)
100{
101 LwpObjectID aValueID = cValue;
102 LwpNumericValue* pValue = dynamic_cast<LwpNumericValue*>(aValueID.obj().get());
103 if (pValue)
104 {
105 pCell->SetValue(pValue->GetValue());
106 }
107}
108
110 : LwpObject(objHdr, pStrm)
111 , cNumber(0)
112{
113}
114
116
118{
119 cNumber = m_pObjStrm->QuickReadDouble();
120 m_pObjStrm->SkipExtra();
121}
122
123void LwpNumericValue::Parse(IXFStream* /*pOutputStream*/) {}
124
126 : LwpDLVList(objHdr, pStrm)
127 , cRowID(0)
128{
129}
130
132
134{
135 // CDLFVList read construction
137
138 cChild.Read(m_pObjStrm.get());
140
142 m_pObjStrm->SkipExtra();
143
144 cRowID = m_pObjStrm->QuickReaduInt16();
145
146 m_pObjStrm->SkipExtra();
147}
148void LwpRowList::Parse(IXFStream* /*pOutputStream*/) {}
149
151 : LwpDLVList(objHdr, pStrm)
152{
153}
154
156
158{
160
163 m_pObjStrm->SkipExtra();
164}
165
166void LwpTableRange::Parse(IXFStream* /*pOutputStream*/) {}
167
169 : LwpObject(objHdr, pStrm)
170{
171}
172
174
176{
178 m_pObjStrm->SkipExtra();
179}
180
181void LwpCellRange::Parse(IXFStream* /*pOutputStream*/) {}
182
184 : LwpDLVList(objHdr, pStrm)
185{
186}
187
189
191{
192 // CDLFVList read construction
194
195 cChild.Read(m_pObjStrm.get());
197
199 m_pObjStrm->SkipExtra();
200
202 m_pObjStrm->SkipExtra();
203}
204
205void LwpFolder::Parse(IXFStream* /*pOutputStream*/) {}
206
208 : LwpDLVList(objHdr, pStrm)
209 , cReferenceOffset(0)
210 , cFlags(0)
211{
212}
213
215
217{
219
221 cReferenceOffset = m_pObjStrm->QuickReaduInt16();
222 cFlags = static_cast<sal_uInt8>(m_pObjStrm->QuickReaduInt16()); // Written as lushort.
223
224 m_pObjStrm->SkipExtra();
225}
226
227void LwpDependent::Parse(IXFStream* /*pOutputStream*/) {}
228
230{
231 cRow = pStrm->QuickReaduInt16();
232 cQualifier.QuickRead(pStrm);
233}
235{
236 cColumn = static_cast<sal_uInt8>(pStrm->QuickReaduInt16());
237 cQualifier.QuickRead(pStrm);
238}
239
241{
242 // written as lushort for future flags
243 cFlags = static_cast<sal_uInt8>(pStrm->QuickReaduInt16());
244}
245
246/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Stream wrapper for sax writer.
Definition: ixfstream.hxx:72
LwpObjectID cValue
Definition: lwptblcell.hxx:95
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:97
virtual ~LwpCellList() override
Definition: lwptblcell.cxx:71
LwpObjectID cParent
Definition: lwptblcell.hxx:92
void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwptblcell.cxx:73
sal_uInt8 cColumn
Definition: lwptblcell.hxx:91
virtual void Convert(XFCell *pCell, LwpTableLayout *pCellsMap=nullptr)
Definition: lwptblcell.cxx:99
LwpCellList(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:65
void Read() override
@descr default read function
Definition: lwptblcell.cxx:175
void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:181
LwpCellRange(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:168
LwpObjectID cpFolder
Definition: lwptblcell.hxx:171
virtual ~LwpCellRange() override
Definition: lwptblcell.cxx:173
void QuickRead(LwpObjectStream *pStrm)
Definition: lwptblcell.cxx:234
LwpRowColumnQualifier cQualifier
Definition: lwptblcell.hxx:321
Double Linked Virtual List Head Tail.
Definition: lwpdlvlist.hxx:138
void Read(LwpObjectStream *pObjStrm)
@descr Read head id and tail id
Definition: lwpdlvlist.cxx:160
Double Linked Virtual List.
Definition: lwpdlvlist.hxx:72
void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwpdlvlist.cxx:72
sal_uInt16 cReferenceOffset
Definition: lwptblcell.hxx:207
LwpObjectID cFormulaInfo
Definition: lwptblcell.hxx:206
LwpDependent(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:207
sal_uInt8 cFlags
Definition: lwptblcell.hxx:216
void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:227
void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwptblcell.cxx:216
virtual ~LwpDependent() override
Definition: lwptblcell.cxx:214
static sal_uInt16 m_nFileRevision
Definition: lwpfilehdr.hxx:77
void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:205
LwpObjectID cParent
Definition: lwptblcell.hxx:189
LwpFolder(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:183
void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwptblcell.cxx:190
virtual ~LwpFolder() override
Definition: lwptblcell.cxx:188
LwpDLVListHeadTail cChild
Definition: lwptblcell.hxx:188
LwpObjectID cqTable
Definition: lwptblcell.hxx:190
VO_NUMERICVALUE object.
Definition: lwptblcell.hxx:123
LwpNumericValue(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:109
void Read() override
@descr default read function
Definition: lwptblcell.cxx:117
virtual ~LwpNumericValue() override
Definition: lwptblcell.cxx:115
double GetValue() const
Definition: lwptblcell.hxx:127
void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:123
Base class of all Lwp VO objects.
Definition: lwpobjhdr.hxx:71
object id class
Definition: lwpobjid.hxx:79
void ReadIndexed(LwpSvStream *pStrm)
@descr Read object id with indexed format from stream if index>0, lowid is get from time table per th...
Definition: lwpobjid.cxx:96
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
Definition: lwpobjid.cxx:183
stream class for LwpObject body data provide stream like interface to read object data
Definition: lwpobjstrm.hxx:77
sal_uInt16 QuickReaduInt16(bool *pFailure=nullptr)
@descr Quick read sal_uInt32
Definition: lwpobjstrm.cxx:200
Base class of all Lwp VO objects.
Definition: lwpobj.hxx:83
std::unique_ptr< LwpObjectStream > m_pObjStrm
Definition: lwpobj.hxx:90
void QuickRead(LwpObjectStream *pStrm)
Definition: lwptblcell.cxx:240
LwpObjectID cParent
Definition: lwptblcell.hxx:115
void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwptblcell.cxx:133
void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:148
LwpRowList(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:125
virtual ~LwpRowList() override
Definition: lwptblcell.cxx:131
sal_uInt16 cRowID
Definition: lwptblcell.hxx:116
LwpDLVListHeadTail cChild
Definition: lwptblcell.hxx:114
void QuickRead(LwpObjectStream *pStrm)
Definition: lwptblcell.cxx:229
sal_uInt16 cRow
Definition: lwptblcell.hxx:285
LwpRowColumnQualifier cQualifier
Definition: lwptblcell.hxx:286
encapsulate XInputStream to provide SvStream like interfaces
Definition: lwpsvstream.hxx:69
VO_TABLELAYOUT object and functions for registering styles and converting tables.
LwpObjectID cqTable
Definition: lwptblcell.hxx:153
void Parse(IXFStream *pOutputStream) override
@descr default parse function
Definition: lwptblcell.cxx:166
LwpObjectID cpCellRange
Definition: lwptblcell.hxx:154
void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwptblcell.cxx:157
virtual ~LwpTableRange() override
Definition: lwptblcell.cxx:155
LwpTableRange(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwptblcell.cxx:150
@descr Table cell object.
Definition: xfcell.hxx:76
void SetValue(double value)
@descr Set cell number value.
Definition: xfcell.cxx:125
For LWP filter architecture prototype - table object.
unsigned char sal_uInt8