diff options
author | Sarper Akdemir <q.sarperakdemir@gmail.com> | 2020-06-10 02:33:22 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-06-30 23:52:55 +0200 |
commit | e13dd9546e27bdc3b894718fc2993f99722ea9f1 (patch) | |
tree | eeb8286bf7183f208f487730ac9d924278d5d112 /slideshow/source/inc | |
parent | 7394ac17f3c8bdbb1cb3402a08ba7749906f6793 (diff) |
Add Shape mbIsForeground flag and getters and setters for it
mbIsForeground is a flag that is set false if a shape is known to
not belong to the foreground.
It is set to false while shapes are being imported and the shape
belongs to the master slide or is a group shape, right now.
Change-Id: Id9738fc943f32a1e1a6e1888d179e69fd60bd022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95968
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'slideshow/source/inc')
-rw-r--r-- | slideshow/source/inc/shape.hxx | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx index 9b6099462ab6..1638e87c08a7 100644 --- a/slideshow/source/inc/shape.hxx +++ b/slideshow/source/inc/shape.hxx @@ -52,7 +52,7 @@ namespace slideshow class Shape { public: - Shape() = default; + Shape() : mbIsForeground(true) {} virtual ~Shape() {} Shape(const Shape&) = delete; Shape& operator=(const Shape&) = delete; @@ -204,6 +204,24 @@ namespace slideshow */ virtual bool isBackgroundDetached() const = 0; + /** Check whether the shape belongs to the foreground + + For instance, if the shape is in the master slide + it does not belong to the foreground. + + @return true if the shape is on the foreground + */ + virtual bool isForeground() const { return mbIsForeground; }; + + /** + Set the flag that holds wheter the shape is + in the foreground or not + + @param bIsForeground + Shape is on the foreground + */ + virtual void setIsForeground( const bool bIsForeground ) { mbIsForeground = bIsForeground; }; + // Misc @@ -247,6 +265,14 @@ namespace slideshow } }; + + private: + /** Flag to check whether the shape belongs to the foreground. + + For instance, it is false if the shape belongs to the master slide or + a group shape. + */ + bool mbIsForeground; }; /** A set which contains all shapes in an ordered fashion. |