summaryrefslogtreecommitdiff
path: root/drawinglayer
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 /drawinglayer
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 '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 dff9d3558d89..933476b2045a 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(TextAlign::Baseline);
+ aRetval.SetAlignment(ALIGN_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 98a807fa5c47..a54893025984 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 (TextAlign::Baseline != rFont.GetAlignment())
+ if(ALIGN_BASELINE != rFont.GetAlignment())
{
drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rFont);
- if (TextAlign::Top == rFont.GetAlignment())
+ if(ALIGN_TOP == rFont.GetAlignment())
{
rAlignmentOffset.setY(aTextLayouterDevice.getFontAscent());
}
- else // TextAlign::Bottom
+ else // ALIGN_BOTTOM
{
rAlignmentOffset.setY(-aTextLayouterDevice.getFontDescent());
}