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
};
enum PageKind
enum class PageKind
{
PK_STANDARD,
PK_NOTES,
PK_HANDOUT
Standard,
Notes,
Handout,
LAST = Handout
};
enum class EditMode

View File

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

View File

@ -112,11 +112,11 @@ void SdMiscTest::testTdf96206()
auto pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
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);
rSSController.GetClipboard().DoCopy();
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);
xDocSh->DoClose();
@ -130,7 +130,7 @@ void SdMiscTest::testTdf96708()
auto& rSSController = pSSVS->GetSlideSorter().GetController();
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);
rPageSelector.SelectAllPages();
rSSController.GetClipboard().DoCopy();
@ -140,7 +140,7 @@ void SdMiscTest::testTdf96708()
Scheduler::ProcessTaskScheduling(true);
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);
xDocSh->DoClose();

View File

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

View File

@ -1431,9 +1431,9 @@ void EffectMigration::DocumentLoaded(SdDrawDocument & rDoc)
{
if (DocumentType::Draw == rDoc.GetDocumentType())
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())
{
// this will force the equivalent of the MainSequence::onTimerHdl
@ -1442,9 +1442,9 @@ void EffectMigration::DocumentLoaded(SdDrawDocument & rDoc)
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())
{
pPage->getMainSequence()->getRootNode();

View File

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

View File

@ -496,10 +496,10 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
pNewStylePool->CopyCellSheets(*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
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 ) );
SdStyleSheetVector aCreatedSheets;
pNewStylePool->CopyLayoutSheets(aOldLayoutName, *pOldStylePool, aCreatedSheets );
@ -588,7 +588,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
CheckMasterPages();
if ( GetMasterSdPageCount(PK_STANDARD) > 1 )
if ( GetMasterSdPageCount(PageKind::Standard) > 1 )
RemoveUnnecessaryMasterPages( nullptr, true, false );
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
// that where created with the 5.2
nPageCount = GetMasterSdPageCount( PK_STANDARD );
nPageCount = GetMasterSdPageCount( PageKind::Standard );
for (nPage = 0; nPage < nPageCount; nPage++)
{
SdPage* pPage = GetMasterSdPage(nPage, PK_STANDARD);
SdPage* pPage = GetMasterSdPage(nPage, PageKind::Standard);
pSPool->CreateLayoutStyleSheets( pPage->GetName(), true );
}
@ -696,11 +696,11 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
mbNewOrLoadCompleted = true;
// Update all linked pages
sal_uInt16 nMaxSdPages = GetSdPageCount(PK_STANDARD);
sal_uInt16 nMaxSdPages = GetSdPageCount(PageKind::Standard);
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())
{

View File

@ -156,7 +156,7 @@ sal_uInt16 SdDrawDocument::GetPageByName(const OUString& rPgName, bool& rbIsMast
GetPage(nPage)));
if (pPage != nullptr
&& pPage->GetPageKind() != PK_HANDOUT
&& pPage->GetPageKind() != PageKind::Handout
&& pPage->GetName() == rPgName)
{
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
// number
if (pPage && pPage->GetPageKind() == PK_NOTES)
if (pPage && pPage->GetPageKind() == PageKind::Notes)
{
const size_t nObjCount = pPage->GetObjCount();
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)
{
bool bNotes = (pPage->GetPageKind() == PK_NOTES);
bool bNotes = (pPage->GetPageKind() == PageKind::Notes);
SfxItemPool& rPool(GetPool());
sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD);
@ -377,7 +377,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
if (!bLast)
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();
while (pViewShell)
@ -410,7 +410,7 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
if (!bLast)
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();
while (pViewShell)
@ -428,7 +428,7 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 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
SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
@ -440,7 +440,7 @@ void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos )
SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 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
SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
@ -456,7 +456,7 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
{
PageKind ePageKind = pPage->GetPageKind();
if (ePageKind == PK_STANDARD)
if (ePageKind == PageKind::Standard)
{
pPage->SetSelected(bSelect);
@ -468,17 +468,17 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
pNotesPage = static_cast<SdPage*>(GetPage(nDestPageNum));
}
if (pNotesPage && pNotesPage->GetPageKind() == PK_NOTES)
if (pNotesPage && pNotesPage->GetPageKind() == PageKind::Notes)
{
pNotesPage->SetSelected(bSelect);
}
}
else if (ePageKind == PK_NOTES)
else if (ePageKind == PageKind::Notes)
{
pPage->SetSelected(bSelect);
SdPage* pStandardPage = static_cast<SdPage*>( GetPage( pPage->GetPageNum() - 1 ) );
if (pStandardPage && pStandardPage->GetPageKind() == PK_STANDARD)
if (pStandardPage && pStandardPage->GetPageKind() == PageKind::Standard)
pStandardPage->SetSelected(bSelect);
}
}
@ -500,7 +500,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
SdPage* pRefPage = nullptr;
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_HANDOUT );
pRefPage = pRefDocument->GetSdPage( 0, PageKind::Handout );
if( pRefPage )
{
@ -513,14 +513,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
pHandoutPage->SetBorder(0, 0, 0, 0);
}
pHandoutPage->SetPageKind(PK_HANDOUT);
pHandoutPage->SetPageKind(PageKind::Handout);
pHandoutPage->SetName( SD_RESSTR(STR_HANDOUT) );
InsertPage(pHandoutPage, 0);
// Insert master page and register this with the handout page
SdPage* pHandoutMPage = AllocSdPage(true);
pHandoutMPage->SetSize( pHandoutPage->GetSize() );
pHandoutMPage->SetPageKind(PK_HANDOUT);
pHandoutMPage->SetPageKind(PageKind::Handout);
pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(),
pHandoutPage->GetUppBorder(),
pHandoutPage->GetRgtBorder(),
@ -535,7 +535,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
bool bClipboard = false;
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_STANDARD );
pRefPage = pRefDocument->GetSdPage( 0, PageKind::Standard );
if (nPageCount == 0)
{
@ -608,7 +608,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
SdPage* pNotesPage = AllocSdPage(false);
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_NOTES );
pRefPage = pRefDocument->GetSdPage( 0, PageKind::Notes );
if( pRefPage )
{
@ -629,7 +629,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
pNotesPage->SetBorder(0, 0, 0, 0);
}
pNotesPage->SetPageKind(PK_NOTES);
pNotesPage->SetPageKind(PageKind::Notes);
InsertPage(pNotesPage, 2);
if( bClipboard )
pNotesPage->SetLayoutName( pPage->GetLayoutName() );
@ -637,7 +637,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
// Insert master page, then register this with the notes page
SdPage* pNotesMPage = AllocSdPage(true);
pNotesMPage->SetSize( pNotesPage->GetSize() );
pNotesMPage->SetPageKind(PK_NOTES);
pNotesMPage->SetPageKind(PageKind::Notes);
pNotesMPage->SetBorder( pNotesPage->GetLftBorder(),
pNotesPage->GetUppBorder(),
pNotesPage->GetRgtBorder(),
@ -671,10 +671,10 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
{
// Set PageKind
SdPage* pHandoutMPage = static_cast<SdPage*>( GetMasterPage(0) );
pHandoutMPage->SetPageKind(PK_HANDOUT);
pHandoutMPage->SetPageKind(PageKind::Handout);
SdPage* pHandoutPage = static_cast<SdPage*>( GetPage(0) );
pHandoutPage->SetPageKind(PK_HANDOUT);
pHandoutPage->SetPageKind(PageKind::Handout);
pHandoutPage->TRG_SetMasterPage( *pHandoutMPage );
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) );
pNotesPage->SetPageKind(PK_NOTES);
pNotesPage->SetPageKind(PageKind::Notes);
// Set notes master page
sal_uInt16 nMasterPageAfterPagesMasterPage = (pPage->TRG_GetMasterPage()).GetPageNum() + 1;
@ -706,10 +706,10 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
void SdDrawDocument::UnselectAllPages()
{
sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD);
sal_uInt16 nNoOfPages = GetSdPageCount(PageKind::Standard);
for (sal_uInt16 nPage = 0; nPage < nNoOfPages; ++nPage)
{
SdPage* pPage = GetSdPage(nPage, PK_STANDARD);
SdPage* pPage = GetSdPage(nPage, PageKind::Standard);
pPage->SetSelected(false);
}
}
@ -721,7 +721,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
{
SdPage* pPage = nullptr;
sal_uInt16 nPage;
sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD);
sal_uInt16 nNoOfPages = GetSdPageCount(PageKind::Standard);
bool bSomethingHappened = false;
const bool bUndo = IsUndoEnabled();
@ -733,7 +733,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
std::vector<SdPage*> aPageList;
for (nPage = 0; nPage < nNoOfPages; nPage++)
{
pPage = GetSdPage(nPage, PK_STANDARD);
pPage = GetSdPage(nPage, PageKind::Standard);
if (pPage->IsSelected()) {
aPageList.push_back(pPage);
@ -745,11 +745,11 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
if (nPage != (sal_uInt16)-1)
{
pPage = GetSdPage(nPage, PK_STANDARD);
pPage = GetSdPage(nPage, PageKind::Standard);
while (nPage > 0 && pPage->IsSelected())
{
nPage--;
pPage = GetSdPage(nPage, PK_STANDARD);
pPage = GetSdPage(nPage, PageKind::Standard);
}
if (pPage->IsSelected())
@ -783,7 +783,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
else
{
nTargetPage = nPage;
nTargetPage = 2 * nTargetPage + 1; // PK_STANDARD --> absolute
nTargetPage = 2 * nTargetPage + 1; // PageKind::Standard --> absolute
std::vector<SdPage*>::iterator 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
// Initialize Autolayouts
SdPage* pHandoutMPage = GetMasterSdPage(0, PK_HANDOUT);
SdPage* pHandoutMPage = GetMasterSdPage(0, PageKind::Handout);
if (pHandoutMPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
@ -901,7 +901,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl, Timer *, void)
pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, true, true);
}
SdPage* pPage = GetSdPage(0, PK_STANDARD);
SdPage* pPage = GetSdPage(0, PageKind::Standard);
if (pPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
@ -909,7 +909,7 @@ IMPL_LINK_NOARG(SdDrawDocument, WorkStartupHdl, Timer *, void)
pPage->SetAutoLayout(AUTOLAYOUT_NONE, true, true);
}
SdPage* pNotesPage = GetSdPage(0, PK_NOTES);
SdPage* pNotesPage = GetSdPage(0, PageKind::Notes);
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,
that is at position 1 is a PK_STANDARD masterpage followed by a
PK_NOTES masterpage and so on. #
that is at position 1 is a PageKind::Standard masterpage followed by a
PageKind::Notes masterpage and so on. #
*/
void SdDrawDocument::CheckMasterPages()
{
@ -1097,8 +1097,8 @@ void SdDrawDocument::CheckMasterPages()
{
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( ((1 == (nPage & 1)) && (pPage->GetPageKind() != PK_STANDARD) ) ||
((0 == (nPage & 1)) && (pPage->GetPageKind() != PK_NOTES) ) )
if( ((1 == (nPage & 1)) && (pPage->GetPageKind() != PageKind::Standard) ) ||
((0 == (nPage & 1)) && (pPage->GetPageKind() != PageKind::Notes) ) )
break; // then we have a fatal error
}
@ -1114,14 +1114,14 @@ void SdDrawDocument::CheckMasterPages()
while( nPage < nMaxPages )
{
pPage = static_cast<SdPage*> (GetMasterPage( nPage ));
if( pPage->GetPageKind() != PK_STANDARD )
if( pPage->GetPageKind() != PageKind::Standard )
{
bChanged = true;
sal_uInt16 nFound = nPage + 1;
while( nFound < nMaxPages )
{
pPage = static_cast<SdPage*>(GetMasterPage( nFound ));
if( PK_STANDARD == pPage->GetPageKind() )
if( PageKind::Standard == pPage->GetPageKind() )
{
MoveMasterPage( nFound, nPage );
pPage->SetInserted();
@ -1144,7 +1144,7 @@ void SdDrawDocument::CheckMasterPages()
else
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;
@ -1152,7 +1152,7 @@ void SdDrawDocument::CheckMasterPages()
while( nFound < nMaxPages )
{
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 );
pNotesPage->SetInserted();
@ -1173,7 +1173,7 @@ void SdDrawDocument::CheckMasterPages()
while( nFound < nMaxPages )
{
pRefNotesPage = static_cast<SdPage*>(GetMasterPage( nFound ));
if( PK_NOTES == pRefNotesPage->GetPageKind() )
if( PageKind::Notes == pRefNotesPage->GetPageKind() )
break;
nFound++;
}
@ -1181,7 +1181,7 @@ void SdDrawDocument::CheckMasterPages()
pRefNotesPage = nullptr;
SdPage* pNewNotesPage = AllocSdPage(true);
pNewNotesPage->SetPageKind(PK_NOTES);
pNewNotesPage->SetPageKind(PageKind::Notes);
if( pRefNotesPage )
{
pNewNotesPage->SetSize( pRefNotesPage->GetSize() );
@ -1200,7 +1200,7 @@ void SdDrawDocument::CheckMasterPages()
nPage++;
}
// now remove all remaining and unused non PK_STANDARD slides
// now remove all remaining and unused non PageKind::Standard slides
while( nPage < nMaxPages )
{
bChanged = true;
@ -1235,7 +1235,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
// 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.
if (ePageKind == PK_NOTES)
if (ePageKind == PageKind::Notes)
{
pPreviousNotesPage = pActualPage;
sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
@ -1282,7 +1282,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
// Create new notes page and set it up
pNotesPage = AllocSdPage(false);
pNotesPage->SetPageKind(PK_NOTES);
pNotesPage->SetPageKind(PageKind::Notes);
// Use master page of current page
pNotesPage->TRG_SetMasterPage(pPreviousNotesPage->TRG_GetMasterPage());
@ -1306,7 +1306,7 @@ sal_uInt16 SdDrawDocument::CreatePage (
sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum)
{
PageKind ePageKind = PK_STANDARD;
PageKind ePageKind = PageKind::Standard;
// Get current page
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
// of which to make copies.
if (ePageKind == PK_NOTES)
if (ePageKind == PageKind::Notes)
{
pPreviousNotesPage = pActualPage;
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
// that are to be inserted. This makes sure that there is always one
// standard page followed by one notes page.
if (ePageKind == PK_NOTES)
if (ePageKind == PageKind::Notes)
{
pPreviousNotesPage = pActualPage;
nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
@ -1420,7 +1420,7 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
bIsPageObj);
// Set up and insert the notes page
pNotesPage->SetPageKind(PK_NOTES);
pNotesPage->SetPageKind(PageKind::Notes);
SetupNewPage (
pPreviousNotesPage,
pNotesPage,

View File

@ -161,7 +161,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
if( rBookmarkList.empty() )
{
// 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
{
@ -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
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
if (pBMPage && pBMPage->GetPageKind()==PageKind::Standard && !pBMPage->IsMasterPage())
{
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;
}
const sal_uInt16 nSdPageCount = GetSdPageCount(PK_STANDARD);
const sal_uInt32 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PK_STANDARD);
const sal_uInt16 nSdPageCount = GetSdPageCount(PageKind::Standard);
const sal_uInt32 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PageKind::Standard);
const sal_uInt16 nMPageCount = GetMasterPageCount();
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
// before the first page.
// 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());
sal_Int32 nLeft = pRefPage->GetLftBorder();
sal_Int32 nRight = pRefPage->GetRgtBorder();
@ -429,7 +429,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
sal_Int32 nLower = pRefPage->GetLwrBorder();
Orientation eOrient = pRefPage->GetOrientation();
SdPage* pNPage = GetSdPage(0, PK_NOTES);
SdPage* pNPage = GetSdPage(0, PageKind::Notes);
Size aNSize(pNPage->GetSize());
sal_Int32 nNLeft = pNPage->GetLftBorder();
sal_Int32 nNRight = pNPage->GetRgtBorder();
@ -438,7 +438,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
Orientation eNOrient = pNPage->GetOrientation();
// 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 )
{
@ -458,7 +458,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
}
else
{
SdPage* pBMPage = pBookmarkDoc->GetSdPage(0,PK_STANDARD);
SdPage* pBMPage = pBookmarkDoc->GetSdPage(0,PageKind::Standard);
if (pBMPage->GetSize() != pRefPage->GetSize() ||
pBMPage->GetLftBorder() != pRefPage->GetLftBorder() ||
@ -561,7 +561,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
{
SdPage* pBMPage = pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD);
SdPage* pBMPage = pBookmarkDoc->GetSdPage(nBMSdPage, PageKind::Standard);
OUString sName(pBMPage->GetName());
bool bIsMasterPage;
@ -650,7 +650,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
pBMPage = aBookmarkedPages[nPos];
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
bool bMustRename = false;
@ -813,7 +813,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if (nInsertPos > 0)
{
sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2;
sal_uInt16 nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount +
sal_uInt16 nSdPageEnd = GetSdPageCount(PageKind::Standard) - nSdPageCount +
nSdPageStart - 1;
const bool bRemoveEmptyPresObj =
(pBookmarkDoc->GetDocumentType() == DocumentType::Impress) &&
@ -831,7 +831,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++)
{
pRefPage = GetSdPage(nSdPage, PK_STANDARD);
pRefPage = GetSdPage(nSdPage, PageKind::Standard);
if (pExchangeList && pExchangeIter != pExchangeList->end())
{
@ -840,7 +840,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
pRefPage->SetName(aExchangeName);
Broadcast(SdrHint(SdrHintKind::PageOrderChange, pRefPage));
SdPage* pNewNotesPage = GetSdPage(nSdPage, PK_NOTES);
SdPage* pNewNotesPage = GetSdPage(nSdPage, PageKind::Notes);
pNewNotesPage->SetName(aExchangeName);
Broadcast(SdrHint(SdrHintKind::PageOrderChange, pNewNotesPage));
@ -869,7 +869,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if( bRemoveEmptyPresObj )
pRefPage->RemoveEmptyPresentationObjects();
pRefPage = GetSdPage(nSdPage, PK_NOTES);
pRefPage = GetSdPage(nSdPage, PageKind::Notes);
// update layout and referred master page
pRefPage->SetPresentationLayout(aLayout);
@ -897,7 +897,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++)
{
pRefPage = static_cast<SdPage*>( GetMasterPage(nPage) );
if (pRefPage->GetPageKind() == PK_STANDARD)
if (pRefPage->GetPageKind() == PageKind::Standard)
{
if (bScaleObjects)
{
@ -1059,7 +1059,7 @@ bool SdDrawDocument::InsertBookmarkAsObject(
pView->EndListening(*this);
// 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)
{
@ -1203,7 +1203,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
}
// 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--)
{
SdPage* pMaster = pMasterPage;
@ -1211,8 +1211,8 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
if (!pMaster)
{
pMaster = GetMasterSdPage( (sal_uInt16) nMPage, PK_STANDARD );
pNotesMaster = GetMasterSdPage( (sal_uInt16) nMPage, PK_NOTES );
pMaster = GetMasterSdPage( (sal_uInt16) nMPage, PageKind::Standard );
pNotesMaster = GetMasterSdPage( (sal_uInt16) nMPage, PageKind::Notes );
}
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 &&
pNotesMaster )
{
@ -1240,9 +1240,9 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{
// remove only duplicate pages
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 &&
pMPg->GetLayoutName() == aLayoutName )
{
@ -1264,7 +1264,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
if( (pShownPage == pMaster) || (pShownPage == pNotesMaster) )
{
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);
}
SdPage* pSelectedPage = GetSdPage(nSdPageNum, PK_STANDARD);
SdPage* pSelectedPage = GetSdPage(nSdPageNum, PageKind::Standard);
SdPage* pNotes = static_cast<SdPage*>( GetPage(pSelectedPage->GetPageNum()+1) );
SdPage& rOldMaster = static_cast<SdPage&>(pSelectedPage->TRG_GetMasterPage());
SdPage& rOldNotesMaster = static_cast<SdPage&>(pNotes->TRG_GetMasterPage());
@ -1442,8 +1442,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (rLayoutName.isEmpty())
{
// No LayoutName: take first MasterPage
pMaster = pSourceDoc->GetMasterSdPage(0, PK_STANDARD);
pNotesMaster = pSourceDoc->GetMasterSdPage(0, PK_NOTES);
pMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Standard);
pNotesMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Notes);
}
else
{
@ -1457,9 +1457,9 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (pMP->GetLayoutName() == aSearchFor)
{
if (pMP->GetPageKind() == PK_STANDARD)
if (pMP->GetPageKind() == PageKind::Standard)
pMaster = pMP;
if (pMP->GetPageKind() == PK_NOTES)
if (pMP->GetPageKind() == PageKind::Notes)
pNotesMaster = pMP;
}
if (pMaster && pNotesMaster)
@ -1472,8 +1472,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if( (pMaster == nullptr) || (pNotesMaster == nullptr) )
{
// so take the first MasterPage
pMaster = pSourceDoc->GetMasterSdPage(0, PK_STANDARD);
pNotesMaster = pSourceDoc->GetMasterSdPage(0, PK_NOTES);
pMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Standard);
pNotesMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Notes);
}
}
@ -1834,7 +1834,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
pMaster->SetAutoLayout(AUTOLAYOUT_NONE, true, true);
pNotesMaster = AllocSdPage(true);
pNotesMaster->SetPageKind(PK_NOTES);
pNotesMaster->SetPageKind(PageKind::Notes);
pNotesMaster->SetSize(pNotes->GetSize());
pNotesMaster->SetBorder(pNotes->GetLftBorder(),
pNotes->GetUppBorder(),
@ -1876,7 +1876,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{
AutoLayout eOldAutoLayout = (*pIter)->GetAutoLayout();
AutoLayout eNewAutoLayout =
(*pIter)->GetPageKind() == PK_STANDARD ? AUTOLAYOUT_NONE : AUTOLAYOUT_NOTES;
(*pIter)->GetPageKind() == PageKind::Standard ? AUTOLAYOUT_NONE : AUTOLAYOUT_NOTES;
if( bUndo )
{
@ -1926,7 +1926,7 @@ void SdDrawDocument::Merge(SdrModel& rSourceModel,
for( sal_uInt16 nMaster = nMasterPageCount; nMaster < GetMasterPageCount(); 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
SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );

View File

@ -84,7 +84,7 @@ SdPageLink::~SdPageLink()
if (aBookmarkName.isEmpty())
{
// 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);
}

View File

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

View File

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

View File

@ -121,9 +121,9 @@ SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pD
msTableFamilyName = xNamed->getName();
// 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 )
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())
{
SdPage* pPage = pDoc->GetSdPage(0, PK_STANDARD);
SdPage* pPage = pDoc->GetSdPage(0, PageKind::Standard);
if (pPage)
{
aRealStyle = pDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName();
aRealStyle = pDoc->GetSdPage(0, PageKind::Standard)->GetLayoutName();
}
else
{

View File

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

View File

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

View File

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

View File

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

View File

@ -402,9 +402,9 @@ sal_Int32 ReadThroughComponent(
//numbering level matches that of the outline level it previews
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);
if (!pMasterOutline)
continue;

View File

@ -791,7 +791,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
::sd::PresentationViewShell* pPresViewSh = static_cast< ::sd::PresentationViewShell*>(mpViewShell);
SdPage* pCurrPge = pPresViewSh->getCurrentPage();
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)
{
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)) ;
sName = ";total-pages:";
sValue += sName;
sValue += OUString::number(pDoc->GetSdPageCount(PK_STANDARD)) ;
sValue += OUString::number(pDoc->GetSdPageCount(PageKind::Standard)) ;
sValue += ";";
}
}

View File

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

View File

@ -560,7 +560,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
SdPage* pCurrentPage = GetCurrentPage();
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() );
@ -1102,10 +1102,10 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool 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)
return mpDoc->GetMasterSdPage( (mpDoc->GetDocumentType() == DocumentType::Impress) ? 0 : 1, PK_STANDARD );
return mpDoc->GetMasterSdPage( (mpDoc->GetDocumentType() == DocumentType::Impress) ? 0 : 1, PageKind::Standard );
}
nPageNum++;
}
@ -1116,13 +1116,13 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
nPageNum--;
}
return mpDoc->GetSdPage(nPageNum, PK_STANDARD);
return mpDoc->GetSdPage(nPageNum, PageKind::Standard);
}
else
{
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
}
@ -1133,24 +1133,24 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
if( nPageNum == (mpDoc->GetDocumentType() == DocumentType::Impress ? 0 : 1) )
{
// 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--;
}
return mpDoc->GetMasterSdPage(nPageNum,PK_STANDARD);
return mpDoc->GetMasterSdPage(nPageNum,PageKind::Standard);
}
}
SdPage* AnnotationManagerImpl::GetFirstPage()
{
// return first drawing page
return mpDoc->GetSdPage(0, PK_STANDARD );
return mpDoc->GetSdPage(0, PageKind::Standard );
}
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()

View File

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

View File

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

View File

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

View File

@ -106,12 +106,12 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt )
ScopedVclPtrInstance<SdTemplatePopup_Impl> aPop;
{
const sal_uInt16 nMasterCount = pDoc->GetMasterSdPageCount(PK_STANDARD);
const sal_uInt16 nMasterCount = pDoc->GetMasterSdPageCount(PageKind::Standard);
sal_uInt16 nCount = 0;
for( sal_uInt16 nPage = 0; nPage < nMasterCount; ++nPage )
{
SdPage* pMaster = pDoc->GetMasterSdPage(nPage, PK_STANDARD);
SdPage* pMaster = pDoc->GetMasterSdPage(nPage, PageKind::Standard);
if( pMaster )
aPop->InsertItem( ++nCount, pMaster->GetName() );
}
@ -120,7 +120,7 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt )
sal_uInt16 nCurrId = aPop->GetCurId()-1;
if( nCurrId < nMasterCount )
{
SdPage* pMaster = pDoc->GetMasterSdPage(nCurrId, PK_STANDARD);
SdPage* pMaster = pDoc->GetMasterSdPage(nCurrId, PageKind::Standard);
SfxStringItem aStyle( ATTR_PRESLAYOUT_NAME, pMaster->GetName() );
pViewFrame->GetDispatcher()->ExecuteList(
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< container::XIndexAccess > xIndexAccess( xDrawPages, uno::UNO_QUERY );
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
return xSlide;
}
@ -759,7 +759,7 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize )
CapSize.Height() = aPageSize.Height/6;
CapPos.X() = 0;
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
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 )
{
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD);
SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
SdrObject* pObject;
// 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);
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD);
SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
SdrObject *const pObject = pPage->GetObj(m_nCurrentFrame);
if( pObject )
{
@ -708,7 +708,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// clone object(s) and insert the clone(s) into the list
const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
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();
if (nMarkCount > 0)
@ -1013,7 +1013,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// calculate offset for the specified direction
Size aOffset;
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)
{

View File

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

View File

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

View File

@ -175,12 +175,12 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
SdPage* pSlide;
SdPage* pNotes;
if( pCurrentPage->GetPageKind() == PK_STANDARD )
if( pCurrentPage->GetPageKind() == PageKind::Standard )
{
pSlide = pCurrentPage;
pNotes = static_cast<SdPage*>(pDoc->GetPage( pCurrentPage->GetPageNum() + 1 ));
}
else if( pCurrentPage->GetPageKind() == PK_NOTES )
else if( pCurrentPage->GetPageKind() == PageKind::Notes )
{
pNotes = pCurrentPage;
pSlide = static_cast<SdPage*>(pDoc->GetPage( pCurrentPage->GetPageNum() -1 ));
@ -189,8 +189,8 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
else
{
// handout
pSlide = pDoc->GetSdPage( 0, PK_STANDARD );
pNotes = pDoc->GetSdPage( 0, PK_NOTES );
pSlide = pDoc->GetSdPage( 0, PageKind::Standard );
pNotes = pDoc->GetSdPage( 0, PageKind::Notes );
mpCurrentPage = nullptr;
}
@ -228,7 +228,7 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
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;
mpSlideTabPage->init( maSlideSettings, bNotOnTitle );
@ -324,19 +324,19 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
// apply to all slides
if( bToAll )
{
int nPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
int nPageCount = mpDoc->GetSdPageCount( PageKind::Standard );
int 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 );
}
}
else
{
// apply only to the current slide
DBG_ASSERT( mpCurrentPage && mpCurrentPage->GetPageKind() == PK_STANDARD, "no current page to apply to!" );
if( mpCurrentPage && (mpCurrentPage->GetPageKind() == PK_STANDARD) )
DBG_ASSERT( mpCurrentPage && mpCurrentPage->GetPageKind() == PageKind::Standard, "no current page to apply to!" );
if( mpCurrentPage && (mpCurrentPage->GetPageKind() == PageKind::Standard) )
{
change( pUndoGroup, mpCurrentPage, aNewSettings );
}
@ -347,13 +347,13 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
if( bNewNotOnTitle )
{
// 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.mbSlideNumberVisible = false;
aTempSettings.mbDateTimeVisible = false;
change( pUndoGroup, mpDoc->GetSdPage( 0, PK_STANDARD ), aTempSettings );
change( pUndoGroup, mpDoc->GetSdPage( 0, PageKind::Standard ), aTempSettings );
}
// now notes settings
@ -365,17 +365,17 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
if( !bForceSlides || !(aNewSettings == maNotesHandoutSettings) )
{
// first set to all notes pages
int nPageCount = mpDoc->GetSdPageCount( PK_NOTES );
int nPageCount = mpDoc->GetSdPageCount( PageKind::Notes );
int 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 );
}
// 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
@ -416,7 +416,7 @@ HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument*
get(mpCTPreview, "preview");
mpCTPreview->init( pActualPage ?
(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 )
{
@ -591,26 +591,26 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
// if set, set it on all notes master pages
if( bSet )
{
sal_uInt16 nPageCount = mpDoc->GetMasterSdPageCount( PK_NOTES );
sal_uInt16 nPageCount = mpDoc->GetMasterSdPageCount( PageKind::Notes );
sal_uInt16 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
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( 0, PK_NOTES ) );
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( 0, PageKind::Notes ) );
}
else
{
// get the language from the first master page
// 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;
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)
{
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* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_FOOTER));
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 )
{
mpCurrentPage = pDoc->GetMasterSdPage( 0, PK_STANDARD );
mpCurrentPage = pDoc->GetMasterSdPage( 0, PageKind::Standard );
OSL_FAIL( "MasterLayoutDialog::MasterLayoutDialog() - no current page?" );
}
switch( mpCurrentPage->GetPageKind() )
{
case PK_STANDARD:
case PageKind::Standard:
{
mpCBHeader->Enable(false);
mpCBPageNumber->SetText(mpCBSlideNumber->GetText());
break;
}
case PK_NOTES:
case PageKind::Notes:
break;
case PK_HANDOUT:
case PageKind::Handout:
break;
}
@ -100,7 +100,7 @@ void MasterLayoutDialog::applyChanges()
{
mpDoc->BegUndo(GetText());
if( (mpCurrentPage->GetPageKind() != PK_STANDARD) && (mbOldHeader != (bool) mpCBHeader->IsChecked() ) )
if( (mpCurrentPage->GetPageKind() != PageKind::Standard) && (mbOldHeader != (bool) mpCBHeader->IsChecked() ) )
{
if( mbOldHeader )
remove( PRESOBJ_HEADER );

View File

@ -151,7 +151,7 @@ void SdPresLayoutDlg::FillValueSet()
for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++)
{
SdPage* pMaster = static_cast<SdPage*>(pDoc->GetMasterPage(nLayout));
if (pMaster->GetPageKind() == PK_STANDARD)
if (pMaster->GetPageKind() == PageKind::Standard)
{
OUString aLayoutName(pMaster->GetLayoutName());
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++)
{
SdPage* pMaster = static_cast<SdPage*>( pTemplDoc->GetMasterPage(nLayout) );
if (pMaster->GetPageKind() == PK_STANDARD)
if (pMaster->GetPageKind() == PageKind::Standard)
{
OUString aLayoutName(pMaster->GetLayoutName());
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++ )
{
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;
SdrObjListIter aIter( *pPage, SdrIterMode::Flat );
while( aIter.IsMore() )
@ -515,8 +515,8 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, bool bAllPages,
while( nPage < nMaxPages )
{
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) );
if( (mbShowAllPages || pPage->GetPageKind() == PK_STANDARD)
&& !(pPage->GetPageKind()==PK_HANDOUT) ) //#94954# never list the normal handout page ( handout-masterpage is used instead )
if( (mbShowAllPages || pPage->GetPageKind() == PageKind::Standard)
&& !(pPage->GetPageKind()==PageKind::Handout) ) //#94954# never list the normal handout page ( handout-masterpage is used instead )
{
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.
* If a doc is provided, this will be the used doc (important by more than
* one document).
@ -824,7 +824,7 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
while( nPage < nMaxPages )
{
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) );
if( pPage->GetPageKind() == PK_STANDARD )
if( pPage->GetPageKind() == PageKind::Standard )
{
if( !pEntry )
return false;
@ -918,7 +918,7 @@ void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry )
while( nPage < nMaxPages )
{
SdPage* pPage = static_cast<SdPage*>( mpBookmarkDoc->GetPage( nPage ) );
if( pPage->GetPageKind() == PK_STANDARD )
if( pPage->GetPageKind() == PageKind::Standard )
{
pPageEntry = InsertEntry( pPage->GetName(),
aImgPage,
@ -1194,7 +1194,7 @@ void SdPageObjsTLB::DoDrag()
if( eDragType == NAVIGATOR_DRAGTYPE_LINK )
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.
nDNDActions = DND_ACTION_COPY;

View File

@ -66,28 +66,28 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
if( !rViews.empty() )
{
sd::FrameView* pFrameView = rViews[0];
if( pFrameView->GetPageKind() == PK_STANDARD )
if( pFrameView->GetPageKind() == PageKind::Standard )
{
sal_uInt16 nSelectedPage = pFrameView->GetSelectedPage();
pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PK_STANDARD);
pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PageKind::Standard);
}
}
if( nullptr == pSelectedPage )
{
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++)
{
pPage = mpDoc->GetSdPage(i, PK_STANDARD);
pPage = mpDoc->GetSdPage(i, PageKind::Standard);
if ( pPage->IsSelected() )
pSelectedPage = pPage;
}
if( nullptr == pSelectedPage )
pSelectedPage = mpDoc->GetSdPage(0, PK_STANDARD);
pSelectedPage = mpDoc->GetSdPage(0, PageKind::Standard);
}
Rectangle aVisArea = GetVisArea(nAspect);
@ -130,7 +130,7 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
// provide size of first page
MapMode aSrcMapMode(MapUnit::MapPixel);
MapMode aDstMapMode(MapUnit::Map100thMM);
Size aSize = mpDoc->GetSdPage(0, PK_STANDARD)->GetSize();
Size aSize = mpDoc->GetSdPage(0, PageKind::Standard)->GetSize();
aSrcMapMode.SetMapUnit(MapUnit::Map100thMM);
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!
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 )
SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) );
@ -768,7 +768,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
// or the handout view.
PageKind eNewPageKind = pPage->GetPageKind();
if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DocumentType::Draw) )
if( (eNewPageKind != PageKind::Standard) && (mpDoc->GetDocumentType() == DocumentType::Draw) )
return false;
if (eNewPageKind != pDrawViewShell->GetPageKind())
@ -778,13 +778,13 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
OUString sViewURL;
switch (eNewPageKind)
{
case PK_STANDARD:
case PageKind::Standard:
sViewURL = FrameworkHelper::msImpressViewURL;
break;
case PK_NOTES:
case PageKind::Notes:
sViewURL = FrameworkHelper::msNotesViewURL;
break;
case PK_HANDOUT:
case PageKind::Handout:
sViewURL = FrameworkHelper::msHandoutViewURL;
break;
default:
@ -996,10 +996,10 @@ bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
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)
{
OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName();
OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PageKind::Standard)->GetLayoutName();
OUString aNewLayoutName = aLayoutName;
// Don't add suffix for the first master page
if( i > 0 )

View File

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

View File

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

View File

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

View File

@ -135,7 +135,7 @@ void FuPage::DoExecute( SfxRequest& )
{
mbMasterPage = mpDrawViewShell->GetEditMode() == EditMode::MasterPage;
// 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 );
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
// notice-masterpage (at the moment)
if( ePageKind != PK_NOTES )
if( ePageKind != PageKind::Notes )
{
ScopedVclPtrInstance<MessageDialog> aQuestionBox(
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)
{
SdPage *pPage = *it;
if (pPage->IsSelected() || pPage->GetPageKind() != PK_STANDARD)
if (pPage->IsSelected() || pPage->GetPageKind() != PageKind::Standard)
continue;
mpDoc->SetSelected(pPage, true);
aUnselect.push_back(pPage);
@ -126,9 +126,9 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
std::vector<SdPage*> aSelectedPages;
std::vector<sal_uInt16> aSelectedPageNums;
// 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())
{
aSelectedPages.push_back(pPage);
@ -251,7 +251,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
{
sal_uInt16 nPgNum = pSelectedPage->TRG_GetMasterPage().GetPageNum();
if (static_cast<DrawViewShell*>(mpViewShell)->GetPageKind() == PK_NOTES)
if (static_cast<DrawViewShell*>(mpViewShell)->GetPageKind() == PageKind::Notes)
nPgNum++;
pView->HideSdrPage();

View File

@ -61,15 +61,15 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings();
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;
OUString aFirstPage;
SdPage* pPage = nullptr;
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() );
if ( aStr.isEmpty() )

View File

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

View File

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

View File

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

View File

@ -122,13 +122,13 @@ void CurrentMasterPagesSelector::LateInit()
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
// avoid double insertion.
::std::set<OUString> aMasterPageNames;
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)
continue;
@ -168,13 +168,13 @@ void CurrentMasterPagesSelector::UpdateSelection()
{
// Iterate over all pages and for the selected ones put the name of
// their master page into a set.
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PageKind::Standard);
::std::set<OUString> aNames;
sal_uInt16 nIndex;
bool bLoop (true);
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->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
// master page already exists.
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++)
{
SdPage* pCandidate = rTargetDocument.GetMasterSdPage (nMaster, PK_STANDARD);
SdPage* pCandidate = rTargetDocument.GetMasterSdPage (nMaster, PageKind::Standard);
if (pMasterPage!=nullptr
&& pCandidate->GetName() == pMasterPage->GetName())
{
@ -120,8 +120,8 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Set a layout.
SdPage* pSlide = rTargetDocument.GetSdPage(
rTargetDocument.GetSdPageCount(PK_STANDARD)-1,
PK_STANDARD);
rTargetDocument.GetSdPageCount(PageKind::Standard)-1,
PageKind::Standard);
if (pSlide == nullptr)
break;
pSlide->SetAutoLayout(AUTOLAYOUT_TITLE, true);
@ -139,7 +139,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Make the connection from the new slide to the master page
// (and do the same for the notes page.)
rTargetDocument.SetMasterPage (
rTargetDocument.GetSdPageCount(PK_STANDARD)-1,
rTargetDocument.GetSdPageCount(PageKind::Standard)-1,
pNewMasterPage->GetName(),
&rTargetDocument,
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
// 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
// the last page.
sal_uInt16 nPageIndex (pDocument->GetSdPageCount(PK_STANDARD)-1);
sal_uInt16 nPageIndex (pDocument->GetSdPageCount(PageKind::Standard)-1);
bool bFound (false);
while ( ! bFound)
{
pCandidate = pDocument->GetSdPage(
nPageIndex,
PK_STANDARD);
PageKind::Standard);
if (pCandidate != nullptr)
{
if (static_cast<SdPage*>(&pCandidate->TRG_GetMasterPage())
@ -432,10 +432,10 @@ void DocumentHelper::AssignMasterPageToPage (
{
// Find first slide that uses the master page.
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++)
{
SdrPage* pCandidate = pDocument->GetSdPage(nPage,PK_STANDARD);
SdrPage* pCandidate = pDocument->GetSdPage(nPage,PageKind::Standard);
if (pCandidate != nullptr
&& pCandidate->TRG_HasMasterPage()
&& &(pCandidate->TRG_GetMasterPage()) == pPage)

View File

@ -130,7 +130,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
SdDrawDocument* pDocument = pDocumentShell->GetDoc();
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
// when copied into documents it is marked as no "precious".
// When it is modified then it is marked as "precious".
@ -179,7 +179,7 @@ SdPage* DefaultPageObjectProvider::operator () (SdDrawDocument* pContainerDocume
if (pContainerDocument != nullptr)
{
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())
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.
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++)
{
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD);
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage != nullptr)
aMasterPageSet.insert (pMasterPage->GetName());
}
@ -236,8 +236,8 @@ void MasterPageObserver::Implementation::Notify(
{
SdDrawDocument& rDocument (
static_cast<SdDrawDocument&>(rBroadcaster));
if (rDocument.GetMasterSdPageCount(PK_STANDARD)
== rDocument.GetMasterSdPageCount(PK_NOTES))
if (rDocument.GetMasterSdPageCount(PageKind::Standard)
== rDocument.GetMasterSdPageCount(PageKind::Notes))
{
AnalyzeUsedMasterPages (rDocument);
}
@ -254,11 +254,11 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages (
SdDrawDocument& rDocument)
{
// 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;
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)
aCurrentMasterPages.insert (pMasterPage->GetName());
OSL_TRACE("currently used master page %d is %s",

View File

@ -355,7 +355,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
if (pMasterPage == nullptr)
return;
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PageKind::Standard);
if (nPageCount == 0)
return;
@ -367,7 +367,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
new ::sd::slidesorter::SlideSorterViewShell::PageSelection());
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)
{
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.
MasterPageObserver::MasterPageNameSet aCurrentNames;
sal_uInt16 nMasterPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD);
sal_uInt16 nMasterPageCount = mrDocument.GetMasterSdPageCount(PageKind::Standard);
sal_uInt16 nIndex;
for (nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD);
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage != nullptr)
aCurrentNames.insert (pMasterPage->GetName());
}

View File

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

View File

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

View File

@ -886,12 +886,12 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( pStartPage )
{
if( pStartPage->GetPageKind() == PK_NOTES )
if( pStartPage->GetPageKind() == PageKind::Notes )
{
// we are in notes page mode, so get
// the corresponding draw page
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( pStartPage->GetPageKind() == PK_STANDARD )
if( pStartPage->GetPageKind() == PageKind::Standard )
{
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 ( nPgNum - 1) >> 1;
@ -2037,7 +2037,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void)
{
if( mpSlideController->isVisibleSlideNumber( nPageNumber ) )
{
SdPage* pPage = mpDoc->GetSdPage((sal_uInt16)nPageNumber, PK_STANDARD);
SdPage* pPage = mpDoc->GetSdPage((sal_uInt16)nPageNumber, PageKind::Standard);
if (pPage)
{
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 )
{
const sal_uInt16 nSlideCount = mpDoc->GetSdPageCount( PK_STANDARD );
const sal_uInt16 nSlideCount = mpDoc->GetSdPageCount( PageKind::Standard );
if( nSlideCount )
{
@ -2320,7 +2320,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
for( nSlide = 0, nFirstVisibleSlide = -1;
( 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 )
{
@ -2339,7 +2339,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
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) )
mpSlideController->insertSlideNumber( i, bVisible );
}
@ -2352,7 +2352,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
{
sal_Int32 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;
if( nSlide < nSlideCount )
@ -2365,7 +2365,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
{
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 );
}
}

View File

@ -333,7 +333,7 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (Ru
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() );
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();
if (pDataDoc!=nullptr
&& pDataDoc->GetSdPageCount(PK_STANDARD))
&& pDataDoc->GetSdPageCount(PageKind::Standard))
{
const SolarMutexGuard aGuard;
bMergeMasterPages = (pDataDoc != rModel.GetDocument());
nInsertPageCount = pDataDoc->GetSdPageCount( PK_STANDARD );
nInsertPageCount = pDataDoc->GetSdPageCount( PageKind::Standard );
rModel.GetDocument()->InsertBookmarkAsPage(
std::vector<OUString>(),
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.
SdDrawDocument* pDocument (mrSlideSorter.GetModel().GetDocument());
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
// (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.
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)
{
const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD);
const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PageKind::Standard);
if (pCandidate!=nullptr && pCandidate->TRG_HasMasterPage())
{
if (&pCandidate->TRG_GetMasterPage() == pPage)

View File

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

View File

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

View File

@ -401,7 +401,7 @@ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest)
mpImpl->ProcessModifyPageSlot (
rRequest,
pCurrentPage,
PK_STANDARD);
PageKind::Standard);
Cancel();
rRequest.Done ();
}
@ -752,7 +752,7 @@ void SlideSorterViewShell::GetStateMovePageFirst (SfxItemSet& rSet)
{
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
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_UP );
@ -813,7 +813,7 @@ void SlideSorterViewShell::ExecMovePageDown (SfxRequest& /*rReq*/)
sal_uInt16 lastSelectedPageNo = SyncPageSelectionToDocument(xSelection).second;
// 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
lastSelectedPageNo = (lastSelectedPageNo - 1) / 2;
@ -842,7 +842,7 @@ void SlideSorterViewShell::ExecMovePageLast (SfxRequest& /*rReq*/)
SyncPageSelectionToDocument(xSelection);
// 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)
GetDoc()->MovePages( nNoOfPages - 1 );
@ -854,7 +854,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
{
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
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_DOWN );
@ -868,7 +868,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
sal_uInt16 lastSelectedPageNo = SyncPageSelectionToDocument(xSelection).second;
// 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
lastSelectedPageNo = (lastSelectedPageNo - 1) / 2;
@ -881,10 +881,10 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
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++)
{
SdPage* pPage = GetDoc()->GetSdPage(nPage, PK_STANDARD);
SdPage* pPage = GetDoc()->GetSdPage(nPage, PageKind::Standard);
GetDoc()->SetSelected(pPage, false);
}

View File

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

View File

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

View File

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

View File

@ -179,7 +179,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
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},
DRAW_PAGE_NOTES_PROPERTIES
};
@ -218,13 +218,13 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
GRAPHIC_PAGE_PROPERTIES
};
bool bWithoutBackground = ePageKind != PK_STANDARD && ePageKind != PK_HANDOUT;
bool bWithoutBackground = ePageKind != PageKind::Standard && ePageKind != PageKind::Handout;
const SvxItemPropertySet* pRet = nullptr;
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() );
pRet = &aDrawPagePropertySet_Impl;
}
@ -306,7 +306,7 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind )
};
const SvxItemPropertySet* pRet = nullptr;
if( ePageKind == PK_HANDOUT )
if( ePageKind == PageKind::Handout )
{
static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
pRet = &aHandoutMasterPagePropertySet_Impl;
@ -475,7 +475,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
}
else if( aType == "PageShape" )
{
if( GetPage()->GetPageKind() == PK_NOTES && GetPage()->IsMasterPage() )
if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
eObjKind = PRESOBJ_TITLE;
else
eObjKind = PRESOBJ_PAGE;
@ -584,9 +584,9 @@ Any SAL_CALL SdGenericDrawPage::queryInterface( const uno::Type & rType )
}
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 ) );
}
else
@ -946,7 +946,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
}
case WID_PAGE_NUMBER:
if( (GetPage()->GetPageKind() == PK_HANDOUT) && !GetPage()->IsMasterPage() )
if( (GetPage()->GetPageKind() == PageKind::Handout) && !GetPage()->IsMasterPage() )
{
if( !(aValue >>= mnTempPageNumber) )
throw lang::IllegalArgumentException();
@ -1121,11 +1121,11 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
if ( pDocShell )
{
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 );
while( nPgNum < nPageCount )
{
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PK_STANDARD ), nPgNum == nPageNumber );
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
nPgNum++;
}
std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
@ -1162,11 +1162,11 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
if ( pDocShell )
{
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 );
while( nPgNum < nPageCount )
{
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PK_STANDARD ), nPgNum == nPageNumber );
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
nPgNum++;
}
std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
@ -1417,7 +1417,7 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co
{
case OBJ_TITLETEXT:
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
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() )
{
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 ) );
}
@ -2114,8 +2114,8 @@ Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes() throw(uno::RuntimeExceptio
if( maTypeSequence.getLength() == 0 )
{
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD;
bool bPresPage = IsImpressDocument() && ePageKind != PK_HANDOUT;
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
bool bPresPage = IsImpressDocument() && ePageKind != PageKind::Handout;
// Collect the types of this class.
::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());
if( bPresPage )
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());
// Get types of base class.
@ -2291,7 +2291,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
OUString aName( rName );
if(GetPage() && GetPage()->GetPageKind() != PK_NOTES)
if(GetPage() && GetPage()->GetPageKind() != PageKind::Notes)
{
// check if this is the default 'page1234' name
if(aName.startsWith( sEmptyPageName ))
@ -2330,9 +2330,9 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
GetPage()->SetName( aName );
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 )
pNotesPage->SetName(aName);
}
@ -2418,7 +2418,7 @@ void SAL_CALL SdDrawPage::setMasterPage( const Reference< drawing::XDrawPage >&
static_cast<SdPage*>(SvxFmDrawPage::mpPage)->SetLayoutName( pSdPage->GetLayoutName() );
// 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();
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() )
{
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 )
{
Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY );
@ -2703,7 +2703,7 @@ Any SdGenericDrawPage::getNavigationOrder()
// class SdMasterPage
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);
else if( rType == cppu::UnoType<presentation::XPresentationPage>::get() &&
( IsImpressDocument() &&
GetPage() && GetPage()->GetPageKind() != PK_HANDOUT) )
GetPage() && GetPage()->GetPageKind() != PageKind::Handout) )
aAny <<= Reference< presentation::XPresentationPage >( this );
else
return SdGenericDrawPage::queryInterface( rType );
@ -2758,8 +2758,8 @@ Sequence< uno::Type > SAL_CALL SdMasterPage::getTypes() throw(uno::RuntimeExcept
if( maTypeSequence.getLength() == 0 )
{
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD;
bool bPresPage = IsImpressDocument() && SvxFmDrawPage::mpPage && ePageKind != PK_HANDOUT;
const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PageKind::Standard;
bool bPresPage = IsImpressDocument() && SvxFmDrawPage::mpPage && ePageKind != PageKind::Handout;
// Collect the types of this class.
::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());
if( bPresPage )
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());
// Get types of base class.
@ -2817,7 +2817,7 @@ Sequence< OUString > SAL_CALL SdMasterPage::getSupportedServiceNames() throw(uno
Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() );
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"} );
return aSeq;
@ -3040,7 +3040,7 @@ void SAL_CALL SdMasterPage::setName( const OUString& rName )
throwIfDisposed();
if(SvxFmDrawPage::mpPage && GetPage()->GetPageKind() != PK_NOTES)
if(SvxFmDrawPage::mpPage && GetPage()->GetPageKind() != PageKind::Notes)
{
SdDrawDocument* pDoc = GetModel()->GetDoc();
bool bOutDummy;
@ -3102,7 +3102,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdMasterPage::getNotesPage()
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 )
{
Reference< drawing::XDrawPage > xPage( pNotesPage->getUnoPage(), uno::UNO_QUERY );

View File

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

View File

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

View File

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

View File

@ -160,14 +160,14 @@ sal_uInt16 ViewClipboard::DetermineInsertPosition (
const SdTransferable& )
{
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
// 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++ )
{
SdPage* pPage = rDoc.GetSdPage( nPage, PK_STANDARD );
SdPage* pPage = rDoc.GetSdPage( nPage, PageKind::Standard );
if( pPage->IsSelected() )
nInsertPos = nPage * 2 + 3;
@ -204,8 +204,8 @@ sal_uInt16 ViewClipboard::InsertSlides (
pDataDocSh = static_cast<DrawDocShell*>(pShell);
SdDrawDocument* pDataDoc = pDataDocSh->GetDoc();
if (pDataDoc!=nullptr && pDataDoc->GetSdPageCount(PK_STANDARD))
nInsertPgCnt = pDataDoc->GetSdPageCount(PK_STANDARD);
if (pDataDoc!=nullptr && pDataDoc->GetSdPageCount(PageKind::Standard))
nInsertPgCnt = pDataDoc->GetSdPageCount(PageKind::Standard);
}
if (nInsertPgCnt > 0)
{

View File

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

View File

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

View File

@ -328,7 +328,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if (pPageView)
{
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)

View File

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

View File

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

View File

@ -150,8 +150,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
sal_Int32 nWhatPage = (sal_Int32)pWhatPage->GetValue ();
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
if (! CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT))
PageKind nWhatKind = (PageKind)pWhatKind->GetValue ();
if (! (nWhatKind >= PageKind::Standard && nWhatKind <= PageKind::Handout))
{
#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE);
@ -161,7 +161,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
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
StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE);
@ -237,18 +237,18 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
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 SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
if (CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT))
PageKind nWhatKind = (PageKind)pWhatKind->GetValue();
if ( nWhatKind >= PageKind::Standard && nWhatKind <= PageKind::Handout)
{
mbIsLayerModeActive = pIsActive->GetValue ();
mePageKind = (PageKind) nWhatKind;
mbIsLayerModeActive = pIsActive->GetValue();
mePageKind = nWhatKind;
}
}

View File

@ -250,12 +250,12 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
if ( pPageView->GetLockedLayers() != pView->GetLockedLayers() )
pPageView->SetLockedLayers( pView->GetLockedLayers() );
if (mePageKind == PK_NOTES)
if (mePageKind == PageKind::Notes)
{
if (pPageView->GetHelpLines() != pView->GetNotesHelpLines())
pPageView->SetHelpLines( pView->GetNotesHelpLines() );
}
else if (mePageKind == PK_HANDOUT)
else if (mePageKind == PageKind::Handout)
{
if (pPageView->GetHelpLines() != pView->GetHandoutHelpLines())
pPageView->SetHelpLines( pView->GetHandoutHelpLines() );
@ -272,7 +272,7 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
sal_uInt16 nSelectedPage = 0;
if (mePageKind != PK_HANDOUT)
if (mePageKind != PageKind::Handout)
{
nSelectedPage = pView->GetSelectedPage();
}
@ -350,7 +350,7 @@ void DrawViewShell::WriteFrameViewData()
Rectangle aVisArea = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) );
mpFrameView->SetVisArea(aVisArea);
if( mePageKind == PK_HANDOUT )
if( mePageKind == PageKind::Handout )
mpFrameView->SetSelectedPage(0);
else
{
@ -373,11 +373,11 @@ void DrawViewShell::WriteFrameViewData()
if ( mpFrameView->GetLockedLayers() != pPageView->GetLockedLayers() )
mpFrameView->SetLockedLayers( pPageView->GetLockedLayers() );
if (mePageKind == PK_NOTES)
if (mePageKind == PageKind::Notes)
{
mpFrameView->SetNotesHelpLines( pPageView->GetHelpLines() );
}
else if (mePageKind == PK_HANDOUT)
else if (mePageKind == PageKind::Handout)
{
mpFrameView->SetHandoutHelpLines( pPageView->GetHelpLines() );
}
@ -483,12 +483,12 @@ void DrawViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans
{
mePageKind = mpFrameView->GetPageKind();
if (mePageKind == PK_NOTES)
if (mePageKind == PageKind::Notes)
{
SetHelpId( SID_NOTES_MODE );
GetActiveWindow()->SetHelpId( CMD_SID_NOTES_MODE );
}
else if (mePageKind == PK_HANDOUT)
else if (mePageKind == PageKind::Handout)
{
SetHelpId( 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());
//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;
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
@ -314,7 +314,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
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);
@ -355,7 +355,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
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);
@ -397,11 +397,11 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SfxItemState::DEFAULT == rSet.GetItemState( SID_REHEARSE_TIMINGS ) )
{
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++ )
{
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD);
SdPage* pPage = GetDoc()->GetSdPage(i, PageKind::Standard);
if( !pPage->IsExcluded() )
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_SELECT_BACKGROUND);
rSet.DisableItem(SID_SAVE_BACKGROUND);
}
if (mePageKind == PK_NOTES)
if (mePageKind == PageKind::Notes)
{
rSet.DisableItem(SID_INSERTPAGE);
rSet.DisableItem(SID_RENAMEPAGE);
@ -701,7 +701,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_LAYERMODE);
rSet.DisableItem(SID_INSERTFILE);
}
else if (mePageKind == PK_HANDOUT)
else if (mePageKind == PageKind::Handout)
{
rSet.DisableItem(SID_INSERTPAGE);
rSet.DisableItem(SID_DUPLICATE_PAGE);
@ -765,20 +765,20 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
/**********************************************************************
* Background page mode
**********************************************************************/
if (mePageKind == PK_STANDARD)
if (mePageKind == PageKind::Standard)
{
rSet.Put(SfxBoolItem(SID_SLIDE_MASTER_MODE, true));
rSet.Put(SfxBoolItem(SID_NOTES_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_NOTES_MASTER_MODE, true));
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_NOTES_MASTER_MODE, false));
@ -796,8 +796,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
if (maTabControl->GetPageCount() == 1 ||
meEditMode == EditMode::MasterPage ||
mePageKind == PK_NOTES ||
mePageKind == PK_HANDOUT ||
mePageKind == PageKind::Notes ||
mePageKind == PageKind::Handout ||
(GetShellType()!=ST_DRAW&&IsLayerModeActive()))
{
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_SLIDE_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_NOTES_MODE, true));
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_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
switch (mePageKind)
{
case PK_STANDARD:
case PageKind::Standard:
meShellType = ST_IMPRESS;
break;
case PK_NOTES:
case PageKind::Notes:
meShellType = ST_NOTES;
break;
case PK_HANDOUT:
case PageKind::Handout:
meShellType = ST_HANDOUT;
break;
}
@ -284,7 +284,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
}
else
{
if (mePageKind == PK_NOTES)
if (mePageKind == PageKind::Notes)
{
SetHelpId( 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
GetDoc()->StopWorkStartupDelay();
}
else if (mePageKind == PK_HANDOUT)
else if (mePageKind == PageKind::Handout)
{
SetHelpId( SID_HANDOUT_MASTER_MODE );
GetActiveWindow()->SetHelpId( CMD_SID_HANDOUT_MASTER_MODE );
@ -456,9 +456,9 @@ void DrawViewShell::SetupPage (Size &rSize,
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();
@ -488,9 +488,9 @@ void DrawViewShell::SetupPage (Size &rSize,
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() );
}
@ -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);
}
@ -768,13 +768,13 @@ void DrawViewShell::GetAnnotationState (SfxItemSet& rItemSet )
svx::sidebar::SelectionAnalyzer::ViewType eViewType (svx::sidebar::SelectionAnalyzer::ViewType::Standard);
switch (mePageKind)
{
case PK_HANDOUT:
case PageKind::Handout:
eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Handout;
break;
case PK_NOTES:
case PageKind::Notes:
eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Notes;
break;
case PK_STANDARD:
case PageKind::Standard:
if (meEditMode == EditMode::MasterPage)
eViewType = svx::sidebar::SelectionAnalyzer::ViewType::Master;
else

View File

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

View File

@ -176,9 +176,9 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
mnSelectedPage = pFrameView->GetSelectedPage();
mnSelectedPageOnLoad = pFrameView->GetSelectedPageOnLoad();
meEditMode = pFrameView->GetViewShEditMode();
// meStandardEditMode = pFrameView->GetViewShEditMode(PK_STANDARD);
// meNotesEditMode = pFrameView->GetViewShEditMode(PK_NOTES);
// meHandoutEditMode = pFrameView->GetViewShEditMode(PK_HANDOUT);
// meStandardEditMode = pFrameView->GetViewShEditMode(PageKind::Standard);
// meNotesEditMode = pFrameView->GetViewShEditMode(PageKind::Notes);
// meHandoutEditMode = pFrameView->GetViewShEditMode(PageKind::Handout);
SetViewShEditModeOnLoad(pFrameView->GetViewShEditModeOnLoad());
mbLayerMode = pFrameView->IsLayerMode();
mbQuickEdit = pFrameView->IsQuickEdit();
@ -206,8 +206,8 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
mbNoColors = true;
mbNoAttribs = false;
maVisArea = Rectangle( Point(), Size(0, 0) );
mePageKind = PK_STANDARD;
mePageKindOnLoad = PK_STANDARD;
mePageKind = PageKind::Standard;
mePageKindOnLoad = PageKind::Standard;
mnSelectedPage = 0;
mnSelectedPageOnLoad = 0;
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_EditMode, makeAny( (sal_Int32)GetViewShEditMode() ) );
// aUserData.addValue( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PK_STANDARD ) ) );
// aUserData.addValue( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PK_NOTES ) ) );
// aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PK_HANDOUT ) ) );
// aUserData.addValue( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Standard ) ) );
// aUserData.addValue( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Notes ) ) );
// aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Handout ) ) );
{
const Rectangle aVisArea = GetVisArea();

View File

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

View File

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

View File

@ -416,7 +416,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
{
nExample = nTarget - 1;
sal_uInt16 nPageCount = mrDoc.GetSdPageCount( PK_STANDARD );
sal_uInt16 nPageCount = mrDoc.GetSdPageCount( PageKind::Standard );
if( nExample >= nPageCount )
nExample = nPageCount - 1;
}
@ -428,7 +428,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
**********************************************************************/
// 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);
pPage->SetLayoutName(pExample->GetLayoutName());
@ -465,12 +465,12 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
/**********************************************************************
|* 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);
pNotesPage->SetLayoutName(pExample->GetLayoutName());
pNotesPage->SetPageKind(PK_NOTES);
pNotesPage->SetPageKind(PageKind::Notes);
// insert (notes page)
mrDoc.InsertPage(pNotesPage, (sal_uInt16)(nTarget) * 2 + 2);
@ -696,7 +696,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
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))
pOutliner->SetDepth( pPara, 0 );
@ -716,7 +716,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
if( nPos >= 0 )
{
SdPage* pPage = mrDoc.GetSdPage( (sal_uInt16) nPos, PK_STANDARD );
SdPage* pPage = mrDoc.GetSdPage( (sal_uInt16) nPos, PageKind::Standard );
if( pPage )
{
@ -832,7 +832,7 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner, void )
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page?
{
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);
@ -897,7 +897,7 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner, void )
sal_uInt16 nPageCount = (sal_uInt16)maSelectedParas.size();
while (nPageCount)
{
SdPage* pPage = mrDoc.GetSdPage(nPosNewOrder, PK_STANDARD);
SdPage* pPage = mrDoc.GetSdPage(nPosNewOrder, PageKind::Standard);
pPage->SetSelected(false);
nPosNewOrder++;
nPageCount--;
@ -1063,12 +1063,12 @@ void OutlineView::FillOutliner()
mrOutliner.SetUpdateMode(false);
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)
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;
// take text from title shape
@ -1210,7 +1210,7 @@ SdPage* OutlineView::GetActualPage()
if( pCurrent )
return pCurrent;
return mrDoc.GetSdPage( 0, PK_STANDARD );
return mrDoc.GetSdPage( 0, PageKind::Standard );
}
SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
@ -1226,8 +1226,8 @@ SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
nPageToSelect++;
}
if( nPageToSelect < (sal_uInt32)mrDoc.GetSdPageCount( PK_STANDARD ) )
return mrDoc.GetSdPage( (sal_uInt16)nPageToSelect, PK_STANDARD );
if( nPageToSelect < (sal_uInt32)mrDoc.GetSdPageCount( PageKind::Standard ) )
return mrDoc.GetSdPage( (sal_uInt16)nPageToSelect, PageKind::Standard );
return nullptr;
}
@ -1310,7 +1310,7 @@ void OutlineView::SetSelectedPages()
{
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,
"Trying to select non-existing page OutlineView::SetSelectedPages()");
@ -1491,12 +1491,12 @@ void OutlineView::UpdateDocument()
{
OutlineViewPageChangesGuard aGuard(this);
const sal_uInt32 nPageCount = mrDoc.GetSdPageCount(PK_STANDARD);
const sal_uInt32 nPageCount = mrDoc.GetSdPageCount(PageKind::Standard);
Paragraph* pPara = mrOutliner.GetParagraph( 0 );
sal_uInt32 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);
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)
: DrawViewShell( pFrame, rViewShellBase, pParentWindow, PK_STANDARD, pFrameView)
: DrawViewShell( pFrame, rViewShellBase, pParentWindow, PageKind::Standard, pFrameView)
{
if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
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
// page preview object in SlideSorter and PagePane
if(pObjectsSdPage && PK_HANDOUT == pObjectsSdPage->GetPageKind())
if(pObjectsSdPage && PageKind::Handout == pObjectsSdPage->GetPageKind())
{
bCreateOutline = true;
}
@ -308,7 +308,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
{
case PRESOBJ_TITLE:
{
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD)
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard)
{
static OUString aTitleAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_TITLE));
aObjectString = aTitleAreaStr;
@ -348,7 +348,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
}
case PRESOBJ_SLIDENUMBER:
{
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD)
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard)
{
static OUString aSlideAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_SLIDE));
aObjectString = aSlideAreaStr;

View File

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

View File

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

View File

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

View File

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

View File

@ -464,7 +464,7 @@ bool ViewOverlayManager::CreateTags()
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();

View File

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

View File

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

View File

@ -9,33 +9,33 @@
-->
<object-list>
<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="PK_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::Standard" relative-height="0.069" relative-width="0.233" relative-posX="0.05" relative-posY="0.911"/>
<object-prop pagekind="PageKind::Handout" 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 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="PK_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::Standard" relative-height="0.069" relative-width="0.317" relative-posX="0.342" relative-posY="0.911"/>
<object-prop pagekind="PageKind::Handout" 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 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="PK_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::Standard" relative-height="0.069" relative-width="0.233" relative-posX="0.717" relative-posY="0.911"/>
<object-prop pagekind="PageKind::Handout" 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 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="PK_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::Standard" relative-height="0.069" relative-width="0.317" relative-posX="0.717" relative-posY="0.911"/>
<object-prop pagekind="PageKind::Handout" 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 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="PK_NOTES" relative-height="0.375" relative-width="1" relative-posX="0" relative-posY="0.076"/>
<object-prop pagekind="PageKind::Standard" relative-height="0.167" relative-width="0.9" relative-posX="0.05" relative-posY="0.0399"/>
<object-prop pagekind="PageKind::Notes" relative-height="0.375" relative-width="1" relative-posX="0" relative-posY="0.076"/>
</object>
<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 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-list>