LibreOffice Module framework (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ImageList Class Reference

#include <ImageList.hxx>

Public Member Functions

 ImageList ()
 
 ImageList (const std::vector< OUString > &rNameVector, const OUString &rPrefix)
 
void InsertFromHorizontalStrip (const BitmapEx &rBitmapEx, const std::vector< OUString > &rNameVector)
 
BitmapEx GetAsHorizontalStrip () const
 
sal_uInt16 GetImageCount () const
 
void AddImage (const OUString &rImageName, const Image &rImage)
 
void ReplaceImage (const OUString &rImageName, const Image &rImage)
 
void RemoveImage (sal_uInt16 nId)
 
Image GetImage (const OUString &rImageName) const
 
sal_uInt16 GetImagePos (std::u16string_view rImageName) const
 
sal_uInt16 GetImageId (sal_uInt16 nPos) const
 
const OUString & GetImageName (sal_uInt16 nPos) const
 
void GetImageNames (::std::vector< OUString > &rNames) const
 

Private Member Functions

sal_uInt16 ImplGetImageId (const OUString &rImageName) const
 
void ImplAddImage (std::u16string_view aPrefix, const OUString &aName, sal_uInt16 nId, const Image &aImage)
 
void ImplRemoveImage (sal_uInt16 nPos)
 

Private Attributes

std::vector< std::unique_ptr< ImageAryData > > maImages
 
std::unordered_map< OUString, ImageAryData * > maNameHash
 
OUString maPrefix
 

Detailed Description

Definition at line 37 of file ImageList.hxx.

Constructor & Destructor Documentation

◆ ImageList() [1/2]

ImageList::ImageList ( )
explicit

Definition at line 25 of file ImageList.cxx.

◆ ImageList() [2/2]

ImageList::ImageList ( const std::vector< OUString > &  rNameVector,
const OUString &  rPrefix 
)

Definition at line 29 of file ImageList.cxx.

References i, ImplAddImage(), maImages, maPrefix, and SAL_INFO.

Member Function Documentation

◆ AddImage()

void ImageList::AddImage ( const OUString &  rImageName,
const Image rImage 
)

◆ GetAsHorizontalStrip()

BitmapEx ImageList::GetAsHorizontalStrip ( ) const

◆ GetImage()

Image ImageList::GetImage ( const OUString &  rImageName) const

◆ GetImageCount()

sal_uInt16 ImageList::GetImageCount ( ) const

Definition at line 137 of file ImageList.cxx.

References maImages.

Referenced by AddImage(), and framework::ImageManagerImpl::implts_storeUserImages().

◆ GetImageId()

sal_uInt16 ImageList::GetImageId ( sal_uInt16  nPos) const

Definition at line 156 of file ImageList.cxx.

References maImages, and nPos.

Referenced by framework::ImageManagerImpl::removeImages().

◆ GetImageName()

const OUString & ImageList::GetImageName ( sal_uInt16  nPos) const

Definition at line 161 of file ImageList.cxx.

References maImages, and nPos.

Referenced by framework::ImageManagerImpl::implts_storeUserImages().

◆ GetImageNames()

void ImageList::GetImageNames ( ::std::vector< OUString > &  rNames) const

◆ GetImagePos()

sal_uInt16 ImageList::GetImagePos ( std::u16string_view  rImageName) const

◆ ImplAddImage()

void ImageList::ImplAddImage ( std::u16string_view  aPrefix,
const OUString &  aName,
sal_uInt16  nId,
const Image aImage 
)
private

Definition at line 180 of file ImageList.cxx.

References aName, maImages, maNameHash, and nId.

Referenced by AddImage(), ImageList(), and InsertFromHorizontalStrip().

◆ ImplGetImageId()

sal_uInt16 ImageList::ImplGetImageId ( const OUString &  rImageName) const
private

Definition at line 89 of file ImageList.cxx.

References maNameHash.

Referenced by ReplaceImage().

◆ ImplRemoveImage()

void ImageList::ImplRemoveImage ( sal_uInt16  nPos)
private

Definition at line 193 of file ImageList.cxx.

References maImages, ImageAryData::maName, maNameHash, and nPos.

Referenced by RemoveImage().

◆ InsertFromHorizontalStrip()

void ImageList::InsertFromHorizontalStrip ( const BitmapEx rBitmapEx,
const std::vector< OUString > &  rNameVector 
)

◆ RemoveImage()

void ImageList::RemoveImage ( sal_uInt16  nId)

Definition at line 117 of file ImageList.cxx.

References i, ImplRemoveImage(), maImages, mnId, and nId.

Referenced by framework::ImageManagerImpl::removeImages().

◆ ReplaceImage()

void ImageList::ReplaceImage ( const OUString &  rImageName,
const Image rImage 
)

Member Data Documentation

◆ maImages

std::vector< std::unique_ptr<ImageAryData> > ImageList::maImages
private

◆ maNameHash

std::unordered_map< OUString, ImageAryData * > ImageList::maNameHash
private

◆ maPrefix

OUString ImageList::maPrefix
private

Definition at line 68 of file ImageList.hxx.

Referenced by AddImage(), ImageList(), and InsertFromHorizontalStrip().


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