LibreOffice Module sw (master) 1
docxsdrexport.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
10#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
11#define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
12
13#include <memory>
14
15#include <rtl/strbuf.hxx>
16#include <sax/fshelper.hxx>
17#include <nodeoffset.hxx>
18
19#include <com/sun/star/beans/XPropertySet.hpp>
20
21namespace rtl
22{
23template <typename> class Reference;
24}
25namespace oox::drawingml { class DrawingML; }
26class Size;
27class SdrObject;
28class SvxBoxItem;
29
30namespace ww8
31{
32class Frame;
33}
34class SwFrameFormat;
35
36class DocxExport;
37
40{
41private:
43public:
44 ExportDataSaveRestore(DocxExport& rExport, SwNodeOffset nStt, SwNodeOffset nEnd, ww8::Frame const* pParentFrame);
46};
47
50{
51 struct Impl;
52 std::unique_ptr<Impl> m_pImpl;
53public:
54 DocxSdrExport(DocxExport& rExport, const sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML);
56
57 void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
59 const Size* getFlyFrameSize() const;
60 bool getTextFrameSyntax() const;
61 bool getDMLTextFrameSyntax() const;
65 OStringBuffer& getTextFrameStyle();
66
68 void setParagraphSdtOpen(bool bParagraphSdtOpen);
69
70 bool IsDrawingOpen() const;
71 bool IsDMLAndVMLDrawingOpen() const;
72 bool IsParagraphHasDrawing() const;
73 void setParagraphHasDrawing(bool bParagraphHasDrawing);
79
80 void startDMLAnchorInline(const SwFrameFormat* pFrameFormat, const Size& rSize);
81 void endDMLAnchorInline(const SwFrameFormat* pFrameFormat);
83 void writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat);
85 void writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFormat* pFrameFormat, int nAnchorId);
87 void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat, int nAnchorId);
89 void writeDMLEffectLst(const SwFrameFormat& rFrameFormat);
91 void writeDiagram(const SdrObject* sdrObject, const SwFrameFormat& rFrameFormat, int nDiagramId);
93 void writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAnchorId, bool bTextBoxOnly = false);
95 void writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bTextBoxOnly = false);
97 static bool isTextBox(const SwFrameFormat& rFrameFormat);
99 void writeOnlyTextOfFrame(ww8::Frame const* pParentFrame);
101 void writeBoxItemLine(const SvxBoxItem& rBox);
102};
103
104void AddExtLst(sax_fastparser::FSHelperPtr const& pFS, DocxExport const& rExport,
105 css::uno::Reference<css::beans::XPropertySet> const& xShape);
106
107#endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The class that does all the actual DOCX export-related work.
Definition: docxexport.hxx:75
Handles DOCX export of drawings.
void writeVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat)
Writes a drawing as VML data.
void endDMLAnchorInline(const SwFrameFormat *pFrameFormat)
void setParagraphSdtOpen(bool bParagraphSdtOpen)
Set if paragraph sdt open in the current drawing.
void writeDMLEffectLst(const SwFrameFormat &rFrameFormat)
Write <a:effectLst>, the effect list.
static bool isTextBox(const SwFrameFormat &rFrameFormat)
Is this a standalone TextFrame, or used as a TextBox of a shape?
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyAttrList()
bool getTextFrameSyntax() const
void writeDMLDrawing(const SdrObject *pSdrObject, const SwFrameFormat *pFrameFormat, int nAnchorId)
Writes a drawing as DML.
bool IsDrawingOpen() const
void writeBoxItemLine(const SvxBoxItem &rBox)
Writes the drawingML <a:ln> markup of a box item.
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList()
bool getDMLTextFrameSyntax() const
void writeVMLTextFrame(ww8::Frame const *pParentFrame, bool bTextBoxOnly=false)
Writes text frame in VML format.
rtl::Reference< sax_fastparser::FastAttributeList > & getTextboxAttrList()
Attributes of the next v:textbox element.
void setFlyWrapAttrList(rtl::Reference< sax_fastparser::FastAttributeList > const &pAttrList)
DocxSdrExport(DocxExport &rExport, const sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
bool IsDMLAndVMLDrawingOpen() const
void writeDiagram(const SdrObject *sdrObject, const SwFrameFormat &rFrameFormat, int nDiagramId)
Writes a diagram (smartart).
void writeOnlyTextOfFrame(ww8::Frame const *pParentFrame)
Writes text from Textbox for <w:framePr>
void writeDMLTextFrame(ww8::Frame const *pParentFrame, int nAnchorId, bool bTextBoxOnly=false)
Writes text frame in DML format.
const Size * getFlyFrameSize() const
When exporting fly frames, this holds the real size of the frame.
bool IsParagraphHasDrawing() const
void setParagraphHasDrawing(bool bParagraphHasDrawing)
sax_fastparser::FastAttributeList * getBodyPrAttrList()
Attributes of <wps:bodyPr>, used during DML export of text frames.
void startDMLAnchorInline(const SwFrameFormat *pFrameFormat, const Size &rSize)
void writeDMLAndVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat, int nAnchorId)
Writes shape in both DML and VML format.
rtl::Reference< sax_fastparser::FastAttributeList > & getDashLineStyle()
OStringBuffer & getTextFrameStyle()
std::unique_ptr< Impl > m_pImpl
void setSerializer(const sax_fastparser::FSHelperPtr &pSerializer)
Helper class, so that the DocxExport::RestoreData() call will always happen.
ExportDataSaveRestore(DocxExport &rExport, SwNodeOffset nStt, SwNodeOffset nEnd, ww8::Frame const *pParentFrame)
Style of a layout element.
Definition: frmfmt.hxx:72
Make exporting a Writer Frame easy.
void AddExtLst(sax_fastparser::FSHelperPtr const &pFS, DocxExport const &rExport, css::uno::Reference< css::beans::XPropertySet > const &xShape)
Reference
std::shared_ptr< FastSerializerHelper > FSHelperPtr
Holds data used by DocxSdrExport only.