LibreOffice Module sw (master) 1
htmlflyt.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include "htmlfly.hxx"
21#include <svtools/htmlcfg.hxx>
22
23constexpr sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END;
24constexpr sal_uInt16 MAX_BROWSERS = HTML_CFG_MAX + 1;
25
27{
28 {
29 // text frame with table
33 },
34 {
35 // text frame with table and headline
39 },
40 {
41 // column frame
45 },
46 {
47 // empty text frame
51 },
52 {
53 // other text frame
57 },
58 {
59 // graphic node
63 },
64 {
65 // plug-in
69 },
70 {
71 // applet
75 },
76 {
77 // floating frame
81 },
82 {
83 // other OLE objects
87 },
88 {
89 // marquee
93 },
94 {
95 // controls
98 // Netscape disables FROM at controls in absolute position span.
100 },
101 {
102 // other character objects
106 }
107};
108
110{
111 static_assert(std::size(aHTMLOutFramePageFlyTable) == MAX_FRMTYPES);
112 assert(eFrameType < HTML_FRMTYPE_END);
113 assert(nExportMode <= HTML_CFG_MAX);
114
115 return aHTMLOutFramePageFlyTable[eFrameType][nExportMode];
116}
117
119{
120 {
121 // text frame with table
125 },
126 {
127 // text frame with table and headline
131 },
132 {
133 // column frame
137 },
138 {
139 // empty text frame
143 },
144 {
145 // other text frame
149 },
150 {
151 // graphic node
155 },
156 {
157 // plug-in
161 },
162 {
163 // applet
167 },
168 {
169 // floating frame
173 },
174 {
175 // other OLE objects
179 },
180 {
181 // marquee (for Netscape 4 in container, so that
182 // the marquee appears at the right spot)
186 },
187 {
188 // controls
191 // here you could make container out if it (import is missing)
193 },
194 {
195 // other character objects
199 }
200};
201
203{
204 static_assert(std::size(aHTMLOutFrameParaFrameTable) == MAX_FRMTYPES);
205 assert(eFrameType < HTML_FRMTYPE_END);
206 assert(nExportMode <= HTML_CFG_MAX);
207
208 return aHTMLOutFrameParaFrameTable[eFrameType][nExportMode];
209}
210
212{
213 {
214 // text frame with table
218 },
219 {
220 // text frame with table and headline
224 },
225 {
226 // column frame
230 },
231 {
232 // empty text frame
236 },
237 {
238 // other text frame
242 },
243 {
244 // graphic node
248 },
249 {
250 // plug-in
254 },
255 {
256 // applet
260 },
261 {
262 // floating frame
266 },
267 {
268 // other OLE objects
272 },
273 {
274 // marquee
278 },
279 {
280 // controls
283 // here you could make container out if it (import is missing)
285 },
286 {
287 // other character objects
291 }
292};
293
295{
296 static_assert(std::size(aHTMLOutFrameParaPrtAreaTable) == MAX_FRMTYPES);
297 assert(eFrameType < HTML_FRMTYPE_END);
298 assert(nExportMode <= HTML_CFG_MAX);
299
300 return aHTMLOutFrameParaPrtAreaTable[eFrameType][nExportMode];
301}
302
304{
305 {
306 // text frame with table
310 },
311 {
312 // text frame with table and headline
316 },
317 {
318 // column frame
322 },
323 {
324 // empty text frame
328 },
329 {
330 // other text frame
334 },
335 {
336 // graphic node
340 },
341 {
342 // plug-in
346 },
347 {
348 // applet
352 },
353 {
354 // floating frame
358 },
359 {
360 // other OLE objects
364 },
365 {
366 // marquee
370 },
371 {
372 // controls
375 // Netscape disables FROM at controls in absolute position span.
377 },
378 {
379 // other character objects
383 }
384};
385
387{
388 static_assert(std::size(aHTMLOutFrameParaOtherTable) == MAX_FRMTYPES);
389 assert(eFrameType < HTML_FRMTYPE_END);
390 assert(nExportMode <= HTML_CFG_MAX);
391
392 return aHTMLOutFrameParaOtherTable[eFrameType][nExportMode];
393}
394
396{
397 {
398 // text frame with table
402 },
403 {
404 // text frame with table and headline
408 },
409 {
410 // column frame
414 },
415 {
416 // empty text frame
420 },
421 {
422 // other text frame
426 },
427 {
428 // graphic node
432 },
433 {
434 // plug-in
438 },
439 {
440 // applet
444 },
445 {
446 // floating frame
450 },
451 {
452 // other OLE objects
456 },
457 {
458 // marquee (can always exported as marquee, because
459 // the content shows up at the right spot
463 },
464 {
465 // controls
469 },
470 {
471 // other character objects
475 }
476};
477
478AllHtmlFlags getHTMLOutFrameAsCharTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
479{
480 static_assert(std::size(aHTMLOutFrameAsCharTable) == MAX_FRMTYPES);
481 assert(eFrameType < HTML_FRMTYPE_END);
482 assert(nExportMode <= HTML_CFG_MAX);
483
484 return aHTMLOutFrameAsCharTable[eFrameType][nExportMode];
485}
486
487/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define HTML_CFG_MAX
SwHTMLFrameType
Definition: htmlfly.hxx:34
@ HTML_FRMTYPE_END
Definition: htmlfly.hxx:48
@ GraphicFrame
constexpr AllHtmlFlags aHTMLOutFrameParaFrameTable[][MAX_BROWSERS]
Definition: htmlflyt.cxx:118
constexpr AllHtmlFlags aHTMLOutFramePageFlyTable[][MAX_BROWSERS]
Definition: htmlflyt.cxx:26
constexpr sal_uInt16 MAX_BROWSERS
Definition: htmlflyt.cxx:24
AllHtmlFlags getHTMLOutFrameParaPrtAreaTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:294
constexpr AllHtmlFlags aHTMLOutFrameAsCharTable[][MAX_BROWSERS]
Definition: htmlflyt.cxx:395
AllHtmlFlags getHTMLOutFramePageFlyTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:109
AllHtmlFlags getHTMLOutFrameAsCharTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:478
AllHtmlFlags getHTMLOutFrameParaOtherTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:386
constexpr sal_uInt16 MAX_FRMTYPES
Definition: htmlflyt.cxx:23
constexpr AllHtmlFlags aHTMLOutFrameParaOtherTable[][MAX_BROWSERS]
Definition: htmlflyt.cxx:303
AllHtmlFlags getHTMLOutFrameParaFrameTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:202
constexpr AllHtmlFlags aHTMLOutFrameParaPrtAreaTable[][MAX_BROWSERS]
Definition: htmlflyt.cxx:211