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 <tools/solar.h>
19 namespace rtl
20 {
21 template <typename> class Reference;
22 }
23 namespace oox
24 {
25 namespace drawingml
26 {
27 class DrawingML;
28 }
29 }
30 class Size;
31 class SdrObject;
32 class SvxBoxItem;
34 namespace ww8
35 {
36 class Frame;
37 }
38 class SwFrameFormat;
40 class DocxExport;
44 {
45 private:
47 public:
48  ExportDataSaveRestore(DocxExport& rExport, sal_uLong nStt, sal_uLong nEnd, ww8::Frame const* pParentFrame);
50 };
54 {
55  struct Impl;
56  std::unique_ptr<Impl> m_pImpl;
57 public:
58  DocxSdrExport(DocxExport& rExport, const sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML);
61  void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
63  const Size* getFlyFrameSize() const;
64  bool getTextFrameSyntax() const;
65  bool getDMLTextFrameSyntax() const;
69  OStringBuffer& getTextFrameStyle();
72  void setParagraphSdtOpen(bool bParagraphSdtOpen);
74  bool IsDrawingOpen() const;
75  bool IsDMLAndVMLDrawingOpen() const;
76  bool IsParagraphHasDrawing() const;
77  void setParagraphHasDrawing(bool bParagraphHasDrawing);
85  void startDMLAnchorInline(const SwFrameFormat* pFrameFormat, const Size& rSize);
86  void endDMLAnchorInline(const SwFrameFormat* pFrameFormat);
88  void writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat);
90  void writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFormat* pFrameFormat, int nAnchorId);
92  void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat, int nAnchorId);
94  void writeDMLEffectLst(const SwFrameFormat& rFrameFormat);
96  void writeDiagram(const SdrObject* sdrObject, const SwFrameFormat& rFrameFormat, int nDiagramId);
98  void writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAnchorId, bool bTextBoxOnly = false);
100  void writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bTextBoxOnly = false);
102  static bool isTextBox(const SwFrameFormat& rFrameFormat);
104  void writeOnlyTextOfFrame(ww8::Frame const* pParentFrame);
106  void writeBoxItemLine(const SvxBoxItem& rBox);
107 };
111 /* 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()
sal_uIntPtr sal_uLong
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:66
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).
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.
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:57
ExportDataSaveRestore(DocxExport &rExport, sal_uLong nStt, sal_uLong nEnd, ww8::Frame const *pParentFrame)
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 setFlyWrapAttrList(sax_fastparser::FastAttributeList *pAttrList)
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.
sax_fastparser::FastAttributeList * getFlyWrapAttrList()
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.