slideshow/source/engine/slide/layermanager.cxx | 8 ++++++++ slideshow/source/engine/slide/layermanager.hxx | 6 ++++++ 2 files changed, 14 insertions(+)
New commits: commit 895aa53cb0a312f971c7e6739117dd5c34656c52 Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Mon Jun 24 14:14:25 2024 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Mon Jun 24 12:55:02 2024 +0200 slideshow: add removeAllShapes to the LayerManager The method will be needed in a follow up patch.. Change-Id: I3a0bde78e40f45bcf26cb20dea5bf5a5dd06a7ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169449 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 28d644817817..8f6b7163c17b 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -299,6 +299,14 @@ namespace slideshow::internal mbLayerAssociationDirty = true; } + void LayerManager::removeAllShapes() + { + while( !maAllShapes.empty() ) + { + removeShape(maAllShapes.begin()->first); + } + } + ShapeSharedPtr LayerManager::lookupShape( const uno::Reference< drawing::XShape >& xShape ) const { ENSURE_OR_THROW( xShape.is(), "LayerManager::lookupShape(): invalid Shape" ); diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx index 1969f0cccbb0..df6f02baa381 100644 --- a/slideshow/source/engine/slide/layermanager.hxx +++ b/slideshow/source/engine/slide/layermanager.hxx @@ -120,6 +120,12 @@ namespace slideshow::internal */ bool removeShape( const ShapeSharedPtr& rShape ); + /** Remove all shapes from this object + + This method removes all shapes from the page. + */ + void removeAllShapes(); + /** Lookup a Shape from an XShape model object This method looks up the internal shape map for one