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
19namespace rtl
20{
21template <typename> class Reference;
22}
23namespace oox::drawingml { class DrawingML; }
24class Size;
25class SdrObject;
26class SvxBoxItem;
27
28namespace ww8
29{
30class Frame;
31}
32class SwFrameFormat;
33
34class DocxExport;
35
38{
39private:
41public:
42 ExportDataSaveRestore(DocxExport& rExport, SwNodeOffset nStt, SwNodeOffset nEnd, ww8::Frame const* pParentFrame);
44};
45
48{
49 struct Impl;
50 std::unique_ptr<Impl> m_pImpl;
51public:
52 DocxSdrExport(DocxExport& rExport, const sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML);
54
55 void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
57 const Size* getFlyFrameSize() const;
58 bool getTextFrameSyntax() const;
59 bool getDMLTextFrameSyntax() const;
63 OStringBuffer& getTextFrameStyle();
64
66 void setParagraphSdtOpen(bool bParagraphSdtOpen);
67
68 bool IsDrawingOpen() const;
69 bool IsDMLAndVMLDrawingOpen() const;
70 bool IsParagraphHasDrawing() const;
71 void setParagraphHasDrawing(bool bParagraphHasDrawing);
77
78 void startDMLAnchorInline(const SwFrameFormat* pFrameFormat, const Size& rSize);
79 void endDMLAnchorInline(const SwFrameFormat* pFrameFormat);
81 void writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat);
83 void writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFormat* pFrameFormat, int nAnchorId);
85 void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat, int nAnchorId);
87 void writeDMLEffectLst(const SwFrameFormat& rFrameFormat);
89 void writeDiagram(const SdrObject* sdrObject, const SwFrameFormat& rFrameFormat, int nDiagramId);
91 void writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAnchorId, bool bTextBoxOnly = false);
93 void writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bTextBoxOnly = false);
95 static bool isTextBox(const SwFrameFormat& rFrameFormat);
97 void writeOnlyTextOfFrame(ww8::Frame const* pParentFrame);
99 void writeBoxItemLine(const SvxBoxItem& rBox);
100};
101
102#endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
103
104/* 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:62
Make exporting a Writer Frame easy.
Reference
std::shared_ptr< FastSerializerHelper > FSHelperPtr
Holds data used by DocxSdrExport only.