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 ()
 
void setFlyWrapAttrList (rtl::Reference< sax_fastparser::FastAttributeList > const &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 49 of file docxsdrexport.hxx.

Constructor & Destructor Documentation

◆ DocxSdrExport()

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

Definition at line 602 of file docxsdrexport.cxx.

References m_pImpl.

◆ ~DocxSdrExport()

DocxSdrExport::~DocxSdrExport ( )
default

Member Function Documentation

◆ endDMLAnchorInline()

void DocxSdrExport::endDMLAnchorInline ( const SwFrameFormat pFrameFormat)

◆ getBodyPrAttrList()

sax_fastparser::FastAttributeList * DocxSdrExport::getBodyPrAttrList ( )

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

Definition at line 654 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::FormatBox().

◆ getDashLineStyle()

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

Definition at line 659 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::FormatBox().

◆ getDMLTextFrameSyntax()

bool DocxSdrExport::getDMLTextFrameSyntax ( ) const

◆ getFlyAttrList()

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

◆ getFlyFillAttrList()

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

◆ getFlyFrameSize()

const Size * DocxSdrExport::getFlyFrameSize ( ) const

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

Definition at line 615 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::FormatFrameSize().

◆ getTextboxAttrList()

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

Attributes of the next v:textbox element.

Definition at line 626 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::FormatBox().

◆ getTextFrameStyle()

OStringBuffer & DocxSdrExport::getTextFrameStyle ( )

◆ getTextFrameSyntax()

bool DocxSdrExport::getTextFrameSyntax ( ) const

◆ IsDMLAndVMLDrawingOpen()

bool DocxSdrExport::IsDMLAndVMLDrawingOpen ( ) const

◆ IsDrawingOpen()

bool DocxSdrExport::IsDrawingOpen ( ) const

◆ IsParagraphHasDrawing()

bool DocxSdrExport::IsParagraphHasDrawing ( ) const

Definition at line 642 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::EndParagraph(), and DocxAttributeOutput::EndRun().

◆ isTextBox()

bool DocxSdrExport::isTextBox ( const SwFrameFormat rFrameFormat)
static

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

Definition at line 2193 of file docxsdrexport.cxx.

References SwTextBoxHelper::isTextBox(), and RES_FLYFRMFMT().

Referenced by DocxAttributeOutput::WriteFlyFrame().

◆ setFlyWrapAttrList()

void DocxSdrExport::setFlyWrapAttrList ( rtl::Reference< sax_fastparser::FastAttributeList > const &  pAttrList)

Definition at line 664 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::FormatSurround().

◆ setParagraphHasDrawing()

void DocxSdrExport::setParagraphHasDrawing ( bool  bParagraphHasDrawing)

Definition at line 644 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::EndParagraph().

◆ setParagraphSdtOpen()

void DocxSdrExport::setParagraphSdtOpen ( bool  bParagraphSdtOpen)

Set if paragraph sdt open in the current drawing.

Definition at line 635 of file docxsdrexport.cxx.

References m_pImpl.

Referenced by DocxAttributeOutput::EndParagraph().

◆ setSerializer()

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

Definition at line 610 of file docxsdrexport.cxx.

References m_pImpl.

◆ startDMLAnchorInline()

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 670 of file docxsdrexport.cxx.

References abs(), sw::util::CorrectWordWrapPolygonForExport(), tools::PolyPolygon::Count(), sax_fastparser::FastSerializerHelper::createAttrList(), comphelper::SequenceAsHashMap::end(), comphelper::SequenceAsHashMap::find(), SwFrameFormat::FindLayoutRect(), SwFrameFormat::FindRealSdrObject(), SwFormatWrapInfluenceOnObjPos::GetAllowOverlap(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormat::GetDoc(), SdrObject::GetGrabBagItem(), IDocumentDrawModelAccess::GetHellId(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), SwDoc::getIDocumentDrawModelAccess(), IDocumentDrawModelAccess::GetInvisibleHellId(), SdrObject::GetLayer(), SvxLRSpaceItem::GetLeft(), SvxShadowItem::GetLocation(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), sw::util::GetNoTextNodeFromSwFrameFormat(), SdrObject::GetObjIdentifier(), SwFormat::GetOpaque(), SdrObject::GetOrdNum(), tools::Polygon::GetPoint(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SvxLRSpaceItem::GetRight(), SdrObject::GetRotateAngle(), SwFormat::GetShadow(), tools::Polygon::GetSize(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), SwFormat::GetULSpace(), SvxULSpaceItem::GetUpper(), SfxEnumItem< typename EnumT >::GetValue(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), SvxShadowItem::GetWidth(), SwFormat::GetWrapInfluenceOnObjPos(), Point::getX(), Point::getY(), Size::Height(), SwRect::Height(), i, SwFormatSurround::IsContour(), SwFormatSurround::IsOutside(), m_pImpl, min(), round, SAL_MAX_INT32, SAL_MIN_INT32, Size::Width(), SwRect::Width(), X, and Y.

Referenced by DocxAttributeOutput::FlyFrameGraphic(), writeDiagram(), writeDMLDrawing(), writeDMLTextFrame(), and DocxAttributeOutput::WritePostponedChart().

◆ writeBoxItemLine()

void DocxSdrExport::writeBoxItemLine ( const SvxBoxItem rBox)

◆ writeDiagram()

void DocxSdrExport::writeDiagram ( const SdrObject sdrObject,
const SwFrameFormat rFrameFormat,
int  nDiagramId 
)

◆ writeDMLAndVMLDrawing()

void DocxSdrExport::writeDMLAndVMLDrawing ( const SdrObject sdrObj,
const SwFrameFormat rFrameFormat,
int  nAnchorId 
)

◆ writeDMLDrawing()

void DocxSdrExport::writeDMLDrawing ( const SdrObject pSdrObject,
const SwFrameFormat pFrameFormat,
int  nAnchorId 
)

◆ writeDMLEffectLst()

void DocxSdrExport::writeDMLEffectLst ( const SwFrameFormat rFrameFormat)

◆ writeDMLTextFrame()

void DocxSdrExport::writeDMLTextFrame ( ww8::Frame const *  pParentFrame,
int  nAnchorId,
bool  bTextBoxOnly = false 
)

◆ writeOnlyTextOfFrame()

void DocxSdrExport::writeOnlyTextOfFrame ( ww8::Frame const *  pParentFrame)

◆ writeVMLDrawing()

void DocxSdrExport::writeVMLDrawing ( const SdrObject sdrObj,
const SwFrameFormat rFrameFormat 
)

◆ writeVMLTextFrame()

void DocxSdrExport::writeVMLTextFrame ( ww8::Frame const *  pParentFrame,
bool  bTextBoxOnly = false 
)

Member Data Documentation

◆ m_pImpl

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

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