diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-11 13:01:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-11 14:32:40 +0200 |
commit | e588aa4d347875eb4c52bd2b51c5c917f807ba6d (patch) | |
tree | 449516f28c32cc3ae6adf1a822e46fa60a949e9c /sd/source/ui/docshell | |
parent | 4caacff9f25498c07d9b99fe0b5db82baa58a22c (diff) |
convert PageKind to scoped enum
Change-Id: I7f90cf2e96b72031bcfff558794e6cb42ea408e8
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r-- | sd/source/ui/docshell/docshel2.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 14 |
2 files changed, 13 insertions, 13 deletions
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 ) |