31#include <osl/diagnose.h>
44 const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
47 if (pDocument ==
nullptr)
50 auto pContainer = std::make_shared<MasterPageContainer>();
52 auto xSelector(std::make_unique<CurrentMasterPagesSelector>(
58 xSelector->LateInit();
68 const std::shared_ptr<MasterPageContainer>& rpContainer,
69 const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
70 :
MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar,
"modules/simpress/ui/masterpagepanel.ui",
"usedvalueset")
110 ::std::set<OUString> aMasterPageNames;
114 if (pMasterPage ==
nullptr)
119 if (!aMasterPageNames.insert(
sName).second)
134 std::make_shared<ExistingPageProvider>(pMasterPage),
135 std::make_shared<PagePreviewProvider>());
139 rItemList.push_back(aToken);
145 return "modules/simpress/ui/currentmastermenu.ui";
153 ::std::set<OUString> aNames;
174 assert(
dynamic_cast<SdPage*
>(&rMasterPage));
185 if (aNames.find(
sName) != aNames.end())
194 if (rIdent ==
"delete")
199 if (pMasterPage !=
nullptr
218 std::shared_ptr<DrawViewShell> pDrawViewShell (
231 switch (rEvent.meEventId)
248 if (mrBase.GetDocument()->GetMasterPageCount()%2 == 1)
255 InvalidatePreview(
static_cast<const SdPage*
>(rEvent.mpUserData));
@ ShapeRemoved
A shape has been removed from a page.
@ PageOrder
One or more pages have been inserted into or deleted from the model.
@ EditModeNormal
Edit mode was (or is being) switched to normal mode.
@ SlideSortedSelection
The selection in the slide sorter has changed, regardless of whether the slide sorter is displayed in...
@ EditModeMaster
Edit mode was (or is being) switched to master mode.
@ ShapeChanged
The state of a shape has changed.
@ CurrentPageChanged
The current page has changed.
@ ShapeInserted
A shape has been inserted to a page.
sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const
SAL_DLLPRIVATE sal_uInt16 GetMasterPageUserCount(SdrPage const *pMaster) const
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
SdPage * GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
SAL_DLLPRIVATE void RemoveUnnecessaryMasterPages(SdPage *pMaster=nullptr, bool bOnlyDuplicatePages=false, bool bUndo=true)
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
bool IsPrecious() const
The "precious" flag is used for master pages to prevent some unused master pages from being deleted a...
const OUString & GetName() const
void SetPrecious(const bool bIsPrecious)
Set the "precious" flag to the given value.
SdrPage & TRG_GetMasterPage() const
bool TRG_HasMasterPage() const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
std::shared_ptr< ViewShell > GetMainViewShell() const
Return the main view shell stacked on the called ViewShellBase object.
std::shared_ptr< tools::EventMultiplexer > const & GetEventMultiplexer() const
Return an event multiplexer.
SdDrawDocument * GetDocument() const
virtual OUString GetName() const override
constexpr OUStringLiteral HID_SD_TASK_PANE_PREVIEW_CURRENT
#define LINK(Instance, Class, Member)