Kaydet (Commit) 142108e2 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Andras Timar

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 6c417274)
Reviewed-on: https://gerrit.libreoffice.org/20332Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 52fe817a)
üst 617a83c6
...@@ -1362,11 +1362,17 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) ...@@ -1362,11 +1362,17 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) 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 ); Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize ); 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 ); aFont.SetTransparent( true );
OutDevType eOutDevType = pDev->GetOutDevType(); OutDevType eOutDevType = pDev->GetOutDevType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment