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 48 of file docxsdrexport.hxx.

Constructor & Destructor Documentation

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

Definition at line 625 of file docxsdrexport.cxx.

References m_pImpl.

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

References m_pImpl.

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

Definition at line 682 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::getDMLTextFrameSyntax ( ) const

Definition at line 642 of file docxsdrexport.cxx.

References m_pImpl.

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

Definition at line 644 of file docxsdrexport.cxx.

References m_pImpl.

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

Definition at line 672 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 638 of file docxsdrexport.cxx.

References m_pImpl.

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

Attributes of the next v:textbox element.

Definition at line 649 of file docxsdrexport.cxx.

References m_pImpl.

OStringBuffer & DocxSdrExport::getTextFrameStyle ( )

Definition at line 654 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::getTextFrameSyntax ( ) const

Definition at line 640 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::IsDMLAndVMLDrawingOpen ( ) const

Definition at line 663 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::IsDrawingOpen ( ) const

Definition at line 656 of file docxsdrexport.cxx.

References m_pImpl.

bool DocxSdrExport::IsParagraphHasDrawing ( ) const

Definition at line 665 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 2167 of file docxsdrexport.cxx.

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

Referenced by DocxAttributeOutput::WriteFlyFrame().

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

Definition at line 687 of file docxsdrexport.cxx.

References m_pImpl.

void DocxSdrExport::setParagraphHasDrawing ( bool  bParagraphHasDrawing)

Definition at line 667 of file docxsdrexport.cxx.

References m_pImpl.

void DocxSdrExport::setParagraphSdtOpen ( bool  bParagraphSdtOpen)

Set if paragraph sdt open in the current drawing.

Definition at line 658 of file docxsdrexport.cxx.

References m_pImpl.

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

Definition at line 633 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 693 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< class >::GetValue(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), SvxShadowItem::GetWidth(), SwFormat::GetWrapInfluenceOnObjPos(), Size::Height(), i, SwFormatSurround::IsContour(), SwFormatSurround::IsOutside(), m_pImpl, min(), OBJ_GRAF, OUStringToOString(), round, SAL_MAX_INT32, SAL_MIN_INT32, comphelper::sequenceToContainer(), SwFlyDrawObjIdentifier, 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: