summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-05-20 15:58:47 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-05-20 19:08:57 +0000
commitc761fcfd7ec95090cde2fb2b6b9b891f3e1337ab (patch)
tree39e4ed79292ad132cfb4fb4ad72addb8e7064577 /sw
parent76fbba8259b3daeb0543cca15c84d5df281e687c (diff)
Fix fdo#64751 – Header & footer blue tags empty
No idea FontMetric::GetHeight() is supposed to mean, probably the code here meant GetLineHeight(). What it actually need is GetAscent(), so use it instead (which is the same as GetLineHeight() - GetDescent()). Change-Id: Ic467e56ed6b8d245ac7800f94e6d40030833328b Reviewed-on: https://gerrit.libreoffice.org/3980 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/docvw/HeaderFooterWin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 970e541d0a55..eb88d53e2c77 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -291,7 +291,7 @@ void SwHeaderFooterWin::Paint( const Rectangle& )
GetTextBoundRect( aTextRect, String( m_sLabel ) );
FontMetric aFontMetric = GetFontMetric( GetFont() );
- double nTextOffsetY = aFontMetric.GetHeight() - aFontMetric.GetDescent() + TEXT_PADDING;
+ double nTextOffsetY = aFontMetric.GetAscent() + TEXT_PADDING;
Point aTextPos( TEXT_PADDING, nTextOffsetY );
basegfx::B2DHomMatrix aTextMatrix( createScaleTranslateB2DHomMatrix(