Branch data Line data Source code
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 : : ************************************************************************/
56 : : /**
57 : : * @file
58 : : * For LWP filter architecture prototype - table cell numerics format
59 : : */
60 : : /*************************************************************************
61 : : * Change History
62 : : Mar 2005 Created
63 : : ************************************************************************/
64 : :
65 : : #include "lwpoverride.hxx"
66 : : #include "lwpobjid.hxx"
67 : : #include "lwptblcell.hxx"
68 : : #include "lwppara.hxx"
69 : :
70 : : //////////////////////////////////////////////////////////////////
71 [ # # ][ # # ]: 0 : LwpCellList::LwpCellList(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpDLVList(objHdr, pStrm)
72 : 0 : {}
73 : :
74 : 0 : LwpCellList::~LwpCellList()
75 [ # # ]: 0 : {}
76 : :
77 : 0 : void LwpCellList::Read()
78 : : {
79 : : // CDLFVList read construction
80 [ # # ]: 0 : LwpDLVList::Read();
81 : :
82 [ # # ]: 0 : LwpDLVListHeadTail cChild;
83 [ # # ]: 0 : cChild.Read(m_pObjStrm);
84 : :
85 [ # # ]: 0 : cParent.ReadIndexed(m_pObjStrm);
86 : :
87 [ # # ]: 0 : if (LwpFileHeader::m_nFileRevision < 0x0006)
88 [ # # ]: 0 : m_pObjStrm->SkipExtra();
89 : :
90 [ # # ]: 0 : cValue.ReadIndexed(m_pObjStrm);
91 : :
92 [ # # ]: 0 : LwpObjectID cDependent;
93 [ # # ]: 0 : cDependent.ReadIndexed(m_pObjStrm);
94 : :
95 [ # # ]: 0 : cColumn = (sal_uInt8) m_pObjStrm->QuickReaduInt16(); // written as a sal_uInt16
96 : : // sal_uInt8 cCellFlags = (sal_uInt8) m_pObjStrm->QuickReaduInt16(); // written as a sal_uInt16
97 [ # # ]: 0 : m_pObjStrm->SeekRel(2);//CellFlags
98 [ # # ]: 0 : m_pObjStrm->SkipExtra();
99 : :
100 : 0 : }
101 : :
102 : 0 : void LwpCellList::Parse(IXFStream* /*pOutputStream*/)
103 : : {
104 : 0 : }
105 : :
106 : 0 : void LwpCellList::Convert(XFCell * pCell, LwpTableLayout* /*pCellsMap*/)
107 : : {
108 : 0 : LwpObjectID aValueID = GetValueID();
109 [ # # ]: 0 : LwpNumericValue* pValue = (LwpNumericValue*)aValueID.obj();
110 [ # # ]: 0 : if (pValue)
111 : : {
112 [ # # ]: 0 : pCell->SetValue( pValue->GetValue() );
113 : : }
114 : 0 : }
115 : :
116 : : //////////////////////////////////////////////////////////////////
117 : 0 : LwpNumericValue::LwpNumericValue(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpObject(objHdr, pStrm)
118 : 0 : {}
119 : :
120 : 0 : LwpNumericValue::~LwpNumericValue()
121 [ # # ]: 0 : {}
122 : :
123 : 0 : void LwpNumericValue::Read()
124 : : {
125 : 0 : cNumber = m_pObjStrm->QuickReadDouble();
126 : 0 : m_pObjStrm->SkipExtra();
127 : :
128 : 0 : }
129 : 0 : void LwpNumericValue::Parse(IXFStream* /*pOutputStream*/)
130 : : {
131 : 0 : }
132 : : //////////////////////////////////////////////////////////////////
133 [ # # ][ # # ]: 0 : LwpRowList::LwpRowList(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpDLVList(objHdr, pStrm)
134 : 0 : {}
135 : :
136 : 0 : LwpRowList::~LwpRowList()
137 [ # # ]: 0 : {}
138 : :
139 : 0 : void LwpRowList::Read()
140 : : {
141 : : // CDLFVList read construction
142 : 0 : LwpDLVList::Read();
143 : :
144 : 0 : cChild.Read(m_pObjStrm);
145 : 0 : cParent.ReadIndexed(m_pObjStrm);
146 : :
147 [ # # ]: 0 : if (LwpFileHeader::m_nFileRevision < 0x0006)
148 : 0 : m_pObjStrm->SkipExtra();
149 : :
150 : 0 : cRowID = m_pObjStrm->QuickReaduInt16();
151 : :
152 : 0 : m_pObjStrm->SkipExtra();
153 : 0 : }
154 : 0 : void LwpRowList::Parse(IXFStream* /*pOutputStream*/)
155 : : {
156 : 0 : }
157 : :
158 : : //////////////////////////////////////////////////////////////////
159 : 0 : LwpTableRange::LwpTableRange(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
160 [ # # ][ # # ]: 0 : :LwpDLVList(objHdr, pStrm)
161 : 0 : {}
162 : :
163 : 0 : LwpTableRange::~LwpTableRange()
164 [ # # ]: 0 : {}
165 : :
166 : 0 : void LwpTableRange::Read()
167 : : {
168 : 0 : LwpDLVList::Read();
169 : :
170 : 0 : cqTable.ReadIndexed(m_pObjStrm);
171 : 0 : cpCellRange.ReadIndexed(m_pObjStrm);
172 : 0 : m_pObjStrm->SkipExtra();
173 : 0 : }
174 : :
175 : 0 : void LwpTableRange::Parse(IXFStream* /*pOutputStream*/)
176 : : {
177 : 0 : }
178 : :
179 : : //////////////////////////////////////////////////////////////////
180 [ # # ]: 0 : LwpCellRange::LwpCellRange(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpObject(objHdr, pStrm)
181 : 0 : {}
182 : :
183 : 0 : LwpCellRange::~LwpCellRange()
184 [ # # ]: 0 : {}
185 : :
186 : 0 : void LwpCellRange::Read()
187 : : {
188 : 0 : cpFolder.ReadIndexed(m_pObjStrm);
189 : 0 : m_pObjStrm->SkipExtra();
190 : 0 : }
191 : :
192 : 0 : void LwpCellRange::Parse(IXFStream* /*pOutputStream*/)
193 : : {
194 : 0 : }
195 : :
196 : : //////////////////////////////////////////////////////////////////
197 : :
198 [ # # ][ # # ]: 0 : LwpFolder::LwpFolder(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpDLVList(objHdr, pStrm)
[ # # ]
199 : 0 : {}
200 : :
201 : 0 : LwpFolder::~LwpFolder()
202 [ # # ]: 0 : {}
203 : :
204 : 0 : void LwpFolder::Read()
205 : : {
206 : : // CDLFVList read construction
207 : 0 : LwpDLVList::Read();
208 : :
209 : 0 : cChild.Read(m_pObjStrm);
210 : 0 : cParent.ReadIndexed(m_pObjStrm);
211 : :
212 [ # # ]: 0 : if (LwpFileHeader::m_nFileRevision < 0x0006)
213 : 0 : m_pObjStrm->SkipExtra();
214 : :
215 : 0 : cqTable.ReadIndexed(m_pObjStrm);
216 : 0 : m_pObjStrm->SkipExtra();
217 : 0 : }
218 : :
219 : 0 : void LwpFolder::Parse(IXFStream* /*pOutputStream*/)
220 : : {
221 : 0 : }
222 : :
223 : : //////////////////////////////////////////////////////////////////
224 : :
225 [ # # ]: 0 : LwpDependent::LwpDependent(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpDLVList(objHdr, pStrm)
226 : 0 : {}
227 : :
228 : 0 : LwpDependent::~LwpDependent()
229 [ # # ]: 0 : {}
230 : :
231 : 0 : void LwpDependent::Read()
232 : : {
233 : 0 : LwpDLVList::Read();
234 : :
235 : 0 : cFormulaInfo.ReadIndexed(m_pObjStrm);
236 : 0 : cReferenceOffset = m_pObjStrm->QuickReaduInt16();
237 : 0 : cFlags = (sal_uInt8)m_pObjStrm->QuickReaduInt16(); // Written as lushort.
238 : :
239 : 0 : m_pObjStrm->SkipExtra();
240 : 0 : }
241 : :
242 : 0 : void LwpDependent::Parse(IXFStream* /*pOutputStream*/)
243 : : {
244 : 0 : }
245 : : //////////////////////////////////////////////////////////////////
246 : :
247 : 0 : void LwpRowSpecifier::QuickRead(LwpObjectStream *pStrm)
248 : : {
249 : 0 : cRow = pStrm->QuickReaduInt16();
250 : 0 : cQualifier.QuickRead(pStrm);
251 : 0 : }
252 : 0 : void LwpColumnSpecifier::QuickRead(LwpObjectStream *pStrm)
253 : : {
254 : 0 : cColumn = (sal_uInt8)pStrm->QuickReaduInt16();
255 : 0 : cQualifier.QuickRead(pStrm);
256 : 0 : }
257 : :
258 : 0 : void LwpRowColumnQualifier::QuickRead(LwpObjectStream *pStrm)
259 : : {
260 : : // written as lushort for future flags
261 : 0 : cFlags = (sal_uInt8)pStrm->QuickReaduInt16();
262 : 0 : }
263 : :
264 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|