summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-04-02 21:04:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-03 10:19:24 +0200
commit10055ff899ed8f9c205155cd15c6de81cba37471 (patch)
treebc5e5f647a2d3a62334703b1081cdf6e0cb3887f /sd/source/ui/func
parentf497d1dc27b4fee3db1e2228647a00971922eb5f (diff)
convert PresObjKind to scoped enum
Change-Id: I30761f15f46f91435e80296c4f685bc691bb6304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91600 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fuexpand.cxx10
-rw-r--r--sd/source/ui/func/fuinsert.cxx4
-rw-r--r--sd/source/ui/func/fuinsfil.cxx2
-rw-r--r--sd/source/ui/func/fusumry.cxx6
-rw-r--r--sd/source/ui/func/futext.cxx10
5 files changed, 16 insertions, 16 deletions
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index cc3e910f8819..b95ad8515b67 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -100,7 +100,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
SdrLayerIDSet aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
sal_uInt16 nActualPageNum = pActualPage->GetPageNum();
SdPage* pActualNotesPage = static_cast<SdPage*>(mpDoc->GetPage(nActualPageNum + 1));
- SdrTextObj* pActualOutline = static_cast<SdrTextObj*>(pActualPage->GetPresObj(PRESOBJ_OUTLINE));
+ SdrTextObj* pActualOutline = static_cast<SdrTextObj*>(pActualPage->GetPresObj(PresObjKind::Outline));
if (pActualOutline)
{
@@ -178,8 +178,8 @@ void FuExpandPage::DoExecute( SfxRequest& )
pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
// create title text objects
- SdrTextObj* pTextObj = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TITLE));
- SAL_WARN_IF(!pTextObj, "sd.core", "worrying lack of PRESOBJ_TITLE object");
+ SdrTextObj* pTextObj = static_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Title));
+ SAL_WARN_IF(!pTextObj, "sd.core", "worrying lack of PresObjKind::Title object");
if (!pTextObj)
continue;
@@ -203,13 +203,13 @@ void FuExpandPage::DoExecute( SfxRequest& )
pTextObj->SetEmptyPresObj(false);
- SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
+ SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PresObjKind::Title);
pTextObj->NbcSetStyleSheet(pSheet, false);
SdrTextObj* pOutlineObj = nullptr;
sal_Int32 nChildCount = aOutliner.GetChildCount(pPara);
if (nChildCount > 0)
- pOutlineObj = static_cast<SdrTextObj*>( pPage->GetPresObj(PRESOBJ_OUTLINE) );
+ pOutlineObj = static_cast<SdrTextObj*>( pPage->GetPresObj(PresObjKind::Outline) );
if (pOutlineObj)
{
// create structuring text objects
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 5226627911de..7b66e6a53348 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -161,7 +161,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
sal_Int8 nAction = DND_ACTION_COPY;
SdrObject* pPickObj;
- if( ( ( pPickObj = mpView->GetSelectedSingleObject( mpView->GetPage() ) ) && mbReplaceExistingImage ) || (pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC ) ) )
+ if( ( ( pPickObj = mpView->GetSelectedSingleObject( mpView->GetPage() ) ) && mbReplaceExistingImage ) || (pPickObj = mpView->GetEmptyPresentationObject( PresObjKind::Graphic ) ) )
{
nAction = DND_ACTION_LINK;
} else {
@@ -287,7 +287,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
nSlotId == SID_INSERT_DIAGRAM ||
nSlotId == SID_INSERT_MATH )
{
- PresObjKind ePresObjKind = (nSlotId == SID_INSERT_DIAGRAM) ? PRESOBJ_CHART : PRESOBJ_OBJECT;
+ PresObjKind ePresObjKind = (nSlotId == SID_INSERT_DIAGRAM) ? PresObjKind::Chart : PresObjKind::Object;
SdrObject* pPickObj = mpView->GetEmptyPresentationObject( ePresObjKind );
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 932a942986e3..90051588f815 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -619,7 +619,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
SdResId(STR_UNDO_INSERT_FILE), OUString(), 0, nViewShellId );
sal_Int32 nSourcePos = 0;
- SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+ SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Outline );
Paragraph* pSourcePara = pOutliner->GetParagraph( 0 );
while (pSourcePara)
{
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index f84dba0f65e3..5984ffa19d44 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -100,7 +100,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
if (nSelectedPages <= 1 || pActualPage->IsSelected())
{
SdPage* pActualNotesPage = mpDoc->GetSdPage(i, PageKind::Notes);
- SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pActualPage->GetPresObj(PRESOBJ_TITLE) );
+ SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pActualPage->GetPresObj(PresObjKind::Title) );
if (pTextObj && !pTextObj->IsEmptyPresObj())
{
@@ -168,7 +168,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
pOutl->SetDefTab( mpDoc->GetDefaultTabulator() );
pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool()));
- pStyle = pSummaryPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+ pStyle = pSummaryPage->GetStyleSheetForPresObj( PresObjKind::Outline );
pOutl->SetStyleSheet( 0, pStyle );
}
@@ -187,7 +187,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
if (!pSummaryPage)
return;
- SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pSummaryPage->GetPresObj(PRESOBJ_OUTLINE) );
+ SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pSummaryPage->GetPresObj(PresObjKind::Outline) );
if (!pTextObj)
return;
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index fc216d5d1389..67f86e54c53d 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1180,10 +1180,10 @@ void FuText::DeleteDefaultText()
PresObjKind ePresObjKind = pPage->GetPresObjKind(mxTextObj.get());
- if ( !((ePresObjKind == PRESOBJ_TITLE ||
- ePresObjKind == PRESOBJ_OUTLINE ||
- ePresObjKind == PRESOBJ_NOTES ||
- ePresObjKind == PRESOBJ_TEXT) &&
+ if ( !((ePresObjKind == PresObjKind::Title ||
+ ePresObjKind == PresObjKind::Outline ||
+ ePresObjKind == PresObjKind::Notes ||
+ ePresObjKind == PresObjKind::Text) &&
!pPage->IsMasterPage()) )
return;
@@ -1199,7 +1199,7 @@ void FuText::DeleteDefaultText()
pOutliner->EnableUndo(true);
if (pSheet &&
- (ePresObjKind == PRESOBJ_NOTES || ePresObjKind == PRESOBJ_TEXT))
+ (ePresObjKind == PresObjKind::Notes || ePresObjKind == PresObjKind::Text))
pOutliner->SetStyleSheet(0, pSheet);
mxTextObj->SetEmptyPresObj(true);