LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
RtfSdrExport Class Referencefinal

Handles export of drawings using RTF markup. More...

#include <rtfsdrexport.hxx>

Inheritance diagram for RtfSdrExport:
[legend]
Collaboration diagram for RtfSdrExport:
[legend]

Public Member Functions

 RtfSdrExport (RtfExport &rExport)
 
 ~RtfSdrExport () override
 
void AddSdrObject (const SdrObject &rObj)
 Export the sdr object as Sdr. More...
 
void WriteOutliner (const OutlinerParaObject &rParaObj, TextTypes eType)
 Write editeng text, e.g. shape or comment. More...
 
- Public Member Functions inherited from EscherEx
 EscherEx (std::shared_ptr< EscherExGlobal > xGlobal, SvStream *pOutStrm, bool bOOXML=false)
 
virtual ~EscherEx () override
 
virtual sal_uInt32 GenerateShapeId ()
 
EscherGraphicProvider & GetGraphicProvider ()
 
SvStream * QueryPictureStream ()
 
void Flush (SvStream *pPicStreamMergeBSE=nullptr)
 
void InsertAtCurrentPos (sal_uInt32 nBytes)
 
void InsertPersistOffset (sal_uInt32 nKey, sal_uInt32 nOffset)
 
void ReplacePersistOffset (sal_uInt32 nKey, sal_uInt32 nOffset)
 
sal_uInt32 GetPersistOffset (sal_uInt32 nKey)
 
bool SeekToPersistOffset (sal_uInt32 nKey)
 
void InsertAtPersistOffset (sal_uInt32 nKey, sal_uInt32 nValue)
 
void SetEditAs (const OUString &rEditAs)
 
const OUString & GetEditAs () const
 
SvStream & GetStream () const
 
sal_uInt64 GetStreamPos () const
 
virtual void OpenContainer (sal_uInt16 nEscherContainer, int nRecInstance=0)
 
virtual void CloseContainer ()
 
void BeginAtom ()
 
void EndAtom (sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0)
 
void AddAtom (sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0)
 
void AddChildAnchor (const tools::Rectangle &rRectangle)
 
void AddClientAnchor (const tools::Rectangle &rRectangle)
 
virtual sal_uInt32 EnterGroup (const OUString &rShapeName, const tools::Rectangle *pBoundRect)
 
sal_uInt32 EnterGroup (const tools::Rectangle *pBoundRect=nullptr)
 
sal_uInt32 GetGroupLevel () const
 
void SetGroupSnapRect (sal_uInt32 nGroupLevel, const tools::Rectangle &rRect)
 
void SetGroupLogicRect (sal_uInt32 nGroupLevel, const tools::Rectangle &rRect)
 
virtual void LeaveGroup ()
 
virtual void AddShape (sal_uInt32 nShpInstance, ShapeFlag nFlagIds, sal_uInt32 nShapeID=0)
 
virtual void Commit (EscherPropertyContainer &rProps, const tools::Rectangle &rRect)
 
void AddSdrPage (const SdrPage &rPage, bool ooxmlExport=false)
 
void AddUnoShapes (const css::uno::Reference< css::drawing::XShapes > &rxShapes, bool ooxmlExport=false)
 
sal_uInt32 AddSdrObject (const SdrObject &rObj, bool ooxmlExport=false, sal_uInt32 nId=0)
 
virtual void AddSdrObjectVMLObject (const SdrObject &)
 
void EndSdrObjectPage ()
 
virtual EscherExHostAppData * StartShape (const css::uno::Reference< css::drawing::XShape > &rShape, const tools::Rectangle *pChildAnchor)
 
virtual void EndShape (sal_uInt16 nShapeType, sal_uInt32 nShapeID)
 
virtual EscherExHostAppData * EnterAdditionalTextGroup ()
 
virtual sal_uInt32 QueryTextID (const css::uno::Reference< css::drawing::XShape > &, sal_uInt32 nShapeId)
 
sal_uInt32 AddDummyShape ()
 
void SetHellLayerId (SdrLayerID nId)
 
SdrLayerID GetHellLayerId () const
 
- Public Member Functions inherited from EscherPersistTable
bool PtIsID (sal_uInt32 nID)
 
void PtInsert (sal_uInt32 nID, sal_uInt32 nOfs)
 
void PtDelete (sal_uInt32 nID)
 
sal_uInt32 PtGetOffsetByID (sal_uInt32 nID)
 
void PtReplace (sal_uInt32 nID, sal_uInt32 nOfs)
 
void PtReplaceOrInsert (sal_uInt32 nID, sal_uInt32 nOfs)
 
 EscherPersistTable ()
 
virtual ~EscherPersistTable ()
 
EscherPersistTable & operator= (EscherPersistTable const &)=delete
 
 EscherPersistTable (EscherPersistTable const &)=delete
 

Static Public Member Functions

static bool isTextBox (const SwFrameFormat &rFrameFormat)
 Is this a standalone TextFrame, or used as a TextBox of a shape? More...
 
- Static Public Member Functions inherited from EscherEx
static sal_uInt32 GetColor (const sal_uInt32 nColor)
 
static sal_uInt32 GetColor (const Color &rColor)
 
static const SdrObject * GetSdrObject (const css::uno::Reference< css::drawing::XShape > &rXShape)
 

Private Member Functions

sal_Int32 StartShape ()
 
void EndShape (sal_Int32 nShapeElement)
 
void Commit (EscherPropertyContainer &rProps, const tools::Rectangle &rRect) override
 
void OpenContainer (sal_uInt16 nEscherContainer, int nRecInstance=0) override
 
void CloseContainer () override
 
sal_uInt32 EnterGroup (const OUString &rShapeName, const tools::Rectangle *pBoundRect) override
 
void LeaveGroup () override
 
void AddShape (sal_uInt32 nShapeType, ShapeFlag nShapeFlags, sal_uInt32 nShapeId=0) override
 
void AddLineDimensions (const tools::Rectangle &rRectangle)
 Add starting and ending point of a line to the m_pShapeAttrList. More...
 
void AddRectangleDimensions (OStringBuffer &rBuffer, const tools::Rectangle &rRectangle)
 Add position and size to the OStringBuffer. More...
 
void impl_writeGraphic ()
 Exports the pib property of the shape. More...
 
virtual EscherExHostAppData * StartShape (const css::uno::Reference< css::drawing::XShape > &rShape, const tools::Rectangle *pChildAnchor)
 Start the shape for which we just collected the information. More...
 
virtual void EndShape (sal_uInt16 nShapeType, sal_uInt32 nShapeID)
 End the shape. More...
 

Private Attributes

RtfExport & m_rExport
 
RtfAttributeOutput & m_rAttrOutput
 
const SdrObject * m_pSdrObject
 
sal_uInt32 m_nShapeType
 Remember the shape type. More...
 
ShapeFlag m_nShapeFlags
 Remember the shape flags. More...
 
OStringBuffer m_aShapeStyle
 Remember style, the most important shape attribute ;-) More...
 
std::map< OString, OString > m_aShapeProps
 
std::unique_ptr< bool[]> m_pShapeTypeWritten
 Remember which shape types we had already written. More...
 
bool m_bInGroup = false
 

Additional Inherited Members

- Public Attributes inherited from EscherPersistTable
::std::vector< std::unique_ptr< EscherPersistEntry > > maPersistTable
 
- Protected Member Functions inherited from EscherEx
bool DoSeek (sal_uInt32 nKey)
 
- Protected Attributes inherited from EscherEx
std::shared_ptr< EscherExGlobal > mxGlobal
 
std::unique_ptr< ImplEESdrWriter > mpImplEESdrWriter
 
std::unique_ptr< SvStream > mxOwnStrm
 
SvStream * mpOutStrm
 
sal_uInt32 mnStrmStartOfs
 
std::vector< sal_uInt32 > mOffsets
 
std::vector< sal_uInt16 > mRecTypes
 
sal_uInt32 mnCurrentDg
 
sal_uInt32 mnCountOfs
 
sal_uInt32 mnGroupLevel
 
SdrLayerID mnHellLayerId
 
bool mbEscherSpgr
 
bool mbEscherDg
 
bool mbOOXML
 
OUString mEditAs
 

Detailed Description

Handles export of drawings using RTF markup.

Definition at line 37 of file rtfsdrexport.hxx.

Constructor & Destructor Documentation

◆ RtfSdrExport()

RtfSdrExport::RtfSdrExport ( RtfExport &  rExport)
explicit

◆ ~RtfSdrExport()

RtfSdrExport::~RtfSdrExport ( )
override

Definition at line 59 of file rtfsdrexport.cxx.

Member Function Documentation

◆ AddLineDimensions()

void RtfSdrExport::AddLineDimensions ( const tools::Rectangle &  rRectangle)
private

◆ AddRectangleDimensions()

void RtfSdrExport::AddRectangleDimensions ( OStringBuffer &  rBuffer,
const tools::Rectangle &  rRectangle 
)
private

◆ AddSdrObject()

void RtfSdrExport::AddSdrObject ( const SdrObject &  rObj)

Export the sdr object as Sdr.

Call this when you need to export the object as Sdr in RTF.

Definition at line 726 of file rtfsdrexport.cxx.

References EscherEx::AddSdrObject(), and m_pSdrObject.

Referenced by RtfAttributeOutput::OutputFlyFrame_Impl().

◆ AddShape()

void RtfSdrExport::AddShape ( sal_uInt32  nShapeType,
ShapeFlag  nShapeFlags,
sal_uInt32  nShapeId = 0 
)
overrideprivatevirtual

