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,
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 ************************************************************************/
58 * For LWP filter architecture prototype - table object
61 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPTBLCELL_HXX
62 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPTBLCELL_HXX
65 #include "lwpatomholder.hxx"
66 #include "lwpstory.hxx"
68 #include "xfilter/xfcell.hxx"
70 // temporily added for compile
79 class LwpCellList
: public LwpDLVList
82 LwpCellList(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
84 virtual void Parse(IXFStream
* pOutputStream
) override
;
85 LwpObjectID
GetNextID(){return GetNext();}
86 sal_uInt8
GetColumnID(){return cColumn
;}
87 const LwpObjectID
& GetValueID(){return cValue
;}
89 virtual void Convert(XFCell
* pCell
, LwpTableLayout
* pCellsMap
=nullptr);
91 virtual ~LwpCellList();
103 class LwpRowList
: public LwpDLVList
106 LwpRowList(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
108 void Parse(IXFStream
* pOutputStream
) override
;
109 LwpObjectID
GetChildHeadID(){return cChild
.GetHead();}
110 LwpObjectID
GetNextID(){return GetNext();}
111 sal_uInt16
GetRowID(){return cRowID
;}
113 LwpDLVListHeadTail cChild
;
116 void Read() override
;
118 virtual ~LwpRowList();
122 * VO_NUMERICVALUE object
124 class LwpNumericValue
: public LwpObject
127 LwpNumericValue(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
129 double GetValue(){return cNumber
;}
130 void Parse(IXFStream
* pOutputStream
) override
;
133 //LwpContent m_TheContent;
134 void Read() override
;
136 virtual ~LwpNumericValue();
141 * VO_TABLERANGE object
143 class LwpTableRange
: public LwpDLVList
146 LwpTableRange(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
148 void Parse(IXFStream
* pOutputStream
) override
;
149 const LwpObjectID
& GetCellRangeID(){return cpCellRange
;}
150 const LwpObjectID
& GetTableID(){ return cqTable
;}
151 LwpTableRange
* GetNext() { return dynamic_cast<LwpTableRange
*>(LwpDLVList::GetNext().obj().get());}
154 LwpObjectID cpCellRange
;
155 void Read() override
;
157 virtual ~LwpTableRange();
161 * VO_CELLRANGE object
163 class LwpCellRange
: public LwpObject
166 LwpCellRange(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
168 void Parse(IXFStream
* pOutputStream
) override
;
169 const LwpObjectID
& GetFolderID(){return cpFolder
;}
171 LwpObjectID cpFolder
;
172 void Read() override
;
174 virtual ~LwpCellRange();
180 class LwpFolder
: public LwpDLVList
183 LwpFolder(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
185 void Parse(IXFStream
* pOutputStream
) override
;
186 LwpObjectID
GetChildHeadID(){ return cChild
.GetHead();}
188 LwpDLVListHeadTail cChild
;
191 void Read() override
;
193 virtual ~LwpFolder();
197 * VO_DEPENDENT object
199 class LwpDependent
: public LwpDLVList
202 LwpDependent(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
204 void Parse(IXFStream
* pOutputStream
) override
;
206 void Read() override
;
207 LwpObjectID cFormulaInfo
;
208 sal_uInt16 cReferenceOffset
; // Used to fix dependent formula when we're
217 sal_uInt8 cFlags
; // Used to fix dependent formula when we're
220 virtual ~LwpDependent();
227 class LwpRowColumnQualifier
230 LwpRowColumnQualifier();
231 ~LwpRowColumnQualifier(){}
239 void QuickRead(LwpObjectStream
*pStrm
);
242 enum // cFlags bit definitions
252 LwpRowColumnQualifier::LwpRowColumnQualifier()
258 LwpRowColumnQualifier::IsAfter()
260 return (cFlags
& REF_AFTER
) != 0;
264 LwpRowColumnQualifier::IsBad()
266 return (cFlags
& REF_BAD
) != 0;
270 LwpRowColumnQualifier::IsAbsolute()
272 return (cFlags
& REF_ABSOLUTE
) != 0;
278 class LwpRowSpecifier
286 void QuickRead(LwpObjectStream
*pStrm
);
288 sal_uInt16
RowID(sal_uInt16 FormulaRow
);
292 LwpRowColumnQualifier cQualifier
;
296 LwpRowSpecifier::RowID(sal_uInt16 FormulaRow
)
298 if (cQualifier
.IsBad())
302 if (cQualifier
.IsAbsolute())
305 if (cQualifier
.IsAfter())
306 return FormulaRow
+ cRow
;
307 return FormulaRow
- cRow
;
314 class LwpColumnSpecifier
320 ~LwpColumnSpecifier()
323 void QuickRead(LwpObjectStream
*pStrm
);
325 sal_uInt8
ColumnID(sal_uInt8 FormulaColumn
);
329 LwpRowColumnQualifier cQualifier
;
333 LwpColumnSpecifier::ColumnID(sal_uInt8 FormulaColumn
)
335 if (cQualifier
.IsBad())
339 if (cQualifier
.IsAbsolute())
341 if (cQualifier
.IsAfter())
342 return FormulaColumn
+ cColumn
;
343 return FormulaColumn
- cColumn
;
348 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */