summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-11 16:20:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-11 20:45:11 +0000
commite2be2c23c1ad61b3bd640be6f16d66f5cd925d38 (patch)
treee477ec39fe258638274e5743a0d158d45c8fdd5f /vcl
parenta3de61e3cea28a251aefddf6ab245bc5249dee24 (diff)
Related: fdo#87242 init VirtualDevice with size of surface
otherwise vcl's clipping doesn't work quite right when the render text with vcl apis fallback is used. Manually forced in my case, but it should happen in practice with vertical text, so if there is a bug about vertical text not appearing in slideshows then this is part of the fix for that. Windows and Mac remain unchanged as initialized with 1, 1. If the same problem affects those platforms then they'll need to be adjusted to remember their height/widths from the ctor and those values plugged in here instead Change-Id: I2f82f0db0cf446d7db21f0a7ee4f8c15c7ebdb42 (cherry picked from commit f95b0743da4239e047db8638c61f90f8bbe54306)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/virdev.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 063bef16b209..eec2fa98768b 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -241,13 +241,15 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount
mnAlphaDepth = sal::static_int_cast<sal_Int8>(nAlphaBitCount);
}
-VirtualDevice::VirtualDevice( const SystemGraphicsData *pData, sal_uInt16 nBitCount )
+VirtualDevice::VirtualDevice(const SystemGraphicsData *pData, const Size &rSize,
+ sal_uInt16 nBitCount)
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << " )" );
- ImplInitVirDev( Application::GetDefaultDevice(), 1, 1, nBitCount, pData );
+ ImplInitVirDev(Application::GetDefaultDevice(), rSize.Width(), rSize.Height(),
+ nBitCount, pData);
}
VirtualDevice::~VirtualDevice()