1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include <FontTable.hxx>
25 #ifndef INCLUDED_RESOURCESIDS
26 #include <doctok/resourceids.hxx>
27 #include <ooxml/resourceids.hxx>
28 #endif
29 #include <vector>
30 #include <stdio.h>
31 
32 #include "dmapperLoggers.hxx"
33 
34 namespace writerfilter {
35 namespace dmapper
36 {
37 
38 struct FontTable_Impl
39 {
40     std::vector< FontEntry::Pointer_t > aFontEntries;
41     FontEntry::Pointer_t pCurrentEntry;
FontTable_Implwriterfilter::dmapper::FontTable_Impl42     FontTable_Impl() {}
43 };
44 /*-- 19.06.2006 12:04:32---------------------------------------------------
45 
46   -----------------------------------------------------------------------*/
FontTable()47 FontTable::FontTable()
48 : LoggedProperties(dmapper_logger, "FontTable")
49 , LoggedTable(dmapper_logger, "FontTable")
50 , LoggedStream(dmapper_logger, "FontTable")
51 , m_pImpl( new FontTable_Impl )
52 {
53 }
54 /*-- 19.06.2006 12:04:33---------------------------------------------------
55 
56   -----------------------------------------------------------------------*/
~FontTable()57 FontTable::~FontTable()
58 {
59     delete m_pImpl;
60 }
61 /*-- 19.06.2006 12:04:33---------------------------------------------------
62 
63   -----------------------------------------------------------------------*/
lcl_attribute(Id Name,Value & val)64 void FontTable::lcl_attribute(Id Name, Value & val)
65 {
66     OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here");
67     if(!m_pImpl->pCurrentEntry)
68         return ;
69     int nIntValue = val.getInt();
70     ::rtl::OUString sValue = val.getString();
71     /* WRITERFILTERSTATUS: table: FontTable_attributedata */
72     switch(Name)
73     {
74 //        case NS_rtf::LN_ISTD: break;
75 //        case NS_rtf::LN_ISTARTAT: break;
76 //        case NS_rtf::LN_NFC: break;
77 //        case NS_rtf::LN_JC: break;
78 //        case NS_rtf::LN_FLEGAL: break;
79 //        case NS_rtf::LN_FNORESTART: break;
80 //        case NS_rtf::LN_FPREV: break;
81 //        case NS_rtf::LN_FPREVSPACE: break;
82 //        case NS_rtf::LN_FWORD6: break;
83 //        case NS_rtf::LN_UNUSED5_7: break;
84 //        case NS_rtf::LN_RGBXCHNUMS: break;
85 //        case NS_rtf::LN_IXCHFOLLOW: break;
86 //        case NS_rtf::LN_DXASPACE: break;
87 //        case NS_rtf::LN_DXAINDENT: break;
88 //        case NS_rtf::LN_CBGRPPRLCHPX: break;
89 //        case NS_rtf::LN_CBGRPPRLPAPX: break;
90 //        case NS_rtf::LN_LSID: break;
91 //        case NS_rtf::LN_TPLC: break;
92 //        case NS_rtf::LN_RGISTD: break;
93 //        case NS_rtf::LN_FSIMPLELIST: break;
94 //        case NS_rtf::LN_FRESTARTHDN: break;
95 //        case NS_rtf::LN_UNSIGNED26_2: break;
96 //        case NS_rtf::LN_ILVL: break;
97 //        case NS_rtf::LN_FSTARTAT: break;
98 //        case NS_rtf::LN_FFORMATTING: break;
99 //        case NS_rtf::LN_UNSIGNED4_6: break;
100 //        case NS_rtf::LN_UNUSED4: break;
101 //        case NS_rtf::LN_UNUSED8: break;
102 //        case NS_rtf::LN_CLFOLVL: break;
103         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
104         case NS_rtf::LN_CBFFNM1:
105             m_pImpl->pCurrentEntry->sFontName1 = sValue;
106         break;
107         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
108         case NS_rtf::LN_PRQ:
109             m_pImpl->pCurrentEntry->nPitchRequest = static_cast<sal_Int16>( nIntValue );
110         break;
111         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
112         case NS_rtf::LN_FTRUETYPE:
113             m_pImpl->pCurrentEntry->bTrueType = nIntValue == 1 ? true : false;
114         break;
115         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
116         case NS_rtf::LN_UNUSED1_3: //unused
117         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
118         case NS_rtf::LN_FF: //unused
119         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
120         case NS_rtf::LN_UNUSED1_7: //unused
121         break;
122         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
123         case NS_rtf::LN_WWEIGHT:
124             m_pImpl->pCurrentEntry->nBaseWeight = nIntValue;
125         break;
126         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
127         case NS_rtf::LN_CHS:
128             m_pImpl->pCurrentEntry->nTextEncoding = nIntValue;
129         break;
130         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
131         case NS_rtf::LN_IXCHSZALT:
132         break;
133         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
134         case NS_rtf::LN_PANOSE:
135             m_pImpl->pCurrentEntry->sPanose += sValue;
136         break;
137         /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
138         case NS_rtf::LN_FS:
139             m_pImpl->pCurrentEntry->sFontSignature += sValue;
140         break;
141 //        case NS_rtf::LN_STI: break;
142 //        case NS_rtf::LN_FSCRATCH: break;
143 //        case NS_rtf::LN_FINVALHEIGHT: break;
144 //        case NS_rtf::LN_FHASUPE: break;
145 //        case NS_rtf::LN_FMASSCOPY: break;
146 //        case NS_rtf::LN_SGC: break;
147 //        case NS_rtf::LN_ISTDBASE: break;
148 //        case NS_rtf::LN_CUPX: break;
149 //        case NS_rtf::LN_ISTDNEXT: break;
150 //        case NS_rtf::LN_BCHUPE: break;
151 //        case NS_rtf::LN_FAUTOREDEF: break;
152 //        case NS_rtf::LN_FHIDDEN: break;
153 //        case NS_rtf::LN_UNUSED8_3: break;
154 //        case NS_rtf::LN_CSTD: break;
155 //        case NS_rtf::LN_CBSTDBASEINFILE: break;
156 //        case NS_rtf::LN_FSTDSTYLENAMESWRITTEN: break;
157 //        case NS_rtf::LN_UNUSED4_2: break;
158 //        case NS_rtf::LN_STIMAXWHENSAVED: break;
159 //        case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED: break;
160 //        case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED: break;
161 //        case NS_rtf::LN_RGFTCSTANDARDCHPSTSH: break;
162 //        case NS_rtf::LN_WIDENT: break;
163 //        case NS_rtf::LN_NFIB: break;
164 //        case NS_rtf::LN_NPRODUCT: break;
165 //        case NS_rtf::LN_LID: break;
166 //        case NS_rtf::LN_PNNEXT: break;
167 //        case NS_rtf::LN_FDOT: break;
168 //        case NS_rtf::LN_FGLSY: break;
169 //        case NS_rtf::LN_FCOMPLEX: break;
170 //        case NS_rtf::LN_FHASPIC: break;
171 //        case NS_rtf::LN_CQUICKSAVES: break;
172 //        case NS_rtf::LN_FENCRYPTED: break;
173 //        case NS_rtf::LN_FWHICHTBLSTM: break;
174 //        case NS_rtf::LN_FREADONLYRECOMMENDED: break;
175 //        case NS_rtf::LN_FWRITERESERVATION: break;
176 //        case NS_rtf::LN_FEXTCHAR: break;
177 //        case NS_rtf::LN_FLOADOVERRIDE: break;
178 //        case NS_rtf::LN_FFAREAST: break;
179 //        case NS_rtf::LN_FCRYPTO: break;
180 //        case NS_rtf::LN_NFIBBACK: break;
181 //        case NS_rtf::LN_LKEY: break;
182 //        case NS_rtf::LN_ENVR: break;
183 //        case NS_rtf::LN_FMAC: break;
184 //        case NS_rtf::LN_FEMPTYSPECIAL: break;
185 //        case NS_rtf::LN_FLOADOVERRIDEPAGE: break;
186 //        case NS_rtf::LN_FFUTURESAVEDUNDO: break;
187 //        case NS_rtf::LN_FWORD97SAVED: break;
188 //        case NS_rtf::LN_FSPARE0: break;
189 //        case NS_rtf::LN_CHSTABLES: break;
190 //        case NS_rtf::LN_FCMIN: break;
191 //        case NS_rtf::LN_FCMAC: break;
192 //        case NS_rtf::LN_CSW: break;
193 //        case NS_rtf::LN_WMAGICCREATED: break;
194 //        case NS_rtf::LN_WMAGICREVISED: break;
195 //        case NS_rtf::LN_WMAGICCREATEDPRIVATE: break;
196 //        case NS_rtf::LN_WMAGICREVISEDPRIVATE: break;
197 //        case NS_rtf::LN_PNFBPCHPFIRST_W6: break;
198 //        case NS_rtf::LN_PNCHPFIRST_W6: break;
199 //        case NS_rtf::LN_CPNBTECHP_W6: break;
200 //        case NS_rtf::LN_PNFBPPAPFIRST_W6: break;
201 //        case NS_rtf::LN_PNPAPFIRST_W6: break;
202 //        case NS_rtf::LN_CPNBTEPAP_W6: break;
203 //        case NS_rtf::LN_PNFBPLVCFIRST_W6: break;
204 //        case NS_rtf::LN_PNLVCFIRST_W6: break;
205 //        case NS_rtf::LN_CPNBTELVC_W6: break;
206 //        case NS_rtf::LN_LIDFE: break;
207 //        case NS_rtf::LN_CLW: break;
208 //        case NS_rtf::LN_CBMAC: break;
209 //        case NS_rtf::LN_LPRODUCTCREATED: break;
210 //        case NS_rtf::LN_LPRODUCTREVISED: break;
211 //        case NS_rtf::LN_CCPTEXT: break;
212 //        case NS_rtf::LN_CCPFTN: break;
213 //        case NS_rtf::LN_CCPHDD: break;
214 //        case NS_rtf::LN_CCPMCR: break;
215 //        case NS_rtf::LN_CCPATN: break;
216 //        case NS_rtf::LN_CCPEDN: break;
217 //        case NS_rtf::LN_CCPTXBX: break;
218 //        case NS_rtf::LN_CCPHDRTXBX: break;
219 //        case NS_rtf::LN_PNFBPCHPFIRST: break;
220 //        case NS_rtf::LN_PNCHPFIRST: break;
221 //        case NS_rtf::LN_CPNBTECHP: break;
222 //        case NS_rtf::LN_PNFBPPAPFIRST: break;
223 //        case NS_rtf::LN_PNPAPFIRST: break;
224 //        case NS_rtf::LN_CPNBTEPAP: break;
225 //        case NS_rtf::LN_PNFBPLVCFIRST: break;
226 //        case NS_rtf::LN_PNLVCFIRST: break;
227 //        case NS_rtf::LN_CPNBTELVC: break;
228 //        case NS_rtf::LN_FCISLANDFIRST: break;
229 //        case NS_rtf::LN_FCISLANDLIM: break;
230 //        case NS_rtf::LN_CFCLCB: break;
231 //        case NS_rtf::LN_FCSTSHFORIG: break;
232 //        case NS_rtf::LN_LCBSTSHFORIG: break;
233 //        case NS_rtf::LN_FCSTSHF: break;
234 //        case NS_rtf::LN_LCBSTSHF: break;
235 //        case NS_rtf::LN_FCPLCFFNDREF: break;
236 //        case NS_rtf::LN_LCBPLCFFNDREF: break;
237 //        case NS_rtf::LN_FCPLCFFNDTXT: break;
238 //        case NS_rtf::LN_LCBPLCFFNDTXT: break;
239 //        case NS_rtf::LN_FCPLCFANDREF: break;
240 //        case NS_rtf::LN_LCBPLCFANDREF: break;
241 //        case NS_rtf::LN_FCPLCFANDTXT: break;
242 //        case NS_rtf::LN_LCBPLCFANDTXT: break;
243 //        case NS_rtf::LN_FCPLCFSED: break;
244 //        case NS_rtf::LN_LCBPLCFSED: break;
245 //        case NS_rtf::LN_FCPLCFPAD: break;
246 //        case NS_rtf::LN_LCBPLCFPAD: break;
247 //        case NS_rtf::LN_FCPLCFPHE: break;
248 //        case NS_rtf::LN_LCBPLCFPHE: break;
249 //        case NS_rtf::LN_FCSTTBFGLSY: break;
250 //        case NS_rtf::LN_LCBSTTBFGLSY: break;
251 //        case NS_rtf::LN_FCPLCFGLSY: break;
252 //        case NS_rtf::LN_LCBPLCFGLSY: break;
253 //        case NS_rtf::LN_FCPLCFHDD: break;
254 //        case NS_rtf::LN_LCBPLCFHDD: break;
255 //        case NS_rtf::LN_FCPLCFBTECHPX: break;
256 //        case NS_rtf::LN_LCBPLCFBTECHPX: break;
257 //        case NS_rtf::LN_FCPLCFBTEPAPX: break;
258 //        case NS_rtf::LN_LCBPLCFBTEPAPX: break;
259 //        case NS_rtf::LN_FCPLCFSEA: break;
260 //        case NS_rtf::LN_LCBPLCFSEA: break;
261 //        case NS_rtf::LN_FCSTTBFFFN: break;
262 //        case NS_rtf::LN_LCBSTTBFFFN: break;
263 //        case NS_rtf::LN_FCPLCFFLDMOM: break;
264 //        case NS_rtf::LN_LCBPLCFFLDMOM: break;
265 //        case NS_rtf::LN_FCPLCFFLDHDR: break;
266 //        case NS_rtf::LN_LCBPLCFFLDHDR: break;
267 //        case NS_rtf::LN_FCPLCFFLDFTN: break;
268 //        case NS_rtf::LN_LCBPLCFFLDFTN: break;
269 //        case NS_rtf::LN_FCPLCFFLDATN: break;
270 //        case NS_rtf::LN_LCBPLCFFLDATN: break;
271 //        case NS_rtf::LN_FCPLCFFLDMCR: break;
272 //        case NS_rtf::LN_LCBPLCFFLDMCR: break;
273 //        case NS_rtf::LN_FCSTTBFBKMK: break;
274 //        case NS_rtf::LN_LCBSTTBFBKMK: break;
275 //        case NS_rtf::LN_FCPLCFBKF: break;
276 //        case NS_rtf::LN_LCBPLCFBKF: break;
277 //        case NS_rtf::LN_FCPLCFBKL: break;
278 //        case NS_rtf::LN_LCBPLCFBKL: break;
279 //        case NS_rtf::LN_FCCMDS: break;
280 //        case NS_rtf::LN_LCBCMDS: break;
281 //        case NS_rtf::LN_FCPLCMCR: break;
282 //        case NS_rtf::LN_LCBPLCMCR: break;
283 //        case NS_rtf::LN_FCSTTBFMCR: break;
284 //        case NS_rtf::LN_LCBSTTBFMCR: break;
285 //        case NS_rtf::LN_FCPRDRVR: break;
286 //        case NS_rtf::LN_LCBPRDRVR: break;
287 //        case NS_rtf::LN_FCPRENVPORT: break;
288 //        case NS_rtf::LN_LCBPRENVPORT: break;
289 //        case NS_rtf::LN_FCPRENVLAND: break;
290 //        case NS_rtf::LN_LCBPRENVLAND: break;
291 //        case NS_rtf::LN_FCWSS: break;
292 //        case NS_rtf::LN_LCBWSS: break;
293 //        case NS_rtf::LN_FCDOP: break;
294 //        case NS_rtf::LN_LCBDOP: break;
295 //        case NS_rtf::LN_FCSTTBFASSOC: break;
296 //        case NS_rtf::LN_LCBSTTBFASSOC: break;
297 //        case NS_rtf::LN_FCCLX: break;
298 //        case NS_rtf::LN_LCBCLX: break;
299 //        case NS_rtf::LN_FCPLCFPGDFTN: break;
300 //        case NS_rtf::LN_LCBPLCFPGDFTN: break;
301 //        case NS_rtf::LN_FCAUTOSAVESOURCE: break;
302 //        case NS_rtf::LN_LCBAUTOSAVESOURCE: break;
303 //        case NS_rtf::LN_FCGRPXSTATNOWNERS: break;
304 //        case NS_rtf::LN_LCBGRPXSTATNOWNERS: break;
305 //        case NS_rtf::LN_FCSTTBFATNBKMK: break;
306 //        case NS_rtf::LN_LCBSTTBFATNBKMK: break;
307 //        case NS_rtf::LN_FCPLCDOAMOM: break;
308 //        case NS_rtf::LN_LCBPLCDOAMOM: break;
309 //        case NS_rtf::LN_FCPLCDOAHDR: break;
310 //        case NS_rtf::LN_LCBPLCDOAHDR: break;
311 //        case NS_rtf::LN_FCPLCSPAMOM: break;
312 //        case NS_rtf::LN_LCBPLCSPAMOM: break;
313 //        case NS_rtf::LN_FCPLCSPAHDR: break;
314 //        case NS_rtf::LN_LCBPLCSPAHDR: break;
315 //        case NS_rtf::LN_FCPLCFATNBKF: break;
316 //        case NS_rtf::LN_LCBPLCFATNBKF: break;
317 //        case NS_rtf::LN_FCPLCFATNBKL: break;
318 //        case NS_rtf::LN_LCBPLCFATNBKL: break;
319 //        case NS_rtf::LN_FCPMS: break;
320 //        case NS_rtf::LN_LCBPMS: break;
321 //        case NS_rtf::LN_FCFORMFLDSTTBF: break;
322 //        case NS_rtf::LN_LCBFORMFLDSTTBF: break;
323 //        case NS_rtf::LN_FCPLCFENDREF: break;
324 //        case NS_rtf::LN_LCBPLCFENDREF: break;
325 //        case NS_rtf::LN_FCPLCFENDTXT: break;
326 //        case NS_rtf::LN_LCBPLCFENDTXT: break;
327 //        case NS_rtf::LN_FCPLCFFLDEDN: break;
328 //        case NS_rtf::LN_LCBPLCFFLDEDN: break;
329 //        case NS_rtf::LN_FCPLCFPGDEDN: break;
330 //        case NS_rtf::LN_LCBPLCFPGDEDN: break;
331 //        case NS_rtf::LN_FCDGGINFO: break;
332 //        case NS_rtf::LN_LCBDGGINFO: break;
333 //        case NS_rtf::LN_FCSTTBFRMARK: break;
334 //        case NS_rtf::LN_LCBSTTBFRMARK: break;
335 //        case NS_rtf::LN_FCSTTBFCAPTION: break;
336 //        case NS_rtf::LN_LCBSTTBFCAPTION: break;
337 //        case NS_rtf::LN_FCSTTBFAUTOCAPTION: break;
338 //        case NS_rtf::LN_LCBSTTBFAUTOCAPTION: break;
339 //        case NS_rtf::LN_FCPLCFWKB: break;
340 //        case NS_rtf::LN_LCBPLCFWKB: break;
341 //        case NS_rtf::LN_FCPLCFSPL: break;
342 //        case NS_rtf::LN_LCBPLCFSPL: break;
343 //        case NS_rtf::LN_FCPLCFTXBXTXT: break;
344 //        case NS_rtf::LN_LCBPLCFTXBXTXT: break;
345 //        case NS_rtf::LN_FCPLCFFLDTXBX: break;
346 //        case NS_rtf::LN_LCBPLCFFLDTXBX: break;
347 //        case NS_rtf::LN_FCPLCFHDRTXBXTXT: break;
348 //        case NS_rtf::LN_LCBPLCFHDRTXBXTXT: break;
349 //        case NS_rtf::LN_FCPLCFFLDHDRTXBX: break;
350 //        case NS_rtf::LN_LCBPLCFFLDHDRTXBX: break;
351 //        case NS_rtf::LN_FCSTWUSER: break;
352 //        case NS_rtf::LN_LCBSTWUSER: break;
353 //        case NS_rtf::LN_FCSTTBTTMBD: break;
354 //        case NS_rtf::LN_LCBSTTBTTMBD: break;
355 //        case NS_rtf::LN_FCUNUSED: break;
356 //        case NS_rtf::LN_LCBUNUSED: break;
357 //        case NS_rtf::LN_FCPGDMOTHER: break;
358 //        case NS_rtf::LN_LCBPGDMOTHER: break;
359 //        case NS_rtf::LN_FCBKDMOTHER: break;
360 //        case NS_rtf::LN_LCBBKDMOTHER: break;
361 //        case NS_rtf::LN_FCPGDFTN: break;
362 //        case NS_rtf::LN_LCBPGDFTN: break;
363 //        case NS_rtf::LN_FCBKDFTN: break;
364 //        case NS_rtf::LN_LCBBKDFTN: break;
365 //        case NS_rtf::LN_FCPGDEDN: break;
366 //        case NS_rtf::LN_LCBPGDEDN: break;
367 //        case NS_rtf::LN_FCBKDEDN: break;
368 //        case NS_rtf::LN_LCBBKDEDN: break;
369 //        case NS_rtf::LN_FCSTTBFINTLFLD: break;
370 //        case NS_rtf::LN_LCBSTTBFINTLFLD: break;
371 //        case NS_rtf::LN_FCROUTESLIP: break;
372 //        case NS_rtf::LN_LCBROUTESLIP: break;
373 //        case NS_rtf::LN_FCSTTBSAVEDBY: break;
374 //        case NS_rtf::LN_LCBSTTBSAVEDBY: break;
375 //        case NS_rtf::LN_FCSTTBFNM: break;
376 //        case NS_rtf::LN_LCBSTTBFNM: break;
377 //        case NS_rtf::LN_FCPLCFLST: break;
378 //        case NS_rtf::LN_LCBPLCFLST: break;
379 //        case NS_rtf::LN_FCPLFLFO: break;
380 //        case NS_rtf::LN_LCBPLFLFO: break;
381 //        case NS_rtf::LN_FCPLCFTXBXBKD: break;
382 //        case NS_rtf::LN_LCBPLCFTXBXBKD: break;
383 //        case NS_rtf::LN_FCPLCFTXBXHDRBKD: break;
384 //        case NS_rtf::LN_LCBPLCFTXBXHDRBKD: break;
385 //        case NS_rtf::LN_FCDOCUNDO: break;
386 //        case NS_rtf::LN_LCBDOCUNDO: break;
387 //        case NS_rtf::LN_FCRGBUSE: break;
388 //        case NS_rtf::LN_LCBRGBUSE: break;
389 //        case NS_rtf::LN_FCUSP: break;
390 //        case NS_rtf::LN_LCBUSP: break;
391 //        case NS_rtf::LN_FCUSKF: break;
392 //        case NS_rtf::LN_LCBUSKF: break;
393 //        case NS_rtf::LN_FCPLCUPCRGBUSE: break;
394 //        case NS_rtf::LN_LCBPLCUPCRGBUSE: break;
395 //        case NS_rtf::LN_FCPLCUPCUSP: break;
396 //        case NS_rtf::LN_LCBPLCUPCUSP: break;
397 //        case NS_rtf::LN_FCSTTBGLSYSTYLE: break;
398 //        case NS_rtf::LN_LCBSTTBGLSYSTYLE: break;
399 //        case NS_rtf::LN_FCPLGOSL: break;
400 //        case NS_rtf::LN_LCBPLGOSL: break;
401 //        case NS_rtf::LN_FCPLCOCX: break;
402 //        case NS_rtf::LN_LCBPLCOCX: break;
403 //        case NS_rtf::LN_FCPLCFBTELVC: break;
404 //        case NS_rtf::LN_LCBPLCFBTELVC: break;
405 //        case NS_rtf::LN_DWLOWDATETIME: break;
406 //        case NS_rtf::LN_DWHIGHDATETIME: break;
407 //        case NS_rtf::LN_FCPLCFLVC: break;
408 //        case NS_rtf::LN_LCBPLCFLVC: break;
409 //        case NS_rtf::LN_FCPLCASUMY: break;
410 //        case NS_rtf::LN_LCBPLCASUMY: break;
411 //        case NS_rtf::LN_FCPLCFGRAM: break;
412 //        case NS_rtf::LN_LCBPLCFGRAM: break;
413 //        case NS_rtf::LN_FCSTTBLISTNAMES: break;
414 //        case NS_rtf::LN_LCBSTTBLISTNAMES: break;
415 //        case NS_rtf::LN_FCSTTBFUSSR: break;
416 //        case NS_rtf::LN_LCBSTTBFUSSR: break;
417 //        case NS_rtf::LN_FN: break;
418 //        case NS_rtf::LN_FCSEPX: break;
419 //        case NS_rtf::LN_FNMPR: break;
420 //        case NS_rtf::LN_FCMPR: break;
421 //        case NS_rtf::LN_ICOFORE: break;
422 //        case NS_rtf::LN_ICOBACK: break;
423 //        case NS_rtf::LN_IPAT: break;
424 //        case NS_rtf::LN_SHDFORECOLOR: break;
425 //        case NS_rtf::LN_SHDBACKCOLOR: break;
426 //        case NS_rtf::LN_SHDPATTERN: break;
427 //        case NS_rtf::LN_DPTLINEWIDTH: break;
428 //        case NS_rtf::LN_BRCTYPE: break;
429 //        case NS_rtf::LN_ICO: break;
430 //        case NS_rtf::LN_DPTSPACE: break;
431 //        case NS_rtf::LN_FSHADOW: break;
432 //        case NS_rtf::LN_FFRAME: break;
433 //        case NS_rtf::LN_UNUSED2_15: break;
434 //        case NS_rtf::LN_FFIRSTMERGED: break;
435 //        case NS_rtf::LN_FMERGED: break;
436 //        case NS_rtf::LN_FVERTICAL: break;
437 //        case NS_rtf::LN_FBACKWARD: break;
438 //        case NS_rtf::LN_FROTATEFONT: break;
439 //        case NS_rtf::LN_FVERTMERGE: break;
440 //        case NS_rtf::LN_FVERTRESTART: break;
441 //        case NS_rtf::LN_VERTALIGN: break;
442 //        case NS_rtf::LN_FUNUSED: break;
443 //        case NS_rtf::LN_WUNUSED: break;
444 //        case NS_rtf::LN_BRCTOP: break;
445 //        case NS_rtf::LN_BRCLEFT: break;
446 //        case NS_rtf::LN_BRCBOTTOM: break;
447 //        case NS_rtf::LN_BRCRIGHT: break;
448 //        case NS_rtf::LN_IBKL: break;
449 //        case NS_rtf::LN_ITCFIRST: break;
450 //        case NS_rtf::LN_FPUB: break;
451 //        case NS_rtf::LN_ITCLIM: break;
452 //        case NS_rtf::LN_FCOL: break;
453 //        case NS_rtf::LN_LINECOLOR: break;
454 //        case NS_rtf::LN_LINEWIDTH: break;
455 //        case NS_rtf::LN_LINETYPE: break;
456 //        case NS_rtf::LN_MM: break;
457 //        case NS_rtf::LN_XEXT: break;
458 //        case NS_rtf::LN_YEXT: break;
459 //        case NS_rtf::LN_HMF: break;
460 //        case NS_rtf::LN_LCB: break;
461 //        case NS_rtf::LN_CBHEADER: break;
462 //        case NS_rtf::LN_MFP: break;
463 //        case NS_rtf::LN_BM_RCWINMF: break;
464 //        case NS_rtf::LN_DXAGOAL: break;
465 //        case NS_rtf::LN_DYAGOAL: break;
466 //        case NS_rtf::LN_MX: break;
467 //        case NS_rtf::LN_MY: break;
468 //        case NS_rtf::LN_DXACROPLEFT: break;
469 //        case NS_rtf::LN_DYACROPTOP: break;
470 //        case NS_rtf::LN_DXACROPRIGHT: break;
471 //        case NS_rtf::LN_DYACROPBOTTOM: break;
472 //        case NS_rtf::LN_BRCL: break;
473 //        case NS_rtf::LN_FFRAMEEMPTY: break;
474 //        case NS_rtf::LN_FBITMAP: break;
475 //        case NS_rtf::LN_FDRAWHATCH: break;
476 //        case NS_rtf::LN_FERROR: break;
477 //        case NS_rtf::LN_BPP: break;
478 //        case NS_rtf::LN_DXAORIGIN: break;
479 //        case NS_rtf::LN_DYAORIGIN: break;
480 //        case NS_rtf::LN_CPROPS: break;
481 //        case NS_rtf::LN_LINEPROPSTOP: break;
482 //        case NS_rtf::LN_LINEPROPSLEFT: break;
483 //        case NS_rtf::LN_LINEPROPSBOTTOM: break;
484 //        case NS_rtf::LN_LINEPROPSRIGHT: break;
485 //        case NS_rtf::LN_LINEPROPSHORIZONTAL: break;
486 //        case NS_rtf::LN_LINEPROPSVERTICAL: break;
487 //        case NS_rtf::LN_headerr: break;
488 //        case NS_rtf::LN_footerr: break;
489 //        case NS_rtf::LN_endnote: break;
490 //        case NS_rtf::LN_BOOKMARKNAME: break;
491 
492 //        case NS_rtf::LN_LISTLEVEL: break;
493 //        case NS_rtf::LN_LFO: break;
494         case NS_rtf::LN_F:
495         break;
496         case NS_rtf::LN_ALTFONTNAME:
497             /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
498             m_pImpl->pCurrentEntry->sAlternativeFont = sValue;
499         break;
500         case NS_rtf::LN_XSZFFN:
501             /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
502         case NS_ooxml::LN_CT_Font_name:
503             /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
504             m_pImpl->pCurrentEntry->sFontName = sValue;
505         break;
506 //        case NS_rtf::LN_XSTZNAME: break;
507 //        case NS_rtf::LN_XSTZNAME1: break;
508 //        case NS_rtf::LN_UPXSTART: break;
509 //        case NS_rtf::LN_UPX: break;
510 //        case NS_rtf::LN_sed: break;
511 //        case NS_rtf::LN_picf: break;
512 //        case NS_rtf::LN_rgbrc: break;
513 //        case NS_rtf::LN_shd: break;
514 //        case NS_rtf::LN_cellShd: break;
515 //        case NS_rtf::LN_cellTopColor: break;
516 //        case NS_rtf::LN_cellLeftColor: break;
517 //        case NS_rtf::LN_cellBottomColor: break;
518 //        case NS_rtf::LN_cellRightColor: break;
519 
520 //        case NS_rtf::LN_LISTTABLE: break;
521 //        case NS_rtf::LN_LFOTABLE: break;
522 //        case NS_rtf::LN_FONTTABLE: break;
523 //        case NS_rtf::LN_STYLESHEET: break;
524         default:
525         {
526             //----> debug
527             int nVal = val.getInt();
528             ++nVal;
529             //<---- debug
530         }
531     }
532 }
533 /*-- 19.06.2006 12:04:33---------------------------------------------------
534 
535   -----------------------------------------------------------------------*/
lcl_sprm(Sprm & rSprm)536 void FontTable::lcl_sprm(Sprm& rSprm)
537 {
538     OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here");
539     if(!m_pImpl->pCurrentEntry)
540         return ;
541     sal_uInt32 nSprmId = rSprm.getId();
542     (void)nSprmId;
543 
544     Value::Pointer_t pValue = rSprm.getValue();
545     sal_Int32 nIntValue = pValue->getInt();
546     (void)nIntValue;
547     rtl::OUString sStringValue = pValue->getString();
548 
549 /*    switch(nSprmId)
550     {
551     default:
552         {
553             OSL_ENSURE( false, "FontTable::sprm()"); //
554             //Value::Pointer_t pValue_ = rSprm.getValue();
555         }
556     }*/
557 }
558 
559 /*-- 19.06.2006 12:04:33---------------------------------------------------
560 
561   -----------------------------------------------------------------------*/
lcl_entry(int,writerfilter::Reference<Properties>::Pointer_t ref)562 void FontTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
563 {
564     //create a new font entry
565     OSL_ENSURE( !m_pImpl->pCurrentEntry, "current entry has to be NULL here");
566     m_pImpl->pCurrentEntry.reset(new FontEntry);
567     ref->resolve(*this);
568     //append it to the table
569     m_pImpl->aFontEntries.push_back( m_pImpl->pCurrentEntry );
570     m_pImpl->pCurrentEntry.reset();
571 }
572 /*-- 19.06.2006 12:04:34---------------------------------------------------
573 
574   -----------------------------------------------------------------------*/
lcl_startSectionGroup()575 void FontTable::lcl_startSectionGroup()
576 {
577 }
578 /*-- 19.06.2006 12:04:35---------------------------------------------------
579 
580   -----------------------------------------------------------------------*/
lcl_endSectionGroup()581 void FontTable::lcl_endSectionGroup()
582 {
583 }
584 /*-- 19.06.2006 12:04:35---------------------------------------------------
585 
586   -----------------------------------------------------------------------*/
lcl_startParagraphGroup()587 void FontTable::lcl_startParagraphGroup()
588 {
589 }
590 /*-- 19.06.2006 12:04:35---------------------------------------------------
591 
592   -----------------------------------------------------------------------*/
lcl_endParagraphGroup()593 void FontTable::lcl_endParagraphGroup()
594 {
595 }
596 /*-- 19.06.2006 12:04:35---------------------------------------------------
597 
598   -----------------------------------------------------------------------*/
lcl_startCharacterGroup()599 void FontTable::lcl_startCharacterGroup()
600 {
601 }
602 /*-- 19.06.2006 12:04:35---------------------------------------------------
603 
604   -----------------------------------------------------------------------*/
lcl_endCharacterGroup()605 void FontTable::lcl_endCharacterGroup()
606 {
607 }
608 /*-- 19.06.2006 12:04:36---------------------------------------------------
609 
610   -----------------------------------------------------------------------*/
lcl_text(const sal_uInt8 *,size_t)611 void FontTable::lcl_text(const sal_uInt8*, size_t )
612 {
613 }
614 /*-- 19.06.2006 12:04:36---------------------------------------------------
615 
616   -----------------------------------------------------------------------*/
lcl_utext(const sal_uInt8 *,size_t)617 void FontTable::lcl_utext(const sal_uInt8* , size_t)
618 {
619 }
620 /*-- 19.06.2006 12:04:37---------------------------------------------------
621 
622   -----------------------------------------------------------------------*/
lcl_props(writerfilter::Reference<Properties>::Pointer_t)623 void FontTable::lcl_props(writerfilter::Reference<Properties>::Pointer_t)
624 {
625 }
626 /*-- 19.06.2006 12:04:37---------------------------------------------------
627 
628   -----------------------------------------------------------------------*/
lcl_table(Id,writerfilter::Reference<Table>::Pointer_t)629 void FontTable::lcl_table(Id, writerfilter::Reference<Table>::Pointer_t)
630 {
631 }
632 /*-- 19.06.2006 12:04:38---------------------------------------------------
633 
634   -----------------------------------------------------------------------*/
lcl_substream(Id,::writerfilter::Reference<Stream>::Pointer_t)635 void FontTable::lcl_substream(Id, ::writerfilter::Reference<Stream>::Pointer_t)
636 {
637 }
638 /*-- 19.06.2006 12:04:39---------------------------------------------------
639 
640   -----------------------------------------------------------------------*/
lcl_info(const string &)641 void FontTable::lcl_info(const string& )
642 {
643 }
644 
lcl_startShape(::com::sun::star::uno::Reference<::com::sun::star::drawing::XShape>)645 void FontTable::lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > )
646 {
647 }
648 
lcl_endShape()649 void FontTable::lcl_endShape( )
650 {
651 }
652 
653 /*-- 21.06.2006 11:21:38---------------------------------------------------
654 
655   -----------------------------------------------------------------------*/
getFontEntry(sal_uInt32 nIndex)656 const FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex)
657 {
658     return (m_pImpl->aFontEntries.size() > nIndex)
659         ?   m_pImpl->aFontEntries[nIndex]
660         :   FontEntry::Pointer_t();
661 }
662 /*-- 21.06.2006 11:21:38---------------------------------------------------
663 
664   -----------------------------------------------------------------------*/
size()665 sal_uInt32 FontTable::size()
666 {
667     return m_pImpl->aFontEntries.size();
668 }
669 
670 }//namespace dmapper
671 }//namespace writerfilter
672