diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-08-01 12:34:02 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-09-04 10:24:29 +0200 |
commit | e53c0f102cc4f0ef31a9fffb5b78fd158cf68738 (patch) | |
tree | dff94a0f62d8ff476a17d9f76089711daee07f5d /vcl | |
parent | 0c457ee0f069b5a53dbcf4480069568fdf201bd7 (diff) |
tdf#104252 EMF rendering, set correct VirtualDevice size
ClipRegion is bounded to device size. That resulted in missing
text in case of PDF export with EMF+ images under Windows
(with hardware acceleration).
VirtualDevice size was always equal to the screen resolution what
is not enough to draw complete PDF.
This patch modifies VirtualDevice size to match target size.
Change-Id: I762be6a6ca6fab3897b57f370fecc3f3568a58cb
Reviewed-on: https://gerrit.libreoffice.org/41390
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/gdi/salvd.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx index 65d8600f6934..191c0eb0763c 100644 --- a/vcl/win/gdi/salvd.cxx +++ b/vcl/win/gdi/salvd.cxx @@ -97,12 +97,12 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, hDC = (pData->hDC) ? pData->hDC : GetDC(pData->hWnd); hBmp = nullptr; bOk = (hDC != nullptr); - if (bOk) + if ( bOk && nDX <= 1 && nDY <= 1 ) { nDX = GetDeviceCaps( hDC, HORZRES ); nDY = GetDeviceCaps( hDC, VERTRES ); } - else + else if ( !bOk ) { nDX = 0; nDY = 0; |