update dev300-m57
[ooovba.git] / lotuswordpro / source / filter / lwpdocdata.hxx
blob5d75ae001359edd401391025013f8506c48266f7
1 /*************************************************************************
3 * The Contents of this file are made available subject to the terms of
4 * either of the following licenses
6 * - GNU Lesser General Public License Version 2.1
7 * - Sun Industry Standards Source License Version 1.1
9 * Sun Microsystems Inc., October, 2000
11 * GNU Lesser General Public License Version 2.1
12 * =============================================
13 * Copyright 2000 by Sun Microsystems, Inc.
14 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License version 2.1, as published by the Free Software Foundation.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 * MA 02111-1307 USA
31 * Sun Industry Standards Source License Version 1.1
32 * =================================================
33 * The contents of this file are subject to the Sun Industry Standards
34 * Source License Version 1.1 (the "License"); You may not use this file
35 * except in compliance with the License. You may obtain a copy of the
36 * License at http://www.openoffice.org/license.html.
38 * Software provided under this License is provided on an "AS IS" basis,
39 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
40 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
41 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
42 * See the License for the specific provisions governing your rights and
43 * obligations concerning the Software.
45 * The Initial Developer of the Original Code is: IBM Corporation
47 * Copyright: 2008 by IBM Corporation
49 * All Rights Reserved.
51 * Contributor(s): _______________________________________
54 ************************************************************************/
55 #ifndef LWPDOCDATA_HXX_
56 #define LWPDOCDATA_HXX_
57 #include "lwpobj.hxx"
58 #include "lwpatomholder.hxx"
59 #include "localtime.hxx"
60 #include "lwpcolor.hxx"
61 #include "xfilter/xfcolor.hxx"
62 #include <map>
64 struct LwpDocOptions
66 sal_uInt16 nOptionFlag;
67 LwpAtomHolder encrypt1password;
68 LwpAtomHolder encrypt2password;
69 LwpAtomHolder characterSet;
70 LwpAtomHolder grammerSet;
71 sal_uInt16 nMarginMarks;
72 sal_uInt16 nMarginMarksLocation;
73 sal_uInt16 nMarginMarksChar;
75 struct LwpDocInfo
77 LwpAtomHolder description;
78 LwpAtomHolder keywords;
79 LwpAtomHolder createdBy;
80 sal_Int32 nCreationTime;
81 sal_Int32 nLastRevisionTime;
82 sal_Int32 nTotalEditTime;
83 LwpObjectID cpVerDocInfo;
84 sal_uInt16 nNumEditedBy;
85 //skip editor list
87 struct LwpDocControl
89 LwpAtomHolder cGreeting;
90 sal_uInt16 nFlags;
91 sal_uInt16 nDocControlProtection;
92 sal_uInt16 nLen1;
93 //skip doc control password string
94 sal_uInt16 nFileProtection;
95 sal_uInt16 nLen2;
96 //skip file password string
97 sal_uInt16 nAutoVersioning;
98 LwpAtomHolder cDocControlOnlyEditor;
99 sal_uInt16 nEditorVerification;
101 struct lcolor
103 sal_uInt16 cred; // When extra is AGLRGB_INDEX, cred holds the
104 sal_uInt16 cgreen; // hi 16 bits and cgreen holds the lo 16 bits of
105 sal_uInt16 cblue; // the 32-bit LUT index.
106 sal_uInt16 cextra;
108 struct LwpFontDescriptionOverrideBase
110 sal_uInt8 cOverrideBits;
111 sal_uInt8 cApplyBits;
112 sal_Int32 cPointSize;
113 sal_uInt8 cOverstrike;
114 sal_uInt16 cTightness;
115 //lcolor cColor;
116 //lcolor cBackgroundColor;
117 LwpColor cColor;
118 LwpColor cBackgroundColor;
120 struct LwpFontAttributeOverride
122 sal_uInt16 cAttrBits;
123 sal_uInt16 cAttrOverrideBits;
124 sal_uInt16 cAttrApplyBits;
125 sal_uInt8 cAttrOverrideBits2;
126 sal_uInt8 cAttrApplyBits2;
127 sal_uInt8 cCase;
128 sal_uInt8 cUnder;
130 struct LwpFontDescriptionOverride
132 LwpFontAttributeOverride cFontAttributeOverride;
133 LwpFontDescriptionOverrideBase cFontDescriptionOverrideBase;
134 LwpAtomHolder cFaceName;
135 LwpAtomHolder cAltFaceName;
137 struct LwpOverrideOg
139 sal_uInt16 cValues;
140 sal_uInt16 cOverride;
141 sal_uInt16 cApply;
143 struct LwpTextAttributeOverrideOg
145 LwpOverrideOg cOverride;
146 sal_uInt16 cHideLevels;
147 sal_Int32 cBaselineOffset;
149 struct LwpEditorAttr
151 LwpAtomHolder cName;
152 LwpAtomHolder cInitials;
153 LwpColor cHiLiteColor;
154 sal_uInt16 nID;
155 LwpFontDescriptionOverride cInsFontOver;
156 LwpFontDescriptionOverride cDelFontOver;
157 sal_uInt16 nAbilities;
158 sal_uInt16 nLocks;
159 sal_uInt16 nSuggestions;
160 LwpTextAttributeOverrideOg cDelTextAttr;
162 class LwpDocData : public LwpObject
164 public:
165 LwpDocData(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
166 ~LwpDocData();
167 private:
168 LwpDocOptions m_DocOptions;
169 LwpDocInfo m_DocInfo;
170 LwpDocControl m_DocControl;
171 // static std::map<sal_uInt16,LwpEditorAttr*> m_EditorAttrMap;
172 private:
173 LtTm m_nCreationTime;
174 LtTm m_nLastRevisionTime;
175 LtTm m_nTotalEditTime;
176 private:
177 void SkipExtra(LwpSvStream* pStream);
178 void SkipAtomHandler(LwpSvStream* pStream);
179 rtl::OUString DateTimeToOUString(LtTm& dt);
180 rtl::OUString TimeToOUString(LtTm& dt);
182 public:
183 //inline sal_uInt8* GetBuffer(){return m_DataBuffer;}
184 void Read();
185 void Parse(IXFStream *pOutputStream);
186 // LwpEditorAttr* GetEditorList(){return m_pEditorAttrList;}
187 //static OUString GetEditorName(sal_uInt8 nID);
188 //static XFColor GetHighLightColor(sal_uInt8 nID);
189 //static void Reset();
191 #endif