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 (GraphicExternalLink aExternalLink)
 
 ImpGraphic (std::shared_ptr< GfxLink > xGfxLink, sal_Int32 nPageIndex=0)
 
 ImpGraphic (const BitmapEx &rBmpEx)
 
 ImpGraphic (const std::shared_ptr< VectorGraphicData > &rVectorGraphicDataPtr)
 
 ImpGraphic (const Animation &rAnimation)
 
 ImpGraphic (const GDIMetaFile &rMtf)
 
 ~ImpGraphic ()
 
void setPrepared (bool bAnimated, const Size *pSizeHint)
 
void resetChecksum ()
 
bool swapIn ()
 
bool swapOut ()
 
bool isSwappedOut () const
 
SvStreamgetSwapFileStream () const
 
void updateFromLoadedGraphic (const ImpGraphic *graphic)
 
void dumpState (rtl::OStringBuffer &rState)
 

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 restoreFromSwapInfo ()
 
void clearGraphics ()
 
void clear ()
 
GraphicType getType () const
 
void setDefaultType ()
 
bool isSupportedGraphic () const
 
bool isTransparent () const
 
bool isAlpha () const
 
bool isAnimated () const
 
bool isEPS () const
 
bool isAvailable () const
 
bool makeAvailable ()
 
Bitmap getBitmap (const GraphicConversionParameters &rParameters) const
 
BitmapEx getBitmapEx (const GraphicConversionParameters &rParameters) const
 
const BitmapExgetBitmapExRef () const
 Gives direct access to the contained BitmapEx. More...
 
Animation getAnimation () const
 
const GDIMetaFilegetGDIMetaFile () const
 
Size getSizePixel () const
 
Size getPrefSize () const
 
void setPrefSize (const Size &rPrefSize)
 
MapMode getPrefMapMode () const
 
void setPrefMapMode (const MapMode &rPrefMapMode)
 
sal_uLong getSizeBytes () const
 
void draw (OutputDevice &rOutDev, const Point &rDestPt) const
 
void draw (OutputDevice &rOutDev, const Point &rDestPt, const Size &rDestSize) const
 
void startAnimation (OutputDevice &rOutDev, const Point &rDestPt, const Size &rDestSize, tools::Long nRendererId, OutputDevice *pFirstFrameOutDev)
 
void stopAnimation (const OutputDevice *pOutputDevice, tools::Long nRendererId)
 
void setAnimationNotifyHdl (const Link< Animation *, void > &rLink)
 
Link< Animation *, void > getAnimationNotifyHdl () const
 
sal_uInt32 getAnimationLoopCount () const
 
bool swapInFromStream (SvStream &rStream)
 
bool swapInGraphic (SvStream &rStream)
 
bool swapInContent (SvStream &rStream)
 
bool swapOutContent (SvStream &rStream)
 
bool swapOutGraphic (SvStream &rStream)
 
std::shared_ptr< GraphicReader > & getContext ()
 
void setContext (const std::shared_ptr< GraphicReader > &pReader)
 
void setDummyContext (bool value)
 
bool isDummyContext () const
 
void setGfxLink (const std::shared_ptr< GfxLink > &)
 
const std::shared_ptr< GfxLink > & getSharedGfxLink () const
 
GfxLink getGfxLink () const
 
bool isGfxLink () const
 
BitmapChecksum getChecksum () const
 
const std::shared_ptr< VectorGraphicData > & getVectorGraphicData () const
 
BitmapEx getVectorGraphicReplacement () const
 Gets the bitmap replacement for a vector graphic. More...
 
bool ensureAvailable () const
 
sal_Int32 getPageNumber () const
 
void setValuesForPrefSize (const Size &rPrefSize)
 
void setValuesForPrefMapMod (const MapMode &rPrefMapMode)
 

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::optional< GraphicIDmxGraphicID
 
GraphicExternalLink maGraphicExternalLink
 
std::chrono::high_resolution_clock::time_point maLastUsed
 
bool mbPrepared
 

Friends

class Graphic
 
class GraphicID
 
class vcl::graphic::Manager
 

Detailed Description

Definition at line 59 of file impgraph.hxx.

Constructor & Destructor Documentation

◆ ImpGraphic() [1/9]

ImpGraphic::ImpGraphic ( )

Definition at line 84 of file impgraph.cxx.

References meType, NONE, and now.

◆ ImpGraphic() [2/9]

ImpGraphic::ImpGraphic ( const ImpGraphic rImpGraphic)

Definition at line 94 of file impgraph.cxx.

References maBitmapEx, meType, mpAnimation, mpContext, and now.

◆ ImpGraphic() [3/9]

ImpGraphic::ImpGraphic ( ImpGraphic &&  rImpGraphic)
noexcept

