diff options
author | Kurt Zenker <kz@openoffice.org> | 2003-10-15 09:03:11 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2003-10-15 09:03:11 +0000 |
commit | 0b4518f561404fa04c0db9ec39b17831ffd24cb9 (patch) | |
tree | 2fdcb55c4d3d1ad41db871c0493d6fb27d6bda65 | |
parent | a367f815b1e02fcaa0dd2a0a78cec35301401684 (diff) |
INTEGRATION: CWS extleading (1.9.68); FILE MERGED
2003/09/15 08:12:47 fme 1.9.68.2: #i14805# Added virtual device mode REFDEV_MODE96
2003/07/21 08:51:36 fme 1.9.68.1: #110641# Feature - External Leading
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index f9d07b47da88..cb4afbbddb3c 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -2,9 +2,9 @@ * * $RCSfile: virdev.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: rt $ $Date: 2003-05-02 14:36:42 $ + * last change: $Author: kz $ $Date: 2003-10-15 10:03:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -270,7 +270,8 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, // ----------------------------------------------------------------------- VirtualDevice::VirtualDevice( USHORT nBitCount ) - : mpVirDev( NULL ) +: mpVirDev( NULL ), + meRefDevMode( REFDEV_NONE ) { DBG_TRACE1( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); @@ -280,7 +281,8 @@ VirtualDevice::VirtualDevice( USHORT nBitCount ) // ----------------------------------------------------------------------- VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount ) - : mpVirDev( NULL ) + : mpVirDev( NULL ), + meRefDevMode( REFDEV_NONE ) { DBG_TRACE1( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); @@ -458,13 +460,40 @@ BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase ) #endif } -void VirtualDevice::SetReferenceDevice() +// ----------------------------------------------------------------------- + +void VirtualDevice::SetReferenceDevice( RefDevMode eRefDevMode ) { - // reference device has 600dpi - mnDPIX = 600; - mnDPIY = 600; + switch( eRefDevMode ) + { + case REFDEV_NONE: + default: + DBG_ASSERT( FALSE, "VDev::SetRefDev illegal argument!" ); + // fall through + case REFDEV_MODE06: + mnDPIX = mnDPIY = 600; + break; + case REFDEV_MODE48: + mnDPIX = mnDPIY = 4800; + break; + case REFDEV_MODE96: + mnDPIX = mnDPIY = 9600; + break; + } + + EnableOutput( FALSE ); // prevent output on reference device mbScreenComp = FALSE; + // invalidate currently selected fonts + mbInitFont = TRUE; + mbNewFont = TRUE; + + // avoid adjusting font lists when already in refdev mode + BYTE nOldRefDevMode = meRefDevMode; + meRefDevMode = (BYTE)eRefDevMode; + if( nOldRefDevMode != REFDEV_NONE ) + return; + // the reference device should have only scalable fonts // => clean up the original font lists before getting new ones if ( mpFontEntry ) @@ -506,13 +535,10 @@ void VirtualDevice::SetReferenceDevice() pScalableDevFonts->Add( pNewData ); } } - mpFontList = pScalableDevFonts; // prepare to use new font lists + mpFontList = pScalableDevFonts; mpFontCache = new ImplFontCache( FALSE ); - mbInitFont = TRUE; - mbNewFont = TRUE; - - // TODO: increase maFont's size accordingly? } +// ----------------------------------------------------------------------- |