LibreOffice Module sw (master) 1
xmltexte.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#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
21#define INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
22
23#include <xmloff/txtparae.hxx>
24#include <tools/globname.hxx>
25
26#include <optional>
27#include <unordered_map>
28
29#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
30
31class SwXMLExport;
33class SwNoTextNode;
34class SwTableNode;
35class SwTableLines;
36namespace com::sun::star::style { class XStyle; }
37
39{
43
44 // Collected autostyles for use in exportTextAutoStyles
45 std::vector<const SwTableNode*> maTableNodes;
46public:
47 typedef ::std::unordered_map<SwFrameFormat const*, ::std::optional<OUString>> FormatMap;
48private:
49 ::std::unordered_map<SwTableNode const*, ::std::pair<FormatMap, FormatMap>> m_TableFormats;
50
52 const css::uno::Reference < css::beans::XPropertySet >& rPropSet );
53
54 void CollectTableLinesAutoStyles(const SwTableLines& rLines, SwFrameFormat& rFormat,
55 bool bProgress);
56
57protected:
59 const css::uno::Reference< css::beans::XPropertySet > & rPropSet ) override;
60 virtual void _exportTextEmbedded(
61 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
62 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo ) override;
63
64 virtual void exportTable(
65 const css::uno::Reference< css::text::XTextContent > & rTextContent,
66 bool bAutoStyles, bool bProgress ) override;
67
68 virtual void exportTableAutoStyles() override;
69
70public:
72 SwXMLExport& rExp,
73 SvXMLAutoStylePoolP& rAutoStylePool );
74 virtual ~SwXMLTextParagraphExport() override;
75
76 ::std::unordered_map<SwTableNode const*, ::std::pair<FormatMap, FormatMap>> const&
77 GetTableFormats() const { return m_TableFormats; }
78 ::std::unordered_map<SwTableNode const*, ::std::pair<FormatMap, FormatMap>> &
80};
81
82#endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Style of a layout element.
Definition: frmfmt.hxx:72
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
Definition: ndnotxt.hxx:30
SwXMLTextParagraphExport(SwXMLExport &rExp, SvXMLAutoStylePoolP &rAutoStylePool)
Definition: xmltexte.cxx:81
const SvGlobalName m_aIFrameClassId
Definition: xmltexte.hxx:42
virtual void _exportTextEmbedded(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo) override
Definition: xmltexte.cxx:213
void CollectTableLinesAutoStyles(const SwTableLines &rLines, SwFrameFormat &rFormat, bool bProgress)
Definition: xmltble.cxx:1194
static SwNoTextNode * GetNoTextNode(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
Definition: xmltexte.cxx:68
::std::unordered_map< SwTableNode const *, ::std::pair< FormatMap, FormatMap > > m_TableFormats
Definition: xmltexte.hxx:49
virtual ~SwXMLTextParagraphExport() override
Definition: xmltexte.cxx:91
virtual void _collectTextEmbeddedAutoStyles(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
Definition: xmltexte.cxx:184
const SvGlobalName m_aPluginClassId
Definition: xmltexte.hxx:41
::std::unordered_map< SwTableNode const *, ::std::pair< FormatMap, FormatMap > > & GetTableFormats()
Definition: xmltexte.hxx:79
::std::unordered_map< SwTableNode const *, ::std::pair< FormatMap, FormatMap > > const & GetTableFormats() const
Definition: xmltexte.hxx:77
::std::unordered_map< SwFrameFormat const *, ::std::optional< OUString > > FormatMap
Definition: xmltexte.hxx:47
std::vector< const SwTableNode * > maTableNodes
Definition: xmltexte.hxx:45
virtual void exportTable(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, bool bProgress) override
Definition: xmltble.cxx:1218
virtual void exportTableAutoStyles() override
Definition: xmltble.cxx:1186
const SvGlobalName m_aAppletClassId
Definition: xmltexte.hxx:40