convert PageKind to scoped enum

Change-Id: I7f90cf2e96b72031bcfff558794e6cb42ea408e8
This commit is contained in:
Noel Grandin 2016-10-11 13:01:32 +02:00
parent 4caacff9f2
commit e588aa4d34
93 changed files with 669 additions and 667 deletions

View File

@ -101,11 +101,12 @@ enum AutoLayout
AUTOLAYOUT_END AUTOLAYOUT_END
}; };
enum PageKind enum class PageKind
{ {
PK_STANDARD, Standard,
PK_NOTES, Notes,
PK_HANDOUT Handout,
LAST = Handout
}; };
enum class EditMode enum class EditMode

View File

@ -188,7 +188,7 @@ const SfxItemSet& SdDialogsTest::getSfxItemSetFromSdrObject()
{ {
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc); CPPUNIT_ASSERT(pDrawDoc);
SdPage* pSdPage = pDrawDoc->GetSdPage(0, PK_STANDARD); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard);
CPPUNIT_ASSERT(pSdPage); CPPUNIT_ASSERT(pSdPage);
SdrObject* pSdrObj = pSdPage->GetObj(0); SdrObject* pSdrObj = pSdPage->GetObj(0);
CPPUNIT_ASSERT(pSdrObj); CPPUNIT_ASSERT(pSdrObj);
@ -401,7 +401,7 @@ VclAbstractDialog* SdDialogsTest::createDialogByID(sal_uInt32 nID)
// CreateMorphDlg(vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override; // CreateMorphDlg(vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override;
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc); CPPUNIT_ASSERT(pDrawDoc);
SdPage* pSdPage = pDrawDoc->GetSdPage(0, PK_STANDARD); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard);
CPPUNIT_ASSERT(pSdPage); CPPUNIT_ASSERT(pSdPage);
SdrObject* pSdrObj = pSdPage->GetObj(0); SdrObject* pSdrObj = pSdPage->GetObj(0);
// using one SdrObject is okay, none crashes // using one SdrObject is okay, none crashes
@ -566,7 +566,7 @@ VclAbstractDialog* SdDialogsTest::createDialogByID(sal_uInt32 nID)
// CreateMasterLayoutDialog(vcl::Window* pParent, SdDrawDocument* pDoc, SdPage*) override; // CreateMasterLayoutDialog(vcl::Window* pParent, SdDrawDocument* pDoc, SdPage*) override;
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc); CPPUNIT_ASSERT(pDrawDoc);
SdPage* pSdPage = pDrawDoc->GetSdPage(0, PK_STANDARD); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard);
CPPUNIT_ASSERT(pSdPage); CPPUNIT_ASSERT(pSdPage);
pRetval = getSdAbstractDialogFactory()->CreateMasterLayoutDialog( pRetval = getSdAbstractDialogFactory()->CreateMasterLayoutDialog(
Application::GetDefDialogParent(), Application::GetDefDialogParent(),
@ -585,7 +585,7 @@ VclAbstractDialog* SdDialogsTest::createDialogByID(sal_uInt32 nID)
// cases // cases
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc); CPPUNIT_ASSERT(pDrawDoc);
SdPage* pSdPage = pDrawDoc->GetSdPage(0, PK_STANDARD); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard);
CPPUNIT_ASSERT(pSdPage); CPPUNIT_ASSERT(pSdPage);
pRetval = getSdAbstractDialogFactory()->CreateHeaderFooterDialog( pRetval = getSdAbstractDialogFactory()->CreateHeaderFooterDialog(
getViewShell(), getViewShell(),

View File

@ -112,11 +112,11 @@ void SdMiscTest::testTdf96206()
auto pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase()); auto pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
auto& rSSController = pSSVS->GetSlideSorter().GetController(); auto& rSSController = pSSVS->GetSlideSorter().GetController();
const sal_uInt16 nMasterPageCnt1 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::PK_STANDARD); const sal_uInt16 nMasterPageCnt1 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), nMasterPageCnt1); CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), nMasterPageCnt1);
rSSController.GetClipboard().DoCopy(); rSSController.GetClipboard().DoCopy();
rSSController.GetClipboard().DoPaste(); rSSController.GetClipboard().DoPaste();
const sal_uInt16 nMasterPageCnt2 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::PK_STANDARD); const sal_uInt16 nMasterPageCnt2 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2); CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2);
xDocSh->DoClose(); xDocSh->DoClose();
@ -130,7 +130,7 @@ void SdMiscTest::testTdf96708()
auto& rSSController = pSSVS->GetSlideSorter().GetController(); auto& rSSController = pSSVS->GetSlideSorter().GetController();
auto& rPageSelector = rSSController.GetPageSelector(); auto& rPageSelector = rSSController.GetPageSelector();
const sal_uInt16 nMasterPageCnt1 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::PK_STANDARD); const sal_uInt16 nMasterPageCnt1 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), nMasterPageCnt1); CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), nMasterPageCnt1);
rPageSelector.SelectAllPages(); rPageSelector.SelectAllPages();
rSSController.GetClipboard().DoCopy(); rSSController.GetClipboard().DoCopy();
@ -140,7 +140,7 @@ void SdMiscTest::testTdf96708()
Scheduler::ProcessTaskScheduling(true); Scheduler::ProcessTaskScheduling(true);
rSSController.GetClipboard().DoPaste(); rSSController.GetClipboard().DoPaste();
const sal_uInt16 nMasterPageCnt2 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::PK_STANDARD); const sal_uInt16 nMasterPageCnt2 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2); CPPUNIT_ASSERT_EQUAL(nMasterPageCnt1, nMasterPageCnt2);
xDocSh->DoClose(); xDocSh->DoClose();

View File

@ -645,7 +645,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
}; };
// the document has 1 slide // the document has 1 slide
CPPUNIT_ASSERT(pDoc->GetSdPageCount(PK_STANDARD) == 1); CPPUNIT_ASSERT(pDoc->GetSdPageCount(PageKind::Standard) == 1);
uno::Sequence<beans::PropertyValue> aArgs; uno::Sequence<beans::PropertyValue> aArgs;
@ -716,7 +716,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
} }
// the document has 1 slide // the document has 1 slide
CPPUNIT_ASSERT(pDoc->GetSdPageCount(PK_STANDARD) == 1); CPPUNIT_ASSERT(pDoc->GetSdPageCount(PageKind::Standard) == 1);
comphelper::LibreOfficeKit::setActive(false); comphelper::LibreOfficeKit::setActive(false);
} }

View File

@ -1431,9 +1431,9 @@ void EffectMigration::DocumentLoaded(SdDrawDocument & rDoc)
{ {
if (DocumentType::Draw == rDoc.GetDocumentType()) if (DocumentType::Draw == rDoc.GetDocumentType())
return; // no animations in Draw return; // no animations in Draw
for (sal_uInt16 n = 0; n < rDoc.GetSdPageCount(PK_STANDARD); ++n) for (sal_uInt16 n = 0; n < rDoc.GetSdPageCount(PageKind::Standard); ++n)
{ {
SdPage *const pPage = rDoc.GetSdPage(n, PK_STANDARD); SdPage *const pPage = rDoc.GetSdPage(n, PageKind::Standard);
if (pPage->hasAnimationNode()) if (pPage->hasAnimationNode())
{ {
// this will force the equivalent of the MainSequence::onTimerHdl // this will force the equivalent of the MainSequence::onTimerHdl
@ -1442,9 +1442,9 @@ void EffectMigration::DocumentLoaded(SdDrawDocument & rDoc)
pPage->getMainSequence()->getRootNode(); pPage->getMainSequence()->getRootNode();
} }
} }
for (sal_uInt16 n = 0; n < rDoc.GetMasterSdPageCount(PK_STANDARD); ++n) for (sal_uInt16 n = 0; n < rDoc.GetMasterSdPageCount(PageKind::Standard); ++n)
{ {
SdPage *const pPage = rDoc.GetMasterSdPage(n, PK_STANDARD); SdPage *const pPage = rDoc.GetMasterSdPage(n, PageKind::Standard);
if (pPage->hasAnimationNode()) if (pPage->hasAnimationNode())
{ {
pPage->getMainSequence()->getRootNode(); pPage->getMainSequence()->getRootNode();

View File

@ -40,17 +40,17 @@ void ImpPageListWatcher::ImpRecreateSortedPageListOnDemand()
switch(pCandidate->GetPageKind()) switch(pCandidate->GetPageKind())
{ {
case PK_STANDARD: case PageKind::Standard:
{ {
maPageVectorStandard.push_back(pCandidate); maPageVectorStandard.push_back(pCandidate);
break; break;
} }
case PK_NOTES: case PageKind::Notes:
{ {
maPageVectorNotes.push_back(pCandidate); maPageVectorNotes.push_back(pCandidate);
break; break;
} }
case PK_HANDOUT: case PageKind::Handout:
{ {
DBG_ASSERT(!mpHandoutPage, "ImpPageListWatcher::ImpRecreateSortedPageListOnDemand: Two Handout pages in PageList of Model (!)"); DBG_ASSERT(!mpHandoutPage, "ImpPageListWatcher::ImpRecreateSortedPageListOnDemand: Two Handout pages in PageList of Model (!)");
mpHandoutPage = pCandidate; mpHandoutPage = pCandidate;
@ -85,29 +85,29 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
switch(ePgKind) switch(ePgKind)
{ {
case PK_STANDARD: case PageKind::Standard:
{ {
if( nPgNum < (sal_uInt32)maPageVectorStandard.size() ) if( nPgNum < (sal_uInt32)maPageVectorStandard.size() )
pRetval = maPageVectorStandard[nPgNum]; pRetval = maPageVectorStandard[nPgNum];
else else
{ {
SAL_WARN( "sd.core", SAL_WARN( "sd.core",
"ImpPageListWatcher::GetSdPage(PK_STANDARD): page number " << nPgNum << " >= " << maPageVectorStandard.size() ); "ImpPageListWatcher::GetSdPage(PageKind::Standard): page number " << nPgNum << " >= " << maPageVectorStandard.size() );
} }
break; break;
} }
case PK_NOTES: case PageKind::Notes:
{ {
if( nPgNum < (sal_uInt32)maPageVectorNotes.size() ) if( nPgNum < (sal_uInt32)maPageVectorNotes.size() )
pRetval = maPageVectorNotes[nPgNum]; pRetval = maPageVectorNotes[nPgNum];
else else
{ {
SAL_WARN( "sd.core", SAL_WARN( "sd.core",
"ImpPageListWatcher::GetSdPage(PK_NOTES): page number " << nPgNum << " >= " << maPageVectorNotes.size() ); "ImpPageListWatcher::GetSdPage(PageKind::Notes): page number " << nPgNum << " >= " << maPageVectorNotes.size() );
} }
break; break;
} }
case PK_HANDOUT: case PageKind::Handout:
{ {
// #11420# for models used to transfer drawing shapes via clipboard it's ok to not have a handout page // #11420# for models used to transfer drawing shapes via clipboard it's ok to not have a handout page
DBG_ASSERT(nPgNum == 0L, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)"); DBG_ASSERT(nPgNum == 0L, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
@ -136,17 +136,17 @@ sal_uInt32 ImpPageListWatcher::GetSdPageCount(PageKind ePgKind)
switch(ePgKind) switch(ePgKind)
{ {
case PK_STANDARD: case PageKind::Standard:
{ {
nRetval = maPageVectorStandard.size(); nRetval = maPageVectorStandard.size();
break; break;
} }
case PK_NOTES: case PageKind::Notes:
{ {
nRetval = maPageVectorNotes.size(); nRetval = maPageVectorNotes.size();
break; break;
} }
case PK_HANDOUT: case PageKind::Handout:
{ {
if(mpHandoutPage) if(mpHandoutPage)
{ {
@ -170,7 +170,7 @@ sal_uInt32 ImpPageListWatcher::GetVisibleSdPageCount()
for(sal_uInt32 a(0L); a < nPageCount; a++) for(sal_uInt32 a(0L); a < nPageCount; a++)
{ {
SdPage* pCandidate = ImpGetPage(a); SdPage* pCandidate = ImpGetPage(a);
if ((pCandidate->GetPageKind() == PK_STANDARD)&&(!pCandidate->IsExcluded())) nVisiblePageCount++; if ((pCandidate->GetPageKind() == PageKind::Standard)&&(!pCandidate->IsExcluded())) nVisiblePageCount++;
} }
return nVisiblePageCount; return nVisiblePageCount;
} }

View File

@ -496,10 +496,10 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
pNewStylePool->CopyCellSheets(*pOldStylePool); pNewStylePool->CopyCellSheets(*pOldStylePool);
pNewStylePool->CopyTableStyles(*pOldStylePool); pNewStylePool->CopyTableStyles(*pOldStylePool);
for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++) for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PageKind::Standard); i++)
{ {
// Move with all of the master page's layouts // Move with all of the master page's layouts
OUString aOldLayoutName(const_cast<SdDrawDocument*>(this)->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName()); OUString aOldLayoutName(const_cast<SdDrawDocument*>(this)->GetMasterSdPage(i, PageKind::Standard)->GetLayoutName());
aOldLayoutName = aOldLayoutName.copy( 0, aOldLayoutName.indexOf( SD_LT_SEPARATOR ) ); aOldLayoutName = aOldLayoutName.copy( 0, aOldLayoutName.indexOf( SD_LT_SEPARATOR ) );
SdStyleSheetVector aCreatedSheets; SdStyleSheetVector aCreatedSheets;
pNewStylePool->CopyLayoutSheets(aOldLayoutName, *pOldStylePool, aCreatedSheets ); pNewStylePool->CopyLayoutSheets(aOldLayoutName, *pOldStylePool, aCreatedSheets );
@ -588,7 +588,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
CheckMasterPages(); CheckMasterPages();
if ( GetMasterSdPageCount(PK_STANDARD) > 1 ) if ( GetMasterSdPageCount(PageKind::Standard) > 1 )
RemoveUnnecessaryMasterPages( nullptr, true, false ); RemoveUnnecessaryMasterPages( nullptr, true, false );
for ( sal_uInt16 i = 0; i < GetPageCount(); i++ ) for ( sal_uInt16 i = 0; i < GetPageCount(); i++ )
@ -670,10 +670,10 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// create missing layout style sheets for broken documents // create missing layout style sheets for broken documents
// that where created with the 5.2 // that where created with the 5.2
nPageCount = GetMasterSdPageCount( PK_STANDARD ); nPageCount = GetMasterSdPageCount( PageKind::Standard );
for (nPage = 0; nPage < nPageCount; nPage++) for (nPage = 0; nPage < nPageCount; nPage++)
{ {
SdPage* pPage = GetMasterSdPage(nPage, PK_STANDARD); SdPage* pPage = GetMasterSdPage(nPage, PageKind::Standard);
pSPool->CreateLayoutStyleSheets( pPage->GetName(), true ); pSPool->CreateLayoutStyleSheets( pPage->GetName(), true );
} }
@ -696,11 +696,11 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
mbNewOrLoadCompleted = true; mbNewOrLoadCompleted = true;
// Update all linked pages // Update all linked pages
sal_uInt16 nMaxSdPages = GetSdPageCount(PK_STANDARD); sal_uInt16 nMaxSdPages = GetSdPageCount(PageKind::Standard);
for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++) for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++)
{ {
SdPage* pPage = GetSdPage(nSdPage, PK_STANDARD); SdPage* pPage = GetSdPage(nSdPage, PageKind::Standard);
if (pPage && !pPage->GetFileName().isEmpty() && pPage->GetBookmarkName().getLength()) if (pPage && !pPage->GetFileName().isEmpty() && pPage->GetBookmarkName().getLength())
{ {

View File

@ -156,7 +156,7 @@ sal_uInt16 SdDrawDocument::GetPageByName(const OUString& rPgName, bool& rbIsMast
GetPage(nPage))); GetPage(nPage)));
if (pPage != nullptr if (pPage != nullptr
&& pPage->GetPageKind() != PK_HANDOUT && pPage->GetPageKind() != PageKind::Handout
&& pPage->GetName() == rPgName) && pPage->GetName() == rPgName)
{ {
nPageNum = nPage; nPageNum = nPage;
@ -224,7 +224,7 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
// If this is a notes page, find its page object and correct the page // If this is a notes page, find its page object and correct the page
// number // number
if (pPage && pPage->GetPageKind() == PK_NOTES) if (pPage && pPage->GetPageKind() == PageKind::Notes)
{ {
const size_t nObjCount = pPage->GetObjCount(); const size_t nObjCount = pPage->GetObjCount();
for (size_t nObj = 0; nObj < nObjCount; ++nObj) for (size_t nObj = 0; nObj < nObjCount; ++nObj)
@ -293,7 +293,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, const OUSt
void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement) void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement)
{ {
bool bNotes = (pPage->GetPageKind() == PK_NOTES); bool bNotes = (pPage->GetPageKind() == PageKind::Notes);
SfxItemPool& rPool(GetPool()); SfxItemPool& rPool(GetPool());
sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD); sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD);
@ -377,7 +377,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
if (!bLast) if (!bLast)
UpdatePageRelativeURLs(static_cast<SdPage*>( pPage ), nPos, 1); UpdatePageRelativeURLs(static_cast<SdPage*>( pPage ), nPos, 1);
if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PageKind::Standard)
{ {
SfxViewShell* pViewShell = SfxViewShell::GetFirst(); SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell) while (pViewShell)
@ -410,7 +410,7 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
if (!bLast) if (!bLast)
UpdatePageRelativeURLs(static_cast<SdPage*>(pPage), nPgNum, -1); UpdatePageRelativeURLs(static_cast<SdPage*>(pPage), nPgNum, -1);
if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PageKind::Standard)
{ {
SfxViewShell* pViewShell = SfxViewShell::GetFirst(); SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell) while (pViewShell)
@ -428,7 +428,7 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos ) void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos )
{ {
FmFormModel::InsertMasterPage( pPage, nPos ); FmFormModel::InsertMasterPage( pPage, nPos );
if( pPage->IsMasterPage() && (static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) ) if( pPage->IsMasterPage() && (static_cast<SdPage*>(pPage)->GetPageKind() == PageKind::Standard) )
{ {
// new master page created, add its style family // new master page created, add its style family
SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() ); SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
@ -440,7 +440,7 @@ void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos )
SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 nPgNum) SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 nPgNum)
{ {
SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPgNum )); SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPgNum ));
if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PageKind::Standard) )
{ {
// master page removed, remove its style family // master page removed, remove its style family
SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() ); SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
@ -456,7 +456,7 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
{ {
PageKind ePageKind = pPage->GetPageKind(); PageKind ePageKind = pPage->GetPageKind();
if (ePageKind == PK_STANDARD) if (ePageKind == PageKind::Standard)
{ {
pPage->SetSelected(bSelect); pPage->SetSelected(bSelect);
@ -468,17 +468,17 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
pNotesPage = static_cast<SdPage*>(GetPage(nDestPageNum)); pNotesPage = static_cast<SdPage*>(GetPage(nDestPageNum));
} }
if (pNotesPage && pNotesPage->GetPageKind() == PK_NOTES) if (pNotesPage && pNotesPage->GetPageKind() == PageKind::Notes)
{ {
pNotesPage->SetSelected(bSelect); pNotesPage->SetSelected(bSelect);
} }
} }
else if (ePageKind == PK_NOTES) else if (ePageKind == PageKind::Notes)
{ {
pPage->SetSelected(bSelect); pPage->SetSelected(bSelect);
SdPage* pStandardPage = static_cast<SdPage*>( GetPage( pPage->GetPageNum() - 1 ) ); SdPage* pStandardPage = static_cast<SdPage*>( GetPage( pPage->GetPageNum() - 1 ) );
if (pStandardPage && pStandardPage->GetPageKind() == PK_STANDARD) if (pStandardPage && pStandardPage->GetPageKind() == PageKind::Standard)
pStandardPage->SetSelected(bSelect); pStandardPage->SetSelected(bSelect);
} }
} }
@ -500,7 +500,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
SdPage* pRefPage = nullptr; SdPage* pRefPage = nullptr;
if( pRefDocument ) if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_HANDOUT ); pRefPage = pRefDocument->GetSdPage( 0, PageKind::Handout );
if( pRefPage ) if( pRefPage )
{ {
@ -513,14 +513,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
pHandoutPage->SetBorder(0, 0, 0, 0); pHandoutPage->SetBorder(0, 0, 0, 0);
} }
pHandoutPage->SetPageKind(PK_HANDOUT); pHandoutPage->SetPageKind(PageKind::Handout);
pHandoutPage->SetName( SD_RESSTR(STR_HANDOUT) ); pHandoutPage->SetName( SD_RESSTR(STR_HANDOUT) );
InsertPage(pHandoutPage, 0); InsertPage(pHandoutPage, 0);
// Insert master page and register this with the handout page // Insert master page and register this with the handout page
SdPage* pHandoutMPage = AllocSdPage(true); SdPage* pHandoutMPage = AllocSdPage(true);
pHandoutMPage->SetSize( pHandoutPage->GetSize() ); pHandoutMPage->SetSize( pHandoutPage->GetSize() );
pHandoutMPage->SetPageKind(PK_HANDOUT); pHandoutMPage->SetPageKind(PageKind::Handout);
pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(), pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(),
pHandoutPage->GetUppBorder(), pHandoutPage->GetUppBorder(),
pHandoutPage->GetRgtBorder(), pHandoutPage->GetRgtBorder(),
@ -535,7 +535,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
bool bClipboard = false; bool bClipboard = false;
if( pRefDocument ) if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_STANDARD ); pRefPage = pRefDocument->GetSdPage( 0, PageKind::Standard );
if (nPageCount == 0) if (nPageCount == 0)
{ {
@ -608,7 +608,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
SdPage* pNotesPage = AllocSdPage(false); SdPage* pNotesPage = AllocSdPage(false);
if( pRefDocument ) if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_NOTES ); pRefPage = pRefDocument->GetSdPage( 0, PageKind::Notes );
if( pRefPage ) if( pRefPage )
{ {
@ -629,7 +629,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
pNotesPage->SetBorder(0, 0, 0, 0); pNotesPage->SetBorder(0, 0, 0, 0);
} }
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
InsertPage(pNotesPage, 2); InsertPage(pNotesPage, 2);
if( bClipboard ) if( bClipboard )
pNotesPage->SetLayoutName( pPage->GetLayoutName() ); pNotesPage->SetLayoutName( pPage->GetLayoutName() );
@ -637,7 +637,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
// Insert master page, then register this with the notes page // Insert master page, then register this with the notes page
SdPage* pNotesMPage = AllocSdPage(true); SdPage* pNotesMPage = AllocSdPage(true);
pNotesMPage->SetSize( pNotesPage->GetSize() ); pNotesMPage->SetSize( pNotesPage->GetSize() );
pNotesMPage->SetPageKind(PK_NOTES); pNotesMPage->SetPageKind(PageKind::Notes);
pNotesMPage->SetBorder( pNotesPage->GetLftBorder(), pNotesMPage->SetBorder( pNotesPage->GetLftBorder(),
pNotesPage->GetUppBorder(), pNotesPage->GetUppBorder(),
pNotesPage->GetRgtBorder(), pNotesPage->GetRgtBorder(),
@ -671,10 +671,10 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
{ {
// Set PageKind // Set PageKind
SdPage* pHandoutMPage = static_cast<SdPage*>( GetMasterPage(0) ); SdPage* pHandoutMPage = static_cast<SdPage*>( GetMasterPage(0) );
pHandoutMPage->SetPageKind(PK_HANDOUT); pHandoutMPage->SetPageKind(PageKind::Handout);
SdPage* pHandoutPage = static_cast<SdPage*>( GetPage(0) ); SdPage* pHandoutPage = static_cast<SdPage*>( GetPage(0) );
pHandoutPage->SetPageKind(PK_HANDOUT); pHandoutPage->SetPageKind(PageKind::Handout);
pHandoutPage->TRG_SetMasterPage( *pHandoutMPage ); pHandoutPage->TRG_SetMasterPage( *pHandoutMPage );
for (sal_uInt16 i = 1; i < nPageCount; i = i + 2) for (sal_uInt16 i = 1; i < nPageCount; i = i + 2)
@ -689,7 +689,7 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
} }
SdPage* pNotesPage = static_cast<SdPage*>( GetPage(i+1) ); SdPage* pNotesPage = static_cast<SdPage*>( GetPage(i+1) );
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
// Set notes master page // Set notes master page
sal_uInt16 nMasterPageAfterPagesMasterPage = (pPage->TRG_GetMasterPage()).GetPageNum() + 1; sal_uInt16 nMasterPageAfterPagesMasterPage = (pPage->TRG_GetMasterPage()).GetPageNum() + 1;
@ -706,10 +706,10 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
void SdDrawDocument::UnselectAllPages() void SdDrawDocument::UnselectAllPages()
{ {
sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD); sal_uInt16 nNoOfPages = GetSdPageCount(PageKind::Standard);
for (sal_uInt16 nPage = 0; nPage < nNoOfPages; ++nPage) for (sal_uInt16 nPage = 0; nPage < nNoOfPages; ++nPage)
{ {
SdPage* pPage = GetSdPage(nPage, PK_STANDARD); SdPage* pPage = GetSdPage(nPage, PageKind::Standard);
pPage->SetSelected(false); pPage->SetSelected(false);
} }
} }
@ -721,7 +721,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
{ {
SdPage* pPage = nullptr; SdPage* pPage = nullptr;
sal_uInt16 nPage; sal_uInt16 nPage;
sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD); sal_uInt16 nNoOfPages = GetSdPageCount(PageKind::Standard);
bool bSomethingHappened = false; bool bSomethingHappened = false;
const bool bUndo = IsUndoEnabled(); const bool bUndo = IsUndoEnabled();
@ -733,7 +733,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
std::vector<SdPage*> aPageList; std::vector<SdPage*> aPageList;
for (nPage = 0; nPage < nNoOfPages; nPage++) for (nPage = 0; nPage < nNoOfPages; nPage++)
{ {
pPage = GetSdPage(nPage, PK_STANDARD); pPage = GetSdPage(nPage, PageKind::Standard);
if (pPage->IsSelected()) { if (pPage->IsSelected()) {
aPageList.push_back(pPage); aPageList.push_back(pPage);
@ -745,11 +745,11 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
if (nPage != (sal_uInt16)-1) if (nPage != (sal_uInt16)-1)
{ {
pPage = GetSdPage(nPage, PK_STANDARD); pPage = GetSdPage(nPage, PageKind::Standard);
while (nPage > 0 && pPage->IsSelected()) while (nPage > 0 && pPage->IsSelected())
{ {
nPage--; nPage--;
pPage = GetSdPage(nPage, PK_STANDARD); pPage = GetSdPage(nPage, PageKind::Standard);
} }
if (pPage->IsSelected()) if (pPage->IsSelected())
@ -783,7 +783,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
else else
{ {
nTargetPage = nPage; nTargetPage = nPage;
nTargetPage = 2 * nTargetPage + 1; // PK_STANDARD --> absolute nTargetPage = 2 * nTargetPage + 1; // PageKind::Standard --> absolute
std::vector<SdPage*>::iterator iter; std::vector<SdPage*>::iterator iter;
for (iter = aPageList.begin(); iter != aPageList.end(); ++iter) for (iter = aPageList.begin(); iter != aPageList.end(); ++iter)
@ -893,7 +893,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl, Timer *, void)
bool bChanged = IsChanged(); // remember this bool bChanged = IsChanged(); // remember this
// Initialize Autolayouts // Initialize Autolayouts
SdPage* pHandoutMPage = GetMasterSdPage(0, PK_HANDOUT); SdPage* pHandoutMPage = GetMasterSdPage(0, PageKind::Handout);
if (pHandoutMPage->GetAutoLayout() == AUTOLAYOUT_NONE) if (pHandoutMPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{ {
@ -901,7 +901,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl, Timer *, void)
pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, true, true); pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, true, true);
} }
SdPage* pPage = GetSdPage(0, PK_STANDARD); SdPage* pPage = GetSdPage(0, PageKind::Standard);
if (pPage->GetAutoLayout() == AUTOLAYOUT_NONE) if (pPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{ {
@ -909,7 +909,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl, Timer *, void)
pPage->SetAutoLayout(AUTOLAYOUT_NONE, true, true); pPage->SetAutoLayout(AUTOLAYOUT_NONE, true, true);
} }
SdPage* pNotesPage = GetSdPage(0, PK_NOTES); SdPage* pNotesPage = GetSdPage(0, PageKind::Notes);
if (pNotesPage->GetAutoLayout() == AUTOLAYOUT_NONE) if (pNotesPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{ {
@ -1075,8 +1075,8 @@ ImageMap* SdDrawDocument::GetImageMapForObject(SdrObject* pObj)
} }
/** this method enforces that the masterpages are in the correct order, /** this method enforces that the masterpages are in the correct order,
that is at position 1 is a PK_STANDARD masterpage followed by a that is at position 1 is a PageKind::Standard masterpage followed by a
PK_NOTES masterpage and so on. # PageKind::Notes masterpage and so on. #
*/ */
void SdDrawDocument::CheckMasterPages() void SdDrawDocument::CheckMasterPages()
{ {
@ -1097,8 +1097,8 @@ void SdDrawDocument::CheckMasterPages()
{ {
pPage = static_cast<SdPage*> (GetMasterPage( nPage )); pPage = static_cast<SdPage*> (GetMasterPage( nPage ));
// if an odd page is not a standard page or an even page is not a notes page // if an odd page is not a standard page or an even page is not a notes page
if( ((1 == (nPage & 1)) && (pPage->GetPageKind() != PK_STANDARD) ) || if( ((1 == (nPage & 1)) && (pPage->GetPageKind() != PageKind::Standard) ) ||
((0 == (nPage & 1)) && (pPage->GetPageKind() != PK_NOTES) ) ) ((0 == (nPage & 1)) && (pPage->GetPageKind() != PageKind::Notes) ) )
break; // then we have a fatal error break; // then we have a fatal error
} }
@ -1114,14 +1114,14 @@ void SdDrawDocument::CheckMasterPages()
while( nPage < nMaxPages ) while( nPage < nMaxPages )
{ {
pPage = static_cast<SdPage*> (GetMasterPage( nPage )); pPage = static_cast<SdPage*> (GetMasterPage( nPage ));
if( pPage->GetPageKind() != PK_STANDARD ) if( pPage->GetPageKind() != PageKind::Standard )
{ {
bChanged = true; bChanged = true;
sal_uInt16 nFound = nPage + 1; sal_uInt16 nFound = nPage + 1;
while( nFound < nMaxPages ) while( nFound < nMaxPages )
{ {
pPage = static_cast<SdPage*>(GetMasterPage( nFound )); pPage = static_cast<SdPage*>(GetMasterPage( nFound ));
if( PK_STANDARD == pPage->GetPageKind() ) if( PageKind::Standard == pPage->GetPageKind() )
{ {
MoveMasterPage( nFound, nPage ); MoveMasterPage( nFound, nPage );
pPage->SetInserted(); pPage->SetInserted();
@ -1144,7 +1144,7 @@ void SdDrawDocument::CheckMasterPages()
else else
pNotesPage = nullptr; pNotesPage = nullptr;
if( (nullptr == pNotesPage) || (pNotesPage->GetPageKind() != PK_NOTES) || ( pPage->GetLayoutName() != pNotesPage->GetLayoutName() ) ) if( (nullptr == pNotesPage) || (pNotesPage->GetPageKind() != PageKind::Notes) || ( pPage->GetLayoutName() != pNotesPage->GetLayoutName() ) )
{ {
bChanged = true; bChanged = true;
@ -1152,7 +1152,7 @@ void SdDrawDocument::CheckMasterPages()
while( nFound < nMaxPages ) while( nFound < nMaxPages )
{ {
pNotesPage = static_cast<SdPage*>(GetMasterPage( nFound )); pNotesPage = static_cast<SdPage*>(GetMasterPage( nFound ));
if( (PK_NOTES == pNotesPage->GetPageKind()) && ( pPage->GetLayoutName() == pNotesPage->GetLayoutName() ) ) if( (PageKind::Notes == pNotesPage->GetPageKind()) && ( pPage->GetLayoutName() == pNotesPage->GetLayoutName() ) )
{ {
MoveMasterPage( nFound, nPage ); MoveMasterPage( nFound, nPage );
pNotesPage->SetInserted(); pNotesPage->SetInserted();
@ -1173,7 +1173,7 @@ void SdDrawDocument::CheckMasterPages()
while( nFound < nMaxPages ) while( nFound < nMaxPages )
{ {
pRefNotesPage = static_cast<SdPage*>(GetMasterPage( nFound )); pRefNotesPage = static_cast<SdPage*>(GetMasterPage( nFound ));
if( PK_NOTES == pRefNotesPage->GetPageKind() ) if( PageKind::Notes == pRefNotesPage->GetPageKind() )
break; break;
nFound++; nFound++;
} }
@ -1181,7 +1181,7 @@ void SdDrawDocument::CheckMasterPages()
pRefNotesPage = nullptr; pRefNotesPage = nullptr;
SdPage* pNewNotesPage = AllocSdPage(true); SdPage* pNewNotesPage = AllocSdPage(true);
pNewNotesPage->SetPageKind(PK_NOTES); pNewNotesPage->SetPageKind(PageKind::Notes);
if( pRefNotesPage ) if( pRefNotesPage )
{ {
pNewNotesPage->SetSize( pRefNotesPage->GetSize() ); pNewNotesPage->SetSize( pRefNotesPage->GetSize() );
@ -1200,7 +1200,7 @@ void SdDrawDocument::CheckMasterPages()
nPage++; nPage++;
} }
// now remove all remaining and unused non PK_STANDARD slides // now remove all remaining and unused non PageKind::Standard slides
while( nPage < nMaxPages ) while( nPage < nMaxPages )
{ {
bChanged = true; bChanged = true;
@ -1235,7 +1235,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
// From the given page determine the standard page and notes page of which // From the given page determine the standard page and notes page of which
// to take the layout and the position where to insert the new pages. // to take the layout and the position where to insert the new pages.
if (ePageKind == PK_NOTES) if (ePageKind == PageKind::Notes)
{ {
pPreviousNotesPage = pActualPage; pPreviousNotesPage = pActualPage;
sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
@ -1282,7 +1282,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
// Create new notes page and set it up // Create new notes page and set it up
pNotesPage = AllocSdPage(false); pNotesPage = AllocSdPage(false);
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
// Use master page of current page // Use master page of current page
pNotesPage->TRG_SetMasterPage(pPreviousNotesPage->TRG_GetMasterPage()); pNotesPage->TRG_SetMasterPage(pPreviousNotesPage->TRG_GetMasterPage());
@ -1306,7 +1306,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum) sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum)
{ {
PageKind ePageKind = PK_STANDARD; PageKind ePageKind = PageKind::Standard;
// Get current page // Get current page
SdPage* pActualPage = GetSdPage(nPageNum, ePageKind); SdPage* pActualPage = GetSdPage(nPageNum, ePageKind);
@ -1341,7 +1341,7 @@ sal_uInt16 SdDrawDocument::DuplicatePage (
// From the given page determine the standard page and the notes page // From the given page determine the standard page and the notes page
// of which to make copies. // of which to make copies.
if (ePageKind == PK_NOTES) if (ePageKind == PageKind::Notes)
{ {
pPreviousNotesPage = pActualPage; pPreviousNotesPage = pActualPage;
sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
@ -1390,7 +1390,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
// Gather some information about the standard page and the notes page // Gather some information about the standard page and the notes page
// that are to be inserted. This makes sure that there is always one // that are to be inserted. This makes sure that there is always one
// standard page followed by one notes page. // standard page followed by one notes page.
if (ePageKind == PK_NOTES) if (ePageKind == PageKind::Notes)
{ {
pPreviousNotesPage = pActualPage; pPreviousNotesPage = pActualPage;
nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
@ -1420,7 +1420,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
bIsPageObj); bIsPageObj);
// Set up and insert the notes page // Set up and insert the notes page
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
SetupNewPage ( SetupNewPage (
pPreviousNotesPage, pPreviousNotesPage,
pNotesPage, pNotesPage,

View File

@ -161,7 +161,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
if( rBookmarkList.empty() ) if( rBookmarkList.empty() )
{ {
// simply take master page of nPos'th page in source document // simply take master page of nPos'th page in source document
pBMMPage = static_cast<SdPage*>(&(pBookmarkDoc->GetSdPage((sal_uInt16)nPos, PK_STANDARD)->TRG_GetMasterPage())); pBMMPage = static_cast<SdPage*>(&(pBookmarkDoc->GetSdPage((sal_uInt16)nPos, PageKind::Standard)->TRG_GetMasterPage()));
} }
else else
{ {
@ -181,10 +181,10 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
} }
// enforce that bookmarked page is a standard page and not already a master page // enforce that bookmarked page is a standard page and not already a master page
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage()) if (pBMPage && pBMPage->GetPageKind()==PageKind::Standard && !pBMPage->IsMasterPage())
{ {
const sal_uInt16 nBMSdPage = (nBMPage - 1) / 2; const sal_uInt16 nBMSdPage = (nBMPage - 1) / 2;
pBMMPage = static_cast<SdPage*> (&(pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD)->TRG_GetMasterPage())); pBMMPage = static_cast<SdPage*> (&(pBookmarkDoc->GetSdPage(nBMSdPage, PageKind::Standard)->TRG_GetMasterPage()));
} }
} }
@ -408,8 +408,8 @@ bool SdDrawDocument::InsertBookmarkAsPage(
return false; return false;
} }
const sal_uInt16 nSdPageCount = GetSdPageCount(PK_STANDARD); const sal_uInt16 nSdPageCount = GetSdPageCount(PageKind::Standard);
const sal_uInt32 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PK_STANDARD); const sal_uInt32 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PageKind::Standard);
const sal_uInt16 nMPageCount = GetMasterPageCount(); const sal_uInt16 nMPageCount = GetMasterPageCount();
if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0) if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0)
@ -421,7 +421,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
// page so that inserted pages can be properly scaled even when inserted // page so that inserted pages can be properly scaled even when inserted
// before the first page. // before the first page.
// Note that the pointers are used later on as general page pointers. // Note that the pointers are used later on as general page pointers.
SdPage* pRefPage = GetSdPage(0, PK_STANDARD); SdPage* pRefPage = GetSdPage(0, PageKind::Standard);
Size aSize(pRefPage->GetSize()); Size aSize(pRefPage->GetSize());
sal_Int32 nLeft = pRefPage->GetLftBorder(); sal_Int32 nLeft = pRefPage->GetLftBorder();
sal_Int32 nRight = pRefPage->GetRgtBorder(); sal_Int32 nRight = pRefPage->GetRgtBorder();
@ -429,7 +429,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
sal_Int32 nLower = pRefPage->GetLwrBorder(); sal_Int32 nLower = pRefPage->GetLwrBorder();
Orientation eOrient = pRefPage->GetOrientation(); Orientation eOrient = pRefPage->GetOrientation();
SdPage* pNPage = GetSdPage(0, PK_NOTES); SdPage* pNPage = GetSdPage(0, PageKind::Notes);
Size aNSize(pNPage->GetSize()); Size aNSize(pNPage->GetSize());
sal_Int32 nNLeft = pNPage->GetLftBorder(); sal_Int32 nNLeft = pNPage->GetLftBorder();
sal_Int32 nNRight = pNPage->GetRgtBorder(); sal_Int32 nNRight = pNPage->GetRgtBorder();
@ -438,7 +438,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
Orientation eNOrient = pNPage->GetOrientation(); Orientation eNOrient = pNPage->GetOrientation();
// Adapt page size and margins to those of the later pages? // Adapt page size and margins to those of the later pages?
pRefPage = GetSdPage(nSdPageCount - 1, PK_STANDARD); pRefPage = GetSdPage(nSdPageCount - 1, PageKind::Standard);
if( bNoDialogs ) if( bNoDialogs )
{ {
@ -458,7 +458,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
} }
else else
{ {
SdPage* pBMPage = pBookmarkDoc->GetSdPage(0,PK_STANDARD); SdPage* pBMPage = pBookmarkDoc->GetSdPage(0,PageKind::Standard);
if (pBMPage->GetSize() != pRefPage->GetSize() || if (pBMPage->GetSize() != pRefPage->GetSize() ||
pBMPage->GetLftBorder() != pRefPage->GetLftBorder() || pBMPage->GetLftBorder() != pRefPage->GetLftBorder() ||
@ -561,7 +561,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++) for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
{ {
SdPage* pBMPage = pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD); SdPage* pBMPage = pBookmarkDoc->GetSdPage(nBMSdPage, PageKind::Standard);
OUString sName(pBMPage->GetName()); OUString sName(pBMPage->GetName());
bool bIsMasterPage; bool bIsMasterPage;
@ -650,7 +650,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
pBMPage = aBookmarkedPages[nPos]; pBMPage = aBookmarkedPages[nPos];
sal_uInt16 nBMPage = pBMPage!=nullptr ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND; sal_uInt16 nBMPage = pBMPage!=nullptr ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND;
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage()) if (pBMPage && pBMPage->GetPageKind()==PageKind::Standard && !pBMPage->IsMasterPage())
{ {
// It has to be a default page // It has to be a default page
bool bMustRename = false; bool bMustRename = false;
@ -813,7 +813,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if (nInsertPos > 0) if (nInsertPos > 0)
{ {
sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2; sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2;
sal_uInt16 nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount + sal_uInt16 nSdPageEnd = GetSdPageCount(PageKind::Standard) - nSdPageCount +
nSdPageStart - 1; nSdPageStart - 1;
const bool bRemoveEmptyPresObj = const bool bRemoveEmptyPresObj =
(pBookmarkDoc->GetDocumentType() == DocumentType::Impress) && (pBookmarkDoc->GetDocumentType() == DocumentType::Impress) &&
@ -831,7 +831,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++) for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++)
{ {
pRefPage = GetSdPage(nSdPage, PK_STANDARD); pRefPage = GetSdPage(nSdPage, PageKind::Standard);
if (pExchangeList && pExchangeIter != pExchangeList->end()) if (pExchangeList && pExchangeIter != pExchangeList->end())
{ {
@ -840,7 +840,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
pRefPage->SetName(aExchangeName); pRefPage->SetName(aExchangeName);
Broadcast(SdrHint(SdrHintKind::PageOrderChange, pRefPage)); Broadcast(SdrHint(SdrHintKind::PageOrderChange, pRefPage));
SdPage* pNewNotesPage = GetSdPage(nSdPage, PK_NOTES); SdPage* pNewNotesPage = GetSdPage(nSdPage, PageKind::Notes);
pNewNotesPage->SetName(aExchangeName); pNewNotesPage->SetName(aExchangeName);
Broadcast(SdrHint(SdrHintKind::PageOrderChange, pNewNotesPage)); Broadcast(SdrHint(SdrHintKind::PageOrderChange, pNewNotesPage));
@ -869,7 +869,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if( bRemoveEmptyPresObj ) if( bRemoveEmptyPresObj )
pRefPage->RemoveEmptyPresentationObjects(); pRefPage->RemoveEmptyPresentationObjects();
pRefPage = GetSdPage(nSdPage, PK_NOTES); pRefPage = GetSdPage(nSdPage, PageKind::Notes);
// update layout and referred master page // update layout and referred master page
pRefPage->SetPresentationLayout(aLayout); pRefPage->SetPresentationLayout(aLayout);
@ -897,7 +897,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++) for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++)
{ {
pRefPage = static_cast<SdPage*>( GetMasterPage(nPage) ); pRefPage = static_cast<SdPage*>( GetMasterPage(nPage) );
if (pRefPage->GetPageKind() == PK_STANDARD) if (pRefPage->GetPageKind() == PageKind::Standard)
{ {
if (bScaleObjects) if (bScaleObjects)
{ {
@ -1059,7 +1059,7 @@ bool SdDrawDocument::InsertBookmarkAsObject(
pView->EndListening(*this); pView->EndListening(*this);
// Look for the page into which the objects are supposed to be inserted // Look for the page into which the objects are supposed to be inserted
SdrPage* pPage = GetSdPage(0, PK_STANDARD); SdrPage* pPage = GetSdPage(0, PageKind::Standard);
if (mpDocSh) if (mpDocSh)
{ {
@ -1203,7 +1203,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
} }
// Check all master pages // Check all master pages
sal_uInt16 nSdMasterPageCount = GetMasterSdPageCount( PK_STANDARD ); sal_uInt16 nSdMasterPageCount = GetMasterSdPageCount( PageKind::Standard );
for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--) for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--)
{ {
SdPage* pMaster = pMasterPage; SdPage* pMaster = pMasterPage;
@ -1211,8 +1211,8 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
if (!pMaster) if (!pMaster)
{ {
pMaster = GetMasterSdPage( (sal_uInt16) nMPage, PK_STANDARD ); pMaster = GetMasterSdPage( (sal_uInt16) nMPage, PageKind::Standard );
pNotesMaster = GetMasterSdPage( (sal_uInt16) nMPage, PK_NOTES ); pNotesMaster = GetMasterSdPage( (sal_uInt16) nMPage, PageKind::Notes );
} }
else else
{ {
@ -1226,9 +1226,9 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
} }
} }
DBG_ASSERT( pMaster->GetPageKind() == PK_STANDARD, "wrong page kind" ); DBG_ASSERT( pMaster->GetPageKind() == PageKind::Standard, "wrong page kind" );
if ( pMaster->GetPageKind() == PK_STANDARD && if ( pMaster->GetPageKind() == PageKind::Standard &&
GetMasterPageUserCount( pMaster ) == 0 && GetMasterPageUserCount( pMaster ) == 0 &&
pNotesMaster ) pNotesMaster )
{ {
@ -1240,9 +1240,9 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{ {
// remove only duplicate pages // remove only duplicate pages
bDeleteMaster = false; bDeleteMaster = false;
for (sal_uInt16 i = 0; i < GetMasterSdPageCount( PK_STANDARD ); i++) for (sal_uInt16 i = 0; i < GetMasterSdPageCount( PageKind::Standard ); i++)
{ {
SdPage* pMPg = GetMasterSdPage( i, PK_STANDARD ); SdPage* pMPg = GetMasterSdPage( i, PageKind::Standard );
if( pMPg != pMaster && if( pMPg != pMaster &&
pMPg->GetLayoutName() == aLayoutName ) pMPg->GetLayoutName() == aLayoutName )
{ {
@ -1264,7 +1264,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
if( (pShownPage == pMaster) || (pShownPage == pNotesMaster) ) if( (pShownPage == pMaster) || (pShownPage == pNotesMaster) )
{ {
pView->HideSdrPage(); pView->HideSdrPage();
pView->ShowSdrPage( GetSdPage( 0, PK_STANDARD ) ); pView->ShowSdrPage( GetSdPage( 0, PageKind::Standard ) );
} }
} }
} }
@ -1421,7 +1421,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), OUString(), 0, nViewShellId); pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), OUString(), 0, nViewShellId);
} }
SdPage* pSelectedPage = GetSdPage(nSdPageNum, PK_STANDARD); SdPage* pSelectedPage = GetSdPage(nSdPageNum, PageKind::Standard);
SdPage* pNotes = static_cast<SdPage*>( GetPage(pSelectedPage->GetPageNum()+1) ); SdPage* pNotes = static_cast<SdPage*>( GetPage(pSelectedPage->GetPageNum()+1) );
SdPage& rOldMaster = static_cast<SdPage&>(pSelectedPage->TRG_GetMasterPage()); SdPage& rOldMaster = static_cast<SdPage&>(pSelectedPage->TRG_GetMasterPage());
SdPage& rOldNotesMaster = static_cast<SdPage&>(pNotes->TRG_GetMasterPage()); SdPage& rOldNotesMaster = static_cast<SdPage&>(pNotes->TRG_GetMasterPage());
@ -1442,8 +1442,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (rLayoutName.isEmpty()) if (rLayoutName.isEmpty())
{ {
// No LayoutName: take first MasterPage // No LayoutName: take first MasterPage
pMaster = pSourceDoc->GetMasterSdPage(0, PK_STANDARD); pMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Standard);
pNotesMaster = pSourceDoc->GetMasterSdPage(0, PK_NOTES); pNotesMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Notes);
} }
else else
{ {
@ -1457,9 +1457,9 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (pMP->GetLayoutName() == aSearchFor) if (pMP->GetLayoutName() == aSearchFor)
{ {
if (pMP->GetPageKind() == PK_STANDARD) if (pMP->GetPageKind() == PageKind::Standard)
pMaster = pMP; pMaster = pMP;
if (pMP->GetPageKind() == PK_NOTES) if (pMP->GetPageKind() == PageKind::Notes)
pNotesMaster = pMP; pNotesMaster = pMP;
} }
if (pMaster && pNotesMaster) if (pMaster && pNotesMaster)
@ -1472,8 +1472,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if( (pMaster == nullptr) || (pNotesMaster == nullptr) ) if( (pMaster == nullptr) || (pNotesMaster == nullptr) )
{ {
// so take the first MasterPage // so take the first MasterPage
pMaster = pSourceDoc->GetMasterSdPage(0, PK_STANDARD); pMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Standard);
pNotesMaster = pSourceDoc->GetMasterSdPage(0, PK_NOTES); pNotesMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Notes);
} }
} }
@ -1834,7 +1834,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
pMaster->SetAutoLayout(AUTOLAYOUT_NONE, true, true); pMaster->SetAutoLayout(AUTOLAYOUT_NONE, true, true);
pNotesMaster = AllocSdPage(true); pNotesMaster = AllocSdPage(true);
pNotesMaster->SetPageKind(PK_NOTES); pNotesMaster->SetPageKind(PageKind::Notes);
pNotesMaster->SetSize(pNotes->GetSize()); pNotesMaster->SetSize(pNotes->GetSize());
pNotesMaster->SetBorder(pNotes->GetLftBorder(), pNotesMaster->SetBorder(pNotes->GetLftBorder(),
pNotes->GetUppBorder(), pNotes->GetUppBorder(),
@ -1876,7 +1876,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{ {
AutoLayout eOldAutoLayout = (*pIter)->GetAutoLayout(); AutoLayout eOldAutoLayout = (*pIter)->GetAutoLayout();
AutoLayout eNewAutoLayout = AutoLayout eNewAutoLayout =
(*pIter)->GetPageKind() == PK_STANDARD ? AUTOLAYOUT_NONE : AUTOLAYOUT_NOTES; (*pIter)->GetPageKind() == PageKind::Standard ? AUTOLAYOUT_NONE : AUTOLAYOUT_NOTES;
if( bUndo ) if( bUndo )
{ {
@ -1926,7 +1926,7 @@ void SdDrawDocument::Merge(SdrModel& rSourceModel,
for( sal_uInt16 nMaster = nMasterPageCount; nMaster < GetMasterPageCount(); nMaster++ ) for( sal_uInt16 nMaster = nMasterPageCount; nMaster < GetMasterPageCount(); nMaster++ )
{ {
SdPage* pPage = static_cast< SdPage* >( GetMasterPage( nMaster ) ); SdPage* pPage = static_cast< SdPage* >( GetMasterPage( nMaster ) );
if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PageKind::Standard) )
{ {
// new master page created, add its style family // new master page created, add its style family
SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() ); SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );

View File

@ -84,7 +84,7 @@ SdPageLink::~SdPageLink()
if (aBookmarkName.isEmpty()) if (aBookmarkName.isEmpty())
{ {
// no page name specified: we assume it is the first page // no page name specified: we assume it is the first page
aBookmarkName = pBookmarkDoc->GetSdPage(0, PK_STANDARD)->GetName(); aBookmarkName = pBookmarkDoc->GetSdPage(0, PageKind::Standard)->GetName();
pPage->SetBookmarkName(aBookmarkName); pPage->SetBookmarkName(aBookmarkName);
} }

View File

@ -54,6 +54,7 @@
#include <com/sun/star/xml/dom/XNamedNodeMap.hpp> #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <basegfx/tools/tools.hxx> #include <basegfx/tools/tools.hxx>
#include <o3tl/enumarray.hxx>
#include "Outliner.hxx" #include "Outliner.hxx"
#include "app.hrc" #include "app.hrc"
@ -93,7 +94,7 @@ using ::com::sun::star::uno::Reference;
SdPage::SdPage(SdDrawDocument& rNewDoc, bool bMasterPage) SdPage::SdPage(SdDrawDocument& rNewDoc, bool bMasterPage)
: FmFormPage(rNewDoc, bMasterPage) : FmFormPage(rNewDoc, bMasterPage)
, SdrObjUserCall() , SdrObjUserCall()
, mePageKind(PK_STANDARD) , mePageKind(PageKind::Standard)
, meAutoLayout(AUTOLAYOUT_NONE) , meAutoLayout(AUTOLAYOUT_NONE)
, mbSelected(false) , mbSelected(false)
, mePresChange(PRESCHANGE_MANUAL) , mePresChange(PRESCHANGE_MANUAL)
@ -357,7 +358,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
case PRESOBJ_HANDOUT: case PRESOBJ_HANDOUT:
{ {
// Save the first standard page at SdrPageObj // Save the first standard page at SdrPageObj
// #i105146# We want no content to be displayed for PK_HANDOUT, // #i105146# We want no content to be displayed for PageKind::Handout,
// so just never set a page as content // so just never set a page as content
pSdrObj = new SdrPageObj(nullptr); pSdrObj = new SdrPageObj(nullptr);
} }
@ -437,11 +438,11 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
// check if we need another vertical adjustment than the default // check if we need another vertical adjustment than the default
SdrTextVertAdjust eV = SDRTEXTVERTADJUST_TOP; SdrTextVertAdjust eV = SDRTEXTVERTADJUST_TOP;
if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind != PK_STANDARD) ) if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind != PageKind::Standard) )
{ {
eV = SDRTEXTVERTADJUST_BOTTOM; eV = SDRTEXTVERTADJUST_BOTTOM;
} }
else if( (eObjKind == PRESOBJ_SLIDENUMBER) && (mePageKind != PK_STANDARD) ) else if( (eObjKind == PRESOBJ_SLIDENUMBER) && (mePageKind != PageKind::Standard) )
{ {
eV = SDRTEXTVERTADJUST_BOTTOM; eV = SDRTEXTVERTADJUST_BOTTOM;
} }
@ -479,11 +480,11 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
SvxAdjust eH = SVX_ADJUST_LEFT; SvxAdjust eH = SVX_ADJUST_LEFT;
if( (eObjKind == PRESOBJ_DATETIME) && (mePageKind != PK_STANDARD ) ) if( (eObjKind == PRESOBJ_DATETIME) && (mePageKind != PageKind::Standard ) )
{ {
eH = SVX_ADJUST_RIGHT; eH = SVX_ADJUST_RIGHT;
} }
else if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind == PK_STANDARD ) ) else if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind == PageKind::Standard ) )
{ {
eH = SVX_ADJUST_CENTER; eH = SVX_ADJUST_CENTER;
} }
@ -509,7 +510,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
// Subscribe object at the style sheet // Subscribe object at the style sheet
// Set style only when one was found (as in 5.2) // Set style only when one was found (as in 5.2)
if( mePageKind != PK_HANDOUT ) if( mePageKind != PageKind::Handout )
{ {
SfxStyleSheet* pSheetForPresObj = GetStyleSheetForPresObj(eObjKind); SfxStyleSheet* pSheetForPresObj = GetStyleSheetForPresObj(eObjKind);
if(pSheetForPresObj) if(pSheetForPresObj)
@ -772,14 +773,14 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
/************************************************************************** /**************************************************************************
* create background, title- and layout area * create background, title- and layout area
**************************************************************************/ **************************************************************************/
if( mePageKind == PK_STANDARD ) if( mePageKind == PageKind::Standard )
{ {
pMasterPage->EnsureMasterPageDefaultBackground(); pMasterPage->EnsureMasterPageDefaultBackground();
} }
if (GetModel() && static_cast<SdDrawDocument*>(GetModel())->GetDocumentType() == DocumentType::Impress) if (GetModel() && static_cast<SdDrawDocument*>(GetModel())->GetDocumentType() == DocumentType::Impress)
{ {
if( mePageKind == PK_HANDOUT && bInit ) if( mePageKind == PageKind::Handout && bInit )
{ {
// handout template // handout template
@ -808,7 +809,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
while( iter != aAreas.end() ) while( iter != aAreas.end() )
{ {
SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, false, (*iter++), true) ); SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, false, (*iter++), true) );
// #i105146# We want no content to be displayed for PK_HANDOUT, // #i105146# We want no content to be displayed for PageKind::Handout,
// so just never set a page as content // so just never set a page as content
pPageObj->SetReferencedPage(nullptr); pPageObj->SetReferencedPage(nullptr);
@ -817,22 +818,22 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
} }
} }
if( mePageKind != PK_HANDOUT ) if( mePageKind != PageKind::Handout )
{ {
SdrObject* pMasterTitle = pMasterPage->GetPresObj( PRESOBJ_TITLE ); SdrObject* pMasterTitle = pMasterPage->GetPresObj( PRESOBJ_TITLE );
if( pMasterTitle == nullptr ) if( pMasterTitle == nullptr )
pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE); pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE);
SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE ); SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PageKind::Notes ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
if( pMasterOutline == nullptr ) if( pMasterOutline == nullptr )
pMasterPage->CreateDefaultPresObj( mePageKind == PK_STANDARD ? PRESOBJ_OUTLINE : PRESOBJ_NOTES ); pMasterPage->CreateDefaultPresObj( mePageKind == PageKind::Standard ? PRESOBJ_OUTLINE : PRESOBJ_NOTES );
} }
// create header&footer objects // create header&footer objects
if( bCreate ) if( bCreate )
{ {
if( mePageKind != PK_STANDARD ) if( mePageKind != PageKind::Standard )
{ {
SdrObject* pHeader = pMasterPage->GetPresObj( PRESOBJ_HEADER ); SdrObject* pHeader = pMasterPage->GetPresObj( PRESOBJ_HEADER );
if( pHeader == nullptr ) if( pHeader == nullptr )
@ -856,8 +857,8 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
namespace { namespace {
const char* const PageKindVector[] = { static const o3tl::enumarray<PageKind, char const *> PageKindVector = {
"PK_STANDARD", "PK_NOTES", "PK_HANDOUT" "PageKind::Standard", "PageKind::Notes", "PageKind::Handout"
}; };
const char* const PresObjKindVector[] = { const char* const PresObjKindVector[] = {
@ -957,7 +958,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind)
const char* sObjKind = PresObjKindVector[eObjKind]; const char* sObjKind = PresObjKindVector[eObjKind];
const char* sPageKind = PageKindVector[mePageKind]; const char* sPageKind = PageKindVector[mePageKind];
// create footer objects for standard master page // create footer objects for standard master page
if( mePageKind == PK_STANDARD ) if( mePageKind == PageKind::Standard )
{ {
const long nLftBorder = GetLftBorder(); const long nLftBorder = GetLftBorder();
const long nUppBorder = GetUppBorder(); const long nUppBorder = GetUppBorder();
@ -1048,7 +1049,7 @@ Rectangle SdPage::GetTitleRect() const
{ {
Rectangle aTitleRect; Rectangle aTitleRect;
if (mePageKind != PK_HANDOUT) if (mePageKind != PageKind::Handout)
{ {
double propvalue[] = {0,0,0,0}; double propvalue[] = {0,0,0,0};
@ -1061,7 +1062,7 @@ Rectangle SdPage::GetTitleRect() const
aTitleSize.Height() -= GetUppBorder() + GetLwrBorder(); aTitleSize.Height() -= GetUppBorder() + GetLwrBorder();
const char* sPageKind = PageKindVector[mePageKind]; const char* sPageKind = PageKindVector[mePageKind];
if (mePageKind == PK_STANDARD) if (mePageKind == PageKind::Standard)
{ {
getPresObjProp( *this , "PRESOBJ_TITLE" ,sPageKind, propvalue); getPresObjProp( *this , "PRESOBJ_TITLE" ,sPageKind, propvalue);
aTitlePos.X() += long( aTitleSize.Width() * propvalue[2] ); aTitlePos.X() += long( aTitleSize.Width() * propvalue[2] );
@ -1069,7 +1070,7 @@ Rectangle SdPage::GetTitleRect() const
aTitleSize.Width() = long( aTitleSize.Width() * propvalue[1] ); aTitleSize.Width() = long( aTitleSize.Width() * propvalue[1] );
aTitleSize.Height() = long( aTitleSize.Height() * propvalue[0] ); aTitleSize.Height() = long( aTitleSize.Height() * propvalue[0] );
} }
else if (mePageKind == PK_NOTES) else if (mePageKind == PageKind::Notes)
{ {
Point aPos = aTitlePos; Point aPos = aTitlePos;
getPresObjProp( *this, "PRESOBJ_TITLE" ,sPageKind, propvalue); getPresObjProp( *this, "PRESOBJ_TITLE" ,sPageKind, propvalue);
@ -1134,7 +1135,7 @@ Rectangle SdPage::GetLayoutRect() const
{ {
Rectangle aLayoutRect; Rectangle aLayoutRect;
if (mePageKind != PK_HANDOUT) if (mePageKind != PageKind::Handout)
{ {
double propvalue[] = {0,0,0,0}; double propvalue[] = {0,0,0,0};
@ -1144,7 +1145,7 @@ Rectangle SdPage::GetLayoutRect() const
aLayoutSize.Height() -= GetUppBorder() + GetLwrBorder(); aLayoutSize.Height() -= GetUppBorder() + GetLwrBorder();
const char* sPageKind = PageKindVector[mePageKind]; const char* sPageKind = PageKindVector[mePageKind];
if (mePageKind == PK_STANDARD) if (mePageKind == PageKind::Standard)
{ {
getPresObjProp( *this ,"PRESOBJ_OUTLINE", sPageKind, propvalue); getPresObjProp( *this ,"PRESOBJ_OUTLINE", sPageKind, propvalue);
aLayoutPos.X() += long( aLayoutSize.Width() * propvalue[2] ); aLayoutPos.X() += long( aLayoutSize.Width() * propvalue[2] );
@ -1154,7 +1155,7 @@ Rectangle SdPage::GetLayoutRect() const
aLayoutRect.SetPos(aLayoutPos); aLayoutRect.SetPos(aLayoutPos);
aLayoutRect.SetSize(aLayoutSize); aLayoutRect.SetSize(aLayoutSize);
} }
else if (mePageKind == PK_NOTES) else if (mePageKind == PageKind::Notes)
{ {
getPresObjProp( *this, "PRESOBJ_NOTES", sPageKind, propvalue); getPresObjProp( *this, "PRESOBJ_NOTES", sPageKind, propvalue);
aLayoutPos.X() += long( aLayoutSize.Width() * propvalue[2] ); aLayoutPos.X() += long( aLayoutSize.Width() * propvalue[2] );
@ -1310,12 +1311,12 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const
Rectangle aTitleRect; Rectangle aTitleRect;
Rectangle aLayoutRect; Rectangle aLayoutRect;
if( rPage.GetPageKind() != PK_HANDOUT ) if( rPage.GetPageKind() != PageKind::Handout )
{ {
SdPage& rMasterPage = static_cast<SdPage&>(rPage.TRG_GetMasterPage()); SdPage& rMasterPage = static_cast<SdPage&>(rPage.TRG_GetMasterPage());
SdrObject* pMasterTitle = rMasterPage.GetPresObj( PRESOBJ_TITLE ); SdrObject* pMasterTitle = rMasterPage.GetPresObj( PRESOBJ_TITLE );
SdrObject* pMasterSubTitle = rMasterPage.GetPresObj( PRESOBJ_TEXT ); SdrObject* pMasterSubTitle = rMasterPage.GetPresObj( PRESOBJ_TEXT );
SdrObject* pMasterOutline = rMasterPage.GetPresObj( rPage.GetPageKind()==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE ); SdrObject* pMasterOutline = rMasterPage.GetPresObj( rPage.GetPageKind()==PageKind::Notes ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
if( pMasterTitle ) if( pMasterTitle )
aTitleRect = pMasterTitle->GetLogicRect(); aTitleRect = pMasterTitle->GetLogicRect();
@ -2538,7 +2539,7 @@ const OUString& SdPage::GetName() const
OUString aCreatedPageName( maCreatedPageName ); OUString aCreatedPageName( maCreatedPageName );
if (GetRealName().isEmpty()) if (GetRealName().isEmpty())
{ {
if ((mePageKind == PK_STANDARD || mePageKind == PK_NOTES) && !mbMaster) if ((mePageKind == PageKind::Standard || mePageKind == PageKind::Notes) && !mbMaster)
{ {
// default name for handout pages // default name for handout pages
sal_uInt16 nNum = (GetPageNum() + 1) / 2; sal_uInt16 nNum = (GetPageNum() + 1) / 2;
@ -2570,12 +2571,12 @@ const OUString& SdPage::GetName() const
aCreatedPageName = GetRealName(); aCreatedPageName = GetRealName();
} }
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
aCreatedPageName += " "; aCreatedPageName += " ";
aCreatedPageName += SD_RESSTR(STR_NOTES); aCreatedPageName += SD_RESSTR(STR_NOTES);
} }
else if (mePageKind == PK_HANDOUT && mbMaster) else if (mePageKind == PageKind::Handout && mbMaster)
{ {
aCreatedPageName += " ("; aCreatedPageName += " (";
aCreatedPageName += SD_RESSTR(STR_HANDOUT); aCreatedPageName += SD_RESSTR(STR_HANDOUT);
@ -2610,7 +2611,7 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
{ {
if (mbMaster) if (mbMaster)
{ {
if (mePageKind != PK_NOTES) if (mePageKind != PageKind::Notes)
{ {
aString = SD_RESSTR( STR_PRESOBJ_MPTITLE ); aString = SD_RESSTR( STR_PRESOBJ_MPTITLE );
} }
@ -2715,7 +2716,7 @@ void SdPage::SetName (const OUString& rName)
const HeaderFooterSettings& SdPage::getHeaderFooterSettings() const const HeaderFooterSettings& SdPage::getHeaderFooterSettings() const
{ {
if( mePageKind == PK_HANDOUT && !mbMaster ) if( mePageKind == PageKind::Handout && !mbMaster )
{ {
return static_cast<SdPage&>(TRG_GetMasterPage()).maHeaderFooterSettings; return static_cast<SdPage&>(TRG_GetMasterPage()).maHeaderFooterSettings;
} }
@ -2727,7 +2728,7 @@ const HeaderFooterSettings& SdPage::getHeaderFooterSettings() const
void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings ) void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings )
{ {
if( mePageKind == PK_HANDOUT && !mbMaster ) if( mePageKind == PageKind::Handout && !mbMaster )
{ {
static_cast<SdPage&>(TRG_GetMasterPage()).maHeaderFooterSettings = rNewSettings; static_cast<SdPage&>(TRG_GetMasterPage()).maHeaderFooterSettings = rNewSettings;
} }
@ -2826,7 +2827,7 @@ bool SdPage::checkVisibility(
{ {
const bool bSubContentProcessing(rDisplayInfo.GetSubContentActive()); const bool bSubContentProcessing(rDisplayInfo.GetSubContentActive());
if( bSubContentProcessing || ( pCheckPage->GetPageKind() == PK_HANDOUT && bIsPrinting ) ) if( bSubContentProcessing || ( pCheckPage->GetPageKind() == PageKind::Handout && bIsPrinting ) )
{ {
// use the page that is currently processed // use the page that is currently processed
const SdPage* pVisualizedSdPage = dynamic_cast< const SdPage* >(pVisualizedPage); const SdPage* pVisualizedSdPage = dynamic_cast< const SdPage* >(pVisualizedPage);
@ -2924,7 +2925,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas ) void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas )
{ {
SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PK_HANDOUT ); SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PageKind::Handout );
if( eLayout == AUTOLAYOUT_NONE ) if( eLayout == AUTOLAYOUT_NONE )
{ {
@ -3035,7 +3036,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt); aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt); aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD); SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PageKind::Standard);
if ( pFirstPage ) if ( pFirstPage )
{ {
// scale actual size into handout rect // scale actual size into handout rect

View File

@ -318,7 +318,7 @@ void SdPage::ConnectLink()
sfx2::LinkManager* pLinkManager = pModel!=nullptr ? pModel->GetLinkManager() : nullptr; sfx2::LinkManager* pLinkManager = pModel!=nullptr ? pModel->GetLinkManager() : nullptr;
if (pLinkManager && !mpPageLink && !maFileName.isEmpty() && !maBookmarkName.isEmpty() && if (pLinkManager && !mpPageLink && !maFileName.isEmpty() && !maBookmarkName.isEmpty() &&
mePageKind==PK_STANDARD && !IsMasterPage() && mePageKind==PageKind::Standard && !IsMasterPage() &&
static_cast<SdDrawDocument*>(pModel)->IsNewOrLoadCompleted()) static_cast<SdDrawDocument*>(pModel)->IsNewOrLoadCompleted())
{ {
/********************************************************************** /**********************************************************************
@ -636,14 +636,14 @@ void SdPage::dumpAsXml(xmlTextWriterPtr pWriter) const
const char* pPageKind = nullptr; const char* pPageKind = nullptr;
switch (mePageKind) switch (mePageKind)
{ {
case PK_STANDARD: case PageKind::Standard:
pPageKind = "PK_STANDARD"; pPageKind = "PageKind::Standard";
break; break;
case PK_NOTES: case PageKind::Notes:
pPageKind = "PK_NOTES"; pPageKind = "PageKind::Notes";
break; break;
case PK_HANDOUT: case PageKind::Handout:
pPageKind = "PK_HANDOUT"; pPageKind = "PageKind::Handout";
break; break;
} }
if (pPageKind) if (pPageKind)

View File

@ -121,9 +121,9 @@ SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pD
msTableFamilyName = xNamed->getName(); msTableFamilyName = xNamed->getName();
// create presentation families, one for each master page // create presentation families, one for each master page
const sal_uInt16 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD); const sal_uInt16 nCount = mpDoc->GetMasterSdPageCount(PageKind::Standard);
for( sal_uInt16 nPage = 0; nPage < nCount; ++nPage ) for( sal_uInt16 nPage = 0; nPage < nCount; ++nPage )
AddStyleFamily( mpDoc->GetMasterSdPage(nPage,PK_STANDARD) ); AddStyleFamily( mpDoc->GetMasterSdPage(nPage,PageKind::Standard) );
} }
} }

View File

@ -388,11 +388,11 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
} }
if (aRealStyle.isEmpty()) if (aRealStyle.isEmpty())
{ {
SdPage* pPage = pDoc->GetSdPage(0, PK_STANDARD); SdPage* pPage = pDoc->GetSdPage(0, PageKind::Standard);
if (pPage) if (pPage)
{ {
aRealStyle = pDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName(); aRealStyle = pDoc->GetSdPage(0, PageKind::Standard)->GetLayoutName();
} }
else else
{ {

View File

@ -91,7 +91,7 @@ bool SdCGMFilter::Import()
if( ( nRetValue &~0xff000000 ) != 0xffffff ) // maybe the backgroundcolor is already white if( ( nRetValue &~0xff000000 ) != 0xffffff ) // maybe the backgroundcolor is already white
{ // so we must not set a master page { // so we must not set a master page
mrDocument.StopWorkStartupDelay(); mrDocument.StopWorkStartupDelay();
SdPage* pSdPage = mrDocument.GetMasterSdPage(0, PK_STANDARD); SdPage* pSdPage = mrDocument.GetMasterSdPage(0, PageKind::Standard);
if(pSdPage) if(pSdPage)
{ {

View File

@ -190,7 +190,7 @@ bool SdGRFFilter::Import()
if( mrDocument.GetPageCount() == 0 ) if( mrDocument.GetPageCount() == 0 )
mrDocument.CreateFirstPages(); mrDocument.CreateFirstPages();
SdPage* pPage = mrDocument.GetSdPage( 0, PK_STANDARD ); SdPage* pPage = mrDocument.GetSdPage( 0, PageKind::Standard );
Point aPos; Point aPos;
Size aPagSize( pPage->GetSize() ); Size aPagSize( pPage->GetSize() );
Size aGrfSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(), Size aGrfSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(),
@ -241,17 +241,17 @@ bool SdGRFFilter::Export()
SdPage* pPage = nullptr; SdPage* pPage = nullptr;
sd::DrawViewShell* pDrawViewShell = dynamic_cast<::sd::DrawViewShell* >(mrDocShell.GetViewShell() ); sd::DrawViewShell* pDrawViewShell = dynamic_cast<::sd::DrawViewShell* >(mrDocShell.GetViewShell() );
PageKind ePageKind = PK_STANDARD; PageKind ePageKind = PageKind::Standard;
if( pDrawViewShell ) if( pDrawViewShell )
{ {
ePageKind = pDrawViewShell->GetPageKind(); ePageKind = pDrawViewShell->GetPageKind();
if( PK_HANDOUT == ePageKind ) if( PageKind::Handout == ePageKind )
pPage = mrDocument.GetSdPage( 0, PK_HANDOUT ); pPage = mrDocument.GetSdPage( 0, PageKind::Handout );
else else
pPage = pDrawViewShell->GetActualPage(); pPage = pDrawViewShell->GetActualPage();
} }
else else
pPage = mrDocument.GetSdPage( 0, PK_STANDARD ); pPage = mrDocument.GetSdPage( 0, PageKind::Standard );
if ( pPage ) if ( pPage )
{ {

View File

@ -596,7 +596,7 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
} }
// calculate image sizes // calculate image sizes
SdPage* pPage = mpDoc->GetSdPage(0, PK_STANDARD); SdPage* pPage = mpDoc->GetSdPage(0, PageKind::Standard);
Size aTmpSize( pPage->GetSize() ); Size aTmpSize( pPage->GetSize() );
double dRatio=((double)aTmpSize.Width())/aTmpSize.Height(); double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
@ -610,15 +610,15 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
maExportPath = aINetURLObj.GetPartBeforeLastName(); // with trailing '/' maExportPath = aINetURLObj.GetPartBeforeLastName(); // with trailing '/'
maIndex = aINetURLObj.GetLastName(); maIndex = aINetURLObj.GetLastName();
mnSdPageCount = mpDoc->GetSdPageCount( PK_STANDARD ); mnSdPageCount = mpDoc->GetSdPageCount( PageKind::Standard );
for( sal_uInt16 nPage = 0; nPage < mnSdPageCount; nPage++ ) for( sal_uInt16 nPage = 0; nPage < mnSdPageCount; nPage++ )
{ {
pPage = mpDoc->GetSdPage( nPage, PK_STANDARD ); pPage = mpDoc->GetSdPage( nPage, PageKind::Standard );
if( mbHiddenSlides || !pPage->IsExcluded() ) if( mbHiddenSlides || !pPage->IsExcluded() )
{ {
maPages.push_back( pPage ); maPages.push_back( pPage );
maNotesPages.push_back( mpDoc->GetSdPage( nPage, PK_NOTES ) ); maNotesPages.push_back( mpDoc->GetSdPage( nPage, PageKind::Notes ) );
} }
} }
mnSdPageCount = maPages.size(); mnSdPageCount = maPages.size();
@ -803,7 +803,7 @@ void HtmlExport::ExportHtml()
void HtmlExport::SetDocColors( SdPage* pPage ) void HtmlExport::SetDocColors( SdPage* pPage )
{ {
if( pPage == nullptr ) if( pPage == nullptr )
pPage = mpDoc->GetSdPage(0, PK_STANDARD); pPage = mpDoc->GetSdPage(0, PageKind::Standard);
svtools::ColorConfig aConfig; svtools::ColorConfig aConfig;
maVLinkColor = Color(aConfig.GetColorValue(svtools::LINKSVISITED).nColor); maVLinkColor = Color(aConfig.GetColorValue(svtools::LINKSVISITED).nColor);
@ -2208,7 +2208,7 @@ OUString const & HtmlExport::getDocumentTitle()
{ {
// if there is a non-empty title object, use their first passage // if there is a non-empty title object, use their first passage
// as page title // as page title
SdPage* pSdPage = mpDoc->GetSdPage(0, PK_STANDARD); SdPage* pSdPage = mpDoc->GetSdPage(0, PageKind::Standard);
SdrObject* pTitleObj = pSdPage->GetPresObj(PRESOBJ_TITLE); SdrObject* pTitleObj = pSdPage->GetPresObj(PRESOBJ_TITLE);
if (pTitleObj && !pTitleObj->IsEmptyPresObj()) if (pTitleObj && !pTitleObj->IsEmptyPresObj())
{ {

View File

@ -584,10 +584,10 @@ bool ImplSdPPTImport::Import()
bool bNotesMaster = (*GetPageList( eAktPageKind ) )[ nAktPageNum ].bNotesMaster; bool bNotesMaster = (*GetPageList( eAktPageKind ) )[ nAktPageNum ].bNotesMaster;
bool bStarDrawFiller = (*GetPageList( eAktPageKind ) )[ nAktPageNum ].bStarDrawFiller; bool bStarDrawFiller = (*GetPageList( eAktPageKind ) )[ nAktPageNum ].bStarDrawFiller;
PageKind ePgKind = ( bNotesMaster ) ? PK_NOTES : PK_STANDARD; PageKind ePgKind = ( bNotesMaster ) ? PageKind::Notes : PageKind::Standard;
bool bHandout = (*GetPageList( eAktPageKind ) )[ nAktPageNum ].bHandoutMaster; bool bHandout = (*GetPageList( eAktPageKind ) )[ nAktPageNum ].bHandoutMaster;
if ( bHandout ) if ( bHandout )
ePgKind = PK_HANDOUT; ePgKind = PageKind::Handout;
pPage->SetPageKind( ePgKind ); pPage->SetPageKind( ePgKind );
pSdrModel->InsertMasterPage( static_cast<SdrPage*>(pPage) ); pSdrModel->InsertMasterPage( static_cast<SdrPage*>(pPage) );
@ -630,7 +630,7 @@ bool ImplSdPPTImport::Import()
OUString aLayoutName( SD_RESSTR( STR_LAYOUT_DEFAULT_NAME ) ); OUString aLayoutName( SD_RESSTR( STR_LAYOUT_DEFAULT_NAME ) );
if ( nMasterNum > 2 ) if ( nMasterNum > 2 )
{ {
if ( ePgKind == PK_STANDARD ) if ( ePgKind == PageKind::Standard )
{ // standard page: create new presentation layout { // standard page: create new presentation layout
aLayoutName = SD_RESSTR( STR_LAYOUT_DEFAULT_TITLE_NAME ); aLayoutName = SD_RESSTR( STR_LAYOUT_DEFAULT_TITLE_NAME );
aLayoutName += OUString::number( (sal_Int32)( ( nMasterNum + 1 ) / 2 - 1 ) ); aLayoutName += OUString::number( (sal_Int32)( ( nMasterNum + 1 ) / 2 - 1 ) );
@ -645,7 +645,7 @@ bool ImplSdPPTImport::Import()
pPage->SetLayoutName( aLayoutName ); pPage->SetLayoutName( aLayoutName );
// set stylesheets // set stylesheets
if ( pPage->GetPageKind() == PK_STANDARD ) if ( pPage->GetPageKind() == PageKind::Standard )
{ {
TSS_Type nTitleInstance = TSS_Type::PageTitle; TSS_Type nTitleInstance = TSS_Type::PageTitle;
TSS_Type nOutlinerInstance = TSS_Type::Body; TSS_Type nOutlinerInstance = TSS_Type::Body;
@ -708,7 +708,7 @@ bool ImplSdPPTImport::Import()
aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown ); aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, TSS_Type::Unknown );
} }
} }
else if ( ePgKind == PK_NOTES ) else if ( ePgKind == PageKind::Notes )
{ {
pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES ); pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES );
if ( pSheet ) if ( pSheet )
@ -869,7 +869,7 @@ bool ImplSdPPTImport::Import()
pObj = pMPage->GetObj( 0 ); pObj = pMPage->GetObj( 0 );
if ( pObj && pObj->GetObjIdentifier() == OBJ_RECT ) if ( pObj && pObj->GetObjIdentifier() == OBJ_RECT )
{ {
if ( pMPage->GetPageKind() == PK_STANDARD ) if ( pMPage->GetPageKind() == PageKind::Standard )
{ {
// transform data from imported background object to new form // transform data from imported background object to new form
// and delete the object. It was used as container to transport // and delete the object. It was used as container to transport
@ -909,7 +909,7 @@ bool ImplSdPPTImport::Import()
sal_uInt16 nPageNum = nAktPageNum; sal_uInt16 nPageNum = nAktPageNum;
SdPage* pHandoutPage = static_cast<SdPage*>(MakeBlancPage( false )); SdPage* pHandoutPage = static_cast<SdPage*>(MakeBlancPage( false ));
pHandoutPage->SetPageKind( PK_HANDOUT ); pHandoutPage->SetPageKind( PageKind::Handout );
pSdrModel->InsertPage( pHandoutPage ); pSdrModel->InsertPage( pHandoutPage );
sal_uInt16 nPageAnz = GetPageCount(); sal_uInt16 nPageAnz = GetPageCount();
@ -930,11 +930,11 @@ bool ImplSdPPTImport::Import()
pMasterPersist = &(*pPageList)[ nMasterNum ]; pMasterPersist = &(*pPageList)[ nMasterNum ];
pPage->SetLayoutName(static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetLayoutName()); pPage->SetLayoutName(static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetLayoutName());
} }
pPage->SetPageKind( PK_STANDARD ); pPage->SetPageKind( PageKind::Standard );
pSdrModel->InsertPage( pPage ); // SJ: #i29625# because of form controls, the pSdrModel->InsertPage( pPage ); // SJ: #i29625# because of form controls, the
ImportPage( pPage, pMasterPersist ); // page must be inserted before importing ImportPage( pPage, pMasterPersist ); // page must be inserted before importing
SetHeaderFooterPageSettings( pPage, pMasterPersist ); SetHeaderFooterPageSettings( pPage, pMasterPersist );
// CWS preseng01: pPage->SetPageKind( PK_STANDARD ); // CWS preseng01: pPage->SetPageKind( PageKind::Standard );
DffRecordHeader aPageHd; DffRecordHeader aPageHd;
if ( SeekToAktPage( &aPageHd ) ) if ( SeekToAktPage( &aPageHd ) )
@ -1015,7 +1015,7 @@ bool ImplSdPPTImport::Import()
pMasterPersist2 = &(*pPageList)[ nNotesMasterNum ]; pMasterPersist2 = &(*pPageList)[ nNotesMasterNum ];
pNotesPage->SetLayoutName( static_cast<SdPage&>(pNotesPage->TRG_GetMasterPage()).GetLayoutName() ); pNotesPage->SetLayoutName( static_cast<SdPage&>(pNotesPage->TRG_GetMasterPage()).GetLayoutName() );
} }
pNotesPage->SetPageKind( PK_NOTES ); pNotesPage->SetPageKind( PageKind::Notes );
pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum)); pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
pSdrModel->InsertPage( pNotesPage ); // SJ: #i29625# because of form controls, the pSdrModel->InsertPage( pNotesPage ); // SJ: #i29625# because of form controls, the
ImportPage( pNotesPage, pMasterPersist2 ); // page must be inserted before importing ImportPage( pNotesPage, pMasterPersist2 ); // page must be inserted before importing
@ -1024,7 +1024,7 @@ bool ImplSdPPTImport::Import()
} }
else else
{ {
pNotesPage->SetPageKind( PK_NOTES ); pNotesPage->SetPageKind( PageKind::Notes );
pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum)); pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, true ); pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, true );
pSdrModel->InsertPage( pNotesPage ); pSdrModel->InsertPage( pNotesPage );
@ -1050,7 +1050,7 @@ bool ImplSdPPTImport::Import()
for ( nMaster = 1; nMaster < nMasterCount; nMaster++ ) for ( nMaster = 1; nMaster < nMasterCount; nMaster++ )
{ {
SdPage* pMaster = static_cast<SdPage*>( pSdrModel->GetMasterPage( nMaster ) ); SdPage* pMaster = static_cast<SdPage*>( pSdrModel->GetMasterPage( nMaster ) );
if ( pMaster->GetPageKind() == PK_STANDARD ) if ( pMaster->GetPageKind() == PageKind::Standard )
{ {
SetPageNum( nMaster, PPT_MASTERPAGE ); SetPageNum( nMaster, PPT_MASTERPAGE );
if ( !pFoundMaster ) if ( !pFoundMaster )
@ -1080,12 +1080,12 @@ bool ImplSdPPTImport::Import()
bOk = mpDoc->CreateMissingNotesAndHandoutPages(); bOk = mpDoc->CreateMissingNotesAndHandoutPages();
if ( bOk ) if ( bOk )
{ {
for ( i = 0; i < mpDoc->GetSdPageCount( PK_STANDARD ); i++ ) for ( i = 0; i < mpDoc->GetSdPageCount( PageKind::Standard ); i++ )
{ {
// set AutoLayout // set AutoLayout
SetPageNum( i ); SetPageNum( i );
SdPage* pPage = mpDoc->GetSdPage( i, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( i, PageKind::Standard );
AutoLayout eAutoLayout = AUTOLAYOUT_NONE; AutoLayout eAutoLayout = AUTOLAYOUT_NONE;
const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom(); const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
if ( pSlideLayout ) if ( pSlideLayout )
@ -1203,14 +1203,14 @@ bool ImplSdPPTImport::Import()
} }
// handout master page: auto layout // handout master page: auto layout
SdPage* pHandoutMPage = mpDoc->GetMasterSdPage( 0, PK_HANDOUT ); SdPage* pHandoutMPage = mpDoc->GetMasterSdPage( 0, PageKind::Handout );
pHandoutMPage->SetAutoLayout( AUTOLAYOUT_HANDOUT6, true, true ); pHandoutMPage->SetAutoLayout( AUTOLAYOUT_HANDOUT6, true, true );
} }
sal_uInt32 nSlideCount = GetPageCount(); sal_uInt32 nSlideCount = GetPageCount();
for ( i = 0; ( i < nSlideCount) && ( i < maSlideNameList.size() ); i++ ) for ( i = 0; ( i < nSlideCount) && ( i < maSlideNameList.size() ); i++ )
{ {
SdPage* pPage = mpDoc->GetSdPage( i, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( i, PageKind::Standard );
OUString &aName = maSlideNameList[ i ]; OUString &aName = maSlideNameList[ i ];
if ( pPage ) if ( pPage )
{ {
@ -1235,7 +1235,7 @@ bool ImplSdPPTImport::Import()
if ( pFrameView ) if ( pFrameView )
{ {
sal_uInt16 nSelectedPage = 0; sal_uInt16 nSelectedPage = 0;
PageKind ePageKind = PK_STANDARD; PageKind ePageKind = PageKind::Standard;
EditMode eEditMode = EditMode::Page; EditMode eEditMode = EditMode::Page;
switch ( aUserEditAtom.eLastViewType ) switch ( aUserEditAtom.eLastViewType )
@ -1259,7 +1259,7 @@ bool ImplSdPPTImport::Import()
SAL_FALLTHROUGH; SAL_FALLTHROUGH;
case 2 : // master case 2 : // master
{ {
ePageKind = PK_STANDARD; ePageKind = PageKind::Standard;
eEditMode = EditMode::MasterPage; eEditMode = EditMode::MasterPage;
} }
break; break;
@ -1267,10 +1267,10 @@ bool ImplSdPPTImport::Import()
eEditMode = EditMode::MasterPage; eEditMode = EditMode::MasterPage;
SAL_FALLTHROUGH; SAL_FALLTHROUGH;
case 3 : // notes case 3 : // notes
ePageKind = PK_NOTES; ePageKind = PageKind::Notes;
break; break;
case 4 : // handout case 4 : // handout
ePageKind = PK_HANDOUT; ePageKind = PageKind::Handout;
break; break;
default : default :
case 1 : // normal case 1 : // normal
@ -1315,7 +1315,7 @@ bool ImplSdPPTImport::Import()
sal_uInt16 nPage = pPageList->FindPage( nPageNumber ); sal_uInt16 nPage = pPageList->FindPage( nPageNumber );
if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND ) if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
{ {
SdPage* pPage = mpDoc->GetSdPage( nPage, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( nPage, PageKind::Standard );
if ( pPage ) if ( pPage )
{ {
pSdCustomShow->PagesVector().push_back( pPage ); pSdCustomShow->PagesVector().push_back( pPage );
@ -1393,7 +1393,7 @@ bool ImplSdPPTImport::Import()
if ( nStartSlide && ( nStartSlide <= GetPageCount() ) ) if ( nStartSlide && ( nStartSlide <= GetPageCount() ) )
{ {
SdPage* pPage = mpDoc->GetSdPage( nStartSlide - 1, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( nStartSlide - 1, PageKind::Standard );
if ( pPage ) if ( pPage )
rPresSettings.maPresPage = pPage->GetName(); rPresSettings.maPresPage = pPage->GetName();
} }
@ -1509,8 +1509,8 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations
{ {
sal_uLong nFilePosMerk = rStCtrl.Tell(); sal_uLong nFilePosMerk = rStCtrl.Tell();
// set PageKind at page (up to now only PK_STANDARD or PK_NOTES) // set PageKind at page (up to now only PageKind::Standard or PageKind::Notes)
if ( pPage->GetPageKind() == PK_STANDARD ) if ( pPage->GetPageKind() == PageKind::Standard )
{ {
PptSlidePersistList* pPersistList = GetPageList( eAktPageKind ); PptSlidePersistList* pPersistList = GetPageList( eAktPageKind );
PptSlidePersistEntry* pActualSlidePersist = ( pPersistList && ( nAktPageNum < pPersistList->size() ) ) PptSlidePersistEntry* pActualSlidePersist = ( pPersistList && ( nAktPageNum < pPersistList->size() ) )
@ -2316,7 +2316,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if ( !aPresentationText.isEmpty() ) if ( !aPresentationText.isEmpty() )
pPage->SetObjText( pText, pOutl, ePresKind, aPresentationText ); pPage->SetObjText( pText, pOutl, ePresKind, aPresentationText );
if ( pPage->GetPageKind() != PK_NOTES && pPage->GetPageKind() != PK_HANDOUT) if ( pPage->GetPageKind() != PageKind::Notes && pPage->GetPageKind() != PageKind::Handout)
{ {
SfxStyleSheet* pSheet2( pPage->GetStyleSheetForPresObj( ePresKind ) ); SfxStyleSheet* pSheet2( pPage->GetStyleSheetForPresObj( ePresKind ) );
if ( pSheet2 ) if ( pSheet2 )

View File

@ -402,9 +402,9 @@ sal_Int32 ReadThroughComponent(
//numbering level matches that of the outline level it previews //numbering level matches that of the outline level it previews
void fixupOutlinePlaceholderNumberingDepths(SdDrawDocument* pDoc) void fixupOutlinePlaceholderNumberingDepths(SdDrawDocument* pDoc)
{ {
for (sal_uInt16 i = 0; i < pDoc->GetMasterSdPageCount(PK_STANDARD); ++i) for (sal_uInt16 i = 0; i < pDoc->GetMasterSdPageCount(PageKind::Standard); ++i)
{ {
SdPage *pMasterPage = pDoc->GetMasterSdPage(i, PK_STANDARD); SdPage *pMasterPage = pDoc->GetMasterSdPage(i, PageKind::Standard);
SdrObject* pMasterOutline = pMasterPage->GetPresObj(PRESOBJ_OUTLINE); SdrObject* pMasterOutline = pMasterPage->GetPresObj(PRESOBJ_OUTLINE);
if (!pMasterOutline) if (!pMasterOutline)
continue; continue;

View File

@ -791,7 +791,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
::sd::PresentationViewShell* pPresViewSh = static_cast< ::sd::PresentationViewShell*>(mpViewShell); ::sd::PresentationViewShell* pPresViewSh = static_cast< ::sd::PresentationViewShell*>(mpViewShell);
SdPage* pCurrPge = pPresViewSh->getCurrentPage(); SdPage* pCurrPge = pPresViewSh->getCurrentPage();
SdDrawDocument* pDoc = pPresViewSh->GetDoc(); SdDrawDocument* pDoc = pPresViewSh->GetDoc();
SdPage* pNotesPge = pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PK_NOTES); SdPage* pNotesPge = pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PageKind::Notes);
if (pNotesPge) if (pNotesPge)
{ {
SdrObject* pNotesObj = pNotesPge->GetPresObj(PRESOBJ_NOTES); SdrObject* pNotesObj = pNotesPge->GetPresObj(PRESOBJ_NOTES);
@ -837,7 +837,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
sValue += OUString::number((sal_Int16)((sal_uInt16)((pCurrPge->GetPageNum()-1)>>1) + 1)) ; sValue += OUString::number((sal_Int16)((sal_uInt16)((pCurrPge->GetPageNum()-1)>>1) + 1)) ;
sName = ";total-pages:"; sName = ";total-pages:";
sValue += sName; sValue += sName;
sValue += OUString::number(pDoc->GetSdPageCount(PK_STANDARD)) ; sValue += OUString::number(pDoc->GetSdPageCount(PageKind::Standard)) ;
sValue += ";"; sValue += ";";
} }
} }

View File

@ -1031,11 +1031,11 @@ IMPL_LINK_NOARG(SlideTransitionPane, ApplyToAllButtonClicked, Button*, void)
::sd::slidesorter::SharedPageSelection pPages ( ::sd::slidesorter::SharedPageSelection pPages (
new ::sd::slidesorter::SlideSorterViewShell::PageSelection()); new ::sd::slidesorter::SlideSorterViewShell::PageSelection());
sal_uInt16 nPageCount = mpDrawDoc->GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = mpDrawDoc->GetSdPageCount( PageKind::Standard );
pPages->reserve( nPageCount ); pPages->reserve( nPageCount );
for( sal_uInt16 i=0; i<nPageCount; ++i ) for( sal_uInt16 i=0; i<nPageCount; ++i )
{ {
SdPage * pPage = mpDrawDoc->GetSdPage( i, PK_STANDARD ); SdPage * pPage = mpDrawDoc->GetSdPage( i, PageKind::Standard );
if( pPage ) if( pPage )
pPages->push_back( pPage ); pPages->push_back( pPage );
} }

View File

@ -560,7 +560,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
SdPage* pCurrentPage = GetCurrentPage(); SdPage* pCurrentPage = GetCurrentPage();
const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly(); const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly();
const bool bWrongPageKind = (pCurrentPage == nullptr) || (pCurrentPage->GetPageKind() != PK_STANDARD); const bool bWrongPageKind = (pCurrentPage == nullptr) || (pCurrentPage->GetPageKind() != PageKind::Standard);
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
@ -1102,10 +1102,10 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
{ {
if( bForeward ) if( bForeward )
{ {
if( nPageNum >= mpDoc->GetSdPageCount(PK_STANDARD)-1 ) if( nPageNum >= mpDoc->GetSdPageCount(PageKind::Standard)-1 )
{ {
// we reached end of draw pages, start with master pages (skip handout master for draw) // we reached end of draw pages, start with master pages (skip handout master for draw)
return mpDoc->GetMasterSdPage( (mpDoc->GetDocumentType() == DocumentType::Impress) ? 0 : 1, PK_STANDARD ); return mpDoc->GetMasterSdPage( (mpDoc->GetDocumentType() == DocumentType::Impress) ? 0 : 1, PageKind::Standard );
} }
nPageNum++; nPageNum++;
} }
@ -1116,13 +1116,13 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
nPageNum--; nPageNum--;
} }
return mpDoc->GetSdPage(nPageNum, PK_STANDARD); return mpDoc->GetSdPage(nPageNum, PageKind::Standard);
} }
else else
{ {
if( bForeward ) if( bForeward )
{ {
if( nPageNum >= mpDoc->GetMasterSdPageCount(PK_STANDARD)-1 ) if( nPageNum >= mpDoc->GetMasterSdPageCount(PageKind::Standard)-1 )
{ {
return nullptr; // we reached the end, there is nothing more to see here return nullptr; // we reached the end, there is nothing more to see here
} }
@ -1133,24 +1133,24 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
if( nPageNum == (mpDoc->GetDocumentType() == DocumentType::Impress ? 0 : 1) ) if( nPageNum == (mpDoc->GetDocumentType() == DocumentType::Impress ? 0 : 1) )
{ {
// we reached beginning of master pages, start with end if pages // we reached beginning of master pages, start with end if pages
return mpDoc->GetSdPage( mpDoc->GetSdPageCount(PK_STANDARD)-1, PK_STANDARD ); return mpDoc->GetSdPage( mpDoc->GetSdPageCount(PageKind::Standard)-1, PageKind::Standard );
} }
nPageNum--; nPageNum--;
} }
return mpDoc->GetMasterSdPage(nPageNum,PK_STANDARD); return mpDoc->GetMasterSdPage(nPageNum,PageKind::Standard);
} }
} }
SdPage* AnnotationManagerImpl::GetFirstPage() SdPage* AnnotationManagerImpl::GetFirstPage()
{ {
// return first drawing page // return first drawing page
return mpDoc->GetSdPage(0, PK_STANDARD ); return mpDoc->GetSdPage(0, PageKind::Standard );
} }
SdPage* AnnotationManagerImpl::GetLastPage() SdPage* AnnotationManagerImpl::GetLastPage()
{ {
return mpDoc->GetMasterSdPage( mpDoc->GetMasterSdPageCount(PK_STANDARD) - 1, PK_STANDARD ); return mpDoc->GetMasterSdPage( mpDoc->GetMasterSdPageCount(PageKind::Standard) - 1, PageKind::Standard );
} }
SdPage* AnnotationManagerImpl::GetCurrentPage() SdPage* AnnotationManagerImpl::GetCurrentPage()

View File

@ -638,10 +638,10 @@ void OutlineToImpressFinalizer::operator() (bool)
// Call UpdatePreview once for every slide to resync the // Call UpdatePreview once for every slide to resync the
// document with the outliner of the OutlineViewShell. // document with the outliner of the OutlineViewShell.
sal_uInt16 nPageCount (mrDocument.GetSdPageCount(PK_STANDARD)); sal_uInt16 nPageCount (mrDocument.GetSdPageCount(PageKind::Standard));
for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++) for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++)
{ {
SdPage* pPage = mrDocument.GetSdPage(nIndex, PK_STANDARD); SdPage* pPage = mrDocument.GetSdPage(nIndex, PageKind::Standard);
// Make the page the actual page so that the // Make the page the actual page so that the
// following UpdatePreview() call accesses the // following UpdatePreview() call accesses the
// correct paragraphs. // correct paragraphs.
@ -649,7 +649,7 @@ void OutlineToImpressFinalizer::operator() (bool)
pOutlineShell->UpdatePreview(pPage, true); pOutlineShell->UpdatePreview(pPage, true);
} }
// Select the first slide. // Select the first slide.
SdPage* pPage = mrDocument.GetSdPage(0, PK_STANDARD); SdPage* pPage = mrDocument.GetSdPage(0, PageKind::Standard);
pView->SetActualPage(pPage); pView->SetActualPage(pPage);
pOutlineShell->UpdatePreview(pPage, true); pOutlineShell->UpdatePreview(pPage, true);
} }

View File

@ -104,7 +104,7 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo
nPgNum++; nPgNum++;
} }
pPage = pViewSh->GetDoc()->GetSdPage( (sal_uInt16)nPgNum, PK_STANDARD ); pPage = pViewSh->GetDoc()->GetSdPage( (sal_uInt16)nPgNum, PageKind::Standard );
} }
else else
{ {
@ -232,7 +232,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
{ {
int nPgNum; int nPgNum;
if( (pPage->GetPageKind() == PK_HANDOUT) && pViewSh ) if( (pPage->GetPageKind() == PageKind::Handout) && pViewSh )
{ {
nPgNum = pViewSh->GetPrintedHandoutPageNum(); nPgNum = pViewSh->GetPrintedHandoutPageNum();
} }
@ -300,7 +300,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
if( !bMasterView ) if( !bMasterView )
{ {
if( pPage && (pPage->GetPageKind() == PK_HANDOUT) && pViewSh ) if( pPage && (pPage->GetPageKind() == PageKind::Handout) && pViewSh )
{ {
nPageCount = pViewSh->GetPrintedHandoutPageCount(); nPageCount = pViewSh->GetPrintedHandoutPageCount();
} }
@ -499,7 +499,7 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot )
sal_Int32 nY; sal_Int32 nY;
if( pDocSh ) if( pDocSh )
{ {
SdrPage* pPage = static_cast<SdrPage*>(pDoc->GetSdPage(0, PK_STANDARD)); SdrPage* pPage = static_cast<SdrPage*>(pDoc->GetSdPage(0, PageKind::Standard));
Size aSize(pPage->GetSize()); Size aSize(pPage->GetSize());
nW = aSize.Width(); nW = aSize.Width();
nH = aSize.Height(); nH = aSize.Height();

View File

@ -261,7 +261,7 @@ void SdTransferable::CreateData()
{ {
mbOwnView = true; mbOwnView = true;
SdPage* pPage = mpSdDrawDocument->GetSdPage(0, PK_STANDARD); SdPage* pPage = mpSdDrawDocument->GetSdPage(0, PageKind::Standard);
if( 1 == pPage->GetObjCount() ) if( 1 == pPage->GetObjCount() )
CreateObjectReplacement( pPage->GetObj( 0 ) ); CreateObjectReplacement( pPage->GetObj( 0 ) );
@ -302,7 +302,7 @@ void SdTransferable::CreateData()
SdrModel* pOldModel = mpSdView->GetModel(); SdrModel* pOldModel = mpSdView->GetModel();
SdStyleSheetPool* pOldStylePool = static_cast<SdStyleSheetPool*>( pOldModel->GetStyleSheetPool() ); SdStyleSheetPool* pOldStylePool = static_cast<SdStyleSheetPool*>( pOldModel->GetStyleSheetPool() );
SdStyleSheetPool* pNewStylePool = static_cast<SdStyleSheetPool*>( mpSdDrawDocumentIntern->GetStyleSheetPool() ); SdStyleSheetPool* pNewStylePool = static_cast<SdStyleSheetPool*>( mpSdDrawDocumentIntern->GetStyleSheetPool() );
SdPage* pPage = mpSdDrawDocumentIntern->GetSdPage( 0, PK_STANDARD ); SdPage* pPage = mpSdDrawDocumentIntern->GetSdPage( 0, PageKind::Standard );
OUString aOldLayoutName( pOldPage->GetLayoutName() ); OUString aOldLayoutName( pOldPage->GetLayoutName() );
pPage->SetSize( pOldPage->GetSize() ); pPage->SetSize( pOldPage->GetSize() );
@ -322,7 +322,7 @@ void SdTransferable::CreateData()
mpSdDrawDocumentIntern && mpSdViewIntern && mpSdDrawDocumentIntern && mpSdViewIntern &&
mpSdDrawDocumentIntern->GetPageCount() ) mpSdDrawDocumentIntern->GetPageCount() )
{ {
SdPage* pPage = mpSdDrawDocumentIntern->GetSdPage( 0, PK_STANDARD ); SdPage* pPage = mpSdDrawDocumentIntern->GetSdPage( 0, PageKind::Standard );
if( 1 == mpSdDrawDocumentIntern->GetPageCount() ) if( 1 == mpSdDrawDocumentIntern->GetPageCount() )
{ {
@ -723,7 +723,7 @@ void SdTransferable::SetPageBookmarks( const std::vector<OUString> &rPageBookmar
if( mpSdViewIntern ) if( mpSdViewIntern )
{ {
SdPage* pPage = mpSdDrawDocument->GetSdPage( 0, PK_STANDARD ); SdPage* pPage = mpSdDrawDocument->GetSdPage( 0, PageKind::Standard );
if( pPage ) if( pPage )
{ {

View File

@ -106,12 +106,12 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt )
ScopedVclPtrInstance<SdTemplatePopup_Impl> aPop; ScopedVclPtrInstance<SdTemplatePopup_Impl> aPop;
{ {
const sal_uInt16 nMasterCount = pDoc->GetMasterSdPageCount(PK_STANDARD); const sal_uInt16 nMasterCount = pDoc->GetMasterSdPageCount(PageKind::Standard);
sal_uInt16 nCount = 0; sal_uInt16 nCount = 0;
for( sal_uInt16 nPage = 0; nPage < nMasterCount; ++nPage ) for( sal_uInt16 nPage = 0; nPage < nMasterCount; ++nPage )
{ {
SdPage* pMaster = pDoc->GetMasterSdPage(nPage, PK_STANDARD); SdPage* pMaster = pDoc->GetMasterSdPage(nPage, PageKind::Standard);
if( pMaster ) if( pMaster )
aPop->InsertItem( ++nCount, pMaster->GetName() ); aPop->InsertItem( ++nCount, pMaster->GetName() );
} }
@ -120,7 +120,7 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt )
sal_uInt16 nCurrId = aPop->GetCurId()-1; sal_uInt16 nCurrId = aPop->GetCurId()-1;
if( nCurrId < nMasterCount ) if( nCurrId < nMasterCount )
{ {
SdPage* pMaster = pDoc->GetMasterSdPage(nCurrId, PK_STANDARD); SdPage* pMaster = pDoc->GetMasterSdPage(nCurrId, PageKind::Standard);
SfxStringItem aStyle( ATTR_PRESLAYOUT_NAME, pMaster->GetName() ); SfxStringItem aStyle( ATTR_PRESLAYOUT_NAME, pMaster->GetName() );
pViewFrame->GetDispatcher()->ExecuteList( pViewFrame->GetDispatcher()->ExecuteList(
SID_PRESENTATION_LAYOUT, SfxCallMode::SLOT, { &aStyle }); SID_PRESENTATION_LAYOUT, SfxCallMode::SLOT, { &aStyle });

View File

@ -684,7 +684,7 @@ Reference< drawing::XDrawPage > SdPhotoAlbumDialog::appendNewSlide(AutoLayout aL
Reference< drawing::XDrawPage > xSlide; // Create the slide Reference< drawing::XDrawPage > xSlide; // Create the slide
Reference< container::XIndexAccess > xIndexAccess( xDrawPages, uno::UNO_QUERY ); Reference< container::XIndexAccess > xIndexAccess( xDrawPages, uno::UNO_QUERY );
xSlide = xDrawPages->insertNewByIndex( xIndexAccess->getCount() ); xSlide = xDrawPages->insertNewByIndex( xIndexAccess->getCount() );
SdPage* pSlide = pDoc->GetSdPage( pDoc->GetSdPageCount(PK_STANDARD)-1, PK_STANDARD); SdPage* pSlide = pDoc->GetSdPage( pDoc->GetSdPageCount(PageKind::Standard)-1, PageKind::Standard);
pSlide->SetAutoLayout(aLayout, true); // Set the layout here pSlide->SetAutoLayout(aLayout, true); // Set the layout here
return xSlide; return xSlide;
} }
@ -759,7 +759,7 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize )
CapSize.Height() = aPageSize.Height/6; CapSize.Height() = aPageSize.Height/6;
CapPos.X() = 0; CapPos.X() = 0;
CapPos.Y() = aPageSize.Height - CapSize.Height(); CapPos.Y() = aPageSize.Height - CapSize.Height();
SdPage* pSlide = pDoc->GetSdPage( pDoc->GetSdPageCount(PK_STANDARD)-1, PK_STANDARD ); SdPage* pSlide = pDoc->GetSdPage( pDoc->GetSdPageCount(PageKind::Standard)-1, PageKind::Standard );
// try to get existing PresObj // try to get existing PresObj
const Rectangle rRect(CapPos,CapSize); const Rectangle rRect(CapPos,CapSize);

View File

@ -414,7 +414,7 @@ IMPL_LINK( AnimationWindow, ClickGetObjectHdl, Button*, pBtn, void )
IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, Button*, pBtn, void ) IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, Button*, pBtn, void )
{ {
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD); SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
SdrObject* pObject; SdrObject* pObject;
// tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access // tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access
@ -525,7 +525,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
{ {
BitmapEx aBmp(*m_FrameList[m_nCurrentFrame].first); BitmapEx aBmp(*m_FrameList[m_nCurrentFrame].first);
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD); SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
SdrObject *const pObject = pPage->GetObj(m_nCurrentFrame); SdrObject *const pObject = pPage->GetObj(m_nCurrentFrame);
if( pObject ) if( pObject )
{ {
@ -708,7 +708,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// clone object(s) and insert the clone(s) into the list // clone object(s) and insert the clone(s) into the list
const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
const size_t nMarkCount = rMarkList.GetMarkCount(); const size_t nMarkCount = rMarkList.GetMarkCount();
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD); SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
const size_t nCloneCount = pPage->GetObjCount(); const size_t nCloneCount = pPage->GetObjCount();
if (nMarkCount > 0) if (nMarkCount > 0)
@ -1013,7 +1013,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// calculate offset for the specified direction // calculate offset for the specified direction
Size aOffset; Size aOffset;
SdrObject * pClone = nullptr; SdrObject * pClone = nullptr;
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD); SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
for (size_t i = 0; i < nCount; ++i) for (size_t i = 0; i < nCount; ++i)
{ {

View File

@ -314,10 +314,10 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow,
// fill Listbox with page names of Docs // fill Listbox with page names of Docs
for( long nPage = 0L; for( long nPage = 0L;
nPage < rDoc.GetSdPageCount( PK_STANDARD ); nPage < rDoc.GetSdPageCount( PageKind::Standard );
nPage++ ) nPage++ )
{ {
SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) nPage, PK_STANDARD ); SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) nPage, PageKind::Standard );
OUString aStr( pPage->GetName() ); OUString aStr( pPage->GetName() );
m_pLbPages->InsertEntry( aStr ); m_pLbPages->InsertEntry( aStr );
} }
@ -419,7 +419,7 @@ void SdDefineCustomShowDlg::ClickButtonHdl2(void* p)
m_pLbCustomPages->Select( pEntry ); m_pLbCustomPages->Select( pEntry );
SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) m_pLbPages-> SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) m_pLbPages->
GetSelectEntryPos( i ), PK_STANDARD ); GetSelectEntryPos( i ), PageKind::Standard );
pEntry->SetUserData( pPage ); pEntry->SetUserData( pPage );
if( nPosCP != TREELIST_APPEND ) if( nPosCP != TREELIST_APPEND )

View File

@ -201,7 +201,7 @@ void SdDocPreviewWin::updateViewSettings()
if(pDoc) if(pDoc)
{ {
SdPage * pPage = pDoc->GetSdPage( mnShowPage, PK_STANDARD ); SdPage * pPage = pDoc->GetSdPage( mnShowPage, PageKind::Standard );
if( pPage ) if( pPage )
{ {
SdrOutliner& rOutl = pDoc->GetDrawOutliner(); SdrOutliner& rOutl = pDoc->GetDrawOutliner();

View File

@ -175,12 +175,12 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
SdPage* pSlide; SdPage* pSlide;
SdPage* pNotes; SdPage* pNotes;
if( pCurrentPage->GetPageKind() == PK_STANDARD ) if( pCurrentPage->GetPageKind() == PageKind::Standard )
{ {
pSlide = pCurrentPage; pSlide = pCurrentPage;
pNotes = static_cast<SdPage*>(pDoc->GetPage( pCurrentPage->GetPageNum() + 1 )); pNotes = static_cast<SdPage*>(pDoc->GetPage( pCurrentPage->GetPageNum() + 1 ));
} }
else if( pCurrentPage->GetPageKind() == PK_NOTES ) else if( pCurrentPage->GetPageKind() == PageKind::Notes )
{ {
pNotes = pCurrentPage; pNotes = pCurrentPage;
pSlide = static_cast<SdPage*>(pDoc->GetPage( pCurrentPage->GetPageNum() -1 )); pSlide = static_cast<SdPage*>(pDoc->GetPage( pCurrentPage->GetPageNum() -1 ));
@ -189,8 +189,8 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
else else
{ {
// handout // handout
pSlide = pDoc->GetSdPage( 0, PK_STANDARD ); pSlide = pDoc->GetSdPage( 0, PageKind::Standard );
pNotes = pDoc->GetSdPage( 0, PK_NOTES ); pNotes = pDoc->GetSdPage( 0, PageKind::Notes );
mpCurrentPage = nullptr; mpCurrentPage = nullptr;
} }
@ -228,7 +228,7 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
maSlideSettings = pSlide->getHeaderFooterSettings(); maSlideSettings = pSlide->getHeaderFooterSettings();
const HeaderFooterSettings& rTitleSettings = mpDoc->GetSdPage(0, PK_STANDARD)->getHeaderFooterSettings(); const HeaderFooterSettings& rTitleSettings = mpDoc->GetSdPage(0, PageKind::Standard)->getHeaderFooterSettings();
bool bNotOnTitle = !rTitleSettings.mbFooterVisible && !rTitleSettings.mbSlideNumberVisible && !rTitleSettings.mbDateTimeVisible; bool bNotOnTitle = !rTitleSettings.mbFooterVisible && !rTitleSettings.mbSlideNumberVisible && !rTitleSettings.mbDateTimeVisible;
mpSlideTabPage->init( maSlideSettings, bNotOnTitle ); mpSlideTabPage->init( maSlideSettings, bNotOnTitle );
@ -324,19 +324,19 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
// apply to all slides // apply to all slides
if( bToAll ) if( bToAll )
{ {
int nPageCount = mpDoc->GetSdPageCount( PK_STANDARD ); int nPageCount = mpDoc->GetSdPageCount( PageKind::Standard );
int nPage; int nPage;
for( nPage = 0; nPage < nPageCount; nPage++ ) for( nPage = 0; nPage < nPageCount; nPage++ )
{ {
SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PageKind::Standard );
change( pUndoGroup, pPage, aNewSettings ); change( pUndoGroup, pPage, aNewSettings );
} }
} }
else else
{ {
// apply only to the current slide // apply only to the current slide
DBG_ASSERT( mpCurrentPage && mpCurrentPage->GetPageKind() == PK_STANDARD, "no current page to apply to!" ); DBG_ASSERT( mpCurrentPage && mpCurrentPage->GetPageKind() == PageKind::Standard, "no current page to apply to!" );
if( mpCurrentPage && (mpCurrentPage->GetPageKind() == PK_STANDARD) ) if( mpCurrentPage && (mpCurrentPage->GetPageKind() == PageKind::Standard) )
{ {
change( pUndoGroup, mpCurrentPage, aNewSettings ); change( pUndoGroup, mpCurrentPage, aNewSettings );
} }
@ -347,13 +347,13 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
if( bNewNotOnTitle ) if( bNewNotOnTitle )
{ {
// just hide them, plain simple UI feature // just hide them, plain simple UI feature
HeaderFooterSettings aTempSettings = mpDoc->GetSdPage( 0, PK_STANDARD )->getHeaderFooterSettings(); HeaderFooterSettings aTempSettings = mpDoc->GetSdPage( 0, PageKind::Standard )->getHeaderFooterSettings();
aTempSettings.mbFooterVisible = false; aTempSettings.mbFooterVisible = false;
aTempSettings.mbSlideNumberVisible = false; aTempSettings.mbSlideNumberVisible = false;
aTempSettings.mbDateTimeVisible = false; aTempSettings.mbDateTimeVisible = false;
change( pUndoGroup, mpDoc->GetSdPage( 0, PK_STANDARD ), aTempSettings ); change( pUndoGroup, mpDoc->GetSdPage( 0, PageKind::Standard ), aTempSettings );
} }
// now notes settings // now notes settings
@ -365,17 +365,17 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
if( !bForceSlides || !(aNewSettings == maNotesHandoutSettings) ) if( !bForceSlides || !(aNewSettings == maNotesHandoutSettings) )
{ {
// first set to all notes pages // first set to all notes pages
int nPageCount = mpDoc->GetSdPageCount( PK_NOTES ); int nPageCount = mpDoc->GetSdPageCount( PageKind::Notes );
int nPage; int nPage;
for( nPage = 0; nPage < nPageCount; nPage++ ) for( nPage = 0; nPage < nPageCount; nPage++ )
{ {
SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PK_NOTES ); SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PageKind::Notes );
change( pUndoGroup, pPage, aNewSettings ); change( pUndoGroup, pPage, aNewSettings );
} }
// and last but not least to the handout page // and last but not least to the handout page
change( pUndoGroup, mpDoc->GetMasterSdPage( 0, PK_HANDOUT ), aNewSettings ); change( pUndoGroup, mpDoc->GetMasterSdPage( 0, PageKind::Handout ), aNewSettings );
} }
// give the undo group to the undo manager // give the undo group to the undo manager
@ -416,7 +416,7 @@ HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument*
get(mpCTPreview, "preview"); get(mpCTPreview, "preview");
mpCTPreview->init( pActualPage ? mpCTPreview->init( pActualPage ?
(pActualPage->IsMasterPage() ? pActualPage : static_cast<SdPage*>(&(pActualPage->TRG_GetMasterPage()))) : (pActualPage->IsMasterPage() ? pActualPage : static_cast<SdPage*>(&(pActualPage->TRG_GetMasterPage()))) :
(pDoc->GetMasterSdPage( 0, bHandoutMode ? PK_NOTES : PK_STANDARD )) ); (pDoc->GetMasterSdPage( 0, bHandoutMode ? PageKind::Notes : PageKind::Standard )) );
if( mbHandoutMode ) if( mbHandoutMode )
{ {
@ -591,26 +591,26 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
// if set, set it on all notes master pages // if set, set it on all notes master pages
if( bSet ) if( bSet )
{ {
sal_uInt16 nPageCount = mpDoc->GetMasterSdPageCount( PK_NOTES ); sal_uInt16 nPageCount = mpDoc->GetMasterSdPageCount( PageKind::Notes );
sal_uInt16 nPage; sal_uInt16 nPage;
for( nPage = 0; nPage < nPageCount; nPage++ ) for( nPage = 0; nPage < nPageCount; nPage++ )
{ {
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( nPage, PK_NOTES ) ); GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( nPage, PageKind::Notes ) );
} }
} }
// #i119985# and set it, or just get it from the notes master page // #i119985# and set it, or just get it from the notes master page
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( 0, PK_NOTES ) ); GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( 0, PageKind::Notes ) );
} }
else else
{ {
// get the language from the first master page // get the language from the first master page
// or set it to all master pages // or set it to all master pages
sal_uInt16 nPageCount = bSet ? mpDoc->GetMasterSdPageCount( PK_NOTES ) : 1; sal_uInt16 nPageCount = bSet ? mpDoc->GetMasterSdPageCount( PageKind::Notes ) : 1;
sal_uInt16 nPage; sal_uInt16 nPage;
for( nPage = 0; nPage < nPageCount; nPage++ ) for( nPage = 0; nPage < nPageCount; nPage++ )
{ {
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( nPage, PK_STANDARD ) ); GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( nPage, PageKind::Standard ) );
} }
} }
} }
@ -799,7 +799,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangl
if (nullptr != mpMaster) if (nullptr != mpMaster)
{ {
SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_TITLE)); SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_TITLE));
SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj(mpMaster->GetPageKind() == PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE)); SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj(mpMaster->GetPageKind() == PageKind::Notes ? PRESOBJ_NOTES : PRESOBJ_OUTLINE));
SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_HEADER)); SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_HEADER));
SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_FOOTER)); SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_FOOTER));
SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_DATETIME)); SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_DATETIME));

View File

@ -45,21 +45,21 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD
if( mpCurrentPage == nullptr ) if( mpCurrentPage == nullptr )
{ {
mpCurrentPage = pDoc->GetMasterSdPage( 0, PK_STANDARD ); mpCurrentPage = pDoc->GetMasterSdPage( 0, PageKind::Standard );
OSL_FAIL( "MasterLayoutDialog::MasterLayoutDialog() - no current page?" ); OSL_FAIL( "MasterLayoutDialog::MasterLayoutDialog() - no current page?" );
} }
switch( mpCurrentPage->GetPageKind() ) switch( mpCurrentPage->GetPageKind() )
{ {
case PK_STANDARD: case PageKind::Standard:
{ {
mpCBHeader->Enable(false); mpCBHeader->Enable(false);
mpCBPageNumber->SetText(mpCBSlideNumber->GetText()); mpCBPageNumber->SetText(mpCBSlideNumber->GetText());
break; break;
} }
case PK_NOTES: case PageKind::Notes:
break; break;
case PK_HANDOUT: case PageKind::Handout:
break; break;
} }
@ -100,7 +100,7 @@ void MasterLayoutDialog::applyChanges()
{ {
mpDoc->BegUndo(GetText()); mpDoc->BegUndo(GetText());
if( (mpCurrentPage->GetPageKind() != PK_STANDARD) && (mbOldHeader != (bool) mpCBHeader->IsChecked() ) ) if( (mpCurrentPage->GetPageKind() != PageKind::Standard) && (mbOldHeader != (bool) mpCBHeader->IsChecked() ) )
{ {
if( mbOldHeader ) if( mbOldHeader )
remove( PRESOBJ_HEADER ); remove( PRESOBJ_HEADER );

View File

@ -151,7 +151,7 @@ void SdPresLayoutDlg::FillValueSet()
for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++) for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++)
{ {
SdPage* pMaster = static_cast<SdPage*>(pDoc->GetMasterPage(nLayout)); SdPage* pMaster = static_cast<SdPage*>(pDoc->GetMasterPage(nLayout));
if (pMaster->GetPageKind() == PK_STANDARD) if (pMaster->GetPageKind() == PageKind::Standard)
{ {
OUString aLayoutName(pMaster->GetLayoutName()); OUString aLayoutName(pMaster->GetLayoutName());
aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)); aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
@ -249,7 +249,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, Button*, void)
for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++) for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++)
{ {
SdPage* pMaster = static_cast<SdPage*>( pTemplDoc->GetMasterPage(nLayout) ); SdPage* pMaster = static_cast<SdPage*>( pTemplDoc->GetMasterPage(nLayout) );
if (pMaster->GetPageKind() == PK_STANDARD) if (pMaster->GetPageKind() == PageKind::Standard)
{ {
OUString aLayoutName(pMaster->GetLayoutName()); OUString aLayoutName(pMaster->GetLayoutName());
aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)); aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));

View File

@ -283,7 +283,7 @@ OUString SdPageObjsTLB::getAltLongDescText(SvTreeListEntry* pEntry , bool isAltT
for( pageNo = 0; pageNo < maxPages; pageNo++ ) for( pageNo = 0; pageNo < maxPages; pageNo++ )
{ {
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( pageNo ) ); const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( pageNo ) );
if( pPage->GetPageKind() != PK_STANDARD ) continue; if( pPage->GetPageKind() != PageKind::Standard ) continue;
if( pPage->GetName() != ParentName ) continue; if( pPage->GetName() != ParentName ) continue;
SdrObjListIter aIter( *pPage, SdrIterMode::Flat ); SdrObjListIter aIter( *pPage, SdrIterMode::Flat );
while( aIter.IsMore() ) while( aIter.IsMore() )
@ -515,8 +515,8 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, bool bAllPages,
while( nPage < nMaxPages ) while( nPage < nMaxPages )
{ {
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) ); const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) );
if( (mbShowAllPages || pPage->GetPageKind() == PK_STANDARD) if( (mbShowAllPages || pPage->GetPageKind() == PageKind::Standard)
&& !(pPage->GetPageKind()==PK_HANDOUT) ) //#94954# never list the normal handout page ( handout-masterpage is used instead ) && !(pPage->GetPageKind()==PageKind::Handout) ) //#94954# never list the normal handout page ( handout-masterpage is used instead )
{ {
bool bPageExluded = pPage->IsExcluded(); bool bPageExluded = pPage->IsExcluded();
@ -800,7 +800,7 @@ void SdPageObjsTLB::SetShowAllShapes (
} }
/** /**
* Checks if the pages (PK_STANDARD) of a doc and the objects on the pages * Checks if the pages (PageKind::Standard) of a doc and the objects on the pages
* are identical to the TreeLB. * are identical to the TreeLB.
* If a doc is provided, this will be the used doc (important by more than * If a doc is provided, this will be the used doc (important by more than
* one document). * one document).
@ -824,7 +824,7 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
while( nPage < nMaxPages ) while( nPage < nMaxPages )
{ {
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) ); const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) );
if( pPage->GetPageKind() == PK_STANDARD ) if( pPage->GetPageKind() == PageKind::Standard )
{ {
if( !pEntry ) if( !pEntry )
return false; return false;
@ -918,7 +918,7 @@ void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry )
while( nPage < nMaxPages ) while( nPage < nMaxPages )
{ {
SdPage* pPage = static_cast<SdPage*>( mpBookmarkDoc->GetPage( nPage ) ); SdPage* pPage = static_cast<SdPage*>( mpBookmarkDoc->GetPage( nPage ) );
if( pPage->GetPageKind() == PK_STANDARD ) if( pPage->GetPageKind() == PageKind::Standard )
{ {
pPageEntry = InsertEntry( pPage->GetName(), pPageEntry = InsertEntry( pPage->GetName(),
aImgPage, aImgPage,
@ -1194,7 +1194,7 @@ void SdPageObjsTLB::DoDrag()
if( eDragType == NAVIGATOR_DRAGTYPE_LINK ) if( eDragType == NAVIGATOR_DRAGTYPE_LINK )
nDNDActions = DND_ACTION_LINK; // Either COPY *or* LINK, never both! nDNDActions = DND_ACTION_LINK; // Either COPY *or* LINK, never both!
else if (mpDoc->GetSdPageCount(PK_STANDARD) == 1) else if (mpDoc->GetSdPageCount(PageKind::Standard) == 1)
{ {
// Can not move away the last slide in a document. // Can not move away the last slide in a document.
nDNDActions = DND_ACTION_COPY; nDNDActions = DND_ACTION_COPY;

View File

@ -66,28 +66,28 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
if( !rViews.empty() ) if( !rViews.empty() )
{ {
sd::FrameView* pFrameView = rViews[0]; sd::FrameView* pFrameView = rViews[0];
if( pFrameView->GetPageKind() == PK_STANDARD ) if( pFrameView->GetPageKind() == PageKind::Standard )
{ {
sal_uInt16 nSelectedPage = pFrameView->GetSelectedPage(); sal_uInt16 nSelectedPage = pFrameView->GetSelectedPage();
pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PK_STANDARD); pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PageKind::Standard);
} }
} }
if( nullptr == pSelectedPage ) if( nullptr == pSelectedPage )
{ {
SdPage* pPage = nullptr; SdPage* pPage = nullptr;
sal_uInt16 nPageCnt = (sal_uInt16) mpDoc->GetSdPageCount(PK_STANDARD); sal_uInt16 nPageCnt = (sal_uInt16) mpDoc->GetSdPageCount(PageKind::Standard);
for (sal_uInt16 i = 0; i < nPageCnt; i++) for (sal_uInt16 i = 0; i < nPageCnt; i++)
{ {
pPage = mpDoc->GetSdPage(i, PK_STANDARD); pPage = mpDoc->GetSdPage(i, PageKind::Standard);
if ( pPage->IsSelected() ) if ( pPage->IsSelected() )
pSelectedPage = pPage; pSelectedPage = pPage;
} }
if( nullptr == pSelectedPage ) if( nullptr == pSelectedPage )
pSelectedPage = mpDoc->GetSdPage(0, PK_STANDARD); pSelectedPage = mpDoc->GetSdPage(0, PageKind::Standard);
} }
Rectangle aVisArea = GetVisArea(nAspect); Rectangle aVisArea = GetVisArea(nAspect);
@ -130,7 +130,7 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
// provide size of first page // provide size of first page
MapMode aSrcMapMode(MapUnit::MapPixel); MapMode aSrcMapMode(MapUnit::MapPixel);
MapMode aDstMapMode(MapUnit::Map100thMM); MapMode aDstMapMode(MapUnit::Map100thMM);
Size aSize = mpDoc->GetSdPage(0, PK_STANDARD)->GetSize(); Size aSize = mpDoc->GetSdPage(0, PageKind::Standard)->GetSize();
aSrcMapMode.SetMapUnit(MapUnit::Map100thMM); aSrcMapMode.SetMapUnit(MapUnit::Map100thMM);
aSize = Application::GetDefaultDevice()->LogicToLogic(aSize, &aSrcMapMode, &aDstMapMode); aSize = Application::GetDefaultDevice()->LogicToLogic(aSize, &aSrcMapMode, &aDstMapMode);

View File

@ -313,7 +313,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
//TODO/LATER: looks a little bit strange! //TODO/LATER: looks a little bit strange!
if( ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() ) if( ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() )
{ {
SdPage* pPage = mpDoc->GetSdPage( 0, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( 0, PageKind::Standard );
if( pPage ) if( pPage )
SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) ); SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) );
@ -768,7 +768,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
// or the handout view. // or the handout view.
PageKind eNewPageKind = pPage->GetPageKind(); PageKind eNewPageKind = pPage->GetPageKind();
if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DocumentType::Draw) ) if( (eNewPageKind != PageKind::Standard) && (mpDoc->GetDocumentType() == DocumentType::Draw) )
return false; return false;
if (eNewPageKind != pDrawViewShell->GetPageKind()) if (eNewPageKind != pDrawViewShell->GetPageKind())
@ -778,13 +778,13 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
OUString sViewURL; OUString sViewURL;
switch (eNewPageKind) switch (eNewPageKind)
{ {
case PK_STANDARD: case PageKind::Standard:
sViewURL = FrameworkHelper::msImpressViewURL; sViewURL = FrameworkHelper::msImpressViewURL;
break; break;
case PK_NOTES: case PageKind::Notes:
sViewURL = FrameworkHelper::msNotesViewURL; sViewURL = FrameworkHelper::msNotesViewURL;
break; break;
case PK_HANDOUT: case PageKind::Handout:
sViewURL = FrameworkHelper::msHandoutViewURL; sViewURL = FrameworkHelper::msHandoutViewURL;
break; break;
default: default:
@ -996,10 +996,10 @@ bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
if (aLayoutName.isEmpty()) if (aLayoutName.isEmpty())
{ {
sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD); sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PageKind::Standard);
for (sal_uInt32 i = 0; i < nCount; ++i) for (sal_uInt32 i = 0; i < nCount; ++i)
{ {
OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName(); OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PageKind::Standard)->GetLayoutName();
OUString aNewLayoutName = aLayoutName; OUString aNewLayoutName = aLayoutName;
// Don't add suffix for the first master page // Don't add suffix for the first master page
if( i > 0 ) if( i > 0 )

View File

@ -340,7 +340,7 @@ std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
&rFrame, &rFrame,
*mpBase, *mpBase,
&rWindow, &rWindow,
PK_STANDARD, PageKind::Standard,
pFrameView)); pFrameView));
pViewShell->GetContentWindow()->set_id("impress_win"); pViewShell->GetContentWindow()->set_id("impress_win");
} }
@ -371,7 +371,7 @@ std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
&rFrame, &rFrame,
*mpBase, *mpBase,
&rWindow, &rWindow,
PK_NOTES, PageKind::Notes,
pFrameView)); pFrameView));
pViewShell->GetContentWindow()->set_id("notes_win"); pViewShell->GetContentWindow()->set_id("notes_win");
} }
@ -382,7 +382,7 @@ std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
&rFrame, &rFrame,
*mpBase, *mpBase,
&rWindow, &rWindow,
PK_HANDOUT, PageKind::Handout,
pFrameView)); pFrameView));
pViewShell->GetContentWindow()->set_id("handout_win"); pViewShell->GetContentWindow()->set_id("handout_win");
} }

View File

@ -317,7 +317,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
const bool bForceFillStyle, const bool bForceNoFillStyle ) const bool bForceFillStyle, const bool bForceNoFillStyle )
{ {
SdPage* pPage = static_cast<SdPage*>(mpView->GetSdrPageView()->GetPage()); SdPage* pPage = static_cast<SdPage*>(mpView->GetSdrPageView()->GetPage());
if ( pPage->IsMasterPage() && pPage->GetPageKind() == PK_STANDARD && if ( pPage->IsMasterPage() && pPage->GetPageKind() == PageKind::Standard &&
mpDoc->GetDocumentType() == DocumentType::Impress ) mpDoc->GetDocumentType() == DocumentType::Impress )
{ {
/********************************************** /**********************************************

View File

@ -73,13 +73,13 @@ void FuExpandPage::DoExecute( SfxRequest& )
// find selected page (only standard pages) // find selected page (only standard pages)
SdPage* pActualPage = nullptr; SdPage* pActualPage = nullptr;
sal_uInt16 i = 0; sal_uInt16 i = 0;
sal_uInt16 nCount = mpDoc->GetSdPageCount(PK_STANDARD); sal_uInt16 nCount = mpDoc->GetSdPageCount(PageKind::Standard);
while (!pActualPage && i < nCount) while (!pActualPage && i < nCount)
{ {
if (mpDoc->GetSdPage(i, PK_STANDARD)->IsSelected()) if (mpDoc->GetSdPage(i, PageKind::Standard)->IsSelected())
{ {
pActualPage = mpDoc->GetSdPage(i, PK_STANDARD); pActualPage = mpDoc->GetSdPage(i, PageKind::Standard);
} }
i++; i++;
@ -162,7 +162,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
pActualNotesPage->GetUppBorder(), pActualNotesPage->GetUppBorder(),
pActualNotesPage->GetRgtBorder(), pActualNotesPage->GetRgtBorder(),
pActualNotesPage->GetLwrBorder() ); pActualNotesPage->GetLwrBorder() );
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
pNotesPage->SetName(OUString()); pNotesPage->SetName(OUString());
// insert page after current page // insert page after current page

View File

@ -363,11 +363,11 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
if (pPage && !pPage->IsMasterPage()) if (pPage && !pPage->IsMasterPage())
{ {
if (pPage->GetPageKind() == PK_STANDARD) if (pPage->GetPageKind() == PageKind::Standard)
{ {
nPos = pPage->GetPageNum() + 2; nPos = pPage->GetPageNum() + 2;
} }
else if (pPage->GetPageKind() == PK_NOTES) else if (pPage->GetPageKind() == PageKind::Notes)
{ {
nPos = pPage->GetPageNum() + 1; nPos = pPage->GetPageNum() + 1;
} }
@ -577,7 +577,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
nPage++; nPage++;
pPara = rDocliner.GetParagraph( nPos - 1 ); pPara = rDocliner.GetParagraph( nPos - 1 );
} }
SdPage* pPage = mpDoc->GetSdPage(nPage, PK_STANDARD); SdPage* pPage = mpDoc->GetSdPage(nPage, PageKind::Standard);
aLayoutName = pPage->GetLayoutName(); aLayoutName = pPage->GetLayoutName();
sal_Int32 nIndex = aLayoutName.indexOf(SD_LT_SEPARATOR); sal_Int32 nIndex = aLayoutName.indexOf(SD_LT_SEPARATOR);
if( nIndex != -1 ) if( nIndex != -1 )

View File

@ -135,7 +135,7 @@ void FuPage::DoExecute( SfxRequest& )
{ {
mbMasterPage = mpDrawViewShell->GetEditMode() == EditMode::MasterPage; mbMasterPage = mpDrawViewShell->GetEditMode() == EditMode::MasterPage;
// we don't really want to format page background with SID_ATTR_PAGE[_SIZE] slots // we don't really want to format page background with SID_ATTR_PAGE[_SIZE] slots
mbDisplayBackgroundTabPage = ( mpDrawViewShell->GetPageKind() == PK_STANDARD) && mbDisplayBackgroundTabPage = ( mpDrawViewShell->GetPageKind() == PageKind::Standard) &&
( nSlotId != SID_ATTR_PAGE_SIZE) && ( nSlotId != SID_ATTR_PAGE ); ( nSlotId != SID_ATTR_PAGE_SIZE) && ( nSlotId != SID_ATTR_PAGE );
mpPage = mpDrawViewShell->getCurrentPage(); mpPage = mpDrawViewShell->getCurrentPage();
} }
@ -375,7 +375,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
{ {
// But don't ask in notice-view, because we can't change the background of // But don't ask in notice-view, because we can't change the background of
// notice-masterpage (at the moment) // notice-masterpage (at the moment)
if( ePageKind != PK_NOTES ) if( ePageKind != PageKind::Notes )
{ {
ScopedVclPtrInstance<MessageDialog> aQuestionBox( ScopedVclPtrInstance<MessageDialog> aQuestionBox(
pParent, SD_RESSTR(STR_PAGE_BACKGROUND_TXT), pParent, SD_RESSTR(STR_PAGE_BACKGROUND_TXT),

View File

@ -114,7 +114,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
for (auto it = xSelection->begin(); it != xSelection->end(); ++it) for (auto it = xSelection->begin(); it != xSelection->end(); ++it)
{ {
SdPage *pPage = *it; SdPage *pPage = *it;
if (pPage->IsSelected() || pPage->GetPageKind() != PK_STANDARD) if (pPage->IsSelected() || pPage->GetPageKind() != PageKind::Standard)
continue; continue;
mpDoc->SetSelected(pPage, true); mpDoc->SetSelected(pPage, true);
aUnselect.push_back(pPage); aUnselect.push_back(pPage);
@ -126,9 +126,9 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
std::vector<SdPage*> aSelectedPages; std::vector<SdPage*> aSelectedPages;
std::vector<sal_uInt16> aSelectedPageNums; std::vector<sal_uInt16> aSelectedPageNums;
// determine the active pages // determine the active pages
for (sal_uInt16 nPage = 0; nPage < mpDoc->GetSdPageCount(PK_STANDARD); nPage++) for (sal_uInt16 nPage = 0; nPage < mpDoc->GetSdPageCount(PageKind::Standard); nPage++)
{ {
SdPage* pPage = mpDoc->GetSdPage(nPage, PK_STANDARD); SdPage* pPage = mpDoc->GetSdPage(nPage, PageKind::Standard);
if (pPage->IsSelected()) if (pPage->IsSelected())
{ {
aSelectedPages.push_back(pPage); aSelectedPages.push_back(pPage);
@ -251,7 +251,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
{ {
sal_uInt16 nPgNum = pSelectedPage->TRG_GetMasterPage().GetPageNum(); sal_uInt16 nPgNum = pSelectedPage->TRG_GetMasterPage().GetPageNum();
if (static_cast<DrawViewShell*>(mpViewShell)->GetPageKind() == PK_NOTES) if (static_cast<DrawViewShell*>(mpViewShell)->GetPageKind() == PageKind::Notes)
nPgNum++; nPgNum++;
pView->HideSdrPage(); pView->HideSdrPage();

View File

@ -61,15 +61,15 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings(); PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings();
SfxItemSet aDlgSet( mpDoc->GetPool(), ATTR_PRESENT_START, ATTR_PRESENT_END ); SfxItemSet aDlgSet( mpDoc->GetPool(), ATTR_PRESENT_START, ATTR_PRESENT_END );
std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PK_STANDARD )); std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PageKind::Standard ));
const OUString& rPresPage = rPresentationSettings.maPresPage; const OUString& rPresPage = rPresentationSettings.maPresPage;
OUString aFirstPage; OUString aFirstPage;
SdPage* pPage = nullptr; SdPage* pPage = nullptr;
long nPage; long nPage;
for( nPage = mpDoc->GetSdPageCount( PK_STANDARD ) - 1L; nPage >= 0L; nPage-- ) for( nPage = mpDoc->GetSdPageCount( PageKind::Standard ) - 1L; nPage >= 0L; nPage-- )
{ {
pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PK_STANDARD ); pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PageKind::Standard );
OUString aStr( pPage->GetName() ); OUString aStr( pPage->GetName() );
if ( aStr.isEmpty() ) if ( aStr.isEmpty() )

View File

@ -67,14 +67,14 @@ void FuSummaryPage::DoExecute( SfxRequest& )
sal_uInt16 i = 0; sal_uInt16 i = 0;
sal_uInt16 nFirstPage = SDRPAGE_NOTFOUND; sal_uInt16 nFirstPage = SDRPAGE_NOTFOUND;
sal_uInt16 nSelectedPages = 0; sal_uInt16 nSelectedPages = 0;
sal_uInt16 nCount = mpDoc->GetSdPageCount(PK_STANDARD); sal_uInt16 nCount = mpDoc->GetSdPageCount(PageKind::Standard);
while (i < nCount && nSelectedPages <= 1) while (i < nCount && nSelectedPages <= 1)
{ {
/* How many pages are selected? /* How many pages are selected?
exactly one: pool everything from this page exactly one: pool everything from this page
otherwise: only pool the selected pages */ otherwise: only pool the selected pages */
SdPage* pActualPage = mpDoc->GetSdPage(i, PK_STANDARD); SdPage* pActualPage = mpDoc->GetSdPage(i, PageKind::Standard);
if (pActualPage->IsSelected()) if (pActualPage->IsSelected())
{ {
@ -95,11 +95,11 @@ void FuSummaryPage::DoExecute( SfxRequest& )
for (i = nFirstPage; i < nCount; i++) for (i = nFirstPage; i < nCount; i++)
{ {
SdPage* pActualPage = mpDoc->GetSdPage(i, PK_STANDARD); SdPage* pActualPage = mpDoc->GetSdPage(i, PageKind::Standard);
if (nSelectedPages <= 1 || pActualPage->IsSelected()) if (nSelectedPages <= 1 || pActualPage->IsSelected())
{ {
SdPage* pActualNotesPage = mpDoc->GetSdPage(i, PK_NOTES); SdPage* pActualNotesPage = mpDoc->GetSdPage(i, PageKind::Notes);
SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pActualPage->GetPresObj(PRESOBJ_TITLE) ); SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pActualPage->GetPresObj(PRESOBJ_TITLE) );
if (pTextObj && !pTextObj->IsEmptyPresObj()) if (pTextObj && !pTextObj->IsEmptyPresObj())
@ -144,7 +144,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
pActualNotesPage->GetUppBorder(), pActualNotesPage->GetUppBorder(),
pActualNotesPage->GetRgtBorder(), pActualNotesPage->GetRgtBorder(),
pActualNotesPage->GetLwrBorder() ); pActualNotesPage->GetLwrBorder() );
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
// insert page at the back // insert page at the back
mpDoc->InsertPage(pNotesPage, nCount * 2 + 2); mpDoc->InsertPage(pNotesPage, nCount * 2 + 2);

View File

@ -513,7 +513,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( pDrawViewShell ) if( pDrawViewShell )
{ {
PageKind ePageKind = pDrawViewShell->GetPageKind(); PageKind ePageKind = pDrawViewShell->GetPageKind();
if( ePageKind == PK_NOTES || ePageKind == PK_HANDOUT ) if( ePageKind == PageKind::Notes || ePageKind == PageKind::Handout )
{ {
SdPage* pPage = mpViewShell->GetActualPage(); SdPage* pPage = mpViewShell->GetActualPage();

View File

@ -88,7 +88,7 @@ public:
SfxViewFrame* pFrame, SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase, ViewShellBase& rViewShellBase,
vcl::Window* pParentWindow, vcl::Window* pParentWindow,
PageKind ePageKind = PK_STANDARD, PageKind ePageKind = PageKind::Standard,
FrameView* pFrameView = nullptr); FrameView* pFrameView = nullptr);
virtual ~DrawViewShell() override; virtual ~DrawViewShell() override;

View File

@ -122,13 +122,13 @@ void CurrentMasterPagesSelector::LateInit()
void CurrentMasterPagesSelector::Fill (ItemList& rItemList) void CurrentMasterPagesSelector::Fill (ItemList& rItemList)
{ {
sal_uInt16 nPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD); sal_uInt16 nPageCount = mrDocument.GetMasterSdPageCount(PageKind::Standard);
// Remember the names of the master pages that have been inserted to // Remember the names of the master pages that have been inserted to
// avoid double insertion. // avoid double insertion.
::std::set<OUString> aMasterPageNames; ::std::set<OUString> aMasterPageNames;
for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++) for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++)
{ {
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD); SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage == nullptr) if (pMasterPage == nullptr)
continue; continue;
@ -168,13 +168,13 @@ void CurrentMasterPagesSelector::UpdateSelection()
{ {
// Iterate over all pages and for the selected ones put the name of // Iterate over all pages and for the selected ones put the name of
// their master page into a set. // their master page into a set.
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD); sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PageKind::Standard);
::std::set<OUString> aNames; ::std::set<OUString> aNames;
sal_uInt16 nIndex; sal_uInt16 nIndex;
bool bLoop (true); bool bLoop (true);
for (nIndex=0; nIndex<nPageCount && bLoop; nIndex++) for (nIndex=0; nIndex<nPageCount && bLoop; nIndex++)
{ {
SdPage* pPage = mrDocument.GetSdPage (nIndex, PK_STANDARD); SdPage* pPage = mrDocument.GetSdPage (nIndex, PageKind::Standard);
if (pPage != nullptr && pPage->IsSelected()) if (pPage != nullptr && pPage->IsSelected())
{ {
if ( ! pPage->TRG_HasMasterPage()) if ( ! pPage->TRG_HasMasterPage())

View File

@ -92,10 +92,10 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Check if a master page with the same name as that of the given // Check if a master page with the same name as that of the given
// master page already exists. // master page already exists.
bool bPageExists (false); bool bPageExists (false);
sal_uInt16 nMasterPageCount(rTargetDocument.GetMasterSdPageCount(PK_STANDARD)); sal_uInt16 nMasterPageCount(rTargetDocument.GetMasterSdPageCount(PageKind::Standard));
for (sal_uInt16 nMaster=0; nMaster<nMasterPageCount; nMaster++) for (sal_uInt16 nMaster=0; nMaster<nMasterPageCount; nMaster++)
{ {
SdPage* pCandidate = rTargetDocument.GetMasterSdPage (nMaster, PK_STANDARD); SdPage* pCandidate = rTargetDocument.GetMasterSdPage (nMaster, PageKind::Standard);
if (pMasterPage!=nullptr if (pMasterPage!=nullptr
&& pCandidate->GetName() == pMasterPage->GetName()) && pCandidate->GetName() == pMasterPage->GetName())
{ {
@ -120,8 +120,8 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Set a layout. // Set a layout.
SdPage* pSlide = rTargetDocument.GetSdPage( SdPage* pSlide = rTargetDocument.GetSdPage(
rTargetDocument.GetSdPageCount(PK_STANDARD)-1, rTargetDocument.GetSdPageCount(PageKind::Standard)-1,
PK_STANDARD); PageKind::Standard);
if (pSlide == nullptr) if (pSlide == nullptr)
break; break;
pSlide->SetAutoLayout(AUTOLAYOUT_TITLE, true); pSlide->SetAutoLayout(AUTOLAYOUT_TITLE, true);
@ -139,7 +139,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Make the connection from the new slide to the master page // Make the connection from the new slide to the master page
// (and do the same for the notes page.) // (and do the same for the notes page.)
rTargetDocument.SetMasterPage ( rTargetDocument.SetMasterPage (
rTargetDocument.GetSdPageCount(PK_STANDARD)-1, rTargetDocument.GetSdPageCount(PageKind::Standard)-1,
pNewMasterPage->GetName(), pNewMasterPage->GetName(),
&rTargetDocument, &rTargetDocument,
false, // Connect the new master page with the new slide but false, // Connect the new master page with the new slide but
@ -165,17 +165,17 @@ SdPage* DocumentHelper::GetSlideForMasterPage (SdPage* pMasterPage)
// Iterate over all pages and check if it references the given master // Iterate over all pages and check if it references the given master
// page. // page.
if (pDocument!=nullptr && pDocument->GetSdPageCount(PK_STANDARD) > 0) if (pDocument!=nullptr && pDocument->GetSdPageCount(PageKind::Standard) > 0)
{ {
// In most cases a new slide has just been inserted so start with // In most cases a new slide has just been inserted so start with
// the last page. // the last page.
sal_uInt16 nPageIndex (pDocument->GetSdPageCount(PK_STANDARD)-1); sal_uInt16 nPageIndex (pDocument->GetSdPageCount(PageKind::Standard)-1);
bool bFound (false); bool bFound (false);
while ( ! bFound) while ( ! bFound)
{ {
pCandidate = pDocument->GetSdPage( pCandidate = pDocument->GetSdPage(
nPageIndex, nPageIndex,
PK_STANDARD); PageKind::Standard);
if (pCandidate != nullptr) if (pCandidate != nullptr)
{ {
if (static_cast<SdPage*>(&pCandidate->TRG_GetMasterPage()) if (static_cast<SdPage*>(&pCandidate->TRG_GetMasterPage())
@ -432,10 +432,10 @@ void DocumentHelper::AssignMasterPageToPage (
{ {
// Find first slide that uses the master page. // Find first slide that uses the master page.
SdPage* pSlide = nullptr; SdPage* pSlide = nullptr;
sal_uInt16 nPageCount = pDocument->GetSdPageCount(PK_STANDARD); sal_uInt16 nPageCount = pDocument->GetSdPageCount(PageKind::Standard);
for (sal_uInt16 nPage=0; nPage<nPageCount&&pSlide==nullptr; nPage++) for (sal_uInt16 nPage=0; nPage<nPageCount&&pSlide==nullptr; nPage++)
{ {
SdrPage* pCandidate = pDocument->GetSdPage(nPage,PK_STANDARD); SdrPage* pCandidate = pDocument->GetSdPage(nPage,PageKind::Standard);
if (pCandidate != nullptr if (pCandidate != nullptr
&& pCandidate->TRG_HasMasterPage() && pCandidate->TRG_HasMasterPage()
&& &(pCandidate->TRG_GetMasterPage()) == pPage) && &(pCandidate->TRG_GetMasterPage()) == pPage)

View File

@ -130,7 +130,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
SdDrawDocument* pDocument = pDocumentShell->GetDoc(); SdDrawDocument* pDocument = pDocumentShell->GetDoc();
if (pDocument != nullptr) if (pDocument != nullptr)
{ {
pPage = pDocument->GetMasterSdPage(0, PK_STANDARD); pPage = pDocument->GetMasterSdPage(0, PageKind::Standard);
// In order to make the newly loaded master page deletable // In order to make the newly loaded master page deletable
// when copied into documents it is marked as no "precious". // when copied into documents it is marked as no "precious".
// When it is modified then it is marked as "precious". // When it is modified then it is marked as "precious".
@ -179,7 +179,7 @@ SdPage* DefaultPageObjectProvider::operator () (SdDrawDocument* pContainerDocume
if (pContainerDocument != nullptr) if (pContainerDocument != nullptr)
{ {
sal_Int32 nIndex (0); sal_Int32 nIndex (0);
SdPage* pLocalSlide = pContainerDocument->GetSdPage((sal_uInt16)nIndex, PK_STANDARD); SdPage* pLocalSlide = pContainerDocument->GetSdPage((sal_uInt16)nIndex, PageKind::Standard);
if (pLocalSlide!=nullptr && pLocalSlide->TRG_HasMasterPage()) if (pLocalSlide!=nullptr && pLocalSlide->TRG_HasMasterPage())
pLocalMasterPage = dynamic_cast<SdPage*>(&pLocalSlide->TRG_GetMasterPage()); pLocalMasterPage = dynamic_cast<SdPage*>(&pLocalSlide->TRG_GetMasterPage());
} }

View File

@ -153,10 +153,10 @@ void MasterPageObserver::Implementation::RegisterDocument (
{ {
// Gather the names of all the master pages in the given document. // Gather the names of all the master pages in the given document.
MasterPageContainer::mapped_type aMasterPageSet; MasterPageContainer::mapped_type aMasterPageSet;
sal_uInt16 nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD); sal_uInt16 nMasterPageCount = rDocument.GetMasterSdPageCount(PageKind::Standard);
for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++) for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{ {
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD); SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage != nullptr) if (pMasterPage != nullptr)
aMasterPageSet.insert (pMasterPage->GetName()); aMasterPageSet.insert (pMasterPage->GetName());
} }
@ -236,8 +236,8 @@ void MasterPageObserver::Implementation::Notify(
{ {
SdDrawDocument& rDocument ( SdDrawDocument& rDocument (
static_cast<SdDrawDocument&>(rBroadcaster)); static_cast<SdDrawDocument&>(rBroadcaster));
if (rDocument.GetMasterSdPageCount(PK_STANDARD) if (rDocument.GetMasterSdPageCount(PageKind::Standard)
== rDocument.GetMasterSdPageCount(PK_NOTES)) == rDocument.GetMasterSdPageCount(PageKind::Notes))
{ {
AnalyzeUsedMasterPages (rDocument); AnalyzeUsedMasterPages (rDocument);
} }
@ -254,11 +254,11 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages (
SdDrawDocument& rDocument) SdDrawDocument& rDocument)
{ {
// Create a set of names of the master pages used by the given document. // Create a set of names of the master pages used by the given document.
sal_uInt16 nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD); sal_uInt16 nMasterPageCount = rDocument.GetMasterSdPageCount(PageKind::Standard);
::std::set<OUString> aCurrentMasterPages; ::std::set<OUString> aCurrentMasterPages;
for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++) for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{ {
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD); SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage != nullptr) if (pMasterPage != nullptr)
aCurrentMasterPages.insert (pMasterPage->GetName()); aCurrentMasterPages.insert (pMasterPage->GetName());
OSL_TRACE("currently used master page %d is %s", OSL_TRACE("currently used master page %d is %s",

View File

@ -355,7 +355,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
if (pMasterPage == nullptr) if (pMasterPage == nullptr)
return; return;
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD); sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PageKind::Standard);
if (nPageCount == 0) if (nPageCount == 0)
return; return;
@ -367,7 +367,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
new ::sd::slidesorter::SlideSorterViewShell::PageSelection()); new ::sd::slidesorter::SlideSorterViewShell::PageSelection());
for (sal_uInt16 nPageIndex=0; nPageIndex<nPageCount; nPageIndex++) for (sal_uInt16 nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
{ {
SdPage* pPage = mrDocument.GetSdPage (nPageIndex, PK_STANDARD); SdPage* pPage = mrDocument.GetSdPage (nPageIndex, PageKind::Standard);
if (pPage != nullptr && pPage->GetLayoutName() != sFullLayoutName) if (pPage != nullptr && pPage->GetLayoutName() != sFullLayoutName)
{ {
pPageList->push_back (pPage); pPageList->push_back (pPage);

View File

@ -95,11 +95,11 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList)
{ {
// Create a set of names of the master pages used by the document. // Create a set of names of the master pages used by the document.
MasterPageObserver::MasterPageNameSet aCurrentNames; MasterPageObserver::MasterPageNameSet aCurrentNames;
sal_uInt16 nMasterPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD); sal_uInt16 nMasterPageCount = mrDocument.GetMasterSdPageCount(PageKind::Standard);
sal_uInt16 nIndex; sal_uInt16 nIndex;
for (nIndex=0; nIndex<nMasterPageCount; nIndex++) for (nIndex=0; nIndex<nMasterPageCount; nIndex++)
{ {
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD); SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage != nullptr) if (pMasterPage != nullptr)
aCurrentNames.insert (pMasterPage->GetName()); aCurrentNames.insert (pMasterPage->GetName());
} }

View File

@ -474,7 +474,7 @@ void SlideBackground::populateMasterSlideDropdown()
for( sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++ ) for( sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++ )
{ {
SdPage* pMaster = static_cast<SdPage*>(pDoc->GetMasterPage(nLayout)); SdPage* pMaster = static_cast<SdPage*>(pDoc->GetMasterPage(nLayout));
if( pMaster->GetPageKind() == PK_STANDARD) if( pMaster->GetPageKind() == PageKind::Standard)
{ {
OUString aLayoutName(pMaster->GetLayoutName()); OUString aLayoutName(pMaster->GetLayoutName());
aLayoutName = aLayoutName.copy(0,aLayoutName.indexOf(SD_LT_SEPARATOR)); aLayoutName = aLayoutName.copy(0,aLayoutName.indexOf(SD_LT_SEPARATOR));
@ -911,9 +911,9 @@ IMPL_LINK_NOARG(SlideBackground, AssignMasterPage, ListBox&, void)
if (!pDoc) if (!pDoc)
return; return;
sal_uInt16 nSelectedPage = SDRPAGE_NOTFOUND; sal_uInt16 nSelectedPage = SDRPAGE_NOTFOUND;
for( sal_uInt16 nPage = 0; nPage < pDoc->GetSdPageCount(PK_STANDARD); nPage++ ) for( sal_uInt16 nPage = 0; nPage < pDoc->GetSdPageCount(PageKind::Standard); nPage++ )
{ {
if (pDoc->GetSdPage(nPage,PK_STANDARD)->IsSelected()) if (pDoc->GetSdPage(nPage,PageKind::Standard)->IsSelected())
{ {
nSelectedPage = nPage; nSelectedPage = nPage;
break; break;

View File

@ -737,7 +737,7 @@ void SAL_CALL SlideShow::end()
if (xDrawView.is()) if (xDrawView.is())
xDrawView->setCurrentPage( xDrawView->setCurrentPage(
Reference<XDrawPage>( Reference<XDrawPage>(
mpDoc->GetSdPage(xController->getRestoreSlide(), PK_STANDARD)->getUnoPage(), mpDoc->GetSdPage(xController->getRestoreSlide(), PageKind::Standard)->getUnoPage(),
UNO_QUERY)); UNO_QUERY));
} }
} }
@ -1059,7 +1059,7 @@ void SlideShow::StartInPlacePresentation()
FrameView* pFrameView = pMainViewShell->GetFrameView(); FrameView* pFrameView = pMainViewShell->GetFrameView();
pFrameView->SetPresentationViewShellId(SID_VIEWSHELL1); pFrameView->SetPresentationViewShellId(SID_VIEWSHELL1);
pFrameView->SetPreviousViewShellType (pMainViewShell->GetShellType()); pFrameView->SetPreviousViewShellType (pMainViewShell->GetShellType());
pFrameView->SetPageKind (PK_STANDARD); pFrameView->SetPageKind (PageKind::Standard);
} }
pHelper->RequestView( FrameworkHelper::msImpressViewURL, FrameworkHelper::msCenterPaneURL ); pHelper->RequestView( FrameworkHelper::msImpressViewURL, FrameworkHelper::msCenterPaneURL );

View File

@ -886,12 +886,12 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( pStartPage ) if( pStartPage )
{ {
if( pStartPage->GetPageKind() == PK_NOTES ) if( pStartPage->GetPageKind() == PageKind::Notes )
{ {
// we are in notes page mode, so get // we are in notes page mode, so get
// the corresponding draw page // the corresponding draw page
const sal_uInt16 nPgNum = ( pStartPage->GetPageNum() - 2 ) >> 1; const sal_uInt16 nPgNum = ( pStartPage->GetPageNum() - 2 ) >> 1;
pStartPage = mpDoc->GetSdPage( nPgNum, PK_STANDARD ); pStartPage = mpDoc->GetSdPage( nPgNum, PageKind::Standard );
} }
} }
@ -907,7 +907,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( meAnimationMode != ANIMATIONMODE_SHOW ) if( meAnimationMode != ANIMATIONMODE_SHOW )
{ {
if( pStartPage->GetPageKind() == PK_STANDARD ) if( pStartPage->GetPageKind() == PageKind::Standard )
{ {
maPresSettings.mbAll = false; maPresSettings.mbAll = false;
} }
@ -1613,7 +1613,7 @@ sal_Int32 SlideshowImpl::getSlideNumberForBookmark( const OUString& rStrBookmark
} }
} }
if( (nPgNum == SDRPAGE_NOTFOUND) || bIsMasterPage || static_cast<SdPage*>(mpDoc->GetPage(nPgNum))->GetPageKind() != PK_STANDARD ) if( (nPgNum == SDRPAGE_NOTFOUND) || bIsMasterPage || static_cast<SdPage*>(mpDoc->GetPage(nPgNum))->GetPageKind() != PageKind::Standard )
return -1; return -1;
return ( nPgNum - 1) >> 1; return ( nPgNum - 1) >> 1;
@ -2037,7 +2037,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void)
{ {
if( mpSlideController->isVisibleSlideNumber( nPageNumber ) ) if( mpSlideController->isVisibleSlideNumber( nPageNumber ) )
{ {
SdPage* pPage = mpDoc->GetSdPage((sal_uInt16)nPageNumber, PK_STANDARD); SdPage* pPage = mpDoc->GetSdPage((sal_uInt16)nPageNumber, PageKind::Standard);
if (pPage) if (pPage)
{ {
pPageMenu->InsertItem( (sal_uInt16)(CM_SLIDES + nPageNumber), pPage->GetName() ); pPageMenu->InsertItem( (sal_uInt16)(CM_SLIDES + nPageNumber), pPage->GetName() );
@ -2287,7 +2287,7 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow()
void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide ) void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
{ {
const sal_uInt16 nSlideCount = mpDoc->GetSdPageCount( PK_STANDARD ); const sal_uInt16 nSlideCount = mpDoc->GetSdPageCount( PageKind::Standard );
if( nSlideCount ) if( nSlideCount )
{ {
@ -2320,7 +2320,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
for( nSlide = 0, nFirstVisibleSlide = -1; for( nSlide = 0, nFirstVisibleSlide = -1;
( nSlide < nSlideCount ) && ( -1 == nFirstVisibleSlide ); nSlide++ ) ( nSlide < nSlideCount ) && ( -1 == nFirstVisibleSlide ); nSlide++ )
{ {
SdPage* pTestSlide = mpDoc->GetSdPage( (sal_uInt16)nSlide, PK_STANDARD ); SdPage* pTestSlide = mpDoc->GetSdPage( (sal_uInt16)nSlide, PageKind::Standard );
if( pTestSlide->GetName() == rPresSlide ) if( pTestSlide->GetName() == rPresSlide )
{ {
@ -2339,7 +2339,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
for( sal_Int32 i = 0; i < nSlideCount; i++ ) for( sal_Int32 i = 0; i < nSlideCount; i++ )
{ {
bool bVisible = !( mpDoc->GetSdPage( (sal_uInt16)i, PK_STANDARD ) )->IsExcluded(); bool bVisible = !( mpDoc->GetSdPage( (sal_uInt16)i, PageKind::Standard ) )->IsExcluded();
if( bVisible || (eMode == AnimationSlideController::ALL) ) if( bVisible || (eMode == AnimationSlideController::ALL) )
mpSlideController->insertSlideNumber( i, bVisible ); mpSlideController->insertSlideNumber( i, bVisible );
} }
@ -2352,7 +2352,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
{ {
sal_Int32 nSlide; sal_Int32 nSlide;
for( nSlide = 0; nSlide < nSlideCount; nSlide++ ) for( nSlide = 0; nSlide < nSlideCount; nSlide++ )
if( rPresSlide == mpDoc->GetSdPage( (sal_uInt16) nSlide, PK_STANDARD )->GetName() ) if( rPresSlide == mpDoc->GetSdPage( (sal_uInt16) nSlide, PageKind::Standard )->GetName() )
break; break;
if( nSlide < nSlideCount ) if( nSlide < nSlideCount )
@ -2365,7 +2365,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
{ {
const sal_uInt16 nSdSlide = ( (*it)->GetPageNum() - 1 ) / 2; const sal_uInt16 nSdSlide = ( (*it)->GetPageNum() - 1 ) / 2;
if( !( mpDoc->GetSdPage( nSdSlide, PK_STANDARD ) )->IsExcluded()) if( !( mpDoc->GetSdPage( nSdSlide, PageKind::Standard ) )->IsExcluded())
mpSlideController->insertSlideNumber( nSdSlide ); mpSlideController->insertSlideNumber( nSdSlide );
} }
} }

View File

@ -333,7 +333,7 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (Ru
aOutputSize.Height() = (long)( aOutputSize.Height() / 1.03 ); aOutputSize.Height() = (long)( aOutputSize.Height() / 1.03 );
} }
SdPage* pP = mpDoc->GetSdPage( 0, PK_STANDARD ); SdPage* pP = mpDoc->GetSdPage( 0, PageKind::Standard );
Size aPageSize( pP->GetSize() ); Size aPageSize( pP->GetSize() );
const double page_ratio = (double)aPageSize.Width() / (double)aPageSize.Height(); const double page_ratio = (double)aPageSize.Width() / (double)aPageSize.Height();

View File

@ -330,12 +330,12 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
SdDrawDocument* pDataDoc = pDataDocSh->GetDoc(); SdDrawDocument* pDataDoc = pDataDocSh->GetDoc();
if (pDataDoc!=nullptr if (pDataDoc!=nullptr
&& pDataDoc->GetSdPageCount(PK_STANDARD)) && pDataDoc->GetSdPageCount(PageKind::Standard))
{ {
const SolarMutexGuard aGuard; const SolarMutexGuard aGuard;
bMergeMasterPages = (pDataDoc != rModel.GetDocument()); bMergeMasterPages = (pDataDoc != rModel.GetDocument());
nInsertPageCount = pDataDoc->GetSdPageCount( PK_STANDARD ); nInsertPageCount = pDataDoc->GetSdPageCount( PageKind::Standard );
rModel.GetDocument()->InsertBookmarkAsPage( rModel.GetDocument()->InsertBookmarkAsPage(
std::vector<OUString>(), std::vector<OUString>(),
nullptr, nullptr,

View File

@ -571,7 +571,7 @@ void Listener::HandleModelChange (const SdrPage* pPage)
// in a sane state, not just in the middle of a larger change. // in a sane state, not just in the middle of a larger change.
SdDrawDocument* pDocument (mrSlideSorter.GetModel().GetDocument()); SdDrawDocument* pDocument (mrSlideSorter.GetModel().GetDocument());
if (pDocument != nullptr if (pDocument != nullptr
&& pDocument->GetMasterSdPageCount(PK_STANDARD) == pDocument->GetMasterSdPageCount(PK_NOTES)) && pDocument->GetMasterSdPageCount(PageKind::Standard) == pDocument->GetMasterSdPageCount(PageKind::Notes))
{ {
// A model change can make updates of some text fields necessary // A model change can make updates of some text fields necessary
// (like page numbers and page count.) Invalidate all previews in // (like page numbers and page count.) Invalidate all previews in
@ -606,11 +606,11 @@ void Listener::HandleShapeModification (const SdrPage* pPage)
// pages that are linked to this master page. // pages that are linked to this master page.
if (pPage->IsMasterPage()) if (pPage->IsMasterPage())
{ {
for (sal_uInt16 nIndex=0,nCount=pDocument->GetSdPageCount(PK_STANDARD); for (sal_uInt16 nIndex=0,nCount=pDocument->GetSdPageCount(PageKind::Standard);
nIndex<nCount; nIndex<nCount;
++nIndex) ++nIndex)
{ {
const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD); const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PageKind::Standard);
if (pCandidate!=nullptr && pCandidate->TRG_HasMasterPage()) if (pCandidate!=nullptr && pCandidate->TRG_HasMasterPage())
{ {
if (&pCandidate->TRG_GetMasterPage() == pPage) if (&pCandidate->TRG_GetMasterPage() == pPage)

View File

@ -251,7 +251,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_ASSIGN_LAYOUT: case SID_ASSIGN_LAYOUT:
{ {
pShell->mpImpl->AssignLayout( rRequest, PK_STANDARD ); pShell->mpImpl->AssignLayout( rRequest, PageKind::Standard );
rRequest.Done (); rRequest.Done ();
} }
break; break;
@ -967,7 +967,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
pPageToRename->SetName( rName ); pPageToRename->SetName( rName );
// also rename notes-page // also rename notes-page
SdPage* pNotesPage = pDocument->GetSdPage( nPageId, PK_NOTES ); SdPage* pNotesPage = pDocument->GetSdPage( nPageId, PageKind::Notes );
if (pNotesPage != nullptr) if (pNotesPage != nullptr)
pNotesPage->SetName (rName); pNotesPage->SetName (rName);
} }
@ -975,7 +975,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
else else
{ {
// rename MasterPage -> rename LayoutTemplate // rename MasterPage -> rename LayoutTemplate
pPageToRename = pDocument->GetMasterSdPage( nPageId, PK_STANDARD ); pPageToRename = pDocument->GetMasterSdPage( nPageId, PageKind::Standard );
if (pPageToRename != nullptr) if (pPageToRename != nullptr)
{ {
const OUString aOldLayoutName( pPageToRename->GetLayoutName() ); const OUString aOldLayoutName( pPageToRename->GetLayoutName() );
@ -1035,7 +1035,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
{ {
pNewPage = pShell->CreateOrDuplicatePage ( pNewPage = pShell->CreateOrDuplicatePage (
rRequest, rRequest,
PK_STANDARD, PageKind::Standard,
nInsertionIndex>=0 nInsertionIndex>=0
? mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex)->GetPage() ? mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex)->GetPage()
: nullptr); : nullptr);
@ -1057,7 +1057,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
// Create shapes for the default layout. // Create shapes for the default layout.
pNewPage = pDocument->GetMasterSdPage( pNewPage = pDocument->GetMasterSdPage(
(sal_uInt16)(nInsertionIndex+1), PK_STANDARD); (sal_uInt16)(nInsertionIndex+1), PageKind::Standard);
pNewPage->CreateTitleAndLayout (true,true); pNewPage->CreateTitleAndLayout (true,true);
} }
} }
@ -1106,7 +1106,7 @@ void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest)
{ {
aPagesToSelect.push_back( aPagesToSelect.push_back(
mrSlideSorter.GetViewShell()->CreateOrDuplicatePage( mrSlideSorter.GetViewShell()->CreateOrDuplicatePage(
rRequest, PK_STANDARD, *iPage, nInsertPosition)); rRequest, PageKind::Standard, *iPage, nInsertPosition));
} }
aPagesToDuplicate.clear(); aPagesToDuplicate.clear();

View File

@ -278,7 +278,7 @@ void SlideSorterModel::Resync()
// Check if document and this model really differ. // Check if document and this model really differ.
bool bIsUpToDate (true); bool bIsUpToDate (true);
SdDrawDocument* pDocument = GetDocument(); SdDrawDocument* pDocument = GetDocument();
if (pDocument!=nullptr && maPageDescriptors.size()==pDocument->GetSdPageCount(PK_STANDARD)) if (pDocument!=nullptr && maPageDescriptors.size()==pDocument->GetSdPageCount(PageKind::Standard))
{ {
for (sal_Int32 nIndex=0,nCount=maPageDescriptors.size(); nIndex<nCount; ++nIndex) for (sal_Int32 nIndex=0,nCount=maPageDescriptors.size(); nIndex<nCount; ++nIndex)
{ {
@ -527,7 +527,7 @@ bool SlideSorterModel::NotifyPageEvent (const SdrPage* pSdrPage)
// We are only interested in pages that are currently served by this // We are only interested in pages that are currently served by this
// model. // model.
if (pPage->GetPageKind() != PK_STANDARD) if (pPage->GetPageKind() != PageKind::Standard)
return false; return false;
if (pPage->IsMasterPage() != (meEditMode==EditMode::MasterPage)) if (pPage->IsMasterPage() != (meEditMode==EditMode::MasterPage))
return false; return false;
@ -636,9 +636,9 @@ SdPage* SlideSorterModel::GetPage (const sal_Int32 nSdIndex) const
if (pModel != nullptr) if (pModel != nullptr)
{ {
if (meEditMode == EditMode::Page) if (meEditMode == EditMode::Page)
return pModel->GetSdPage ((sal_uInt16)nSdIndex, PK_STANDARD); return pModel->GetSdPage ((sal_uInt16)nSdIndex, PageKind::Standard);
else else
return pModel->GetMasterSdPage ((sal_uInt16)nSdIndex, PK_STANDARD); return pModel->GetMasterSdPage ((sal_uInt16)nSdIndex, PageKind::Standard);
} }
else else
return nullptr; return nullptr;

View File

@ -401,7 +401,7 @@ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest)
mpImpl->ProcessModifyPageSlot ( mpImpl->ProcessModifyPageSlot (
rRequest, rRequest,
pCurrentPage, pCurrentPage,
PK_STANDARD); PageKind::Standard);
Cancel(); Cancel();
rRequest.Done (); rRequest.Done ();
} }
@ -752,7 +752,7 @@ void SlideSorterViewShell::GetStateMovePageFirst (SfxItemSet& rSet)
{ {
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get()); DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
if (pDrawViewShell != nullptr && pDrawViewShell->GetPageKind() == PK_HANDOUT) if (pDrawViewShell != nullptr && pDrawViewShell->GetPageKind() == PageKind::Handout)
{ {
rSet.DisableItem( SID_MOVE_PAGE_FIRST ); rSet.DisableItem( SID_MOVE_PAGE_FIRST );
rSet.DisableItem( SID_MOVE_PAGE_UP ); rSet.DisableItem( SID_MOVE_PAGE_UP );
@ -813,7 +813,7 @@ void SlideSorterViewShell::ExecMovePageDown (SfxRequest& /*rReq*/)
sal_uInt16 lastSelectedPageNo = SyncPageSelectionToDocument(xSelection).second; sal_uInt16 lastSelectedPageNo = SyncPageSelectionToDocument(xSelection).second;
// Get page number of the last page // Get page number of the last page
sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PK_STANDARD); sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PageKind::Standard);
// Now compute human page number from internal page number // Now compute human page number from internal page number
lastSelectedPageNo = (lastSelectedPageNo - 1) / 2; lastSelectedPageNo = (lastSelectedPageNo - 1) / 2;
@ -842,7 +842,7 @@ void SlideSorterViewShell::ExecMovePageLast (SfxRequest& /*rReq*/)
SyncPageSelectionToDocument(xSelection); SyncPageSelectionToDocument(xSelection);
// Get page number of the last page // Get page number of the last page
sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PK_STANDARD); sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PageKind::Standard);
// Move to position after last page No (=Number of pages - 1) // Move to position after last page No (=Number of pages - 1)
GetDoc()->MovePages( nNoOfPages - 1 ); GetDoc()->MovePages( nNoOfPages - 1 );
@ -854,7 +854,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
{ {
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get()); DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
if (pDrawViewShell != nullptr && pDrawViewShell->GetPageKind() == PK_HANDOUT) if (pDrawViewShell != nullptr && pDrawViewShell->GetPageKind() == PageKind::Handout)
{ {
rSet.DisableItem( SID_MOVE_PAGE_LAST ); rSet.DisableItem( SID_MOVE_PAGE_LAST );
rSet.DisableItem( SID_MOVE_PAGE_DOWN ); rSet.DisableItem( SID_MOVE_PAGE_DOWN );
@ -868,7 +868,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
sal_uInt16 lastSelectedPageNo = SyncPageSelectionToDocument(xSelection).second; sal_uInt16 lastSelectedPageNo = SyncPageSelectionToDocument(xSelection).second;
// Get page number of the last page // Get page number of the last page
sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PK_STANDARD); sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PageKind::Standard);
// Now compute human page number from internal page number // Now compute human page number from internal page number
lastSelectedPageNo = (lastSelectedPageNo - 1) / 2; lastSelectedPageNo = (lastSelectedPageNo - 1) / 2;
@ -881,10 +881,10 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
void SlideSorterViewShell::PostMoveSlidesActions(const std::shared_ptr<SlideSorterViewShell::PageSelection> &rpSelection) void SlideSorterViewShell::PostMoveSlidesActions(const std::shared_ptr<SlideSorterViewShell::PageSelection> &rpSelection)
{ {
sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PK_STANDARD); sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PageKind::Standard);
for (sal_uInt16 nPage = 0; nPage < nNoOfPages; nPage++) for (sal_uInt16 nPage = 0; nPage < nNoOfPages; nPage++)
{ {
SdPage* pPage = GetDoc()->GetSdPage(nPage, PK_STANDARD); SdPage* pPage = GetDoc()->GetSdPage(nPage, PageKind::Standard);
GetDoc()->SetSelected(pPage, false); GetDoc()->SetSelected(pPage, false);
} }

View File

@ -99,7 +99,7 @@ void InsertionIndicatorOverlay::Create (const SdTransferable* pTransferable)
{ {
SdDrawDocument* pDataDocument = pDataDocShell->GetDoc(); SdDrawDocument* pDataDocument = pDataDocShell->GetDoc();
if (pDataDocument != nullptr) if (pDataDocument != nullptr)
nSelectionCount = pDataDocument->GetSdPageCount(PK_STANDARD); nSelectionCount = pDataDocument->GetSdPageCount(PageKind::Standard);
} }
} }
Create(pData->GetRepresentatives(), nSelectionCount); Create(pData->GetRepresentatives(), nSelectionCount);

View File

@ -550,9 +550,9 @@ Any SdUnoDrawView::getDrawViewMode() const
Any aRet; Any aRet;
switch( mrDrawViewShell.GetPageKind() ) switch( mrDrawViewShell.GetPageKind() )
{ {
case PK_NOTES: aRet <<= DrawViewMode_NOTES; break; case PageKind::Notes: aRet <<= DrawViewMode_NOTES; break;
case PK_HANDOUT: aRet <<= DrawViewMode_HANDOUT; break; case PageKind::Handout: aRet <<= DrawViewMode_HANDOUT; break;
case PK_STANDARD: aRet <<= DrawViewMode_DRAW; break; case PageKind::Standard: aRet <<= DrawViewMode_DRAW; break;
} }
return aRet; return aRet;
} }

View File

@ -455,7 +455,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate ) SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
throw (css::uno::RuntimeException, std::exception) throw (css::uno::RuntimeException, std::exception)
{ {
sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PageKind::Standard );
SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false); sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false);
sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false); sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false);
@ -474,7 +474,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
else else
{ {
// here we determine the page after which we should insert // here we determine the page after which we should insert
SdPage* pPreviousStandardPage = mpDoc->GetSdPage( std::min( (sal_uInt16)(nPageCount - 1), nPage ), PK_STANDARD ); SdPage* pPreviousStandardPage = mpDoc->GetSdPage( std::min( (sal_uInt16)(nPageCount - 1), nPage ), PageKind::Standard );
SetOfByte aVisibleLayers = pPreviousStandardPage->TRG_GetMasterPageVisibleLayers(); SetOfByte aVisibleLayers = pPreviousStandardPage->TRG_GetMasterPageVisibleLayers();
bool bIsPageBack = aVisibleLayers.IsSet( aBckgrnd ); bool bIsPageBack = aVisibleLayers.IsSet( aBckgrnd );
bool bIsPageObj = aVisibleLayers.IsSet( aBckgrndObj ); bool bIsPageObj = aVisibleLayers.IsSet( aBckgrndObj );
@ -542,7 +542,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
pPreviousNotesPage->GetLwrBorder() ); pPreviousNotesPage->GetLwrBorder() );
pNotesPage->SetOrientation( pPreviousNotesPage->GetOrientation() ); pNotesPage->SetOrientation( pPreviousNotesPage->GetOrientation() );
pNotesPage->SetName(aNotesPageName); pNotesPage->SetName(aNotesPageName);
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
// insert page after current page // insert page after current page
mpDoc->InsertPage(pNotesPage, nNotesPageNum); mpDoc->InsertPage(pNotesPage, nNotesPageNum);
@ -804,7 +804,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::getHandoutMast
if( mpDoc ) if( mpDoc )
{ {
initializeDocument(); initializeDocument();
SdPage* pPage = mpDoc->GetMasterSdPage( 0, PK_HANDOUT ); SdPage* pPage = mpDoc->GetMasterSdPage( 0, PageKind::Handout );
if( pPage ) if( pPage )
xPage.set( pPage->getUnoPage(), uno::UNO_QUERY ); xPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
} }
@ -1482,7 +1482,7 @@ sal_Int32 SAL_CALL SdXImpressDocument::getRendererCount( const uno::Any& rSelect
rSelection >>= xModel; rSelection >>= xModel;
if( xModel == mpDocShell->GetModel() ) if( xModel == mpDocShell->GetModel() )
nRet = mpDoc->GetSdPageCount( PK_STANDARD ); nRet = mpDoc->GetSdPageCount( PageKind::Standard );
else else
{ {
uno::Reference< drawing::XShapes > xShapes; uno::Reference< drawing::XShapes > xShapes;
@ -1517,7 +1517,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer(
awt::Size aPageSize; awt::Size aPageSize;
if ( bExportNotesPages ) if ( bExportNotesPages )
{ {
Size aNotesPageSize = mpDoc->GetSdPage( 0, PK_NOTES )->GetSize(); Size aNotesPageSize = mpDoc->GetSdPage( 0, PageKind::Notes )->GetSize();
aPageSize = awt::Size( aNotesPageSize.Width(), aNotesPageSize.Height() ); aPageSize = awt::Size( aNotesPageSize.Width(), aNotesPageSize.Height() );
} }
else else
@ -1652,7 +1652,7 @@ void ImplPDFExportShapeInteraction( const uno::Reference< drawing::XShape >& xSh
uno::Reference< beans::XPropertySet > xShapePropSet( xShape, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xShapePropSet( xShape, uno::UNO_QUERY );
if( xShapePropSet.is() ) if( xShapePropSet.is() )
{ {
Size aPageSize( rDoc.GetSdPage( 0, PK_STANDARD )->GetSize() ); Size aPageSize( rDoc.GetSdPage( 0, PageKind::Standard )->GetSize() );
Point aPoint( 0, 0 ); Point aPoint( 0, 0 );
Rectangle aPageRect( aPoint, aPageSize ); Rectangle aPageRect( aPoint, aPageSize );
@ -1668,7 +1668,7 @@ void ImplPDFExportShapeInteraction( const uno::Reference< drawing::XShape >& xSh
{ {
case presentation::ClickAction_LASTPAGE : case presentation::ClickAction_LASTPAGE :
{ {
sal_Int32 nCount = rDoc.GetSdPageCount( PK_STANDARD ); sal_Int32 nCount = rDoc.GetSdPageCount( PageKind::Standard );
sal_Int32 nDestId = rPDFExtOutDevData.CreateDest( aPageRect, nCount - 1, vcl::PDFWriter::FitRectangle ); sal_Int32 nDestId = rPDFExtOutDevData.CreateDest( aPageRect, nCount - 1, vcl::PDFWriter::FitRectangle );
sal_Int32 nLinkId = rPDFExtOutDevData.CreateLink( aLinkRect ); sal_Int32 nLinkId = rPDFExtOutDevData.CreateLink( aLinkRect );
rPDFExtOutDevData.SetLinkDest( nLinkId, nDestId ); rPDFExtOutDevData.SetLinkDest( nLinkId, nDestId );
@ -1694,7 +1694,7 @@ void ImplPDFExportShapeInteraction( const uno::Reference< drawing::XShape >& xSh
case presentation::ClickAction_NEXTPAGE : case presentation::ClickAction_NEXTPAGE :
{ {
sal_Int32 nDestPage = rPDFExtOutDevData.GetCurrentPageNumber() + 1; sal_Int32 nDestPage = rPDFExtOutDevData.GetCurrentPageNumber() + 1;
sal_Int32 nLastPage = rDoc.GetSdPageCount( PK_STANDARD ) - 1; sal_Int32 nLastPage = rDoc.GetSdPageCount( PageKind::Standard ) - 1;
if ( nDestPage > nLastPage ) if ( nDestPage > nLastPage )
nDestPage = nLastPage; nDestPage = nLastPage;
sal_Int32 nDestId = rPDFExtOutDevData.CreateDest( aPageRect, nDestPage, vcl::PDFWriter::FitRectangle ); sal_Int32 nDestId = rPDFExtOutDevData.CreateDest( aPageRect, nDestPage, vcl::PDFWriter::FitRectangle );
@ -1862,7 +1862,7 @@ namespace
sal_Int16 nRet = 0; sal_Int16 nRet = 0;
for (sal_Int16 i = 0; i < nPageNumber-1; ++i) for (sal_Int16 i = 0; i < nPageNumber-1; ++i)
{ {
if (!(pDoc->GetSdPage(i, PK_STANDARD))->IsExcluded()) if (!(pDoc->GetSdPage(i, PageKind::Standard))->IsExcluded())
++nRet; ++nRet;
} }
return nRet; return nRet;
@ -1882,7 +1882,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
{ {
uno::Reference< awt::XDevice > xRenderDevice; uno::Reference< awt::XDevice > xRenderDevice;
const sal_Int32 nPageNumber = nRenderer + 1; const sal_Int32 nPageNumber = nRenderer + 1;
PageKind ePageKind = PK_STANDARD; PageKind ePageKind = PageKind::Standard;
bool bExportNotesPages = false; bool bExportNotesPages = false;
for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty ) for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty )
@ -1893,7 +1893,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
{ {
rxOptions[ nProperty].Value >>= bExportNotesPages; rxOptions[ nProperty].Value >>= bExportNotesPages;
if ( bExportNotesPages ) if ( bExportNotesPages )
ePageKind = PK_NOTES; ePageKind = PageKind::Notes;
} }
} }
@ -1906,7 +1906,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
{ {
vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() ); vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() );
if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) || if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PageKind::Standard))->IsExcluded() ) ||
(pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) ) (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) )
{ {
::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut ); ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut );
@ -2125,7 +2125,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
} }
} }
Size aPageSize( mpDoc->GetSdPage( 0, PK_STANDARD )->GetSize() ); Size aPageSize( mpDoc->GetSdPage( 0, PageKind::Standard )->GetSize() );
Point aPoint( 0, 0 ); Point aPoint( 0, 0 );
Rectangle aPageRect( aPoint, aPageSize ); Rectangle aPageRect( aPoint, aPageSize );
@ -2150,7 +2150,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
rBookmarks.clear(); rBookmarks.clear();
//---> #i56629, #i40318 //---> #i56629, #i40318
//get the page name, will be used as outline element in PDF bookmark pane //get the page name, will be used as outline element in PDF bookmark pane
OUString aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName(); OUString aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PageKind::Standard )->GetName();
if( !aPageName.isEmpty() ) if( !aPageName.isEmpty() )
{ {
// Destination PageNum // Destination PageNum
@ -2298,7 +2298,7 @@ int SdXImpressDocument::getParts()
{ {
// TODO: master pages? // TODO: master pages?
// Read: drviews1.cxx // Read: drviews1.cxx
return mpDoc->GetSdPageCount(PK_STANDARD); return mpDoc->GetSdPageCount(PageKind::Standard);
} }
int SdXImpressDocument::getPart() int SdXImpressDocument::getPart()
@ -2312,7 +2312,7 @@ int SdXImpressDocument::getPart()
OUString SdXImpressDocument::getPartName( int nPart ) OUString SdXImpressDocument::getPartName( int nPart )
{ {
SdPage* pPage = mpDoc->GetSdPage( nPart, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( nPart, PageKind::Standard );
if (!pPage) if (!pPage)
{ {
SAL_WARN("sd", "DrawViewShell not available!"); SAL_WARN("sd", "DrawViewShell not available!");
@ -2324,7 +2324,7 @@ OUString SdXImpressDocument::getPartName( int nPart )
OUString SdXImpressDocument::getPartHash( int nPart ) OUString SdXImpressDocument::getPartHash( int nPart )
{ {
SdPage* pPage = mpDoc->GetSdPage( nPart, PK_STANDARD ); SdPage* pPage = mpDoc->GetSdPage( nPart, PageKind::Standard );
if (!pPage) if (!pPage)
{ {
SAL_WARN("sd", "DrawViewShell not available!"); SAL_WARN("sd", "DrawViewShell not available!");
@ -2340,13 +2340,13 @@ void SdXImpressDocument::setPartMode( int nPartMode )
if (!pViewSh) if (!pViewSh)
return; return;
PageKind aPageKind( PK_STANDARD ); PageKind aPageKind( PageKind::Standard );
switch ( nPartMode ) switch ( nPartMode )
{ {
case LOK_PARTMODE_SLIDES: case LOK_PARTMODE_SLIDES:
break; break;
case LOK_PARTMODE_NOTES: case LOK_PARTMODE_NOTES:
aPageKind = PK_NOTES; aPageKind = PageKind::Notes;
break; break;
} }
pViewSh->SetPageKind( aPageKind ); pViewSh->SetPageKind( aPageKind );
@ -2748,7 +2748,7 @@ sal_Int32 SAL_CALL SdDrawPagesAccess::getCount()
if( nullptr == mpModel ) if( nullptr == mpModel )
throw lang::DisposedException(); throw lang::DisposedException();
return mpModel->mpDoc->GetSdPageCount( PK_STANDARD ); return mpModel->mpDoc->GetSdPageCount( PageKind::Standard );
} }
uno::Any SAL_CALL SdDrawPagesAccess::getByIndex( sal_Int32 Index ) uno::Any SAL_CALL SdDrawPagesAccess::getByIndex( sal_Int32 Index )
@ -2761,10 +2761,10 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByIndex( sal_Int32 Index )
uno::Any aAny; uno::Any aAny;
if( (Index < 0) || (Index >= mpModel->mpDoc->GetSdPageCount( PK_STANDARD ) ) ) if( (Index < 0) || (Index >= mpModel->mpDoc->GetSdPageCount( PageKind::Standard ) ) )
throw lang::IndexOutOfBoundsException(); throw lang::IndexOutOfBoundsException();
SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)Index, PK_STANDARD ); SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)Index, PageKind::Standard );
if( pPage ) if( pPage )
{ {
uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY ); uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY );
@ -2784,11 +2784,11 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByName( const OUString& aName ) throw(co
if( !aName.isEmpty() ) if( !aName.isEmpty() )
{ {
const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PK_STANDARD ); const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PageKind::Standard );
sal_uInt16 nPage; sal_uInt16 nPage;
for( nPage = 0; nPage < nCount; nPage++ ) for( nPage = 0; nPage < nCount; nPage++ )
{ {
SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PK_STANDARD ); SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PageKind::Standard );
if(nullptr == pPage) if(nullptr == pPage)
continue; continue;
@ -2812,14 +2812,14 @@ uno::Sequence< OUString > SAL_CALL SdDrawPagesAccess::getElementNames() throw(un
if( nullptr == mpModel ) if( nullptr == mpModel )
throw lang::DisposedException(); throw lang::DisposedException();
const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PK_STANDARD ); const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PageKind::Standard );
uno::Sequence< OUString > aNames( nCount ); uno::Sequence< OUString > aNames( nCount );
OUString* pNames = aNames.getArray(); OUString* pNames = aNames.getArray();
sal_uInt16 nPage; sal_uInt16 nPage;
for( nPage = 0; nPage < nCount; nPage++ ) for( nPage = 0; nPage < nCount; nPage++ )
{ {
SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PK_STANDARD ); SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PageKind::Standard );
*pNames++ = SdDrawPage::getPageApiName( pPage ); *pNames++ = SdDrawPage::getPageApiName( pPage );
} }
@ -2833,11 +2833,11 @@ sal_Bool SAL_CALL SdDrawPagesAccess::hasByName( const OUString& aName ) throw(un
if( nullptr == mpModel ) if( nullptr == mpModel )
throw lang::DisposedException(); throw lang::DisposedException();
const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PK_STANDARD ); const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PageKind::Standard );
sal_uInt16 nPage; sal_uInt16 nPage;
for( nPage = 0; nPage < nCount; nPage++ ) for( nPage = 0; nPage < nCount; nPage++ )
{ {
SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PK_STANDARD ); SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PageKind::Standard );
if(nullptr == pPage) if(nullptr == pPage)
continue; continue;
@ -2903,7 +2903,7 @@ void SAL_CALL SdDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPag
SdDrawDocument& rDoc = *mpModel->mpDoc; SdDrawDocument& rDoc = *mpModel->mpDoc;
sal_uInt16 nPageCount = rDoc.GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = rDoc.GetSdPageCount( PageKind::Standard );
if( nPageCount > 1 ) if( nPageCount > 1 )
{ {
// get pPage from xPage and determine the Id (nPos ) afterwards // get pPage from xPage and determine the Id (nPos ) afterwards
@ -2911,7 +2911,7 @@ void SAL_CALL SdDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPag
if( pSvxPage ) if( pSvxPage )
{ {
SdPage* pPage = static_cast<SdPage*>(pSvxPage->GetSdrPage()); SdPage* pPage = static_cast<SdPage*>(pSvxPage->GetSdrPage());
if(pPage && ( pPage->GetPageKind() == PK_STANDARD ) ) if(pPage && ( pPage->GetPageKind() == PageKind::Standard ) )
{ {
sal_uInt16 nPage = pPage->GetPageNum(); sal_uInt16 nPage = pPage->GetPageNum();
@ -3018,7 +3018,7 @@ sal_Int32 SAL_CALL SdMasterPagesAccess::getCount()
if( nullptr == mpModel->mpDoc ) if( nullptr == mpModel->mpDoc )
throw lang::DisposedException(); throw lang::DisposedException();
return mpModel->mpDoc->GetMasterSdPageCount(PK_STANDARD); return mpModel->mpDoc->GetMasterSdPageCount(PageKind::Standard);
} }
/** /**
@ -3035,10 +3035,10 @@ uno::Any SAL_CALL SdMasterPagesAccess::getByIndex( sal_Int32 Index )
uno::Any aAny; uno::Any aAny;
if( (Index < 0) || (Index >= mpModel->mpDoc->GetMasterSdPageCount( PK_STANDARD ) ) ) if( (Index < 0) || (Index >= mpModel->mpDoc->GetMasterSdPageCount( PageKind::Standard ) ) )
throw lang::IndexOutOfBoundsException(); throw lang::IndexOutOfBoundsException();
SdPage* pPage = mpModel->mpDoc->GetMasterSdPage( (sal_uInt16)Index, PK_STANDARD ); SdPage* pPage = mpModel->mpDoc->GetMasterSdPage( (sal_uInt16)Index, PageKind::Standard );
if( pPage ) if( pPage )
{ {
uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY ); uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY );
@ -3116,8 +3116,8 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
static_cast<SdStyleSheetPool*>(pDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix ); static_cast<SdStyleSheetPool*>(pDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix );
// get the first page for initial size and border settings // get the first page for initial size and border settings
SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PK_STANDARD ); SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PageKind::Standard );
SdPage* pRefNotesPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PK_NOTES); SdPage* pRefNotesPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PageKind::Notes);
// create and insert new draw masterpage // create and insert new draw masterpage
SdPage* pMPage = mpModel->mpDoc->AllocSdPage(true); SdPage* pMPage = mpModel->mpDoc->AllocSdPage(true);
@ -3139,7 +3139,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
// create and insert new notes masterpage // create and insert new notes masterpage
SdPage* pMNotesPage = mpModel->mpDoc->AllocSdPage(true); SdPage* pMNotesPage = mpModel->mpDoc->AllocSdPage(true);
pMNotesPage->SetSize( pRefNotesPage->GetSize() ); pMNotesPage->SetSize( pRefNotesPage->GetSize() );
pMNotesPage->SetPageKind(PK_NOTES); pMNotesPage->SetPageKind(PageKind::Notes);
pMNotesPage->SetBorder( pRefNotesPage->GetLftBorder(), pMNotesPage->SetBorder( pRefNotesPage->GetLftBorder(),
pRefNotesPage->GetUppBorder(), pRefNotesPage->GetUppBorder(),
pRefNotesPage->GetRgtBorder(), pRefNotesPage->GetRgtBorder(),
@ -3180,7 +3180,7 @@ void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< drawing::XDrawP
return; //Todo: this should be excepted return; //Todo: this should be excepted
// only standard pages can be removed directly // only standard pages can be removed directly
if( pPage->GetPageKind() == PK_STANDARD ) if( pPage->GetPageKind() == PageKind::Standard )
{ {
sal_uInt16 nPage = pPage->GetPageNum(); sal_uInt16 nPage = pPage->GetPageNum();
@ -3299,8 +3299,8 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames()
if( pDoc->GetDocumentType() == DocumentType::Draw ) if( pDoc->GetDocumentType() == DocumentType::Draw )
{ {
const sal_uInt16 nMaxPages = pDoc->GetSdPageCount( PK_STANDARD ); const sal_uInt16 nMaxPages = pDoc->GetSdPageCount( PageKind::Standard );
const sal_uInt16 nMaxMasterPages = pDoc->GetMasterSdPageCount( PK_STANDARD ); const sal_uInt16 nMaxMasterPages = pDoc->GetMasterSdPageCount( PageKind::Standard );
uno::Sequence< OUString > aSeq( nMaxPages + nMaxMasterPages ); uno::Sequence< OUString > aSeq( nMaxPages + nMaxMasterPages );
OUString* pStr = aSeq.getArray(); OUString* pStr = aSeq.getArray();
@ -3308,11 +3308,11 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames()
sal_uInt16 nPage; sal_uInt16 nPage;
// standard pages // standard pages
for( nPage = 0; nPage < nMaxPages; nPage++ ) for( nPage = 0; nPage < nMaxPages; nPage++ )
*pStr++ = pDoc->GetSdPage( nPage, PK_STANDARD )->GetName(); *pStr++ = pDoc->GetSdPage( nPage, PageKind::Standard )->GetName();
// master pages // master pages
for( nPage = 0; nPage < nMaxMasterPages; nPage++ ) for( nPage = 0; nPage < nMaxMasterPages; nPage++ )
*pStr++ = pDoc->GetMasterSdPage( nPage, PK_STANDARD )->GetName(); *pStr++ = pDoc->GetMasterSdPage( nPage, PageKind::Standard )->GetName();
return aSeq; return aSeq;
} }
else else
@ -3382,7 +3382,7 @@ SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exc
for( nPage = 0; nPage < nMaxPages; nPage++ ) for( nPage = 0; nPage < nMaxPages; nPage++ )
{ {
pPage = static_cast<SdPage*>(pDoc->GetPage( nPage )); pPage = static_cast<SdPage*>(pDoc->GetPage( nPage ));
if( (pPage->GetName() == rName) && (!bDraw || (pPage->GetPageKind() == PK_STANDARD)) ) if( (pPage->GetName() == rName) && (!bDraw || (pPage->GetPageKind() == PageKind::Standard)) )
return pPage; return pPage;
} }
@ -3390,7 +3390,7 @@ SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exc
for( nPage = 0; nPage < nMaxMasterPages; nPage++ ) for( nPage = 0; nPage < nMaxMasterPages; nPage++ )
{ {
pPage = static_cast<SdPage*>(pDoc->GetMasterPage( nPage )); pPage = static_cast<SdPage*>(pDoc->GetMasterPage( nPage ));
if( (pPage->GetName() == rName) && (!bDraw || (pPage->GetPageKind() == PK_STANDARD)) ) if( (pPage->GetName() == rName) && (!bDraw || (pPage->GetPageKind() == PageKind::Standard)) )
return pPage; return pPage;
} }

View File

@ -179,7 +179,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
static const SfxItemPropertyMapEntry aDrawPageNotesHandoutPropertyMap_Impl[] = static const SfxItemPropertyMapEntry aDrawPageNotesHandoutPropertyMap_Impl[] =
{ {
// this must be the first two entries so they can be excluded for PK_STANDARD // this must be the first two entries so they can be excluded for PageKind::Standard
{ OUString(UNO_NAME_PAGE_BACKGROUND), WID_PAGE_BACK, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::MAYBEVOID,0}, { OUString(UNO_NAME_PAGE_BACKGROUND), WID_PAGE_BACK, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::MAYBEVOID,0},
DRAW_PAGE_NOTES_PROPERTIES DRAW_PAGE_NOTES_PROPERTIES
}; };
@ -218,13 +218,13 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
GRAPHIC_PAGE_PROPERTIES GRAPHIC_PAGE_PROPERTIES
}; };
bool bWithoutBackground = ePageKind != PK_STANDARD && ePageKind != PK_HANDOUT; bool bWithoutBackground = ePageKind != PageKind::Standard && ePageKind != PageKind::Handout;
const SvxItemPropertySet* pRet = nullptr; const SvxItemPropertySet* pRet = nullptr;
if( bImpress ) if( bImpress )
{ {
if( ePageKind == PK_STANDARD ) if( ePageKind == PageKind::Standard )
{ {
//PK_STANDARD always has a background property //PageKind::Standard always has a background property
static SvxItemPropertySet aDrawPagePropertySet_Impl( aDrawPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); static SvxItemPropertySet aDrawPagePropertySet_Impl( aDrawPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
pRet = &aDrawPagePropertySet_Impl; pRet = &aDrawPagePropertySet_Impl;
} }
@ -306,7 +306,7 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind )
}; };
const SvxItemPropertySet* pRet = nullptr; const SvxItemPropertySet* pRet = nullptr;
if( ePageKind == PK_HANDOUT ) if( ePageKind == PageKind::Handout )
{ {
static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
pRet = &aHandoutMasterPagePropertySet_Impl; pRet = &aHandoutMasterPagePropertySet_Impl;
@ -475,7 +475,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
} }
else if( aType == "PageShape" ) else if( aType == "PageShape" )
{ {
if( GetPage()->GetPageKind() == PK_NOTES && GetPage()->IsMasterPage() ) if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
eObjKind = PRESOBJ_TITLE; eObjKind = PRESOBJ_TITLE;
else else
eObjKind = PRESOBJ_PAGE; eObjKind = PRESOBJ_PAGE;
@ -584,9 +584,9 @@ Any SAL_CALL SdGenericDrawPage::queryInterface( const uno::Type & rType )
} }
else if (IsImpressDocument() && rType == cppu::UnoType<XAnimationNodeSupplier>::get()) else if (IsImpressDocument() && rType == cppu::UnoType<XAnimationNodeSupplier>::get())
{ {
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD; const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
if( ePageKind == PK_STANDARD ) if( ePageKind == PageKind::Standard )
return makeAny( Reference< XAnimationNodeSupplier >( this ) ); return makeAny( Reference< XAnimationNodeSupplier >( this ) );
} }
else else
@ -946,7 +946,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
} }
case WID_PAGE_NUMBER: case WID_PAGE_NUMBER:
if( (GetPage()->GetPageKind() == PK_HANDOUT) && !GetPage()->IsMasterPage() ) if( (GetPage()->GetPageKind() == PageKind::Handout) && !GetPage()->IsMasterPage() )
{ {
if( !(aValue >>= mnTempPageNumber) ) if( !(aValue >>= mnTempPageNumber) )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
@ -1121,11 +1121,11 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
if ( pDocShell ) if ( pDocShell )
{ {
sal_uInt16 nPgNum = 0; sal_uInt16 nPgNum = 0;
sal_uInt16 nPageCount = pDoc->GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = pDoc->GetSdPageCount( PageKind::Standard );
sal_uInt16 nPageNumber = (sal_uInt16)( ( GetPage()->GetPageNum() - 1 ) >> 1 ); sal_uInt16 nPageNumber = (sal_uInt16)( ( GetPage()->GetPageNum() - 1 ) >> 1 );
while( nPgNum < nPageCount ) while( nPgNum < nPageCount )
{ {
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PK_STANDARD ), nPgNum == nPageNumber ); pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
nPgNum++; nPgNum++;
} }
std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile(); std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
@ -1162,11 +1162,11 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
if ( pDocShell ) if ( pDocShell )
{ {
sal_uInt16 nPgNum = 0; sal_uInt16 nPgNum = 0;
sal_uInt16 nPageCount = pDoc->GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = pDoc->GetSdPageCount( PageKind::Standard );
sal_uInt16 nPageNumber = (sal_uInt16)( ( GetPage()->GetPageNum() - 1 ) >> 1 ); sal_uInt16 nPageNumber = (sal_uInt16)( ( GetPage()->GetPageNum() - 1 ) >> 1 );
while( nPgNum < nPageCount ) while( nPgNum < nPageCount )
{ {
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PK_STANDARD ), nPgNum == nPageNumber ); pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
nPgNum++; nPgNum++;
} }
std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile(); std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
@ -1417,7 +1417,7 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co
{ {
case OBJ_TITLETEXT: case OBJ_TITLETEXT:
pShape = new SvxShapeText( pObj ); pShape = new SvxShapeText( pObj );
if( GetPage()->GetPageKind() == PK_NOTES && GetPage()->IsMasterPage() ) if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
{ {
// fake a empty PageShape if it's a title shape on the master page // fake a empty PageShape if it's a title shape on the master page
pShape->SetShapeType("com.sun.star.presentation.PageShape"); pShape->SetShapeType("com.sun.star.presentation.PageShape");
@ -2084,7 +2084,7 @@ Any SAL_CALL SdDrawPage::queryInterface( const uno::Type & rType )
&& rType == cppu::UnoType<presentation::XPresentationPage>::get() ) && rType == cppu::UnoType<presentation::XPresentationPage>::get() )
{ {
SdPage * p = dynamic_cast<SdPage *>(SvxDrawPage::mpPage); SdPage * p = dynamic_cast<SdPage *>(SvxDrawPage::mpPage);
if( p == nullptr || p->GetPageKind() != PK_HANDOUT ) if( p == nullptr || p->GetPageKind() != PageKind::Handout )
{ {
return makeAny( Reference< presentation::XPresentationPage >( this ) ); return makeAny( Reference< presentation::XPresentationPage >( this ) );
} }
@ -2114,8 +2114,8 @@ Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes() throw(uno::RuntimeExceptio
if( maTypeSequence.getLength() == 0 ) if( maTypeSequence.getLength() == 0 )
{ {
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD; const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
bool bPresPage = IsImpressDocument() && ePageKind != PK_HANDOUT; bool bPresPage = IsImpressDocument() && ePageKind != PageKind::Handout;
// Collect the types of this class. // Collect the types of this class.
::std::vector<uno::Type> aTypes; ::std::vector<uno::Type> aTypes;
@ -2133,7 +2133,7 @@ Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes() throw(uno::RuntimeExceptio
aTypes.push_back(cppu::UnoType<beans::XMultiPropertySet>::get()); aTypes.push_back(cppu::UnoType<beans::XMultiPropertySet>::get());
if( bPresPage ) if( bPresPage )
aTypes.push_back(cppu::UnoType<presentation::XPresentationPage>::get()); aTypes.push_back(cppu::UnoType<presentation::XPresentationPage>::get());
if( bPresPage && ePageKind == PK_STANDARD ) if( bPresPage && ePageKind == PageKind::Standard )
aTypes.push_back(cppu::UnoType<XAnimationNodeSupplier>::get()); aTypes.push_back(cppu::UnoType<XAnimationNodeSupplier>::get());
// Get types of base class. // Get types of base class.
@ -2291,7 +2291,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
OUString aName( rName ); OUString aName( rName );
if(GetPage() && GetPage()->GetPageKind() != PK_NOTES) if(GetPage() && GetPage()->GetPageKind() != PageKind::Notes)
{ {
// check if this is the default 'page1234' name // check if this is the default 'page1234' name
if(aName.startsWith( sEmptyPageName )) if(aName.startsWith( sEmptyPageName ))
@ -2330,9 +2330,9 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
GetPage()->SetName( aName ); GetPage()->SetName( aName );
sal_uInt16 nNotesPageNum = (GetPage()->GetPageNum()-1)>>1; sal_uInt16 nNotesPageNum = (GetPage()->GetPageNum()-1)>>1;
if( GetModel()->GetDoc()->GetSdPageCount( PK_NOTES ) > nNotesPageNum ) if( GetModel()->GetDoc()->GetSdPageCount( PageKind::Notes ) > nNotesPageNum )
{ {
SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( nNotesPageNum, PK_NOTES ); SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( nNotesPageNum, PageKind::Notes );
if( pNotesPage ) if( pNotesPage )
pNotesPage->SetName(aName); pNotesPage->SetName(aName);
} }
@ -2418,7 +2418,7 @@ void SAL_CALL SdDrawPage::setMasterPage( const Reference< drawing::XDrawPage >&
static_cast<SdPage*>(SvxFmDrawPage::mpPage)->SetLayoutName( pSdPage->GetLayoutName() ); static_cast<SdPage*>(SvxFmDrawPage::mpPage)->SetLayoutName( pSdPage->GetLayoutName() );
// set notes master also // set notes master also
SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PK_NOTES ); SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PageKind::Notes );
pNotesPage->TRG_ClearMasterPage(); pNotesPage->TRG_ClearMasterPage();
sal_uInt16 nNum = (SvxFmDrawPage::mpPage->TRG_GetMasterPage()).GetPageNum() + 1; sal_uInt16 nNum = (SvxFmDrawPage::mpPage->TRG_GetMasterPage()).GetPageNum() + 1;
@ -2441,7 +2441,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getNotesPage()
if(SvxFmDrawPage::mpPage && GetModel()->GetDoc() && SvxFmDrawPage::mpPage->GetPageNum() ) if(SvxFmDrawPage::mpPage && GetModel()->GetDoc() && SvxFmDrawPage::mpPage->GetPageNum() )
{ {
SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PK_NOTES ); SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PageKind::Notes );
if( pNotesPage ) if( pNotesPage )
{ {
Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY ); Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY );
@ -2703,7 +2703,7 @@ Any SdGenericDrawPage::getNavigationOrder()
// class SdMasterPage // class SdMasterPage
SdMasterPage::SdMasterPage( SdXImpressDocument* pModel, SdPage* pPage ) throw() SdMasterPage::SdMasterPage( SdXImpressDocument* pModel, SdPage* pPage ) throw()
: SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertySet( pPage ? pPage->GetPageKind() : PK_STANDARD ) ) : SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertySet( pPage ? pPage->GetPageKind() : PageKind::Standard ) )
{ {
} }
@ -2729,7 +2729,7 @@ Any SAL_CALL SdMasterPage::queryInterface( const uno::Type & rType )
aAny <<= Reference< container::XNamed >(this); aAny <<= Reference< container::XNamed >(this);
else if( rType == cppu::UnoType<presentation::XPresentationPage>::get() && else if( rType == cppu::UnoType<presentation::XPresentationPage>::get() &&
( IsImpressDocument() && ( IsImpressDocument() &&
GetPage() && GetPage()->GetPageKind() != PK_HANDOUT) ) GetPage() && GetPage()->GetPageKind() != PageKind::Handout) )
aAny <<= Reference< presentation::XPresentationPage >( this ); aAny <<= Reference< presentation::XPresentationPage >( this );
else else
return SdGenericDrawPage::queryInterface( rType ); return SdGenericDrawPage::queryInterface( rType );
@ -2758,8 +2758,8 @@ Sequence< uno::Type > SAL_CALL SdMasterPage::getTypes() throw(uno::RuntimeExcept
if( maTypeSequence.getLength() == 0 ) if( maTypeSequence.getLength() == 0 )
{ {
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD; const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
bool bPresPage = IsImpressDocument() && SvxFmDrawPage::mpPage && ePageKind != PK_HANDOUT; bool bPresPage = IsImpressDocument() && SvxFmDrawPage::mpPage && ePageKind != PageKind::Handout;
// Collect the types of this class. // Collect the types of this class.
::std::vector<uno::Type> aTypes; ::std::vector<uno::Type> aTypes;
@ -2776,7 +2776,7 @@ Sequence< uno::Type > SAL_CALL SdMasterPage::getTypes() throw(uno::RuntimeExcept
aTypes.push_back(cppu::UnoType<beans::XMultiPropertySet>::get()); aTypes.push_back(cppu::UnoType<beans::XMultiPropertySet>::get());
if( bPresPage ) if( bPresPage )
aTypes.push_back(cppu::UnoType<presentation::XPresentationPage>::get()); aTypes.push_back(cppu::UnoType<presentation::XPresentationPage>::get());
if( bPresPage && ePageKind == PK_STANDARD ) if( bPresPage && ePageKind == PageKind::Standard )
aTypes.push_back(cppu::UnoType<XAnimationNodeSupplier>::get()); aTypes.push_back(cppu::UnoType<XAnimationNodeSupplier>::get());
// Get types of base class. // Get types of base class.
@ -2817,7 +2817,7 @@ Sequence< OUString > SAL_CALL SdMasterPage::getSupportedServiceNames() throw(uno
Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() ); Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() );
comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.MasterPage"} ); comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.MasterPage"} );
if( SvxFmDrawPage::mpPage && static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetPageKind() == PK_HANDOUT ) if( SvxFmDrawPage::mpPage && static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetPageKind() == PageKind::Handout )
comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.HandoutMasterPage"} ); comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.HandoutMasterPage"} );
return aSeq; return aSeq;
@ -3040,7 +3040,7 @@ void SAL_CALL SdMasterPage::setName( const OUString& rName )
throwIfDisposed(); throwIfDisposed();
if(SvxFmDrawPage::mpPage && GetPage()->GetPageKind() != PK_NOTES) if(SvxFmDrawPage::mpPage && GetPage()->GetPageKind() != PageKind::Notes)
{ {
SdDrawDocument* pDoc = GetModel()->GetDoc(); SdDrawDocument* pDoc = GetModel()->GetDoc();
bool bOutDummy; bool bOutDummy;
@ -3102,7 +3102,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdMasterPage::getNotesPage()
if(SvxFmDrawPage::mpPage && GetModel()->GetDoc() ) if(SvxFmDrawPage::mpPage && GetModel()->GetDoc() )
{ {
SdPage* pNotesPage = GetModel()->GetDoc()->GetMasterSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PK_NOTES ); SdPage* pNotesPage = GetModel()->GetDoc()->GetMasterSdPage( (SvxFmDrawPage::mpPage->GetPageNum()-1)>>1, PageKind::Notes );
if( pNotesPage ) if( pNotesPage )
{ {
Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY ); Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY );

View File

@ -943,7 +943,7 @@ namespace {
const DrawModeFlags nDrawMode, const DrawModeFlags nDrawMode,
const Orientation eOrientation, const Orientation eOrientation,
const sal_uInt16 nPaperTray) const sal_uInt16 nPaperTray)
: PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString, : PrinterPage(PageKind::Handout, rMapMode, false, rsPageString,
rPageStringOffset, nDrawMode, eOrientation, nPaperTray), rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
mnHandoutPageIndex(nHandoutPageIndex), mnHandoutPageIndex(nHandoutPageIndex),
maPageIndices(rPageIndices) maPageIndices(rPageIndices)
@ -959,7 +959,7 @@ namespace {
const SetOfByte& rVisibleLayers, const SetOfByte& rVisibleLayers,
const SetOfByte& rPrintableLayers) const override const SetOfByte& rPrintableLayers) const override
{ {
SdPage& rHandoutPage (*rDocument.GetSdPage(0, PK_HANDOUT)); SdPage& rHandoutPage (*rDocument.GetSdPage(0, PageKind::Handout));
Reference< css::beans::XPropertySet > xHandoutPage( rHandoutPage.getUnoPage(), UNO_QUERY ); Reference< css::beans::XPropertySet > xHandoutPage( rHandoutPage.getUnoPage(), UNO_QUERY );
const OUString sPageNumber( "Number" ); const OUString sPageNumber( "Number" );
@ -985,11 +985,11 @@ namespace {
++iPageIndex) ++iPageIndex)
{ {
// Check if the page still exists. // Check if the page still exists.
if (*iPageIndex >= rDocument.GetSdPageCount(PK_STANDARD)) if (*iPageIndex >= rDocument.GetSdPageCount(PageKind::Standard))
continue; continue;
SdrPageObj* pPageObj = (*aPageObjIter++); SdrPageObj* pPageObj = (*aPageObjIter++);
pPageObj->SetReferencedPage(rDocument.GetSdPage(*iPageIndex, PK_STANDARD)); pPageObj->SetReferencedPage(rDocument.GetSdPage(*iPageIndex, PageKind::Standard));
} }
// if there are more page objects than pages left, set the rest to invisible // if there are more page objects than pages left, set the rest to invisible
@ -1085,7 +1085,7 @@ namespace {
const DrawModeFlags nDrawMode, const DrawModeFlags nDrawMode,
const Orientation eOrientation, const Orientation eOrientation,
const sal_uInt16 nPaperTray) const sal_uInt16 nPaperTray)
: PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString, : PrinterPage(PageKind::Handout, rMapMode, false, rsPageString,
rPageStringOffset, nDrawMode, eOrientation, nPaperTray), rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
mpParaObject(pParaObject) mpParaObject(pParaObject)
{ {
@ -1460,7 +1460,7 @@ private:
// Draw and Notes should usually use specified paper size when printing // Draw and Notes should usually use specified paper size when printing
if (!mpOptions->IsPrinterPreferred(mrBase.GetDocShell()->GetDocumentType())) if (!mpOptions->IsPrinterPreferred(mrBase.GetDocShell()->GetDocumentType()))
{ {
aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD)->GetSize(); aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PageKind::Standard)->GetSize();
maPrintSize = awt::Size(aInfo.maPrintSize.Width(), maPrintSize = awt::Size(aInfo.maPrintSize.Width(),
aInfo.maPrintSize.Height()); aInfo.maPrintSize.Height());
} }
@ -1491,9 +1491,9 @@ private:
} }
if (mpOptions->IsDraw()) if (mpOptions->IsDraw())
PrepareStdOrNotes(PK_STANDARD, aInfo); PrepareStdOrNotes(PageKind::Standard, aInfo);
if (mpOptions->IsNotes()) if (mpOptions->IsNotes())
PrepareStdOrNotes(PK_NOTES, aInfo); PrepareStdOrNotes(PageKind::Notes, aInfo);
if (mpOptions->IsHandout()) if (mpOptions->IsHandout())
{ {
InitHandoutTemplate(); InitHandoutTemplate();
@ -1535,7 +1535,7 @@ private:
// first, prepare handout page (not handout master) // first, prepare handout page (not handout master)
SdPage* pHandout = rModel.GetSdPage(0, PK_HANDOUT); SdPage* pHandout = rModel.GetSdPage(0, PageKind::Handout);
if( !pHandout ) if( !pHandout )
return; return;
@ -1644,7 +1644,7 @@ private:
long nPageH = aOutRect.GetHeight(); long nPageH = aOutRect.GetHeight();
std::vector< sal_Int32 > aPages; std::vector< sal_Int32 > aPages;
sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PageKind::Standard);
StringRangeEnumerator::getRangesFromString( StringRangeEnumerator::getRangesFromString(
mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()), mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()),
aPages, 0, nPageCount-1); aPages, 0, nPageCount-1);
@ -1658,7 +1658,7 @@ private:
sal_Int32 nH (0); sal_Int32 nH (0);
while (nH < nPageH && nIndex<nCount) while (nH < nPageH && nIndex<nCount)
{ {
SdPage* pPage = GetFilteredPage(aPages[nIndex], PK_STANDARD); SdPage* pPage = GetFilteredPage(aPages[nIndex], PageKind::Standard);
++nIndex; ++nIndex;
if (pPage == nullptr) if (pPage == nullptr)
continue; continue;
@ -1770,7 +1770,7 @@ private:
{ {
SdDrawDocument* pDocument = mrBase.GetDocument(); SdDrawDocument* pDocument = mrBase.GetDocument();
OSL_ASSERT(pDocument != nullptr); OSL_ASSERT(pDocument != nullptr);
SdPage& rHandoutPage (*pDocument->GetSdPage(0, PK_HANDOUT)); SdPage& rHandoutPage (*pDocument->GetSdPage(0, PageKind::Handout));
const bool bScalePage (mpOptions->IsPageSize()); const bool bScalePage (mpOptions->IsPageSize());
@ -1834,7 +1834,7 @@ private:
++nShapeCount; ++nShapeCount;
} }
const sal_uInt16 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); const sal_uInt16 nPageCount = mrBase.GetDocument()->GetSdPageCount(PageKind::Standard);
const sal_uInt16 nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0; const sal_uInt16 nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0;
pViewShell->SetPrintedHandoutPageCount( nHandoutPageCount ); pViewShell->SetPrintedHandoutPageCount( nHandoutPageCount );
mrBase.GetDocument()->setHandoutPageCount( nHandoutPageCount ); mrBase.GetDocument()->setHandoutPageCount( nHandoutPageCount );
@ -1853,7 +1853,7 @@ private:
++it; ++it;
bLastLoop = (it == itEnd); bLastLoop = (it == itEnd);
if (GetFilteredPage(nPageIndex, PK_STANDARD)) if (GetFilteredPage(nPageIndex, PageKind::Standard))
aPageIndices.push_back(nPageIndex); aPageIndices.push_back(nPageIndex);
else if (!bLastLoop) else if (!bLastLoop)
continue; continue;
@ -1915,7 +1915,7 @@ private:
std::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); std::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell());
pViewShell->WriteFrameViewData(); pViewShell->WriteFrameViewData();
sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PageKind::Standard);
StringRangeEnumerator aRangeEnum( StringRangeEnumerator aRangeEnum(
mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()), mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()),
0, nPageCount-1); 0, nPageCount-1);

View File

@ -161,7 +161,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, OutlinerMode nMode )
mpTextObj(nullptr), mpTextObj(nullptr),
mnText(0), mnText(0),
mpParaObj(nullptr), mpParaObj(nullptr),
meStartViewMode(PK_STANDARD), meStartViewMode(PageKind::Standard),
meStartEditMode(EditMode::Page), meStartEditMode(EditMode::Page),
mnStartPageIndex((sal_uInt16)-1), mnStartPageIndex((sal_uInt16)-1),
mpStartEditedObject(nullptr), mpStartEditedObject(nullptr),
@ -1332,14 +1332,14 @@ void Outliner::SetViewMode (PageKind ePageKind)
OUString sViewURL; OUString sViewURL;
switch (ePageKind) switch (ePageKind)
{ {
case PK_STANDARD: case PageKind::Standard:
default: default:
sViewURL = framework::FrameworkHelper::msImpressViewURL; sViewURL = framework::FrameworkHelper::msImpressViewURL;
break; break;
case PK_NOTES: case PageKind::Notes:
sViewURL = framework::FrameworkHelper::msNotesViewURL; sViewURL = framework::FrameworkHelper::msNotesViewURL;
break; break;
case PK_HANDOUT: case PageKind::Handout:
sViewURL = framework::FrameworkHelper::msHandoutViewURL; sViewURL = framework::FrameworkHelper::msHandoutViewURL;
break; break;
} }

View File

@ -39,7 +39,7 @@ namespace sd { namespace outliner {
IteratorPosition::IteratorPosition() IteratorPosition::IteratorPosition()
: mnText(0) : mnText(0)
, mnPageIndex(-1) , mnPageIndex(-1)
, mePageKind(PK_STANDARD) , mePageKind(PageKind::Standard)
, meEditMode(EditMode::Page) , meEditMode(EditMode::Page)
{ {
} }
@ -237,12 +237,12 @@ Iterator OutlinerContainer::CreateDocumentIterator (
default: default:
if (bDirectionIsForward) if (bDirectionIsForward)
{ {
ePageKind = PK_STANDARD; ePageKind = PageKind::Standard;
eEditMode = EditMode::Page; eEditMode = EditMode::Page;
} }
else else
{ {
ePageKind = PK_HANDOUT; ePageKind = PageKind::Handout;
eEditMode = EditMode::MasterPage; eEditMode = EditMode::MasterPage;
} }
break; break;
@ -250,12 +250,12 @@ Iterator OutlinerContainer::CreateDocumentIterator (
case END: case END:
if (bDirectionIsForward) if (bDirectionIsForward)
{ {
ePageKind = PK_HANDOUT; ePageKind = PageKind::Handout;
eEditMode = EditMode::MasterPage; eEditMode = EditMode::MasterPage;
} }
else else
{ {
ePageKind = PK_STANDARD; ePageKind = PageKind::Standard;
eEditMode = EditMode::Page; eEditMode = EditMode::Page;
} }
break; break;
@ -270,7 +270,7 @@ Iterator OutlinerContainer::CreateDocumentIterator (
} }
else else
{ {
ePageKind = PK_STANDARD; ePageKind = PageKind::Standard;
eEditMode = EditMode::Page; eEditMode = EditMode::Page;
} }
break; break;
@ -367,7 +367,7 @@ IteratorImplBase::IteratorImplBase(SdDrawDocument* pDocument,
} }
else else
{ {
maPosition.mePageKind = PK_STANDARD; maPosition.mePageKind = PageKind::Standard;
maPosition.meEditMode = EditMode::Page; maPosition.meEditMode = EditMode::Page;
} }
} }
@ -754,16 +754,16 @@ void DocumentIteratorImpl::GotoNextText()
// Switch to next view mode. // Switch to next view mode.
else else
{ {
if (maPosition.mePageKind == PK_HANDOUT) if (maPosition.mePageKind == PageKind::Handout)
// Not really necessary but makes things more clear. // Not really necessary but makes things more clear.
bSetToOnePastLastPage = true; bSetToOnePastLastPage = true;
else else
{ {
maPosition.meEditMode = EditMode::Page; maPosition.meEditMode = EditMode::Page;
if (maPosition.mePageKind == PK_STANDARD) if (maPosition.mePageKind == PageKind::Standard)
maPosition.mePageKind = PK_NOTES; maPosition.mePageKind = PageKind::Notes;
else if (maPosition.mePageKind == PK_NOTES) else if (maPosition.mePageKind == PageKind::Notes)
maPosition.mePageKind = PK_HANDOUT; maPosition.mePageKind = PageKind::Handout;
SetPage (0); SetPage (0);
} }
} }
@ -783,15 +783,15 @@ void DocumentIteratorImpl::GotoNextText()
// Switch to previous view mode. // Switch to previous view mode.
else else
{ {
if (maPosition.mePageKind == PK_STANDARD) if (maPosition.mePageKind == PageKind::Standard)
SetPage (-1); SetPage (-1);
else else
{ {
maPosition.meEditMode = EditMode::MasterPage; maPosition.meEditMode = EditMode::MasterPage;
if (maPosition.mePageKind == PK_HANDOUT) if (maPosition.mePageKind == PageKind::Handout)
maPosition.mePageKind = PK_NOTES; maPosition.mePageKind = PageKind::Notes;
else if (maPosition.mePageKind == PK_NOTES) else if (maPosition.mePageKind == PageKind::Notes)
maPosition.mePageKind = PK_STANDARD; maPosition.mePageKind = PageKind::Standard;
bSetToOnePastLastPage = true; bSetToOnePastLastPage = true;
} }
} }

View File

@ -160,14 +160,14 @@ sal_uInt16 ViewClipboard::DetermineInsertPosition (
const SdTransferable& ) const SdTransferable& )
{ {
SdDrawDocument& rDoc = mrView.GetDoc(); SdDrawDocument& rDoc = mrView.GetDoc();
sal_uInt16 nPgCnt = rDoc.GetSdPageCount( PK_STANDARD ); sal_uInt16 nPgCnt = rDoc.GetSdPageCount( PageKind::Standard );
// Insert position is the behind the last selected page or behind the // Insert position is the behind the last selected page or behind the
// last page when the selection is empty. // last page when the selection is empty.
sal_uInt16 nInsertPos = rDoc.GetSdPageCount( PK_STANDARD ) * 2 + 1; sal_uInt16 nInsertPos = rDoc.GetSdPageCount( PageKind::Standard ) * 2 + 1;
for( sal_uInt16 nPage = 0; nPage < nPgCnt; nPage++ ) for( sal_uInt16 nPage = 0; nPage < nPgCnt; nPage++ )
{ {
SdPage* pPage = rDoc.GetSdPage( nPage, PK_STANDARD ); SdPage* pPage = rDoc.GetSdPage( nPage, PageKind::Standard );
if( pPage->IsSelected() ) if( pPage->IsSelected() )
nInsertPos = nPage * 2 + 3; nInsertPos = nPage * 2 + 3;
@ -204,8 +204,8 @@ sal_uInt16 ViewClipboard::InsertSlides (
pDataDocSh = static_cast<DrawDocShell*>(pShell); pDataDocSh = static_cast<DrawDocShell*>(pShell);
SdDrawDocument* pDataDoc = pDataDocSh->GetDoc(); SdDrawDocument* pDataDoc = pDataDocSh->GetDoc();
if (pDataDoc!=nullptr && pDataDoc->GetSdPageCount(PK_STANDARD)) if (pDataDoc!=nullptr && pDataDoc->GetSdPageCount(PageKind::Standard))
nInsertPgCnt = pDataDoc->GetSdPageCount(PK_STANDARD); nInsertPgCnt = pDataDoc->GetSdPageCount(PageKind::Standard);
} }
if (nInsertPgCnt > 0) if (nInsertPgCnt > 0)
{ {

View File

@ -563,7 +563,7 @@ sal_uInt16 ViewShellBase::SetPrinter (
if (pDrawViewShell) if (pDrawViewShell)
{ {
SdPage* pPage = GetDocument()->GetSdPage( SdPage* pPage = GetDocument()->GetSdPage(
0, PK_STANDARD ); 0, PageKind::Standard );
pDrawViewShell->SetPageSizeAndBorder ( pDrawViewShell->SetPageSizeAndBorder (
pDrawViewShell->GetPageKind(), pDrawViewShell->GetPageKind(),
aNewSize, aNewSize,
@ -721,13 +721,13 @@ void ViewShellBase::ReadUserDataSequence (
switch (dynamic_cast<DrawViewShell&>(*pShell).GetPageKind()) switch (dynamic_cast<DrawViewShell&>(*pShell).GetPageKind())
{ {
default: default:
case PK_STANDARD: case PageKind::Standard:
sViewURL = framework::FrameworkHelper::msImpressViewURL; sViewURL = framework::FrameworkHelper::msImpressViewURL;
break; break;
case PK_NOTES: case PageKind::Notes:
sViewURL = framework::FrameworkHelper::msNotesViewURL; sViewURL = framework::FrameworkHelper::msNotesViewURL;
break; break;
case PK_HANDOUT: case PageKind::Handout:
sViewURL = framework::FrameworkHelper::msHandoutViewURL; sViewURL = framework::FrameworkHelper::msHandoutViewURL;
break; break;
} }
@ -899,15 +899,15 @@ OUString ViewShellBase::GetInitialViewShellType()
rProperty.Value >>= nPageKind; rProperty.Value >>= nPageKind;
switch ((PageKind)nPageKind) switch ((PageKind)nPageKind)
{ {
case PK_STANDARD: case PageKind::Standard:
sRequestedView = FrameworkHelper::msImpressViewURL; sRequestedView = FrameworkHelper::msImpressViewURL;
break; break;
case PK_HANDOUT: case PageKind::Handout:
sRequestedView = FrameworkHelper::msHandoutViewURL; sRequestedView = FrameworkHelper::msHandoutViewURL;
break; break;
case PK_NOTES: case PageKind::Notes:
sRequestedView = FrameworkHelper::msNotesViewURL; sRequestedView = FrameworkHelper::msNotesViewURL;
break; break;

View File

@ -146,10 +146,10 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
rRequest.Ignore (); rRequest.Ignore ();
break; break;
} }
if (ePageKind == PK_HANDOUT) if (ePageKind == PageKind::Handout)
{ {
bHandoutMode = true; bHandoutMode = true;
pHandoutMPage = pDocument->GetMasterSdPage(0, PK_HANDOUT); pHandoutMPage = pDocument->GetMasterSdPage(0, PageKind::Handout);
} }
} }
else else
@ -185,10 +185,10 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
{ {
pCurrentPage->SetName(aNewName); pCurrentPage->SetName(aNewName);
if (ePageKind == PK_STANDARD) if (ePageKind == PageKind::Standard)
{ {
sal_uInt16 nPage = (pCurrentPage->GetPageNum()-1) / 2; sal_uInt16 nPage = (pCurrentPage->GetPageNum()-1) / 2;
SdPage* pNotesPage = pDocument->GetSdPage(nPage, PK_NOTES); SdPage* pNotesPage = pDocument->GetSdPage(nPage, PageKind::Notes);
if (pNotesPage != nullptr) if (pNotesPage != nullptr)
pNotesPage->SetName(aNewName); pNotesPage->SetName(aNewName);
} }
@ -262,7 +262,7 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP
SetOfByte aVisibleLayers; SetOfByte aVisibleLayers;
if( pPage->GetPageKind() == PK_HANDOUT ) if( pPage->GetPageKind() == PageKind::Handout )
aVisibleLayers.SetAll(); aVisibleLayers.SetAll();
else else
aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();

View File

@ -328,7 +328,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if (pPageView) if (pPageView)
{ {
SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage()); SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage());
bMasterPage = pPage && (pPage->GetPageKind() == PK_STANDARD) && pPage->IsMasterPage(); bMasterPage = pPage && (pPage->GetPageKind() == PageKind::Standard) && pPage->IsMasterPage();
} }
if (!bMasterPage) if (!bMasterPage)

View File

@ -343,7 +343,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
pLayerBar->EndEditMode(); pLayerBar->EndEditMode();
maTabControl->EndEditMode(); maTabControl->EndEditMode();
if (mePageKind == PK_HANDOUT) if (mePageKind == PageKind::Handout)
{ {
// at handouts only allow MasterPage // at handouts only allow MasterPage
eEMode = EditMode::MasterPage; eEMode = EditMode::MasterPage;
@ -958,11 +958,11 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
mpFrameView->SetPrintableLayers( pPageView->GetPrintableLayers() ); mpFrameView->SetPrintableLayers( pPageView->GetPrintableLayers() );
mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() ); mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() );
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() ); mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() ); mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() );
} }
@ -985,11 +985,11 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
pNewPageView->SetPrintableLayers( mpFrameView->GetPrintableLayers() ); pNewPageView->SetPrintableLayers( mpFrameView->GetPrintableLayers() );
pNewPageView->SetLockedLayers( mpFrameView->GetLockedLayers() ); pNewPageView->SetLockedLayers( mpFrameView->GetLockedLayers() );
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
pNewPageView->SetHelpLines( mpFrameView->GetNotesHelpLines() ); pNewPageView->SetHelpLines( mpFrameView->GetNotesHelpLines() );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
pNewPageView->SetHelpLines( mpFrameView->GetHandoutHelpLines() ); pNewPageView->SetHelpLines( mpFrameView->GetHandoutHelpLines() );
} }
@ -1019,11 +1019,11 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
mpFrameView->SetPrintableLayers( pPageView->GetPrintableLayers() ); mpFrameView->SetPrintableLayers( pPageView->GetPrintableLayers() );
mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() ); mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() );
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() ); mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() ); mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() );
} }
@ -1054,11 +1054,11 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
pNewPageView->SetPrintableLayers( mpFrameView->GetPrintableLayers() ); pNewPageView->SetPrintableLayers( mpFrameView->GetPrintableLayers() );
pNewPageView->SetLockedLayers( mpFrameView->GetLockedLayers() ); pNewPageView->SetLockedLayers( mpFrameView->GetLockedLayers() );
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
pNewPageView->SetHelpLines( mpFrameView->GetNotesHelpLines() ); pNewPageView->SetHelpLines( mpFrameView->GetNotesHelpLines() );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
pNewPageView->SetHelpLines( mpFrameView->GetHandoutHelpLines() ); pNewPageView->SetHelpLines( mpFrameView->GetHandoutHelpLines() );
} }
@ -1078,7 +1078,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
maTabControl->SetPageText(nSelectedPage+1, aLayoutName); maTabControl->SetPageText(nSelectedPage+1, aLayoutName);
} }
if( mePageKind == PK_HANDOUT ) if( mePageKind == PageKind::Handout )
{ {
// set pages for all available handout presentation objects // set pages for all available handout presentation objects
sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList(); sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList();
@ -1089,7 +1089,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{ {
if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT ) if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT )
{ {
// #i105146# We want no content to be displayed for PK_HANDOUT, // #i105146# We want no content to be displayed for PageKind::Handout,
// so just never set a page as content // so just never set a page as content
static_cast<SdrPageObj*>(pObj)->SetReferencedPage(nullptr); static_cast<SdrPageObj*>(pObj)->SetReferencedPage(nullptr);
} }

View File

@ -361,7 +361,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
// Create shapes for the default layout. // Create shapes for the default layout.
SdPage* pMasterPage = GetDoc()->GetMasterSdPage( SdPage* pMasterPage = GetDoc()->GetMasterSdPage(
nIndex, PK_STANDARD); nIndex, PageKind::Standard);
pMasterPage->CreateTitleAndLayout (true,true); pMasterPage->CreateTitleAndLayout (true,true);
} }
} }
@ -376,8 +376,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_MODIFYPAGE: case SID_MODIFYPAGE:
{ {
if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES || if (mePageKind==PageKind::Standard || mePageKind==PageKind::Notes ||
(mePageKind==PK_HANDOUT && meEditMode==EditMode::MasterPage) ) (mePageKind==PageKind::Handout && meEditMode==EditMode::MasterPage) )
{ {
if ( mpDrawView->IsTextEdit() ) if ( mpDrawView->IsTextEdit() )
{ {
@ -398,7 +398,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ASSIGN_LAYOUT: case SID_ASSIGN_LAYOUT:
{ {
if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES || (mePageKind==PK_HANDOUT && meEditMode==EditMode::MasterPage)) if (mePageKind==PageKind::Standard || mePageKind==PageKind::Notes || (mePageKind==PageKind::Handout && meEditMode==EditMode::MasterPage))
{ {
if ( mpDrawView->IsTextEdit() ) if ( mpDrawView->IsTextEdit() )
mpDrawView->SdrEndTextEdit(); mpDrawView->SdrEndTextEdit();
@ -413,7 +413,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_RENAMEPAGE: case SID_RENAMEPAGE:
case SID_RENAME_MASTER_PAGE: case SID_RENAME_MASTER_PAGE:
{ {
if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES ) if (mePageKind==PageKind::Standard || mePageKind==PageKind::Notes )
{ {
if ( mpDrawView->IsTextEdit() ) if ( mpDrawView->IsTextEdit() )
{ {
@ -456,7 +456,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_RENAMEPAGE_QUICK: case SID_RENAMEPAGE_QUICK:
{ {
if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES ) if (mePageKind==PageKind::Standard || mePageKind==PageKind::Notes )
{ {
if ( mpDrawView->IsTextEdit() ) if ( mpDrawView->IsTextEdit() )
{ {
@ -3091,7 +3091,7 @@ SdPage* DrawViewShell::CreateOrDuplicatePage (
const sal_Int32 nInsertPosition) const sal_Int32 nInsertPosition)
{ {
SdPage* pNewPage = nullptr; SdPage* pNewPage = nullptr;
if (ePageKind == PK_STANDARD && meEditMode != EditMode::MasterPage) if (ePageKind == PageKind::Standard && meEditMode != EditMode::MasterPage)
{ {
if ( mpDrawView->IsTextEdit() ) if ( mpDrawView->IsTextEdit() )
{ {

View File

@ -150,8 +150,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND); const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
sal_Int32 nWhatPage = (sal_Int32)pWhatPage->GetValue (); sal_Int32 nWhatPage = (sal_Int32)pWhatPage->GetValue ();
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue (); PageKind nWhatKind = (PageKind)pWhatKind->GetValue ();
if (! CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT)) if (! (nWhatKind >= PageKind::Standard && nWhatKind <= PageKind::Handout))
{ {
#if HAVE_FEATURE_SCRIPTING #if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE); StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE);
@ -161,7 +161,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
} }
else if (meEditMode != EditMode::MasterPage) else if (meEditMode != EditMode::MasterPage)
{ {
if (! CHECK_RANGE (0, nWhatPage, GetDoc()->GetSdPageCount((PageKind)nWhatKind))) if (! CHECK_RANGE (0, nWhatPage, GetDoc()->GetSdPageCount(nWhatKind)))
{ {
#if HAVE_FEATURE_SCRIPTING #if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE); StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE);
@ -237,18 +237,18 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_PAGEMODE: // BASIC case SID_PAGEMODE: // BASIC
{ {
const SfxItemSet *pArgs = rReq.GetArgs (); const SfxItemSet *pArgs = rReq.GetArgs();
if ( pArgs && pArgs->Count () == 2) if (pArgs && pArgs->Count () == 2)
{ {
const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(ID_VAL_ISACTIVE); const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(ID_VAL_ISACTIVE);
const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND); const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue (); PageKind nWhatKind = (PageKind)pWhatKind->GetValue();
if (CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT)) if ( nWhatKind >= PageKind::Standard && nWhatKind <= PageKind::Handout)
{ {
mbIsLayerModeActive = pIsActive->GetValue (); mbIsLayerModeActive = pIsActive->GetValue();
mePageKind = (PageKind) nWhatKind; mePageKind = nWhatKind;
} }
} }

View File

@ -250,12 +250,12 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
if ( pPageView->GetLockedLayers() != pView->GetLockedLayers() ) if ( pPageView->GetLockedLayers() != pView->GetLockedLayers() )
pPageView->SetLockedLayers( pView->GetLockedLayers() ); pPageView->SetLockedLayers( pView->GetLockedLayers() );
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
if (pPageView->GetHelpLines() != pView->GetNotesHelpLines()) if (pPageView->GetHelpLines() != pView->GetNotesHelpLines())
pPageView->SetHelpLines( pView->GetNotesHelpLines() ); pPageView->SetHelpLines( pView->GetNotesHelpLines() );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
if (pPageView->GetHelpLines() != pView->GetHandoutHelpLines()) if (pPageView->GetHelpLines() != pView->GetHandoutHelpLines())
pPageView->SetHelpLines( pView->GetHandoutHelpLines() ); pPageView->SetHelpLines( pView->GetHandoutHelpLines() );
@ -272,7 +272,7 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
sal_uInt16 nSelectedPage = 0; sal_uInt16 nSelectedPage = 0;
if (mePageKind != PK_HANDOUT) if (mePageKind != PageKind::Handout)
{ {
nSelectedPage = pView->GetSelectedPage(); nSelectedPage = pView->GetSelectedPage();
} }
@ -350,7 +350,7 @@ void DrawViewShell::WriteFrameViewData()
Rectangle aVisArea = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); Rectangle aVisArea = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) );
mpFrameView->SetVisArea(aVisArea); mpFrameView->SetVisArea(aVisArea);
if( mePageKind == PK_HANDOUT ) if( mePageKind == PageKind::Handout )
mpFrameView->SetSelectedPage(0); mpFrameView->SetSelectedPage(0);
else else
{ {
@ -373,11 +373,11 @@ void DrawViewShell::WriteFrameViewData()
if ( mpFrameView->GetLockedLayers() != pPageView->GetLockedLayers() ) if ( mpFrameView->GetLockedLayers() != pPageView->GetLockedLayers() )
mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() ); mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() );
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() ); mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() ); mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() );
} }
@ -483,12 +483,12 @@ void DrawViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans
{ {
mePageKind = mpFrameView->GetPageKind(); mePageKind = mpFrameView->GetPageKind();
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
SetHelpId( SID_NOTES_MODE ); SetHelpId( SID_NOTES_MODE );
GetActiveWindow()->SetHelpId( CMD_SID_NOTES_MODE ); GetActiveWindow()->SetHelpId( CMD_SID_NOTES_MODE );
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
SetHelpId( SID_HANDOUT_MASTER_MODE ); SetHelpId( SID_HANDOUT_MASTER_MODE );
GetActiveWindow()->SetHelpId( CMD_SID_HANDOUT_MASTER_MODE ); GetActiveWindow()->SetHelpId( CMD_SID_HANDOUT_MASTER_MODE );

View File

@ -234,7 +234,7 @@ void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage()); SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage());
//only show these in a normal master page //only show these in a normal master page
if (!pPage || (pPage->GetPageKind() != PK_STANDARD) || !pPage->IsMasterPage()) if (!pPage || (pPage->GetPageKind() != PageKind::Standard) || !pPage->IsMasterPage())
return nullptr; return nullptr;
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
@ -314,7 +314,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{ {
SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() ); SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
if( pPage && (pPage->GetPageKind() == PK_STANDARD) && !pPage->IsMasterPage() ) if( pPage && (pPage->GetPageKind() == PageKind::Standard) && !pPage->IsMasterPage() )
{ {
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE); SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
@ -355,7 +355,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{ {
SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() ); SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
if( pPage && (pPage->GetPageKind() == PK_STANDARD) && !pPage->IsMasterPage() ) if( pPage && (pPage->GetPageKind() == PageKind::Standard) && !pPage->IsMasterPage() )
{ {
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE); SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE);
@ -397,11 +397,11 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SfxItemState::DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) SfxItemState::DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) )
{ {
bool bDisable = true; bool bDisable = true;
sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD ); sal_uInt16 nCount = GetDoc()->GetSdPageCount( PageKind::Standard );
for( sal_uInt16 i = 0; i < nCount && bDisable; i++ ) for( sal_uInt16 i = 0; i < nCount && bDisable; i++ )
{ {
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); SdPage* pPage = GetDoc()->GetSdPage(i, PageKind::Standard);
if( !pPage->IsExcluded() ) if( !pPage->IsExcluded() )
bDisable = false; bDisable = false;
@ -675,14 +675,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
} }
} }
if (mePageKind == PK_HANDOUT) if (mePageKind == PageKind::Handout)
{ {
rSet.DisableItem(SID_PRESENTATION_LAYOUT); rSet.DisableItem(SID_PRESENTATION_LAYOUT);
rSet.DisableItem(SID_SELECT_BACKGROUND); rSet.DisableItem(SID_SELECT_BACKGROUND);
rSet.DisableItem(SID_SAVE_BACKGROUND); rSet.DisableItem(SID_SAVE_BACKGROUND);
} }
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
rSet.DisableItem(SID_INSERTPAGE); rSet.DisableItem(SID_INSERTPAGE);
rSet.DisableItem(SID_RENAMEPAGE); rSet.DisableItem(SID_RENAMEPAGE);
@ -701,7 +701,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_LAYERMODE); rSet.DisableItem(SID_LAYERMODE);
rSet.DisableItem(SID_INSERTFILE); rSet.DisableItem(SID_INSERTFILE);
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
rSet.DisableItem(SID_INSERTPAGE); rSet.DisableItem(SID_INSERTPAGE);
rSet.DisableItem(SID_DUPLICATE_PAGE); rSet.DisableItem(SID_DUPLICATE_PAGE);
@ -765,20 +765,20 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
/********************************************************************** /**********************************************************************
* Background page mode * Background page mode
**********************************************************************/ **********************************************************************/
if (mePageKind == PK_STANDARD) if (mePageKind == PageKind::Standard)
{ {
rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, true)); rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, true));
rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, false));
rSet.Put(SfxBoolItem(SID_HANDOUT_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTER_MODE, false));
} }
else if (mePageKind == PK_NOTES) else if (mePageKind == PageKind::Notes)
{ {
rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, false));
rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, true)); rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, true));
rSet.Put(SfxBoolItem(SID_HANDOUT_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTER_MODE, false));
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, false));
rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, false));
@ -796,8 +796,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{ {
if (maTabControl->GetPageCount() == 1 || if (maTabControl->GetPageCount() == 1 ||
meEditMode == EditMode::MasterPage || meEditMode == EditMode::MasterPage ||
mePageKind == PK_NOTES || mePageKind == PageKind::Notes ||
mePageKind == PK_HANDOUT || mePageKind == PageKind::Handout ||
(GetShellType()!=ST_DRAW&&IsLayerModeActive())) (GetShellType()!=ST_DRAW&&IsLayerModeActive()))
{ {
if (rSet.GetItemState(SID_DELETE_PAGE) == SfxItemState::DEFAULT) if (rSet.GetItemState(SID_DELETE_PAGE) == SfxItemState::DEFAULT)
@ -1565,13 +1565,13 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet)
rSet.Put(SfxBoolItem(SID_OUTLINE_MODE, false)); rSet.Put(SfxBoolItem(SID_OUTLINE_MODE, false));
rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, false));
rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_NOTES_MASTER_MODE, false));
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
rSet.Put(SfxBoolItem(SID_DRAWINGMODE, false)); rSet.Put(SfxBoolItem(SID_DRAWINGMODE, false));
rSet.Put(SfxBoolItem(SID_NOTES_MODE, true)); rSet.Put(SfxBoolItem(SID_NOTES_MODE, true));
rSet.Put(SfxBoolItem(SID_HANDOUT_MASTER_MODE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTER_MODE, false));
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
rSet.Put(SfxBoolItem(SID_DRAWINGMODE, false)); rSet.Put(SfxBoolItem(SID_DRAWINGMODE, false));
rSet.Put(SfxBoolItem(SID_NOTES_MODE, false)); rSet.Put(SfxBoolItem(SID_NOTES_MODE, false));

View File

@ -230,15 +230,15 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
DocumentType eDocType = GetDoc()->GetDocumentType(); // RTTI does not work here DocumentType eDocType = GetDoc()->GetDocumentType(); // RTTI does not work here
switch (mePageKind) switch (mePageKind)
{ {
case PK_STANDARD: case PageKind::Standard:
meShellType = ST_IMPRESS; meShellType = ST_IMPRESS;
break; break;
case PK_NOTES: case PageKind::Notes:
meShellType = ST_NOTES; meShellType = ST_NOTES;
break; break;
case PK_HANDOUT: case PageKind::Handout:
meShellType = ST_HANDOUT; meShellType = ST_HANDOUT;
break; break;
} }
@ -284,7 +284,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
} }
else else
{ {
if (mePageKind == PK_NOTES) if (mePageKind == PageKind::Notes)
{ {
SetHelpId( SID_NOTES_MODE ); SetHelpId( SID_NOTES_MODE );
GetActiveWindow()->SetHelpId( CMD_SID_NOTES_MODE ); GetActiveWindow()->SetHelpId( CMD_SID_NOTES_MODE );
@ -292,7 +292,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
// AutoLayouts have to be created // AutoLayouts have to be created
GetDoc()->StopWorkStartupDelay(); GetDoc()->StopWorkStartupDelay();
} }
else if (mePageKind == PK_HANDOUT) else if (mePageKind == PageKind::Handout)
{ {
SetHelpId( SID_HANDOUT_MASTER_MODE ); SetHelpId( SID_HANDOUT_MASTER_MODE );
GetActiveWindow()->SetHelpId( CMD_SID_HANDOUT_MASTER_MODE ); GetActiveWindow()->SetHelpId( CMD_SID_HANDOUT_MASTER_MODE );
@ -456,9 +456,9 @@ void DrawViewShell::SetupPage (Size &rSize,
pPage->SetLwrBorder(nLower); pPage->SetLwrBorder(nLower);
} }
if ( mePageKind == PK_STANDARD ) if ( mePageKind == PageKind::Standard )
{ {
GetDoc()->GetMasterSdPage(i, PK_NOTES)->CreateTitleAndLayout(); GetDoc()->GetMasterSdPage(i, PageKind::Notes)->CreateTitleAndLayout();
} }
pPage->CreateTitleAndLayout(); pPage->CreateTitleAndLayout();
@ -488,9 +488,9 @@ void DrawViewShell::SetupPage (Size &rSize,
pPage->SetLwrBorder(nLower); pPage->SetLwrBorder(nLower);
} }
if ( mePageKind == PK_STANDARD ) if ( mePageKind == PageKind::Standard )
{ {
SdPage* pNotesPage = GetDoc()->GetSdPage(i, PK_NOTES); SdPage* pNotesPage = GetDoc()->GetSdPage(i, PageKind::Notes);
pNotesPage->SetAutoLayout( pNotesPage->GetAutoLayout() ); pNotesPage->SetAutoLayout( pNotesPage->GetAutoLayout() );
} }
@ -498,9 +498,9 @@ void DrawViewShell::SetupPage (Size &rSize,
} }
} }
if ( mePageKind == PK_STANDARD ) if ( mePageKind == PageKind::Standard )
{ {
SdPage* pHandoutPage = GetDoc()->GetSdPage(0, PK_HANDOUT); SdPage* pHandoutPage = GetDoc()->GetSdPage(0, PageKind::Handout);
pHandoutPage->CreateTitleAndLayout(true); pHandoutPage->CreateTitleAndLayout(true);
} }
@ -768,13 +768,13 @@ void DrawViewShell::GetAnnotationState (SfxItemSet& rItemSet )
svx::sidebar::SelectionAnalyzer::ViewType eViewType (svx::sidebar::SelectionAnalyzer::ViewType::Standard); svx::sidebar::SelectionAnalyzer::ViewType eViewType (svx::sidebar::SelectionAnalyzer::ViewType::Standard);
switch (mePageKind) switch (mePageKind)
{ {
case PK_HANDOUT: case PageKind::Handout:
eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Handout; eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Handout;
break; break;
case PK_NOTES: case PageKind::Notes:
eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Notes; eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Notes;
break; break;
case PK_STANDARD: case PageKind::Standard:
if (meEditMode == EditMode::MasterPage) if (meEditMode == EditMode::MasterPage)
eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Master; eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Master;
else else

View File

@ -95,10 +95,10 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName )
// rename // rename
pPageToRename->SetName( rName ); pPageToRename->SetName( rName );
if( ePageKind == PK_STANDARD ) if( ePageKind == PageKind::Standard )
{ {
// also rename notes-page // also rename notes-page
SdPage* pNotesPage = GetDoc()->GetSdPage( nPageId - 1, PK_NOTES ); SdPage* pNotesPage = GetDoc()->GetSdPage( nPageId - 1, PageKind::Notes );
pNotesPage->SetName( rName ); pNotesPage->SetName( rName );
} }
} }

View File

@ -176,9 +176,9 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
mnSelectedPage = pFrameView->GetSelectedPage(); mnSelectedPage = pFrameView->GetSelectedPage();
mnSelectedPageOnLoad = pFrameView->GetSelectedPageOnLoad(); mnSelectedPageOnLoad = pFrameView->GetSelectedPageOnLoad();
meEditMode = pFrameView->GetViewShEditMode(); meEditMode = pFrameView->GetViewShEditMode();
// meStandardEditMode = pFrameView->GetViewShEditMode(PK_STANDARD); // meStandardEditMode = pFrameView->GetViewShEditMode(PageKind::Standard);
// meNotesEditMode = pFrameView->GetViewShEditMode(PK_NOTES); // meNotesEditMode = pFrameView->GetViewShEditMode(PageKind::Notes);
// meHandoutEditMode = pFrameView->GetViewShEditMode(PK_HANDOUT); // meHandoutEditMode = pFrameView->GetViewShEditMode(PageKind::Handout);
SetViewShEditModeOnLoad(pFrameView->GetViewShEditModeOnLoad()); SetViewShEditModeOnLoad(pFrameView->GetViewShEditModeOnLoad());
mbLayerMode = pFrameView->IsLayerMode(); mbLayerMode = pFrameView->IsLayerMode();
mbQuickEdit = pFrameView->IsQuickEdit(); mbQuickEdit = pFrameView->IsQuickEdit();
@ -206,8 +206,8 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
mbNoColors = true; mbNoColors = true;
mbNoAttribs = false; mbNoAttribs = false;
maVisArea = Rectangle( Point(), Size(0, 0) ); maVisArea = Rectangle( Point(), Size(0, 0) );
mePageKind = PK_STANDARD; mePageKind = PageKind::Standard;
mePageKindOnLoad = PK_STANDARD; mePageKindOnLoad = PageKind::Standard;
mnSelectedPage = 0; mnSelectedPage = 0;
mnSelectedPageOnLoad = 0; mnSelectedPageOnLoad = 0;
meEditMode = EditMode::Page; meEditMode = EditMode::Page;
@ -422,9 +422,9 @@ void FrameView::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert
aUserData.addValue( sUNO_View_SlidesPerRow, makeAny( (sal_Int16)GetSlidesPerRow() ) ); aUserData.addValue( sUNO_View_SlidesPerRow, makeAny( (sal_Int16)GetSlidesPerRow() ) );
aUserData.addValue( sUNO_View_EditMode, makeAny( (sal_Int32)GetViewShEditMode() ) ); aUserData.addValue( sUNO_View_EditMode, makeAny( (sal_Int32)GetViewShEditMode() ) );
// aUserData.addValue( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PK_STANDARD ) ) ); // aUserData.addValue( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Standard ) ) );
// aUserData.addValue( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PK_NOTES ) ) ); // aUserData.addValue( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Notes ) ) );
// aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PK_HANDOUT ) ) ); // aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Handout ) ) );
{ {
const Rectangle aVisArea = GetVisArea(); const Rectangle aVisArea = GetVisArea();

View File

@ -38,7 +38,7 @@ GraphicViewShell::GraphicViewShell (
pFrame, pFrame,
rViewShellBase, rViewShellBase,
pParentWindow, pParentWindow,
PK_STANDARD, PageKind::Standard,
pFrameView) pFrameView)
{ {
ConstructGraphicViewShell(); ConstructGraphicViewShell();

View File

@ -950,12 +950,12 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{ {
bool bDisable = true; bool bDisable = true;
sal_uInt16 i = 0; sal_uInt16 i = 0;
sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD); sal_uInt16 nCount = GetDoc()->GetSdPageCount(PageKind::Standard);
pOlView->SetSelectedPages(); pOlView->SetSelectedPages();
while (i < nCount && bDisable) while (i < nCount && bDisable)
{ {
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); SdPage* pPage = GetDoc()->GetSdPage(i, PageKind::Standard);
if (pPage->IsSelected()) if (pPage->IsSelected())
{ {
@ -997,12 +997,12 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{ {
bool bDisable = true; bool bDisable = true;
sal_uInt16 i = 0; sal_uInt16 i = 0;
sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD); sal_uInt16 nCount = GetDoc()->GetSdPageCount(PageKind::Standard);
pOlView->SetSelectedPages(); pOlView->SetSelectedPages();
while (i < nCount && bDisable) while (i < nCount && bDisable)
{ {
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); SdPage* pPage = GetDoc()->GetSdPage(i, PageKind::Standard);
if (pPage->IsSelected()) if (pPage->IsSelected())
{ {
@ -1043,11 +1043,11 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) ) if( SfxItemState::DEFAULT == rSet.GetItemState( SID_PRESENTATION ) )
{ {
bool bDisable = true; bool bDisable = true;
sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD ); sal_uInt16 nCount = GetDoc()->GetSdPageCount( PageKind::Standard );
for( sal_uInt16 i = 0; i < nCount && bDisable; i++ ) for( sal_uInt16 i = 0; i < nCount && bDisable; i++ )
{ {
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); SdPage* pPage = GetDoc()->GetSdPage(i, PageKind::Standard);
if( !pPage->IsExcluded() ) if( !pPage->IsExcluded() )
bDisable = false; bDisable = false;
@ -1227,7 +1227,7 @@ void OutlineViewShell::ReadFrameViewData(FrameView* pView)
rOutl.SetControlWord(nCntrl & ~EEControlBits::NOCOLORS); rOutl.SetControlWord(nCntrl & ~EEControlBits::NOCOLORS);
sal_uInt16 nPage = mpFrameView->GetSelectedPage(); sal_uInt16 nPage = mpFrameView->GetSelectedPage();
pLastPage = GetDoc()->GetSdPage( nPage, PK_STANDARD ); pLastPage = GetDoc()->GetSdPage( nPage, PageKind::Standard );
pOlView->SetActualPage(pLastPage); pOlView->SetActualPage(pLastPage);
} }
@ -1293,7 +1293,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
// page view and layout // page view and layout
sal_uInt16 nPageCount = GetDoc()->GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = GetDoc()->GetSdPageCount( PageKind::Standard );
OUString aPageStr, aLayoutStr; OUString aPageStr, aLayoutStr;
::sd::Window* pWin = GetActiveWindow(); ::sd::Window* pWin = GetActiveWindow();
@ -1329,10 +1329,10 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
nPos++; nPos++;
} }
if( nPos >= GetDoc()->GetSdPageCount( PK_STANDARD ) ) if( nPos >= GetDoc()->GetSdPageCount( PageKind::Standard ) )
nPos = 0; nPos = 0;
SdrPage* pPage = GetDoc()->GetSdPage( (sal_uInt16) nPos, PK_STANDARD ); SdrPage* pPage = GetDoc()->GetSdPage( (sal_uInt16) nPos, PageKind::Standard );
aPageStr = SD_RESSTR(STR_SD_PAGE_COUNT); aPageStr = SD_RESSTR(STR_SD_PAGE_COUNT);
@ -1763,7 +1763,7 @@ sal_uLong OutlineViewShell::ReadRtf(SvStream& rInput, const OUString& rBaseURL)
bRet = rOutl.Read( rInput, rBaseURL, EE_FORMAT_RTF, GetDocSh()->GetHeaderAttributes() ); bRet = rOutl.Read( rInput, rBaseURL, EE_FORMAT_RTF, GetDocSh()->GetHeaderAttributes() );
SdPage* pPage = GetDoc()->GetSdPage( GetDoc()->GetSdPageCount(PK_STANDARD) - 1, PK_STANDARD ); SdPage* pPage = GetDoc()->GetSdPage( GetDoc()->GetSdPageCount(PageKind::Standard) - 1, PageKind::Standard );
SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ); SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
SfxStyleSheet* pOutlSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE ); SfxStyleSheet* pOutlSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
@ -1882,9 +1882,9 @@ void OutlineViewShell::GetState (SfxItemSet& rSet)
void OutlineViewShell::SetCurrentPage (SdPage* pPage) void OutlineViewShell::SetCurrentPage (SdPage* pPage)
{ {
// Adapt the selection of the model. // Adapt the selection of the model.
for (sal_uInt16 i=0; i<GetDoc()->GetSdPageCount(PK_STANDARD); i++) for (sal_uInt16 i=0; i<GetDoc()->GetSdPageCount(PageKind::Standard); i++)
GetDoc()->SetSelected( GetDoc()->SetSelected(
GetDoc()->GetSdPage(i, PK_STANDARD), GetDoc()->GetSdPage(i, PageKind::Standard),
false); false);
GetDoc()->SetSelected (pPage, true); GetDoc()->SetSelected (pPage, true);

View File

@ -416,7 +416,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
{ {
nExample = nTarget - 1; nExample = nTarget - 1;
sal_uInt16 nPageCount = mrDoc.GetSdPageCount( PK_STANDARD ); sal_uInt16 nPageCount = mrDoc.GetSdPageCount( PageKind::Standard );
if( nExample >= nPageCount ) if( nExample >= nPageCount )
nExample = nPageCount - 1; nExample = nPageCount - 1;
} }
@ -428,7 +428,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
**********************************************************************/ **********************************************************************/
// this page is exemplary // this page is exemplary
SdPage* pExample = mrDoc.GetSdPage((sal_uInt16)nExample, PK_STANDARD); SdPage* pExample = mrDoc.GetSdPage((sal_uInt16)nExample, PageKind::Standard);
SdPage* pPage = mrDoc.AllocSdPage(false); SdPage* pPage = mrDoc.AllocSdPage(false);
pPage->SetLayoutName(pExample->GetLayoutName()); pPage->SetLayoutName(pExample->GetLayoutName());
@ -465,12 +465,12 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
/********************************************************************** /**********************************************************************
|* now the notes page |* now the notes page
\*********************************************************************/ \*********************************************************************/
pExample = mrDoc.GetSdPage((sal_uInt16)nExample, PK_NOTES); pExample = mrDoc.GetSdPage((sal_uInt16)nExample, PageKind::Notes);
SdPage* pNotesPage = mrDoc.AllocSdPage(false); SdPage* pNotesPage = mrDoc.AllocSdPage(false);
pNotesPage->SetLayoutName(pExample->GetLayoutName()); pNotesPage->SetLayoutName(pExample->GetLayoutName());
pNotesPage->SetPageKind(PK_NOTES); pNotesPage->SetPageKind(PageKind::Notes);
// insert (notes page) // insert (notes page)
mrDoc.InsertPage(pNotesPage, (sal_uInt16)(nTarget) * 2 + 2); mrDoc.InsertPage(pNotesPage, (sal_uInt16)(nTarget) * 2 + 2);
@ -696,7 +696,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
if(nPos >= 0) if(nPos >= 0)
{ {
SdPage*pPage = mrDoc.GetSdPage( (sal_uInt16) nPos, PK_STANDARD); SdPage*pPage = mrDoc.GetSdPage( (sal_uInt16) nPos, PageKind::Standard);
if(pPage && pPage->GetPresObj(PRESOBJ_TEXT)) if(pPage && pPage->GetPresObj(PRESOBJ_TEXT))
pOutliner->SetDepth( pPara, 0 ); pOutliner->SetDepth( pPara, 0 );
@ -716,7 +716,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
if( nPos >= 0 ) if( nPos >= 0 )
{ {
SdPage* pPage = mrDoc.GetSdPage( (sal_uInt16) nPos, PK_STANDARD ); SdPage* pPage = mrDoc.GetSdPage( (sal_uInt16) nPos, PageKind::Standard );
if( pPage ) if( pPage )
{ {
@ -832,7 +832,7 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner, void )
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page? if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page?
{ {
maOldParaOrder.push_back(pPara); maOldParaOrder.push_back(pPara);
SdPage* pPage = mrDoc.GetSdPage(nPos, PK_STANDARD); SdPage* pPage = mrDoc.GetSdPage(nPos, PageKind::Standard);
fiter = std::find(maSelectedParas.begin(),maSelectedParas.end(),pPara); fiter = std::find(maSelectedParas.begin(),maSelectedParas.end(),pPara);
@ -897,7 +897,7 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner, void )
sal_uInt16 nPageCount = (sal_uInt16)maSelectedParas.size(); sal_uInt16 nPageCount = (sal_uInt16)maSelectedParas.size();
while (nPageCount) while (nPageCount)
{ {
SdPage* pPage = mrDoc.GetSdPage(nPosNewOrder, PK_STANDARD); SdPage* pPage = mrDoc.GetSdPage(nPosNewOrder, PageKind::Standard);
pPage->SetSelected(false); pPage->SetSelected(false);
nPosNewOrder++; nPosNewOrder++;
nPageCount--; nPageCount--;
@ -1063,12 +1063,12 @@ void OutlineView::FillOutliner()
mrOutliner.SetUpdateMode(false); mrOutliner.SetUpdateMode(false);
Paragraph* pTitleToSelect = nullptr; Paragraph* pTitleToSelect = nullptr;
sal_uInt16 nPageCount = mrDoc.GetSdPageCount(PK_STANDARD); sal_uInt16 nPageCount = mrDoc.GetSdPageCount(PageKind::Standard);
// fill outliner with paragraphs from slides title & (outlines|subtitles) // fill outliner with paragraphs from slides title & (outlines|subtitles)
for (sal_uInt16 nPage = 0; nPage < nPageCount; nPage++) for (sal_uInt16 nPage = 0; nPage < nPageCount; nPage++)
{ {
SdPage* pPage = mrDoc.GetSdPage(nPage, PK_STANDARD); SdPage* pPage = mrDoc.GetSdPage(nPage, PageKind::Standard);
Paragraph * pPara = nullptr; Paragraph * pPara = nullptr;
// take text from title shape // take text from title shape
@ -1210,7 +1210,7 @@ SdPage* OutlineView::GetActualPage()
if( pCurrent ) if( pCurrent )
return pCurrent; return pCurrent;
return mrDoc.GetSdPage( 0, PK_STANDARD ); return mrDoc.GetSdPage( 0, PageKind::Standard );
} }
SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara ) SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
@ -1226,8 +1226,8 @@ SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
nPageToSelect++; nPageToSelect++;
} }
if( nPageToSelect < (sal_uInt32)mrDoc.GetSdPageCount( PK_STANDARD ) ) if( nPageToSelect < (sal_uInt32)mrDoc.GetSdPageCount( PageKind::Standard ) )
return mrDoc.GetSdPage( (sal_uInt16)nPageToSelect, PK_STANDARD ); return mrDoc.GetSdPage( (sal_uInt16)nPageToSelect, PageKind::Standard );
return nullptr; return nullptr;
} }
@ -1310,7 +1310,7 @@ void OutlineView::SetSelectedPages()
{ {
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page
{ {
SdPage* pPage = mrDoc.GetSdPage(nPos, PK_STANDARD); SdPage* pPage = mrDoc.GetSdPage(nPos, PageKind::Standard);
DBG_ASSERT(pPage!=nullptr, DBG_ASSERT(pPage!=nullptr,
"Trying to select non-existing page OutlineView::SetSelectedPages()"); "Trying to select non-existing page OutlineView::SetSelectedPages()");
@ -1491,12 +1491,12 @@ void OutlineView::UpdateDocument()
{ {
OutlineViewPageChangesGuard aGuard(this); OutlineViewPageChangesGuard aGuard(this);
const sal_uInt32 nPageCount = mrDoc.GetSdPageCount(PK_STANDARD); const sal_uInt32 nPageCount = mrDoc.GetSdPageCount(PageKind::Standard);
Paragraph* pPara = mrOutliner.GetParagraph( 0 ); Paragraph* pPara = mrOutliner.GetParagraph( 0 );
sal_uInt32 nPage; sal_uInt32 nPage;
for (nPage = 0; nPage < nPageCount; nPage++) for (nPage = 0; nPage < nPageCount; nPage++)
{ {
SdPage* pPage = mrDoc.GetSdPage( (sal_uInt16)nPage, PK_STANDARD); SdPage* pPage = mrDoc.GetSdPage( (sal_uInt16)nPage, PageKind::Standard);
mrDoc.SetSelected(pPage, false); mrDoc.SetSelected(pPage, false);
mrOutlineViewShell.UpdateTitleObject( pPage, pPara ); mrOutlineViewShell.UpdateTitleObject( pPage, pPara );

View File

@ -76,7 +76,7 @@ void PresentationViewShell::InitInterface_Impl()
PresentationViewShell::PresentationViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView) PresentationViewShell::PresentationViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView)
: DrawViewShell( pFrame, rViewShellBase, pParentWindow, PK_STANDARD, pFrameView) : DrawViewShell( pFrame, rViewShellBase, pParentWindow, PageKind::Standard, pFrameView)
{ {
if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
maOldVisArea = GetDocSh()->GetVisArea( ASPECT_CONTENT ); maOldVisArea = GetDocSh()->GetVisArea( ASPECT_CONTENT );

View File

@ -254,7 +254,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
{ {
// only for handout page, else this frame will be created for each // only for handout page, else this frame will be created for each
// page preview object in SlideSorter and PagePane // page preview object in SlideSorter and PagePane
if(pObjectsSdPage && PK_HANDOUT == pObjectsSdPage->GetPageKind()) if(pObjectsSdPage && PageKind::Handout == pObjectsSdPage->GetPageKind())
{ {
bCreateOutline = true; bCreateOutline = true;
} }
@ -308,7 +308,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
{ {
case PRESOBJ_TITLE: case PRESOBJ_TITLE:
{ {
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD) if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard)
{ {
static OUString aTitleAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_TITLE)); static OUString aTitleAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_TITLE));
aObjectString = aTitleAreaStr; aObjectString = aTitleAreaStr;
@ -348,7 +348,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
} }
case PRESOBJ_SLIDENUMBER: case PRESOBJ_SLIDENUMBER:
{ {
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD) if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard)
{ {
static OUString aSlideAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_SLIDE)); static OUString aSlideAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_SLIDE));
aObjectString = aSlideAreaStr; aObjectString = aSlideAreaStr;

View File

@ -826,9 +826,9 @@ IMPL_LINK( View, ExecuteNavigatorDrop, void*, p, void )
if( !pPage->IsMasterPage() ) if( !pPage->IsMasterPage() )
{ {
if( pPage->GetPageKind() == PK_STANDARD ) if( pPage->GetPageKind() == PageKind::Standard )
nPgPos = pPage->GetPageNum() + 2; nPgPos = pPage->GetPageNum() + 2;
else if( pPage->GetPageKind() == PK_NOTES ) else if( pPage->GetPageKind() == PageKind::Notes )
nPgPos = pPage->GetPageNum() + 1; nPgPos = pPage->GetPageNum() + 1;
} }

View File

@ -642,7 +642,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
else else
{ {
SdDrawDocument* pWorkModel = const_cast<SdDrawDocument*>(pOwnData->GetWorkDocument()); SdDrawDocument* pWorkModel = const_cast<SdDrawDocument*>(pOwnData->GetWorkDocument());
SdPage* pWorkPage = pWorkModel->GetSdPage( 0, PK_STANDARD ); SdPage* pWorkPage = pWorkModel->GetSdPage( 0, PageKind::Standard );
pWorkPage->SetRectsDirty(); pWorkPage->SetRectsDirty();
@ -657,7 +657,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{ {
SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( (sal_uInt16) i ) ); SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( (sal_uInt16) i ) );
if( pP->GetPageKind() != PK_STANDARD ) if( pP->GetPageKind() != PageKind::Standard )
pWorkModel->DeletePage( (sal_uInt16) i ); pWorkModel->DeletePage( (sal_uInt16) i );
} }
@ -702,10 +702,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( bReturn ) if( bReturn )
{ {
if( pModel->GetSdPage( 0, PK_STANDARD )->GetObjCount() == 1 ) if( pModel->GetSdPage( 0, PageKind::Standard )->GetObjCount() == 1 )
{ {
// only one object // only one object
SdrObject* pObj = pModel->GetSdPage( 0, PK_STANDARD )->GetObj( 0 ); SdrObject* pObj = pModel->GetSdPage( 0, PageKind::Standard )->GetObj( 0 );
SdrObject* pPickObj2 = nullptr; SdrObject* pPickObj2 = nullptr;
SdrPageView* pPV = nullptr; SdrPageView* pPV = nullptr;
PickObj( rPos, getHitTolLog(), pPickObj2, pPV ); PickObj( rPos, getHitTolLog(), pPickObj2, pPV );
@ -809,7 +809,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !bChanged ) if( !bChanged )
{ {
SdrPage* pWorkPage = pModel->GetSdPage( 0, PK_STANDARD ); SdrPage* pWorkPage = pModel->GetSdPage( 0, PageKind::Standard );
pWorkPage->SetRectsDirty(); pWorkPage->SetRectsDirty();
@ -883,7 +883,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( xDocShRef->DoLoad( pMedium ) ) if( xDocShRef->DoLoad( pMedium ) )
{ {
SdDrawDocument* pModel = xDocShRef->GetDoc(); SdDrawDocument* pModel = xDocShRef->GetDoc();
SdPage* pWorkPage = pModel->GetSdPage( 0, PK_STANDARD ); SdPage* pWorkPage = pModel->GetSdPage( 0, PageKind::Standard );
pWorkPage->SetRectsDirty(); pWorkPage->SetRectsDirty();
@ -901,7 +901,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{ {
SdPage* pP = static_cast< SdPage* >( pModel->GetPage( (sal_uInt16) i ) ); SdPage* pP = static_cast< SdPage* >( pModel->GetPage( (sal_uInt16) i ) );
if( pP->GetPageKind() != PK_STANDARD ) if( pP->GetPageKind() != PageKind::Standard )
pModel->DeletePage( (sal_uInt16) i ); pModel->DeletePage( (sal_uInt16) i );
} }
@ -1212,7 +1212,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{ {
const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument(); const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
SdrPage* pWorkPage = const_cast<SdrPage*>( ( pWorkModel->GetPageCount() > 1 ) ? SdrPage* pWorkPage = const_cast<SdrPage*>( ( pWorkModel->GetPageCount() > 1 ) ?
pWorkModel->GetSdPage( 0, PK_STANDARD ) : pWorkModel->GetSdPage( 0, PageKind::Standard ) :
pWorkModel->GetPage( 0 ) ); pWorkModel->GetPage( 0 ) );
pWorkPage->SetRectsDirty(); pWorkPage->SetRectsDirty();
@ -1244,7 +1244,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{ {
const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument(); const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
SdrPage* pWorkPage = const_cast<SdrPage*>( ( pWorkModel->GetPageCount() > 1 ) ? SdrPage* pWorkPage = const_cast<SdrPage*>( ( pWorkModel->GetPageCount() > 1 ) ?
pWorkModel->GetSdPage( 0, PK_STANDARD ) : pWorkModel->GetSdPage( 0, PageKind::Standard ) :
pWorkModel->GetPage( 0 ) ); pWorkModel->GetPage( 0 ) );
pWorkPage->SetRectsDirty(); pWorkPage->SetRectsDirty();
@ -1293,7 +1293,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{ {
const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument(); const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument();
SdrPage* pWorkPage = const_cast<SdrPage*>( ( pWorkModel->GetPageCount() > 1 ) ? SdrPage* pWorkPage = const_cast<SdrPage*>( ( pWorkModel->GetPageCount() > 1 ) ?
pWorkModel->GetSdPage( 0, PK_STANDARD ) : pWorkModel->GetSdPage( 0, PageKind::Standard ) :
pWorkModel->GetPage( 0 ) ); pWorkModel->GetPage( 0 ) );
pWorkPage->SetRectsDirty(); pWorkPage->SetRectsDirty();

View File

@ -296,7 +296,7 @@ bool TabControl::StartRenaming()
{ {
bool bOK = false; bool bOK = false;
if (pDrViewSh->GetPageKind() == PK_STANDARD) if (pDrViewSh->GetPageKind() == PageKind::Standard)
{ {
bOK = true; bOK = true;

View File

@ -95,7 +95,7 @@ void ModifyPageUndoAction::Undo()
{ {
mpPage->SetName(maOldName); mpPage->SetName(maOldName);
if (mpPage->GetPageKind() == PK_STANDARD) if (mpPage->GetPageKind() == PageKind::Standard)
{ {
SdPage* pNotesPage = static_cast<SdPage*>(mpDoc->GetPage(mpPage->GetPageNum() + 1)); SdPage* pNotesPage = static_cast<SdPage*>(mpDoc->GetPage(mpPage->GetPageNum() + 1));
pNotesPage->SetName(maOldName); pNotesPage->SetName(maOldName);
@ -138,7 +138,7 @@ void ModifyPageUndoAction::Redo()
{ {
mpPage->SetName(maNewName); mpPage->SetName(maNewName);
if (mpPage->GetPageKind() == PK_STANDARD) if (mpPage->GetPageKind() == PageKind::Standard)
{ {
SdPage* pNotesPage = static_cast<SdPage*>(mpDoc->GetPage(mpPage->GetPageNum() + 1)); SdPage* pNotesPage = static_cast<SdPage*>(mpDoc->GetPage(mpPage->GetPageNum() + 1));
pNotesPage->SetName(maNewName); pNotesPage->SetName(maNewName);

View File

@ -464,7 +464,7 @@ bool ViewOverlayManager::CreateTags()
SdPage* pPage = aMainShell.get() ? aMainShell->getCurrentPage() : nullptr; SdPage* pPage = aMainShell.get() ? aMainShell->getCurrentPage() : nullptr;
if( pPage && !pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) if( pPage && !pPage->IsMasterPage() && (pPage->GetPageKind() == PageKind::Standard) )
{ {
const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList(); const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();

View File

@ -513,8 +513,8 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
pPage->SetPaperBin( nPaperBin ); pPage->SetPaperBin( nPaperBin );
pPage->SetBackgroundFullSize( bBackgroundFullSize ); pPage->SetBackgroundFullSize( bBackgroundFullSize );
if ( ePageKind == PK_STANDARD ) if ( ePageKind == PageKind::Standard )
GetDoc()->GetMasterSdPage(i, PK_NOTES)->CreateTitleAndLayout(); GetDoc()->GetMasterSdPage(i, PageKind::Notes)->CreateTitleAndLayout();
pPage->CreateTitleAndLayout(); pPage->CreateTitleAndLayout();
} }
@ -561,9 +561,9 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
pPage->SetPaperBin( nPaperBin ); pPage->SetPaperBin( nPaperBin );
pPage->SetBackgroundFullSize( bBackgroundFullSize ); pPage->SetBackgroundFullSize( bBackgroundFullSize );
if ( ePageKind == PK_STANDARD ) if ( ePageKind == PageKind::Standard )
{ {
SdPage* pNotesPage = GetDoc()->GetSdPage(i, PK_NOTES); SdPage* pNotesPage = GetDoc()->GetSdPage(i, PageKind::Notes);
pNotesPage->SetAutoLayout( pNotesPage->GetAutoLayout() ); pNotesPage->SetAutoLayout( pNotesPage->GetAutoLayout() );
} }
@ -571,8 +571,8 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
} }
// adjust handout page to new format of the standard page // adjust handout page to new format of the standard page
if( (ePageKind == PK_STANDARD) || (ePageKind == PK_HANDOUT) ) if( (ePageKind == PageKind::Standard) || (ePageKind == PageKind::Handout) )
GetDoc()->GetSdPage(0, PK_HANDOUT)->CreateTitleAndLayout(true); GetDoc()->GetSdPage(0, PageKind::Handout)->CreateTitleAndLayout(true);
// handed over undo group to undo manager // handed over undo group to undo manager
pViewShell->GetViewFrame()->GetObjectShell() pViewShell->GetViewFrame()->GetObjectShell()

View File

@ -247,7 +247,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
const SfxUInt32Item* pLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT); const SfxUInt32Item* pLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT);
if( pLayout ) if( pLayout )
{ {
if (ePageKind == PK_NOTES) if (ePageKind == PageKind::Notes)
{ {
eNotesLayout = (AutoLayout) pLayout->GetValue (); eNotesLayout = (AutoLayout) pLayout->GetValue ();
} }
@ -269,7 +269,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if (CHECK_RANGE (AUTOLAYOUT_START, (AutoLayout) pLayout->GetValue (), AUTOLAYOUT_END)) if (CHECK_RANGE (AUTOLAYOUT_START, (AutoLayout) pLayout->GetValue (), AUTOLAYOUT_END))
{ {
if (ePageKind == PK_NOTES) if (ePageKind == PageKind::Notes)
{ {
aNotesPageName = pPageName->GetValue (); aNotesPageName = pPageName->GetValue ();
eNotesLayout = (AutoLayout) pLayout->GetValue (); eNotesLayout = (AutoLayout) pLayout->GetValue ();
@ -352,9 +352,9 @@ SdPage* ViewShell::CreateOrDuplicatePage (
sal_uInt16 nPageCount (pDocument->GetSdPageCount(ePageKind)); sal_uInt16 nPageCount (pDocument->GetSdPageCount(ePageKind));
for (sal_uInt16 i=0; i<nPageCount; i++) for (sal_uInt16 i=0; i<nPageCount; i++)
{ {
pDocument->GetSdPage(i, PK_STANDARD)->SetSelected( pDocument->GetSdPage(i, PageKind::Standard)->SetSelected(
i == nNewPageIndex); i == nNewPageIndex);
pDocument->GetSdPage(i, PK_NOTES)->SetSelected( pDocument->GetSdPage(i, PageKind::Notes)->SetSelected(
i == nNewPageIndex); i == nNewPageIndex);
} }
// Move the selected page to the head of the document // Move the selected page to the head of the document
@ -393,14 +393,14 @@ SdPage* ViewShell::CreateOrDuplicatePage (
} }
SdPage* pNewPage = nullptr; SdPage* pNewPage = nullptr;
if(nNewPageIndex != 0xffff) if(nNewPageIndex != 0xffff)
pNewPage = pDocument->GetSdPage(nNewPageIndex, PK_STANDARD); pNewPage = pDocument->GetSdPage(nNewPageIndex, PageKind::Standard);
if( bUndo ) if( bUndo )
{ {
if( pNewPage ) if( pNewPage )
{ {
pDrView->AddUndo(pDocument->GetSdrUndoFactory().CreateUndoNewPage(*pNewPage)); pDrView->AddUndo(pDocument->GetSdrUndoFactory().CreateUndoNewPage(*pNewPage));
pDrView->AddUndo(pDocument->GetSdrUndoFactory().CreateUndoNewPage(*pDocument->GetSdPage (nNewPageIndex, PK_NOTES))); pDrView->AddUndo(pDocument->GetSdrUndoFactory().CreateUndoNewPage(*pDocument->GetSdPage (nNewPageIndex, PageKind::Notes)));
} }
pDrView->EndUndo(); pDrView->EndUndo();

View File

@ -9,33 +9,33 @@
--> -->
<object-list> <object-list>
<object type="PRESOBJ_DATETIME"> <object type="PRESOBJ_DATETIME">
<object-prop pagekind="PK_STANDARD" relative-height="0.069" relative-width="0.233" relative-posX="0.05" relative-posY="0.911"/> <object-prop pagekind="PageKind::Standard" relative-height="0.069" relative-width="0.233" relative-posX="0.05" relative-posY="0.911"/>
<object-prop pagekind="PK_HANDOUT" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0"/> <object-prop pagekind="PageKind::Handout" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0"/>
<object-prop pagekind="PK_NOTES" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0"/> <object-prop pagekind="PageKind::Notes" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0"/>
</object> </object>
<object type="PRESOBJ_FOOTER"> <object type="PRESOBJ_FOOTER">
<object-prop pagekind="PK_STANDARD" relative-height="0.069" relative-width="0.317" relative-posX="0.342" relative-posY="0.911"/> <object-prop pagekind="PageKind::Standard" relative-height="0.069" relative-width="0.317" relative-posX="0.342" relative-posY="0.911"/>
<object-prop pagekind="PK_HANDOUT" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0.05"/> <object-prop pagekind="PageKind::Handout" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0.05"/>
<object-prop pagekind="PK_NOTES" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0.05"/> <object-prop pagekind="PageKind::Notes" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0.05"/>
</object> </object>
<object type="PRESOBJ_SLIDENUMBER"> <object type="PRESOBJ_SLIDENUMBER">
<object-prop pagekind="PK_STANDARD" relative-height="0.069" relative-width="0.233" relative-posX="0.717" relative-posY="0.911"/> <object-prop pagekind="PageKind::Standard" relative-height="0.069" relative-width="0.233" relative-posX="0.717" relative-posY="0.911"/>
<object-prop pagekind="PK_HANDOUT" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0.05"/> <object-prop pagekind="PageKind::Handout" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0.05"/>
<object-prop pagekind="PK_NOTES" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0.05"/> <object-prop pagekind="PageKind::Notes" relative-height="0.05" relative-width="0.434" relative-posX="0.434" relative-posY="0.05"/>
</object> </object>
<object type="PRESOBJ_HEADER"> <object type="PRESOBJ_HEADER">
<object-prop pagekind="PK_STANDARD" relative-height="0.069" relative-width="0.317" relative-posX="0.717" relative-posY="0.911"/> <object-prop pagekind="PageKind::Standard" relative-height="0.069" relative-width="0.317" relative-posX="0.717" relative-posY="0.911"/>
<object-prop pagekind="PK_HANDOUT" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0"/> <object-prop pagekind="PageKind::Handout" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0"/>
<object-prop pagekind="PK_NOTES" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0"/> <object-prop pagekind="PageKind::Notes" relative-height="0.05" relative-width="0.434" relative-posX="0" relative-posY="0"/>
</object> </object>
<object type="PRESOBJ_TITLE"> <object type="PRESOBJ_TITLE">
<object-prop pagekind="PK_STANDARD" relative-height="0.167" relative-width="0.9" relative-posX="0.05" relative-posY="0.0399"/> <object-prop pagekind="PageKind::Standard" relative-height="0.167" relative-width="0.9" relative-posX="0.05" relative-posY="0.0399"/>
<object-prop pagekind="PK_NOTES" relative-height="0.375" relative-width="1" relative-posX="0" relative-posY="0.076"/> <object-prop pagekind="PageKind::Notes" relative-height="0.375" relative-width="1" relative-posX="0" relative-posY="0.076"/>
</object> </object>
<object type="PRESOBJ_OUTLINE"> <object type="PRESOBJ_OUTLINE">
<object-prop pagekind="PK_STANDARD" relative-height="0.58" relative-width="0.9" relative-posX="0.05" relative-posY="0.234"/> <object-prop pagekind="PageKind::Standard" relative-height="0.58" relative-width="0.9" relative-posX="0.05" relative-posY="0.234"/>
</object> </object>
<object type="PRESOBJ_NOTES"> <object type="PRESOBJ_NOTES">
<object-prop pagekind="PK_NOTES" relative-height="0.45" relative-width="0.8" relative-posX="0.1" relative-posY="0.475"/> <object-prop pagekind="PageKind::Notes" relative-height="0.45" relative-width="0.8" relative-posX="0.1" relative-posY="0.475"/>
</object> </object>
</object-list> </object-list>