[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-4' - vcl/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.com
Thu Dec 10 18:09:40 PST 2015
vcl/source/edit/vclmedit.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit a3f181a93df3cb5f4d95cb0139da639b26922a90
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Tue Dec 1 17:44:23 2015 +0100
tdf#94138 Use correct fonts for multiline edit when printing
When drawing a multiline edit we need to use a different device
(current window) to get the correct font and adjust for the Draw
method's input device.
Change-Id: I7993790c02d10e4283c7a4e2caefff0c7747e978
(cherry picked from commit 6c41727484a04ab89005ffb052937dae5d7dc223)
Reviewed-on: https://gerrit.libreoffice.org/20398
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index b6044dc..525f847 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -1362,11 +1362,17 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings(true, true, true);
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
- vcl::Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev );
+
+ vcl::Font aFont = pImpVclMEdit->GetTextWindow()->GetPointFont(*this);
+ Size aFontSize = aFont.GetSize();
+ MapMode aPtMapMode(MAP_POINT);
+ aFontSize = pDev->LogicToPixel(aFontSize, aPtMapMode);
+ aFont.SetSize(aFontSize);
+
aFont.SetTransparent( true );
OutDevType eOutDevType = pDev->GetOutDevType();
More information about the Libreoffice-commits
mailing list