LibreOffice Module sd (master) 1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
sd::sidebar::AllMasterPagesSelector Class Reference

Show a list of all available master pages so that the user can assign them to the document. More...

#include <AllMasterPagesSelector.hxx>

Inheritance diagram for sd::sidebar::AllMasterPagesSelector:
[legend]
Collaboration diagram for sd::sidebar::AllMasterPagesSelector:
[legend]

Classes

class  SortedMasterPageDescriptorList
 

Public Member Functions

 AllMasterPagesSelector (weld::Widget *pParent, SdDrawDocument &rDocument, ViewShellBase &rBase, const std::shared_ptr< MasterPageContainer > &rpContainer, const css::uno::Reference< css::ui::XSidebar > &rxSidebar)
 
virtual ~AllMasterPagesSelector () override
 
virtual void Fill (ItemList &rItemList) override
 Scan the set of templates for the ones whose first master pages are shown by this control and store them in the MasterPageContainer. More...
 
- Public Member Functions inherited from sd::sidebar::MasterPagesSelector
 MasterPagesSelector (weld::Widget *pParent, SdDrawDocument &rDocument, ViewShellBase &rBase, std::shared_ptr< MasterPageContainer > pContainer, css::uno::Reference< css::ui::XSidebar > xSidebar, const OUString &rUIFileName, const OUString &rValueSetName)
 
virtual ~MasterPagesSelector () override
 
virtual void LateInit ()
 
sal_Int32 GetPreferredHeight (sal_Int32 nWidth)
 
void ClearPageSet ()
 Make the selector empty. More...
 
void SetHelpId (const OUString &aId)
 
void InvalidatePreview (const SdPage *pPage)
 Mark the preview that belongs to the given index as not up-to-date anymore with respect to page content or preview size. More...
 
void UpdateAllPreviews ()
 
void ShowContextMenu (const Point *pPos)
 
virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override
 
- Public Member Functions inherited from PanelLayout
 PanelLayout (weld::Widget *pParent, const OUString &rID, const OUString &rUIXMLDescription)
 
void SetPanel (sfx2::sidebar::Panel *pPanel)
 
virtual ~PanelLayout ()
 
Size get_preferred_size () const
 
void queue_resize ()
 

Static Public Member Functions

static std::unique_ptr< PanelLayout > Create (weld::Widget *pParent, ViewShellBase &rViewShellBase, const css::uno::Reference< css::ui::XSidebar > &rxSidebar)
 

Protected Member Functions

virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent &rEvent) override
 
- Protected Member Functions inherited from sd::sidebar::MasterPagesSelector
SdPage * GetSelectedMasterPage ()
 
void AssignMasterPageToAllSlides (SdPage *pMasterPage)
 Assign the given master page to all slides of the document. More...
 
void AssignMasterPageToSelectedSlides (SdPage *pMasterPage)
 Assign the given master page to all slides that are selected in a slide sorter that is displayed in the lef or center pane. More...
 
virtual void AssignMasterPageToPageList (SdPage *pMasterPage, const std::shared_ptr< std::vector< SdPage * > > &rPageList)
 
virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent &rEvent)
 
UserData * GetUserData (int nIndex) const
 
void SetUserData (int nIndex, std::unique_ptr< UserData > pData)
 
sal_Int32 GetIndexForToken (MasterPageContainer::Token aToken) const
 
void UpdateItemList (::std::unique_ptr< ItemList > &&pList)
 
void Clear ()
 
void InvalidateItem (MasterPageContainer::Token aToken)
 Invalidate the specified item so that on the next Fill() this item is updated. More...
 
void UpdateLocks (const ItemList &rItemList)
 Lock master pages in the given list and release locks that were previously acquired. More...
 
void Fill ()
 
virtual void Fill (ItemList &rItemList)=0
 
virtual OUString GetContextMenuUIFile () const
 Give derived classes the opportunity to provide their own context menu. More...
 
virtual void ProcessPopupMenu (weld::Menu &rMenu)
 
virtual void ExecuteCommand (const OUString &rIdent)
 
- Protected Member Functions inherited from PanelLayout
virtual void DataChanged (const DataChangedEvent &rEvent)
 
virtual void DumpAsPropertyTree (tools::JsonWriter &)
 
virtual weld::Window * GetFrameWeld () const
 

Private Member Functions

void AddItem (MasterPageContainer::Token aToken)
 
void UpdatePageSet (ItemList &rItemList)
 Add all items in the internal master page list into the given list. More...
 
void UpdateMasterPageList ()
 Update the internal list of master pages that are to show in the control. More...
 
void Fill ()
 
virtual void Fill (ItemList &rItemList)=0
 

Private Attributes

::std::unique_ptr< SortedMasterPageDescriptorList > mpSortedMasterPages
 

Friends

class VclPtrInstance< AllMasterPagesSelector >
 

Additional Inherited Members

- Protected Types inherited from sd::sidebar::MasterPagesSelector
typedef ::std::pair< int, MasterPageContainer::Token > UserData
 
typedef ::std::vector< MasterPageContainer::Token > ItemList
 
typedef ::std::map< MasterPageContainer::Token, sal_Int32 > TokenToValueSetIndex
 
- Protected Attributes inherited from sd::sidebar::MasterPagesSelector
mutable::osl::Mutex maMutex
 
std::shared_ptr< MasterPageContainer > mpContainer
 
std::unique_ptr< PreviewValueSet > mxPreviewValueSet
 
std::unique_ptr< weld::CustomWeld > mxPreviewValueSetWin
 
SdDrawDocument & mrDocument
 
ViewShellBase & mrBase
 
ItemList maCurrentItemList
 
TokenToValueSetIndex maTokenToValueSetIndex
 
ItemList maLockedMasterPages
 
- Protected Attributes inherited from PanelLayout
std::unique_ptr< weld::Builder > m_xBuilder
 
std::unique_ptr< weld::Container > m_xContainer
 
sfx2::sidebar::Panel * m_pPanel
 

Detailed Description

Show a list of all available master pages so that the user can assign them to the document.

Definition at line 31 of file AllMasterPagesSelector.hxx.

Constructor & Destructor Documentation

◆ AllMasterPagesSelector()

sd::sidebar::AllMasterPagesSelector::AllMasterPagesSelector ( weld::Widget *  pParent,
SdDrawDocument &  rDocument,
ViewShellBase &  rBase,
const std::shared_ptr< MasterPageContainer > &  rpContainer,
const css::uno::Reference< css::ui::XSidebar > &  rxSidebar 
)

◆ ~AllMasterPagesSelector()

sd::sidebar::AllMasterPagesSelector::~AllMasterPagesSelector ( )
overridevirtual

Definition at line 112 of file AllMasterPagesSelector.cxx.

Member Function Documentation

◆ AddItem()

void sd::sidebar::AllMasterPagesSelector::AddItem ( MasterPageContainer::Token  aToken)
private

◆ Create()

std::unique_ptr< PanelLayout > sd::sidebar::AllMasterPagesSelector::Create ( weld::Widget *  pParent,
ViewShellBase &  rViewShellBase,
const css::uno::Reference< css::ui::XSidebar > &  rxSidebar 
)
static

◆ Fill() [1/3]

void sd::sidebar::MasterPagesSelector::Fill ( )
private

Definition at line 144 of file MasterPagesSelector.cxx.

◆ Fill() [2/3]

void sd::sidebar::AllMasterPagesSelector::Fill ( ItemList &  rItemList)
overridevirtual

Scan the set of templates for the ones whose first master pages are shown by this control and store them in the MasterPageContainer.

Implements sd::sidebar::MasterPagesSelector.

Definition at line 116 of file AllMasterPagesSelector.cxx.

References mpSortedMasterPages, UpdateMasterPageList(), and UpdatePageSet().

◆ Fill() [3/3]

virtual void sd::sidebar::MasterPagesSelector::Fill ( ItemList &  rItemList)
privatevirtual

◆ NotifyContainerChangeEvent()

void sd::sidebar::AllMasterPagesSelector::NotifyContainerChangeEvent ( const MasterPageContainerChangeEvent &  rEvent)
overrideprotectedvirtual

◆ UpdateMasterPageList()

void sd::sidebar::AllMasterPagesSelector::UpdateMasterPageList ( )
private

Update the internal list of master pages that are to show in the control.

Definition at line 144 of file AllMasterPagesSelector.cxx.

References AddItem(), i, sd::sidebar::MasterPagesSelector::mpContainer, and mpSortedMasterPages.

Referenced by Fill().

◆ UpdatePageSet()

void sd::sidebar::AllMasterPagesSelector::UpdatePageSet ( ItemList &  rItemList)
private

Add all items in the internal master page list into the given list.

Definition at line 172 of file AllMasterPagesSelector.cxx.

References mpSortedMasterPages.

Referenced by Fill().

Friends And Related Function Documentation

◆ VclPtrInstance< AllMasterPagesSelector >

friend class VclPtrInstance< AllMasterPagesSelector >
friend

Definition at line 1 of file AllMasterPagesSelector.hxx.

Member Data Documentation

◆ mpSortedMasterPages

::std::unique_ptr<SortedMasterPageDescriptorList> sd::sidebar::AllMasterPagesSelector::mpSortedMasterPages
private

The documentation for this class was generated from the following files: