20 #ifndef INCLUDED_VCL_INC_IMPLIMAGETREE_HXX
21 #define INCLUDED_VCL_INC_IMPLIMAGETREE_HXX
26 #include <unordered_map>
30 #include <com/sun/star/uno/Reference.hxx>
31 #include <rtl/ustring.hxx>
55 , mbLocalized(bLocalized)
57 , mbWriteImageToCache(false)
58 , mnScalePercentage(nScalePercentage)
72 OUString
const &
name, OUString
const &
style, OUString
const &
lang);
75 OUString
const & rName, OUString
const & rStyle, OUString
const & rLang);
78 OUString
const & name, OUString
const & style,
81 sal_Int32 nScalePercentage = -1);
88 css::uno::Reference< css::container::XNameAccess >
const &
getNameAccess();
94 typedef std::unordered_map<OUString, std::pair<bool,BitmapEx>>
IconCache;
95 typedef std::unordered_map<sal_Int32, std::unique_ptr<IconCache>>
ScaledIconCache;
131 void setStyle(OUString
const & rStyle);
143 void parseLinkFile(std::shared_ptr<SvStream>
const & aStream);
bool iconCacheLookup(ImageRequestParameters &rParameters)
OUString maCurrentStyle
Style used for the current operations; switches switch several times during fallback search...
void shutdown()
a crude form of life cycle control (called from DeInitVCL; otherwise, if the ImplImageTree singleton ...
bool findImage(std::vector< OUString > const &rPaths, ImageRequestParameters &rParameters)
sal_Int32 mnScalePercentage
static OUString fallbackStyle(std::u16string_view rStyle)
Return name of the fallback style for the provided one.
IconSet(const OUString &rURL)
IconCache & getIconCache(const ImageRequestParameters &rParameters)
Find an icon cache for the right scale factor.
ScaledIconCache maScaledIconCaches
css::uno::Reference< css::container::XNameAccess > const & getNameAccess()
std::unordered_map< OUString, std::pair< bool, BitmapEx > > IconCache
css::uno::Reference< css::container::XNameAccess > maNameAccess
IconSet & getCurrentIconSet()
std::unordered_map< OUString, IconSet > maIconSets
Remember all the (used) icon styles and individual icons in them.
bool doLoadImage(ImageRequestParameters &rParameters)
std::unordered_map< sal_Int32, std::unique_ptr< IconCache > > ScaledIconCache
OUString const & getRealImageName(OUString const &rName)
Return name of a real .png according to links.txt.
void setStyle(OUString const &rStyle)
std::vector< OUString > getPaths(OUString const &name, LanguageTag const &rLanguageTag)
std::unordered_map< OUString, OUString > IconLinkHash
OUString getImageUrl(OUString const &name, OUString const &style, OUString const &lang)
bool convertToDarkTheme()
bool loadImage(OUString const &name, OUString const &style, BitmapEx &bitmap, bool localized, const ImageLoadFlags eFlags, sal_Int32 nScalePercentage=-1)
exports com.sun.star. style
ImageRequestParameters(const OUString &rName, const OUString &rStyle, BitmapEx &rBitmap, bool bLocalized, ImageLoadFlags eFlags, sal_Int32 nScalePercentage)
void parseLinkFile(std::shared_ptr< SvStream > const &aStream)
exports com.sun.star. lang
ImplImageTree & operator=(const ImplImageTree &)=delete
std::shared_ptr< SvMemoryStream > getImageStream(OUString const &rName, OUString const &rStyle, OUString const &rLang)
sal_Int32 scalePercentage()