LibreOffice Module vcl (master) 1
Public Member Functions | Private Attributes | List of all members
vcl::TrueTypeTableGeneric Class Reference

#include <ttcr.hxx>

Inheritance diagram for vcl::TrueTypeTableGeneric:
[legend]
Collaboration diagram for vcl::TrueTypeTableGeneric:
[legend]

Public Member Functions

 TrueTypeTableGeneric (sal_uInt32 tag, sal_uInt32 nbytes, const sal_uInt8 *ptr)
 Creates a new raw TrueType table. More...
 
 TrueTypeTableGeneric (sal_uInt32 tag, sal_uInt32 nbytes, std::unique_ptr< sal_uInt8[]> ptr)
 
virtual ~TrueTypeTableGeneric () override
 
virtual int GetRawData (TableEntry *) override
 This function converts the data of a TrueType table to a raw array of bytes. More...
 
- Public Member Functions inherited from vcl::TrueTypeTable
virtual ~TrueTypeTable ()
 
virtual int GetRawData (TableEntry *)=0
 This function converts the data of a TrueType table to a raw array of bytes. More...
 

Private Attributes

sal_uInt32 m_nbytes
 
std::unique_ptr< sal_uInt8[]> m_ptr
 

Additional Inherited Members

- Public Attributes inherited from vcl::TrueTypeTable
sal_uInt32 m_tag = 0
 
std::unique_ptr< sal_uInt8[]> m_rawdata
 
- Protected Member Functions inherited from vcl::TrueTypeTable
 TrueTypeTable (sal_uInt32 tag_)
 

Detailed Description

Definition at line 112 of file ttcr.hxx.

Constructor & Destructor Documentation

◆ TrueTypeTableGeneric() [1/2]

vcl::TrueTypeTableGeneric::TrueTypeTableGeneric ( sal_uInt32  tag,
sal_uInt32  nbytes,
const sal_uInt8 ptr 
)

Creates a new raw TrueType table.

The difference between this constructor and TrueTypeTableNew_tag constructors is that the latter create structured tables while this constructor just copies memory pointed to by ptr to its buffer and stores its length. This constructor is suitable for data that is not supposed to be processed in any way, just written to the resulting TTF file.

Definition at line 624 of file ttcr.cxx.

References m_ptr, and vcl::ttmalloc().

◆ TrueTypeTableGeneric() [2/2]

vcl::TrueTypeTableGeneric::TrueTypeTableGeneric ( sal_uInt32  tag,
sal_uInt32  nbytes,
std::unique_ptr< sal_uInt8[]>  ptr 
)

Definition at line 636 of file ttcr.cxx.

References m_ptr.

◆ ~TrueTypeTableGeneric()

vcl::TrueTypeTableGeneric::~TrueTypeTableGeneric ( )
overridevirtual

Definition at line 278 of file ttcr.cxx.

Member Function Documentation

◆ GetRawData()

int vcl::TrueTypeTableGeneric::GetRawData ( TableEntry )
overridevirtual

This function converts the data of a TrueType table to a raw array of bytes.

It may allocates the memory for it and returns the size of the raw data in bytes. If memory is allocated it does not need to be freed by the caller of this function, since the pointer to it is stored in the TrueTypeTable and it is freed by the destructor

Returns
TTCRErrCode

Implements vcl::TrueTypeTable.

Definition at line 325 of file ttcr.cxx.

References vcl::TableEntry::data, vcl::TableEntry::length, m_nbytes, m_ptr, vcl::TrueTypeTable::m_tag, vcl::TableEntry::tag, and vcl::TTCR_OK.

Member Data Documentation

◆ m_nbytes

sal_uInt32 vcl::TrueTypeTableGeneric::m_nbytes
private

Definition at line 132 of file ttcr.hxx.

Referenced by GetRawData().

◆ m_ptr

std::unique_ptr<sal_uInt8[]> vcl::TrueTypeTableGeneric::m_ptr
private

Definition at line 133 of file ttcr.hxx.

Referenced by GetRawData(), and TrueTypeTableGeneric().


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