LibreOffice Module filter (master) 1
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EscherExGlobal Class Reference

Instance for global DFF data, shared through various instances of EscherEx. More...

#include <escherex.hxx>

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

Classes

struct  ClusterEntry
 
struct  DrawingInfo
 

Public Member Functions

 EscherExGlobal ()
 
virtual ~EscherExGlobal () override
 
sal_uInt32 GenerateDrawingId ()
 Returns a new drawing ID for a new drawing container (DGCONTAINER). More...
 
sal_uInt32 GenerateShapeId (sal_uInt32 nDrawingId, bool bIsInSpgr)
 Creates and returns a new shape identifier, updates the internal shape counters and registers the identifier in the DGG cluster table. More...
 
sal_uInt32 GetDrawingShapeCount (sal_uInt32 nDrawingId) const
 Returns the number of shapes in the current drawing, based on number of calls to the GenerateShapeId() function. More...
 
sal_uInt32 GetLastShapeId (sal_uInt32 nDrawingId) const
 Returns the last shape identifier generated by the GenerateShapeId() function. More...
 
void SetDggContainer ()
 Sets the flag indicating that the DGGCONTAINER exists. More...
 
bool HasDggContainer () const
 Sets the flag indicating that the DGGCONTAINER exists. More...
 
sal_uInt32 GetDggAtomSize () const
 Returns the total size of the DGG atom (including header). More...
 
void WriteDggAtom (SvStream &rStrm) const
 Writes the complete DGG atom to the passed stream (overwrites existing data!). More...
 
SvStreamQueryPictureStream ()
 Called if a picture shall be written and no picture stream is set at class ImplEESdrWriter. More...
 
SvStreamGetPictureStream ()
 Returns the picture stream if existing (queried), otherwise null. More...
 
- Public Member Functions inherited from EscherGraphicProvider
sal_uInt32 GetBlibStoreContainerSize (SvStream const *pMergePicStreamBSE=nullptr) const
 
void WriteBlibStoreContainer (SvStream &rStrm, SvStream *pMergePicStreamBSE=nullptr)
 
void WriteBlibStoreEntry (SvStream &rStrm, sal_uInt32 nBlipId, sal_uInt32 nResize)
 
sal_uInt32 GetBlibID (SvStream &rPicOutStream, GraphicObject const &pGraphicObject, const css::awt::Rectangle *pVisArea=nullptr, const GraphicAttr *pGrafikAttr=nullptr, const bool ooxmlExport=false)
 
bool HasGraphics () const
 
void SetNewBlipStreamOffset (sal_Int32 nOffset)
 
bool GetPrefSize (const sal_uInt32 nBlibId, Size &rSize, MapMode &rMapMode)
 
void SetBaseURI (const OUString &rBaseURI)
 
const OUString & GetBaseURI () const
 
 EscherGraphicProvider (EscherGraphicProviderFlags nFlags=EscherGraphicProviderFlags::NONE)
 
virtual ~EscherGraphicProvider ()
 
EscherGraphicProvideroperator= (EscherGraphicProvider const &)=delete
 
 EscherGraphicProvider (EscherGraphicProvider const &)=delete
 

Private Types

typedef ::std::vector< DrawingInfoDrawingInfoVector
 

Private Member Functions

virtual SvStreamImplQueryPictureStream ()
 Derived classes may implement to create a new stream used to store the picture data. More...
 

Private Attributes

std::vector< ClusterEntrymaClusterTable
 
DrawingInfoVector maDrawingInfos
 List with cluster IDs (used object IDs in drawings). More...
 
SvStreammpPicStrm
 Data about all used drawings. More...
 
bool mbHasDggCont
 Cached result of ImplQueryPictureStream(). More...
 
bool mbPicStrmQueried
 True = the DGGCONTAINER has been initialized. More...
 

Additional Inherited Members

- Protected Member Functions inherited from EscherGraphicProvider
sal_uInt32 ImplInsertBlib (EscherBlibEntry *p_EscherBlibEntry)
 

Detailed Description

Instance for global DFF data, shared through various instances of EscherEx.

Definition at line 969 of file escherex.hxx.

Member Typedef Documentation

◆ DrawingInfoVector

typedef ::std::vector< DrawingInfo > EscherExGlobal::DrawingInfoVector
private

Definition at line 1036 of file escherex.hxx.

Constructor & Destructor Documentation

◆ EscherExGlobal()

EscherExGlobal::EscherExGlobal ( )
explicit

Definition at line 4717 of file escherex.cxx.

References NONE.

◆ ~EscherExGlobal()

EscherExGlobal::~EscherExGlobal ( )
overridevirtual

Definition at line 4725 of file escherex.cxx.

Member Function Documentation

◆ GenerateDrawingId()

sal_uInt32 EscherExGlobal::GenerateDrawingId ( )

