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

#include <GraphicFormatDetector.hxx>

Collaboration diagram for vcl::GraphicFormatDetector:
[legend]

Public Member Functions

 GraphicFormatDetector (SvStream &rStream, OUString aFormatExtension, bool bExtendedInfo=false)
 
bool detect ()
 
bool checkMET ()
 
bool checkBMP ()
 
bool checkWMF ()
 
bool checkEMF ()
 
bool checkPCX ()
 
bool checkTIF ()
 
bool checkGIF ()
 
bool checkPNG ()
 
bool checkAPNG ()
 
bool checkJPG ()
 
bool checkSVM ()
 
bool checkPCD ()
 
bool checkPSD ()
 
bool checkEPS ()
 
bool checkDXF ()
 
bool checkPCT ()
 
bool checkPBM ()
 
bool checkPGM ()
 
bool checkPPM ()
 
bool checkRAS ()
 
bool checkXPM ()
 
bool checkXBM ()
 
bool checkSVG ()
 
bool checkTGA ()
 
bool checkMOV ()
 
bool checkPDF ()
 
bool checkWEBP ()
 
const GraphicMetadatagetMetadata ()
 

Public Attributes

SvStreammrStream
 
OUString maExtension
 
std::vector< sal_uInt8maFirstBytes
 
sal_uInt32 mnFirstLong
 
sal_uInt32 mnSecondLong
 
sal_uInt64 mnStreamPosition
 
sal_uInt64 mnStreamLength
 

Private Member Functions

sal_uInt8checkAndUncompressBuffer (sal_uInt8 *aUncompressedBuffer, sal_uInt32 nSize, sal_uInt64 &nDecompressedSize)
 Checks whether mrStream needs to be uncompressed and returns a pointer to the to aUncompressedBuffer or a pointer to maFirstBytes if it doesn't need to be uncompressed. More...
 

Private Attributes

bool mbExtendedInfo
 
bool mbWasCompressed
 
GraphicMetadata maMetadata
 

Detailed Description

Definition at line 144 of file GraphicFormatDetector.hxx.

Constructor & Destructor Documentation

◆ GraphicFormatDetector()

vcl::GraphicFormatDetector::GraphicFormatDetector ( SvStream rStream,
OUString  aFormatExtension,
bool  bExtendedInfo = false 
)

Definition at line 375 of file GraphicFormatDetector.cxx.

Member Function Documentation

◆ checkAndUncompressBuffer()

sal_uInt8 * vcl::GraphicFormatDetector::checkAndUncompressBuffer ( sal_uInt8 aUncompressedBuffer,
sal_uInt32  nSize,
sal_uInt64 &  nDecompressedSize 
)
private

Checks whether mrStream needs to be uncompressed and returns a pointer to the to aUncompressedBuffer or a pointer to maFirstBytes if it doesn't need to be uncompressed.

Parameters
aUncompressedBufferthe buffer to hold the uncompressed data
nSizethe amount of bytes to uncompress
nRetSizethe amount of bytes actually uncompressed
Returns
sal_uInt8* a pointer to maFirstBytes or aUncompressed buffer

Definition at line 1404 of file GraphicFormatDetector.cxx.

References ZCodec::BeginCompression(), ZCodec::EndCompression(), i, ZCodec::IsZCompressed(), maFirstBytes, mbWasCompressed, mnFirstLong, mnSecondLong, mnStreamPosition, mrStream, ZCodec::Read(), SvStream::Seek(), and ZCODEC_DEFAULT_COMPRESSION.

Referenced by checkEMF(), checkSVG(), and checkWMF().

◆ checkAPNG()

bool vcl::GraphicFormatDetector::checkAPNG ( )

◆ checkBMP()

bool vcl::GraphicFormatDetector::checkBMP ( )

◆ checkDXF()

bool vcl::GraphicFormatDetector::checkDXF ( )

◆ checkEMF()

bool vcl::GraphicFormatDetector::checkEMF ( )

◆ checkEPS()

bool vcl::GraphicFormatDetector::checkEPS ( )

◆ checkGIF()

