20#include <config_features.h>
26#include <svtools/strings.hrc>
39#include <stlsheet.hxx>
48#include <svx/svxids.hrc>
74 if (pStyleSheet->
GetFamily() == SfxStyleFamily::Page)
75 pStyleSheet =
static_cast<SdStyleSheet*
>(pStyleSheet)->GetPseudoStyleSheet();
114 OUString aTmp =
SvtResId(STR_UNDO) +
164 const sal_Int32 nInsertPosition)
166 sal_uInt16 nSId = rRequest.
GetSlot();
175 SdPage* pTemplatePage = pPage;
176 if (pTemplatePage ==
nullptr)
177 pTemplatePage = pDocument->
GetSdPage(0, ePageKind);
183 OUString aStandardPageName;
184 OUString aNotesPageName;
187 bool bIsPageBack = aVisibleLayers.
IsSet(aBckgrnd);
188 bool bIsPageObj = aVisibleLayers.
IsSet(aBckgrndObj);
194 if (! pArgs || (pArgs->
Count() == 1 && pInsertPos))
200 if (pTemplatePage !=
nullptr)
207 if (pNotesTemplatePage !=
nullptr)
211 else if (pArgs->
Count() == 1 || pArgs->
Count() == 2)
227 else if (pArgs->
Count() == 4 || pArgs->
Count() == 5)
236 assert(pPageName && pLayout && pIsPageBack && pIsPageObj &&
"must be present");
242 aNotesPageName = pPageName->
GetValue ();
243 eNotesLayout =
static_cast<AutoLayout>(pLayout->GetValue ());
247 aStandardPageName = pPageName->
GetValue ();
248 eStandardLayout =
static_cast<AutoLayout>(pLayout->GetValue ());
251 bIsPageBack = pIsPageBack->GetValue ();
252 bIsPageObj = pIsPageObj->GetValue ();
260#if HAVE_FEATURE_SCRIPTING
273#if HAVE_FEATURE_SCRIPTING
290 sal_uInt16 nNewPageIndex = 0xffff;
294 case SID_INSERTPAGE_QUICK:
295 case SID_INSERT_MASTER_PAGE:
303 if (pPage ==
nullptr)
304 if (pTemplatePage ==
nullptr)
325 for (sal_uInt16
i=0;
i<nPageCount;
i++)
349 case SID_DUPLICATE_PAGE:
351 if (pPage !=
nullptr)
359 pInsertPos ? (pInsertPos->
GetValue()*2)+1 : nInsertPosition);
363 SAL_INFO(
"sd",
"wrong slot id given to CreateOrDuplicatePage");
366 SdPage* pNewPage =
nullptr;
367 if(nNewPageIndex != 0xffff)
#define CHECK_RANGE(nMin, nValue, nMax)
sal_uInt16 GetValue() const
sal_uInt32 GetValue() const
const OUString & GetValue() const
void CreateFirstPages(SdDrawDocument const *pRefDocument=nullptr)
if the document does not contain at least one handout, one slide and one notes page with at least one...
SAL_DLLPRIVATE sal_uInt16 DuplicatePage(sal_uInt16 nPageNum)
This method acts as a simplified front end for the more complex <member>DuplicatePage()</member> meth...
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
void StopWorkStartupDelay()
SAL_DLLPRIVATE bool MovePages(sal_uInt16 nTargetPage)
SAL_DLLPRIVATE sal_uInt16 CreatePage(SdPage *pCurrentPage, PageKind ePageKind, const OUString &sStandardPageName, const OUString &sNotesPageName, AutoLayout eStandardLayout, AutoLayout eNotesLayout, bool bIsPageBack, bool bIsPageObj, const sal_Int32 nInsertPosition)
Create and insert a set of two new pages: a standard (draw) page and the associated notes page.
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
void SetSelected(bool bSel)
AutoLayout GetAutoLayout() const
SfxStyleSheet * GetStyleSheet() const
bool IsUndoEnabled() const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
SdrLayerID GetLayerID(const OUString &rName) const
bool IsSet(SdrLayerID a) const
bool AreObjectsMarked() const
SdrUndoFactory & GetSdrUndoFactory() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
const SdrLayerAdmin & GetLayerAdmin() const
sal_uInt16 GetPageNum() const
bool TRG_HasMasterPage() const
const SdrLayerIDSet & TRG_GetMasterPageVisibleLayers() const
virtual std::unique_ptr< SdrUndoAction > CreateUndoNewPage(SdrPage &rPage)
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)
void DisableItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
SfxStyleFamily GetFamily() const
virtual ViewShellId GetViewShellId() const
SfxUndoAction * GetRedoAction(size_t nNo=0) const
OUString GetRedoActionComment(size_t nNo=0, bool const i_currentLevel=CurrentLevel) const
OUString GetUndoActionComment(size_t nNo=0, bool const i_currentLevel=CurrentLevel) const
virtual size_t GetRedoActionCount(bool const i_currentLevel=CurrentLevel) const
virtual size_t GetUndoActionCount(bool const i_currentLevel=CurrentLevel) const
SfxUndoAction * GetUndoAction(size_t nNo=0) const
SfxDispatcher * GetDispatcher()
static void FatalError(ErrCode)
void SetStyleFamily(SfxStyleFamily nSF)
SfxStyleFamily GetStyleFamily() const
SD_DLLPUBLIC DrawDocShell * GetDocSh() const
virtual SfxUndoManager * ImpGetUndoManager() const
void ImpGetUndoStrings(SfxItemSet &rSet) const
SdDrawDocument * GetDoc() const
void GetMenuState(SfxItemSet &rSet)
set state (enabled/disabled) of Menu SfxSlots
void ImpGetRedoStrings(SfxItemSet &rSet) const
::sd::View * GetView() const
virtual SdPage * CreateOrDuplicatePage(SfxRequest &rRequest, PageKind ePageKind, SdPage *pPage, const sal_Int32 nInsertPosition=-1)
Depending on the given request create a new page or duplicate an existing one.
void Cancel()
this method deactivates the current function.
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
bool HasCurrentFunction() const
SdrView * GetDrawView() const
#define SAL_INFO(area, stream)
#define ERRCODE_BASIC_BAD_PROP_VALUE
#define ERRCODE_BASIC_WRONG_ARGS
OUString SdResId(TranslateId aId)
SVT_DLLPUBLIC OUString SvtResId(TranslateId aId)
constexpr OUStringLiteral sUNO_LayerName_background_objects
constexpr OUStringLiteral sUNO_LayerName_background