67class InsertBookmarkAsPage_FindDuplicateLayouts
70 explicit InsertBookmarkAsPage_FindDuplicateLayouts( std::vector<OUString> &rLayoutsToTransfer )
71 : mrLayoutsToTransfer(rLayoutsToTransfer) {}
74 std::vector<OUString> &mrLayoutsToTransfer;
86 aLayout = aLayout.copy(0, nIndex);
88 std::vector<OUString>::const_iterator pIter =
89 find(mrLayoutsToTransfer.begin(),mrLayoutsToTransfer.end(),aLayout);
91 bool bFound = pIter != mrLayoutsToTransfer.end();
94 for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
101 aTest = aTest.copy(0, nIndex2);
107 if( bRenameDuplicates && aTest !=
SdResId( STR_LAYOUT_DEFAULT_NAME ) && !(pTestPage->
Equals(*pBMMPage)) )
121 mrLayoutsToTransfer.push_back(aLayout);
126 const std::vector<OUString> &rBookmarkList, sal_uInt16 nBMSdPageCount,
127 InsertBookmarkAsPage_FindDuplicateLayouts& rPageIterator,
bool bRenameDuplicates )
134 if( rBookmarkList.empty() )
137 nEndPos = nBMSdPageCount;
142 nEndPos = rBookmarkList.size();
151 SdPage* pBMMPage =
nullptr;
153 if( rBookmarkList.empty() )
161 OUString aBMPgName(rBookmarkList[
nPos]);
164 sal_uInt16 nBMPage = pBookmarkDoc->
GetPageByName( aBMPgName, bIsMasterPage );
168 pBMPage =
static_cast<SdPage*
>( pBookmarkDoc->
GetPage(nBMPage) );
178 const sal_uInt16 nBMSdPage = (nBMPage - 1) / 2;
187 rPageIterator( rDoc, pBMMPage, bRenameDuplicates, pBookmarkDoc );
197 OUString aBookmarkName = pMedium->
GetName();
198 std::shared_ptr<const SfxFilter> pFilter = pMedium->
GetFilter();
209 else if ( !aBookmarkName.isEmpty() &&
maBookmarkFile != aBookmarkName )
211 bool bCreateGraphicShell = pFilter->GetServiceName() ==
"com.sun.star.drawing.DrawingDocument";
212 bool bCreateImpressShell = pFilter->GetServiceName() ==
"com.sun.star.presentation.PresentationDocument";
213 if ( bCreateGraphicShell || bCreateImpressShell )
220 if ( bCreateGraphicShell )
236 DBG_ASSERT(!aBookmarkName.isEmpty(),
"Empty document name!");
241 VclMessageType::Warning, VclButtonsType::Ok,
SdResId(STR_READ_DATA_ERROR)));
245 pBookmarkDoc =
nullptr;
262 std::unique_ptr<SfxMedium> xMedium(
new SfxMedium(rBookmarkFile, StreamMode::READ));
275 const std::vector<OUString> &rBookmarkList,
276 std::vector<OUString> &rExchangeList,
278 sal_uInt16 nInsertPos,
280 Point const * pObjPos)
283 bool bInsertPages =
false;
285 if (rBookmarkList.empty())
296 pBookmarkDoc = pBookmarkDocSh->
GetDoc();
305 bInsertPages = bOK && std::any_of(rBookmarkList.begin(), rBookmarkList.end(),
306 [&pBookmarkDoc](
const OUString& rBookmark) {
309 return pBookmarkDoc->GetPageByName(rBookmark, bIsMasterPage) != SDRPAGE_NOTFOUND;
313 bool bCalcObjCount = !rExchangeList.empty();
315 if ( bOK && bInsertPages )
319 nInsertPos,
false, pBookmarkDocSh,
true,
true,
false);
322 if ( bOK && !rBookmarkList.empty() )
326 pBookmarkDocSh, pObjPos, bCalcObjCount);
337 aUsedStyles.reserve(rStyles.size());
338 for (
const auto& a : rStyles)
340 if (
a.m_xStyleSheet->IsUsed())
341 aUsedStyles.push_back(a);
343 pStyleSheetPool->
Remove(
a.m_xStyleSheet.get());
345 rStyles = aUsedStyles;
351 css::uno::Reference<css::container::XNameContainer> xTableFamily(
352 pStyleSheetPool->
getByName(
"table"), css::uno::UNO_QUERY);
356 for (
const auto& a : rStyles)
359 xTableFamily->removeByName(
a->getName());
365 for (
const auto& a : rStyles)
367 if (
a.m_xStyleSheet->GetName().startsWith(aStyleName))
368 return a.m_xStyleSheet.get();
376 const std::vector<OUString> &rBookmarkList,
377 std::vector<OUString> *pExchangeList,
380 sal_uInt16 nInsertPos,
384 bool bMergeMasterPages,
385 bool bPreservePageNames)
387 bool bContinue =
true;
388 bool bScaleObjects =
false;
389 sal_uInt16 nReplacedStandardPages = 0;
392 OUString aBookmarkName;
396 pBookmarkDoc = pBookmarkDocSh->
GetDoc();
417 if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0)
452 SD_MOD()->pTransferClip->GetWorkDocument() ==
this);
455 if (rBookmarkList.empty())
458 bScaleObjects =
true;
473 VclMessageType::Question, VclButtonsType::YesNo,
476 sal_uInt16 nBut = xQueryBox->run();
478 bScaleObjects = nBut ==
RET_YES;
496 nViewShellId = pViewShell->GetViewShellBase().GetViewShellId();
502 std::vector<OUString> aLayoutsToTransfer;
503 InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( aLayoutsToTransfer );
504 lcl_IterateBookmarkPages( *
this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc !=
this ) );
511 if( !aLayoutsToTransfer.empty() )
512 bMergeMasterPages =
true;
514 for (
const OUString& layoutName : aLayoutsToTransfer )
518 rStyleSheetPool.
CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool,aCreatedStyles);
520 if(!aCreatedStyles.empty())
524 pUndoMgr->
AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(
this, aCreatedStyles,
true));
535 if(!bReplace && !bNoDialogs)
539 rStyleSheetPool.
CopyCellSheets(rBookmarkStyleSheetPool, aNewCellStyles);
543 rStyleSheetPool.
CopyTableStyles(rBookmarkStyleSheetPool, aNewTableStyles);
552 if (rBookmarkList.empty())
560 sal_uInt16 nActualInsertPos = nInsertPos;
562 sal_uInt16 nBMSdPage;
563 std::set<sal_uInt16> aRenameSet;
564 std::map<sal_uInt16,OUString> aNameMap;
566 for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
575 aNameMap.insert(std::make_pair(nBMSdPage,
sName));
580 if( pBookmarkDoc !=
this &&
584 aRenameSet.insert(nBMSdPage);
597 for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
603 if( aRenameSet.find(nBMSdPage) != aRenameSet.end() )
608 pNotesPage->
SetName(OUString());
613 OUString
aName(aNameMap[nBMSdPage]);
620 nActualInsertPos += 2;
635 sal_uInt16 nActualInsertPos = nInsertPos;
638 ::std::vector<SdPage*> aBookmarkedPages (rBookmarkList.size(),
nullptr);
639 for (
size_t nPos = 0,
n = rBookmarkList.size();
nPos <
n; ++
nPos)
641 OUString aPgName(rBookmarkList[
nPos]);
643 sal_uInt16 nBMPage = pBookmarkDoc->
GetPageByName( aPgName, bIsMasterPage );
651 for (
size_t nPos = 0,
n = rBookmarkList.size();
nPos <
n; ++
nPos)
653 pBMPage = aBookmarkedPages[
nPos];
659 bool bMustRename =
false;
664 OUString aPgName(rBookmarkList[
nPos]);
666 sal_uInt16 nPageSameName =
GetPageByName(aPgName, bIsMasterPage);
667 if( pBookmarkDoc !=
this &&
670 nPageSameName != nActualInsertPos ) )
675 SdPage* pBookmarkPage = pBMPage;
692 if(
GetPage( nActualInsertPos ) != pBookmarkPage )
706 pNotesPage->
SetName(OUString());
719 const sal_uInt16 nDestPageNum(nActualInsertPos + 2);
720 SdPage* pStandardPage =
nullptr;
729 if( bPreservePageNames )
742 SdPage* pNotesPage =
nullptr;
751 if( bPreservePageNames )
765 nReplacedStandardPages++;
768 nActualInsertPos += 2;
778 for (sal_uInt16 nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--)
785 for (sal_uInt16 nTest = 0; nTest < nMPageCount; nTest++)
791 if ( nInsertPos > 2 &&
792 aTest == aMPLayout &&
809 sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2;
810 sal_uInt16 nSdPageEnd = bReplace
811 ? nSdPageStart + nReplacedStandardPages - 1
813 const bool bRemoveEmptyPresObj =
817 std::vector<OUString>::iterator pExchangeIter;
820 pExchangeIter = pExchangeList->begin();
822 for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++)
826 if (pExchangeList && pExchangeIter != pExchangeList->end())
829 OUString aExchangeName(*pExchangeIter);
830 pRefPage->
SetName(aExchangeName);
831 Broadcast(
SdrHint(SdrHintKind::PageOrderChange, pRefPage));
834 pNewNotesPage->
SetName(aExchangeName);
835 Broadcast(
SdrHint(SdrHintKind::PageOrderChange, pNewNotesPage));
843 aLayout = aLayout.copy(0,
nIndex);
856 pRefPage->
SetBorder(nLeft, nUpper, nRight, nLower);
859 if( bRemoveEmptyPresObj )
876 pRefPage->
SetBorder(nNLeft, nNUpper, nNRight, nNLower);
879 if( bRemoveEmptyPresObj )
885 pExchangeList->erase(pExchangeList->begin(),pExchangeIter);
887 for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++)
898 pRefPage->
SetBorder(nLeft, nUpper, nRight, nLower);
909 pRefPage->
SetBorder(nNLeft, nNUpper, nNRight, nNLower);
913 if( bRemoveEmptyPresObj )
922 if(!aRenameStr.isEmpty())
926 for(sal_uInt32
p = nInsertPos;
p < sal_uInt32(nInsertPos) + sal_uInt32(nBMSdPageCount);
p++)
934 SfxStyleSheet *pSheet = lcl_findStyle(aNewGraphicStyles, Concat2View(aStyleName + aRenameStr));
935 if(pSheet !=
nullptr)
943 TOOLS_WARN_EXCEPTION(
"sd",
"Exception while renaming styles @ SdDrawDocument::InsertBookmarkAsPage");
951 if (!aNewGraphicStyles.empty() && pUndoMgr)
952 pUndoMgr->
AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(
this, aNewGraphicStyles,
true));
967 const std::vector<OUString> &rBookmarkList,
968 const std::vector<OUString> &rExchangeList,
970 Point const * pObjPos,
974 bool bOLEObjFound =
false;
975 std::unique_ptr<::sd::View> pBMView;
981 pBookmarkDoc = pBookmarkDocSh->
GetDoc();
992 if (rBookmarkList.empty())
994 pBMView.reset(new ::sd::View(*pBookmarkDoc,
nullptr));
995 pBMView->EndListening(*pBookmarkDoc);
1003 for (
const auto& rBookmark : rBookmarkList )
1014 bOLEObjFound =
true;
1020 pBMView.reset(new ::sd::View(*pBookmarkDoc,
nullptr));
1021 pBMView->EndListening(*pBookmarkDoc);
1028 pPV = pBMView->ShowSdrPage(pBMView->GetModel().GetMasterPage(pPage->
GetPageNum()));
1032 pPV = pBMView->GetSdrPageView();
1033 if( !pPV || (pPV->
GetPage() != pPage))
1034 pPV = pBMView->ShowSdrPage(pPage);
1037 pBMView->MarkObj(pObj, pPV);
1045 std::optional<::sd::View> pView(std::in_place, *
this,
nullptr);
1046 pView->EndListening(*
this);
1082 size_t nCountBefore = 0;
1084 if (!rExchangeList.empty() || bCalcObjCount)
1092 pBMView->GetDoc().SetAllocDocSh(
true);
1095 bOK = pView->Paste(*pTmpDoc, aObjPos, pPage, SdrInsertFlags::NONE);
1107 if (nCountBefore <
nCount)
1109 size_t nObj = nCountBefore;
1110 for (
const auto& rExchange : rExchangeList)
1190 for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--)
1192 SdPage* pMaster = pMasterPage;
1193 SdPage* pNotesMaster =
nullptr;
1222 if(bOnlyDuplicatePages )
1225 bDeleteMaster =
false;
1229 if( pMPg != pMaster &&
1233 bDeleteMaster =
true;
1247 if( (pShownPage == pMaster) || (pShownPage == pNotesMaster) )
1272 bool bDeleteOldStyleSheets =
true;
1273 for ( sal_uInt16 nMPg = 0;
1280 bDeleteOldStyleSheets =
false;
1284 if (bDeleteOldStyleSheets)
1292 aUndoRemove.reserve(aRemove.size());
1293 for (
const auto&
a : aRemove)
1294 aUndoRemove.emplace_back(
a.get(),
true);
1297 pUndoMgr->
AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(
this, aUndoRemove,
false));
1300 for(
const auto&
a : aRemove )
1328 if (rCandidate.empty())
1335 for(sal_uInt16
a(0);
a < nPageCount;
a++)
1341 aPageLayoutName = aPageLayoutName.copy(0,
nIndex);
1343 if(aPageLayoutName == rCandidate)
1355 const OUString aBaseName(
SdResId(STR_LAYOUT_DEFAULT_NAME));
1359 OUString aRetval = aBaseName;
1362 aRetval += OUString::number(
nCount);
1371 std::u16string_view rLayoutName,
1390 nViewShellId = pViewShell->GetViewShellBase().GetViewShellId();
1400 OUString aOldPageLayoutName(pSelectedPage->
GetLayoutName());
1401 OUString aOldLayoutName(aOldPageLayoutName);
1404 aOldLayoutName = aOldLayoutName.copy(0,
nIndex);
1408 std::vector<StyleReplaceData> aReplList;
1409 bool bLayoutReloaded =
false;
1412 if (rLayoutName.empty())
1434 if (pMaster && pNotesMaster)
1437 DBG_ASSERT(pMaster,
"MasterPage (Standard page) not found");
1438 DBG_ASSERT(pNotesMaster,
"MasterPage (Notes page) not found");
1441 if( (pMaster ==
nullptr) || (pNotesMaster ==
nullptr) )
1450 if( (pMaster ==
nullptr) || (pNotesMaster ==
nullptr) )
1458 OSL_FAIL(
"SdDrawDocument::SetMasterPage() failed!" );
1463 const OUString aOriginalNewLayoutName( pMaster->GetName() );
1464 OUString aTargetNewLayoutName(aOriginalNewLayoutName);
1466 if (pSourceDoc !=
this)
1472 if(!pNewNotesMaster || !pNewMaster)
1474 OSL_FAIL(
"SdDrawDocument::SetMasterPage() cloning of MasterPage/NoteAmsterPage failed!" );
1478 pNotesMaster = pNewNotesMaster;
1479 pMaster = pNewMaster;
1482 aTargetNewLayoutName = pMaster->GetLayoutName();
1485 aTargetNewLayoutName = aTargetNewLayoutName.copy(0, nIndex2);
1493 pMaster->SetName(aTargetNewLayoutName);
1494 pMaster->SetLayoutName(aTemp);
1496 pNotesMaster->SetName(aTargetNewLayoutName);
1497 pNotesMaster->SetLayoutName(aTemp);
1501 if (pSourceDoc !=
this)
1504 for ( sal_uInt16 nMPage = 0; nMPage < nMasterPageCount; nMPage++ )
1507 if( pCheckMaster->
GetName() == aTargetNewLayoutName )
1509 bLayoutReloaded =
true;
1520 SfxStyleSheetBase* pHisSheet = pSourceStyleSheetPool->First(SfxStyleFamily::Page);
1528 if(
aName.startsWith( aOriginalNewLayoutName ) )
1531 if(aOriginalNewLayoutName != aTargetNewLayoutName)
1543 DBG_ASSERT(bTest,
"Renaming StyleSheet failed.");
1548 pUndoMgr->
AddUndoAction(std::make_unique<StyleSheetUndoAction>(
this,
1563 aCreatedStyles.emplace_back(
static_cast<SdStyleSheet*
>(pMySheet),
true);
1573 OUString aTemp(pMySheet->
GetName());
1575 aTemp = aOldLayoutName + aTemp.subView(
nPos);
1576 aReplData.
aName = aTemp;
1577 aReplList.push_back(aReplData);
1580 pHisSheet = pSourceStyleSheetPool->Next();
1585 if(!aCreatedStyles.empty())
1587 for (
const auto& rRData : aReplList )
1594 const OUString& rParentOfOld = pSOld->
GetParent();
1595 const OUString& rParentOfNew = pSNew->
GetParent();
1597 if (!rParentOfOld.isEmpty() && rParentOfNew.isEmpty())
1599 std::vector<StyleReplaceData>::iterator pRDIter = std::find_if(aReplList.begin(), aReplList.end(),
1600 [&rParentOfOld](
const StyleReplaceData& rRD) { return (rRD.aName == rParentOfOld) && (rRD.aName != rRD.aNewName); });
1601 if (pRDIter != aReplList.end())
1603 OUString aParentOfNew(pRDIter->aNewName);
1611 if (bUndo && !aCreatedStyles.empty())
1615 pUndoMgr->
AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(
this, aCreatedStyles,
true));
1621 OUString aPageLayoutName(pMaster->GetLayoutName());
1622 OUString aLayoutName = aPageLayoutName;
1625 aLayoutName = aLayoutName.copy( 0, nIndex2);
1639 if (pSourceDoc !=
this)
1647 sal_uInt16 nInsertPos = rOldMaster.
GetPageNum();
1650 if (!bLayoutReloaded)
1651 nInsertPos = 0xFFFF;
1657 if (!bLayoutReloaded)
1658 nInsertPos = 0xFFFF;
1669 std::vector<rtl::Reference<SdPage>> aPageList;
1673 aPageList.push_back(pMaster);
1674 aPageList.push_back(pNotesMaster);
1676 if (bMaster || bLayoutReloaded)
1678 for (sal_uInt16 nPage = 1; nPage <
GetPageCount(); nPage++)
1682 if (aTest == aOldPageLayoutName)
1684 aPageList.push_back(pPage);
1691 aPageList.push_back(pSelectedPage);
1692 aPageList.push_back(pNotes);
1697 AutoLayout eAutoLayout = pPage->GetAutoLayout();
1701 pUndoMgr->
AddUndoAction(std::make_unique<SdPresentationLayoutUndoAction>
1703 pPage->IsMasterPage() ? aLayoutName : aOldLayoutName,
1705 eAutoLayout, eAutoLayout,
false, pPage.get()));
1707 pPage->SetPresentationLayout(aLayoutName);
1708 pPage->SetAutoLayout(eAutoLayout);
1712 if (pSourceDoc !=
this)
1719 pMaster->ScaleObjects(aSize, aBorderRect,
true);
1720 pMaster->SetSize(aSize);
1726 pMaster->SetAutoLayout(pMaster->GetAutoLayout());
1728 aSize = rOldNotesMaster.
GetSize();
1733 pNotesMaster->ScaleObjects(aSize, aNotesBorderRect,
true);
1734 pNotesMaster->SetSize(aSize);
1739 pNotesMaster->SetOrientation( rOldNotesMaster.
GetOrientation() );
1740 pNotesMaster->SetAutoLayout(pNotesMaster->GetAutoLayout());
1745 pMaster->RemoveEmptyPresentationObjects();
1746 pNotesMaster->RemoveEmptyPresentationObjects();
1764 aUndoInsert.reserve(aCreatedStyles.size());
1765 for (
const auto&
a : aCreatedStyles)
1766 aUndoInsert.emplace_back(
a.get(),
true);
1767 pUndoMgr->
AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(
this, aUndoInsert,
true));
1773 pMaster->SetSize(pSelectedPage->
GetSize());
1778 pMaster->SetName(
aName);
1779 pMaster->SetLayoutName(aPageLayoutName);
1789 pNotesMaster->SetSize(pNotes->
GetSize());
1794 pNotesMaster->SetName(
aName);
1795 pNotesMaster->SetLayoutName(aPageLayoutName);
1807 std::vector<SdPage*> aPageList;
1810 for (sal_uInt16 nPage = 1; nPage <
GetPageCount(); nPage++)
1815 aPageList.push_back(pPage);
1821 aPageList.push_back(pSelectedPage);
1822 aPageList.push_back(pNotes);
1826 for (
auto& rpPage : aPageList )
1834 pUndoMgr->
AddUndoAction(std::make_unique<SdPresentationLayoutUndoAction>
1835 (
this, aOldLayoutName,
aName,
1836 eOldAutoLayout, eNewAutoLayout,
true,
1840 rpPage->SetPresentationLayout(
aName);
1841 rpPage->SetAutoLayout(eNewAutoLayout);
1866 sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
1867 sal_uInt16 nDestPos,
1868 bool bMergeMasterPages,
bool bAllMasterPages,
1869 bool bUndo,
bool bTreadSourceAsConst)
1872 SdrModel::Merge( rSourceModel, nFirstPageNum, nLastPageNum, nDestPos, bMergeMasterPages, bAllMasterPages, bUndo, bTreadSourceAsConst );
1875 for( sal_uInt16 nMaster = nMasterPageCount; nMaster <
GetMasterPageCount(); nMaster++ )
SfxApplication * SfxGetpApp()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
SAL_DLLPRIVATE void ReplacePageInCustomShows(const SdPage *pOldPage, const SdPage *pNewPage)
replacespOldPage from all custom shows with pNewPage or removes pOldPage from all custom shows if pNe...
sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const
std::unique_ptr< SdCustomShowList > mpCustomShowList
SAL_DLLPRIVATE sal_uInt16 GetMasterPageUserCount(SdrPage const *pMaster) const
virtual SAL_DLLPRIVATE void InsertMasterPage(SdrPage *pPage, sal_uInt16 nPos=0xFFFF) override
SAL_DLLPRIVATE bool InsertBookmarkAsPage(const std::vector< OUString > &rBookmarkList, std::vector< OUString > *pExchangeList, bool bLink, bool bReplace, sal_uInt16 nPgPos, bool bNoDialogs, ::sd::DrawDocShell *pBookmarkDocSh, bool bCopy, bool bMergeMasterPages, bool bPreservePageNames)
Insert pages into this document.
SAL_DLLPRIVATE void InsertBookmark(const std::vector< OUString > &rBookmarkList, std::vector< OUString > &rExchangeList, bool bLink, sal_uInt16 nPgPos, ::sd::DrawDocShell *pBookmarkDocSh, Point const *pObjPos)
SAL_DLLPRIVATE void SetAllocDocSh(bool bAlloc)
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
virtual SAL_DLLPRIVATE bool IsReadOnly() const override
::sd::DrawDocShell * mpDocSh
SdDrawDocument * OpenBookmarkDoc(const OUString &rBookmarkFile)
SAL_DLLPRIVATE sal_uInt16 GetPageByName(std::u16string_view rPgName, bool &rbIsMasterPage) const
Return the first page that has the given name.
SdCustomShowList * GetCustomShowList(bool bCreate=false)
SAL_DLLPRIVATE bool InsertBookmarkAsObject(const std::vector< OUString > &rBookmarkList, const std::vector< OUString > &rExchangeList, ::sd::DrawDocShell *pBookmarkDocSh, Point const *pObjPos, bool bCalcObjCount)
virtual SAL_DLLPRIVATE rtl::Reference< SdrPage > RemoveMasterPage(sal_uInt16 nPgNum) override
::sd::DrawDocShellRef mxBookmarkDocShRef
SAL_DLLPRIVATE void RenameLayoutTemplate(const OUString &rOldLayoutName, const OUString &rNewName)
::sd::DrawDocShellRef mxAllocedDocShRef
SdPage * GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
SAL_DLLPRIVATE SdrObject * GetObj(std::u16string_view rObjName) const
void SetMasterPage(sal_uInt16 nSdPageNum, std::u16string_view rLayoutName, SdDrawDocument *pSourceDoc, bool bMaster, bool bCheckMasters)
SAL_DLLPRIVATE void RemoveUnnecessaryMasterPages(SdPage *pMaster=nullptr, bool bOnlyDuplicatePages=false, bool bUndo=true)
SAL_DLLPRIVATE void Merge(SdrModel &rSourceModel, sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum, sal_uInt16 nDestPos, bool bMergeMasterPages, bool bAllMasterPages, bool bUndo=true, bool bTreadSourceAsConst=false) override
SAL_DLLPRIVATE rtl::Reference< SdrPage > RemovePage(sal_uInt16 nPgNum) override
SAL_DLLPRIVATE DocumentType GetDocumentType() const
SAL_DLLPRIVATE rtl::Reference< SdPage > AllocSdPage(bool bMasterPage)
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
virtual void SetOrientation(Orientation eOrient) override
virtual Orientation GetOrientation() const override
PageKind GetPageKind() const
virtual void SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr) override
OUString const & GetRealName() const
bool IsScaleObjects() const
void SetBookmarkName(const OUString &aName)
bool IsPrecious() const
The "precious" flag is used for master pages to prevent some unused master pages from being deleted a...
void RemoveEmptyPresentationObjects()
removes all empty presentation objects from this slide
bool Equals(const SdPage &) const
void ScaleObjects(const Size &rNewPageSize, const ::tools::Rectangle &rNewBorderRect, bool bScaleAllObj)
void SetFileName(const OUString &aName)
virtual OUString GetLayoutName() const override
const OUString & GetName() const
void SetName(const OUString &rName)
Set the name of the page and broadcast a model change.
AutoLayout GetAutoLayout() const
void SetPresentationLayout(std::u16string_view rLayoutName, bool bReplaceStyleSheets=true, bool bSetMasterPage=true, bool bReverseOrder=false)
virtual void SetSize(const Size &aSize) override
void RenameAndCopyGraphicSheets(SdStyleSheetPool &rSourcePool, StyleSheetCopyResultVector &rCreatedSheets, std::u16string_view rRenameSuffix)
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
void CopyCellSheets(SdStyleSheetPool &rSourcePool)
void CopyLayoutSheets(std::u16string_view rLayoutName, SdStyleSheetPool &rSourcePool, StyleSheetCopyResultVector &rCreatedSheets)
void AddStyleFamily(const SdPage *pPage)
void CopyTableStyles(SdStyleSheetPool const &rSourcePool)
bool m_bTransportContainer
virtual void Merge(SdrModel &rSourceModel, sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum, sal_uInt16 nDestPos, bool bMergeMasterPages, bool bAllMasterPages, bool bUndo=true, bool bTreadSourceAsConst=false)
const SdrPage * GetMasterPage(sal_uInt16 nPgNum) const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
sal_uInt16 GetMasterPageCount() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
SdrUndoFactory & GetSdrUndoFactory() const
bool IsUndoEnabled() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool
sal_uInt16 GetPageCount() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual SdrInventor GetObjInventor() const
SfxStyleSheet * GetStyleSheet() const
virtual SdrObjKind GetObjIdentifier() const
SdrPage * getSdrPageFromSdrObject() const
virtual void SetName(const OUString &rStr, const bool bSetChanged=true)
SdrPage * GetPage() const
SdrPage & TRG_GetMasterPage() const
sal_uInt16 GetPageNum() const
virtual OUString GetLayoutName() const
bool IsMasterPage() const
sal_Int32 GetUpperBorder() const
sal_Int32 GetRightBorder() const
sal_Int32 GetLeftBorder() const
sal_Int32 GetLowerBorder() const
SdrPageView * GetSdrPageView() const
SfxFilterMatcher & GetFilterMatcher()
void Broadcast(const SfxHint &rHint)
ErrCode GuessFilter(SfxMedium &rMedium, std::shared_ptr< const SfxFilter > &, SfxFilterFlags nMust=SfxFilterFlags::IMPORT, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const std::shared_ptr< const SfxFilter > & GetFilter() const
void UseInteractionHandler(bool)
const OUString & GetName() const
void SetWaitCursor(bool bSet) const
SfxMedium * GetMedium() const
virtual void Remove(SfxStyleSheetBase *)
SfxStyleSearchBits GetMask() const
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
virtual const OUString & GetParent() const
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual sal_uLong GetHelpId(OUString &rFile)
virtual void SetHelpId(const OUString &r, sal_uLong nId)
virtual bool SetParent(const OUString &)
virtual SfxItemSet & GetItemSet()
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
virtual SfxUndoManager * GetUndoManager() override
sd::ViewShell * GetViewShell()
SdDrawDocument * GetDoc()
Base class of the stacked shell hierarchy.
virtual SdPage * GetActualPage()=0
::sd::View * GetView() const
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
static void lcl_IterateBookmarkPages(SdDrawDocument &rDoc, SdDrawDocument *pBookmarkDoc, const std::vector< OUString > &rBookmarkList, sal_uInt16 nBMSdPageCount, InsertBookmarkAsPage_FindDuplicateLayouts &rPageIterator, bool bRenameDuplicates)
static OUString createNewMasterPageLayoutName(const SdDrawDocument &rDoc)
static bool isMasterPageLayoutNameUnique(const SdDrawDocument &rDoc, std::u16string_view rCandidate)
Exchange master page.
constexpr OUStringLiteral SD_LT_SEPARATOR
OSQLColumns::const_iterator find(const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
OUString SdResId(TranslateId aId)
OUString VCL_DLLPUBLIC GetStandardText(StandardButtonType eButton)
std::vector< css::uno::Reference< css::style::XStyle > > XStyleVector
std::vector< rtl::Reference< SdStyleSheet > > SdStyleSheetVector
std::vector< StyleSheetCopyResult > StyleSheetCopyResultVector
constexpr OUStringLiteral STR_LAYOUT_OUTLINE
SfxStyleFamily nNewFamily