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
86};
87
88AllHtmlFlags getHTMLOutFramePageFlyTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode);
89AllHtmlFlags getHTMLOutFrameParaFrameTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode);
90AllHtmlFlags getHTMLOutFrameParaPrtAreaTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode);
91AllHtmlFlags getHTMLOutFrameParaOtherTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode);
92AllHtmlFlags getHTMLOutFrameAsCharTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode);
93
95{
96 const SwFrameFormat *m_pFrameFormat; // the frame
97 const SdrObject *m_pSdrObject; // maybe Sdr-Object
99 sal_uInt32 m_nOrdNum; // from SwPosFlyFrame
100 sal_Int32 m_nContentIndex; // its position in content
102
105
106public:
107
108 SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
109 const SdrObject *pSdrObj, AllHtmlFlags nAllFlags );
110
111 bool operator<( const SwHTMLPosFlyFrame& ) const;
112
113 const SwFrameFormat& GetFormat() const { return *m_pFrameFormat; }
114 const SdrObject* GetSdrObject() const { return m_pSdrObject; }
115 const SwNodeIndex& GetNdIndex() const { return m_aNodeIndex; }
116 sal_Int32 GetContentIndex() const { return m_nContentIndex; }
117 AllHtmlFlags const & GetOutMode() const { return m_nAllFlags; }
118 HtmlOut GetOutFn() const { return m_nAllFlags.nOut; }
120};
121
123 : public o3tl::sorted_vector<std::unique_ptr<SwHTMLPosFlyFrame>,
124 o3tl::less_uniqueptr_to<SwHTMLPosFlyFrame>,
125 o3tl::find_partialorder_ptrequals>
126{};
127
128/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Style of a layout element.
Definition: frmfmt.hxx:72
HtmlOut GetOutFn() const
Definition: htmlfly.hxx:118
const SwNodeIndex & GetNdIndex() const
Definition: htmlfly.hxx:115
const SdrObject * GetSdrObject() const
Definition: htmlfly.hxx:114
sal_uInt32 m_nOrdNum
Definition: htmlfly.hxx:99
AllHtmlFlags m_nAllFlags
Definition: htmlfly.hxx:101
const SdrObject * m_pSdrObject
Definition: htmlfly.hxx:97
const SwFrameFormat * m_pFrameFormat
Definition: htmlfly.hxx:96
SwNodeIndex m_aNodeIndex
Definition: htmlfly.hxx:98
bool operator<(const SwHTMLPosFlyFrame &) const
Definition: htmlfly.cxx:66
const SwFrameFormat & GetFormat() const
Definition: htmlfly.hxx:113
SwHTMLPosFlyFrame(const SwHTMLPosFlyFrame &)=delete
sal_Int32 GetContentIndex() const
Definition: htmlfly.hxx:116
AllHtmlFlags const & GetOutMode() const
Definition: htmlfly.hxx:117
SwHTMLPosFlyFrame & operator=(const SwHTMLPosFlyFrame &)=delete
HtmlPosition GetOutPos() const
Definition: htmlfly.hxx:119
sal_Int32 m_nContentIndex
Definition: htmlfly.hxx:100
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
AllHtmlFlags getHTMLOutFrameParaPrtAreaTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:294
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
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
HtmlPosition
Definition: htmlfly.hxx:66
HtmlOut
Definition: htmlfly.hxx:51
@ GraphicFrame
AllHtmlFlags getHTMLOutFrameParaFrameTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
Definition: htmlflyt.cxx:202
NONE
HtmlOut nOut
Definition: htmlfly.hxx:83
HtmlContainerFlags nContainer
Definition: htmlfly.hxx:85
HtmlPosition nPosition
Definition: htmlfly.hxx:84