38#include <drawview.hxx>
46#define DOCUMENT_TOKEN '#'
54 :
FuPoor(pViewSh, pWin, pView, pDoc, rReq)
61 xFunc->DoExecute(rReq);
79 bool bOnMaster =
false;
82 EditMode eEditMode = pShell->GetEditMode();
87 std::vector<SdPage*> aUnselect;
94 if (pSlideSorterViewShell)
96 std::shared_ptr<slidesorter::SlideSorterViewShell::PageSelection> xSelection(
100 for (
SdPage *pPage : *xSelection)
105 aUnselect.push_back(pPage);
111 std::vector<SdPage*> aSelectedPages;
112 std::vector<sal_uInt16> aSelectedPageNums;
119 aSelectedPages.push_back(pPage);
120 aSelectedPageNums.push_back(nPage);
124 bool bMasterPage = bOnMaster;
125 bool bCheckMasters =
false;
134 aSet.
Put(
SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, bMasterPage ) );
135 aSet.
Put(
SfxBoolItem( ATTR_PRESLAYOUT_CHECK_MASTERS, bCheckMasters ) );
137 if (!aSelectedPages.empty())
139 OUString aOldLayoutName(aSelectedPages.back()->GetLayoutName());
142 aOldLayoutName = aOldLayoutName.copy(0,
nPos);
150 if (pArgs->
GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET)
152 if( pArgs->
GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET )
153 bMasterPage = pArgs->
Get( ATTR_PRESLAYOUT_MASTER_PAGE ).GetValue();
154 if( pArgs->
GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET )
155 bCheckMasters =
static_cast<const SfxBoolItem&
>( pArgs->
Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).
GetValue();
156 if (pArgs->
GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET)
157 aFile = pArgs->
Get(ATTR_PRESLAYOUT_NAME).GetValue();
164 sal_uInt16 nResult = pDlg->Execute();
171 if (aSet.
GetItemState(ATTR_PRESLAYOUT_LOAD) == SfxItemState::SET)
173 if( aSet.
GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SfxItemState::SET )
174 bMasterPage = aSet.
Get( ATTR_PRESLAYOUT_MASTER_PAGE ).GetValue();
175 if( aSet.
GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SfxItemState::SET )
177 if (aSet.
GetItemState(ATTR_PRESLAYOUT_NAME) == SfxItemState::SET)
178 aFile = aSet.
Get(ATTR_PRESLAYOUT_NAME).GetValue();
210 OUString aLayoutName;
213 for (
auto nSelectedPage : aSelectedPageNums)
214 mpDoc->
SetMasterPage(nSelectedPage, aLayoutName, pTempDoc, bMasterPage, bCheckMasters);
220 for (
auto nSelectedPage : aSelectedPageNums)
229 if (!aSelectedPages.empty())
235 ::sd::View* pView = pDrawViewShell->GetView();
236 for (
auto pSelectedPage : aSelectedPages)
238 sal_uInt16 nPgNum = pSelectedPage->TRG_GetMasterPage().GetPageNum();
253 for (
auto pSelectedPage : aSelectedPages)
254 pSelectedPage->SetAutoLayout(pSelectedPage->GetAutoLayout());
259 for (
auto pPage : aUnselect)
267 bool bLayer = pDrawViewSh->IsLayerModeActive();
268 pDrawViewSh->ChangeEditMode(
eMode, !bLayer );
269 pDrawViewSh->ChangeEditMode(
eMode, bLayer );
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
virtual VclPtr< AbstractSdPresLayoutDlg > CreateSdPresLayoutDlg(weld::Window *pParent, ::sd::DrawDocShell *pDocShell, const SfxItemSet &rInAttrs)=0
SAL_DLLPRIVATE SfxItemPool & GetPool()
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
SdDrawDocument * OpenBookmarkDoc(const OUString &rBookmarkFile)
SAL_DLLPRIVATE void SetSelected(SdPage *pPage, bool bSelect)
void SetMasterPage(sal_uInt16 nSdPageNum, std::u16string_view rLayoutName, SdDrawDocument *pSourceDoc, bool bMaster, bool bCheckMasters)
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
const SdrPage * GetMasterPage(sal_uInt16 nPgNum) const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetWaitCursor(bool bSet) const
const SfxItemSet * GetArgs() const
SfxDispatcher * GetDispatcher()
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
PageKind GetPageKind() const
Derivative of sd::View; contains also a pointer to the document.
void BlockPageOrderChangedHint(bool bBlock)
Lock/Unlock PageOrderChangedHint.
Base class for all functions.
VclPtr< ::sd::Window > mpWindow
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
FuPresentationLayout(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
virtual void DoExecute(SfxRequest &rReq) override
Base class of the stacked shell hierarchy.
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false) override
ends current text editing
An SdWindow contains the actual working area of ViewShell.
SD_DLLPUBLIC SlideSorter & GetSlideSorter() const
std::shared_ptr< PageSelection > GetPageSelection() const
Return the set of selected pages.
constexpr OUStringLiteral SD_LT_SEPARATOR