diff options
Diffstat (limited to 'sw/source/filter/html/htmlfly.hxx')
-rw-r--r-- | sw/source/filter/html/htmlfly.hxx | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx index ce1a43a3a40d..4038ac2a2dcf 100644 --- a/sw/source/filter/html/htmlfly.hxx +++ b/sw/source/filter/html/htmlfly.hxx @@ -17,16 +17,16 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX -#define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX +#pragma once #include <o3tl/sorted_vector.hxx> #include <o3tl/typed_flags_set.hxx> #include <sal/types.h> +#include <ndindex.hxx> +#include <memory> class SdrObject; class SwFrameFormat; -class SwNodeIndex; class SwPosFlyFrame; // ATTENTION: The values of this enum are used directly in the output table!!! @@ -79,28 +79,26 @@ namespace o3tl { template<> struct typed_flags<HtmlContainerFlags> : is_typed_flags<HtmlContainerFlags, 0x03> {}; } -const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END; -const sal_uInt16 MAX_BROWSERS = 4; - struct AllHtmlFlags { HtmlOut nOut; HtmlPosition nPosition; HtmlContainerFlags nContainer; }; -extern AllHtmlFlags const aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern AllHtmlFlags const aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern AllHtmlFlags const aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern AllHtmlFlags const aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS]; -extern AllHtmlFlags const aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS]; + +AllHtmlFlags getHTMLOutFramePageFlyTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode); +AllHtmlFlags getHTMLOutFrameParaFrameTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode); +AllHtmlFlags getHTMLOutFrameParaPrtAreaTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode); +AllHtmlFlags getHTMLOutFrameParaOtherTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode); +AllHtmlFlags getHTMLOutFrameAsCharTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode); class SwHTMLPosFlyFrame { - const SwFrameFormat *pFrameFormat; // the frame - const SdrObject *pSdrObject; // maybe Sdr-Object - SwNodeIndex *pNdIdx; // Node-Index - sal_uInt32 nOrdNum; // from SwPosFlyFrame - sal_Int32 nContentIdx; // its position in content - AllHtmlFlags nAllFlags; + const SwFrameFormat *m_pFrameFormat; // the frame + const SdrObject *m_pSdrObject; // maybe Sdr-Object + SwNodeIndex m_aNodeIndex; // Node-Index + sal_uInt32 m_nOrdNum; // from SwPosFlyFrame + sal_Int32 m_nContentIndex; // its position in content + AllHtmlFlags m_nAllFlags; SwHTMLPosFlyFrame(const SwHTMLPosFlyFrame&) = delete; SwHTMLPosFlyFrame& operator=(const SwHTMLPosFlyFrame&) = delete; @@ -112,21 +110,19 @@ public: bool operator<( const SwHTMLPosFlyFrame& ) const; - const SwFrameFormat& GetFormat() const { return *pFrameFormat; } - const SdrObject* GetSdrObject() const { return pSdrObject; } - const SwNodeIndex& GetNdIndex() const { return *pNdIdx; } - sal_Int32 GetContentIndex() const { return nContentIdx; } - AllHtmlFlags const & GetOutMode() const { return nAllFlags; } - HtmlOut GetOutFn() const { return nAllFlags.nOut; } - HtmlPosition GetOutPos() const { return nAllFlags.nPosition; } + const SwFrameFormat& GetFormat() const { return *m_pFrameFormat; } + const SdrObject* GetSdrObject() const { return m_pSdrObject; } + const SwNodeIndex& GetNdIndex() const { return m_aNodeIndex; } + sal_Int32 GetContentIndex() const { return m_nContentIndex; } + AllHtmlFlags const & GetOutMode() const { return m_nAllFlags; } + HtmlOut GetOutFn() const { return m_nAllFlags.nOut; } + HtmlPosition GetOutPos() const { return m_nAllFlags.nPosition; } }; class SwHTMLPosFlyFrames : public o3tl::sorted_vector<std::unique_ptr<SwHTMLPosFlyFrame>, - o3tl::less_uniqueptr_to<SwHTMLPosFlyFrame>, + o3tl::less_ptr_to, o3tl::find_partialorder_ptrequals> {}; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |