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,
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_
58 #include "lwpatomholder.hxx"
59 #include "localtime.hxx"
60 #include "lwpcolor.hxx"
61 #include "xfilter/xfcolor.hxx"
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
;
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
;
89 LwpAtomHolder cGreeting
;
91 sal_uInt16 nDocControlProtection
;
93 //skip doc control password string
94 sal_uInt16 nFileProtection
;
96 //skip file password string
97 sal_uInt16 nAutoVersioning
;
98 LwpAtomHolder cDocControlOnlyEditor
;
99 sal_uInt16 nEditorVerification
;
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.
108 struct LwpFontDescriptionOverrideBase
110 sal_uInt8 cOverrideBits
;
111 sal_uInt8 cApplyBits
;
112 sal_Int32 cPointSize
;
113 sal_uInt8 cOverstrike
;
114 sal_uInt16 cTightness
;
116 //lcolor cBackgroundColor;
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
;
130 struct LwpFontDescriptionOverride
132 LwpFontAttributeOverride cFontAttributeOverride
;
133 LwpFontDescriptionOverrideBase cFontDescriptionOverrideBase
;
134 LwpAtomHolder cFaceName
;
135 LwpAtomHolder cAltFaceName
;
140 sal_uInt16 cOverride
;
143 struct LwpTextAttributeOverrideOg
145 LwpOverrideOg cOverride
;
146 sal_uInt16 cHideLevels
;
147 sal_Int32 cBaselineOffset
;
152 LwpAtomHolder cInitials
;
153 LwpColor cHiLiteColor
;
155 LwpFontDescriptionOverride cInsFontOver
;
156 LwpFontDescriptionOverride cDelFontOver
;
157 sal_uInt16 nAbilities
;
159 sal_uInt16 nSuggestions
;
160 LwpTextAttributeOverrideOg cDelTextAttr
;
162 class LwpDocData
: public LwpObject
165 LwpDocData(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
168 LwpDocOptions m_DocOptions
;
169 LwpDocInfo m_DocInfo
;
170 LwpDocControl m_DocControl
;
171 // static std::map<sal_uInt16,LwpEditorAttr*> m_EditorAttrMap;
173 LtTm m_nCreationTime
;
174 LtTm m_nLastRevisionTime
;
175 LtTm m_nTotalEditTime
;
177 void SkipExtra(LwpSvStream
* pStream
);
178 void SkipAtomHandler(LwpSvStream
* pStream
);
179 rtl::OUString
DateTimeToOUString(LtTm
& dt
);
180 rtl::OUString
TimeToOUString(LtTm
& dt
);
183 //inline sal_uInt8* GetBuffer(){return m_DataBuffer;}
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();