LibreOffice Module sw (master)  1
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
DocxSdrExport Class Reference

Handles DOCX export of drawings. More...

#include <docxsdrexport.hxx>

Classes

struct  Impl
 Holds data used by DocxSdrExport only. More...
 

Public Member Functions

 DocxSdrExport (DocxExport &rExport, const sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
 
 ~DocxSdrExport ()
 
void setSerializer (const sax_fastparser::FSHelperPtr &pSerializer)
 
const SizegetFlyFrameSize () const
 When exporting fly frames, this holds the real size of the frame. More...
 
bool getTextFrameSyntax () const
 
bool getDMLTextFrameSyntax () const
 
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyAttrList ()
 
rtl::Reference< sax_fastparser::FastAttributeList > & getTextboxAttrList ()
 Attributes of the next v:textbox element. More...
 
OStringBuffer & getTextFrameStyle ()
 
void setParagraphSdtOpen (bool bParagraphSdtOpen)
 Set if paragraph sdt open in the current drawing. More...
 
bool IsDrawingOpen () const
 
bool IsDMLAndVMLDrawingOpen () const
 
bool IsParagraphHasDrawing () const
 
void setParagraphHasDrawing (bool bParagraphHasDrawing)
 
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList ()
 
sax_fastparser::FastAttributeListgetFlyWrapAttrList ()
 
void setFlyWrapAttrList (sax_fastparser::FastAttributeList *pAttrList)
 
sax_fastparser::FastAttributeListgetBodyPrAttrList ()
 Attributes of <wps:bodyPr>, used during DML export of text frames. More...
 
rtl::Reference< sax_fastparser::FastAttributeList > & getDashLineStyle ()
 
void startDMLAnchorInline (const SwFrameFormat *pFrameFormat, const Size &rSize)
 
void endDMLAnchorInline (const SwFrameFormat *pFrameFormat)
 
void writeVMLDrawing (const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat)
 Writes a drawing as VML data. More...
 
void writeDMLDrawing (const SdrObject *pSdrObject, const SwFrameFormat *pFrameFormat, int nAnchorId)
 Writes a drawing as DML. More...
 
void writeDMLAndVMLDrawing (const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat, int nAnchorId)
 Writes shape in both DML and VML format. More...
 
void writeDMLEffectLst (const SwFrameFormat &rFrameFormat)
 Write <a:effectLst>, the effect list. More...
 
void writeDiagram (const SdrObject *sdrObject, const SwFrameFormat &rFrameFormat, int nDiagramId)
 Writes a diagram (smartart). More...
 
void writeDMLTextFrame (ww8::Frame const *pParentFrame, int nAnchorId, bool bTextBoxOnly=false)
 Writes text frame in DML format. More...
 
void writeVMLTextFrame (ww8::Frame const *pParentFrame, bool bTextBoxOnly=false)
 Writes text frame in VML format. More...
 
void writeOnlyTextOfFrame (ww8::Frame const *pParentFrame)
 Writes text from Textbox for <w:framePr> More...
 
void writeBoxItemLine (const SvxBoxItem &rBox)
 Writes the drawingML <a:ln> markup of a box item. More...
 

Static Public Member Functions

static bool isTextBox (const SwFrameFormat &rFrameFormat)
 Is this a standalone TextFrame, or used as a TextBox of a shape? More...
 

Private Attributes

std::unique_ptr< Implm_pImpl
 

Detailed Description

Handles DOCX export of drawings.

Definition at line 53 of file docxsdrexport.hxx.

Constructor & Destructor Documentation

DocxSdrExport::DocxSdrExport ( DocxExport rExport,
const sax_fastparser::FSHelperPtr pSerializer,
oox::drawingml::DrawingML pDrawingML 
)

Definition at line 280 of file docxsdrexport.cxx.

DocxSdrExport::~DocxSdrExport ( )
default

Member Function Documentation

void DocxSdrExport::endDMLAnchorInline ( const SwFrameFormat pFrameFormat)
sax_fastparser::FastAttributeList * DocxSdrExport::getBodyPrAttrList ( )

Attributes of <wps:bodyPr>, used during DML export of text frames.

Definition at line 337 of file docxsdrexport.cxx.

References m_pImpl.

rtl::Reference< sax_fastparser::FastAttributeList > & DocxSdrExport::getDashLineStyle ( )

Definition at line 342 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::getDMLTextFrameSyntax ( ) const

Definition at line 297 of file docxsdrexport.cxx.

References m_pImpl.

rtl::Reference< sax_fastparser::FastAttributeList > & DocxSdrExport::getFlyAttrList ( )

Definition at line 299 of file docxsdrexport.cxx.

References m_pImpl.

rtl::Reference< sax_fastparser::FastAttributeList > & DocxSdrExport::getFlyFillAttrList ( )

Definition at line 327 of file docxsdrexport.cxx.

References m_pImpl.

const Size * DocxSdrExport::getFlyFrameSize ( ) const

When exporting fly frames, this holds the real size of the frame.

Definition at line 293 of file docxsdrexport.cxx.

References m_pImpl.

sax_fastparser::FastAttributeList * DocxSdrExport::getFlyWrapAttrList ( )

Definition at line 332 of file docxsdrexport.cxx.

References m_pImpl.

rtl::Reference< sax_fastparser::FastAttributeList > & DocxSdrExport::getTextboxAttrList ( )

Attributes of the next v:textbox element.

Definition at line 304 of file docxsdrexport.cxx.

References m_pImpl.

OStringBuffer & DocxSdrExport::getTextFrameStyle ( )

Definition at line 309 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::getTextFrameSyntax ( ) const

Definition at line 295 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::IsDMLAndVMLDrawingOpen ( ) const

Definition at line 318 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::IsDrawingOpen ( ) const

Definition at line 311 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::IsParagraphHasDrawing ( ) const

Definition at line 320 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::isTextBox ( const SwFrameFormat rFrameFormat)
static

Is this a standalone TextFrame, or used as a TextBox of a shape?

Definition at line 1543 of file docxsdrexport.cxx.

References SwTextBoxHelper::isTextBox(), and RES_FLYFRMFMT.

Referenced by DocxAttributeOutput::OutputFlyFrame_Impl().

void DocxSdrExport::setFlyWrapAttrList ( sax_fastparser::FastAttributeList pAttrList)

Definition at line 347 of file docxsdrexport.cxx.

References m_pImpl.

void DocxSdrExport::setParagraphHasDrawing ( bool  bParagraphHasDrawing)

Definition at line 322 of file docxsdrexport.cxx.

References m_pImpl.

void DocxSdrExport::setParagraphSdtOpen ( bool  bParagraphSdtOpen)

Set if paragraph sdt open in the current drawing.

Definition at line 313 of file docxsdrexport.cxx.

References m_pImpl.

void DocxSdrExport::setSerializer ( const sax_fastparser::FSHelperPtr pSerializer)

Definition at line 288 of file docxsdrexport.cxx.

References m_pImpl.

void DocxSdrExport::startDMLAnchorInline ( const SwFrameFormat pFrameFormat,
const Size rSize 
)

Sizes of integral types climits header defines constants with the limits of integral types for the specific system and compiler implementation used. Use of this might cause platform dependent problem like posOffset exceed the limit.

Extent width is of type long ( i.e cx & cy ) as

per ECMA-376, Second Edition, Part 1 - Fundamentals And Markup Language Reference [ 20.4.2.7 extent (Drawing Object Size)]

cy is of type a:ST_PositiveCoordinate. Minimum inclusive: 0 Maximum inclusive: 27273042316900

reference : http://www.schemacentral.com/sc/ooxml/e-wp_extent-1.html

Though ECMA mentions the max value as aforementioned. It appears that MSO does not handle for the same, in fact it actually can handle a max value of int32 i.e 2147483647( MAX_INTEGER_VALUE ). Therefore changing the following accordingly so that LO sync's up with MSO.

Definition at line 352 of file docxsdrexport.cxx.

References sax_fastparser::FastAttributeList::add(), sax_fastparser::FastAttributeList::addNS(), BOTTOM, sw::util::CorrectWordWrapPolygonForExport(), tools::PolyPolygon::Count(), sax_fastparser::FastSerializerHelper::createAttrList(), comphelper::SequenceAsHashMap::end(), comphelper::SequenceAsHashMap::find(), SwFrameFormat::FindRealSdrObject(), SwFormatWrapInfluenceOnObjPos::GetAllowOverlap(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormat::GetDoc(), IDocumentDrawModelAccess::GetHellId(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), SwDoc::getIDocumentDrawModelAccess(), IDocumentDrawModelAccess::GetInvisibleHellId(), SdrObject::GetLayer(), SvxLRSpaceItem::GetLeft(), SvxShadowItem::GetLocation(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), sw::util::GetNoTextNodeFromSwFrameFormat(), SwFormat::GetOpaque(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SvxLRSpaceItem::GetRight(), SwFormat::GetShadow(), tools::Polygon::GetSize(), SwFormat::GetSurround(), SwFormat::GetULSpace(), SvxULSpaceItem::GetUpper(), SfxEnumItem< class >::GetValue(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), SvxShadowItem::GetWidth(), SwFormat::GetWrapInfluenceOnObjPos(), Size::Height(), i, SwFormatSurround::IsContour(), LEFT, m_pImpl, OUStringToOString(), RIGHT, SAL_MAX_INT32, SAL_MIN_INT32, SAL_WARN, comphelper::sequenceToContainer(), TOP, Size::Width(), X, and Y.

Referenced by writeDiagram(), writeDMLDrawing(), and writeDMLTextFrame().

void DocxSdrExport::writeBoxItemLine ( const SvxBoxItem rBox)
void DocxSdrExport::writeDiagram ( const SdrObject sdrObject,
const SwFrameFormat rFrameFormat,
int  nDiagramId 
)
void DocxSdrExport::writeDMLAndVMLDrawing ( const SdrObject sdrObj,
const SwFrameFormat rFrameFormat,
int  nAnchorId 
)
void DocxSdrExport::writeDMLDrawing ( const SdrObject pSdrObject,
const SwFrameFormat pFrameFormat,
int  nAnchorId 
)
void DocxSdrExport::writeDMLEffectLst ( const SwFrameFormat rFrameFormat)
void DocxSdrExport::writeDMLTextFrame ( ww8::Frame const *  pParentFrame,
int  nAnchorId,
bool  bTextBoxOnly = false 
)
void DocxSdrExport::writeOnlyTextOfFrame ( ww8::Frame const *  pParentFrame)
void DocxSdrExport::writeVMLDrawing ( const SdrObject sdrObj,
const SwFrameFormat rFrameFormat 
)
void DocxSdrExport::writeVMLTextFrame ( ww8::Frame const *  pParentFrame,
bool  bTextBoxOnly = false 
)

Member Data Documentation

std::unique_ptr<Impl> DocxSdrExport::m_pImpl
private

The documentation for this class was generated from the following files: