LibreOffice Module filter (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
EscherEx Class Reference

#include <escherex.hxx>

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

Public Member Functions

 EscherEx (std::shared_ptr< EscherExGlobal > xGlobal, SvStream *pOutStrm, bool bOOXML=false)
 
virtual ~EscherEx () override
 
virtual sal_uInt32 GenerateShapeId ()
 Creates and returns a new shape identifier, updates the internal shape counters and registers the identifier in the DGG cluster table. More...
 
EscherGraphicProviderGetGraphicProvider ()
 Returns the graphic provider from the global object that has been passed to the constructor. More...
 
SvStreamQueryPictureStream ()
 Called if a picture shall be written and no picture stream is set at class ImplEESdrWriter. More...
 
void Flush (SvStream *pPicStreamMergeBSE=nullptr)
 Inserts internal data into the EscherStream, this process may and has to be executed only once If pPicStreamMergeBSE is known, the BLIPs from this stream are being merged into the MsofbtBSE Records of the EscherStream like it's required for Excel (and maybe Word?) More...
 
void InsertAtCurrentPos (sal_uInt32 nBytes)
 Inserts the passed number of bytes at the current position of the output stream. More...
 
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
 
SvStreamGetStream () 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)
 returns the ShapeID More...
 
virtual void AddSdrObjectVMLObject (const SdrObject &)
 
void EndSdrObjectPage ()
 If objects are written through AddSdrObject the SolverContainer has to be written, and maybe some maintenance to be done. More...
 
virtual EscherExHostAppDataStartShape (const css::uno::Reference< css::drawing::XShape > &rShape, const tools::Rectangle *pChildAnchor)
 Called before a shape is written, application supplies ClientRecords. More...
 
virtual void EndShape (sal_uInt16 nShapeType, sal_uInt32 nShapeID)
 Called after a shape is written to inform the application of the resulted shape type and ID. More...
 
virtual EscherExHostAppDataEnterAdditionalTextGroup ()
 Called before an AdditionalText EnterGroup occurs. More...
 
virtual sal_uInt32 QueryTextID (const css::uno::Reference< css::drawing::XShape > &, sal_uInt32 nShapeId)
 Called if an ESCHER_Prop_lTxid shall be written. More...
 
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 ()
 
EscherPersistTableoperator= (EscherPersistTable const &)=delete
 
 EscherPersistTable (EscherPersistTable const &)=delete
 

Static Public Member Functions

static sal_uInt32 GetColor (const sal_uInt32 nColor)
 
static sal_uInt32 GetColor (const Color &rColor)
 
static const SdrObjectGetSdrObject (const css::uno::Reference< css::drawing::XShape > &rXShape)
 

Protected Member Functions

bool DoSeek (sal_uInt32 nKey)
 

Protected Attributes

std::shared_ptr< EscherExGlobalmxGlobal
 
std::unique_ptr< ImplEESdrWritermpImplEESdrWriter
 
std::unique_ptr< SvStreammxOwnStrm
 
SvStreammpOutStrm
 
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
 

Private Member Functions

 EscherEx (const EscherEx &)=delete
 
EscherExoperator= (const EscherEx &)=delete
 

Additional Inherited Members

- Public Attributes inherited from EscherPersistTable
::std::vector< std::unique_ptr< EscherPersistEntry > > maPersistTable
 

Detailed Description

Definition at line 1049 of file escherex.hxx.

Constructor & Destructor Documentation

◆ EscherEx() [1/2]

EscherEx::EscherEx ( std::shared_ptr< EscherExGlobal xGlobal,
SvStream pOutStrm,
bool  bOOXML = false 
)
explicit

◆ ~EscherEx()

EscherEx::~EscherEx ( )
overridevirtual

Definition at line 4883 of file escherex.cxx.

◆ EscherEx() [2/2]

EscherEx::EscherEx ( const EscherEx )
privatedelete

Member Function Documentation

◆ AddAtom()

void EscherEx::AddAtom ( sal_uInt32  nAtomSitze,
sal_uInt16  nRecType,
int  nRecVersion = 0,
int  nRecInstance = 0 
)

◆ AddChildAnchor()

void EscherEx::AddChildAnchor ( const tools::Rectangle rRectangle)

◆ AddClientAnchor()

void EscherEx::AddClientAnchor ( const tools::Rectangle rRectangle)

◆ AddDummyShape()

sal_uInt32 EscherEx::AddDummyShape ( )

◆ AddSdrObject()

sal_uInt32 EscherEx::AddSdrObject ( const SdrObject rObj,
bool  ooxmlExport = false,
sal_uInt32  nId = 0 
)

returns the ShapeID

Definition at line 953 of file eschesdo.cxx.

References ImplEESdrObject::IsValid(), mbOOXML, mpImplEESdrWriter, and nId.

◆ AddSdrObjectVMLObject()

virtual void EscherEx::AddSdrObjectVMLObject ( const SdrObject )
inlinevirtual

◆ AddSdrPage()

void EscherEx::AddSdrPage ( const SdrPage rPage,
bool  ooxmlExport = false 
)

Definition at line 941 of file eschesdo.cxx.

References mpImplEESdrWriter.

◆ AddShape()

void EscherEx::AddShape ( sal_uInt32  nShpInstance,
ShapeFlag  nFlagIds,
sal_uInt32  nShapeID = 0 
)
virtual

◆ AddUnoShapes()

void EscherEx::AddUnoShapes ( const css::uno::Reference< css::drawing::XShapes > &  rxShapes,
bool  ooxmlExport = false 
)

Definition at line 947 of file eschesdo.cxx.

References mpImplEESdrWriter.

◆ BeginAtom()

void EscherEx::BeginAtom ( )

Definition at line 5119 of file escherex.cxx.

References mnCountOfs, mpOutStrm, SvStream::Tell(), and SvStream::WriteUInt32().

◆ CloseContainer()

void EscherEx::CloseContainer ( )
virtual

◆ Commit()

void EscherEx::Commit ( EscherPropertyContainer rProps,
const tools::Rectangle rRect 
)
virtual

◆ DoSeek()

bool EscherEx::DoSeek ( sal_uInt32  nKey)
protected

◆ EndAtom()

void EscherEx::EndAtom ( sal_uInt16  nRecType,
int  nRecVersion = 0,
int  nRecInstance = 0 
)

◆ EndSdrObjectPage()

void EscherEx::EndSdrObjectPage ( )

If objects are written through AddSdrObject the SolverContainer has to be written, and maybe some maintenance to be done.

Definition at line 962 of file eschesdo.cxx.

References mpImplEESdrWriter.

◆ EndShape()

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

Called after a shape is written to inform the application of the resulted shape type and ID.

Definition at line 972 of file eschesdo.cxx.

Referenced by ImplEESdrWriter::ImplWriteAdditionalText(), and ImplEESdrWriter::ImplWriteShape().

◆ EnterAdditionalTextGroup()

EscherExHostAppData * EscherEx::EnterAdditionalTextGroup ( )
virtual

Called before an AdditionalText EnterGroup occurs.

The current shape will be written in three parts: a group shape, the shape itself, and an extra textbox shape. The complete flow is: StartShape sets HostData1. EnterAdditionalTextGroup sets HostData2, App may modify HostData1 and keep track of the change. The group shape is written with HostData2. Another StartShape with the same (!) object sets HostData3. The current shape is written with HostData3. EndShape is called for the current shape. Another StartShape with the same (!) object sets HostData4. The textbox shape is written with HostData4. EndShape is called for the textbox shape. EndShape is called for the group shape, this provides the same functionality as an ordinary recursive group.

Definition at line 5157 of file escherex.cxx.

Referenced by ImplEESdrWriter::ImplEnterAdditionalTextGroup().

◆ EnterGroup() [1/2]

sal_uInt32 EscherEx::EnterGroup ( const OUString &  rShapeName,
const tools::Rectangle pBoundRect 
)
virtual

◆ EnterGroup() [2/2]

sal_uInt32 EscherEx::EnterGroup ( const tools::Rectangle pBoundRect = nullptr)

Definition at line 5210 of file escherex.cxx.

References EnterGroup().

◆ Flush()

void EscherEx::Flush ( SvStream pPicStreamMergeBSE = nullptr)

Inserts internal data into the EscherStream, this process may and has to be executed only once If pPicStreamMergeBSE is known, the BLIPs from this stream are being merged into the MsofbtBSE Records of the EscherStream like it's required for Excel (and maybe Word?)

Definition at line 4887 of file escherex.cxx.

References DoSeek(), ESCHER_Persist_CurrentPosition, ESCHER_Persist_Dgg, InsertAtCurrentPos(), mpOutStrm, mxGlobal, EscherPersistTable::PtDelete(), EscherPersistTable::PtGetOffsetByID(), EscherPersistTable::PtReplaceOrInsert(), SvStream::Seek(), and SvStream::Tell().

◆ GenerateShapeId()

virtual sal_uInt32 EscherEx::GenerateShapeId ( )
inlinevirtual

Creates and returns a new shape identifier, updates the internal shape counters and registers the identifier in the DGG cluster table.

Definition at line 1080 of file escherex.hxx.

Referenced by AddDummyShape(), AddShape(), EnterGroup(), ImplEESdrWriter::ImplWriteAdditionalText(), and ImplEESdrWriter::ImplWriteShape().

◆ GetColor() [1/2]

sal_uInt32 EscherEx::GetColor ( const Color rColor)
static

Definition at line 5280 of file escherex.cxx.

References Color::GetBlue(), GetColor(), Color::GetGreen(), and Color::GetRed().

◆ GetColor() [2/2]

sal_uInt32 EscherEx::GetColor ( const sal_uInt32  nColor)
static

Definition at line 5272 of file escherex.cxx.

Referenced by GetColor().

◆ GetEditAs()

const OUString & EscherEx::GetEditAs ( ) const
inline

Definition at line 1124 of file escherex.hxx.

◆ GetGraphicProvider()

EscherGraphicProvider & EscherEx::GetGraphicProvider ( )
inline

Returns the graphic provider from the global object that has been passed to the constructor.

Definition at line 1085 of file escherex.hxx.

Referenced by ImplEESdrWriter::ImplWriteAdditionalText(), and ImplEESdrWriter::ImplWriteShape().

◆ GetGroupLevel()

sal_uInt32 EscherEx::GetGroupLevel ( ) const
inline

◆ GetHellLayerId()

SdrLayerID EscherEx::GetHellLayerId ( ) const
inline

Definition at line 1213 of file escherex.hxx.

Referenced by ImplEESdrWriter::ImplWriteShape().

◆ GetPersistOffset()

sal_uInt32 EscherEx::GetPersistOffset ( sal_uInt32  nKey)

◆ GetSdrObject()

const SdrObject * EscherEx::GetSdrObject ( const css::uno::Reference< css::drawing::XShape > &  rXShape)
static

Definition at line 993 of file eschesdo.cxx.

References DBG_ASSERT, and SdrObject::getSdrObjectFromXShape().

Referenced by ImplEESdrObject::GetSdrObject().

◆ GetStream()

SvStream & EscherEx::GetStream ( ) const
inline

Definition at line 1125 of file escherex.hxx.

Referenced by Commit(), and ImplEESdrWriter::ImplFlushSolverContainer().

◆ GetStreamPos()

sal_uInt64 EscherEx::GetStreamPos ( ) const
inline

Definition at line 1126 of file escherex.hxx.

References SvStream::Tell().

◆ InsertAtCurrentPos()

void EscherEx::InsertAtCurrentPos ( sal_uInt32  nBytes)

Inserts the passed number of bytes at the current position of the output stream.

Inserts dummy bytes and moves all following stream data, and updates all internal stream offsets stored in the PersistTable and the affected container sizes, which makes this operation very expensive. (!)

Parameters
nBytesThe number of bytes to be inserted into the stream.

An atom that currently ends exactly at the current stream position will not be expanded to include the inserted data (used to insert e.g. a new atom after an existing atom). Note that containers that end exactly at the current stream position are always expanded to include the inserted data.

Definition at line 4922 of file escherex.cxx.

References EscherPersistTable::maPersistTable, mnStrmStartOfs, mOffsets, mpOutStrm, nType, SvStream::ReadBytes(), SvStream::ReadUInt32(), SvStream::Seek(), SvStream::SeekRel(), SvStream::Tell(), SvStream::TellEnd(), SvStream::WriteBytes(), and SvStream::WriteUInt32().

Referenced by Flush().

◆ InsertAtPersistOffset()

void EscherEx::InsertAtPersistOffset ( sal_uInt32  nKey,
sal_uInt32  nValue 
)

◆ InsertPersistOffset()

void EscherEx::InsertPersistOffset ( sal_uInt32  nKey,
sal_uInt32  nOffset 
)

Definition at line 4975 of file escherex.cxx.

References ESCHER_Persist_PrivateEntry, and EscherPersistTable::PtInsert().

◆ LeaveGroup()

void EscherEx::LeaveGroup ( )
virtual

◆ OpenContainer()

void EscherEx::OpenContainer ( sal_uInt16  nEscherContainer,
int  nRecInstance = 0 
)
virtual

◆ operator=()

EscherEx & EscherEx::operator= ( const EscherEx )
privatedelete

◆ QueryPictureStream()

SvStream * EscherEx::QueryPictureStream ( )
inline

Called if a picture shall be written and no picture stream is set at class ImplEESdrWriter.

Definition at line 1090 of file escherex.hxx.

Referenced by ImplEESdrWriter::ImplWriteAdditionalText(), and ImplEESdrWriter::ImplWriteShape().

◆ QueryTextID()

sal_uInt32 EscherEx::QueryTextID ( const css::uno::Reference< css::drawing::XShape > &  ,
sal_uInt32  nShapeId 
)
virtual

