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

#include <graphicfilter.hxx>

Collaboration diagram for GraphicDescriptor:
[legend]

Public Member Functions

 GraphicDescriptor (const INetURLObject &rPath)
 Ctor to set a filename. More...
 
 GraphicDescriptor (SvStream &rInStream, const OUString *pPath)
 Ctor using a stream. More...
 
 ~GraphicDescriptor ()
 
bool Detect (bool bExtendedInfo=false)
 starts the detection More...
 
GraphicFileFormat GetFileFormat () const
 
const SizeGetSizePixel () const
 
const SizeGetSize_100TH_MM () const
 
sal_uInt16 GetBitsPerPixel () const
 
sal_uInt8 GetNumberOfImageComponents () const
 

Static Public Member Functions

static OUString GetImportFormatShortName (GraphicFileFormat nFormat)
 

Private Member Functions

void ImpConstruct ()
 
bool ImpDetectBMP (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectGIF (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectJPG (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPCD (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPCX (SvStream &rStm)
 
bool ImpDetectPNG (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectTIF (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectXBM (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectXPM (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPBM (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPGM (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPPM (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectRAS (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectTGA (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPSD (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectEPS (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectDXF (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectMET (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectPCT (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectSVM (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectWMF (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectEMF (SvStream &rStm, bool bExtendedInfo)
 
bool ImpDetectSVG (SvStream &rStm, bool bExtendedInfo)
 
 GraphicDescriptor (const GraphicDescriptor &)=delete
 
GraphicDescriptoroperator= (const GraphicDescriptor &)=delete
 

Private Attributes

SvStreampFileStm
 
OUString aPathExt
 
Size aPixSize
 
Size aLogSize
 
sal_uInt16 nBitsPerPixel
 
sal_uInt16 nPlanes
 
GraphicFileFormat nFormat
 
bool const bOwnStream
 
sal_uInt8 mnNumberOfImageComponents
 

Detailed Description

Definition at line 136 of file graphicfilter.hxx.

Constructor & Destructor Documentation

GraphicDescriptor::GraphicDescriptor ( const GraphicDescriptor )
privatedelete
GraphicDescriptor::GraphicDescriptor ( const INetURLObject rPath)

Ctor to set a filename.

Detect() must be called to identify the file If the file has no unique header (Mtf's), the format is determined from the extension

Definition at line 31 of file graphicfilter2.cxx.

References CreateStream(), ImpConstruct(), NONE, and READ.

GraphicDescriptor::GraphicDescriptor ( SvStream rInStream,
const OUString *  pPath 
)

Ctor using a stream.

Detect() must be called to identify the file As some formats (Mtf's) do not have a unique header, it makes sense to supply the file name (incl. ext.), so that the format can be derived from the extension

Definition at line 39 of file graphicfilter2.cxx.

References aPathExt, INetURLObject::GetFileExtension(), and ImpConstruct().

GraphicDescriptor::~GraphicDescriptor ( )

Definition at line 52 of file graphicfilter2.cxx.

References bOwnStream, and pFileStm.

Member Function Documentation

bool GraphicDescriptor::Detect ( bool  bExtendedInfo = false)
sal_uInt16 GraphicDescriptor::GetBitsPerPixel ( ) const
inline
Returns
bits/pixel or 0

Definition at line 212 of file graphicfilter.hxx.

GraphicFileFormat GraphicDescriptor::GetFileFormat ( ) const
inline
Returns
the file format, GraphicFileFormat::NOT if no format was recognized

Definition at line 203 of file graphicfilter.hxx.

OUString GraphicDescriptor::GetImportFormatShortName ( GraphicFileFormat  nFormat)
static
Returns
filter number that is needed by the GraphFilter to read this format

Definition at line 1105 of file graphicfilter2.cxx.

References BMP, DXF, EMF, EPS, GIF, JPG, MET, PBM, PCD, PCT, PCX, PGM, PNG, PPM, PSD, RAS, SVG, SVM, TGA, TIF, WMF, XBM, and XPM.

sal_uInt8 GraphicDescriptor::GetNumberOfImageComponents ( ) const
inline
Returns
number of color channels

Definition at line 215 of file graphicfilter.hxx.

const Size& GraphicDescriptor::GetSize_100TH_MM ( ) const
inline
Returns
the logical graphic size in 1/100mm or 0 size

Definition at line 209 of file graphicfilter.hxx.

Referenced by ImpGraphic::ImplSetPrepared().

const Size& GraphicDescriptor::GetSizePixel ( ) const
inline
Returns
graphic size in pixels or 0 size

Definition at line 206 of file graphicfilter.hxx.

Referenced by ImpGraphic::ImplSetPrepared().

void GraphicDescriptor::ImpConstruct ( )
private

Definition at line 95 of file graphicfilter2.cxx.

References mnNumberOfImageComponents, nBitsPerPixel, nFormat, NOT, and nPlanes.

Referenced by GraphicDescriptor().

bool GraphicDescriptor::ImpDetectBMP ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectDXF ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 923 of file graphicfilter2.cxx.

References aPathExt, DXF, and nFormat.

Referenced by Detect().

bool GraphicDescriptor::ImpDetectEMF ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectEPS ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectGIF ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectJPG ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectMET ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 932 of file graphicfilter2.cxx.

References aPathExt, MET, and nFormat.

Referenced by Detect().

bool GraphicDescriptor::ImpDetectPBM ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 752 of file graphicfilter2.cxx.

References aPathExt, nFormat, PBM, SvStream::ReadUChar(), SvStream::Seek(), and SvStream::Tell().

Referenced by Detect().

bool GraphicDescriptor::ImpDetectPCD ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectPCT ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 941 of file graphicfilter2.cxx.

References aPathExt, isPCT(), nFormat, PCT, SvStream::remainingSize(), SvStream::Seek(), and SvStream::Tell().

Referenced by Detect().

bool GraphicDescriptor::ImpDetectPCX ( SvStream rStm)
private
bool GraphicDescriptor::ImpDetectPGM ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 775 of file graphicfilter2.cxx.

References aPathExt, nFormat, PGM, SvStream::ReadUChar(), SvStream::Seek(), and SvStream::Tell().

Referenced by Detect().

bool GraphicDescriptor::ImpDetectPNG ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectPPM ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 797 of file graphicfilter2.cxx.

References aPathExt, nFormat, PPM, SvStream::ReadUChar(), SvStream::Seek(), and SvStream::Tell().

Referenced by Detect().

bool GraphicDescriptor::ImpDetectPSD ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectRAS ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectSVG ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 1096 of file graphicfilter2.cxx.

References aPathExt, nFormat, and SVG.

Referenced by Detect().

bool GraphicDescriptor::ImpDetectSVM ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectTGA ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 835 of file graphicfilter2.cxx.

References aPathExt, nFormat, and TGA.

Referenced by Detect().

bool GraphicDescriptor::ImpDetectTIF ( SvStream rStm,
bool  bExtendedInfo 
)
private
bool GraphicDescriptor::ImpDetectWMF ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 1038 of file graphicfilter2.cxx.

References aPathExt, nFormat, and WMF.

Referenced by Detect().

bool GraphicDescriptor::ImpDetectXBM ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 734 of file graphicfilter2.cxx.

References aPathExt, nFormat, and XBM.

Referenced by Detect().

bool GraphicDescriptor::ImpDetectXPM ( SvStream rStm,
bool  bExtendedInfo 
)
private

Definition at line 743 of file graphicfilter2.cxx.

References aPathExt, nFormat, and XPM.

Referenced by Detect().

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

Member Data Documentation

Size GraphicDescriptor::aLogSize
private
OUString GraphicDescriptor::aPathExt
private
Size GraphicDescriptor::aPixSize
private
bool const GraphicDescriptor::bOwnStream
private

Definition at line 146 of file graphicfilter.hxx.

Referenced by ~GraphicDescriptor().

sal_uInt8 GraphicDescriptor::mnNumberOfImageComponents
private

Definition at line 147 of file graphicfilter.hxx.

Referenced by ImpConstruct(), and ImpDetectJPG().

sal_uInt16 GraphicDescriptor::nBitsPerPixel
private
GraphicFileFormat GraphicDescriptor::nFormat
private
sal_uInt16 GraphicDescriptor::nPlanes
private
SvStream* GraphicDescriptor::pFileStm
private

Definition at line 138 of file graphicfilter.hxx.

Referenced by Detect(), and ~GraphicDescriptor().


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