bool vcl::GraphicFormatDetector::checkGIF ( )

◆ checkJPG()

bool vcl::GraphicFormatDetector::checkJPG ( )

◆ checkMET()

bool vcl::GraphicFormatDetector::checkMET ( )

◆ checkMOV()

bool vcl::GraphicFormatDetector::checkMOV ( )

Definition at line 1359 of file GraphicFormatDetector.cxx.

References maFirstBytes, maMetadata, GraphicMetadata::mnFormat, and MOV.

Referenced by vcl::peekGraphicFormat().

◆ checkPBM()

bool vcl::GraphicFormatDetector::checkPBM ( )

◆ checkPCD()

bool vcl::GraphicFormatDetector::checkPCD ( )

◆ checkPCT()

bool vcl::GraphicFormatDetector::checkPCT ( )

◆ checkPCX()

bool vcl::GraphicFormatDetector::checkPCX ( )

◆ checkPDF()

bool vcl::GraphicFormatDetector::checkPDF ( )

Definition at line 1372 of file GraphicFormatDetector.cxx.

References maFirstBytes, maMetadata, GraphicMetadata::mnFormat, and PDF.

Referenced by vcl::peekGraphicFormat().

◆ checkPGM()

bool vcl::GraphicFormatDetector::checkPGM ( )

◆ checkPNG()

bool vcl::GraphicFormatDetector::checkPNG ( )

◆ checkPPM()

bool vcl::GraphicFormatDetector::checkPPM ( )

◆ checkPSD()

bool vcl::GraphicFormatDetector::checkPSD ( )

◆ checkRAS()

bool vcl::GraphicFormatDetector::checkRAS ( )

◆ checkSVG()

bool vcl::GraphicFormatDetector::checkSVG ( )

◆ checkSVM()

bool vcl::GraphicFormatDetector::checkSVM ( )

◆ checkTGA()

bool vcl::GraphicFormatDetector::checkTGA ( )

◆ checkTIF()

bool vcl::GraphicFormatDetector::checkTIF ( )

◆ checkWEBP()

bool vcl::GraphicFormatDetector::checkWEBP ( )

◆ checkWMF()

bool vcl::GraphicFormatDetector::checkWMF ( )

◆ checkXBM()

bool vcl::GraphicFormatDetector::checkXBM ( )

◆ checkXPM()

bool vcl::GraphicFormatDetector::checkXPM ( )

◆ detect()

bool vcl::GraphicFormatDetector::detect ( )

◆ getMetadata()

const GraphicMetadata & vcl::GraphicFormatDetector::getMetadata ( )

Member Data Documentation

◆ maExtension

OUString vcl::GraphicFormatDetector::maExtension

Definition at line 148 of file GraphicFormatDetector.hxx.

Referenced by checkTGA().

◆ maFirstBytes

std::vector<sal_uInt8> vcl::GraphicFormatDetector::maFirstBytes

◆ maMetadata

GraphicMetadata vcl::GraphicFormatDetector::maMetadata
private

◆ mbExtendedInfo

bool vcl::GraphicFormatDetector::mbExtendedInfo
private

◆ mbWasCompressed

bool vcl::GraphicFormatDetector::mbWasCompressed
private

Definition at line 203 of file GraphicFormatDetector.hxx.

Referenced by checkAndUncompressBuffer(), checkEMF(), checkSVG(), and checkWMF().

◆ mnFirstLong

sal_uInt32 vcl::GraphicFormatDetector::mnFirstLong

◆ mnSecondLong

sal_uInt32 vcl::GraphicFormatDetector::mnSecondLong

Definition at line 152 of file GraphicFormatDetector.hxx.

Referenced by checkAndUncompressBuffer(), checkPNG(), checkPSD(), and detect().

◆ mnStreamLength

sal_uInt64 vcl::GraphicFormatDetector::mnStreamLength

◆ mnStreamPosition

sal_uInt64 vcl::GraphicFormatDetector::mnStreamPosition

◆ mrStream

SvStream& vcl::GraphicFormatDetector::mrStream

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