Called if an ESCHER_Prop_lTxid shall be written.

Definition at line 976 of file eschesdo.cxx.

Referenced by ImplEESdrWriter::ImplWriteAdditionalText(), and ImplEESdrWriter::ImplWriteShape().

◆ ReplacePersistOffset()

void EscherEx::ReplacePersistOffset ( sal_uInt32  nKey,
sal_uInt32  nOffset 
)

Definition at line 4980 of file escherex.cxx.

References ESCHER_Persist_PrivateEntry, and EscherPersistTable::PtReplace().

◆ SeekToPersistOffset()

bool EscherEx::SeekToPersistOffset ( sal_uInt32  nKey)

Definition at line 5009 of file escherex.cxx.

References DoSeek(), and ESCHER_Persist_PrivateEntry.

Referenced by InsertAtPersistOffset().

◆ SetEditAs()

void EscherEx::SetEditAs ( const OUString &  rEditAs)

Definition at line 4985 of file escherex.cxx.

References mEditAs.

Referenced by ImplEESdrWriter::ImplWriteShape().

◆ SetGroupLogicRect()

void EscherEx::SetGroupLogicRect ( sal_uInt32  nGroupLevel,
const tools::Rectangle rRect 
)

◆ SetGroupSnapRect()

void EscherEx::SetGroupSnapRect ( sal_uInt32  nGroupLevel,
const tools::Rectangle rRect 
)

◆ SetHellLayerId()

void EscherEx::SetHellLayerId ( SdrLayerID  nId)
inline

Definition at line 1212 of file escherex.hxx.

References nId.

◆ StartShape()

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

Called before a shape is written, application supplies ClientRecords.

May set AppData::bDontWriteShape so the shape is ignored.

Definition at line 967 of file eschesdo.cxx.

Referenced by ImplEESdrWriter::ImplEnterAdditionalTextGroup(), ImplEESdrWriter::ImplWriteAdditionalText(), and ImplEESdrWriter::ImplWriteShape().

Member Data Documentation

◆ mbEscherDg

bool EscherEx::mbEscherDg
protected

Definition at line 1067 of file escherex.hxx.

Referenced by CloseContainer(), and OpenContainer().

◆ mbEscherSpgr

bool EscherEx::mbEscherSpgr
protected

Definition at line 1066 of file escherex.hxx.

Referenced by CloseContainer(), and OpenContainer().

◆ mbOOXML

bool EscherEx::mbOOXML
protected

Definition at line 1068 of file escherex.hxx.

Referenced by AddSdrObject().

◆ mEditAs

OUString EscherEx::mEditAs
protected

Definition at line 1069 of file escherex.hxx.

Referenced by SetEditAs().

◆ mnCountOfs

sal_uInt32 EscherEx::mnCountOfs
protected

Definition at line 1061 of file escherex.hxx.

Referenced by BeginAtom(), and EndAtom().

◆ mnCurrentDg

sal_uInt32 EscherEx::mnCurrentDg
protected

Definition at line 1060 of file escherex.hxx.

Referenced by CloseContainer(), and OpenContainer().

◆ mnGroupLevel

sal_uInt32 EscherEx::mnGroupLevel
protected

Definition at line 1063 of file escherex.hxx.

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

◆ mnHellLayerId

SdrLayerID EscherEx::mnHellLayerId
protected

Definition at line 1064 of file escherex.hxx.

◆ mnStrmStartOfs

sal_uInt32 EscherEx::mnStrmStartOfs
protected

Definition at line 1056 of file escherex.hxx.

Referenced by EscherEx(), and InsertAtCurrentPos().

◆ mOffsets

std::vector< sal_uInt32 > EscherEx::mOffsets
protected

Definition at line 1057 of file escherex.hxx.

Referenced by CloseContainer(), InsertAtCurrentPos(), and OpenContainer().

◆ mpImplEESdrWriter

std::unique_ptr<ImplEESdrWriter> EscherEx::mpImplEESdrWriter
protected

◆ mpOutStrm

SvStream* EscherEx::mpOutStrm
protected

◆ mRecTypes

std::vector< sal_uInt16 > EscherEx::mRecTypes
protected

Definition at line 1058 of file escherex.hxx.

Referenced by CloseContainer(), and OpenContainer().

◆ mxGlobal

std::shared_ptr<EscherExGlobal> EscherEx::mxGlobal
protected

Definition at line 1052 of file escherex.hxx.

Referenced by CloseContainer(), Flush(), and OpenContainer().

◆ mxOwnStrm

std::unique_ptr<SvStream> EscherEx::mxOwnStrm
protected

Definition at line 1054 of file escherex.hxx.

Referenced by EscherEx().


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