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 (std::shared_ptr< GfxLink > const &rGfxLink, 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
 
OUString getSwapFileURL () const
 
void updateFromLoadedGraphic (ImpGraphic *graphic)
 

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 nExtraData, OutputDevice *pFirstFrameOutDev)
 
void stopAnimation (const OutputDevice *pOutputDevice, tools::Long nExtraData)
 
void setAnimationNotifyHdl (const Link< Animation *, void > &rLink)
 
Link< Animation *, voidgetAnimationNotifyHdl () 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::unique_ptr< GraphicIDmpGraphicID
 
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 57 of file impgraph.hxx.

Constructor & Destructor Documentation

ImpGraphic::ImpGraphic ( )

Definition at line 80 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const ImpGraphic rImpGraphic)

Definition at line 90 of file impgraph.cxx.

References maBitmapEx, meType, mpAnimation, and mpContext.

ImpGraphic::ImpGraphic ( ImpGraphic &&  rImpGraphic)
noexcept

Definition at line 113 of file impgraph.cxx.

ImpGraphic::ImpGraphic ( const GraphicExternalLink rExternalLink)
ImpGraphic::ImpGraphic ( std::shared_ptr< GfxLink > const &  rGfxLink,
sal_Int32  nPageIndex = 0 
)
ImpGraphic::ImpGraphic ( const BitmapEx rBmpEx)

Definition at line 162 of file impgraph.cxx.

References meType, and NONE.

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

Definition at line 173 of file impgraph.cxx.

References meType, and NONE.

ImpGraphic::ImpGraphic ( const Animation rAnimation)

Definition at line 184 of file impgraph.cxx.

References meType, and mpAnimation.

ImpGraphic::ImpGraphic ( const GDIMetaFile rMtf)

Definition at line 196 of file impgraph.cxx.

References GdiMetafile, and meType.

ImpGraphic::~ImpGraphic ( )

Member Function Documentation

void ImpGraphic::clear ( )
private
void ImpGraphic::clearGraphics ( )
private
void ImpGraphic::createSwapInfo ( )
private
void ImpGraphic::draw ( OutputDevice rOutDev,
const Point rDestPt 
) const
private
void ImpGraphic::draw ( OutputDevice rOutDev,
const Point rDestPt,
const Size rDestSize 
) const
private
bool ImpGraphic::ensureAvailable ( ) const
private
Animation ImpGraphic::getAnimation ( ) const
private

Definition at line 680 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

Referenced by GraphicID::GraphicID().

sal_uInt32 ImpGraphic::getAnimationLoopCount ( ) const
private

Definition at line 1125 of file impgraph.cxx.

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

Referenced by createSwapInfo().

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

Definition at line 1113 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

Bitmap ImpGraphic::getBitmap ( const GraphicConversionParameters rParameters) const
private
BitmapEx ImpGraphic::getBitmapEx ( const GraphicConversionParameters rParameters) const
private
const BitmapEx & ImpGraphic::getBitmapExRef ( ) const
private

Gives direct access to the contained BitmapEx.

Definition at line 691 of file impgraph.cxx.

References ensureAvailable(), and maBitmapEx.

BitmapChecksum ImpGraphic::getChecksum ( ) const
private
std::shared_ptr<GraphicReader>& ImpGraphic::getContext ( )
inlineprivate

Definition at line 188 of file impgraph.hxx.

const GDIMetaFile & ImpGraphic::getGDIMetaFile ( ) const
private
GfxLink ImpGraphic::getGfxLink ( ) const
private

Definition at line 1700 of file impgraph.cxx.

References ensureAvailable(), and mpGfxLink.

OUString const& ImpGraphic::getOriginURL ( ) const
inlineprivate

Definition at line 109 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by swapOut().

sal_Int32 ImpGraphic::getPageNumber ( ) const
private

Definition at line 1745 of file impgraph.cxx.

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

Referenced by createSwapInfo().

MapMode ImpGraphic::getPrefMapMode ( ) const
private
Size ImpGraphic::getPrefSize ( ) const
private
const std::shared_ptr< GfxLink > & ImpGraphic::getSharedGfxLink ( ) const
private

Definition at line 1695 of file impgraph.cxx.

References mpGfxLink.

sal_uLong ImpGraphic::getSizeBytes ( ) const
private
Size ImpGraphic::getSizePixel ( ) const
private
OUString ImpGraphic::getSwapFileURL ( ) const

Definition at line 73 of file impgraph.cxx.

References INetURLObject::NONE.

GraphicType ImpGraphic::getType ( ) const
inlineprivate

Definition at line 132 of file impgraph.hxx.

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

