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

#include <impgraph.hxx>

Collaboration diagram for ImpGraphic:
[legend]

Public Member Functions

 ImpGraphic ()
 
 ImpGraphic (const ImpGraphic &rImpGraphic)
 
 ImpGraphic (ImpGraphic &&rImpGraphic) noexcept
 
 ImpGraphic (const GraphicExternalLink &rExternalLink)
 
 ImpGraphic (const Bitmap &rBmp)
 
 ImpGraphic (const BitmapEx &rBmpEx)
 
 ImpGraphic (const VectorGraphicDataPtr &rVectorGraphicDataPtr)
 
 ImpGraphic (const Animation &rAnimation)
 
 ImpGraphic (const GDIMetaFile &rMtf)
 
 ~ImpGraphic ()
 
void ImplSetPrepared (bool bAnimated, const Size *pSizeHint)
 

Private Member Functions

ImpGraphicoperator= (const ImpGraphic &rImpGraphic)
 
ImpGraphicoperator= (ImpGraphic &&rImpGraphic)
 
bool operator== (const ImpGraphic &rImpGraphic) const
 
bool operator!= (const ImpGraphic &rImpGraphic) const
 
OUString const & getOriginURL () const
 
void setOriginURL (OUString const &rOriginURL)
 
OString getUniqueID ()
 
bool hasPdfData () const
 
void ImplCreateSwapInfo ()
 
void ImplClearGraphics ()
 
void ImplClear ()
 
GraphicType ImplGetType () const
 
void ImplSetDefaultType ()
 
bool ImplIsSupportedGraphic () const
 
bool ImplIsTransparent () const
 
bool ImplIsAlpha () const
 
bool ImplIsAnimated () const
 
bool ImplIsEPS () const
 
bool isAvailable () const
 
bool makeAvailable ()
 
Bitmap ImplGetBitmap (const GraphicConversionParameters &rParameters) const
 
BitmapEx ImplGetBitmapEx (const GraphicConversionParameters &rParameters) const
 
const BitmapExImplGetBitmapExRef () const
 Gives direct access to the contained BitmapEx. More...
 
Animation ImplGetAnimation () const
 
const GDIMetaFileImplGetGDIMetaFile () const
 
Size ImplGetSizePixel () const
 
Size ImplGetPrefSize () const
 
void ImplSetPrefSize (const Size &rPrefSize)
 
MapMode ImplGetPrefMapMode () const
 
void ImplSetPrefMapMode (const MapMode &rPrefMapMode)
 
sal_uLong ImplGetSizeBytes () const
 
void ImplDraw (OutputDevice *pOutDev, const Point &rDestPt) const
 
void ImplDraw (OutputDevice *pOutDev, const Point &rDestPt, const Size &rDestSize) const
 
void ImplStartAnimation (OutputDevice *pOutDev, const Point &rDestPt, const Size &rDestSize, long nExtraData, OutputDevice *pFirstFrameOutDev)
 
void ImplStopAnimation (OutputDevice *pOutputDevice, long nExtraData)
 
void ImplSetAnimationNotifyHdl (const Link< Animation *, void > &rLink)
 
Link< Animation *, voidImplGetAnimationNotifyHdl () const
 
sal_uInt32 ImplGetAnimationLoopCount () const
 
std::shared_ptr< GraphicReader > & ImplGetContext ()
 
void ImplSetContext (const std::shared_ptr< GraphicReader > &pReader)
 
void ImplSetDummyContext (bool value)
 
bool ImplReadEmbedded (SvStream &rIStream)
 
bool ImplWriteEmbedded (SvStream &rOStream)
 
bool ImplSwapIn ()
 
bool ImplSwapIn (SvStream *pIStm)
 
bool ImplSwapOut ()
 
bool ImplSwapOut (SvStream *pOStm)
 
bool ImplIsSwapOut () const
 
bool ImplIsDummyContext () const
 
void ImplSetLink (const std::shared_ptr< GfxLink > &)
 
std::shared_ptr< GfxLinkImplGetSharedGfxLink () const
 
GfxLink ImplGetLink ()
 
bool ImplIsLink () const
 
BitmapChecksum ImplGetChecksum () const
 
bool ImplExportNative (SvStream &rOStm) const
 
const VectorGraphicDataPtrgetVectorGraphicData () const
 
const std::shared_ptr< std::vector< sal_Int8 > > & getPdfData () const
 
void setPdfData (const std::shared_ptr< std::vector< sal_Int8 >> &rPdfData)
 
bool ensureAvailable () const
 
bool loadPrepared ()
 

Private Attributes

GDIMetaFile maMetaFile
 
BitmapEx maEx
 
ImpSwapInfo maSwapInfo
 
std::unique_ptr< AnimationmpAnimation
 
std::shared_ptr< GraphicReadermpContext
 
std::shared_ptr< ImpSwapFilempSwapFile
 
std::shared_ptr< GfxLinkmpGfxLink
 
GraphicType meType
 
sal_uLong mnSizeBytes
 
bool mbSwapOut
 
bool mbDummyContext
 
VectorGraphicDataPtr maVectorGraphicData
 
BitmapChecksum mnChecksum = 0
 
std::shared_ptr< std::vector< sal_Int8 > > mpPdfData
 The PDF stream from which this Graphic is rendered, as converted (version downgraded) from the original, which should be in GfxLink. More...
 
std::unique_ptr< GraphicIDmpGraphicID
 
GraphicExternalLink maGraphicExternalLink
 
std::chrono::high_resolution_clock::time_point maLastUsed
 
bool mbPrepared
 
sal_Int32 mnPageNumber
 Used with GfxLink and/or PdfData when they store original media which might be multi-page (PDF, f.e.) and we need to re-render this Graphic (a page) from the source in GfxLink or PdfData. More...
 

Friends

class Graphic
 
class GraphicID
 
class vcl::graphic::Manager
 
void WriteImpGraphic (SvStream &rOStm, const ImpGraphic &rImpGraphic)
 
void ReadImpGraphic (SvStream &rIStm, ImpGraphic &rImpGraphic)
 

Detailed Description

Definition at line 68 of file impgraph.hxx.

Constructor & Destructor Documentation

ImpGraphic::ImpGraphic ( )

Definition at line 190 of file impgraph.cxx.

References meType, and NONE.

Referenced by ImplReadEmbedded().

ImpGraphic::ImpGraphic ( const ImpGraphic rImpGraphic)

Definition at line 201 of file impgraph.cxx.

References maEx, meType, mpAnimation, and mpContext.

ImpGraphic::ImpGraphic ( ImpGraphic &&  rImpGraphic)
noexcept

Definition at line 226 of file impgraph.cxx.

ImpGraphic::ImpGraphic ( const GraphicExternalLink rExternalLink)
ImpGraphic::ImpGraphic ( const Bitmap rBmp)

Definition at line 261 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const BitmapEx rBmpEx)

Definition at line 273 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const VectorGraphicDataPtr rVectorGraphicDataPtr)

Definition at line 285 of file impgraph.cxx.

References get(), meType, and NONE.

ImpGraphic::ImpGraphic ( const Animation rAnimation)

Definition at line 297 of file impgraph.cxx.

References meType, and mpAnimation.

ImpGraphic::ImpGraphic ( const GDIMetaFile rMtf)

Definition at line 310 of file impgraph.cxx.

References GdiMetafile, and meType.

ImpGraphic::~ImpGraphic ( )

Member Function Documentation

bool ImpGraphic::ensureAvailable ( ) const
private
OUString const& ImpGraphic::getOriginURL ( ) const
inlineprivate

Definition at line 127 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by ImplSwapOut().

const std::shared_ptr< std::vector< sal_Int8 > > & ImpGraphic::getPdfData ( ) const
private

Definition at line 481 of file impgraph.cxx.

References ensureAvailable(), and mpPdfData.

Referenced by GraphicID::GraphicID().

OString ImpGraphic::getUniqueID ( )
inlineprivate

Definition at line 137 of file impgraph.hxx.

References GraphicID.

const VectorGraphicDataPtr & ImpGraphic::getVectorGraphicData ( ) const
private

Definition at line 467 of file impgraph.cxx.

References ensureAvailable(), and maVectorGraphicData.

Referenced by GraphicID::GraphicID(), and WriteImpGraphic().

bool ImpGraphic::hasPdfData ( ) const
inlineprivate

Definition at line 144 of file impgraph.hxx.

Referenced by GraphicID::GraphicID(), and WriteImpGraphic().

void ImpGraphic::ImplClear ( )
private
void ImpGraphic::ImplClearGraphics ( )
private
void ImpGraphic::ImplCreateSwapInfo ( )
private
void ImpGraphic::ImplDraw ( OutputDevice pOutDev,
const Point rDestPt 
) const
private
void ImpGraphic::ImplDraw ( OutputDevice pOutDev,
const Point rDestPt,
const Size rDestSize 
) const
private
bool ImpGraphic::ImplExportNative ( SvStream rOStm) const
private
Animation ImpGraphic::ImplGetAnimation ( ) const
private

Definition at line 820 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

Referenced by GraphicID::GraphicID().

sal_uInt32 ImpGraphic::ImplGetAnimationLoopCount ( ) const
private

Definition at line 1235 of file impgraph.cxx.

References maSwapInfo, mbSwapOut, ImpSwapInfo::mnAnimationLoopCount, and mpAnimation.

Referenced by ImplCreateSwapInfo().

Link< Animation *, void > ImpGraphic::ImplGetAnimationNotifyHdl ( ) const
private

Definition at line 1223 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

Bitmap ImpGraphic::ImplGetBitmap ( const GraphicConversionParameters rParameters) const
private
BitmapEx ImpGraphic::ImplGetBitmapEx ( const GraphicConversionParameters rParameters) const
private
const BitmapEx & ImpGraphic::ImplGetBitmapExRef ( ) const
private

Gives direct access to the contained BitmapEx.

Definition at line 831 of file impgraph.cxx.

References ensureAvailable(), and maEx.

Referenced by GraphicID::GraphicID().

BitmapChecksum ImpGraphic::ImplGetChecksum ( ) const
private
std::shared_ptr<GraphicReader>& ImpGraphic::ImplGetContext ( )
inlineprivate

Definition at line 203 of file impgraph.hxx.

References mpContext.

const GDIMetaFile & ImpGraphic::ImplGetGDIMetaFile ( ) const
private
GfxLink ImpGraphic::ImplGetLink ( )
private

Definition at line 1689 of file impgraph.cxx.

References ensureAvailable(), and mpGfxLink.

MapMode ImpGraphic::ImplGetPrefMapMode ( ) const
private
Size ImpGraphic::ImplGetPrefSize ( ) const
private
std::shared_ptr< GfxLink > ImpGraphic::ImplGetSharedGfxLink ( ) const
private

Definition at line 1684 of file impgraph.cxx.

References mpGfxLink.

sal_uLong ImpGraphic::ImplGetSizeBytes ( ) const
private
Size ImpGraphic::ImplGetSizePixel ( ) const
private
GraphicType ImpGraphic::ImplGetType ( ) const
inlineprivate

Definition at line 153 of file impgraph.hxx.

References meType.

Referenced by GraphicID::GraphicID(), ImplGetBitmap(), and WriteImpGraphic().

bool ImpGraphic::ImplIsAlpha ( ) const
private
bool ImpGraphic::ImplIsAnimated ( ) const
private
bool ImpGraphic::ImplIsDummyContext ( ) const
inlineprivate

Definition at line 216 of file impgraph.hxx.

References mbDummyContext.

bool ImpGraphic::ImplIsEPS ( ) const
private
bool ImpGraphic::ImplIsLink ( ) const
private

Definition at line 1696 of file impgraph.cxx.

References mpGfxLink.

bool ImpGraphic::ImplIsSupportedGraphic ( ) const
private
bool ImpGraphic::ImplIsSwapOut ( ) const
inlineprivate
bool ImpGraphic::ImplIsTransparent ( ) const
private
bool ImpGraphic::ImplReadEmbedded ( SvStream rIStream)
private
void ImpGraphic::ImplSetAnimationNotifyHdl ( const Link< Animation *, void > &  rLink)
private

Definition at line 1215 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

void ImpGraphic::ImplSetContext ( const std::shared_ptr< GraphicReader > &  pReader)
private

Definition at line 1243 of file impgraph.cxx.

References mbDummyContext, and mpContext.

void ImpGraphic::ImplSetDefaultType ( )
private

Definition at line 599 of file impgraph.cxx.

References Default, ImplClear(), and meType.

void ImpGraphic::ImplSetDummyContext ( bool  value)
inlineprivate

Definition at line 205 of file impgraph.hxx.

void ImpGraphic::ImplSetLink ( const std::shared_ptr< GfxLink > &  rGfxLink)
private

Definition at line 1677 of file impgraph.cxx.

References ensureAvailable(), and mpGfxLink.

Referenced by ReadImpGraphic().

void ImpGraphic::ImplSetPrefMapMode ( const MapMode rPrefMapMode)
private
void ImpGraphic::ImplSetPrefSize ( const Size rPrefSize)
private
void ImpGraphic::ImplSetPrepared ( bool  bAnimated,
const Size pSizeHint 
)
void ImpGraphic::ImplStartAnimation ( OutputDevice pOutDev,
const Point rDestPt,
const Size rDestSize,
long  nExtraData,
OutputDevice pFirstFrameOutDev 
)
private
void ImpGraphic::ImplStopAnimation ( OutputDevice pOutputDevice,
long  nExtraData 
)
private
bool ImpGraphic::ImplSwapIn ( )
private
bool ImpGraphic::ImplSwapIn ( SvStream pIStm)
private
bool ImpGraphic::ImplSwapOut ( )
private
bool ImpGraphic::ImplSwapOut ( SvStream pOStm)
private
bool ImpGraphic::ImplWriteEmbedded ( SvStream rOStream)
private
bool ImpGraphic::isAvailable ( ) const
private

Definition at line 661 of file impgraph.cxx.

References mbPrepared, and mbSwapOut.

