summaryrefslogtreecommitdiff
path: root/svx/source/dialog/charmap.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-28 16:31:30 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-29 01:59:55 +0000
commitd1a49df6833ff16f5cbaf98534eaae62693e520b (patch)
tree2bbf60556966b4939f3700cab9d1a6278e6b67f0 /svx/source/dialog/charmap.cxx
parent6402164182865d7644d2e93158a23e12a6da3926 (diff)
vcl: add text alignment functions to ImplFont and FontAttributes
ImplFont and FontAttributes now have GetAlignment and SetAlignment, and I have renamed Font::GetAlign to Font::GetAlignment, and Font::SetAlign to Font::SetAlignment. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test text alignment. Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba Reviewed-on: https://gerrit.libreoffice.org/21876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'svx/source/dialog/charmap.cxx')
-rw-r--r--svx/source/dialog/charmap.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 1c6f0bb93c33..bd3c81bf8600 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -523,7 +523,7 @@ void SvxShowCharSet::InitSettings(vcl::RenderContext& rRenderContext)
vcl::Font aFont(rRenderContext.GetFont());
aFont.SetWeight(WEIGHT_LIGHT);
- aFont.SetAlign(ALIGN_TOP);
+ aFont.SetAlignment(ALIGN_TOP);
aFont.SetSize(maFontSize);
aFont.SetTransparent(true);
rRenderContext.SetFont(aFont);
@@ -556,7 +556,7 @@ void SvxShowCharSet::RecalculateFont(vcl::RenderContext& rRenderContext)
vcl::Font aFont = rRenderContext.GetFont();
aFont.SetWeight(WEIGHT_LIGHT);
- aFont.SetAlign(ALIGN_TOP);
+ aFont.SetAlignment(ALIGN_TOP);
int nFontHeight = (aSize.Height() - 5) * 2 / (3 * ROW_COUNT);
maFontSize = rRenderContext.PixelToLogic(Size(0, nFontHeight));
aFont.SetSize(maFontSize);