diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-29 20:49:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-30 16:40:56 +0200 |
commit | 8689bd5490b473a7ffb149bbe5f7f0683f679c72 (patch) | |
tree | 896991b9de6e8aa9e00149b8ff7c12873cd73d48 /starmath | |
parent | d4d8fb12e81152ad75d1ab4cabfa300aa982e589 (diff) |
convert TextAlign to scoped enum
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/dialog.cxx | 10 | ||||
-rw-r--r-- | starmath/source/format.cxx | 4 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 2 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 4 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 2 | ||||
-rw-r--r-- | starmath/source/utility.cxx | 2 | ||||
-rw-r--r-- | starmath/source/view.cxx | 4 | ||||
-rw-r--r-- | starmath/source/visitors.cxx | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index ff1d001578de..39ecda8db1df 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -244,7 +244,7 @@ void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangl vcl::Font aFont(maFont); aFont.SetFontSize(Size(0, 24 * rRenderContext.GetDPIScaleFactor())); - aFont.SetAlignment(ALIGN_TOP); + aFont.SetAlignment(TextAlign::Top); rRenderContext.SetFont(aFont); rRenderContext.SetTextColor(aTextColor); @@ -987,7 +987,7 @@ void SmShowSymbolSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rec { SmSym aSymbol(*aSymbolSet[i]); vcl::Font aFont(aSymbol.GetFace()); - aFont.SetAlignment(ALIGN_TOP); + aFont.SetAlignment(TextAlign::Top); // taking a FontSize which is a bit smaller (compared to nLen) in order to have a buffer // (hopefully enough for left and right, too) @@ -1192,7 +1192,7 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol) if (pSymbol) { vcl::Font aFont(pSymbol->GetFace()); - aFont.SetAlignment(ALIGN_BASELINE); + aFont.SetAlignment(TextAlign::Baseline); SetFont(aFont); sal_UCS4 cChar = pSymbol->GetCharacter(); @@ -1406,7 +1406,7 @@ void SmShowChar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangl if (!aText.isEmpty()) { vcl::Font aFont(m_aFont); - aFont.SetAlignment(ALIGN_TOP); + aFont.SetAlignment(TextAlign::Top); rRenderContext.SetFont(aFont); Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight()); @@ -1431,7 +1431,7 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const vcl::Font &rFont ) vcl::Font aFont( rFont ); Size aSize(GetOutputSizePixel()); aFont.SetFontSize(Size(0, aSize.Height() - aSize.Height() / 3)); - aFont.SetAlignment(ALIGN_BASELINE); + aFont.SetAlignment(TextAlign::Baseline); SetFont(aFont); OUString aText(&cChar, 1); diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index a4bf960fd583..6dfd888bf038 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -81,7 +81,7 @@ SmFormat::SmFormat() { SmFace &rFace = vFont[i]; rFace.SetTransparent( true ); - rFace.SetAlignment( ALIGN_BASELINE ); + rFace.SetAlignment( TextAlign::Baseline ); rFace.SetColor( COL_AUTO ); bDefaultFont[i] = false; } @@ -92,7 +92,7 @@ void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault ) { vFont[nIdent] = rFont; vFont[nIdent].SetTransparent( true ); - vFont[nIdent].SetAlignment( ALIGN_BASELINE ); + vFont[nIdent].SetAlignment( TextAlign::Baseline ); bDefaultFont[nIdent] = bDefault; } diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 8d7ea52d9717..4857e25693bd 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -58,7 +58,7 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, pGlyphDev->Push(PushFlags::FONT | PushFlags::MAPMODE); vcl::Font aFnt(rDev.GetFont()); - aFnt.SetAlignment(ALIGN_TOP); + aFnt.SetAlignment(TextAlign::Top); // use scale factor when calling GetTextBoundRect to counter // negative effects from antialiasing which may otherwise result diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 4dfd8374872c..cf45fecf1745 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -33,7 +33,7 @@ SmSym::SmSym() : { m_aExportName = m_aName; m_aFace.SetTransparent(true); - m_aFace.SetAlignment(ALIGN_BASELINE); + m_aFace.SetAlignment(TextAlign::Baseline); } @@ -50,7 +50,7 @@ SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, m_aFace = rFont; m_aFace.SetTransparent(true); - m_aFace.SetAlignment(ALIGN_BASELINE); + m_aFace.SetAlignment(TextAlign::Baseline); m_cChar = cChar; m_aSetName = rSet; diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index b2e38bf645f9..1a5cecbabe3e 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -441,7 +441,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* SmFace aSet( sFontName, rOld.GetFontSize() ); aSet.SetBorderWidth( rOld.GetBorderWidth() ); - aSet.SetAlignment( ALIGN_BASELINE ); + aSet.SetAlignment( TextAlign::Baseline ); aFormat.SetFont( (*ppEntries)->mnMemberId, aSet ); } } diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 7012004bea94..8d97777c14f2 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -185,7 +185,7 @@ void SmFace::Impl_Init() { SetSize( GetFontSize() ); SetTransparent( true ); - SetAlignment( ALIGN_BASELINE ); + SetAlignment( TextAlign::Baseline ); SetColor( COL_AUTO ); } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index ef05e243f798..7a93e8a280b2 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1235,7 +1235,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri Size aSize650 (0, 650); vcl::Font aFont(FAMILY_DONTKNOW, aSize600); - aFont.SetAlignment(ALIGN_TOP); + aFont.SetAlignment(TextAlign::Top); aFont.SetWeight(WEIGHT_BOLD); aFont.SetFontSize(aSize650); aFont.SetColor( COL_BLACK ); @@ -1279,7 +1279,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri if (bIsPrintFormulaText) { vcl::Font aFont(FAMILY_DONTKNOW, Size(0, 600)); - aFont.SetAlignment(ALIGN_TOP); + aFont.SetAlignment(TextAlign::Top); aFont.SetColor( COL_BLACK ); // get size diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 7e02d4739c62..6a341084f06b 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -495,8 +495,8 @@ void SmDrawingVisitor::DrawTextNode( SmTextNode* pNode ) void SmDrawingVisitor::DrawSpecialNode( SmSpecialNode* pNode ) { //! since this chars might come from any font, that we may not have - //! set to ALIGN_BASELINE yet, we do it now. - pNode->GetFont( ).SetAlignment( ALIGN_BASELINE ); + //! set to TextAlign::Baseline yet, we do it now. + pNode->GetFont( ).SetAlignment( TextAlign::Baseline ); DrawTextNode( pNode ); } |