Reimplemented from EscherEx.

Definition at line 98 of file rtfsdrexport.cxx.

References m_nShapeFlags, and m_nShapeType.

◆ CloseContainer()

void RtfSdrExport::CloseContainer ( )
overrideprivatevirtual

◆ Commit()

void RtfSdrExport::Commit ( EscherPropertyContainer &  rProps,
const tools::Rectangle &  rRect 
)
overrideprivatevirtual

◆ EndShape() [1/2]

void RtfSdrExport::EndShape ( sal_Int32  nShapeElement)
private

Definition at line 717 of file rtfsdrexport.cxx.

References m_rAttrOutput, and RtfAttributeOutput::RunText().

Referenced by CloseContainer().

◆ EndShape() [2/2]

virtual void EscherEx::EndShape ( sal_uInt16  nShapeType,
sal_uInt32  nShapeID 
)
privatevirtual

End the shape.

The parameter is just what we got from StartShape().

Reimplemented from EscherEx.

◆ EnterGroup()

sal_uInt32 RtfSdrExport::EnterGroup ( const OUString &  rShapeName,
const tools::Rectangle *  pBoundRect 
)
overrideprivatevirtual

Reimplemented from EscherEx.

Definition at line 89 of file rtfsdrexport.cxx.

References EscherEx::GenerateShapeId(), and m_bInGroup.

◆ impl_writeGraphic()

void RtfSdrExport::impl_writeGraphic ( )
private

◆ isTextBox()

bool RtfSdrExport::isTextBox ( const SwFrameFormat &  rFrameFormat)
static

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

Definition at line 732 of file rtfsdrexport.cxx.

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

Referenced by RtfAttributeOutput::OutputFlyFrame_Impl().

◆ LeaveGroup()

void RtfSdrExport::LeaveGroup ( )
overrideprivatevirtual

Reimplemented from EscherEx.

Definition at line 96 of file rtfsdrexport.cxx.

References m_bInGroup.

◆ OpenContainer()

void RtfSdrExport::OpenContainer ( sal_uInt16  nEscherContainer,
int  nRecInstance = 0 
)
overrideprivatevirtual

◆ StartShape() [1/2]

sal_Int32 RtfSdrExport::StartShape ( )
private

◆ StartShape() [2/2]

virtual EscherExHostAppData * EscherEx::StartShape ( const css::uno::Reference< css::drawing::XShape > &  rShape,
const tools::Rectangle *  pChildAnchor 
)
privatevirtual

Start the shape for which we just collected the information.

Returns the element's tag number, -1 means we wrote nothing.

Reimplemented from EscherEx.

◆ WriteOutliner()

void RtfSdrExport::WriteOutliner ( const OutlinerParaObject &  rParaObj,
TextTypes  eType 
)

Member Data Documentation

◆ m_aShapeProps

std::map<OString, OString> RtfSdrExport::m_aShapeProps
private

◆ m_aShapeStyle

OStringBuffer RtfSdrExport::m_aShapeStyle
private

Remember style, the most important shape attribute ;-)

Definition at line 52 of file rtfsdrexport.hxx.

Referenced by AddLineDimensions(), Commit(), OpenContainer(), and StartShape().

◆ m_bInGroup

bool RtfSdrExport::m_bInGroup = false
private

Definition at line 59 of file rtfsdrexport.hxx.

Referenced by EnterGroup(), LeaveGroup(), and StartShape().

◆ m_nShapeFlags

ShapeFlag RtfSdrExport::m_nShapeFlags
private

Remember the shape flags.

Definition at line 49 of file rtfsdrexport.hxx.

Referenced by AddLineDimensions(), and AddShape().

◆ m_nShapeType

sal_uInt32 RtfSdrExport::m_nShapeType
private

Remember the shape type.

Definition at line 46 of file rtfsdrexport.hxx.

Referenced by AddShape(), CloseContainer(), Commit(), OpenContainer(), and StartShape().

◆ m_pSdrObject

const SdrObject* RtfSdrExport::m_pSdrObject
private

Definition at line 43 of file rtfsdrexport.hxx.

Referenced by AddSdrObject(), impl_writeGraphic(), and StartShape().

◆ m_pShapeTypeWritten

std::unique_ptr<bool[]> RtfSdrExport::m_pShapeTypeWritten
private

Remember which shape types we had already written.

Definition at line 57 of file rtfsdrexport.hxx.

Referenced by RtfSdrExport().

◆ m_rAttrOutput

RtfAttributeOutput& RtfSdrExport::m_rAttrOutput
private

Definition at line 41 of file rtfsdrexport.hxx.

Referenced by EndShape(), StartShape(), and WriteOutliner().

◆ m_rExport

RtfExport& RtfSdrExport::m_rExport
private

Definition at line 39 of file rtfsdrexport.hxx.

Referenced by StartShape(), and WriteOutliner().


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