diff options
author | Luke Deller <luke@deller.id.au> | 2019-10-31 01:36:22 +1100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-11-08 09:20:17 +0100 |
commit | cd5e86eba163cab14e1d4149dde4513fbe252340 (patch) | |
tree | 299c51d74bec55bb7f6a3bbe7d5ac4359ab2e80a /include | |
parent | tdf#128625 Fix radio button alignments in Error Bars dialog (diff) | |
download | core-cd5e86eba163cab14e1d4149dde4513fbe252340.tar.gz core-cd5e86eba163cab14e1d4149dde4513fbe252340.zip |
tdf#118036 Fix IsTransparent for unloaded graphics
Squashed two commits from master:
[348460ec37b1] Fix IsTransparent() for unloaded graphics
[d93740559872] Fix use of uninitialised variable
Change-Id: I1753c0d11491f1dc518e23da8d7b3842945770cb
Reviewed-on: https://gerrit.libreoffice.org/81959
Tested-by: Jenkins
Tested-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/graphicfilter.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index 69fbc215ba77..88f6a7417f02 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -145,6 +145,8 @@ class VCL_DLLPUBLIC GraphicDescriptor final GraphicFileFormat nFormat; bool const bOwnStream; sal_uInt8 mnNumberOfImageComponents; + bool bIsTransparent; + bool bIsAlpha; void ImpConstruct(); @@ -214,6 +216,12 @@ public: /** @return number of color channels */ sal_uInt8 GetNumberOfImageComponents() const { return mnNumberOfImageComponents; } + /** @return whether image supports transparency */ + bool IsTransparent() const { return bIsTransparent; } + + /** @return whether image supports alpha values for translucent colours */ + bool IsAlpha() const { return bIsAlpha; } + /** @return filter number that is needed by the GraphFilter to read this format */ static OUString GetImportFormatShortName( GraphicFileFormat nFormat ); }; |