1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
#include <boost/shared_ptr.hpp>
#include <com/sun/star/xml/dom/XDocument.hpp>
namespace oox
{
namespace drawingml
{
class DrawingML;
}
}
class Size;
class Point;
class SdrObject;
namespace sw
{
class Frame;
}
class SwFrmFmt;
class SwNode;
class DocxExport;
/// Helper class, so that the DocxExport::RestoreData() call will always happen.
class ExportDataSaveRestore
{
private:
DocxExport& m_rExport;
public:
ExportDataSaveRestore(DocxExport& rExport, sal_uLong nStt, sal_uLong nEnd, sw::Frame* pParentFrame);
~ExportDataSaveRestore();
};
/// Handles DOCX export of drawings.
class DocxSdrExport
{
struct Impl;
boost::shared_ptr<Impl> m_pImpl;
public:
DocxSdrExport(DocxExport& rExport, sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML);
~DocxSdrExport();
void setSerializer(sax_fastparser::FSHelperPtr pSerializer);
/// When exporting fly frames, this holds the real size of the frame.
const Size* getFlyFrameSize();
bool getTextFrameSyntax();
bool getDMLTextFrameSyntax();
sax_fastparser::FastAttributeList*& getFlyAttrList();
void setFlyAttrList(sax_fastparser::FastAttributeList* pAttrList);
/// Attributes of the next v:textbox element.
sax_fastparser::FastAttributeList* getTextboxAttrList();
OStringBuffer& getTextFrameStyle();
/// Same, as DocxAttributeOutput::m_bBtLr, but for textframe rotation.
bool getFrameBtLr();
sax_fastparser::FastAttributeList*& getFlyFillAttrList();
sax_fastparser::FastAttributeList* getFlyWrapAttrList();
void setFlyWrapAttrList(sax_fastparser::FastAttributeList* pAttrList);
/// Attributes of <wps:bodyPr>, used during DML export of text frames.
sax_fastparser::FastAttributeList* getBodyPrAttrList();
sax_fastparser::FastAttributeList*& getDashLineStyle();
void startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rSize);
void endDMLAnchorInline(const SwFrmFmt* pFrmFmt);
/// Writes a drawing as VML data.
void writeVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFrmFmt,const Point& rNdTopLeft);
/// Writes a drawing as DML.
void writeDMLDrawing(const SdrObject* pSdrObj, const SwFrmFmt* pFrmFmt, int nAnchorId);
/// Writes shape in both DML and VML format.
void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFrmFmt,const Point& rNdTopLeft, int nAnchorId);
/// Write <a:effectLst>, the effect list.
void writeDMLEffectLst(const SwFrmFmt& rFrmFmt);
/// Writes a diagram (smartart).
void writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFrmFmt, int nAnchorId);
void writeDiagramRels(com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocument> xDom,
const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > >& xRelSeq,
com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > xOutStream, const OUString& sGrabBagProperyName,
int nAnchorId);
/// Writes text frame in DML format.
void writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId);
/// Writes text frame in VML format.
void writeVMLTextFrame(sw::Frame* pParentFrame);
/// Undo the text direction mangling done by the frame btLr handler in writerfilter::dmapper::DomainMapper::lcl_startCharacterGroup()
bool checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttributeList* pTextboxAttrList = 0);
};
#endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|