LibreOffice Module sw (master)  1
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
8  */
13 #include <memory>
15 #include <rtl/strbuf.hxx>
16 #include <sax/fshelper.hxx>
17 #include <nodeoffset.hxx>
19 namespace rtl
20 {
21 template <typename> class Reference;
22 }
23 namespace oox::drawingml { class DrawingML; }
24 class Size;
25 class SdrObject;
26 class SvxBoxItem;
28 namespace ww8
29 {
30 class Frame;
31 }
32 class SwFrameFormat;
34 class DocxExport;
38 {
39 private:
41 public:
42  ExportDataSaveRestore(DocxExport& rExport, SwNodeOffset nStt, SwNodeOffset nEnd, ww8::Frame const* pParentFrame);
44 };
48 {
49  struct Impl;
50  std::unique_ptr<Impl> m_pImpl;
51 public:
52  DocxSdrExport(DocxExport& rExport, const sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML);
55  void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
57  const Size* getFlyFrameSize() const;
58  bool getTextFrameSyntax() const;
59  bool getDMLTextFrameSyntax() const;
63  OStringBuffer& getTextFrameStyle();
66  void setParagraphSdtOpen(bool bParagraphSdtOpen);
68  bool IsDrawingOpen() const;
69  bool IsDMLAndVMLDrawingOpen() const;
70  bool IsParagraphHasDrawing() const;
71  void setParagraphHasDrawing(bool bParagraphHasDrawing);
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 };
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void writeDMLAndVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat, int nAnchorId)
Writes shape in both DML and VML format.
Helper class, so that the DocxExport::RestoreData() call will always happen.
bool IsDrawingOpen() const
Handles DOCX export of drawings.
std::unique_ptr< Impl > m_pImpl
void endDMLAnchorInline(const SwFrameFormat *pFrameFormat)
bool getDMLTextFrameSyntax() const
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyAttrList()
void writeDMLEffectLst(const SwFrameFormat &rFrameFormat)
Write , the effect list.
Holds data used by DocxSdrExport only.
bool IsParagraphHasDrawing() const
The class that does all the actual DOCX export-related work.
Definition: docxexport.hxx:74
sax_fastparser::FastAttributeList * getBodyPrAttrList()
Attributes of , used during DML export of text frames.
void startDMLAnchorInline(const SwFrameFormat *pFrameFormat, const Size &rSize)
void writeDiagram(const SdrObject *sdrObject, const SwFrameFormat &rFrameFormat, int nDiagramId)
Writes a diagram (smartart).
void setFlyWrapAttrList(rtl::Reference< sax_fastparser::FastAttributeList > const &pAttrList)
static bool isTextBox(const SwFrameFormat &rFrameFormat)
Is this a standalone TextFrame, or used as a TextBox of a shape?
void writeDMLTextFrame(ww8::Frame const *pParentFrame, int nAnchorId, bool bTextBoxOnly=false)
Writes text frame in DML format.
ExportDataSaveRestore(DocxExport &rExport, SwNodeOffset nStt, SwNodeOffset nEnd, ww8::Frame const *pParentFrame)
DocxSdrExport(DocxExport &rExport, const sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
void setParagraphHasDrawing(bool bParagraphHasDrawing)
rtl::Reference< sax_fastparser::FastAttributeList > & getTextboxAttrList()
Attributes of the next v:textbox element.
Style of a layout element.
Definition: frmfmt.hxx:59
void setSerializer(const sax_fastparser::FSHelperPtr &pSerializer)
bool getTextFrameSyntax() const
OStringBuffer & getTextFrameStyle()
bool IsDMLAndVMLDrawingOpen() const
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList()
std::shared_ptr< FastSerializerHelper > FSHelperPtr
void setParagraphSdtOpen(bool bParagraphSdtOpen)
Set if paragraph sdt open in the current drawing.
void writeVMLTextFrame(ww8::Frame const *pParentFrame, bool bTextBoxOnly=false)
Writes text frame in VML format.
rtl::Reference< sax_fastparser::FastAttributeList > & getDashLineStyle()
void writeDMLDrawing(const SdrObject *pSdrObject, const SwFrameFormat *pFrameFormat, int nAnchorId)
Writes a drawing as DML.
Make exporting a Writer Frame easy.
void writeOnlyTextOfFrame(ww8::Frame const *pParentFrame)
Writes text from Textbox for
void writeBoxItemLine(const SvxBoxItem &rBox)
Writes the drawingML markup of a box item.
void writeVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat)
Writes a drawing as VML data.
const Size * getFlyFrameSize() const
When exporting fly frames, this holds the real size of the frame.