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 std::shared_ptr< VectorGraphicData > &rVectorGraphicDataPtr)
 
 ImpGraphic (const Animation &rAnimation)
 
 ImpGraphic (const GDIMetaFile &rMtf)
 
 ~ImpGraphic ()
 
void ImplSetPrepared (bool bAnimated, const Size *pSizeHint)
 
bool swapIn ()
 
bool swapOut ()
 
bool isSwappedOut () const
 
OUString getSwapFileURL ()
 

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 ()
 
void createSwapInfo ()
 
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 swapInFromStream (SvStream *pIStm)
 
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 std::shared_ptr< VectorGraphicData > & getVectorGraphicData () const
 
BitmapEx getVectorGraphicReplacement () const
 Gets the bitmap replacement for a vector graphic. More...
 
bool ensureAvailable () const
 
bool loadPrepared ()
 
sal_Int32 getPageNumber () const
 

Private Attributes

GDIMetaFile maMetaFile
 
BitmapEx maBitmapEx
 
Size maExPrefSize
 If maBitmapEx is empty, this preferred size will be set on it when it gets initialized. More...
 
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
 
std::shared_ptr< VectorGraphicDatamaVectorGraphicData
 
BitmapChecksum mnChecksum = 0
 
std::unique_ptr< GraphicIDmpGraphicID
 
GraphicExternalLink maGraphicExternalLink
 
std::chrono::high_resolution_clock::time_point maLastUsed
 
bool mbPrepared
 

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 50 of file impgraph.hxx.

Constructor & Destructor Documentation

ImpGraphic::ImpGraphic ( )

Definition at line 124 of file impgraph.cxx.

References meType, and NONE.

Referenced by ImplReadEmbedded().

ImpGraphic::ImpGraphic ( const ImpGraphic rImpGraphic)

Definition at line 134 of file impgraph.cxx.

References maBitmapEx, meType, mpAnimation, and mpContext.

ImpGraphic::ImpGraphic ( ImpGraphic &&  rImpGraphic)
noexcept

Definition at line 157 of file impgraph.cxx.

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

Definition at line 189 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const BitmapEx rBmpEx)

Definition at line 200 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const std::shared_ptr< VectorGraphicData > &  rVectorGraphicDataPtr)

Definition at line 211 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const Animation rAnimation)

Definition at line 222 of file impgraph.cxx.

References meType, and mpAnimation.

ImpGraphic::ImpGraphic ( const GDIMetaFile rMtf)

Definition at line 234 of file impgraph.cxx.

References GdiMetafile, and meType.

ImpGraphic::~ImpGraphic ( )

Member Function Documentation

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

Definition at line 102 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by swapOut().

sal_Int32 ImpGraphic::getPageNumber ( ) const
private

Definition at line 1614 of file impgraph.cxx.

References maVectorGraphicData.

OUString ImpGraphic::getSwapFileURL ( )

Definition at line 117 of file impgraph.cxx.

References INetURLObject::NONE.

OString ImpGraphic::getUniqueID ( )
inlineprivate

Definition at line 112 of file impgraph.hxx.

const std::shared_ptr< VectorGraphicData > & ImpGraphic::getVectorGraphicData ( ) const
private

Definition at line 380 of file impgraph.cxx.

References ensureAvailable(), and maVectorGraphicData.

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

BitmapEx ImpGraphic::getVectorGraphicReplacement ( ) const
private

Gets the bitmap replacement for a vector graphic.

Definition at line 545 of file impgraph.cxx.

References Size::getHeight(), Size::getWidth(), maExPrefSize, maVectorGraphicData, and BitmapEx::SetPrefSize().

Referenced by ImplDraw(), ImplGetBitmap(), ImplGetBitmapEx(), ImplGetGDIMetaFile(), and ImplReadEmbedded().

void ImpGraphic::ImplClear ( )
private
void ImpGraphic::ImplClearGraphics ( )
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 705 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

Referenced by GraphicID::GraphicID().

sal_uInt32 ImpGraphic::ImplGetAnimationLoopCount ( ) const
private

Definition at line 1129 of file impgraph.cxx.

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

Referenced by createSwapInfo().

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

Definition at line 1117 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 716 of file impgraph.cxx.

References ensureAvailable(), and maBitmapEx.

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

Definition at line 173 of file impgraph.hxx.

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

Definition at line 1540 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 1535 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 123 of file impgraph.hxx.

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 181 of file impgraph.hxx.

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

Definition at line 1547 of file impgraph.cxx.

References mpGfxLink.

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

Definition at line 1109 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

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

Definition at line 1137 of file impgraph.cxx.

References mbDummyContext, and mpContext.

void ImpGraphic::ImplSetDefaultType ( )
private

Definition at line 473 of file impgraph.cxx.

References Default, ImplClear(), and meType.

void ImpGraphic::ImplSetDummyContext ( bool  value)
inlineprivate

Definition at line 175 of file impgraph.hxx.

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

Definition at line 1528 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::ImplWriteEmbedded ( SvStream rOStream)
private
bool ImpGraphic::isAvailable ( ) const
private

Definition at line 535 of file impgraph.cxx.

References mbPrepared, and mbSwapOut.

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

bool ImpGraphic::isSwappedOut ( ) const
inline
bool ImpGraphic::loadPrepared ( )
private
bool ImpGraphic::makeAvailable ( )
private

Definition at line 540 of file impgraph.cxx.

References ensureAvailable().

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

Definition at line 100 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 107 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by swapIn().

bool ImpGraphic::swapIn ( )
bool ImpGraphic::swapInFromStream ( SvStream pIStm)
private
bool ImpGraphic::swapOut ( )

Friends And Related Function Documentation

friend class Graphic
friend

Definition at line 52 of file impgraph.hxx.

friend class GraphicID
friend

Definition at line 53 of file impgraph.hxx.

void ReadImpGraphic ( SvStream rIStm,
ImpGraphic rImpGraphic 
)
friend

Definition at line 1621 of file impgraph.cxx.

Referenced by ImplReadEmbedded().

friend class vcl::graphic::Manager
friend

Definition at line 54 of file impgraph.hxx.

void WriteImpGraphic ( SvStream rOStm,
const ImpGraphic rImpGraphic 
)
friend

Definition at line 1780 of file impgraph.cxx.

Referenced by ImplExportNative(), and ImplWriteEmbedded().

Member Data Documentation

BitmapEx ImpGraphic::maBitmapEx
private
Size ImpGraphic::maExPrefSize
private

If maBitmapEx is empty, this preferred size will be set on it when it gets initialized.

Definition at line 61 of file impgraph.hxx.

Referenced by getVectorGraphicReplacement(), ImplGetPrefSize(), and ImplSetPrefSize().

GraphicExternalLink ImpGraphic::maGraphicExternalLink
private

Definition at line 76 of file impgraph.hxx.

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

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

Definition at line 78 of file impgraph.hxx.

Referenced by operator=().

GDIMetaFile ImpGraphic::maMetaFile
private
ImpSwapInfo ImpGraphic::maSwapInfo
private
std::shared_ptr<VectorGraphicData> ImpGraphic::maVectorGraphicData
private
bool ImpGraphic::mbDummyContext
private

Definition at line 70 of file impgraph.hxx.

Referenced by ImplSetContext(), operator=(), and swapInFromStream().

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

Definition at line 73 of file impgraph.hxx.

Referenced by ImplGetChecksum().

sal_uLong ImpGraphic::mnSizeBytes
mutableprivate

Definition at line 68 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 64 of file impgraph.hxx.

Referenced by ImplSetContext(), operator=(), and swapInFromStream().

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

Definition at line 75 of file impgraph.hxx.

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

Definition at line 65 of file impgraph.hxx.

Referenced by ImplClear(), operator=(), swapIn(), swapInFromStream(), and swapOut().


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