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 <tools/solar.h>
18 
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;
33 
34 namespace ww8
35 {
36 class Frame;
37 }
38 class SwFrameFormat;
39 
40 class DocxExport;
41 
44 {
45 private:
47 public:
48  ExportDataSaveRestore(DocxExport& rExport, sal_uLong nStt, sal_uLong nEnd, ww8::Frame const* pParentFrame);
50 };
51 
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);
60 
61  void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
63  const Size* getFlyFrameSize();
64  bool getTextFrameSyntax();
65  bool getDMLTextFrameSyntax();
69  OStringBuffer& getTextFrameStyle();
70 
72  void setParagraphSdtOpen(bool bParagraphSdtOpen);
73 
74  bool IsDrawingOpen();
76  bool IsParagraphHasDrawing();
77  void setParagraphHasDrawing(bool bParagraphHasDrawing);
84 
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 };
108 
109 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
110 
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.
Handles DOCX export of drawings.
std::unique_ptr< Impl > m_pImpl
void endDMLAnchorInline(const SwFrameFormat *pFrameFormat)
Frame
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.
Reference
The class that does all the actual DOCX export-related work.
Definition: docxexport.hxx:65
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.
bool getDMLTextFrameSyntax()
DocxSdrExport(DocxExport &rExport, const sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
bool IsParagraphHasDrawing()
bool IsDMLAndVMLDrawingOpen()
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)
OStringBuffer & getTextFrameStyle()
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList()
std::shared_ptr< FastSerializerHelper > FSHelperPtr
void setFlyWrapAttrList(sax_fastparser::FastAttributeList *pAttrList)
const Size * getFlyFrameSize()
When exporting fly frames, this holds the real size of the frame.
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.
bool getTextFrameSyntax()