OString ImpGraphic::getUniqueID ( )
inlineprivate

Definition at line 119 of file impgraph.hxx.

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

Definition at line 342 of file impgraph.cxx.

References ensureAvailable(), and maVectorGraphicData.

Referenced by GraphicID::GraphicID().

BitmapEx ImpGraphic::getVectorGraphicReplacement ( ) const
private

Gets the bitmap replacement for a vector graphic.

Definition at line 520 of file impgraph.cxx.

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

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

bool ImpGraphic::isAlpha ( ) const
private
bool ImpGraphic::isAnimated ( ) const
private
bool ImpGraphic::isAvailable ( ) const
private

Definition at line 510 of file impgraph.cxx.

References mbPrepared, and mbSwapOut.

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

bool ImpGraphic::isDummyContext ( ) const
inlineprivate

Definition at line 191 of file impgraph.hxx.

bool ImpGraphic::isEPS ( ) const
private
bool ImpGraphic::isGfxLink ( ) const
private

Definition at line 1707 of file impgraph.cxx.

References mpGfxLink.

bool ImpGraphic::isSupportedGraphic ( ) const
private

Definition at line 454 of file impgraph.cxx.

References meType, and NONE.

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

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

Definition at line 515 of file impgraph.cxx.

References ensureAvailable().

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

Definition at line 107 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::resetChecksum ( )
inline

Definition at line 214 of file impgraph.hxx.

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

Definition at line 1105 of file impgraph.cxx.

References ensureAvailable(), and mpAnimation.

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

Definition at line 1133 of file impgraph.cxx.

References mbDummyContext, and mpContext.

void ImpGraphic::setDefaultType ( )
private

Definition at line 448 of file impgraph.cxx.

References clear(), Default, and meType.

void ImpGraphic::setDummyContext ( bool  value)
inlineprivate

Definition at line 190 of file impgraph.hxx.

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

Definition at line 1688 of file impgraph.cxx.

References ensureAvailable(), and mpGfxLink.

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

Definition at line 114 of file impgraph.hxx.

References GraphicExternalLink::msURL.

Referenced by swapIn().

void ImpGraphic::setPrefMapMode ( const MapMode rPrefMapMode)
private

Definition at line 956 of file impgraph.cxx.

References ensureAvailable(), and setValuesForPrefMapMod().

void ImpGraphic::setPrefSize ( const Size rPrefSize)
private

Definition at line 869 of file impgraph.cxx.

References ensureAvailable(), and setValuesForPrefSize().

Referenced by updateFromLoadedGraphic().

void ImpGraphic::setPrepared ( bool  bAnimated,
const Size pSizeHint 
)
void ImpGraphic::setValuesForPrefMapMod ( const MapMode rPrefMapMode)
private
void ImpGraphic::setValuesForPrefSize ( const Size rPrefSize)
private
void ImpGraphic::startAnimation ( OutputDevice rOutDev,
const Point rDestPt,
const Size rDestSize,
tools::Long  nExtraData,
OutputDevice pFirstFrameOutDev 
)
private

Definition at line 1087 of file impgraph.cxx.

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

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

Definition at line 1097 of file impgraph.cxx.

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

bool ImpGraphic::swapIn ( )
bool ImpGraphic::swapInContent ( SvStream rStream)
private
bool ImpGraphic::swapInFromStream ( SvStream rStream)
private

Definition at line 1554 of file impgraph.cxx.

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

Referenced by swapIn().

bool ImpGraphic::swapInGraphic ( SvStream rStream)
private
bool ImpGraphic::swapOut ( )
bool ImpGraphic::swapOutContent ( SvStream rStream)
private
bool ImpGraphic::swapOutGraphic ( SvStream rStream)
private
void ImpGraphic::updateFromLoadedGraphic ( ImpGraphic graphic)

Friends And Related Function Documentation

friend class Graphic
friend

Definition at line 59 of file impgraph.hxx.

friend class GraphicID
friend

Definition at line 60 of file impgraph.hxx.

friend class vcl::graphic::Manager
friend

Definition at line 61 of file impgraph.hxx.

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

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

GraphicExternalLink ImpGraphic::maGraphicExternalLink
private

Definition at line 83 of file impgraph.hxx.

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

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

Definition at line 85 of file impgraph.hxx.

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

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

Definition at line 77 of file impgraph.hxx.

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

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

Definition at line 80 of file impgraph.hxx.

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

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

Definition at line 71 of file impgraph.hxx.

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

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

Definition at line 82 of file impgraph.hxx.

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

Definition at line 72 of file impgraph.hxx.

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


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