diff options
author | Sarper Akdemir <q.sarperakdemir@gmail.com> | 2020-06-10 02:11:36 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-06-30 23:50:18 +0200 |
commit | 7394ac17f3c8bdbb1cb3402a08ba7749906f6793 (patch) | |
tree | 07d1432722a9b28ea1d93245d359a5c42120aeb5 /slideshow/source/engine/slide/layermanager.hxx | |
parent | 57e8d6837c8bb72bb44930d78b9764789be80124 (diff) |
adding XShapeToShapeMapSharedPtr getter to ShapeManager
Refactoring XShapeHash in layermanager as XShapeToShapeMap
and XShapeHash in targetpropertiescreator as XShapeToNamedValuesMap.
This refactoring describes what the types are more clearly and
stops violating one define rule in the desired implementation.
And adding getter getXShapeToShapeMap to ShapeManager to enable
Animation::start() to access Shapes and XShapes of the current
slide.
Change-Id: I78d510ae43888fd6cf0f037e224b24f91b263b00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95967
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'slideshow/source/engine/slide/layermanager.hxx')
-rw-r--r-- | slideshow/source/engine/slide/layermanager.hxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx index 0f2844ced967..ec95e08f364c 100644 --- a/slideshow/source/engine/slide/layermanager.hxx +++ b/slideshow/source/engine/slide/layermanager.hxx @@ -38,6 +38,16 @@ namespace slideshow { namespace internal { + /** A hash map which maps the XShape to the corresponding Shape object. + + Provides quicker lookup than ShapeSet for simple mappings + */ + typedef std::unordered_map< + css::uno::Reference< css::drawing::XShape >, + ShapeSharedPtr, + hash< css::uno::Reference< css::drawing::XShape > > + > XShapeToShapeMap; + /* Definition of Layermanager class */ /** This class manages all of a slide's layers (and shapes) @@ -132,6 +142,13 @@ namespace slideshow AttributableShapeSharedPtr getSubsetShape( const AttributableShapeSharedPtr& rOrigShape, const DocTreeNode& rTreeNode ); + /** Get a map that maps all Shapes with their XShape reference as the key + * + * @return an unordered map that contains all shapes in the + * current page with their XShape reference as the key + */ + const XShapeToShapeMap& getXShapeToShapeMap() const; + /** Revoke a previously queried subset shape. With this method, a previously requested subset shape @@ -219,15 +236,6 @@ namespace slideshow bool renderTo( const ::cppcanvas::CanvasSharedPtr& rTargetCanvas ) const; private: - /** A hash map which maps the XShape to the corresponding Shape object. - - Provides quicker lookup than ShapeSet for simple mappings - */ - typedef std::unordered_map< - css::uno::Reference< css::drawing::XShape >, - ShapeSharedPtr, - hash< css::uno::Reference< css::drawing::XShape > > - > XShapeHash; class ShapeComparator { @@ -311,7 +319,7 @@ namespace slideshow /** Contains all shapes with their XShape reference as the key */ - XShapeHash maXShapeHash; + XShapeToShapeMap maXShapeHash; /** Set of shapes this LayerManager own |