LibreOffice Module sw (master) 1
htmlfly.hxx
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#pragma once
21
24#include <sal/types.h>
25#include <ndindex.hxx>
26#include <memory>
27
28class SdrObject;
29class SwFrameFormat;
30class SwPosFlyFrame;
31
32// ATTENTION: The values of this enum are used directly in the output table!!!
34{
49};
50
51enum class HtmlOut {
54 OleNode,
55 Div,
57 Spacer,
58 Control,
60 Marquee,
63 Span
64};
65
66enum class HtmlPosition {
67 Prefix,
68 Before,
69 Inside,
70 Any
71};
72
74 NONE = 0x00,
75 Span = 0x01,
76 Div = 0x02,
77};
78namespace o3tl {
79 template<> struct typed_flags<HtmlContainerFlags> : is_typed_flags<HtmlContainerFlags, 0x03> {};
80}
81
82const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END;
83const sal_uInt16 MAX_BROWSERS = 4;
84
89};
95
97{
98 const SwFrameFormat *m_pFrameFormat; // the frame
99 const SdrObject *m_pSdrObject; // maybe Sdr-Object
101 sal_uInt32 m_nOrdNum; // from SwPosFlyFrame
102 sal_Int32 m_nContentIndex; // its position in content
104
107
108public:
109
110 SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
111 const SdrObject *pSdrObj, AllHtmlFlags nAllFlags );
112
113 bool operator<( const SwHTMLPosFlyFrame& ) const;
114
115 const SwFrameFormat& GetFormat() const { return *m_pFrameFormat; }
116 const SdrObject* GetSdrObject() const { return m_pSdrObject; }
117 const SwNodeIndex& GetNdIndex() const { return m_aNodeIndex; }
118 sal_Int32 GetContentIndex() const { return m_nContentIndex; }
119 AllHtmlFlags const & GetOutMode() const { return m_nAllFlags; }
120 HtmlOut GetOutFn() const { return m_nAllFlags.nOut; }
122};
123
125 : public o3tl::sorted_vector<std::unique_ptr<SwHTMLPosFlyFrame>,
126 o3tl::less_uniqueptr_to<SwHTMLPosFlyFrame>,
127 o3tl::find_partialorder_ptrequals>
128{};
129
130/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Style of a layout element.
Definition: frmfmt.hxx:62
HtmlOut GetOutFn() const
Definition: htmlfly.hxx:120
const SwNodeIndex & GetNdIndex() const
Definition: htmlfly.hxx:117
const SdrObject * GetSdrObject() const
Definition: htmlfly.hxx:116
sal_uInt32 m_nOrdNum
Definition: htmlfly.hxx:101
AllHtmlFlags m_nAllFlags
Definition: htmlfly.hxx:103
const SdrObject * m_pSdrObject
Definition: htmlfly.hxx:99
const SwFrameFormat * m_pFrameFormat
Definition: htmlfly.hxx:98
SwNodeIndex m_aNodeIndex
Definition: htmlfly.hxx:100
bool operator<(const SwHTMLPosFlyFrame &) const
Definition: htmlfly.cxx:66
const SwFrameFormat & GetFormat() const
Definition: htmlfly.hxx:115
SwHTMLPosFlyFrame(const SwHTMLPosFlyFrame &)=delete
sal_Int32 GetContentIndex() const
Definition: htmlfly.hxx:118
AllHtmlFlags const & GetOutMode() const
Definition: htmlfly.hxx:119
SwHTMLPosFlyFrame & operator=(const SwHTMLPosFlyFrame &)=delete
HtmlPosition GetOutPos() const
Definition: htmlfly.hxx:121
sal_Int32 m_nContentIndex
Definition: htmlfly.hxx:102
Marks a node in the document model.
Definition: ndindex.hxx:31
For querying current flys in document.
Definition: flypos.hxx:31
HtmlContainerFlags
Definition: htmlfly.hxx:73
SwHTMLFrameType
Definition: htmlfly.hxx:34
@ HTML_FRMTYPE_END
Definition: htmlfly.hxx:48
@ HTML_FRMTYPE_GRF
Definition: htmlfly.hxx:40
@ HTML_FRMTYPE_PLUGIN
Definition: htmlfly.hxx:41
@ HTML_FRMTYPE_APPLET
Definition: htmlfly.hxx:42
@ HTML_FRMTYPE_MARQUEE
Definition: htmlfly.hxx:45
@ HTML_FRMTYPE_MULTICOL
Definition: htmlfly.hxx:37
@ HTML_FRMTYPE_EMPTY
Definition: htmlfly.hxx:38
@ HTML_FRMTYPE_CONTROL
Definition: htmlfly.hxx:46
@ HTML_FRMTYPE_DRAW
Definition: htmlfly.hxx:47
@ HTML_FRMTYPE_TABLE
Definition: htmlfly.hxx:35
@ HTML_FRMTYPE_IFRAME
Definition: htmlfly.hxx:43
@ HTML_FRMTYPE_TEXT
Definition: htmlfly.hxx:39
@ HTML_FRMTYPE_TABLE_CAP
Definition: htmlfly.hxx:36
@ HTML_FRMTYPE_OLE
Definition: htmlfly.hxx:44
const sal_uInt16 MAX_BROWSERS
Definition: htmlfly.hxx:83
AllHtmlFlags const aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS]
Definition: htmlflyt.cxx:24
AllHtmlFlags const aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS]
Definition: htmlflyt.cxx:120
HtmlPosition
Definition: htmlfly.hxx:66
HtmlOut
Definition: htmlfly.hxx:51
@ GraphicFrame
AllHtmlFlags const aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS]
Definition: htmlflyt.cxx:409
AllHtmlFlags const aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS]
Definition: htmlflyt.cxx:313
const sal_uInt16 MAX_FRMTYPES
Definition: htmlfly.hxx:82
AllHtmlFlags const aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS]
Definition: htmlflyt.cxx:217
NONE
HtmlOut nOut
Definition: htmlfly.hxx:86
HtmlContainerFlags nContainer
Definition: htmlfly.hxx:88
HtmlPosition nPosition
Definition: htmlfly.hxx:87