diff options
36 files changed, 160 insertions, 161 deletions
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 24b1717963ca..5c65270da837 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -575,7 +575,7 @@ void ShapeController::executeDispatch_ParagraphDialog() 0 ); aNewAttr.Put( aAttr ); aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) ); - aNewAttr.Put( SvxFormatBreakItem( SVX_BREAK_NONE, SID_ATTR_PARA_PAGEBREAK ) ); + aNewAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, SID_ATTR_PARA_PAGEBREAK ) ); aNewAttr.Put( SvxFormatSplitItem( true, SID_ATTR_PARA_SPLIT) ); aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) ); aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) ); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index eb20663f4b60..1ad8bdcc1e55 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1456,7 +1456,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) if ( bIsPageModel ) // if PageModel is turned on, always turn off PageBreak - rOutSet->Put( SvxFormatBreakItem( SVX_BREAK_NONE, _nWhich ) ); + rOutSet->Put( SvxFormatBreakItem( SvxBreak::NONE, _nWhich ) ); else { eState = m_pPageBreakBox->GetState(); @@ -1480,22 +1480,22 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) if ( m_pBreakTypeLB->GetSelectEntryPos() == 0 ) { if ( bBefore ) - aBreak.SetValue( SVX_BREAK_PAGE_BEFORE ); + aBreak.SetValue( SvxBreak::PageBefore ); else - aBreak.SetValue( SVX_BREAK_PAGE_AFTER ); + aBreak.SetValue( SvxBreak::PageAfter ); } else { if ( bBefore ) - aBreak.SetValue( SVX_BREAK_COLUMN_BEFORE ); + aBreak.SetValue( SvxBreak::ColumnBefore ); else - aBreak.SetValue( SVX_BREAK_COLUMN_AFTER ); + aBreak.SetValue( SvxBreak::ColumnAfter ); } break; } case TRISTATE_FALSE: - aBreak.SetValue( SVX_BREAK_NONE ); + aBreak.SetValue( SvxBreak::NONE ); break; default: ; //prevent warning } @@ -1683,7 +1683,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) const SvxFormatBreakItem& rPageBreak = static_cast<const SvxFormatBreakItem&>(rSet->Get( _nWhich )); - SvxBreak eBreak = (SvxBreak)rPageBreak.GetValue(); + SvxBreak eBreak = rPageBreak.GetBreak(); // PageBreak not via CTRL-RETURN, // then CheckBox can be freed @@ -1696,9 +1696,9 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_pPageBreakBox->SetState( TRISTATE_TRUE ); - bool _bEnable = eBreak != SVX_BREAK_NONE && - eBreak != SVX_BREAK_COLUMN_BEFORE && - eBreak != SVX_BREAK_COLUMN_AFTER; + bool _bEnable = eBreak != SvxBreak::NONE && + eBreak != SvxBreak::ColumnBefore && + eBreak != SvxBreak::ColumnAfter; m_pApplyCollBtn->Enable(_bEnable); if(!_bEnable) { @@ -1706,22 +1706,22 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) m_pPagenumEdit->Enable(_bEnable); } - if ( eBreak == SVX_BREAK_NONE ) + if ( eBreak == SvxBreak::NONE ) m_pPageBreakBox->SetState( TRISTATE_FALSE ); sal_Int32 nType = 0; // selection position in break type ListBox : Page sal_Int32 nPosition = 0; // selection position in break position ListBox : Before switch ( eBreak ) { - case SVX_BREAK_PAGE_BEFORE: + case SvxBreak::PageBefore: break; - case SVX_BREAK_PAGE_AFTER: + case SvxBreak::PageAfter: nPosition = 1; break; - case SVX_BREAK_COLUMN_BEFORE: + case SvxBreak::ColumnBefore: nType = 1; break; - case SVX_BREAK_COLUMN_AFTER: + case SvxBreak::ColumnAfter: nType = 1; nPosition = 1; break; diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 10129262d249..ed2d0331378b 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -154,7 +154,7 @@ SfxPoolItem* SvxBrushItem::CreateDefault() { return new SvxBrushItem(0);} SfxPoolItem* SvxShadowItem::CreateDefault() { return new SvxShadowItem(0);} SfxPoolItem* SvxBoxItem::CreateDefault() { return new SvxBoxItem(0);} SfxPoolItem* SvxBoxInfoItem::CreateDefault() { return new SvxBoxInfoItem(0);} -SfxPoolItem* SvxFormatBreakItem::CreateDefault() { return new SvxFormatBreakItem(SVX_BREAK_NONE, 0);} +SfxPoolItem* SvxFormatBreakItem::CreateDefault() { return new SvxFormatBreakItem(SvxBreak::NONE, 0);} SfxPoolItem* SvxFormatKeepItem::CreateDefault() { return new SvxFormatKeepItem(false, 0);} SfxPoolItem* SvxLineItem::CreateDefault() { return new SvxLineItem(0);} SfxPoolItem* SvxFrameDirectionItem::CreateDefault() { return new SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, 0);} @@ -2905,7 +2905,7 @@ bool SvxFormatBreakItem::GetPresentation OUString SvxFormatBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos < SVX_BREAK_END, "enum overflow!" ); + DBG_ASSERT( nPos < (sal_uInt16)SvxBreak::End, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_BREAK_BEGIN + nPos); } @@ -2913,14 +2913,14 @@ OUString SvxFormatBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const bool SvxFormatBreakItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { style::BreakType eBreak = style::BreakType_NONE; - switch ( (SvxBreak)GetValue() ) + switch ( GetBreak() ) { - case SVX_BREAK_COLUMN_BEFORE: eBreak = style::BreakType_COLUMN_BEFORE; break; - case SVX_BREAK_COLUMN_AFTER: eBreak = style::BreakType_COLUMN_AFTER ; break; - case SVX_BREAK_COLUMN_BOTH: eBreak = style::BreakType_COLUMN_BOTH ; break; - case SVX_BREAK_PAGE_BEFORE: eBreak = style::BreakType_PAGE_BEFORE ; break; - case SVX_BREAK_PAGE_AFTER: eBreak = style::BreakType_PAGE_AFTER ; break; - case SVX_BREAK_PAGE_BOTH: eBreak = style::BreakType_PAGE_BOTH ; break; + case SvxBreak::ColumnBefore: eBreak = style::BreakType_COLUMN_BEFORE; break; + case SvxBreak::ColumnAfter: eBreak = style::BreakType_COLUMN_AFTER ; break; + case SvxBreak::ColumnBoth: eBreak = style::BreakType_COLUMN_BOTH ; break; + case SvxBreak::PageBefore: eBreak = style::BreakType_PAGE_BEFORE ; break; + case SvxBreak::PageAfter: eBreak = style::BreakType_PAGE_AFTER ; break; + case SvxBreak::PageBoth: eBreak = style::BreakType_PAGE_BOTH ; break; default: ; // prevent warning } rVal <<= eBreak; @@ -2940,18 +2940,18 @@ bool SvxFormatBreakItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ nBreak = (style::BreakType) nValue; } - SvxBreak eBreak = SVX_BREAK_NONE; + SvxBreak eBreak = SvxBreak::NONE; switch( nBreak ) { - case style::BreakType_COLUMN_BEFORE: eBreak = SVX_BREAK_COLUMN_BEFORE; break; - case style::BreakType_COLUMN_AFTER: eBreak = SVX_BREAK_COLUMN_AFTER; break; - case style::BreakType_COLUMN_BOTH: eBreak = SVX_BREAK_COLUMN_BOTH; break; - case style::BreakType_PAGE_BEFORE: eBreak = SVX_BREAK_PAGE_BEFORE; break; - case style::BreakType_PAGE_AFTER: eBreak = SVX_BREAK_PAGE_AFTER; break; - case style::BreakType_PAGE_BOTH: eBreak = SVX_BREAK_PAGE_BOTH; break; + case style::BreakType_COLUMN_BEFORE: eBreak = SvxBreak::ColumnBefore; break; + case style::BreakType_COLUMN_AFTER: eBreak = SvxBreak::ColumnAfter; break; + case style::BreakType_COLUMN_BOTH: eBreak = SvxBreak::ColumnBoth; break; + case style::BreakType_PAGE_BEFORE: eBreak = SvxBreak::PageBefore; break; + case style::BreakType_PAGE_AFTER: eBreak = SvxBreak::PageAfter; break; + case style::BreakType_PAGE_BOTH: eBreak = SvxBreak::PageBoth; break; default: ; // prevent warning } - SetValue((sal_uInt16) eBreak); + SetValue(eBreak); return true; } @@ -2995,7 +2995,7 @@ SfxPoolItem* SvxFormatBreakItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) sal_uInt16 SvxFormatBreakItem::GetValueCount() const { - return SVX_BREAK_END; // SVX_BREAK_PAGE_BOTH + 1 + return (sal_uInt16)SvxBreak::End; // SvxBreak::PageBoth + 1 } diff --git a/include/editeng/formatbreakitem.hxx b/include/editeng/formatbreakitem.hxx index 23f412c7b021..b7a57f883b98 100644 --- a/include/editeng/formatbreakitem.hxx +++ b/include/editeng/formatbreakitem.hxx @@ -28,7 +28,7 @@ /* [Description] - This item Describes a wrap-attribute + This item describes a wrap-attribute Automatic?, Page or column break, before or after? */ #define FMTBREAK_NOAUTO ((sal_uInt16)0x0001) @@ -38,7 +38,7 @@ class EDITENG_DLLPUBLIC SvxFormatBreakItem : public SfxEnumItem public: static SfxPoolItem* CreateDefault(); - inline SvxFormatBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/, + inline SvxFormatBreakItem( const SvxBreak eBrk /*= SvxBreak::NONE*/, const sal_uInt16 nWhich ); inline SvxFormatBreakItem( const SvxFormatBreakItem& rBreak ); inline SvxFormatBreakItem& operator=( const SvxFormatBreakItem& rCpy ); @@ -60,10 +60,9 @@ public: virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const override; virtual sal_uInt16 GetValueCount() const override; - // MS VC4.0 messes things up - void SetValue( sal_uInt16 nNewVal ) - {SfxEnumItem::SetValue(nNewVal); } - SvxBreak GetBreak() const { return SvxBreak( GetValue() ); } + void SetValue( SvxBreak nNewVal ) + {SfxEnumItem::SetValue((sal_uInt16) nNewVal); } + SvxBreak GetBreak() const { return (SvxBreak) GetValue(); } }; @@ -79,7 +78,7 @@ inline SvxFormatBreakItem::SvxFormatBreakItem( const SvxFormatBreakItem& rBreak inline SvxFormatBreakItem& SvxFormatBreakItem::operator=( const SvxFormatBreakItem& rBreak ) { - SetValue( rBreak.GetValue() ); + SetValue( rBreak.GetBreak() ); return *this; } diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx index f0860c252025..6044dbd4718b 100644 --- a/include/editeng/svxenum.hxx +++ b/include/editeng/svxenum.hxx @@ -93,16 +93,16 @@ enum SvxSpecialLineSpace SVX_LINESPACE_END }; -enum SvxBreak -{ - SVX_BREAK_NONE, - SVX_BREAK_COLUMN_BEFORE, - SVX_BREAK_COLUMN_AFTER, - SVX_BREAK_COLUMN_BOTH, - SVX_BREAK_PAGE_BEFORE, - SVX_BREAK_PAGE_AFTER, - SVX_BREAK_PAGE_BOTH, - SVX_BREAK_END +enum class SvxBreak +{ + NONE, + ColumnBefore, + ColumnAfter, + ColumnBoth, + PageBefore, + PageAfter, + PageBoth, + End }; enum SvxCellHorJustify diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 1c066228c92b..aae2f0548bdc 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -86,7 +86,7 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, // aNewAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) ); aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) ); - aNewAttr.Put( SvxFormatBreakItem( SVX_BREAK_NONE, SID_ATTR_PARA_PAGEBREAK ) ); + aNewAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, SID_ATTR_PARA_PAGEBREAK ) ); aNewAttr.Put( SvxFormatSplitItem( true, SID_ATTR_PARA_SPLIT) ); aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) ); aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) ); diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 9341cfb2a1fe..8456d1e660b1 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -578,7 +578,7 @@ void InitCore() aAttrTab[ RES_LR_SPACE- POOLATTR_BEGIN ] = new SvxLRSpaceItem( RES_LR_SPACE ); aAttrTab[ RES_UL_SPACE- POOLATTR_BEGIN ] = new SvxULSpaceItem( RES_UL_SPACE ); aAttrTab[ RES_PAGEDESC- POOLATTR_BEGIN ] = new SwFormatPageDesc; - aAttrTab[ RES_BREAK- POOLATTR_BEGIN ] = new SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK); + aAttrTab[ RES_BREAK- POOLATTR_BEGIN ] = new SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK); aAttrTab[ RES_CNTNT- POOLATTR_BEGIN ] = new SwFormatContent; aAttrTab[ RES_HEADER- POOLATTR_BEGIN ] = new SwFormatHeader; aAttrTab[ RES_FOOTER- POOLATTR_BEGIN ] = new SwFormatFooter; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a8c7f906100e..dec139daf86a 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1891,7 +1891,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ) { *m_pCurrentCursor->GetPoint() = aPos; GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurrentCursor, - SvxFormatBreakItem( SVX_BREAK_COLUMN_BEFORE, RES_BREAK ) ); + SvxFormatBreakItem( SvxBreak::ColumnBefore, RES_BREAK ) ); } } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 9d7c40d1673a..f2de8f827ded 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -593,7 +593,7 @@ static void lcl_FormatPostIt( if (bNewPage) { - pIDCO->InsertPoolItem( aPam, SvxFormatBreakItem( SVX_BREAK_PAGE_AFTER, RES_BREAK ) ); + pIDCO->InsertPoolItem( aPam, SvxFormatBreakItem( SvxBreak::PageAfter, RES_BREAK ) ); pIDCO->SplitNode( *aPam.GetPoint(), false ); } else if (!bIsFirstPostIt) diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 6410970a3df4..a86172306490 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -148,7 +148,7 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs ) bSave = nullptr != static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc(); break; case RES_BREAK: - bSave = SVX_BREAK_NONE != static_cast<const SvxFormatBreakItem*>(pItem)->GetBreak(); + bSave = SvxBreak::NONE != static_cast<const SvxFormatBreakItem*>(pItem)->GetBreak(); break; case RES_PARATR_NUMRULE: bSave = !static_cast<const SwNumRuleItem*>(pItem)->GetValue().isEmpty(); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 0b9138ca3a27..7585c2d400ec 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -785,8 +785,8 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, const SwContentNode* pNdAfterTOX = pSectNd->GetNodes().GoNext( &aIdx ); const SwAttrSet& aNdAttrSet = pNdAfterTOX->GetSwAttrSet(); const SvxBreak eBreak = aNdAttrSet.GetBreak().GetBreak(); - if ( !( eBreak == SVX_BREAK_PAGE_BEFORE || - eBreak == SVX_BREAK_PAGE_BOTH ) + if ( !( eBreak == SvxBreak::PageBefore || + eBreak == SvxBreak::PageBoth ) ) { pDefaultPageDesc = pNdAfterTOX->FindPageDesc(); diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 45937fd63e4d..d44ebcba9527 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -593,7 +593,7 @@ bool SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) SwTableAutoFormat::SwTableAutoFormat( const OUString& rName ) : m_aName( rName ) , nStrResId( USHRT_MAX ) - , m_aBreak( SVX_BREAK_NONE, RES_BREAK ) + , m_aBreak( SvxBreak::NONE, RES_BREAK ) , m_aKeepWithNextPara( false, RES_KEEP ) , m_aRepeatHeading( 0 ) , m_bLayoutSplit( true ) diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index c85e25c204c7..1d129cc4a48e 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1052,7 +1052,7 @@ bool SwAutoFormat::HasBreakAttr( const SwTextNode& rTextNd ) const SfxPoolItem* pItem; if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) - && SVX_BREAK_NONE != static_cast<const SvxFormatBreakItem*>(pItem)->GetBreak() ) + && SvxBreak::NONE != static_cast<const SvxFormatBreakItem*>(pItem)->GetBreak() ) return true; if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 42d008c117ca..f207a89b7883 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -188,10 +188,10 @@ bool SwFlowFrame::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKee { switch ( rAttrs.GetBreak().GetBreak() ) { - case SVX_BREAK_COLUMN_AFTER: - case SVX_BREAK_COLUMN_BOTH: - case SVX_BREAK_PAGE_AFTER: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::ColumnAfter: + case SvxBreak::ColumnBoth: + case SvxBreak::PageAfter: + case SvxBreak::PageBoth: { bKeep = false; break; @@ -243,10 +243,10 @@ bool SwFlowFrame::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKee bKeep = false; else switch ( pSet->GetBreak().GetBreak() ) { - case SVX_BREAK_COLUMN_BEFORE: - case SVX_BREAK_COLUMN_BOTH: - case SVX_BREAK_PAGE_BEFORE: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::ColumnBefore: + case SvxBreak::ColumnBoth: + case SvxBreak::PageBefore: + case SvxBreak::PageBoth: bKeep = false; break; default: break; @@ -1129,15 +1129,15 @@ bool SwFlowFrame::IsPageBreak( bool bAct ) const //for compatibility, also break at column break if no columns exist const SvxBreak eBreak = pSet->GetBreak().GetBreak(); - if ( eBreak == SVX_BREAK_PAGE_BEFORE || - eBreak == SVX_BREAK_PAGE_BOTH || - (eBreak == SVX_BREAK_COLUMN_BEFORE && !m_rThis.FindColFrame()) ) + if ( eBreak == SvxBreak::PageBefore || + eBreak == SvxBreak::PageBoth || + (eBreak == SvxBreak::ColumnBefore && !m_rThis.FindColFrame()) ) return true; else { const SvxBreak &ePrB = pPrev->GetAttrSet()->GetBreak().GetBreak(); - if ( ePrB == SVX_BREAK_PAGE_AFTER || - ePrB == SVX_BREAK_PAGE_BOTH || + if ( ePrB == SvxBreak::PageAfter || + ePrB == SvxBreak::PageBoth || pSet->GetPageDesc().GetPageDesc() ) return true; } @@ -1184,14 +1184,14 @@ bool SwFlowFrame::IsColBreak( bool bAct ) const } const SvxBreak eBreak = m_rThis.GetAttrSet()->GetBreak().GetBreak(); - if ( eBreak == SVX_BREAK_COLUMN_BEFORE || - eBreak == SVX_BREAK_COLUMN_BOTH ) + if ( eBreak == SvxBreak::ColumnBefore || + eBreak == SvxBreak::ColumnBoth ) return true; else { const SvxBreak &ePrB = pPrev->GetAttrSet()->GetBreak().GetBreak(); - if ( ePrB == SVX_BREAK_COLUMN_AFTER || - ePrB == SVX_BREAK_COLUMN_BOTH ) + if ( ePrB == SvxBreak::ColumnAfter || + ePrB == SvxBreak::ColumnBoth ) return true; } } diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index ed71dd17c0ce..8a5beb52f327 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -589,11 +589,11 @@ bool SwLayHelper::CheckInsertPage() rDesc.GetPageDesc(); bool bBrk = nParagraphCnt > nMaxParaPerPage || mbBreakAfter; - mbBreakAfter = rBrk.GetBreak() == SVX_BREAK_PAGE_AFTER || - rBrk.GetBreak() == SVX_BREAK_PAGE_BOTH; + mbBreakAfter = rBrk.GetBreak() == SvxBreak::PageAfter || + rBrk.GetBreak() == SvxBreak::PageBoth; if ( !bBrk ) - bBrk = rBrk.GetBreak() == SVX_BREAK_PAGE_BEFORE || - rBrk.GetBreak() == SVX_BREAK_PAGE_BOTH; + bBrk = rBrk.GetBreak() == SvxBreak::PageBefore || + rBrk.GetBreak() == SvxBreak::PageBoth; if ( bBrk || pDesc ) { diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index ee6d9d6d2b11..66fdd9f30905 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -112,15 +112,15 @@ OUString SwHistorySetFormat::GetDescription() const case RES_BREAK: switch ((static_cast<SvxFormatBreakItem &>(*m_pAttr)).GetBreak()) { - case SVX_BREAK_PAGE_BEFORE: - case SVX_BREAK_PAGE_AFTER: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::PageBefore: + case SvxBreak::PageAfter: + case SvxBreak::PageBoth: aResult = SW_RESSTR(STR_UNDO_PAGEBREAKS); break; - case SVX_BREAK_COLUMN_BEFORE: - case SVX_BREAK_COLUMN_AFTER: - case SVX_BREAK_COLUMN_BOTH: + case SvxBreak::ColumnBefore: + case SvxBreak::ColumnAfter: + case SvxBreak::ColumnBoth: aResult = SW_RESSTR(STR_UNDO_COLBRKS); break; diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 090440a8d30d..61ea58603a33 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -433,7 +433,7 @@ sal_uLong SwASCIIParser::ReadChars() } pDoc->getIDocumentContentOperations().SplitNode( *pPam->GetPoint(), false ); pDoc->getIDocumentContentOperations().InsertPoolItem( - *pPam, SvxFormatBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); + *pPam, SvxFormatBreakItem( SvxBreak::PageBefore, RES_BREAK ) ); pLastStt = pStt; nLineLen = 0; bIns = false; diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index e84cf783533e..c36a82a0af5f 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -3119,17 +3119,17 @@ static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt, { switch( pBreakItem->GetBreak() ) { - case SVX_BREAK_NONE: + case SvxBreak::NONE: pBreakBefore = sCSS1_PV_auto; if( !pBreakAfter ) pBreakAfter = sCSS1_PV_auto; break; - case SVX_BREAK_PAGE_BEFORE: + case SvxBreak::PageBefore: pBreakBefore = sCSS1_PV_always; break; - case SVX_BREAK_PAGE_AFTER: + case SvxBreak::PageAfter: pBreakAfter= sCSS1_PV_always; break; diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index b895f43fcae4..a842c8f437a8 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2167,13 +2167,13 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) { switch( static_cast<const SvxFormatBreakItem *>(pItem)->GetBreak() ) { - case SVX_BREAK_PAGE_BEFORE: + case SvxBreak::PageBefore: bPageBreakBefore = true; break; - case SVX_BREAK_PAGE_AFTER: + case SvxBreak::PageAfter: bPageBreakBehind = true; break; - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::PageBoth: bPageBreakBefore = true; bPageBreakBehind = true; break; diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index f2ccc8c8839a..619c5ae94b44 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -130,14 +130,14 @@ SwCSS1Parser::~SwCSS1Parser() bool SwCSS1Parser::SetFormatBreak( SfxItemSet& rItemSet, const SvxCSS1PropertyInfo& rPropInfo ) { - SvxBreak eBreak = SVX_BREAK_NONE; + SvxBreak eBreak = SvxBreak::NONE; bool bKeep = false; bool bSetKeep = false, bSetBreak = false, bSetPageDesc = false; const SwPageDesc *pPageDesc = nullptr; switch( rPropInfo.ePageBreakBefore ) { case SVX_CSS1_PBREAK_ALWAYS: - eBreak = SVX_BREAK_PAGE_BEFORE; + eBreak = SvxBreak::PageBefore; bSetBreak = true; break; case SVX_CSS1_PBREAK_LEFT: @@ -160,7 +160,7 @@ bool SwCSS1Parser::SetFormatBreak( SfxItemSet& rItemSet, case SVX_CSS1_PBREAK_LEFT: case SVX_CSS1_PBREAK_RIGHT: // LEFT/RIGHT koennte man auch am Absatz davor setzen - eBreak = SVX_BREAK_PAGE_AFTER; + eBreak = SvxBreak::PageAfter; bSetBreak = true; break; case SVX_CSS1_PBREAK_AUTO: diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index c3703db5f670..8bad71cbc009 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -814,9 +814,9 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd, { switch( static_cast<const SvxFormatBreakItem *>(pItem)->GetBreak() ) { - case SVX_BREAK_PAGE_BEFORE: - case SVX_BREAK_PAGE_AFTER: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::PageBefore: + case SvxBreak::PageAfter: + case SvxBreak::PageBoth: if( bFormatBreak ) pDestContentNd->SetAttr( *pItem ); pSrcContentNd->ResetAttr( RES_BREAK ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 96504ffc8bc9..0385ec63089d 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -3721,9 +3721,9 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, { switch( static_cast<const SvxFormatBreakItem *>(pItem2)->GetBreak() ) { - case SVX_BREAK_PAGE_BEFORE: - case SVX_BREAK_PAGE_AFTER: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::PageBefore: + case SvxBreak::PageAfter: + case SvxBreak::PageBoth: pFrameFormat->SetFormatAttr( *pItem2 ); pOldTextNd->ResetAttr( RES_BREAK ); break; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 6eeb3544ddf0..0be738dedaf9 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1440,7 +1440,7 @@ void SwHTMLParser::NextToken( int nToken ) AppendTextNode(); if( !m_pTable && !m_pDoc->IsInHeaderFooter( m_pPam->GetPoint()->nNode ) ) { - NewAttr( &m_aAttrTab.pBreak, SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); + NewAttr( &m_aAttrTab.pBreak, SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) ); EndAttr( m_aAttrTab.pBreak, nullptr, false ); } break; @@ -5139,7 +5139,7 @@ void SwHTMLParser::InsertLineBreak() } // kein CLEAR // Styles parsen - SvxFormatBreakItem aBreakItem( SVX_BREAK_NONE, RES_BREAK ); + SvxFormatBreakItem aBreakItem( SvxBreak::NONE, RES_BREAK ); bool bBreakItem = false; if( HasStyleOptions( aStyle, aId, aClass ) ) { @@ -5158,7 +5158,7 @@ void SwHTMLParser::InsertLineBreak() } } - if( bBreakItem && SVX_BREAK_PAGE_AFTER==aBreakItem.GetBreak() ) + if( bBreakItem && SvxBreak::PageAfter==aBreakItem.GetBreak() ) { NewAttr( &m_aAttrTab.pBreak, aBreakItem ); EndAttr( m_aAttrTab.pBreak, nullptr, false ); @@ -5180,7 +5180,7 @@ void SwHTMLParser::InsertLineBreak() // schief (>Netscape). Deshalb lassen wir das erstmal. AppendTextNode( AM_NOSPACE ); } - if( bBreakItem && SVX_BREAK_PAGE_BEFORE==aBreakItem.GetBreak() ) + if( bBreakItem && SvxBreak::PageBefore==aBreakItem.GetBreak() ) { NewAttr( &m_aAttrTab.pBreak, aBreakItem ); EndAttr( m_aAttrTab.pBreak, nullptr, false ); diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index a4952363cd1d..0d40c37639de 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -635,7 +635,7 @@ namespace sw else if (const SwContentNode *pNd = rNd.GetContentNode()) pBreak = &(ItemGet<SvxFormatBreakItem>(*pNd, RES_BREAK)); - if (pBreak && pBreak->GetBreak() == SVX_BREAK_PAGE_BEFORE) + if (pBreak && pBreak->GetBreak() == SvxBreak::PageBefore) return true; return false; } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 7940afdf88c3..671bb8f91483 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2510,7 +2510,7 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, dynamic_cast<SwTextNode&>(_rFrameFormat.GetAnchor().GetContentAnchor()->nNode.GetNode()); const SvxFormatBreakItem* pBreak = &(ItemGet<SvxFormatBreakItem>(rAnchorTextNode, RES_BREAK)); if ( pBreak && - pBreak->GetBreak() == SVX_BREAK_COLUMN_BEFORE ) + pBreak->GetBreak() == SvxBreak::ColumnBefore ) { bConvDueToAnchoredAtColBreakPara = true; } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index e0e70be32563..acb55d0dc4f1 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2450,7 +2450,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) const SwTableFormat* pTabFormat = pTable->GetFrameFormat(); if (pTabFormat != nullptr) { - if (pTabFormat->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE) + if (pTabFormat->GetBreak().GetBreak() == SvxBreak::PageBefore) AttrOutput().PageBreakBefore(true); } } @@ -2656,7 +2656,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) const SvxFormatBreakItem* pBreakAtParaStyle = &(ItemGet<SvxFormatBreakItem>(rNode.GetSwAttrSet(), RES_BREAK)); if ( pBreakAtParaStyle && - pBreakAtParaStyle->GetBreak() == SVX_BREAK_PAGE_AFTER ) + pBreakAtParaStyle->GetBreak() == SvxBreak::PageAfter ) { if ( !pTmpSet ) { @@ -2822,8 +2822,8 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet ) SvxBreak eBreak = static_cast<const SvxFormatBreakItem*>(pI)->GetBreak(); switch (eBreak) { - case SVX_BREAK_PAGE_BEFORE: - case SVX_BREAK_PAGE_AFTER: + case SvxBreak::PageBefore: + case SvxBreak::PageAfter: bNoPageBreak = false; break; default: diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c6290b70c3bd..888414431d05 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -490,7 +490,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode // #i76301# - assure that there is a page break before set at the node. const SvxFormatBreakItem* pBreak = dynamic_cast<const SvxFormatBreakItem*>(pItem); if ( pBreak && - pBreak->GetBreak() == SVX_BREAK_PAGE_BEFORE ) + pBreak->GetBreak() == SvxBreak::PageBefore ) { bNewPageDesc |= SetAktPageDescFromNode( rNd ); } @@ -517,7 +517,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode { const SvxFormatBreakItem &rBreak = ItemGet<SvxFormatBreakItem>( *pNd, RES_BREAK ); - if ( rBreak.GetBreak() == SVX_BREAK_PAGE_BEFORE ) + if ( rBreak.GetBreak() == SvxBreak::PageBefore ) bHackInBreak = true; else { // Even a pagedesc item is set, the break item can be set 'NONE', @@ -3423,7 +3423,7 @@ void AttributeOutputBase::FormatPageDescription( const SwFormatPageDesc& rPageDe { const SwTextFormatColl* pC = static_cast<const SwTextFormatColl*>(GetExport().m_pOutFormatNode); if ( (SfxItemState::SET != pC->GetItemState( RES_BREAK, false ) ) && rPageDesc.KnowsPageDesc() ) - FormatBreak( SvxFormatBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); + FormatBreak( SvxFormatBreakItem( SvxBreak::PageBefore, RES_BREAK ) ); } } @@ -3444,9 +3444,9 @@ void AttributeOutputBase::FormatBreak( const SvxFormatBreakItem& rBreak ) { switch ( rBreak.GetBreak() ) { - case SVX_BREAK_NONE: - case SVX_BREAK_PAGE_BEFORE: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::NONE: + case SvxBreak::PageBefore: + case SvxBreak::PageBoth: PageBreakBefore( rBreak.GetValue() ); break; default: @@ -3462,23 +3462,23 @@ void AttributeOutputBase::FormatBreak( const SvxFormatBreakItem& rBreak ) switch ( rBreak.GetBreak() ) { - case SVX_BREAK_NONE: // Ausgeschaltet + case SvxBreak::NONE: // Ausgeschaltet if ( !GetExport().m_bBreakBefore ) PageBreakBefore( false ); return; - case SVX_BREAK_COLUMN_BEFORE: // ColumnBreak + case SvxBreak::ColumnBefore: // ColumnBreak bBefore = true; SAL_FALLTHROUGH; - case SVX_BREAK_COLUMN_AFTER: - case SVX_BREAK_COLUMN_BOTH: + case SvxBreak::ColumnAfter: + case SvxBreak::ColumnBoth: if ( GetExport().Sections().CurrentNumberOfColumns( *GetExport().m_pDoc ) > 1 || GetExport().SupportsOneColumnBreak() ) { nC = msword::ColumnBreak; } break; - case SVX_BREAK_PAGE_BEFORE: // PageBreak + case SvxBreak::PageBefore: // PageBreak // From now on(fix for #i77900#) we prefer to save a page break // as paragraph attribute (if the exporter is OK with that), // this has to be done after the export of the paragraph ( => @@ -3490,8 +3490,8 @@ void AttributeOutputBase::FormatBreak( const SvxFormatBreakItem& rBreak ) break; } SAL_FALLTHROUGH; - case SVX_BREAK_PAGE_AFTER: - case SVX_BREAK_PAGE_BOTH: + case SvxBreak::PageAfter: + case SvxBreak::PageBoth: nC = msword::PageBreak; // #i76300# - check for follow page description, // if current writing attributes of a paragraph. diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f2276e148d2c..c05e81f8ac74 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3541,7 +3541,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) SwContentNode *pCntNd=m_pPaM->GetContentNode(); if (pCntNd!=nullptr && pCntNd->Len()>0) // if par is empty not break is needed AppendTextNode(*m_pPaM->GetPoint()); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK)); } break; case 0x7: @@ -4133,7 +4133,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) AppendTextNode(*m_pPaM->GetPoint()); } m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, - SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK)); + SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK)); m_bFirstParaOfPage = true; m_bPgSecBreak = false; } @@ -4461,7 +4461,7 @@ void wwSectionManager::InsertSegments() if ( aIter->maSep.bkc == 1 && aIter->maSep.ccolM1 > 0 ) { SwPaM start( aIter->maStart ); - mrReader.m_rDoc.getIDocumentContentOperations().InsertPoolItem( start, SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); + mrReader.m_rDoc.getIDocumentContentOperations().InsertPoolItem( start, SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK)); continue; } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 699f8ca9ab01..41350954feb5 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4969,7 +4969,7 @@ void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, shor m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_BREAK ); else NewAttr( SvxFormatBreakItem( - ( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) ); + ( *pData & 1 ) ? SvxBreak::PageBefore : SvxBreak::NONE, RES_BREAK ) ); } void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short ) diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 4f5be35d9724..a721d6c7863d 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -844,15 +844,15 @@ bool SvXMLExportItemMapper::QueryXMLValue( switch( nMemberId ) { case MID_BREAK_BEFORE: - switch (rFormatBreak.GetValue()) + switch (rFormatBreak.GetBreak()) { - case SVX_BREAK_COLUMN_BEFORE: + case SvxBreak::ColumnBefore: eEnum = 1; break; - case SVX_BREAK_PAGE_BEFORE: + case SvxBreak::PageBefore: eEnum = 2; break; - case SVX_BREAK_NONE: + case SvxBreak::NONE: eEnum = 0; break; default: @@ -860,15 +860,15 @@ bool SvXMLExportItemMapper::QueryXMLValue( } break; case MID_BREAK_AFTER: - switch (rFormatBreak.GetValue()) + switch (rFormatBreak.GetBreak()) { - case SVX_BREAK_COLUMN_AFTER: + case SvxBreak::ColumnAfter: eEnum = 1; break; - case SVX_BREAK_PAGE_AFTER: + case SvxBreak::PageAfter: eEnum = 2; break; - case SVX_BREAK_NONE: + case SvxBreak::NONE: eEnum = 0; break; default: diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 8e2cde5c0aa7..fdb911cc80a9 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -596,7 +596,7 @@ bool SvXMLImportItemMapper::PutXMLValue( if( eEnum == 0 ) { - rFormatBreak.SetValue( SVX_BREAK_NONE ); + rFormatBreak.SetValue( SvxBreak::NONE ); bOk = true; } else @@ -604,14 +604,14 @@ bool SvXMLImportItemMapper::PutXMLValue( switch( nMemberId ) { case MID_BREAK_BEFORE: - rFormatBreak.SetValue( static_cast< sal_uInt16 >((eEnum == 1) ? - SVX_BREAK_COLUMN_BEFORE : - SVX_BREAK_PAGE_BEFORE) ); + rFormatBreak.SetValue( eEnum == 1 ? + SvxBreak::ColumnBefore : + SvxBreak::PageBefore ); break; case MID_BREAK_AFTER: - rFormatBreak.SetValue( static_cast< sal_uInt16 >((eEnum == 1) ? - SVX_BREAK_COLUMN_AFTER : - SVX_BREAK_PAGE_AFTER) ); + rFormatBreak.SetValue( eEnum == 1 ? + SvxBreak::ColumnAfter : + SvxBreak::PageAfter ); break; } bOk = true; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index d1be3eb429f6..10acafe08c84 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1426,21 +1426,21 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet ) if ( m_pPgBrkRB->IsChecked() ) { if ( bBefore ) - aBreak.SetValue( SVX_BREAK_PAGE_BEFORE ); + aBreak.SetValue( SvxBreak::PageBefore ); else - aBreak.SetValue( SVX_BREAK_PAGE_AFTER ); + aBreak.SetValue( SvxBreak::PageAfter ); } else { if ( bBefore ) - aBreak.SetValue( SVX_BREAK_COLUMN_BEFORE ); + aBreak.SetValue( SvxBreak::ColumnBefore ); else - aBreak.SetValue( SVX_BREAK_COLUMN_AFTER ); + aBreak.SetValue( SvxBreak::ColumnAfter ); } } else { - aBreak.SetValue( SVX_BREAK_NONE ); + aBreak.SetValue( SvxBreak::NONE ); } if ( !pBreak || !( *pBreak == aBreak ) ) @@ -1564,9 +1564,9 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) if(SfxItemState::SET == rSet->GetItemState( RES_BREAK, false, &pItem )) { const SvxFormatBreakItem* pPageBreak = static_cast<const SvxFormatBreakItem*>(pItem); - SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue(); + SvxBreak eBreak = pPageBreak->GetBreak(); - if ( eBreak != SVX_BREAK_NONE ) + if ( eBreak != SvxBreak::NONE ) { m_pPgBrkCB->Check(); m_pPageCollCB->Enable(false); @@ -1576,25 +1576,25 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) } switch ( eBreak ) { - case SVX_BREAK_PAGE_BEFORE: + case SvxBreak::PageBefore: m_pPgBrkRB->Check(); m_pColBrkRB->Check( false ); m_pPgBrkBeforeRB->Check(); m_pPgBrkAfterRB->Check( false ); break; - case SVX_BREAK_PAGE_AFTER: + case SvxBreak::PageAfter: m_pPgBrkRB->Check(); m_pColBrkRB->Check( false ); m_pPgBrkBeforeRB->Check( false ); m_pPgBrkAfterRB->Check(); break; - case SVX_BREAK_COLUMN_BEFORE: + case SvxBreak::ColumnBefore: m_pPgBrkRB->Check( false ); m_pColBrkRB->Check(); m_pPgBrkBeforeRB->Check(); m_pPgBrkAfterRB->Check( false ); break; - case SVX_BREAK_COLUMN_AFTER: + case SvxBreak::ColumnAfter: m_pPgBrkRB->Check( false ); m_pColBrkRB->Check(); m_pPgBrkBeforeRB->Check( false ); diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index c556a7b1bde3..2bc2752b57f0 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -286,7 +286,7 @@ void SwPageBreakWin::Select( ) RES_PAGEDESC, RES_PAGEDESC, RES_BREAK, RES_BREAK, nullptr ); - aSet.Put( SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); + aSet.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) ); aSet.Put( SwFormatPageDesc( nullptr ) ); SwPaM aPaM( *pNd ); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 03834f40fda5..1422bfa0b845 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -536,7 +536,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) aDlgAttr.Put(aEditAttr); aDlgAttr.Put( SvxHyphenZoneItem( false, RES_PARATR_HYPHENZONE) ); - aDlgAttr.Put( SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); + aDlgAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) ); aDlgAttr.Put( SvxFormatSplitItem( true, RES_PARATR_SPLIT ) ); aDlgAttr.Put( SvxWidowsItem( 0, RES_PARATR_WIDOWS ) ); aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 24b6914a92db..e233e0861c85 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -414,7 +414,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aDlgAttr.Put(aEditAttr); aDlgAttr.Put( SvxHyphenZoneItem( false, RES_PARATR_HYPHENZONE) ); - aDlgAttr.Put( SvxFormatBreakItem( SVX_BREAK_NONE, RES_BREAK ) ); + aDlgAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) ); aDlgAttr.Put( SvxFormatSplitItem( true, RES_PARATR_SPLIT ) ); aDlgAttr.Put( SvxWidowsItem( 0, RES_PARATR_WIDOWS ) ); aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 5429a9202508..3bf746294f72 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -862,7 +862,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio SetAttrItem( aDesc ); } else - SetAttrItem( SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); + SetAttrItem( SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) ); EndUndo(UNDO_UI_INSERT_PAGE_BREAK); } } @@ -904,7 +904,7 @@ void SwWrtShell::InsertColumnBreak() DelRight(); SwFEShell::SplitNode( false, false ); } - SetAttrItem(SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); + SetAttrItem(SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK)); EndUndo(UNDO_UI_INSERT_COLUMN_BREAK); } |