24#include <osl/mutex.hxx>
26#include <com/sun/star/uno/Reference.hxx>
47inline sal_Int32
FromCoreIndex(
const sal_uInt16 nCoreIndex) {
return (nCoreIndex - 1) / 2; }
104 const bool bCreate =
true)
const;
116 sal_Int32
GetIndex(
const css::uno::Reference<css::drawing::XDrawPage>& rxSlide)
const;
171 void SetDocumentSlides(
const css::uno::Reference<css::container::XIndexAccess>& rxSlides);
209 css::uno::Reference<css::container::XIndexAccess>
mxSlides;
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
The model of the slide sorter gives access to the slides that are to be displayed in the slide sorter...
void SynchronizeModelSelection()
Set the selection of the called model to exactly that of the document.
bool SetEditMode(EditMode eEditMode)
Set a new edit mode and return whether the edit mode really has been changed.
bool NotifyPageEvent(const SdrPage *pPage)
Typically called from controller::Listener this method handles the insertion and deletion of single p...
SlideSorterModel(SlideSorter &rSlideSorter)
void UpdatePageList()
This method is called when the edit mode has changed.
SdDrawDocument * GetDocument()
This method is present to let the view create a ShowView for displaying slides.
sal_Int32 GetPageCount() const
Return the number of slides in the document regardless of whether they are visible or not or whether ...
EditMode GetEditMode() const
css::uno::Reference< css::container::XIndexAccess > GetDocumentSlides() const
Return the set of pages that is currently displayed by the slide sorter.
mutable ::std::vector< SharedPageDescriptor > maPageDescriptors
css::uno::Reference< css::container::XIndexAccess > mxSlides
SharedPageDescriptor GetPageDescriptor(const sal_Int32 nPageIndex, const bool bCreate=true) const
Return a page descriptor for the page with the specified index.
void SetDocumentSlides(const css::uno::Reference< css::container::XIndexAccess > &rxSlides)
Set the XIndexAccess from which the called SlideSorterModel takes its pages.
bool DeleteSlide(const SdPage *pPage)
void SaveCurrentSelection()
The current selection is saved by copying the ST_Selected state into ST_WasSelected for slides.
vcl::Region RestoreSelection()
The current selection is restored from the ST_WasSelected state from the slides.
void ClearDescriptorList()
Delete all descriptors that currently are in the container.
sal_Int32 GetIndex(const css::uno::Reference< css::drawing::XDrawPage > &rxSlide) const
Return a page descriptor for the given XDrawPage.
void SynchronizeDocumentSelection()
Set the selection of the document to exactly that of the called model.
::osl::Mutex & GetMutex()
Return the mutex so that the caller can lock it and then safely access the model.
void UpdateIndices(const sal_Int32 nFirstIndex)
void Resync()
Call this method after the document has changed its structure.
SlideSorter & mrSlideSorter
SdPage * GetPage(const sal_Int32 nCoreIndex) const
void AdaptSize()
Resize the descriptor container according to current values of page kind and edit mode.
void InsertSlide(SdPage *pPage, bool bMarkSelected)
sal_uInt16 GetCoreIndex(const sal_Int32 nIndex) const
Return an index for accessing an SdrModel that corresponds to the given SlideSorterModel index.
mutable::osl::Mutex maMutex
sal_Int32 FromCoreIndex(const sal_uInt16 nCoreIndex)
std::shared_ptr< PageDescriptor > SharedPageDescriptor