summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-11 13:01:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-11 14:32:40 +0200
commite588aa4d347875eb4c52bd2b51c5c917f807ba6d (patch)
tree449516f28c32cc3ae6adf1a822e46fa60a949e9c /sd/source/ui
parent4caacff9f25498c07d9b99fe0b5db82baa58a22c (diff)
convert PageKind to scoped enum
Change-Id: I7f90cf2e96b72031bcfff558794e6cb42ea408e8
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx4
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx4
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx18
-rw-r--r--sd/source/ui/app/sdmod1.cxx6
-rw-r--r--sd/source/ui/app/sdmod2.cxx8
-rw-r--r--sd/source/ui/app/sdxfer.cxx8
-rw-r--r--sd/source/ui/app/tmplctrl.cxx6
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx4
-rw-r--r--sd/source/ui/dlg/animobjs.cxx8
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx6
-rw-r--r--sd/source/ui/dlg/docprev.cxx2
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx42
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx10
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx4
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx14
-rw-r--r--sd/source/ui/docshell/docshel2.cxx12
-rw-r--r--sd/source/ui/docshell/docshel4.cxx14
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.cxx6
-rw-r--r--sd/source/ui/func/fuconstr.cxx2
-rw-r--r--sd/source/ui/func/fuexpand.cxx8
-rw-r--r--sd/source/ui/func/fuinsfil.cxx6
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/func/fuprlout.cxx8
-rw-r--r--sd/source/ui/func/fusldlg.cxx6
-rw-r--r--sd/source/ui/func/fusumry.cxx10
-rw-r--r--sd/source/ui/func/futempl.cxx2
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx8
-rw-r--r--sd/source/ui/sidebar/DocumentHelper.cxx20
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerProviders.cxx4
-rw-r--r--sd/source/ui/sidebar/MasterPageObserver.cxx12
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx4
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx4
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx6
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx20
-rw-r--r--sd/source/ui/slideshow/slideshowviewimpl.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx12
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx8
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx16
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx2
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx6
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx88
-rw-r--r--sd/source/ui/unoidl/unopage.cxx62
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx30
-rw-r--r--sd/source/ui/view/Outliner.cxx8
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx34
-rw-r--r--sd/source/ui/view/ViewClipboard.cxx10
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx14
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx10
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
-rw-r--r--sd/source/ui/view/drviews1.cxx22
-rw-r--r--sd/source/ui/view/drviews2.cxx14
-rw-r--r--sd/source/ui/view/drviews3.cxx18
-rw-r--r--sd/source/ui/view/drviews5.cxx16
-rw-r--r--sd/source/ui/view/drviews7.cxx30
-rw-r--r--sd/source/ui/view/drviewsa.cxx28
-rw-r--r--sd/source/ui/view/drviewsb.cxx4
-rw-r--r--sd/source/ui/view/frmview.cxx16
-rw-r--r--sd/source/ui/view/grviewsh.cxx2
-rw-r--r--sd/source/ui/view/outlnvsh.cxx26
-rw-r--r--sd/source/ui/view/outlview.cxx32
-rw-r--r--sd/source/ui/view/presvish.cxx2
-rw-r--r--sd/source/ui/view/sdview.cxx6
-rw-r--r--sd/source/ui/view/sdview2.cxx4
-rw-r--r--sd/source/ui/view/sdview3.cxx20
-rw-r--r--sd/source/ui/view/tabcontr.cxx2
-rw-r--r--sd/source/ui/view/unmodpg.cxx4
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx2
-rw-r--r--sd/source/ui/view/viewshe2.cxx12
-rw-r--r--sd/source/ui/view/viewshe3.cxx12
73 files changed, 446 insertions, 446 deletions
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 716dd5f70421..d629c384a768 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -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 += ";";
}
}
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 8ee6ae07d63a..bc04d6b90346 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -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 );
}
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index a1d14c93463c..b2e6c9a20cea 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -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()
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 3d0dbb846061..1dcaae801405 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -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);
}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index ff7a727b5994..ebdbcd5c2c10 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -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();
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index f84bf489ccc4..40a423ae2924 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -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 )
{
diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx
index c44eb1b69a83..ea5db97a6d64 100644
--- a/sd/source/ui/app/tmplctrl.cxx
+++ b/sd/source/ui/app/tmplctrl.cxx
@@ -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 });
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index ee8784320fd4..545668387990 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -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);
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 57e34169b980..b023d0a2c23a 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -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)
{
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 3e3c5d5c4811..1fce442ae152 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -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 )
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 3158d48f47b5..32297a464562 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -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();
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index f369a613986d..14c1966b3626 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -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));
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index 820be4a64eaf..62f8a1578f60 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -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 );
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 8b9fba0396ad..6ee9b9a24b20 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -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));
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 56419250aff8..0b5c6c44e889 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -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;
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index de01f21bced5..cb57cba42c9d 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -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);
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index db6cc723ab7a..5b00c597b0e2 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -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 )
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 5e168420bd46..5bf6eb97fa59 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -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");
}
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index c6d40c0ca0b4..77ffeb147903 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -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 )
{
/**********************************************
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index cc163dd7c8f8..29fecb25c25f 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -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
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 00da1d6d9e1b..e634c9224383 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -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 )
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 2ed902540658..611067403186 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -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),
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index edb39f5b8961..d3d78f3c8991 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -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();
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index cc4a6a347dee..07322ac2d3cf 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -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() )
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 072d34c67bab..9951ed9cb43e 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -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);
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 02f8adcbf817..7c2ae80248e4 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -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();
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 2d5f6b9b173a..d58a3314503d 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -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;
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index 94f62697545e..09458acb2b3d 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -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())
diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx
index 7c626602f6c6..c853bfe8e68e 100644
--- a/sd/source/ui/sidebar/DocumentHelper.cxx
+++ b/sd/source/ui/sidebar/DocumentHelper.cxx
@@ -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)
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 86958f670f1d..11283ed50493 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -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());
}
diff --git a/sd/source/ui/sidebar/MasterPageObserver.cxx b/sd/source/ui/sidebar/MasterPageObserver.cxx
index 4b2db78b4244..e2a06b42de50 100644
--- a/sd/source/ui/sidebar/MasterPageObserver.cxx
+++ b/sd/source/ui/sidebar/MasterPageObserver.cxx
@@ -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",
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 52b2153f221f..4adc45b7e45e 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -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);
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 12d6486b609b..7387786128ed 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -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());
}
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 2d1d3317e106..ec2361765fd9 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -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;
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 540902bdaa3b..1a927542f1f0 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -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 );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 8d1b4980db8f..d21d6f56ff85 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -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 );
}
}
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index e63047a93ad5..7437810555bd 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -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();
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 432ec42b2fd0..b9bcb07b06f6 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -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,
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 1a78cb6d0e99..d4cf350ca584 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -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)
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index babb24f2d074..9232980b9695 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -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();
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index ebd0943b2c36..37eb13336fd7 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -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;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index fa0291f88f15..344b076386f0 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -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);
}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index dbcca0e771db..4f4c195956f8 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -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);
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 9ec3bbe7f0e3..8d5fad88f62e 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -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;
}
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 601cec71bfec..ca52ce5fe0ce 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -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;
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 96e5f6e93b0c..11c16dfac953 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -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 );
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index ffe12df25b60..1db185a8f82d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -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);
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index f7bcf14a3e44..88df933b981b 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -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;
}
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 591ed8f17e92..73214e16f895 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -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;
}
}
diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx
index ef088734f3c8..1fd58ecdc028 100644
--- a/sd/source/ui/view/ViewClipboard.cxx
+++ b/sd/source/ui/view/ViewClipboard.cxx
@@ -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)
{
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 249d86d5c4a6..71c1d012342a 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -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;
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index edb4a730b2a5..87f03b9b65f4 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -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();
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index d2d33463e47c..00d2434140f8 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -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)
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 9d46be077b86..84696ce6b4fd 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -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);
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 60cd53336786..fb7a04674fd6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -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() )
{
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index b42489f3af40..7f71b4747865 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -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;
}
}
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index b4e331918038..b3ce9775e306 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -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 );
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index c9ef3b687479..459ac620458c 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -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));
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index ab80ea2adbbb..ad3c9b13d130 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -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
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 75406a095927..e0412ae11acc 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -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 );
}
}
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 7d9a63962a95..83455c409233 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -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();
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 361a538d66a2..ce5991ddcdec 100644
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -38,7 +38,7 @@ GraphicViewShell::GraphicViewShell (
pFrame,
rViewShellBase,
pParentWindow,
- PK_STANDARD,
+ PageKind::Standard,
pFrameView)
{
ConstructGraphicViewShell();
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 349a70ccffd5..e9ab3e560e7b 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -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);
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index f9a5c5f5dc39..83e8992890f4 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -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 );
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index bc696eecf9df..cf83969ba7ba 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -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 );
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 1170a17a8899..7853f40c7cf8 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -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;
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index ddae5e886756..96a5087a4b93 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -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;
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 29512e501254..d6820763cf30 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -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();
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index 308143eccd7a..4b9bebd7039f 100644
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -296,7 +296,7 @@ bool TabControl::StartRenaming()
{
bool bOK = false;
- if (pDrViewSh->GetPageKind() == PK_STANDARD)
+ if (pDrViewSh->GetPageKind() == PageKind::Standard)
{
bOK = true;
diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx
index 5abb98a33fc1..f7416f5a6884 100644
--- a/sd/source/ui/view/unmodpg.cxx
+++ b/sd/source/ui/view/unmodpg.cxx
@@ -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);
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 14d6bfff8ae9..5b6729fbceac 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -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();
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 3e30e82fb2bf..4dcaa0f18af4 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -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()
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 8368cf74969a..f769a3bf7da8 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -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();