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
;}
88 virtual void Convert(XFCell
* pCell
, LwpTableLayout
* pCellsMap
=nullptr);
90 virtual ~LwpCellList() override
;
102 class LwpRowList
: public LwpDLVList
105 LwpRowList(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
107 void Parse(IXFStream
* pOutputStream
) override
;
108 LwpObjectID
GetChildHeadID(){return cChild
.GetHead();}
109 LwpObjectID
GetNextID(){return GetNext();}
110 sal_uInt16
GetRowID(){return cRowID
;}
112 LwpDLVListHeadTail cChild
;
115 void Read() override
;
117 virtual ~LwpRowList() override
;
121 * VO_NUMERICVALUE object
123 class LwpNumericValue
: public LwpObject
126 LwpNumericValue(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
128 double GetValue(){return cNumber
;}
129 void Parse(IXFStream
* pOutputStream
) override
;
132 //LwpContent m_TheContent;
133 void Read() override
;
135 virtual ~LwpNumericValue() override
;
140 * VO_TABLERANGE object
142 class LwpTableRange
: public LwpDLVList
145 LwpTableRange(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
147 void Parse(IXFStream
* pOutputStream
) override
;
148 const LwpObjectID
& GetCellRangeID(){return cpCellRange
;}
149 const LwpObjectID
& GetTableID(){ return cqTable
;}
150 LwpTableRange
* GetNext() { return dynamic_cast<LwpTableRange
*>(LwpDLVList::GetNext().obj().get());}
153 LwpObjectID cpCellRange
;
154 void Read() override
;
156 virtual ~LwpTableRange() override
;
160 * VO_CELLRANGE object
162 class LwpCellRange
: public LwpObject
165 LwpCellRange(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
167 void Parse(IXFStream
* pOutputStream
) override
;
168 const LwpObjectID
& GetFolderID(){return cpFolder
;}
170 LwpObjectID cpFolder
;
171 void Read() override
;
173 virtual ~LwpCellRange() override
;
179 class LwpFolder
: public LwpDLVList
182 LwpFolder(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
184 void Parse(IXFStream
* pOutputStream
) override
;
185 LwpObjectID
GetChildHeadID(){ return cChild
.GetHead();}
187 LwpDLVListHeadTail cChild
;
190 void Read() override
;
192 virtual ~LwpFolder() override
;
196 * VO_DEPENDENT object
198 class LwpDependent
: public LwpDLVList
201 LwpDependent(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
203 void Parse(IXFStream
* pOutputStream
) override
;
205 void Read() override
;
206 LwpObjectID cFormulaInfo
;
207 sal_uInt16 cReferenceOffset
; // Used to fix dependent formula when we're
216 sal_uInt8 cFlags
; // Used to fix dependent formula when we're
219 virtual ~LwpDependent() override
;
226 class LwpRowColumnQualifier
229 LwpRowColumnQualifier();
230 ~LwpRowColumnQualifier(){}
238 void QuickRead(LwpObjectStream
*pStrm
);
241 enum // cFlags bit definitions
251 LwpRowColumnQualifier::LwpRowColumnQualifier()
257 LwpRowColumnQualifier::IsAfter()
259 return (cFlags
& REF_AFTER
) != 0;
263 LwpRowColumnQualifier::IsBad()
265 return (cFlags
& REF_BAD
) != 0;
269 LwpRowColumnQualifier::IsAbsolute()
271 return (cFlags
& REF_ABSOLUTE
) != 0;
277 class LwpRowSpecifier
285 void QuickRead(LwpObjectStream
*pStrm
);
287 sal_uInt16
RowID(sal_uInt16 FormulaRow
);
291 LwpRowColumnQualifier cQualifier
;
295 LwpRowSpecifier::RowID(sal_uInt16 FormulaRow
)
297 if (cQualifier
.IsBad())
301 if (cQualifier
.IsAbsolute())
304 if (cQualifier
.IsAfter())
305 return FormulaRow
+ cRow
;
306 return FormulaRow
- cRow
;
313 class LwpColumnSpecifier
319 ~LwpColumnSpecifier()
322 void QuickRead(LwpObjectStream
*pStrm
);
324 sal_uInt8
ColumnID(sal_uInt8 FormulaColumn
);
328 LwpRowColumnQualifier cQualifier
;
332 LwpColumnSpecifier::ColumnID(sal_uInt8 FormulaColumn
)
334 if (cQualifier
.IsBad())
338 if (cQualifier
.IsAbsolute())
340 if (cQualifier
.IsAfter())
341 return FormulaColumn
+ cColumn
;
342 return FormulaColumn
- cColumn
;
347 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */