1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX
23 #include <tools/solar.h>
24 #include <o3tl/sorted_vector.hxx>
31 // ACHTUNG: Die Werte dieses Enumgs gehen direkt in die
36 HTML_FRMTYPE_TABLE_CAP
,
37 HTML_FRMTYPE_MULTICOL
,
51 #define HTML_OUT_TBLNODE 0x00
52 #define HTML_OUT_GRFNODE 0x01
53 #define HTML_OUT_OLENODE 0x02
54 #define HTML_OUT_DIV 0x03
55 #define HTML_OUT_MULTICOL 0x04
56 #define HTML_OUT_SPACER 0x05
57 #define HTML_OUT_CONTROL 0x06
58 #define HTML_OUT_AMARQUEE 0x07
59 #define HTML_OUT_MARQUEE 0x08
60 #define HTML_OUT_GRFFRM 0x09
61 #define HTML_OUT_OLEGRF 0x0a
62 #define HTML_OUT_SPAN 0x0b
63 #define HTML_OUT_MASK 0x0f
65 #define HTML_POS_PREFIX 0x00
66 #define HTML_POS_BEFORE 0x10
67 #define HTML_POS_INSIDE 0x20
68 #define HTML_POS_ANY 0x30
69 #define HTML_POS_MASK 0x30
71 #define HTML_CNTNR_NONE 0x00
72 #define HTML_CNTNR_SPAN 0x40
73 #define HTML_CNTNR_DIV 0x80
74 #define HTML_CNTNR_MASK 0xc0
76 const sal_uInt16 MAX_FRMTYPES
= HTML_FRMTYPE_END
;
77 const sal_uInt16 MAX_BROWSERS
= 4;
79 extern sal_uInt8 aHTMLOutFramePageFlyTable
[MAX_FRMTYPES
][MAX_BROWSERS
];
80 extern sal_uInt8 aHTMLOutFrameParaFrameTable
[MAX_FRMTYPES
][MAX_BROWSERS
];
81 extern sal_uInt8 aHTMLOutFrameParaPrtAreaTable
[MAX_FRMTYPES
][MAX_BROWSERS
];
82 extern sal_uInt8 aHTMLOutFrameParaOtherTable
[MAX_FRMTYPES
][MAX_BROWSERS
];
83 extern sal_uInt8 aHTMLOutFrameAsCharTable
[MAX_FRMTYPES
][MAX_BROWSERS
];
85 class SwHTMLPosFlyFrame
87 const SwFrameFormat
*pFrameFormat
; // der Rahmen
88 const SdrObject
*pSdrObject
; // ggf. Sdr-Objekt
89 SwNodeIndex
*pNdIdx
; // Node-Index
90 sal_uInt32 nOrdNum
; // Aus SwPosFlyFrame
91 sal_Int32 nContentIdx
; // seine Position im Content
92 sal_uInt8 nOutputMode
; // Ausgabe-Infos
94 SwHTMLPosFlyFrame(const SwHTMLPosFlyFrame
&) = delete;
95 SwHTMLPosFlyFrame
& operator=(const SwHTMLPosFlyFrame
&) = delete;
99 SwHTMLPosFlyFrame( const SwPosFlyFrame
& rPosFly
,
100 const SdrObject
*pSdrObj
, sal_uInt8 nOutMode
);
102 bool operator<( const SwHTMLPosFlyFrame
& ) const;
104 const SwFrameFormat
& GetFormat() const { return *pFrameFormat
; }
105 const SdrObject
*GetSdrObject() const { return pSdrObject
; }
107 const SwNodeIndex
& GetNdIndex() const { return *pNdIdx
; }
109 sal_Int32
GetContentIndex() const { return nContentIdx
; }
111 sal_uInt8
GetOutMode() const { return nOutputMode
; }
113 static sal_uInt8
GetOutFn( sal_uInt8 nMode
) { return nMode
& HTML_OUT_MASK
; }
114 static sal_uInt8
GetOutCntnr( sal_uInt8 nMode
) { return nMode
& HTML_CNTNR_MASK
; }
116 sal_uInt8
GetOutFn() const { return nOutputMode
& HTML_OUT_MASK
; }
117 sal_uInt8
GetOutPos() const { return nOutputMode
& HTML_POS_MASK
; }
120 class SwHTMLPosFlyFrames
121 : public o3tl::sorted_vector
<SwHTMLPosFlyFrame
*,
122 o3tl::less_ptr_to
<SwHTMLPosFlyFrame
>,
123 o3tl::find_partialorder_ptrequals
>
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */