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 /svx/source | |
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 'svx/source')
-rw-r--r-- | svx/source/inc/svdoutlinercache.hxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/properties/textproperties.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdetc.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxed.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdoutl.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdoutlinercache.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdtext.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/cell.cxx | 6 | ||||
-rw-r--r-- | svx/source/table/svdotable.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablertfimporter.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 4 |
15 files changed, 33 insertions, 33 deletions
diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx index 3bc3212b94d5..f3aa9ec43107 100644 --- a/svx/source/inc/svdoutlinercache.hxx +++ b/svx/source/inc/svdoutlinercache.hxx @@ -26,7 +26,7 @@ class SdrModel; class SdrOutliner; - +enum class OutlinerMode; class SdrOutlinerCache { @@ -40,7 +40,7 @@ public: SdrOutlinerCache( SdrModel* pModel ); ~SdrOutlinerCache(); - SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode ); + SdrOutliner* createOutliner( OutlinerMode nOutlinerMode ); void disposeOutliner( SdrOutliner* pOutliner ); std::vector< SdrOutliner* > GetActiveOutliners() const; }; diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 180b907eba94..de35ec39e3b9 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -405,7 +405,7 @@ namespace sdr && !rObj.IsTextEditActive() && !rObj.IsLinkedText()) { - Outliner* pOutliner = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *rObj.GetModel()); + Outliner* pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, *rObj.GetModel()); const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nText = rTextProvider.getTextCount(); diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index e831650ec33f..2c7bd27a0b8c 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -709,7 +709,7 @@ bool SdrObjEditView::SdrBeginTextEdit( mxTextEditObj.reset( pObj ); pTextEditOutliner=pGivenOutliner; if (pTextEditOutliner==nullptr) - pTextEditOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *mxTextEditObj->GetModel() ); + pTextEditOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *mxTextEditObj->GetModel() ); { SvtAccessibilityOptions aOptions; diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 091cfca0ea65..6c4484d02242 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -406,7 +406,7 @@ SdrEngineDefaults& SdrEngineDefaults::GetDefaults() return *rGlobalData.pDefaults; } -SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rModel) +SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rModel) { SfxItemPool* pPool = &rModel.GetItemPool(); SdrOutliner* pOutl = new SdrOutliner( pPool, nOutlinerMode ); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 4aea8c6f78ae..8f0beef843f9 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -214,15 +214,15 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe // can't create DrawOutliner OnDemand, because I can't get the Pool, // then (only from 302 onwards!) - pDrawOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *this); + pDrawOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this); ImpSetOutlinerDefaults(pDrawOutliner, true); - pHitTestOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *this); + pHitTestOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this); ImpSetOutlinerDefaults(pHitTestOutliner, true); /* Start Text Chaining related code */ // Initialize Chaining Outliner - pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *this ); + pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this ); ImpSetOutlinerDefaults(pChainingOutliner, true); // Make a TextChain @@ -1953,7 +1953,7 @@ void SdrModel::ReformatAllTextObjects() ImpReformatAllTextObjects(); } -SdrOutliner* SdrModel::createOutliner( sal_uInt16 nOutlinerMode ) +SdrOutliner* SdrModel::createOutliner( OutlinerMode nOutlinerMode ) { if( nullptr == mpOutlinerCache ) mpOutlinerCache = new SdrOutlinerCache(this); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 11a535d78892..151ff79730da 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1229,9 +1229,9 @@ void SdrTextObj::ImpCheckMasterCachable() void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const { rOutl.SetUpdateMode(false); - sal_uInt16 nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT; + OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject; if ( !IsOutlText() ) - nOutlinerMode = OUTLINERMODE_TEXTOBJECT; + nOutlinerMode = OutlinerMode::TextObject; rOutl.Init( nOutlinerMode ); rOutl.SetGlobalCharStretching(); @@ -1520,9 +1520,9 @@ void SdrTextObj::ForceOutlinerParaObject() SdrText* pText = getActiveText(); if( pText && (pText->GetOutlinerParaObject() == nullptr) ) { - sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT; + OutlinerMode nOutlMode = OutlinerMode::TextObject; if( IsTextFrame() && eTextKind == OBJ_OUTLINETEXT ) - nOutlMode = OUTLINERMODE_OUTLINEOBJECT; + nOutlMode = OutlinerMode::OutlineObject; pText->ForceOutlinerParaObject( nOutlMode ); } diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 02b20fe1205d..824f1057836a 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -45,9 +45,9 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) mbInEditMode = true; - sal_uInt16 nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT; + OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject; if ( !IsOutlText() ) - nOutlinerMode = OUTLINERMODE_TEXTOBJECT; + nOutlinerMode = OutlinerMode::TextObject; rOutl.Init( nOutlinerMode ); rOutl.SetRefDevice( pModel->GetRefDevice() ); diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index 998c520c800f..1e3ea5e2e150 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -26,7 +26,7 @@ #include <svl/itempool.hxx> -SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, sal_uInt16 nMode ) +SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode ) : Outliner( pItemPool, nMode ), //mpPaintInfoRec( NULL ) mpVisualizedPage(nullptr) @@ -44,9 +44,9 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj ) if( pObj && pObj != mpTextObj.get() ) { SetUpdateMode(false); - sal_uInt16 nOutlinerMode2 = OUTLINERMODE_OUTLINEOBJECT; + OutlinerMode nOutlinerMode2 = OutlinerMode::OutlineObject; if ( !pObj->IsOutlText() ) - nOutlinerMode2 = OUTLINERMODE_TEXTOBJECT; + nOutlinerMode2 = OutlinerMode::TextObject; Init( nOutlinerMode2 ); SetGlobalCharStretching(); diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx index 72e0069d8691..65c29b44ad02 100644 --- a/svx/source/svdraw/svdoutlinercache.cxx +++ b/svx/source/svdraw/svdoutlinercache.cxx @@ -30,16 +30,16 @@ SdrOutlinerCache::SdrOutlinerCache( SdrModel* pModel ) { } -SdrOutliner* SdrOutlinerCache::createOutliner( sal_uInt16 nOutlinerMode ) +SdrOutliner* SdrOutlinerCache::createOutliner( OutlinerMode nOutlinerMode ) { SdrOutliner* pOutliner = nullptr; - if( (OUTLINERMODE_OUTLINEOBJECT == nOutlinerMode) && !maModeOutline.empty() ) + if( (OutlinerMode::OutlineObject == nOutlinerMode) && !maModeOutline.empty() ) { pOutliner = maModeOutline.back(); maModeOutline.pop_back(); } - else if( (OUTLINERMODE_TEXTOBJECT == nOutlinerMode) && !maModeText.empty() ) + else if( (OutlinerMode::TextObject == nOutlinerMode) && !maModeText.empty() ) { pOutliner = maModeText.back(); maModeText.pop_back(); @@ -76,9 +76,9 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner ) { if( pOutliner ) { - sal_uInt16 nOutlMode = pOutliner->GetOutlinerMode(); + OutlinerMode nOutlMode = pOutliner->GetOutlinerMode(); - if( OUTLINERMODE_OUTLINEOBJECT == nOutlMode ) + if( OutlinerMode::OutlineObject == nOutlMode ) { maModeOutline.push_back(pOutliner); pOutliner->Clear(); @@ -87,7 +87,7 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner ) // Deregister on outliner, might be reused from outliner cache pOutliner->SetNotifyHdl( Link<EENotify&,void>() ); } - else if( OUTLINERMODE_TEXTOBJECT == nOutlMode ) + else if( OutlinerMode::TextObject == nOutlMode ) { maModeText.push_back(pOutliner); pOutliner->Clear(); diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index 8e804d864d4d..483f7e5efd3c 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -169,7 +169,7 @@ void SdrText::SetModel( SdrModel* pNewModel ) } } -void SdrText::ForceOutlinerParaObject( sal_uInt16 nOutlMode ) +void SdrText::ForceOutlinerParaObject( OutlinerMode nOutlMode ) { if( mpModel && !mpOutlinerParaObject ) { diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 5e517514d111..f4d11deaeca4 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -431,7 +431,7 @@ void Cell::SetModel(SdrModel* pNewModel) SetStyleSheet( nullptr, true ); SdrText::SetModel( pNewModel ); - ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT ); + ForceOutlinerParaObject( OutlinerMode::TextObject ); } } @@ -713,7 +713,7 @@ sal_Int32 Cell::getMinimumHeight() Outliner& rOutliner=rTableObj.ImpGetDrawOutliner(); rOutliner.SetPaperSize(aSize); rOutliner.SetUpdateMode(true); - ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT ); + ForceOutlinerParaObject( OutlinerMode::TextObject ); if( GetOutlinerParaObject() ) { @@ -770,7 +770,7 @@ void Cell::SetOutlinerParaObject( OutlinerParaObject* pTextObject ) maSelection.nStartPara = EE_PARA_MAX_COUNT; if( pTextObject == nullptr ) - ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT ); + ForceOutlinerParaObject( OutlinerMode::TextObject ); } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 07426a042140..2ea9c8abe954 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1747,7 +1747,7 @@ bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) mbInEditMode = true; - rOutl.Init( OUTLINERMODE_TEXTOBJECT ); + rOutl.Init( OutlinerMode::TextObject ); rOutl.SetRefDevice( pModel->GetRefDevice() ); bool bUpdMerk=rOutl.GetUpdateMode(); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 927bacc98c75..5119b88f4517 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1891,7 +1891,7 @@ void SvxTableController::EditCell( const CellPos& rPos, vcl::Window* pWindow, co pTableObj->setActiveCell( aPos ); // create new outliner, owner will be the SdrObjEditView - SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpModel) : nullptr; + SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OutlinerMode::OutlineObject, *mpModel) : nullptr; if (pOutl && pTableObj->IsVerticalWriting()) pOutl->SetVertical( true ); diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index a2237c47846a..c785bac57e98 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -125,7 +125,7 @@ private: SdrTableRTFParser::SdrTableRTFParser( SdrTableObj& rTableObj ) : mrTableObj( rTableObj ) -, mpOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *rTableObj.GetModel() ) ) +, mpOutliner( SdrMakeOutliner( OutlinerMode::TextObject, *rTableObj.GetModel() ) ) , mrItemPool( rTableObj.GetModel()->GetItemPool() ) , mnLastToken( 0 ) , mbNewDef( false ) diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 04988f675cc8..a6ef500eaaca 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -563,9 +563,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() if( mpOutliner == nullptr ) { SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); - sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT; + OutlinerMode nOutlMode = OutlinerMode::TextObject; if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_OUTLINETEXT ) - nOutlMode = OUTLINERMODE_OUTLINEOBJECT; + nOutlMode = OutlinerMode::OutlineObject; mpOutliner = mpModel->createOutliner( nOutlMode ); |