Definition at line 117 of file impgraph.cxx.

References meType, mpAnimation, and mpContext.

◆ ImpGraphic() [4/9]

ImpGraphic::ImpGraphic ( GraphicExternalLink  aExternalLink)

Definition at line 155 of file impgraph.cxx.

References Default, meType, and now.

◆ ImpGraphic() [5/9]

ImpGraphic::ImpGraphic ( std::shared_ptr< GfxLink xGfxLink,
sal_Int32  nPageIndex = 0 
)

◆ ImpGraphic() [6/9]

ImpGraphic::ImpGraphic ( const BitmapEx rBmpEx)

Definition at line 166 of file impgraph.cxx.

References meType, NONE, and now.

◆ ImpGraphic() [7/9]

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

Definition at line 177 of file impgraph.cxx.

References meType, NONE, and now.

◆ ImpGraphic() [8/9]

ImpGraphic::ImpGraphic ( const Animation rAnimation)

Definition at line 188 of file impgraph.cxx.

References meType, mpAnimation, and now.

◆ ImpGraphic() [9/9]

ImpGraphic::ImpGraphic ( const GDIMetaFile rMtf)

Definition at line 200 of file impgraph.cxx.

References GdiMetafile, meType, and now.

◆ ~ImpGraphic()

ImpGraphic::~ImpGraphic ( )

Member Function Documentation

◆ clear()

void ImpGraphic::clear ( )
private

◆ clearGraphics()

void ImpGraphic::clearGraphics ( )
private

◆ createSwapInfo()

void ImpGraphic::createSwapInfo ( )
private

◆ draw() [1/2]

void ImpGraphic::draw ( OutputDevice rOutDev,
const Point rDestPt 
) const
private

◆ draw() [2/2]

void ImpGraphic::draw ( OutputDevice rOutDev,
const Point rDestPt,
const Size rDestSize 
) const
private

◆ dumpState()

void ImpGraphic::dumpState ( rtl::OStringBuffer &  rState)

◆ ensureAvailable()

bool ImpGraphic::ensureAvailable ( ) const
private

◆ getAnimation()

Animation ImpGraphic::getAnimation ( ) const
private

Definition at line 677 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

Referenced by GraphicID::GraphicID().

◆ getAnimationLoopCount()

sal_uInt32 ImpGraphic::getAnimationLoopCount ( ) const
private

Definition at line 1126 of file impgraph.cxx.

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

Referenced by createSwapInfo().

◆ getAnimationNotifyHdl()

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

Definition at line 1114 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

◆ getBitmap()

Bitmap ImpGraphic::getBitmap ( const GraphicConversionParameters rParameters) const
private

◆ getBitmapEx()

BitmapEx ImpGraphic::getBitmapEx ( const GraphicConversionParameters rParameters) const
private

◆ getBitmapExRef()

const BitmapEx & ImpGraphic::getBitmapExRef ( ) const
private

Gives direct access to the contained BitmapEx.

Definition at line 688 of file impgraph.cxx.

References ensureAvailable(), and maBitmapEx.

◆ getChecksum()

BitmapChecksum ImpGraphic::getChecksum ( ) const
private

◆ getContext()

std::shared_ptr< GraphicReader > & ImpGraphic::getContext ( )
inlineprivate

Definition at line 190 of file impgraph.hxx.

References mpContext.

◆ getGDIMetaFile()

const GDIMetaFile & ImpGraphic::getGDIMetaFile ( ) const
private

◆ getGfxLink()

GfxLink ImpGraphic::getGfxLink ( ) const
private

Definition at line 1713 of file impgraph.cxx.

References ensureAvailable(), and mpGfxLink.

◆ getOriginURL()

OUString const & ImpGraphic::getOriginURL ( ) const
inlineprivate

Definition at line 111 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by swapOut().

◆ getPageNumber()

sal_Int32 ImpGraphic::getPageNumber ( ) const
private

Definition at line 1758 of file impgraph.cxx.

References isSwappedOut(), maSwapInfo, maVectorGraphicData, and ImpSwapInfo::mnPageIndex.

Referenced by createSwapInfo().

◆ getPrefMapMode()

MapMode ImpGraphic::getPrefMapMode ( ) const
private

◆ getPrefSize()

Size ImpGraphic::getPrefSize ( ) const
private

◆ getSharedGfxLink()

const std::shared_ptr< GfxLink > & ImpGraphic::getSharedGfxLink ( ) const
private

Definition at line 1708 of file impgraph.cxx.

References mpGfxLink.

◆ getSizeBytes()

sal_uLong ImpGraphic::getSizeBytes ( ) const
private

◆ getSizePixel()

Size ImpGraphic::getSizePixel ( ) const
private

◆ getSwapFileStream()

