1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
23 #include <xmloff/txtparae.hxx>
24 #include <tools/globname.hxx>
27 #include <unordered_map>
29 #define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
32 class SvXMLAutoStylePoolP
;
36 namespace com::sun::star::style
{ class XStyle
; }
38 class SwXMLTextParagraphExport
: public XMLTextParagraphExport
40 const SvGlobalName m_aAppletClassId
;
41 const SvGlobalName m_aPluginClassId
;
42 const SvGlobalName m_aIFrameClassId
;
44 // Collected autostyles for use in exportTextAutoStyles
45 std::vector
<const SwTableNode
*> maTableNodes
;
47 typedef ::std::unordered_map
<SwFrameFormat
const*, ::std::optional
<OUString
>> FormatMap
;
49 ::std::unordered_map
<SwTableNode
const*, ::std::pair
<FormatMap
, FormatMap
>> m_TableFormats
;
51 static SwNoTextNode
*GetNoTextNode(
52 const css::uno::Reference
< css::beans::XPropertySet
>& rPropSet
);
54 void CollectTableLinesAutoStyles(const SwTableLines
& rLines
, SwFrameFormat
& rFormat
,
58 virtual void _collectTextEmbeddedAutoStyles(
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
;
64 virtual void exportTable(
65 const css::uno::Reference
< css::text::XTextContent
> & rTextContent
,
66 bool bAutoStyles
, bool bProgress
) override
;
68 virtual void exportTableAutoStyles() override
;
71 SwXMLTextParagraphExport(
73 SvXMLAutoStylePoolP
& rAutoStylePool
);
74 virtual ~SwXMLTextParagraphExport() override
;
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
>> &
79 GetTableFormats() { return m_TableFormats
; }
82 #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */