diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-19 12:16:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-19 14:30:50 +0200 |
commit | d4a066c3e4b7ebcdb16ffcb88b6b2c744c127ea1 (patch) | |
tree | 41042ca9f06117196e18d583d69cbdc9bafd445a /sd/source/ui | |
parent | be8c414567f49242164b1fdfb12764b16be355c1 (diff) |
inline some defines
which don't add any value anymore
Change-Id: I45977d972d4d02926630b749d3ec736416138cf5
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/dlg/dlgolbul.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/prltempl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/unchss.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/docshell/grdocsh.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuconstr.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuolbull.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuprobjs.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 2 |
18 files changed, 43 insertions, 43 deletions
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index 1ca852217a17..175cdd88f6b3 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -97,7 +97,7 @@ OutlineBulletDlg::OutlineBulletDlg( if(bOutliner) { SfxStyleSheetBasePool* pSSPool = pView->GetDocSh()->GetStyleSheetPool(); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SD_STYLE_FAMILY_PSEUDO); + SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SfxStyleFamily::Pseudo); if( pFirstStyleSheet ) pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem)); } diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 039f72dbd650..f6297ec9ddd2 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -99,7 +99,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem )) { OUString aStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1"); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO); + SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SfxStyleFamily::Pseudo); if(pFirstStyleSheet) if( SfxItemState::SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) ) diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx index d1d9b8e53358..b3392c51894f 100644 --- a/sd/source/ui/dlg/unchss.cxx +++ b/sd/source/ui/dlg/unchss.cxx @@ -99,7 +99,7 @@ void StyleSheetUndoAction::Undo() SdrModel::MigrateItemSet( mpOldSet.get(), &aNewSet, mpDoc ); mpStyleSheet->GetItemSet().Set(aNewSet); - if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO ) + if( mpStyleSheet->GetFamily() == SfxStyleFamily::Pseudo ) static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SfxHintId::DataChanged)); else mpStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged)); @@ -111,7 +111,7 @@ void StyleSheetUndoAction::Redo() SdrModel::MigrateItemSet( mpNewSet.get(), &aNewSet, mpDoc ); mpStyleSheet->GetItemSet().Set(aNewSet); - if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO ) + if( mpStyleSheet->GetFamily() == SfxStyleFamily::Pseudo ) static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SfxHintId::DataChanged)); else mpStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged)); diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx index f1ce852ca48c..fe533b17a5ad 100644 --- a/sd/source/ui/docshell/grdocsh.cxx +++ b/sd/source/ui/docshell/grdocsh.cxx @@ -55,7 +55,7 @@ GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode, DocumentType eDocType) : DrawDocShell(eMode, bDataObject, eDocType) { - SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS ); + SetStyleFamily( SfxStyleFamily::Para ); } GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags, @@ -63,7 +63,7 @@ GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags, DocumentType eDocType) : DrawDocShell(nModelCreationFlags, bDataObject, eDocType) { - SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS ); + SetStyleFamily( SfxStyleFamily::Para ); } GraphicDocShell::~GraphicDocShell() diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index b9b52738a0b1..1377429ed056 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -479,7 +479,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) OUString aName(SdResId(STR_POOLSHEET_MEASURE)); SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pPage->GetModel()-> GetStyleSheetPool()-> - Find(aName, SD_STYLE_FAMILY_GRAPHICS)); + Find(aName, SfxStyleFamily::Para)); DBG_ASSERT(pSheet, "StyleSheet missing"); if (pSheet) diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index dc005c0e968d..8f376fb3d72a 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -320,7 +320,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, aName = aName.copy(0, n) + STR_LAYOUT_BACKGROUNDOBJECTS; SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()-> GetStyleSheetPool()-> - Find(aName, SD_STYLE_FAMILY_MASTERPAGE)); + Find(aName, SfxStyleFamily::Page)); DBG_ASSERT(pSheet, "StyleSheet missing"); if (pSheet) { @@ -350,7 +350,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, OUString aName(SdResId(STR_POOLSHEET_OBJWITHOUTFILL)); SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()-> GetStyleSheetPool()-> - Find(aName, SD_STYLE_FAMILY_GRAPHICS)); + Find(aName, SfxStyleFamily::Para)); DBG_ASSERT(pSheet, "Stylesheet missing"); if (pSheet) { diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 46dc6495a489..2da671bafa29 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -329,7 +329,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u if(bOutliner) { SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool(); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SD_STYLE_FAMILY_PSEUDO); + SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SfxStyleFamily::Pseudo); if( pFirstStyleSheet ) pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem)); } diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 8f18c041790e..7d27ee9c07fa 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -128,7 +128,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) } SfxStyleSheetBasePool* pStyleSheetPool = mpDocSh->GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->Find( aStyleName, SD_STYLE_FAMILY_MASTERPAGE ); + SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->Find( aStyleName, SfxStyleFamily::Page ); DBG_ASSERT(pStyleSheet, "StyleSheet missing"); if( pStyleSheet ) diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index a7f8412d5d82..89c798af391d 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -114,9 +114,9 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { OUString sFamily = static_cast<const SfxStringItem &>( pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue(); if (sFamily == "graphics") - nFamily = SD_STYLE_FAMILY_GRAPHICS; + nFamily = SfxStyleFamily::Para; else - nFamily = SD_STYLE_FAMILY_PSEUDO; + nFamily = SfxStyleFamily::Pseudo; } OUString aStyleName; @@ -226,7 +226,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) pStyleSheet = pSSPool->Find( aStyleName, nFamily); // do not set presentation styles, they will be set implicit - if ( pStyleSheet && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_PSEUDO ) + if ( pStyleSheet && pStyleSheet->GetFamily() != SfxStyleFamily::Pseudo ) { SfxStyleSheet* pOldStyleSheet = mpView->GetStyleSheet(); OUString aStr; @@ -238,10 +238,10 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) pStyleSheet->GetFamily() == pOldStyleSheet->GetFamily() || // allow if old was background objects and new is graphics - (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_GRAPHICS && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS) || + (pStyleSheet->GetFamily() == SfxStyleFamily::Para && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS) || // allow if old was presentation and we are a drawing document - (pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && mpDoc->GetDocumentType() == DocumentType::Draw) ) + (pOldStyleSheet->GetFamily() == SfxStyleFamily::Page && mpDoc->GetDocumentType() == DocumentType::Draw) ) { mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet)); mpDoc->SetChanged(); @@ -261,7 +261,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) pStyleSheet = pSSPool->Find( aStyleName, nFamily); } // no presentation object templates, they are only allowed implicitly - if( pStyleSheet && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_PSEUDO ) + if( pStyleSheet && pStyleSheet->GetFamily() != SfxStyleFamily::Pseudo ) { static_cast<SdStyleSheetPool*>( pSSPool )->SetActualStyleSheet( pStyleSheet ); @@ -302,11 +302,11 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) SfxStyleFamily eFamily = pStyleSheet->GetFamily(); - if (eFamily == SD_STYLE_FAMILY_GRAPHICS) + if (eFamily == SfxStyleFamily::Para) { pStdDlg.disposeAndReset(pFact ? pFact->CreateSdTabTemplateDlg(mpViewShell->GetActiveWindow(), mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView) : nullptr); } - else if (eFamily == SD_STYLE_FAMILY_PSEUDO) + else if (eFamily == SfxStyleFamily::Pseudo) { OUString aName(pStyleSheet->GetName()); bool bBackground = false; @@ -385,7 +385,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { nRetMask = pStyleSheet->GetMask(); - if (eFamily == SD_STYLE_FAMILY_PSEUDO) + if (eFamily == SfxStyleFamily::Pseudo) { SfxItemSet aTempSet(*pOutSet); /* Extract SvxBrushItem out of set and insert SvxBackgroundColorItem */ @@ -413,7 +413,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) SvxNumRule aRule(*aTempSet.GetItem<SvxNumBulletItem>(EE_PARA_NUMBULLET)->GetNumRule()); OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1"); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO); + SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SfxStyleFamily::Pseudo); if(pFirstStyleSheet) { diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index be4785c732fc..2b0b22635c84 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -1034,7 +1034,7 @@ void SdXShape::SetStyleSheet( const uno::Any& rAny ) const SfxStyleSheet* pOldStyleSheet = pObj->GetStyleSheet(); if( pOldStyleSheet != pStyleSheet ) { - if( pStyleSheet == nullptr || (pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_MASTERPAGE) ) + if( pStyleSheet == nullptr || (pStyleSheet->GetFamily() != SfxStyleFamily::Para && pStyleSheet->GetFamily() != SfxStyleFamily::Page) ) throw lang::IllegalArgumentException(); pObj->SetStyleSheet( pStyleSheet, false ); @@ -1060,7 +1060,7 @@ uno::Any SdXShape::GetStyleSheet() const SfxStyleSheet* pStyleSheet = pObj->GetStyleSheet(); // it is possible for shapes inside a draw to have a presentation style // but we don't want this for the api - if( (pStyleSheet == nullptr) || ((pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS) && !mpModel->IsImpressDocument()) ) + if( (pStyleSheet == nullptr) || ((pStyleSheet->GetFamily() != SfxStyleFamily::Para) && !mpModel->IsImpressDocument()) ) return Any(); return Any( uno::Reference< style::XStyle >( dynamic_cast< SfxUnoStyleSheet* >( pStyleSheet ) ) ); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 506891188a3d..fd1f877ec78b 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2908,7 +2908,7 @@ void SdMasterPage::setBackground( const Any& rValue ) OUString aLayoutName( static_cast< SdPage* >( SvxFmDrawPage::mpPage )->GetLayoutName() ); aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)+4); aLayoutName += STR_LAYOUT_BACKGROUND; - SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SD_STYLE_FAMILY_MASTERPAGE ); + SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SfxStyleFamily::Page ); if( pStyleSheet ) { @@ -2952,7 +2952,7 @@ void SdMasterPage::getBackground( Any& rValue ) OUString aLayoutName( static_cast< SdPage* >(SvxFmDrawPage::mpPage)->GetLayoutName() ); aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)+4); aLayoutName += STR_LAYOUT_BACKGROUND; - SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SD_STYLE_FAMILY_MASTERPAGE ); + SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SfxStyleFamily::Page ); if( pStyleSheet ) { diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index c3db13f13da1..d635b1bdf804 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -195,7 +195,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, sal_Int16 nDepth = pOutliner->GetDepth( nParaPos ); OUString aName = rPage.GetLayoutName() + " " + OUString::number((nDepth <= 0) ? 1 : nDepth + 1); - SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE)); + SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->Find(aName, SfxStyleFamily::Page)); //We have no stylesheet if we access outline level 10 //in the master preview, there is no true style backing //that entry @@ -225,7 +225,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, { OUString aSheetName = rPage.GetLayoutName() + " " + OUString::number((nChild <= 0) ? 1 : nChild + 1); - SfxStyleSheet* pOutlSheet = static_cast< SfxStyleSheet* >(pStShPool->Find(aSheetName, SD_STYLE_FAMILY_MASTERPAGE)); + SfxStyleSheet* pOutlSheet = static_cast< SfxStyleSheet* >(pStShPool->Find(aSheetName, SfxStyleFamily::Page)); if( pOutlSheet ) pOutlSheet->Broadcast(SfxHint(SfxHintId::DataChanged)); @@ -304,7 +304,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, OUString aName = rPage.GetLayoutName() + " " + OUString::number(nLevel); SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool-> - Find(aName, SD_STYLE_FAMILY_MASTERPAGE)); + Find(aName, SfxStyleFamily::Page)); DBG_ASSERT(pSheet, "StyleSheet not found"); SfxItemSet aTempSet( pSheet->GetItemSet() ); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index f88384daf008..bd90cfdfc1f7 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -363,7 +363,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) const SvxNumBulletItem *pItem = nullptr; SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool(); OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1"); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find(sStyleName, SD_STYLE_FAMILY_PSEUDO); + SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find(sStyleName, SfxStyleFamily::Pseudo); if( pFirstStyleSheet ) pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem)); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 02d514ae611c..3d50e77825c5 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2931,7 +2931,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if( rReq.GetSlot() == SID_STYLE_EDIT && !rReq.GetArgs() ) { SfxStyleSheet* pStyleSheet = mpDrawView->GetStyleSheet(); - if( pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) + if( pStyleSheet && pStyleSheet->GetFamily() == SfxStyleFamily::Page) pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet(); if( (pStyleSheet == nullptr) && GetView()->IsTextEdit() ) @@ -2939,7 +2939,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) GetView()->SdrEndTextEdit(); pStyleSheet = mpDrawView->GetStyleSheet(); - if(pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) + if(pStyleSheet && pStyleSheet->GetFamily() == SfxStyleFamily::Page) pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet(); } diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 11b3e60813bb..5261ff37d6d2 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -443,16 +443,16 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } else { - if (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) + if (pStyleSheet->GetFamily() == SfxStyleFamily::Page) pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet(); if( pStyleSheet ) { SfxStyleFamily eFamily = pStyleSheet->GetFamily(); - if ((eFamily == SD_STYLE_FAMILY_GRAPHICS && nSlotId == SID_STYLE_FAMILY2) || - (eFamily == SD_STYLE_FAMILY_CELL && nSlotId == SID_STYLE_FAMILY3) || - (eFamily == SD_STYLE_FAMILY_PSEUDO && nSlotId == SID_STYLE_FAMILY5)) + if ((eFamily == SfxStyleFamily::Para && nSlotId == SID_STYLE_FAMILY2) || + (eFamily == SfxStyleFamily::Frame && nSlotId == SID_STYLE_FAMILY3) || + (eFamily == SfxStyleFamily::Pseudo && nSlotId == SID_STYLE_FAMILY5)) { SfxTemplateItem aTmpItem ( nWhich, pStyleSheet->GetName() ); aAllSet.Put( aTmpItem, aTmpItem.Which() ); @@ -486,7 +486,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) std::unique_ptr<SfxPoolItem> pItem; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get()); - if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo) rSet.Put(SfxBoolItem(nWhich,false)); else { @@ -501,7 +501,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) std::unique_ptr<SfxPoolItem> pItem; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get()); - if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo) { rSet.DisableItem(nWhich); } @@ -513,7 +513,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) std::unique_ptr<SfxPoolItem> pItem; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get()); - if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo) rSet.DisableItem(nWhich); } break; @@ -528,11 +528,11 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get()); if (pFamilyItem) { - if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo) { rSet.DisableItem(nWhich); } - else if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_GRAPHICS) + else if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Para) { if (!mpDrawView->AreObjectsMarked()) { diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index c65fe6c31b3d..242e7cccae41 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1474,7 +1474,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet ) std::unique_ptr<SfxPoolItem> pItem; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get()); - if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo) { SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{}); GetStatusBarState(aSet); diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 719d46ef108b..f342cb53193f 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -99,7 +99,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) SfxStyleSheet* pStyleSheet = pDrView->GetStyleSheet(); if( pStyleSheet ) { - if (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) + if (pStyleSheet->GetFamily() == SfxStyleFamily::Page) pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet(); if( pStyleSheet ) diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index f335beaa3a54..7744f3fd6976 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -931,7 +931,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& if(bOutliner) { SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool(); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SD_STYLE_FAMILY_PSEUDO); + SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SfxStyleFamily::Pseudo); if( pFirstStyleSheet ) pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem)); } |