Returns a new drawing ID for a new drawing container (DGCONTAINER).

Definition at line 4729 of file escherex.cxx.

References maClusterTable, and maDrawingInfos.

◆ GenerateShapeId()

sal_uInt32 EscherExGlobal::GenerateShapeId ( sal_uInt32  nDrawingId,
bool  bIsInSpgr 
)

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

Parameters
nDrawingIdDrawing identifier has to be passed to be able to generate shape identifiers for multiple drawings simultaneously.

Definition at line 4742 of file escherex.cxx.

References DFF_DGG_CLUSTER_SIZE, maClusterTable, maDrawingInfos, EscherExGlobal::DrawingInfo::mnClusterId, EscherExGlobal::DrawingInfo::mnLastShapeId, EscherExGlobal::ClusterEntry::mnNextShapeId, and EscherExGlobal::DrawingInfo::mnShapeCount.

◆ GetDggAtomSize()

sal_uInt32 EscherExGlobal::GetDggAtomSize ( ) const

Returns the total size of the DGG atom (including header).

Definition at line 4795 of file escherex.cxx.

References maClusterTable.

Referenced by WriteDggAtom().

◆ GetDrawingShapeCount()

sal_uInt32 EscherExGlobal::GetDrawingShapeCount ( sal_uInt32  nDrawingId) const

Returns the number of shapes in the current drawing, based on number of calls to the GenerateShapeId() function.

Definition at line 4781 of file escherex.cxx.

References maDrawingInfos.

◆ GetLastShapeId()

sal_uInt32 EscherExGlobal::GetLastShapeId ( sal_uInt32  nDrawingId) const

Returns the last shape identifier generated by the GenerateShapeId() function.

Definition at line 4788 of file escherex.cxx.

References maDrawingInfos.

◆ GetPictureStream()

SvStream * EscherExGlobal::GetPictureStream ( )
inline

Returns the picture stream if existing (queried), otherwise null.

Definition at line 1008 of file escherex.hxx.

◆ HasDggContainer()

bool EscherExGlobal::HasDggContainer ( ) const
inline

Sets the flag indicating that the DGGCONTAINER exists.

Definition at line 992 of file escherex.hxx.

◆ ImplQueryPictureStream()

SvStream * EscherExGlobal::ImplQueryPictureStream ( )
privatevirtual

Derived classes may implement to create a new stream used to store the picture data.

The implementation has to take care about lifetime of the returned stream (it will not be destructed automatically). This function is called exactly once. The return value will be cached internally for repeated calls of the public QueryPictureStream() function.

Definition at line 4836 of file escherex.cxx.

Referenced by QueryPictureStream().

◆ QueryPictureStream()

SvStream * EscherExGlobal::QueryPictureStream ( )

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

On first invocation, this function calls the virtual member function ImplQueryPictureStream(). The return value will be cached internally for subsequent calls and for the GetPictureStream() function.

Definition at line 4826 of file escherex.cxx.

References ImplQueryPictureStream(), mbPicStrmQueried, and mpPicStrm.

◆ SetDggContainer()

void EscherExGlobal::SetDggContainer ( )
inline

Sets the flag indicating that the DGGCONTAINER exists.

Definition at line 990 of file escherex.hxx.

◆ WriteDggAtom()

void EscherExGlobal::WriteDggAtom ( SvStream rStrm) const

Writes the complete DGG atom to the passed stream (overwrites existing data!).

Definition at line 4801 of file escherex.cxx.

References ESCHER_Dgg, GetDggAtomSize(), maClusterTable, maDrawingInfos, rStrm, and SvStream::WriteUInt32().

Member Data Documentation

◆ maClusterTable

std::vector< ClusterEntry > EscherExGlobal::maClusterTable
private

Definition at line 1038 of file escherex.hxx.

Referenced by GenerateDrawingId(), GenerateShapeId(), GetDggAtomSize(), and WriteDggAtom().

◆ maDrawingInfos

DrawingInfoVector EscherExGlobal::maDrawingInfos
private

List with cluster IDs (used object IDs in drawings).

Definition at line 1039 of file escherex.hxx.

Referenced by GenerateDrawingId(), GenerateShapeId(), GetDrawingShapeCount(), GetLastShapeId(), and WriteDggAtom().

◆ mbHasDggCont

bool EscherExGlobal::mbHasDggCont
private

Cached result of ImplQueryPictureStream().

Definition at line 1041 of file escherex.hxx.

◆ mbPicStrmQueried

bool EscherExGlobal::mbPicStrmQueried
private

True = the DGGCONTAINER has been initialized.

Definition at line 1042 of file escherex.hxx.

Referenced by QueryPictureStream().

◆ mpPicStrm

SvStream* EscherExGlobal::mpPicStrm
private

Data about all used drawings.

Definition at line 1040 of file escherex.hxx.

Referenced by QueryPictureStream().


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