fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / lotuswordpro / source / filter / lwpdoc.hxx
blob0e4a737c24646c85d1421da79eeaae9138c46073
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,
29 * MA 02111-1307 USA
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 /*************************************************************************
57 * @file
58 * LwpDocument header file
59 ************************************************************************/
60 /*************************************************************************
61 * Change History
62 Jan 2005 Created
63 Jun 2005 Code cleaning by change some members to local variables in Read()
64 ************************************************************************/
66 #ifndef _LWPDOCUMENT_HXX
67 #define _LWPDOCUMENT_HXX
70 #include "lwpobj.hxx"
71 #include "lwpsortopt.hxx"
72 #include "lwpuidoc.hxx"
73 #include "lwplnopts.hxx"
74 #include "lwpusrdicts.hxx"
75 #include "lwpprtinfo.hxx"
76 #include "lwpdlvlist.hxx"
77 #include "lwpheader.hxx"
78 #include "lwpfoundry.hxx"
80 class IXFStream;
81 class LwpVirtualLayout;
82 /**
83 * @brief Document object, represent document and division
85 class LwpDocument : public LwpDLNFPVList
87 public:
88 LwpDocument(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
89 ~LwpDocument();
91 private:
92 LwpFoundry* m_pOwnedFoundry;
94 //Data members in file format
95 LwpObjectID m_DocSockID;
96 sal_uInt16 m_nFlags;
97 sal_uInt32 m_nPersistentFlags;
98 enum
100 DOC_PROTECTED = 0x00000004UL,
101 DOC_CHILDDOC = 0x00000800UL
104 //Code cleaning by change some members to local variables in Read()
105 //Reserve the comments for future use
106 //LwpSortOption* m_pDocSort;
107 //LwpUIDocument* m_pUIDoc;
108 LwpLineNumberOptions* m_pLnOpts;
109 //LwpUserDictFiles* m_pUsrDicts;
110 //LwpPrinterInfo* m_pPrtInfo;
112 LwpObjectID m_DivOpts;
113 LwpObjectID m_FootnoteOpts;
114 LwpObjectID m_DocData;
115 LwpObjectID m_DivInfo;
116 LwpAtomHolder m_Epoch;
118 LwpObjectID m_WYSIWYGPageHints;
119 LwpObjectID m_VerDoc;
120 LwpObjectID m_STXInfo;
122 protected:
123 void Read();
124 void ReadPlug();
125 void ParseDocContent(IXFStream* pOutputStream);
126 void RegisterTextStyles();
127 void RegisterLayoutStyles();
129 void RegisterStylesInPara();
130 void RegisterBulletStyles();
131 void RegisterGraphicsStyles();
132 void RegisterLinenumberStyles();
133 void RegisterFootnoteStyles();
134 void RegisterDefaultParaStyles();
136 public:
137 void Parse(IXFStream* pOutputStream);
138 void RegisterStyle();
140 inline sal_Bool IsChildDoc();
141 inline sal_Bool HonorProtection();
142 inline LwpObjectID* GetContentList();
143 inline LwpObjectID* GetDocData();
144 inline LwpObjectID* GetSocket();
146 inline LwpFoundry* GetFoundry();
147 inline LwpObjectID* GetDivInfoID();
148 inline LwpObjectID* GetPageHintsID();
149 inline LwpObjectID* GetFootnoteOpts();
150 inline LwpObjectID* GetVerDoc();
151 LwpObjectID* GetValidFootnoteOpts();
153 sal_uInt16 GetEndnoteType();
154 LwpDocument* GetPreviousDivision();
155 LwpDocument* GetNextDivision();
156 LwpDocument* GetParentDivision();
157 LwpDocument* GetPreviousInGroup();
159 LwpDocument* GetNextInGroup();
160 LwpDocument* GetPreviousDivisionWithContents();
161 LwpDocument* GetLastDivisionWithContents();
162 LwpDocument* GetLastInGroupWithContents();
163 LwpDocument* GetRootDocument();
164 LwpDocument* GetFirstDivisionWithContentsThatIsNotOLE();
165 LwpDocument* GetLastDivisionThatHasEndnote();
167 LwpDocument* GetLastDivision();
168 LwpDocument* GetFirstDivision();
169 LwpVirtualLayout* GetEnSuperTableLayout();
170 sal_Bool GetNumberOfPages(LwpDocument* pEndDivision, sal_uInt16& nCount);
172 sal_uInt16 GetNumberOfPagesBefore();
173 void ParseFrameInPage(IXFStream* pOutputStream);
175 private:
176 void MaxNumberOfPages(sal_uInt16& nNumPages);
177 void XFConvertFrameInPage(XFContentContainer* pCont);
178 void ChangeStyleName();
179 sal_Bool IsSkippedDivision();
182 inline sal_Bool LwpDocument::IsChildDoc()
184 return (sal_Bool) ((m_nPersistentFlags & DOC_CHILDDOC) ? sal_True : sal_False);
186 inline sal_Bool LwpDocument::HonorProtection()
188 return m_nPersistentFlags & DOC_PROTECTED ? sal_True : sal_False;
190 inline LwpObjectID* LwpDocument::GetContentList()
192 return(m_pFoundry->GetContentManager()->GetContentList());
194 inline LwpObjectID* LwpDocument::GetSocket()
196 return &m_DocSockID;
198 inline LwpFoundry* LwpDocument::GetFoundry()
200 return m_pFoundry;
202 inline LwpObjectID* LwpDocument::GetDivInfoID()
204 return &m_DivInfo;
206 inline LwpObjectID* LwpDocument::GetPageHintsID()
208 return &m_WYSIWYGPageHints;
210 inline LwpObjectID* LwpDocument::GetFootnoteOpts()
212 return &m_FootnoteOpts;
214 inline LwpObjectID* LwpDocument::GetDocData()
216 return &m_DocData;
218 inline LwpObjectID* LwpDocument::GetVerDoc()
220 return &m_VerDoc;
224 * @brief DocumentSock object, divisions are embedded by document socket object
226 class LwpDocSock : public LwpDLNFVList
228 public:
229 LwpDocSock(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
230 ~LwpDocSock(){}
231 private:
232 LwpObjectID m_Doc;
233 protected:
234 void Read();
235 public:
236 void RegisterStyle();
237 void Parse(IXFStream* pOutputStream);
240 #endif
242 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */