1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: htmlflyt.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
34 #include "htmlfly.hxx"
37 #define TE(t,p,c) (BYTE)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
39 BYTE aHTMLOutFrmPageFlyTable
[MAX_FRMTYPES
][MAX_BROWSERS
] =
42 // Textrahmen mit Tabelle
43 TE(TBLNODE
, BEFORE
, NONE
), // HTML 3.2
44 TE(DIV
, PREFIX
, NONE
), // IE 4
45 TE(DIV
, PREFIX
, NONE
), // SW
46 TE(DIV
, PREFIX
, NONE
) // Netscape 4!
49 // Textrahmen mit Tabelle und Ueberschrift
50 TE(TBLNODE
, BEFORE
, NONE
), // HTML 3.2
51 TE(DIV
, PREFIX
, NONE
), // IE 4
52 TE(DIV
, PREFIX
, NONE
), // SW
53 TE(DIV
, PREFIX
, NONE
) // Netscape 4
57 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
58 TE(GRFFRM
, PREFIX
, NONE
), // IE 4
59 TE(MULTICOL
,PREFIX
, NONE
), // SW
60 TE(MULTICOL
,PREFIX
, DIV
) // Netscape 4
64 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
65 TE(DIV
, PREFIX
, NONE
), // IE 4
66 TE(DIV
, PREFIX
, NONE
), // SW
67 TE(DIV
, PREFIX
, NONE
) // Netscape 4
70 // sonstiger Textreahmen
71 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
72 TE(DIV
, PREFIX
, NONE
), // IE 4
73 TE(DIV
, PREFIX
, NONE
), // SW
74 TE(DIV
, PREFIX
, NONE
) // Netscape 4
78 TE(GRFNODE
, INSIDE
, NONE
), // HTML 3.2
79 TE(GRFNODE
, PREFIX
, NONE
), // IE 4
80 TE(GRFNODE
, PREFIX
, NONE
), // SW
81 TE(GRFNODE
, PREFIX
, SPAN
) // Netscape 4
85 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
86 TE(OLENODE
, PREFIX
, NONE
), // IE 4
87 TE(OLENODE
, PREFIX
, NONE
), // SW
88 TE(OLENODE
, PREFIX
, SPAN
) // Netscape 4
92 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
93 TE(OLENODE
, PREFIX
, NONE
), // IE 4
94 TE(OLENODE
, PREFIX
, NONE
), // SW
95 TE(OLENODE
, PREFIX
, SPAN
) // Netscape 4
99 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
100 TE(OLENODE
, PREFIX
, NONE
), // IE 4
101 TE(OLENODE
, PREFIX
, NONE
), // SW
102 TE(OLEGRF
, PREFIX
, SPAN
) // Netscape 4
105 // sonstige OLE-Objekte
106 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
107 TE(OLEGRF
, PREFIX
, NONE
), // IE 4
108 TE(OLEGRF
, PREFIX
, NONE
), // SW
109 TE(OLEGRF
, PREFIX
, SPAN
) // Netscape 4
113 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
114 TE(AMARQUEE
,PREFIX
, NONE
), // IE 4
115 TE(AMARQUEE
,PREFIX
, NONE
), // SW
116 TE(GRFFRM
, PREFIX
, SPAN
) // Netscape 4
120 TE(CONTROL
, INSIDE
, NONE
), // HTML 3.2
121 TE(CONTROL
, PREFIX
, NONE
), // IE 4
122 TE(CONTROL
, PREFIX
, NONE
), // SW
123 // Netscape schaltet FORM bei Controls in abs.-pos. SPAN aus.
124 TE(CONTROL
, INSIDE
, NONE
) // Netscape 4
127 // sonstige Zeichen-Objekte
128 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
129 TE(GRFFRM
, PREFIX
, NONE
), // IE 4
130 TE(GRFFRM
, PREFIX
, NONE
), // SW
131 TE(GRFFRM
, PREFIX
, SPAN
) // Netscape 4
135 BYTE aHTMLOutFrmParaFrameTable
[MAX_FRMTYPES
][MAX_BROWSERS
] =
138 // Textrahmen mit Tabelle
139 TE(TBLNODE
, BEFORE
, NONE
), // HTML 3.2
140 TE(TBLNODE
, BEFORE
, NONE
), // IE 4
141 TE(TBLNODE
, BEFORE
, NONE
), // SW
142 TE(TBLNODE
, BEFORE
, NONE
) // Netscape 4
145 // Textrahmen mit Tabelle und Ueberschrift
146 TE(TBLNODE
, BEFORE
, NONE
), // HTML 3.2
147 TE(DIV
, BEFORE
, NONE
), // IE 4
148 TE(DIV
, BEFORE
, NONE
), // SW
149 TE(TBLNODE
, BEFORE
, NONE
) // Netscape 4
153 TE(GRFFRM
, BEFORE
, NONE
), // HTML 3.2
154 TE(GRFFRM
, BEFORE
, NONE
), // IE 4
155 TE(MULTICOL
,BEFORE
, NONE
), // SW
156 TE(MULTICOL
,BEFORE
, DIV
) // Netscape 4
159 // leerer Textreahmen
160 TE(GRFFRM
, BEFORE
, NONE
), // HTML 3.2
161 TE(DIV
, BEFORE
, NONE
), // IE 4
162 TE(SPACER
, BEFORE
, NONE
), // SW
163 TE(SPACER
, BEFORE
, NONE
) // Netscape 4
166 // sonstiger Textreahmen
167 TE(GRFFRM
, BEFORE
, NONE
), // HTML 3.2
168 TE(DIV
, BEFORE
, NONE
), // IE 4
169 TE(DIV
, BEFORE
, NONE
), // SW
170 TE(DIV
, BEFORE
, NONE
) // Netscape 4
174 TE(GRFNODE
, BEFORE
, NONE
), // HTML 3.2
175 TE(GRFNODE
, BEFORE
, NONE
), // IE 4
176 TE(GRFNODE
, BEFORE
, NONE
), // SW
177 TE(GRFNODE
, BEFORE
, NONE
) // Netscape 4
181 TE(OLENODE
, BEFORE
, NONE
), // HTML 3.2
182 TE(OLENODE
, BEFORE
, NONE
), // IE 4
183 TE(OLENODE
, BEFORE
, NONE
), // SW
184 TE(OLENODE
, BEFORE
, NONE
) // Netscape 4
188 TE(OLENODE
, BEFORE
, NONE
), // HTML 3.2
189 TE(OLENODE
, BEFORE
, NONE
), // IE 4
190 TE(OLENODE
, BEFORE
, NONE
), // SW
191 TE(OLENODE
, BEFORE
, NONE
) // Netscape 4
195 TE(OLEGRF
, BEFORE
, NONE
), // HTML 3.2
196 TE(OLENODE
, BEFORE
, NONE
), // IE 4
197 TE(OLENODE
, BEFORE
, NONE
), // SW
198 TE(OLEGRF
, BEFORE
, NONE
) // Netscape 4
201 // sonstige OLE-Objekte
202 TE(OLEGRF
, BEFORE
, NONE
), // HTML 3.2
203 TE(OLEGRF
, BEFORE
, NONE
), // IE 4
204 TE(OLEGRF
, BEFORE
, NONE
), // SW
205 TE(OLEGRF
, BEFORE
, NONE
) // Netscape 4
208 // Laufschrift (fuer Netscape 4 im Container, damit
209 // die LAufschrift an der richtigen Stelle erscheint
210 TE(GRFFRM
, BEFORE
, NONE
), // HTML 3.2
211 TE(AMARQUEE
,BEFORE
, NONE
), // IE 4
212 TE(AMARQUEE
,BEFORE
, NONE
), // SW
213 TE(GRFFRM
, BEFORE
, NONE
) // Netscape 4
217 TE(CONTROL
, INSIDE
, NONE
), // HTML 3.2
218 TE(CONTROL
, BEFORE
, NONE
), // IE 4
219 TE(CONTROL
, BEFORE
, NONE
), // SW
220 // hier koennte man einen Container draus machen (Import fehlt)
221 TE(CONTROL
, BEFORE
, NONE
) // Netscape 4
224 // sonstige Zeichen-Objekte
225 TE(GRFFRM
, BEFORE
, NONE
), // HTML 3.2
226 TE(GRFFRM
, BEFORE
, NONE
), // IE 4
227 TE(GRFFRM
, BEFORE
, NONE
), // SW
228 TE(GRFFRM
, BEFORE
, NONE
) // Netscape 4
232 BYTE aHTMLOutFrmParaPrtAreaTable
[MAX_FRMTYPES
][MAX_BROWSERS
] =
235 // Textrahmen mit Tabelle
236 TE(TBLNODE
, INSIDE
, NONE
), // HTML 3.2
237 TE(TBLNODE
, INSIDE
, NONE
), // IE 4
238 TE(TBLNODE
, INSIDE
, NONE
), // SW
239 TE(TBLNODE
, INSIDE
, NONE
) // Netscape 4
242 // Textrahmen mit Tabelle und Ueberschrift
243 TE(TBLNODE
, INSIDE
, NONE
), // HTML 3.2
244 TE(SPAN
, INSIDE
, NONE
), // IE 4
245 TE(SPAN
, INSIDE
, NONE
), // SW
246 TE(SPAN
, INSIDE
, NONE
) // Netscape 4
250 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
251 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
252 TE(MULTICOL
,INSIDE
, NONE
), // SW
253 TE(MULTICOL
,INSIDE
, SPAN
) // Netscape 4
256 // leerer Textreahmen
257 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
258 TE(SPAN
, INSIDE
, NONE
), // IE 4
259 TE(SPACER
, INSIDE
, NONE
), // SW
260 TE(SPACER
, INSIDE
, NONE
) // Netscape 4
263 // sonstiger Textreahmen
264 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
265 TE(SPAN
, INSIDE
, NONE
), // IE 4
266 TE(SPAN
, INSIDE
, NONE
), // SW
267 TE(SPAN
, INSIDE
, NONE
) // Netscape 4
271 TE(GRFNODE
, INSIDE
, NONE
), // HTML 3.2
272 TE(GRFNODE
, INSIDE
, NONE
), // IE 4
273 TE(GRFNODE
, INSIDE
, NONE
), // SW
274 TE(GRFNODE
, INSIDE
, NONE
) // Netscape 4
278 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
279 TE(OLENODE
, INSIDE
, NONE
), // IE 4
280 TE(OLENODE
, INSIDE
, NONE
), // SW
281 TE(OLENODE
, INSIDE
, NONE
) // Netscape 4
285 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
286 TE(OLENODE
, INSIDE
, NONE
), // IE 4
287 TE(OLENODE
, INSIDE
, NONE
), // SW
288 TE(OLENODE
, INSIDE
, NONE
) // Netscape 4
292 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
293 TE(OLENODE
, INSIDE
, NONE
), // IE 4
294 TE(OLENODE
, INSIDE
, NONE
), // SW
295 TE(OLEGRF
, INSIDE
, NONE
) // Netscape 4
298 // sonstige OLE-Objekte
299 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
300 TE(OLEGRF
, INSIDE
, NONE
), // IE 4
301 TE(OLEGRF
, INSIDE
, NONE
), // SW
302 TE(OLEGRF
, INSIDE
, NONE
) // Netscape 4
306 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
307 TE(AMARQUEE
,INSIDE
, NONE
), // IE 4
308 TE(AMARQUEE
,INSIDE
, NONE
), // SW
309 TE(GRFFRM
, INSIDE
, NONE
) // Netscape 4
313 TE(CONTROL
, INSIDE
, NONE
), // HTML 3.2
314 TE(CONTROL
, INSIDE
, NONE
), // IE 4
315 TE(CONTROL
, INSIDE
, NONE
), // SW
316 // hier koennte man einen Container draus machen (Import fehlt)
317 TE(CONTROL
, INSIDE
, NONE
) // Netscape 4
320 // sonstige Zeichen-Objekte
321 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
322 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
323 TE(GRFFRM
, INSIDE
, NONE
), // SW
324 TE(GRFFRM
, INSIDE
, NONE
) // Netscape 4
328 BYTE aHTMLOutFrmParaOtherTable
[MAX_FRMTYPES
][MAX_BROWSERS
] =
331 // Textrahmen mit Tabelle
332 TE(TBLNODE
, BEFORE
, NONE
), // HTML 3.2
333 TE(SPAN
, INSIDE
, NONE
), // IE 4
334 TE(SPAN
, INSIDE
, NONE
), // SW
335 TE(SPAN
, INSIDE
, NONE
) // Netscape 4
338 // Textrahmen mit Tabelle und Ueberschrift
339 TE(TBLNODE
, BEFORE
, NONE
), // HTML 3.2
340 TE(SPAN
, INSIDE
, NONE
), // IE 4
341 TE(SPAN
, INSIDE
, NONE
), // SW
342 TE(SPAN
, INSIDE
, NONE
) // Netscape 4
346 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
347 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
348 TE(MULTICOL
,INSIDE
, NONE
), // SW
349 TE(MULTICOL
,INSIDE
, SPAN
) // Netscape 4
352 // leerer Textreahmen
353 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
354 TE(SPAN
, INSIDE
, NONE
), // IE 4
355 TE(SPAN
, INSIDE
, NONE
), // SW
356 TE(SPAN
, INSIDE
, NONE
) // Netscape 4
359 // sonstiger Textreahmen
360 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
361 TE(SPAN
, INSIDE
, NONE
), // IE 4
362 TE(SPAN
, INSIDE
, NONE
), // SW
363 TE(SPAN
, INSIDE
, NONE
) // Netscape 4
367 TE(GRFNODE
, INSIDE
, NONE
), // HTML 3.2
368 TE(GRFNODE
, INSIDE
, NONE
), // IE 4
369 TE(GRFNODE
, INSIDE
, NONE
), // SW
370 TE(GRFNODE
, INSIDE
, SPAN
) // Netscape 4
374 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
375 TE(OLENODE
, INSIDE
, NONE
), // IE 4
376 TE(OLENODE
, INSIDE
, NONE
), // SW
377 TE(OLENODE
, INSIDE
, SPAN
) // Netscape 4
381 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
382 TE(OLENODE
, INSIDE
, NONE
), // IE 4
383 TE(OLENODE
, INSIDE
, NONE
), // SW
384 TE(OLENODE
, INSIDE
, SPAN
) // Netscape 4
388 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
389 TE(OLENODE
, INSIDE
, NONE
), // IE 4
390 TE(OLENODE
, INSIDE
, NONE
), // SW
391 TE(OLEGRF
, INSIDE
, SPAN
) // Netscape 4
394 // sonstige OLE-Objekte
395 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
396 TE(OLEGRF
, INSIDE
, NONE
), // IE 4
397 TE(OLEGRF
, INSIDE
, NONE
), // SW
398 TE(OLEGRF
, INSIDE
, SPAN
) // Netscape 4
402 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
403 TE(AMARQUEE
,INSIDE
, NONE
), // IE 4
404 TE(AMARQUEE
,INSIDE
, NONE
), // SW
405 TE(GRFFRM
, INSIDE
, SPAN
) // Netscape 4
409 TE(CONTROL
, INSIDE
, NONE
), // HTML 3.2
410 TE(CONTROL
, INSIDE
, NONE
), // IE 4
411 TE(CONTROL
, INSIDE
, NONE
), // SW
412 // Netscape schaltet FORM bei Controls in abs.-pos. SPAN aus.
413 TE(CONTROL
, INSIDE
, NONE
) // Netscape 4
416 // sonstige Zeichen-Objekte
417 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
418 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
419 TE(GRFFRM
, INSIDE
, NONE
), // SW
420 TE(GRFFRM
, INSIDE
, SPAN
) // Netscape 4
424 BYTE aHTMLOutFrmAsCharTable
[MAX_FRMTYPES
][MAX_BROWSERS
] =
427 // Textrahmen mit Tabelle
428 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
429 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
430 TE(GRFFRM
, INSIDE
, NONE
), // SW
431 TE(GRFFRM
, INSIDE
, NONE
) // Netscape 4
434 // Textrahmen mit Tabelle und Ueberschrift
435 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
436 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
437 TE(GRFFRM
, INSIDE
, NONE
), // SW
438 TE(GRFFRM
, INSIDE
, NONE
) // Netscape 4
442 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
443 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
444 TE(MULTICOL
,INSIDE
, NONE
), // SW
445 TE(MULTICOL
,INSIDE
, NONE
) // Netscape 4
448 // leerer Textreahmen
449 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
450 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
451 TE(SPACER
, INSIDE
, NONE
), // SW
452 TE(SPACER
, INSIDE
, NONE
) // Netscape 4
455 // sonstiger Textreahmen
456 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
457 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
458 TE(GRFFRM
, INSIDE
, NONE
), // SW
459 TE(GRFFRM
, INSIDE
, NONE
) // Netscape 4
463 TE(GRFNODE
, INSIDE
, NONE
), // HTML 3.2
464 TE(GRFNODE
, INSIDE
, NONE
), // IE 4
465 TE(GRFNODE
, INSIDE
, NONE
), // SW
466 TE(GRFNODE
, INSIDE
, NONE
) // Netscape 4
470 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
471 TE(OLENODE
, INSIDE
, NONE
), // IE 4
472 TE(OLENODE
, INSIDE
, NONE
), // SW
473 TE(OLENODE
, INSIDE
, NONE
) // Netscape 4
477 TE(OLENODE
, INSIDE
, NONE
), // HTML 3.2
478 TE(OLENODE
, INSIDE
, NONE
), // IE 4
479 TE(OLENODE
, INSIDE
, NONE
), // SW
480 TE(OLENODE
, INSIDE
, NONE
) // Netscape 4
484 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
485 TE(OLENODE
, INSIDE
, NONE
), // IE 4
486 TE(OLENODE
, INSIDE
, NONE
), // SW
487 TE(OLEGRF
, INSIDE
, NONE
) // Netscape 4
490 // sonstige OLE-Objekte
491 TE(OLEGRF
, INSIDE
, NONE
), // HTML 3.2
492 TE(OLEGRF
, INSIDE
, NONE
), // IE 4
493 TE(OLEGRF
, INSIDE
, NONE
), // SW
494 TE(OLEGRF
, INSIDE
, NONE
) // Netscape 4
497 // Laufschrift (kann immer als MARQUEE exportiert werden, weil
498 // der Inhalt an der richtigen Stelle erscheint
499 TE(MARQUEE
, INSIDE
, NONE
), // HTML 3.2
500 TE(MARQUEE
, INSIDE
, NONE
), // IE 4
501 TE(MARQUEE
, INSIDE
, NONE
), // SW
502 TE(MARQUEE
, INSIDE
, NONE
) // Netscape 4
506 TE(CONTROL
, INSIDE
, NONE
), // HTML 3.2
507 TE(CONTROL
, INSIDE
, NONE
), // IE 4
508 TE(CONTROL
, INSIDE
, NONE
), // SW
509 TE(CONTROL
, INSIDE
, NONE
) // Netscape 4
512 // sonstige Zeichen-Objekte
513 TE(GRFFRM
, INSIDE
, NONE
), // HTML 3.2
514 TE(GRFFRM
, INSIDE
, NONE
), // IE 4
515 TE(GRFFRM
, INSIDE
, NONE
), // SW
516 TE(GRFFRM
, INSIDE
, NONE
) // Netscape 4