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 ************************************************************************/
56 /*************************************************************************
58 * For LWP filter architecture prototype
59 ************************************************************************/
60 /*************************************************************************
63 ************************************************************************/
65 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOUNDRY_HXX
66 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFOUNDRY_HXX
68 #include "lwpheader.hxx"
69 #include "lwpobjid.hxx"
70 #include "lwpobjstrm.hxx"
71 #include "lwpcolor.hxx"
72 #include "lwpbasetype.hxx"
73 #include "lwpfont.hxx"
74 #include "lwpdropcapmgr.hxx"
80 #define TAG_USER_VERSION 0x72655655UL // "UVer"
82 class LwpVersionManager
86 ~LwpVersionManager(){}
88 void Read(LwpObjectStream
*pStrm
);
89 void Skip(LwpObjectStream
*pStrm
);
92 class LwpObjectManager
98 LwpObjectID m_Division
;
100 void Read(LwpObjectStream
*pStrm
);
103 class LwpNumberManager
107 ~LwpNumberManager(){}
109 LwpObjectID m_TableRange
;
111 void Read(LwpObjectStream
*pStrm
);
112 LwpObjectID
GetTableRangeID(){ return m_TableRange
;}
115 class LwpBulletManager
119 ~LwpBulletManager(){}
123 void Read(LwpObjectStream
*pStrm
);
124 LwpObjectID
* GetHeadID() { return &m_Head
;}
128 class LwpContentManager
131 LwpContentManager(){}
132 ~LwpContentManager(){}
134 LwpObjectID m_ContentList
;
135 LwpObjectID m_EnumHead
;
136 LwpObjectID m_EnumTail
;
137 LwpObjectID m_OleObjCount
;
139 LwpObjectID m_GrapHead
;
140 LwpObjectID m_GrapTail
;
141 LwpObjectID m_OleHead
;
142 LwpObjectID m_OleTail
;
144 inline LwpObjectID
* GetContentList() { return &m_ContentList
; }
145 inline LwpObjectID
* GetGraphicListHead() { return &m_GrapHead
; }
146 LwpContent
* EnumContents(LwpContent
* pContent
);
149 void Read(LwpObjectStream
*pStrm
);
152 class LwpPieceManager
158 LwpObjectID m_GeometryPieceList
;
159 LwpObjectID m_ScalePieceList
;
160 LwpObjectID m_MarginsPieceList
;
161 LwpObjectID m_ColumnsPieceList
;
162 LwpObjectID m_BorderStuffPieceList
;
163 LwpObjectID m_GutterStuffPieceList
;
164 LwpObjectID m_BackgroundStuffPieceList
;
165 LwpObjectID m_JoinStuffPieceList
;
166 LwpObjectID m_ShadowPieceList
;
167 LwpObjectID m_NumericsPieceList
;
168 LwpObjectID m_RelativityPieceList
;
169 LwpObjectID m_AlignmentPieceList
;
170 LwpObjectID m_IndentPieceList
;
171 LwpObjectID m_ParaBorderPieceList
;
172 LwpObjectID m_SpacingPieceList
;
173 LwpObjectID m_BreaksPieceList
;
174 LwpObjectID m_NumberingPieceList
;
175 LwpObjectID m_TabPieceList
;
176 LwpObjectID m_CharacterBorderPieceList
;
177 LwpObjectID m_AmikakePieceList
;
179 LwpObjectID m_ParaBackgroundPieceList
;
180 LwpObjectID m_ExternalBorderStuffPieceList
;
181 LwpObjectID m_ExternalJoinStuffPieceList
;
184 void Read(LwpObjectStream
*pStrm
);
187 class LwpOrderedObject
;
189 class LwpOrderedObjectManager
192 LwpOrderedObjectManager(){}
193 ~LwpOrderedObjectManager(){}
197 void Read(LwpObjectStream
*pStrm
);
198 LwpObjectID
* GetHeadID() { return &m_Head
;}
199 LwpOrderedObject
* Enumerate(LwpOrderedObject
* pLast
);
201 LwpListList
* GetNextActiveListList(LwpListList
* pLast
);
204 class LwpStyleManager
;
206 class LwpBulletStyleMgr
;
210 LwpFoundry( LwpObjectStream
*pStrm
, LwpDocument
* pDoc
);
212 void Read(LwpObjectStream
*pStrm
);
213 void RegisterAllLayouts();
216 bool m_bRegisteredAll
;
217 private: //file members
218 LwpVersionManager m_VerMgr
;
219 LwpObjectManager m_ObjMgr
;
220 LwpObjectID m_MarkerHead
;
221 LwpObjectID m_FootnoteMgr
;
222 LwpNumberManager m_NumMgr
;
223 LwpBulletManager m_BulMgr
;
224 LwpOrderedObjectManager m_SectionList
;
226 LwpObjectID m_Layout
; //The head layout
227 LwpObjectID m_TextStyle
;
228 LwpObjectID m_DefaultTextStyle
;
229 LwpObjectID m_DefaultClickStyle
;
230 LwpObjectID m_PageStyle
;
231 LwpObjectID m_FrameStyle
;
232 LwpObjectID m_TableStyle
;
233 LwpObjectID m_CellStyle
;
234 LwpObjectID m_DftFrameStyle
;
235 LwpObjectID m_DftPageStyle
;
236 LwpObjectID m_DftTableStyle
;
237 LwpObjectID m_DftCellStyle
;
238 LwpObjectID m_DftColumnStyle
;
239 LwpObjectID m_DftLeftColumnStyle
;
240 LwpObjectID m_DftRighColumnStyle
;
242 LwpObjectID m_BookMarkHead
;
243 LwpObjectID m_DdeLinkHead
;
244 LwpObjectID m_DirtBagHead
;
245 LwpObjectID m_NamedOutlineSeqHead
;
246 LwpObjectID m_EnumLayoutHead
;
247 LwpObjectID m_EnumLayoutTail
;
249 LwpObjectID m_NamedObjects
;
250 sal_uInt32 m_nLastClickHere
;
252 LwpObjectID m_SmartTextMgr
;
254 LwpContentManager m_ContentMgr
;
255 LwpFontManager m_FontMgr
;
256 LwpPieceManager
* m_pPieceMgr
;
258 LwpObjectID m_DftDropCapStyle
;
259 LwpObjectID m_DftHeaderStyle
;
261 LwpObjectID m_DftFooterStyle
;
263 void ReadStyles(LwpObjectStream
*pStrm
);
265 inline LwpContentManager
* GetContentManager() { return &m_ContentMgr
; }
266 inline LwpObjectID
* GetGraphicListHead() { return m_ContentMgr
.GetGraphicListHead(); }
267 inline LwpFontManager
* GetFontManger() { return &m_FontMgr
;}
268 inline LwpObjectID
* GetTextStyleHead() { return &m_TextStyle
;}
269 inline LwpObjectID
* GetLayout() {return &m_Layout
;}
270 inline LwpObjectID
* GetBulletManagerID() { return m_BulMgr
.GetHeadID();}
271 inline LwpDocument
* GetDocument(){ return m_pDoc
;}
272 inline LwpNumberManager
* GetNumberManager() { return &m_NumMgr
;}
273 LwpObjectID
* GetDefaultTextStyle() ;
275 LwpStyleManager
* m_pStyleMgr
;
276 LwpDropcapMgr
* m_pDropcapMgr
;
277 LwpBulletStyleMgr
* m_pBulletStyleMgr
;
279 inline LwpStyleManager
* GetStyleManager() { return m_pStyleMgr
;}
280 LwpBookMark
* GetBookMark(LwpObjectID objMarker
);
281 LwpDropcapMgr
* GetDropcapMgr(){return m_pDropcapMgr
;}
282 LwpContent
* EnumContents(LwpContent
* pContent
);
283 LwpSection
* EnumSections(LwpSection
* pSection
);
284 LwpBulletStyleMgr
* GetBulletStyleMgr(){return m_pBulletStyleMgr
;}
286 LwpObjectID
* FindParaStyleByName(const OUString
& name
);
287 OUString
FindActuralStyleName(const OUString
& name
);
290 class LwpStyleManager
296 LwpFoundry
* m_pFoundry
;
299 size_t operator()( const LwpObjectID
& rName
) const
301 return rName
.HashCode();
306 bool operator()( const LwpObjectID
& rKey1
, const LwpObjectID
& rKey2
) const
308 return(rKey1
==rKey2
);
312 typedef boost::unordered_map
<LwpObjectID
, IXFStyle
*, hashFunc
, eqFunc
> LwpStyleMap
;
313 LwpStyleMap m_StyleList
;
315 void SetFoundry(LwpFoundry
* pFoundry
){m_pFoundry
= pFoundry
;}
316 IXFStyle
* AddStyle(LwpObjectID styleObjID
, IXFStyle
* pStyle
);
317 IXFStyle
* GetStyle(const LwpObjectID
&styleObjID
);
321 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */