From 8689bd5490b473a7ffb149bbe5f7f0683f679c72 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 29 Jul 2021 20:49:29 +0100 Subject: convert TextAlign to scoped enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/core/text/inftxt.cxx | 2 +- sw/source/core/text/porrst.cxx | 2 +- sw/source/core/txtnode/swfont.cxx | 4 ++-- sw/source/uibase/uiview/srcview.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index ddfc54bc6fc3..38e4b10195ed 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1942,7 +1942,7 @@ SwFontSave::SwFontSave(const SwTextSizeInfo &rInf, SwFont *pNew, ( *pNew->GetBackColor() != *pFnt->GetBackColor() ) ) ) { pNew->SetTransparent( true ); - pNew->SetAlign( ALIGN_BASELINE ); + pNew->SetAlign( TextAlign::Baseline ); pInf->SetFont( pNew ); } else diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 23f837d63051..ed81b325bcdc 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -599,7 +599,7 @@ bool SwBookmarkPortion::DoPaint(SwTextPaintInfo const& rTextPaintInfo, rFont.SetWeight(WEIGHT_THIN, rFont.GetActual()); rFont.SetColor(NON_PRINTING_CHARACTER_COLOR); // reset these to default... - rFont.SetAlign(ALIGN_BASELINE); + rFont.SetAlign(TextAlign::Baseline); rFont.SetUnderline(LINESTYLE_NONE); rFont.SetOverline(LINESTYLE_NONE); rFont.SetStrikeout(STRIKEOUT_NONE); diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 620c0d67682a..5a6db8fce090 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -597,7 +597,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, SetEmphasisMark( static_cast(pItem)->GetEmphasisMark() ); SetTransparent( true ); - SetAlign( ALIGN_BASELINE ); + SetAlign( TextAlign::Baseline ); if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR, true, &pItem )) SetOutline( static_cast(pItem)->GetValue() ); @@ -788,7 +788,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, SetStrikeout( pAttrSet->GetCrossedOut().GetStrikeout() ); SetColor( pAttrSet->GetColor().GetValue() ); SetTransparent( true ); - SetAlign( ALIGN_BASELINE ); + SetAlign( TextAlign::Baseline ); SetOutline( pAttrSet->GetContour().GetValue() ); SetShadow( pAttrSet->GetShadowed().GetValue() ); SetPropWidth( pAttrSet->GetCharScaleW().GetValue() ); diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index e7b2059a1ec0..a30aa3a632d6 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -119,7 +119,7 @@ static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_ vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); - aFont.SetAlignment( ALIGN_BOTTOM ); + aFont.SetAlignment( TextAlign::Bottom ); rOutDev.SetFont( aFont ); tools::Long nFontHeight = rOutDev.GetTextHeight(); -- cgit