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: htmlfly.hxx,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 ************************************************************************/
34 #include <tools/solar.h>
35 #include <tools/string.hxx>
38 #include <svtools/svarray.hxx>
46 // ACHTUNG: Die Werte dieses Enumgs gehen direkt in die
51 HTML_FRMTYPE_TABLE_CAP
,
52 HTML_FRMTYPE_MULTICOL
,
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
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 )