summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-29 20:49:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-07-30 16:40:56 +0200
commit8689bd5490b473a7ffb149bbe5f7f0683f679c72 (patch)
tree896991b9de6e8aa9e00149b8ff7c12873cd73d48 /drawinglayer
parentd4d8fb12e81152ad75d1ab4cabfa300aa982e589 (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 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 933476b2045a..dff9d3558d89 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -367,7 +367,7 @@ vcl::Font getVclFontFromFontAttribute(const attribute::FontAttribute& rFontAttri
Size(bFontIsScaled ? std::max<sal_uInt32>(nWidth, 1) : 0, nHeight));
#endif
// define various other FontAttribute
- aRetval.SetAlignment(ALIGN_BASELINE);
+ aRetval.SetAlignment(TextAlign::Baseline);
aRetval.SetCharSet(rFontAttribute.getSymbol() ? RTL_TEXTENCODING_SYMBOL
: RTL_TEXTENCODING_UNICODE);
aRetval.SetVertical(rFontAttribute.getVertical());
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index a54893025984..98a807fa5c47 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1077,16 +1077,16 @@ namespace wmfemfhelper
rTextTransform.scale(aFontScaling.getX(), aFontScaling.getY());
// take text align into account
- if(ALIGN_BASELINE != rFont.GetAlignment())
+ if (TextAlign::Baseline != rFont.GetAlignment())
{
drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rFont);
- if(ALIGN_TOP == rFont.GetAlignment())
+ if (TextAlign::Top == rFont.GetAlignment())
{
rAlignmentOffset.setY(aTextLayouterDevice.getFontAscent());
}
- else // ALIGN_BOTTOM
+ else // TextAlign::Bottom
{
rAlignmentOffset.setY(-aTextLayouterDevice.getFontDescent());
}