summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-18 09:25:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-18 12:53:31 +0200
commit88bf1749f1eb7322106da1254e349f51f5df0df5 (patch)
tree9dede2758a1cdc913b04b0bd76aca981f838254e /starmath
parent821ae763cc03f69e226cdba66bb9c82c03483a23 (diff)
undo changes to TextAlign
revert commit 8689bd5490b473a7ffb149bbe5f7f0683f679c72 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 29 20:49:29 2021 +0100 convert TextAlign to scoped enum lets leave this as it always was Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/dialog.cxx10
-rw-r--r--starmath/source/format.cxx4
-rw-r--r--starmath/source/rect.cxx2
-rw-r--r--starmath/source/symbol.cxx4
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--starmath/source/utility.cxx2
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--starmath/source/visitors.cxx4
8 files changed, 16 insertions, 16 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 39ecda8db1df..ff1d001578de 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(TextAlign::Top);
+ aFont.SetAlignment(ALIGN_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(TextAlign::Top);
+ aFont.SetAlignment(ALIGN_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(TextAlign::Baseline);
+ aFont.SetAlignment(ALIGN_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(TextAlign::Top);
+ aFont.SetAlignment(ALIGN_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(TextAlign::Baseline);
+ aFont.SetAlignment(ALIGN_BASELINE);
SetFont(aFont);
OUString aText(&cChar, 1);
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 6dfd888bf038..a4bf960fd583 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( TextAlign::Baseline );
+ rFace.SetAlignment( ALIGN_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( TextAlign::Baseline );
+ vFont[nIdent].SetAlignment( ALIGN_BASELINE );
bDefaultFont[nIdent] = bDefault;
}
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 4857e25693bd..8d7ea52d9717 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(TextAlign::Top);
+ aFnt.SetAlignment(ALIGN_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 cf45fecf1745..4dfd8374872c 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(TextAlign::Baseline);
+ m_aFace.SetAlignment(ALIGN_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(TextAlign::Baseline);
+ m_aFace.SetAlignment(ALIGN_BASELINE);
m_cChar = cChar;
m_aSetName = rSet;
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 5c49c8b52a64..0009253fbcfe 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -443,7 +443,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
SmFace aSet( sFontName, rOld.GetFontSize() );
aSet.SetBorderWidth( rOld.GetBorderWidth() );
- aSet.SetAlignment( TextAlign::Baseline );
+ aSet.SetAlignment( ALIGN_BASELINE );
aFormat.SetFont( (*ppEntries)->mnMemberId, aSet );
}
}
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 8d97777c14f2..7012004bea94 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -185,7 +185,7 @@ void SmFace::Impl_Init()
{
SetSize( GetFontSize() );
SetTransparent( true );
- SetAlignment( TextAlign::Baseline );
+ SetAlignment( ALIGN_BASELINE );
SetColor( COL_AUTO );
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 7a93e8a280b2..ef05e243f798 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(TextAlign::Top);
+ aFont.SetAlignment(ALIGN_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(TextAlign::Top);
+ aFont.SetAlignment(ALIGN_TOP);
aFont.SetColor( COL_BLACK );
// get size
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 6a341084f06b..7e02d4739c62 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 TextAlign::Baseline yet, we do it now.
- pNode->GetFont( ).SetAlignment( TextAlign::Baseline );
+ //! set to ALIGN_BASELINE yet, we do it now.
+ pNode->GetFont( ).SetAlignment( ALIGN_BASELINE );
DrawTextNode( pNode );
}