SvStream * ImpGraphic::getSwapFileStream ( ) const

Definition at line 77 of file impgraph.cxx.

References mpSwapFile.

◆ getType()

GraphicType ImpGraphic::getType ( ) const
inlineprivate

Definition at line 134 of file impgraph.hxx.

References meType.

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

◆ getUniqueID()

OString ImpGraphic::getUniqueID ( )
inlineprivate

Definition at line 121 of file impgraph.hxx.

◆ getVectorGraphicData()

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

Definition at line 346 of file impgraph.cxx.

References ensureAvailable(), and maVectorGraphicData.

Referenced by GraphicID::GraphicID().

◆ getVectorGraphicReplacement()

BitmapEx ImpGraphic::getVectorGraphicReplacement ( ) const
private

Gets the bitmap replacement for a vector graphic.

Definition at line 524 of file impgraph.cxx.

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

Referenced by draw(), getBitmap(), getBitmapEx(), and getGDIMetaFile().

◆ isAlpha()

bool ImpGraphic::isAlpha ( ) const
private

◆ isAnimated()

bool ImpGraphic::isAnimated ( ) const
private

Definition at line 499 of file impgraph.cxx.

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

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

◆ isAvailable()

bool ImpGraphic::isAvailable ( ) const
private

Definition at line 514 of file impgraph.cxx.

References mbPrepared, and mbSwapOut.

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

◆ isDummyContext()

bool ImpGraphic::isDummyContext ( ) const
inlineprivate

Definition at line 193 of file impgraph.hxx.

◆ isEPS()

bool ImpGraphic::isEPS ( ) const
private

◆ isGfxLink()

bool ImpGraphic::isGfxLink ( ) const
private

Definition at line 1720 of file impgraph.cxx.

References mpGfxLink.

◆ isSupportedGraphic()

bool ImpGraphic::isSupportedGraphic ( ) const
private

Definition at line 458 of file impgraph.cxx.

References meType, and NONE.

Referenced by getBitmap(), getBitmapEx(), setValuesForPrefSize(), startAnimation(), and stopAnimation().

◆ isSwappedOut()

bool ImpGraphic::isSwappedOut ( ) const
inline

◆ isTransparent()

bool ImpGraphic::isTransparent ( ) const
private

◆ makeAvailable()

bool ImpGraphic::makeAvailable ( )
private

Definition at line 519 of file impgraph.cxx.

References ensureAvailable().

◆ operator!=()

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

Definition at line 109 of file impgraph.hxx.

◆ operator=() [1/2]

ImpGraphic & ImpGraphic::operator= ( const ImpGraphic rImpGraphic)
private

◆ operator=() [2/2]

ImpGraphic & ImpGraphic::operator= ( ImpGraphic &&  rImpGraphic)
private

◆ operator==()

bool ImpGraphic::operator== ( const ImpGraphic rImpGraphic) const
private

◆ resetChecksum()

void ImpGraphic::resetChecksum ( )
inline

Definition at line 216 of file impgraph.hxx.

◆ restoreFromSwapInfo()

void ImpGraphic::restoreFromSwapInfo ( )
private

◆ setAnimationNotifyHdl()

void ImpGraphic::setAnimationNotifyHdl ( const Link< Animation *, void > &  rLink)
private

Definition at line 1106 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

◆ setContext()

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

Definition at line 1134 of file impgraph.cxx.

References mbDummyContext, and mpContext.

◆ setDefaultType()

void ImpGraphic::setDefaultType ( )
private

Definition at line 452 of file impgraph.cxx.

References clear(), Default, and meType.

◆ setDummyContext()

void ImpGraphic::setDummyContext ( bool  value)
inlineprivate

Definition at line 192 of file impgraph.hxx.

References value.

◆ setGfxLink()

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

Definition at line 1701 of file impgraph.cxx.

References ensureAvailable(), and mpGfxLink.

◆ setOriginURL()

void ImpGraphic::setOriginURL ( OUString const &  rOriginURL)
inlineprivate

Definition at line 116 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by swapIn().

◆ setPrefMapMode()

void ImpGraphic::setPrefMapMode ( const MapMode rPrefMapMode)
private

Definition at line 957 of file impgraph.cxx.

References ensureAvailable(), and setValuesForPrefMapMod().

◆ setPrefSize()

void ImpGraphic::setPrefSize ( const Size rPrefSize)
private

Definition at line 870 of file impgraph.cxx.

References ensureAvailable(), and setValuesForPrefSize().

Referenced by updateFromLoadedGraphic().

◆ setPrepared()

void ImpGraphic::setPrepared ( bool  bAnimated,
const Size pSizeHint 
)

◆ setValuesForPrefMapMod()

void ImpGraphic::setValuesForPrefMapMod ( const MapMode rPrefMapMode)
private

◆ setValuesForPrefSize()

void ImpGraphic::setValuesForPrefSize ( const Size rPrefSize)
private

◆ startAnimation()

void ImpGraphic::startAnimation ( OutputDevice rOutDev,
const Point rDestPt,
const Size rDestSize,
tools::Long  nRendererId,
OutputDevice pFirstFrameOutDev 
)
private

Definition at line 1088 of file impgraph.cxx.

References ensureAvailable(), isSupportedGraphic(), isSwappedOut(), and mpAnimation.

◆ stopAnimation()

void ImpGraphic::stopAnimation ( const OutputDevice pOutputDevice,
tools::Long  nRendererId 
)
private

Definition at line 1098 of file impgraph.cxx.

References ensureAvailable(), isSupportedGraphic(), isSwappedOut(), and mpAnimation.

◆ swapIn()

bool ImpGraphic::swapIn ( )

◆ swapInContent()

bool ImpGraphic::swapInContent ( SvStream rStream)
private

◆ swapInFromStream()

bool ImpGraphic::swapInFromStream ( SvStream rStream)
private

Definition at line 1568 of file impgraph.cxx.

References clear(), clearGraphics(), SvStream::GetError(), mbSwapOut, mnChecksum, mnSizeBytes, and swapInContent().

Referenced by swapIn().

◆ swapInGraphic()

bool ImpGraphic::swapInGraphic ( SvStream rStream)
private

◆ swapOut()

bool ImpGraphic::swapOut ( )

◆ swapOutContent()

bool ImpGraphic::swapOutContent ( SvStream rStream)
private

◆ swapOutGraphic()

bool ImpGraphic::swapOutGraphic ( SvStream rStream)
private

◆ updateFromLoadedGraphic()

void ImpGraphic::updateFromLoadedGraphic ( const ImpGraphic graphic)

Friends And Related Function Documentation

◆ Graphic

friend class Graphic
friend

Definition at line 61 of file impgraph.hxx.

◆ GraphicID

friend class GraphicID
friend

Definition at line 62 of file impgraph.hxx.

◆ vcl::graphic::Manager

friend class vcl::graphic::Manager
friend

Definition at line 63 of file impgraph.hxx.

Member Data Documentation

◆ maBitmapEx

BitmapEx ImpGraphic::maBitmapEx
private

◆ maExPrefSize

Size ImpGraphic::maExPrefSize
private

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

Definition at line 70 of file impgraph.hxx.

Referenced by dumpState(), getPrefSize(), getVectorGraphicReplacement(), and setValuesForPrefSize().

◆ maGraphicExternalLink

GraphicExternalLink ImpGraphic::maGraphicExternalLink
private

Definition at line 85 of file impgraph.hxx.

Referenced by clear(), operator=(), and updateFromLoadedGraphic().

◆ maLastUsed

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

Definition at line 87 of file impgraph.hxx.

Referenced by operator=(), and swapIn().

◆ maMetaFile

GDIMetaFile ImpGraphic::maMetaFile
private

◆ maSwapInfo

ImpSwapInfo ImpGraphic::maSwapInfo
private

◆ maVectorGraphicData

std::shared_ptr<VectorGraphicData> ImpGraphic::maVectorGraphicData
private

◆ mbDummyContext

bool ImpGraphic::mbDummyContext
private

Definition at line 79 of file impgraph.hxx.

Referenced by operator=(), and setContext().

◆ mbPrepared

bool ImpGraphic::mbPrepared
private

◆ mbSwapOut

bool ImpGraphic::mbSwapOut
private

◆ meType

GraphicType ImpGraphic::meType
private

◆ mnChecksum

BitmapChecksum ImpGraphic::mnChecksum = 0
mutableprivate

Definition at line 82 of file impgraph.hxx.

Referenced by getChecksum(), swapIn(), swapInFromStream(), and updateFromLoadedGraphic().

◆ mnSizeBytes

sal_uLong ImpGraphic::mnSizeBytes
mutableprivate

◆ mpAnimation

std::unique_ptr<Animation> ImpGraphic::mpAnimation
private

◆ mpContext

std::shared_ptr<GraphicReader> ImpGraphic::mpContext
private

Definition at line 73 of file impgraph.hxx.

Referenced by operator=(), and setContext().

◆ mpGfxLink

std::shared_ptr<GfxLink> ImpGraphic::mpGfxLink
private

◆ mpSwapFile

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

Definition at line 74 of file impgraph.hxx.

Referenced by clear(), getSwapFileStream(), operator=(), swapIn(), and swapOut().

◆ mxGraphicID

std::optional<GraphicID> ImpGraphic::mxGraphicID
private

Definition at line 84 of file impgraph.hxx.


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