summaryrefslogtreecommitdiff
path: root/sd/source/ui
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
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')
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx2
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx4
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx14
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx24
-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
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx4
-rw-r--r--sd/source/ui/table/tablefunction.cxx4
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx85
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/drawview.cxx26
-rw-r--r--sd/source/ui/view/drviews1.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx8
-rw-r--r--sd/source/ui/view/drviews7.cxx6
-rw-r--r--sd/source/ui/view/drviewse.cxx4
-rw-r--r--sd/source/ui/view/outlnvsh.cxx10
-rw-r--r--sd/source/ui/view/outlview.cxx20
-rw-r--r--sd/source/ui/view/sdview.cxx34
-rw-r--r--sd/source/ui/view/sdview2.cxx2
-rw-r--r--sd/source/ui/view/sdview4.cxx6
-rw-r--r--sd/source/ui/view/sdview5.cxx14
26 files changed, 153 insertions, 154 deletions
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index d0fc351dee60..43420abcbb2b 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -716,7 +716,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
SdPage* pNotesPge = pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PageKind::Notes);
if (pNotesPge)
{
- SdrObject* pNotesObj = pNotesPge->GetPresObj(PRESOBJ_NOTES);
+ SdrObject* pNotesObj = pNotesPge->GetPresObj(PresObjKind::Notes);
if (pNotesObj)
{
OutlinerParaObject* pPara = pNotesObj->GetOutlinerParaObject();
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 2704d5a756bf..14e43dd75229 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -738,12 +738,12 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize )
// try to get existing PresObj
const ::tools::Rectangle rRect(CapPos,CapSize);
- SdrObject* pSdrObj = pSlide->GetPresObj(PRESOBJ_TITLE);
+ SdrObject* pSdrObj = pSlide->GetPresObj(PresObjKind::Title);
if(!pSdrObj)
{
// if not exists, create. Beware: It is already inserted to the SdPage
- pSdrObj = pSlide->CreatePresObj(PRESOBJ_TITLE,false,rRect);
+ pSdrObj = pSlide->CreatePresObj(PresObjKind::Title,false,rRect);
}
else
{
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index d912ca226204..5b674925163a 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -551,7 +551,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
if( !pPage )
return;
- SdrTextObj* pObj = static_cast<SdrTextObj*>(pPage->GetPresObj( PRESOBJ_DATETIME ));
+ SdrTextObj* pObj = static_cast<SdrTextObj*>(pPage->GetPresObj( PresObjKind::DateTime ));
if( !pObj )
return;
@@ -730,12 +730,12 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:
// paint presentation objects from masterpage
if (nullptr != mpMaster)
{
- SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_TITLE));
- 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));
- SdrTextObj* pNumber = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_SLIDENUMBER));
+ SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::Title));
+ SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj(mpMaster->GetPageKind() == PageKind::Notes ? PresObjKind::Notes : PresObjKind::Outline));
+ SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::Header));
+ SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::Footer));
+ SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::DateTime));
+ SdrTextObj* pNumber = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::SlideNumber));
if (pMasterTitle)
Paint(rRenderContext, pMasterTitle, true, true);
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index 881ed7b5bf36..d5bac1c6a328 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -58,10 +58,10 @@ MasterLayoutDialog::MasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pD
break;
}
- mbOldHeader = mpCurrentPage->GetPresObj( PRESOBJ_HEADER ) != nullptr;
- mbOldDate = mpCurrentPage->GetPresObj( PRESOBJ_DATETIME ) != nullptr;
- mbOldFooter = mpCurrentPage->GetPresObj( PRESOBJ_FOOTER ) != nullptr;
- mbOldPageNumber = mpCurrentPage->GetPresObj( PRESOBJ_SLIDENUMBER ) != nullptr;
+ mbOldHeader = mpCurrentPage->GetPresObj( PresObjKind::Header ) != nullptr;
+ mbOldDate = mpCurrentPage->GetPresObj( PresObjKind::DateTime ) != nullptr;
+ mbOldFooter = mpCurrentPage->GetPresObj( PresObjKind::Footer ) != nullptr;
+ mbOldPageNumber = mpCurrentPage->GetPresObj( PresObjKind::SlideNumber ) != nullptr;
mxCBHeader->set_active( mbOldHeader );
mxCBDate->set_active( mbOldDate );
@@ -87,33 +87,33 @@ void MasterLayoutDialog::applyChanges()
if( (mpCurrentPage->GetPageKind() != PageKind::Standard) && (mbOldHeader != mxCBHeader->get_active() ) )
{
if( mbOldHeader )
- remove( PRESOBJ_HEADER );
+ remove( PresObjKind::Header );
else
- create( PRESOBJ_HEADER );
+ create( PresObjKind::Header );
}
if( mbOldFooter != mxCBFooter->get_active() )
{
if( mbOldFooter )
- remove( PRESOBJ_FOOTER );
+ remove( PresObjKind::Footer );
else
- create( PRESOBJ_FOOTER );
+ create( PresObjKind::Footer );
}
if( mbOldDate != mxCBDate->get_active() )
{
if( mbOldDate )
- remove( PRESOBJ_DATETIME );
+ remove( PresObjKind::DateTime );
else
- create( PRESOBJ_DATETIME );
+ create( PresObjKind::DateTime );
}
if( mbOldPageNumber != mxCBPageNumber->get_active() )
{
if( mbOldPageNumber )
- remove( PRESOBJ_SLIDENUMBER );
+ remove( PresObjKind::SlideNumber );
else
- create( PRESOBJ_SLIDENUMBER );
+ create( PresObjKind::SlideNumber );
}
mpDoc->EndUndo();
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);
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 02c8918747c7..ffd39eda94f6 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -141,7 +141,7 @@ public:
OUString GetSelectionText( bool bCompleteWords );
bool HasSelection( bool bText ) const;
- //If we are editing a PRESOBJ_OUTLINE return the Outliner and fill rSel
+ //If we are editing a PresObjKind::Outline return the Outliner and fill rSel
//with the current selection
::Outliner* GetOutlinerForMasterPageOutlineTextObj(ESelection &rSel);
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index b371aa2ea1b8..0f421b7f99ba 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -565,7 +565,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
while (aSelectedPages.HasMoreElements())
{
SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
- SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
+ SdrObject* pObj = pPage->GetPresObj(PresObjKind::Outline);
if (pObj!=nullptr )
{
if( !pObj->IsEmptyPresObj() )
@@ -606,7 +606,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
while (aSelectedPages.HasMoreElements())
{
SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
- SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE);
+ SdrObject* pObj = pPage->GetPresObj(PresObjKind::Title);
if (pObj!=nullptr && !pObj->IsEmptyPresObj())
bDisable = false;
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 3a72c05921dd..2a031e525d32 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -121,7 +121,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
::tools::Rectangle aRect;
- SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_TABLE );
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PresObjKind::Table );
if( pPickObj )
{
aRect = pPickObj->GetLogicRect();
@@ -194,7 +194,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
if(pPage && pPage->IsPresObj(pPickObj))
{
pObj->SetUserCall( pPickObj->GetUserCall() );
- pPage->InsertPresObj( pObj, PRESOBJ_TABLE );
+ pPage->InsertPresObj( pObj, PresObjKind::Table );
}
}
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 52fe89fb072c..f3fee3332659 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -834,7 +834,7 @@ bool SdXShape::IsPresObj() const
{
SdPage* pPage = dynamic_cast<SdPage* >(pObj->getSdrPageFromSdrObject());
if(pPage)
- return pPage->GetPresObjKind(pObj) != PRESOBJ_NONE;
+ return pPage->GetPresObjKind(pObj) != PresObjKind::NONE;
}
return false;
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index e728f0fb9e05..3551d7e5b552 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -412,81 +412,81 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
aType = aType.copy( aPrefix.getLength() );
- PresObjKind eObjKind = PRESOBJ_NONE;
+ PresObjKind eObjKind = PresObjKind::NONE;
if( aType == "TitleTextShape" )
{
- eObjKind = PRESOBJ_TITLE;
+ eObjKind = PresObjKind::Title;
}
else if( aType == "OutlinerShape" )
{
- eObjKind = PRESOBJ_OUTLINE;
+ eObjKind = PresObjKind::Outline;
}
else if( aType == "SubtitleShape" )
{
- eObjKind = PRESOBJ_TEXT;
+ eObjKind = PresObjKind::Text;
}
else if( aType == "OLE2Shape" )
{
- eObjKind = PRESOBJ_OBJECT;
+ eObjKind = PresObjKind::Object;
}
else if( aType == "ChartShape" )
{
- eObjKind = PRESOBJ_CHART;
+ eObjKind = PresObjKind::Chart;
}
else if( aType == "CalcShape" )
{
- eObjKind = PRESOBJ_CALC;
+ eObjKind = PresObjKind::Calc;
}
else if( aType == "TableShape" )
{
- eObjKind = PRESOBJ_TABLE;
+ eObjKind = PresObjKind::Table;
}
else if( aType == "GraphicObjectShape" )
{
- eObjKind = PRESOBJ_GRAPHIC;
+ eObjKind = PresObjKind::Graphic;
}
else if( aType == "OrgChartShape" )
{
- eObjKind = PRESOBJ_ORGCHART;
+ eObjKind = PresObjKind::OrgChart;
}
else if( aType == "PageShape" )
{
if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
- eObjKind = PRESOBJ_TITLE;
+ eObjKind = PresObjKind::Title;
else
- eObjKind = PRESOBJ_PAGE;
+ eObjKind = PresObjKind::Page;
}
else if( aType == "NotesShape" )
{
- eObjKind = PRESOBJ_NOTES;
+ eObjKind = PresObjKind::Notes;
}
else if( aType == "HandoutShape" )
{
- eObjKind = PRESOBJ_HANDOUT;
+ eObjKind = PresObjKind::Handout;
}
else if( aType == "FooterShape" )
{
- eObjKind = PRESOBJ_FOOTER;
+ eObjKind = PresObjKind::Footer;
}
else if( aType == "HeaderShape" )
{
- eObjKind = PRESOBJ_HEADER;
+ eObjKind = PresObjKind::Header;
}
else if( aType == "SlideNumberShape" )
{
- eObjKind = PRESOBJ_SLIDENUMBER;
+ eObjKind = PresObjKind::SlideNumber;
}
else if( aType == "DateTimeShape" )
{
- eObjKind = PRESOBJ_DATETIME;
+ eObjKind = PresObjKind::DateTime;
}
else if( aType == "MediaShape" )
{
- eObjKind = PRESOBJ_MEDIA;
+ eObjKind = PresObjKind::Media;
}
- ::tools::Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() );
+ ::tools::Rectangle aRect( eObjKind == PresObjKind::Title ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() );
const awt::Point aPos( aRect.Left(), aRect.Top() );
xShape->setPosition( aPos );
@@ -495,7 +495,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
xShape->setSize( aSize );
SdrObject *pPresObj = nullptr;
- if( (eObjKind == PRESOBJ_TABLE) || (eObjKind == PRESOBJ_MEDIA) )
+ if( (eObjKind == PresObjKind::Table) || (eObjKind == PresObjKind::Media) )
{
pPresObj = SvxFmDrawPage::CreateSdrObject_( xShape );
if( pPresObj )
@@ -1387,12 +1387,12 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co
{
pShape->SetShapeType("com.sun.star.presentation.TitleTextShape");
}
- eKind = PRESOBJ_NONE;
+ eKind = PresObjKind::NONE;
break;
case OBJ_OUTLINETEXT:
pShape = new SvxShapeText( pObj );
pShape->SetShapeType("com.sun.star.presentation.OutlinerShape");
- eKind = PRESOBJ_NONE;
+ eKind = PresObjKind::NONE;
break;
}
}
@@ -1402,66 +1402,65 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co
if(!xShape.is())
xShape = SvxFmDrawPage::CreateShape( pObj );
- if( eKind != PRESOBJ_NONE )
+ if( eKind != PresObjKind::NONE )
{
OUString aShapeType("com.sun.star.presentation.");
switch( eKind )
{
- case PRESOBJ_TITLE:
+ case PresObjKind::Title:
aShapeType += "TitleTextShape";
break;
- case PRESOBJ_OUTLINE:
+ case PresObjKind::Outline:
aShapeType += "OutlinerShape";
break;
- case PRESOBJ_TEXT:
+ case PresObjKind::Text:
aShapeType += "SubtitleShape";
break;
- case PRESOBJ_GRAPHIC:
+ case PresObjKind::Graphic:
aShapeType += "GraphicObjectShape";
break;
- case PRESOBJ_OBJECT:
+ case PresObjKind::Object:
aShapeType += "OLE2Shape";
break;
- case PRESOBJ_CHART:
+ case PresObjKind::Chart:
aShapeType += "ChartShape";
break;
- case PRESOBJ_ORGCHART:
+ case PresObjKind::OrgChart:
aShapeType += "OrgChartShape";
break;
- case PRESOBJ_CALC:
+ case PresObjKind::Calc:
aShapeType += "CalcShape";
break;
- case PRESOBJ_TABLE:
+ case PresObjKind::Table:
aShapeType += "TableShape";
break;
- case PRESOBJ_MEDIA:
+ case PresObjKind::Media:
aShapeType += "MediaShape";
break;
- case PRESOBJ_PAGE:
+ case PresObjKind::Page:
aShapeType += "PageShape";
break;
- case PRESOBJ_HANDOUT:
+ case PresObjKind::Handout:
aShapeType += "HandoutShape";
break;
- case PRESOBJ_NOTES:
+ case PresObjKind::Notes:
aShapeType += "NotesShape";
break;
- case PRESOBJ_FOOTER:
+ case PresObjKind::Footer:
aShapeType += "FooterShape";
break;
- case PRESOBJ_HEADER:
+ case PresObjKind::Header:
aShapeType += "HeaderShape";
break;
- case PRESOBJ_SLIDENUMBER:
+ case PresObjKind::SlideNumber:
aShapeType += "SlideNumberShape";
break;
- case PRESOBJ_DATETIME:
+ case PresObjKind::DateTime:
aShapeType += "DateTimeShape";
break;
// coverity[dead_error_begin] - following conditions exist to avoid compiler warning
- case PRESOBJ_NONE:
- case PRESOBJ_MAX:
+ case PresObjKind::NONE:
break;
}
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index b91771f623c4..97672fba3932 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1700,7 +1700,7 @@ private:
if (!pTextObj)
{
bSubTitle = true;
- pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT)); // is there a subtitle?
+ pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Text)); // is there a subtitle?
}
sal_Int32 nParaCount1 = pOutliner->GetParagraphCount();
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 128a0d4d4c9b..48580601dd19 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -157,8 +157,8 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
sal_uInt16 eObjKind = pEditObject->GetObjIdentifier();
PresObjKind ePresObjKind = rPage.GetPresObjKind(pEditObject);
- if ( ePresObjKind == PRESOBJ_TITLE ||
- ePresObjKind == PRESOBJ_NOTES )
+ if ( ePresObjKind == PresObjKind::Title ||
+ ePresObjKind == PresObjKind::Notes )
{
// Presentation object (except outline)
SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind );
@@ -320,8 +320,8 @@ void DrawView::SetMasterAttributes( SdrObject* pObject, const SdPage& rPage, Sfx
}
if (!bSlide &&
- (ePresObjKind == PRESOBJ_TITLE ||
- ePresObjKind == PRESOBJ_NOTES))
+ (ePresObjKind == PresObjKind::Title ||
+ ePresObjKind == PresObjKind::Notes))
{
// Presentation object (except outline)
SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind );
@@ -574,16 +574,16 @@ void DrawView::DeleteMarked()
PresObjKind ePresObjKind(pPage->GetPresObjKind(pObj));
switch( ePresObjKind )
{
- case PRESOBJ_NONE:
+ case PresObjKind::NONE:
continue; // ignore it
- case PRESOBJ_GRAPHIC:
- case PRESOBJ_OBJECT:
- case PRESOBJ_CHART:
- case PRESOBJ_ORGCHART:
- case PRESOBJ_TABLE:
- case PRESOBJ_CALC:
- case PRESOBJ_MEDIA:
- ePresObjKind = PRESOBJ_OUTLINE;
+ case PresObjKind::Graphic:
+ case PresObjKind::Object:
+ case PresObjKind::Chart:
+ case PresObjKind::OrgChart:
+ case PresObjKind::Table:
+ case PresObjKind::Calc:
+ case PresObjKind::Media:
+ ePresObjKind = PresObjKind::Outline;
break;
default:
break;
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 734f1a03f34f..afe8b0f9d9fa 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -1118,7 +1118,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
while( (pObj = rShapeList.getNextShape()) )
{
- if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT )
+ if( pMaster->GetPresObjKind(pObj) == PresObjKind::Handout )
{
// #i105146# We want no content to be displayed for PageKind::Handout,
// so just never set a page as content
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 3348594ffdc7..8fb5f662b3ee 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1260,7 +1260,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pObj->GetObjIdentifier() == OBJ_TITLETEXT)
{
- pSheet = mpActualPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
+ pSheet = mpActualPage->GetStyleSheetForPresObj(PresObjKind::Title);
if (pSheet)
pObj->SetStyleSheet(pSheet, false);
}
@@ -1268,7 +1268,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
- pSheet = mpActualPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+ pSheet = mpActualPage->GetStyleSheetForPresObj( PresObjKind::Outline );
DBG_ASSERT(pSheet, "Template for outline object not found");
if (pSheet)
{
@@ -2281,7 +2281,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_HIDE_LAST_LEVEL:
{
ESelection aSel;
- // fdo#78151 editing a PRESOBJ_OUTLINE in a master page ?
+ // fdo#78151 editing a PresObjKind::Outline in a master page ?
::Outliner* pOL = GetOutlinerForMasterPageOutlineTextObj(aSel);
if (pOL)
{
@@ -2320,7 +2320,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
};
ESelection aSel;
- // fdo#78151 editing a PRESOBJ_OUTLINE in a master page ?
+ // fdo#78151 editing a PresObjKind::Outline in a master page ?
::Outliner* pOL = GetOutlinerForMasterPageOutlineTextObj(aSel);
if (pOL)
{
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 21a4d187c014..e1ea9d36287e 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -368,7 +368,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( pPage && (pPage->GetPageKind() == PageKind::Standard) && !pPage->IsMasterPage() )
{
- SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
+ SdrObject* pObj = pPage->GetPresObj(PresObjKind::Outline);
if (pObj!=nullptr )
{
@@ -407,7 +407,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( pPage && (pPage->GetPageKind() == PageKind::Standard) && !pPage->IsMasterPage() )
{
- SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE);
+ SdrObject* pObj = pPage->GetPresObj(PresObjKind::Title);
if(pObj && !pObj->IsEmptyPresObj())
{
@@ -1505,7 +1505,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
//fdo#78151 enable show next level/hide last level if editing a master page
- //PRESOBJ_OUTLINE object and the current selection allow that to happen
+ //PresObjKind::Outline object and the current selection allow that to happen
{
bool bDisableShowNextLevel = true;
bool bDisableHideLastLevel = true;
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 7bbc8946e3db..39097ac7fdfb 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -675,8 +675,8 @@ void DrawViewShell::FuDeleteSelectedObjects()
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
SdPage* pPage = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject());
PresObjKind eKind = pPage->GetPresObjKind(pObj);
- if (eKind == PRESOBJ_FOOTER || eKind == PRESOBJ_HEADER ||
- eKind == PRESOBJ_DATETIME || eKind == PRESOBJ_SLIDENUMBER)
+ if (eKind == PresObjKind::Footer || eKind == PresObjKind::Header ||
+ eKind == PresObjKind::DateTime || eKind == PresObjKind::SlideNumber)
{
aPresMarksToRemove.push_back(pObj);
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 180dd2486923..cf594e1f9e85 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -945,7 +945,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if (pPage->IsSelected())
{
- SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
+ SdrObject* pObj = pPage->GetPresObj(PresObjKind::Outline);
if (pObj!=nullptr )
{
@@ -990,7 +990,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if (pPage->IsSelected())
{
- SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE);
+ SdrObject* pObj = pPage->GetPresObj(PresObjKind::Title);
if (pObj && !pObj->IsEmptyPresObj())
{
@@ -1650,7 +1650,7 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
bool bNewObject = false;
OutlinerMode eOutlinerMode = OutlinerMode::TitleObject;
- pTO = static_cast<SdrTextObj*>(pPage->GetPresObj( PRESOBJ_TEXT ));
+ pTO = static_cast<SdrTextObj*>(pPage->GetPresObj( PresObjKind::Text ));
if( !pTO )
{
eOutlinerMode = OutlinerMode::OutlineObject;
@@ -1750,8 +1750,8 @@ ErrCode OutlineViewShell::ReadRtf(SvStream& rInput)
bRet = rOutl.Read( rInput, OUString(), EETextFormat::Rtf, GetDocSh()->GetHeaderAttributes() );
SdPage* pPage = GetDoc()->GetSdPage( GetDoc()->GetSdPageCount(PageKind::Standard) - 1, PageKind::Standard );
- SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
- SfxStyleSheet* pOutlSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+ SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Title );
+ SfxStyleSheet* pOutlSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Outline );
sal_Int32 nParaCount = rOutl.GetParagraphCount();
if ( nParaCount > 0 )
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index a9b7771074c9..735b836875f7 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -646,7 +646,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam
{
SdPage*pPage = mrDoc.GetSdPage( static_cast<sal_uInt16>(nPos), PageKind::Standard);
- if(pPage && pPage->GetPresObj(PRESOBJ_TEXT))
+ if(pPage && pPage->GetPresObj(PresObjKind::Text))
pOutliner->SetDepth( pPara, 0 );
}
@@ -673,19 +673,19 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam
SfxStyleSheet* pStyleSheet = nullptr;
sal_Int32 nPara = pOutliner->GetAbsPos( pPara );
sal_Int16 nDepth = pOutliner->GetDepth( nPara );
- bool bSubTitle = pPage->GetPresObj(PRESOBJ_TEXT) != nullptr;
+ bool bSubTitle = pPage->GetPresObj(PresObjKind::Text) != nullptr;
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) )
{
- pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
+ pStyleSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Title );
}
else if( bSubTitle )
{
- pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT );
+ pStyleSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Text );
}
else
{
- pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+ pStyleSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Outline );
if( nDepth > 0 )
{
@@ -908,7 +908,7 @@ SdrTextObj* OutlineView::CreateTitleTextObject(SdPage* pPage)
{
// we already have a layout with a title but the title
// object was deleted, create a new one
- pPage->InsertAutoLayoutShape( nullptr, PRESOBJ_TITLE, false, pPage->GetTitleRect(), true );
+ pPage->InsertAutoLayoutShape( nullptr, PresObjKind::Title, false, pPage->GetTitleRect(), true );
}
return GetTitleTextObject(pPage);
@@ -943,7 +943,7 @@ SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
// we already have a layout with a text but the text
// object was deleted, create a new one
pPage->InsertAutoLayoutShape( nullptr,
- PRESOBJ_OUTLINE,
+ PresObjKind::Outline,
false, pPage->GetLayoutRect(), true );
}
@@ -1038,7 +1038,7 @@ void OutlineView::FillOutliner()
mrOutliner.SetParaAttribs( mrOutliner.GetAbsPos(pPara),
mrOutliner.GetEmptyItemSet() );
- mrOutliner.SetStyleSheet( mrOutliner.GetAbsPos( pPara ), pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ) );
+ mrOutliner.SetStyleSheet( mrOutliner.GetAbsPos( pPara ), pPage->GetStyleSheetForPresObj( PresObjKind::Title ) );
}
mrOutliner.SetParaFlag( pPara, ParaFlag::ISPAGE );
@@ -1052,7 +1052,7 @@ void OutlineView::FillOutliner()
pTitleToSelect = pPara;
// take text from subtitle or outline
- pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT));
+ pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Text));
const bool bSubTitle = pTO != nullptr;
if (!pTO) // if no subtile found, try outline
@@ -1665,7 +1665,7 @@ void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfo )
if( pPage )
{
- SfxStyleSheet* pStyle = pPage->GetStyleSheetForPresObj( bPage ? PRESOBJ_TITLE : PRESOBJ_OUTLINE );
+ SfxStyleSheet* pStyle = pPage->GetStyleSheetForPresObj( bPage ? PresObjKind::Title : PresObjKind::Outline );
if( !bPage )
{
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 56df6e5d2caf..12470903d5a3 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -183,7 +183,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
if(!bDoCreateGeometry && !(( pObject->GetObjInventor() == SdrInventor::Default ) && ( pObject->GetObjIdentifier() == OBJ_PAGE )) )
return xRetval;
- PresObjKind eKind(PRESOBJ_NONE);
+ PresObjKind eKind(PresObjKind::NONE);
const bool bSubContentProcessing(rDisplayInfo.GetSubContentActive());
const bool bIsMasterPageObject(pObject->getSdrPageFromSdrObject()->IsMasterPage());
const bool bIsPrinting(rOriginal.GetObjectContact().isOutputToPrinter());
@@ -202,7 +202,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
{
if( !bSubContentProcessing || !pObject->IsNotVisibleAsMaster() )
{
- eKind = pObjectsSdPage ? pObjectsSdPage->GetPresObjKind(pObject) : PRESOBJ_NONE;
+ eKind = pObjectsSdPage ? pObjectsSdPage->GetPresObjKind(pObject) : PresObjKind::NONE;
bCreateOutline = true;
}
}
@@ -212,7 +212,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
{
eKind = pObjectsSdPage->GetPresObjKind(pObject);
- if((eKind == PRESOBJ_FOOTER) || (eKind == PRESOBJ_HEADER) || (eKind == PRESOBJ_DATETIME) || (eKind == PRESOBJ_SLIDENUMBER) )
+ if((eKind == PresObjKind::Footer) || (eKind == PresObjKind::Header) || (eKind == PresObjKind::DateTime) || (eKind == PresObjKind::SlideNumber) )
{
if( !bSubContentProcessing )
{
@@ -278,7 +278,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
switch( eKind )
{
- case PRESOBJ_TITLE:
+ case PresObjKind::Title:
{
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard)
{
@@ -288,37 +288,37 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
break;
}
- case PRESOBJ_OUTLINE:
+ case PresObjKind::Outline:
{
static OUString aOutlineAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_OUTLINE));
aObjectString = aOutlineAreaStr;
break;
}
- case PRESOBJ_FOOTER:
+ case PresObjKind::Footer:
{
static OUString aFooterAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_FOOTER));
aObjectString = aFooterAreaStr;
break;
}
- case PRESOBJ_HEADER:
+ case PresObjKind::Header:
{
static OUString aHeaderAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_HEADER));
aObjectString = aHeaderAreaStr;
break;
}
- case PRESOBJ_DATETIME:
+ case PresObjKind::DateTime:
{
static OUString aDateTimeStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_DATETIME));
aObjectString = aDateTimeStr;
break;
}
- case PRESOBJ_NOTES:
+ case PresObjKind::Notes:
{
static OUString aDateTimeStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_NOTES));
aObjectString = aDateTimeStr;
break;
}
- case PRESOBJ_SLIDENUMBER:
+ case PresObjKind::SlideNumber:
{
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard)
{
@@ -540,7 +540,7 @@ bool View::IsPresObjSelected(bool bOnPage, bool bOnMasterPage, bool bCheckPresOb
{
PresObjKind eKind = pPage->GetPresObjKind(pObj);
- if((eKind != PRESOBJ_FOOTER) && (eKind != PRESOBJ_HEADER) && (eKind != PRESOBJ_DATETIME) && (eKind != PRESOBJ_SLIDENUMBER) )
+ if((eKind != PresObjKind::Footer) && (eKind != PresObjKind::Header) && (eKind != PresObjKind::DateTime) && (eKind != PresObjKind::SlideNumber) )
bSelected = true;
}
else
@@ -714,12 +714,12 @@ bool View::SdrBeginTextEdit(
{
const SdrTextObj* pTextObj = pOutl->GetTextObj();
const SdPage* pSdPage = pTextObj ? static_cast<const SdPage*>(pTextObj->getSdrPageFromSdrObject()) : nullptr;
- const PresObjKind eKind = pSdPage ? pSdPage->GetPresObjKind(const_cast<SdrTextObj*>(pTextObj)) : PRESOBJ_NONE;
+ const PresObjKind eKind = pSdPage ? pSdPage->GetPresObjKind(const_cast<SdrTextObj*>(pTextObj)) : PresObjKind::NONE;
switch (eKind)
{
- case PRESOBJ_TITLE:
- case PRESOBJ_OUTLINE:
- case PRESOBJ_TEXT:
+ case PresObjKind::Title:
+ case PresObjKind::Outline:
+ case PresObjKind::Text:
maMasterViewFilter.Start(pOutl);
break;
default:
@@ -1169,11 +1169,11 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfo )
const PresObjKind eKind = pPage->GetPresObjKind(pTextObj);
// outline kinds are taken care of in Outliner::ImplSetLevelDependentStyleSheet
- if( eKind == PRESOBJ_OUTLINE )
+ if( eKind == PresObjKind::Outline )
return;
SfxStyleSheet* pStyleSheet = nullptr;
- if( eKind != PRESOBJ_NONE )
+ if( eKind != PresObjKind::NONE )
pStyleSheet = pPage->GetStyleSheetForPresObj(eKind);
else
pStyleSheet = pTextObj->GetStyleSheet();
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 87fc2eb40ebe..a02e923200a5 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -273,7 +273,7 @@ void View::DoPaste (::sd::Window* pWindow)
if( pOutliner)
{
- if( pObj && pPage && pPage->GetPresObjKind(pObj) == PRESOBJ_TITLE )
+ if( pObj && pPage && pPage->GetPresObjKind(pObj) == PresObjKind::Title )
{
// remove all hard linebreaks from the title
if (pOutliner->GetParagraphCount() > 1)
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 0bf877f6fc02..59aa0c396858 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -134,7 +134,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if (pPage && pPage->IsPresObj(pPickObj))
{
// Insert new PresObj into the list
- pPage->InsertPresObj( pNewGrafObj, PRESOBJ_GRAPHIC );
+ pPage->InsertPresObj( pNewGrafObj, PresObjKind::Graphic );
pNewGrafObj->SetUserCall(pPickObj->GetUserCall());
}
@@ -309,7 +309,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM
SdrMediaObj* pNewMediaObj = nullptr;
SdrPageView* pPV = GetSdrPageView();
- SdrObject* pPickObj = GetEmptyPresentationObject( PRESOBJ_MEDIA );
+ SdrObject* pPickObj = GetEmptyPresentationObject( PresObjKind::Media );
if(pPV && dynamic_cast<const ::sd::slidesorter::view::SlideSorterView* >(this) )
{
@@ -347,7 +347,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM
bIsPres = pPage && pPage->IsPresObj(pPickObj);
if( bIsPres )
{
- pPage->InsertPresObj( pNewMediaObj, PRESOBJ_MEDIA );
+ pPage->InsertPresObj( pNewMediaObj, PresObjKind::Media );
}
}
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
index 5378b328499e..c3ac066bc0ec 100644
--- a/sd/source/ui/view/sdview5.cxx
+++ b/sd/source/ui/view/sdview5.cxx
@@ -29,13 +29,13 @@ static bool implIsMultiPresObj( PresObjKind eKind )
{
switch( eKind )
{
- case PRESOBJ_OUTLINE:
- case PRESOBJ_GRAPHIC:
- case PRESOBJ_OBJECT:
- case PRESOBJ_CHART:
- case PRESOBJ_ORGCHART:
- case PRESOBJ_TABLE:
- case PRESOBJ_MEDIA:
+ case PresObjKind::Outline:
+ case PresObjKind::Graphic:
+ case PresObjKind::Object:
+ case PresObjKind::Chart:
+ case PresObjKind::OrgChart:
+ case PresObjKind::Table:
+ case PresObjKind::Media:
return true;
default:
return false;