diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-09 09:05:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-09 11:15:16 +0000 |
commit | 17076d8ecf77f313b7a93912528f9cb0fd0d3ea8 (patch) | |
tree | cb77cae87f0a07e729deb9a66679a4cfec434768 /sd | |
parent | 70d5cd845d4fe218588155cf43bdf854e8fc54f3 (diff) |
convert OUTLINER_MODE to scoped enum
Change-Id: I7ac45d7fbd5e77a105cbe942c6d4fd6cfc8ff909
Reviewed-on: https://gerrit.libreoffice.org/24789
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/Outliner.hxx | 12 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 12 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 14 | ||||
-rw-r--r-- | sd/source/core/text/textapi.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/SpellDialogChildWindow.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuexpand.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuhhconv.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fusearch.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fusumry.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 6 |
23 files changed, 61 insertions, 61 deletions
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 73434a74ed4d..3c7296a8f1de 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -114,14 +114,14 @@ public: @param pDoc The draw document from which to take the content. @param nMode - The valid values <const>OUTLINERMODE_DONTKNOW</const>, - <const>OUTLINERMODE_TEXTOBJECT</const>, - <const>OUTLINERMODE_TITLEOBJECT</const>, - <const>OUTLINERMODE_OUTLINEOBJECT</const>, and - <const>OUTLINERMODE_OUTLINEVIEW</const> are defined in + The valid values <const>OutlinerMode::DontKnow</const>, + <const>OutlinerMode::TextObject</const>, + <const>OutlinerMode::TitleObject</const>, + <const>OutlinerMode::OutlineObject</const>, and + <const>OutlinerMode::OutlineView</const> are defined in editeng/outliner.hxx. */ - Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode ); + Outliner( SdDrawDocument* pDoc, OutlinerMode nMode ); virtual ~Outliner(); /// Forbid copy construction and copy assignment Outliner(const Outliner&) = delete; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 5b38cd419ac1..2bf77d946ece 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -764,8 +764,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool if (nId == OBJ_TITLETEXT) { - if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW ) - pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT ); + if( pOPO && pOPO->GetOutlinerMode() == OutlinerMode::DontKnow ) + pOPO->SetOutlinerMode( OutlinerMode::TitleObject ); // sal_True: don't delete "hard" attributes when doing this. if (pTitleSheet) @@ -773,8 +773,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool } else if (nId == OBJ_OUTLINETEXT) { - if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW ) - pOPO->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT ); + if( pOPO && pOPO->GetOutlinerMode() == OutlinerMode::DontKnow ) + pOPO->SetOutlinerMode( OutlinerMode::OutlineObject ); std::vector<SfxStyleSheetBase*>::iterator iter; for (iter = aOutlineList.begin(); iter != aOutlineList.end(); ++iter) @@ -816,7 +816,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool { if (!mpOutliner && bCreateOutliner) { - mpOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT ); + mpOutliner = new ::sd::Outliner( this, OutlinerMode::TextObject ); if (mpDocSh) mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) ); @@ -834,7 +834,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool { if ( !mpInternalOutliner && bCreateOutliner ) { - mpInternalOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT ); + mpInternalOutliner = new ::sd::Outliner( this, OutlinerMode::TextObject ); // This outliner is only used to create special text objects. As no // information about portions is saved in this outliner, the update mode diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 3dceb0c7308b..2f9f8ba7debe 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -884,12 +884,12 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj) Link<EditStatus&,void> aEvtHdl = pOutl->GetStatusEventHdl(); pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl)); - sal_uInt16 nOldOutlMode = pOutl->GetMode(); - sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT; + OutlinerMode nOldOutlMode = pOutl->GetMode(); + OutlinerMode nOutlMode = OutlinerMode::TextObject; if (pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT) { - nOutlMode = OUTLINERMODE_OUTLINEOBJECT; + nOutlMode = OutlinerMode::OutlineObject; } pOutl->Init( nOutlMode ); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 409bf445ac99..001994566324 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -458,8 +458,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec { SdrOutliner* pOutliner = static_cast<SdDrawDocument*>( GetModel() )->GetInternalOutliner(); - sal_uInt16 nOutlMode = pOutliner->GetMode(); - pOutliner->Init( OUTLINERMODE_TEXTOBJECT ); + OutlinerMode nOutlMode = pOutliner->GetMode(); + pOutliner->Init( OutlinerMode::TextObject ); pOutliner->SetStyleSheet( 0, nullptr ); pOutliner->SetVertical( bVertical ); @@ -2384,7 +2384,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO if (!pOutliner) { SfxItemPool* pPool = static_cast<SdDrawDocument*>(GetModel())->GetDrawOutliner().GetEmptyItemSet().GetPool(); - pOutl = new ::Outliner( pPool, OUTLINERMODE_OUTLINEOBJECT ); + pOutl = new ::Outliner( pPool, OutlinerMode::OutlineObject ); pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *static_cast<SdDrawDocument*>( GetModel() )->GetDocSh() ) ); pOutl->SetEditTextObjectPool(pPool); pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetModel()->GetStyleSheetPool())); @@ -2392,7 +2392,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO pOutl->SetUpdateMode( false ); } - sal_uInt16 nOutlMode = pOutl->GetMode(); + OutlinerMode nOutlMode = pOutl->GetMode(); Size aPaperSize = pOutl->GetPaperSize(); bool bUpdateMode = pOutl->GetUpdateMode(); pOutl->SetUpdateMode(false); @@ -2411,7 +2411,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO { case PRESOBJ_OUTLINE: { - pOutl->Init( OUTLINERMODE_OUTLINEOBJECT ); + pOutl->Init( OutlinerMode::OutlineObject ); aString += "\t"; aString += rString; @@ -2443,14 +2443,14 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO case PRESOBJ_TITLE: { - pOutl->Init( OUTLINERMODE_TITLEOBJECT ); + pOutl->Init( OutlinerMode::TitleObject ); aString += rString; } break; default: { - pOutl->Init( OUTLINERMODE_TEXTOBJECT ); + pOutl->Init( OutlinerMode::TextObject ); aString += rString; // check if we need to add a text field diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx index 086a06d77169..bae26eff34f4 100644 --- a/sd/source/core/text/textapi.cxx +++ b/sd/source/core/text/textapi.cxx @@ -227,7 +227,7 @@ SvxTextForwarder* TextAPIEditSource::GetTextForwarder() if (!m_xImpl->mpOutliner) { //init draw model first - m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OUTLINERMODE_TEXTOBJECT); + m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OutlinerMode::TextObject); m_xImpl->mpDoc->SetCalcFieldValueHdl(m_xImpl->mpOutliner); } @@ -244,7 +244,7 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText ) if (!m_xImpl->mpOutliner) { //init draw model first - m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OUTLINERMODE_TEXTOBJECT); + m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OutlinerMode::TextObject); m_xImpl->mpDoc->SetCalcFieldValueHdl(m_xImpl->mpOutliner); } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index baee94a6ab61..9f574b55fb33 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -427,7 +427,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) TextApiObject* pTextApi = getTextApiObject( xAnnotation ); if( pTextApi ) { - std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) ); + std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OutlinerMode::TextObject) ); mpDoc->SetCalcFieldValueHdl( pOutliner.get() ); pOutliner->SetUpdateMode( true ); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 2998292a717f..19a4729fbe7c 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -326,7 +326,7 @@ void AnnotationWindow::InitControls() aSettings.SetStyleSettings(aStyleSettings); mpMeta->SetSettings(aSettings); - mpOutliner = new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT); + mpOutliner = new ::Outliner(GetAnnotationPool(),OutlinerMode::TextObject); Doc()->SetCalcFieldValueHdl( mpOutliner ); mpOutliner->SetUpdateMode( true ); Rescale(); diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx index 1791ec6c8c35..6870683598a9 100644 --- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx +++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx @@ -147,7 +147,7 @@ void SpellDialogChildWindow::ProvideOutliner() // to create one. mbOwnOutliner = true; SdDrawDocument *pDoc = pViewShell->GetDoc(); - mpSdOutliner = new Outliner(pDoc, OUTLINERMODE_TEXTOBJECT); + mpSdOutliner = new Outliner(pDoc, OutlinerMode::TextObject); StartListening(*pDoc); } else if( dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr) diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 1ff03d015f09..b1b14713fb15 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -624,8 +624,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo if( pObj ) { Outliner* pOutl = mpDoc->GetInternalOutliner(); - pOutl->Init( OUTLINERMODE_TEXTOBJECT ); - sal_uInt16 nOutlMode = pOutl->GetMode(); + pOutl->Init( OutlinerMode::TextObject ); + OutlinerMode nOutlMode = pOutl->GetMode(); EditEngine* pEdit = const_cast< EditEngine* >(&pOutl->GetEditEngine()); diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx index 17bb5e4700f5..cc163dd7c8f8 100644 --- a/sd/source/ui/func/fuexpand.cxx +++ b/sd/source/ui/func/fuexpand.cxx @@ -88,7 +88,7 @@ void FuExpandPage::DoExecute( SfxRequest& ) if (pActualPage) { ::sd::Outliner* pOutl = - new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT ); + new ::sd::Outliner( mpDoc, OutlinerMode::OutlineObject ); pOutl->SetUpdateMode(false); pOutl->EnableUndo(false); @@ -185,11 +185,11 @@ void FuExpandPage::DoExecute( SfxRequest& ) continue; OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( nParaPos, 1); - pOutlinerParaObject->SetOutlinerMode(OUTLINERMODE_TITLEOBJECT); + pOutlinerParaObject->SetOutlinerMode(OutlinerMode::TitleObject); if( pOutlinerParaObject->GetDepth(0) != -1 ) { - SdrOutliner* pTempOutl = SdrMakeOutliner(OUTLINERMODE_TITLEOBJECT, *mpDoc); + SdrOutliner* pTempOutl = SdrMakeOutliner(OutlinerMode::TitleObject, *mpDoc); pTempOutl->SetText( *pOutlinerParaObject ); @@ -217,7 +217,7 @@ void FuExpandPage::DoExecute( SfxRequest& ) // create structuring text objects OutlinerParaObject* pOPO = pOutl->CreateParaObject(++nParaPos, nChildCount); - SdrOutliner* pTempOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpDoc); + SdrOutliner* pTempOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *mpDoc); pTempOutl->SetText( *pOPO ); sal_Int32 nParaCount2 = pTempOutl->GetParagraphCount(); diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index 7e3a74d39e35..ccec7b0ab1a9 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -65,7 +65,7 @@ FuHangulHanjaConversion::FuHangulHanjaConversion ( if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr ) { bOwnOutliner = true; - pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ); + pSdOutliner = new Outliner( mpDoc, OutlinerMode::TextObject ); } else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr ) { @@ -112,7 +112,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In pSdOutliner->EndConversion(); bOwnOutliner = true; - pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ); + pSdOutliner = new Outliner( mpDoc, OutlinerMode::TextObject ); pSdOutliner->BeginConversion(); } else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr && bOwnOutliner ) diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 113c46e7965a..d54100635ec5 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -444,7 +444,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) - the draw outliner of the drawing engine has to draw something in between - the global outliner could be used in SdPage::CreatePresObj */ - std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT )); + std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OutlinerMode::TextObject )); // set reference device pOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) ); @@ -594,7 +594,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) - the draw outliner of the drawing engine has to draw something in between - the global outliner could be used in SdPage::CreatePresObj */ - std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OUTLINERMODE_OUTLINEOBJECT )); + std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OutlinerMode::OutlineObject )); pOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool())); // set reference device diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx index 6c839ab1b240..3e1a98608365 100644 --- a/sd/source/ui/func/fusearch.cxx +++ b/sd/source/ui/func/fusearch.cxx @@ -77,7 +77,7 @@ void FuSearch::DoExecute( SfxRequest& ) if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr ) { bOwnOutliner = true; - pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ); + pSdOutliner = new ::sd::Outliner( mpDoc, OutlinerMode::TextObject ); } else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr ) { @@ -115,7 +115,7 @@ void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem ) pSdOutliner->EndSpelling(); bOwnOutliner = true; - pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ); + pSdOutliner = new ::sd::Outliner( mpDoc, OutlinerMode::TextObject ); pSdOutliner->PrepareSpelling(); } else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr && bOwnOutliner ) diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx index 3100e0970d76..072d34c67bab 100644 --- a/sd/source/ui/func/fusumry.cxx +++ b/sd/source/ui/func/fusumry.cxx @@ -159,7 +159,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); pNotesPage->setHeaderFooterSettings(pActualNotesPage->getHeaderFooterSettings()); - pOutl = new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT ); + pOutl = new ::sd::Outliner( mpDoc, OutlinerMode::OutlineObject ); pOutl->SetUpdateMode(false); pOutl->EnableUndo(false); @@ -177,7 +177,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) // #118876#, check if the OutlinerParaObject is created successfully if( pParaObj ) { - pParaObj->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT ); + pParaObj->SetOutlinerMode( OutlinerMode::OutlineObject ); pOutl->AddText(*pParaObj); } } diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index f5d83bdf8465..c55ddfa783b8 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1043,7 +1043,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) nSdrObjKind == OBJ_OUTLINETEXT || !mxTextObj->IsEmptyPresObj() ) ) { // create new outliner (owned by SdrObjEditView) - SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpDoc); + SdrOutliner* pOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *mpDoc); if (bEmptyOutliner) mpView->SdrEndTextEdit(true); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index f817a6bdf7f6..3eee8172e629 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1119,11 +1119,11 @@ namespace { // Get and set up the outliner. const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize()); Outliner* pOutliner = rDocument.GetInternalOutliner(); - const sal_uInt16 nSavedOutlMode (pOutliner->GetMode()); + const OutlinerMode nSavedOutlMode (pOutliner->GetMode()); const bool bSavedUpdateMode (pOutliner->GetUpdateMode()); const Size aSavedPaperSize (pOutliner->GetPaperSize()); - pOutliner->Init(OUTLINERMODE_OUTLINEVIEW); + pOutliner->Init(OutlinerMode::OutlineView); pOutliner->SetPaperSize(aOutRect.GetSize()); pOutliner->SetUpdateMode(true); pOutliner->Clear(); @@ -1636,8 +1636,8 @@ private: } Outliner* pOutliner = mrBase.GetDocument()->GetInternalOutliner(); - pOutliner->Init(OUTLINERMODE_OUTLINEVIEW); - const sal_uInt16 nSavedOutlMode (pOutliner->GetMode()); + pOutliner->Init(OutlinerMode::OutlineView); + const OutlinerMode nSavedOutlMode (pOutliner->GetMode()); const bool bSavedUpdateMode (pOutliner->GetUpdateMode()); const Size aSavedPaperSize (pOutliner->GetPaperSize()); const MapMode aSavedMapMode (pOutliner->GetRefMapMode()); diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 4aca67629b21..5cae4f923ae3 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -137,7 +137,7 @@ private: OutlinerView* mpOutlineView; }; -Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode ) +Outliner::Outliner( SdDrawDocument* pDoc, OutlinerMode nMode ) : SdrOutliner( &pDoc->GetItemPool(), nMode ), mpImpl(new Implementation()), meMode(SEARCH), diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 187cbf0879d7..25e0e44f39ab 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -269,7 +269,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) bool bOutlineViewSh = dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr; if (pOLV && - ( pOLV->GetOutliner()->GetMode() == OUTLINERMODE_OUTLINEOBJECT || bOutlineViewSh ) ) + ( pOLV->GetOutliner()->GetMode() == OutlinerMode::OutlineObject || bOutlineViewSh ) ) { // Outliner at outline-mode ::Outliner* pOutl = pOLV->GetOutliner(); @@ -279,7 +279,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) Paragraph* pPara = aSelList.empty() ? nullptr : *(aSelList.begin()); // find out if we are a OutlineView - bool bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode()); + bool bIsOutlineView(OutlinerMode::OutlineView == pOLV->GetOutliner()->GetMode()); // This is ONLY for OutlineViews if(bIsOutlineView) @@ -294,7 +294,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) } else { - // old behaviour for OUTLINERMODE_OUTLINEOBJECT + // old behaviour for OutlinerMode::OutlineObject if(pOutl->GetAbsPos(pPara) > 0) { // not at top diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 340936a65148..e610c44c0547 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1943,8 +1943,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) else { Outliner* pOutl = GetDoc()->GetInternalOutliner(); - pOutl->Init( OUTLINERMODE_TEXTOBJECT ); - sal_uInt16 nOutlMode = pOutl->GetMode(); + pOutl->Init( OutlinerMode::TextObject ); + OutlinerMode nOutlMode = pOutl->GetMode(); pOutl->SetStyleSheet( 0, nullptr ); pOutl->QuickInsertField( *pFieldItem, ESelection() ); OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject(); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index b4f59a6bc9ed..f4216520a528 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1436,8 +1436,8 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText, else { Outliner* pOutl = GetDoc()->GetInternalOutliner(); - pOutl->Init( OUTLINERMODE_TEXTOBJECT ); - sal_uInt16 nOutlMode = pOutl->GetMode(); + pOutl->Init( OutlinerMode::TextObject ); + OutlinerMode nOutlMode = pOutl->GetMode(); SvxURLField aURLField(rURL, rText, SVXURLFORMAT_REPR); aURLField.SetTargetFrame(rTarget); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 2c8787db715c..86f71567221a 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1602,7 +1602,7 @@ void OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara ) OutlinerParaObject* pOPO = pTO ? rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1) : nullptr; if (pOPO) { - pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT ); + pOPO->SetOutlinerMode( OutlinerMode::TitleObject ); pOPO->SetVertical( pTO->IsVerticalWriting() ); if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) ) { @@ -1665,11 +1665,11 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara ) bool bNewObject = false; - sal_uInt16 eOutlinerMode = OUTLINERMODE_TITLEOBJECT; + OutlinerMode eOutlinerMode = OutlinerMode::TitleObject; pTO = static_cast<SdrTextObj*>(pPage->GetPresObj( PRESOBJ_TEXT )); if( !pTO ) { - eOutlinerMode = OUTLINERMODE_OUTLINEOBJECT; + eOutlinerMode = OutlinerMode::OutlineObject; pTO = OutlineView::GetOutlineTextObject( pPage ); } diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 69e5fe26a75d..f3d9457a8a4b 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -94,7 +94,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie { // initialize Outliner: set Reference Device bInitOutliner = true; - mrOutliner.Init( OUTLINERMODE_OUTLINEVIEW ); + mrOutliner.Init( OutlinerMode::OutlineView ); mrOutliner.SetRefDevice( SD_MOD()->GetRefDevice( rDocSh ) ); //viewsize without the width of the image and number in front mnPaperWidth = (mrOutlineViewShell.GetActiveWindow()->GetViewSize().Width() - 4000); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index d10826382acb..969fbc71c99c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -659,7 +659,7 @@ bool View::SdrBeginTextEdit( sd::tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT, static_cast<void*>(pObj) ); if( pOutl==nullptr && pObj ) - pOutl = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pObj->GetModel()); + pOutl = SdrMakeOutliner(OutlinerMode::TextObject, *pObj->GetModel()); // make draw&impress specific initialisations if( pOutl ) @@ -1257,7 +1257,7 @@ bool View::ShouldToggleOn( return false; bool bToggleOn = false; - std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)); + std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel)); const size_t nMarkCount = GetMarkedObjectCount(); for (size_t nIndex = 0; nIndex < nMarkCount && !bToggleOn; ++nIndex) { @@ -1325,7 +1325,7 @@ void View::ChangeMarkedObjectsBulletsNumbering( const bool bToggleOn = ShouldToggleOn( bToggle, bHandleBullets ); - std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)); + std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel)); std::unique_ptr<OutlinerView> pOutlinerView(new OutlinerView(pOutliner.get(), pWindow)); const size_t nMarkCount = GetMarkedObjectCount(); |