Update ooo320-m1
[ooovba.git] / sw / source / filter / html / htmlfly.hxx
blob5d4d86f648731a942ec1044b918e5fd72e7a71f6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: htmlfly.hxx,v $
10 * $Revision: 1.4 $
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 #ifndef _HTMLFLY_HXX
32 #define _HTMLFLY_HXX
34 #include <tools/solar.h>
35 #include <tools/string.hxx>
37 #ifndef _SVARRAY_H
38 #include <svtools/svarray.hxx>
39 #endif
41 class SdrObject;
42 class SwFrmFmt;
43 class SwNodeIndex;
44 class SwPosFlyFrm;
46 // ACHTUNG: Die Werte dieses Enumgs gehen direkt in die
47 // Augabe Tabelle!!!
48 enum SwHTMLFrmType
50 HTML_FRMTYPE_TABLE,
51 HTML_FRMTYPE_TABLE_CAP,
52 HTML_FRMTYPE_MULTICOL,
53 HTML_FRMTYPE_EMPTY,
54 HTML_FRMTYPE_TEXT,
55 HTML_FRMTYPE_GRF,
56 HTML_FRMTYPE_PLUGIN,
57 HTML_FRMTYPE_APPLET,
58 HTML_FRMTYPE_IFRAME,
59 HTML_FRMTYPE_OLE,
60 HTML_FRMTYPE_MARQUEE,
61 HTML_FRMTYPE_CONTROL,
62 HTML_FRMTYPE_DRAW,
63 HTML_FRMTYPE_END
66 #define HTML_OUT_TBLNODE 0x00
67 #define HTML_OUT_GRFNODE 0x01
68 #define HTML_OUT_OLENODE 0x02
69 #define HTML_OUT_DIV 0x03
70 #define HTML_OUT_MULTICOL 0x04
71 #define HTML_OUT_SPACER 0x05
72 #define HTML_OUT_CONTROL 0x06
73 #define HTML_OUT_AMARQUEE 0x07
74 #define HTML_OUT_MARQUEE 0x08
75 #define HTML_OUT_GRFFRM 0x09
76 #define HTML_OUT_OLEGRF 0x0a
77 #define HTML_OUT_SPAN 0x0b
78 #define HTML_OUT_MASK 0x0f
80 #define HTML_POS_PREFIX 0x00
81 #define HTML_POS_BEFORE 0x10
82 #define HTML_POS_INSIDE 0x20
83 #define HTML_POS_ANY 0x30
84 #define HTML_POS_MASK 0x30
86 #define HTML_CNTNR_NONE 0x00
87 #define HTML_CNTNR_SPAN 0x40
88 #define HTML_CNTNR_DIV 0x80
89 #define HTML_CNTNR_MASK 0xc0
92 const USHORT MAX_FRMTYPES = HTML_FRMTYPE_END;
93 const USHORT MAX_BROWSERS = 4;
95 extern BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
96 extern BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
97 extern BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
98 extern BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
99 extern BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
101 class SwHTMLPosFlyFrm
103 const SwFrmFmt *pFrmFmt; // der Rahmen
104 const SdrObject *pSdrObject; // ggf. Sdr-Objekt
105 SwNodeIndex *pNdIdx; // Node-Index
106 UINT32 nOrdNum; // Aus SwPosFlyFrm
107 xub_StrLen nCntntIdx; // seine Position im Content
108 BYTE nOutputMode; // Ausgabe-Infos
110 public:
112 SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
113 const SdrObject *pSdrObj, BYTE nOutMode );
115 BOOL operator==( const SwHTMLPosFlyFrm& ) const { return FALSE; }
116 BOOL operator<( const SwHTMLPosFlyFrm& ) const;
118 const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
119 const SdrObject *GetSdrObject() const { return pSdrObject; }
121 const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
123 xub_StrLen GetCntntIndex() const { return nCntntIdx; }
125 BYTE GetOutMode() const { return nOutputMode; }
127 static BYTE GetOutFn( BYTE nMode ) { return nMode & HTML_OUT_MASK; }
128 static BYTE GetOutPos( BYTE nMode ) { return nMode & HTML_POS_MASK; }
129 static BYTE GetOutCntnr( BYTE nMode ) { return nMode & HTML_CNTNR_MASK; }
131 BYTE GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
132 BYTE GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
133 BYTE GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
136 typedef SwHTMLPosFlyFrm *SwHTMLPosFlyFrmPtr;
137 SV_DECL_PTRARR_SORT( SwHTMLPosFlyFrms, SwHTMLPosFlyFrmPtr, 10, 10 )
140 #endif