Referenced by vcl::graphic::Manager::getGraphicSizeBytes(), and operator==().

bool ImpGraphic::loadPrepared ( )
private
bool ImpGraphic::makeAvailable ( )
private

Definition at line 666 of file impgraph.cxx.

References ensureAvailable().

bool ImpGraphic::operator!= ( const ImpGraphic rImpGraphic) const
inlineprivate

Definition at line 125 of file impgraph.hxx.

ImpGraphic & ImpGraphic::operator= ( const ImpGraphic rImpGraphic)
private
ImpGraphic & ImpGraphic::operator= ( ImpGraphic &&  rImpGraphic)
private
bool ImpGraphic::operator== ( const ImpGraphic rImpGraphic) const
private
void ImpGraphic::setOriginURL ( OUString const &  rOriginURL)
inlineprivate

Definition at line 132 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by ImplSwapIn().

void ImpGraphic::setPdfData ( const std::shared_ptr< std::vector< sal_Int8 >> &  rPdfData)
private

Definition at line 474 of file impgraph.cxx.

References ensureAvailable(), and mpPdfData.

Friends And Related Function Documentation

friend class Graphic
friend

Definition at line 70 of file impgraph.hxx.

friend class GraphicID
friend

Definition at line 71 of file impgraph.hxx.

Referenced by getUniqueID().

void ReadImpGraphic ( SvStream rIStm,
ImpGraphic rImpGraphic 
)
friend

Definition at line 1769 of file impgraph.cxx.

Referenced by ImplReadEmbedded().

friend class vcl::graphic::Manager
friend

Definition at line 72 of file impgraph.hxx.

void WriteImpGraphic ( SvStream rOStm,
const ImpGraphic rImpGraphic 
)
friend

Definition at line 1948 of file impgraph.cxx.

Referenced by ImplExportNative(), and ImplWriteEmbedded().

Member Data Documentation

BitmapEx ImpGraphic::maEx
private
GraphicExternalLink ImpGraphic::maGraphicExternalLink
private

Definition at line 96 of file impgraph.hxx.

Referenced by ImplClear(), loadPrepared(), and operator=().

std::chrono::high_resolution_clock::time_point ImpGraphic::maLastUsed
private

Definition at line 98 of file impgraph.hxx.

Referenced by operator=().

GDIMetaFile ImpGraphic::maMetaFile
private
ImpSwapInfo ImpGraphic::maSwapInfo
private
VectorGraphicDataPtr ImpGraphic::maVectorGraphicData
private
bool ImpGraphic::mbDummyContext
private

Definition at line 86 of file impgraph.hxx.

Referenced by ImplIsDummyContext(), ImplSetContext(), ImplSwapIn(), and operator=().

bool ImpGraphic::mbPrepared
private
bool ImpGraphic::mbSwapOut
private
GraphicType ImpGraphic::meType
private
BitmapChecksum ImpGraphic::mnChecksum = 0
mutableprivate

Definition at line 89 of file impgraph.hxx.

Referenced by ImplGetChecksum().

sal_Int32 ImpGraphic::mnPageNumber
private

Used with GfxLink and/or PdfData when they store original media which might be multi-page (PDF, f.e.) and we need to re-render this Graphic (a page) from the source in GfxLink or PdfData.

Definition at line 104 of file impgraph.hxx.

Referenced by GraphicID::GraphicID(), operator=(), ReadImpGraphic(), and WriteImpGraphic().

sal_uLong ImpGraphic::mnSizeBytes
mutableprivate

Definition at line 84 of file impgraph.hxx.

Referenced by ImplClear(), ImplGetSizeBytes(), and operator=().

std::unique_ptr<Animation> ImpGraphic::mpAnimation
private
std::shared_ptr<GraphicReader> ImpGraphic::mpContext
private

Definition at line 80 of file impgraph.hxx.

Referenced by ImplGetContext(), ImplSetContext(), ImplSwapIn(), and operator=().

std::shared_ptr<GfxLink> ImpGraphic::mpGfxLink
private
std::unique_ptr<GraphicID> ImpGraphic::mpGraphicID
private

Definition at line 95 of file impgraph.hxx.

std::shared_ptr<std::vector<sal_Int8> > ImpGraphic::mpPdfData
private

The PDF stream from which this Graphic is rendered, as converted (version downgraded) from the original, which should be in GfxLink.

Definition at line 94 of file impgraph.hxx.

Referenced by getPdfData(), ImplClearGraphics(), ImplGetChecksum(), operator=(), operator==(), ReadImpGraphic(), setPdfData(), and WriteImpGraphic().

std::shared_ptr<ImpSwapFile> ImpGraphic::mpSwapFile
private

Definition at line 81 of file impgraph.hxx.

Referenced by ImplClear(), ImplSwapIn(), ImplSwapOut(), and operator=().


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