summaryrefslogtreecommitdiff
path: root/include/vcl/wall.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-20 15:10:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-20 22:08:32 +0100
commit0f3b53a1219eac898152f64dee1c1ff2809846b0 (patch)
tree5f6457a5cae0b0d6a37eb451bfd03925854e6b96 /include/vcl/wall.hxx
parent6bcb9e1c4ea98dd4e154670495c7f0a2a8ffc0d2 (diff)
extract empty test as method
Change-Id: If383e2f1542ffb57415f8138077013dbafa0fc69 Reviewed-on: https://gerrit.libreoffice.org/68095 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/wall.hxx')
-rw-r--r--include/vcl/wall.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/vcl/wall.hxx b/include/vcl/wall.hxx
index c68bbf31ac10..fd5100860cb3 100644
--- a/include/vcl/wall.hxx
+++ b/include/vcl/wall.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_VCL_WALL_HXX
#define INCLUDED_VCL_WALL_HXX
+#include <tools/color.hxx>
#include <tools/gen.hxx>
#include <vcl/dllapi.h>
#include <o3tl/cow_wrapper.hxx>
@@ -98,6 +99,12 @@ public:
bool operator!=( const Wallpaper& rWallpaper ) const
{ return !(Wallpaper::operator==( rWallpaper )); }
+ bool IsEmpty() const
+ {
+ return GetStyle() == WallpaperStyle::NONE && GetColor() == COL_TRANSPARENT &&
+ !IsBitmap() && !IsGradient() && !IsRect();
+ }
+
friend VCL_DLLPUBLIC SvStream& ReadWallpaper( SvStream& rIStm, Wallpaper& rWallpaper );
friend VCL_DLLPUBLIC SvStream& WriteWallpaper( SvStream& rOStm, const Wallpaper& rWallpaper );
};