update dev300-m58
[ooovba.git] / applied_patches / 0491-emf+-use-canvas-only-for-emf+.diff
blobfa7e0842354f58ffb90547749742d5217c16c4ef
1 diff --git vcl/inc/vcl/gdimtf.hxx vcl/inc/vcl/gdimtf.hxx
2 index 077742d..833d9de 100644
3 --- vcl/inc/vcl/gdimtf.hxx
4 +++ vcl/inc/vcl/gdimtf.hxx
5 @@ -128,6 +128,7 @@ private:
6 ImpLabelList* pLabelList;
7 BOOL bPause;
8 BOOL bRecord;
9 + BOOL bUseCanvas;
11 //#if 0 // _SOLAR__PRIVATE
13 @@ -256,6 +257,8 @@ public:
14 friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile );
16 BOOL CreateThumbnail( sal_uInt32 nMaximumExtent, BitmapEx& rBmpEx, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
18 + void UseCanvas( BOOL _bUseCanvas );
21 #endif // _SV_GDIMTF_HXX
22 diff --git vcl/source/gdi/gdimtf.cxx vcl/source/gdi/gdimtf.cxx
23 index 2104bcb..93ac803 100644
24 --- vcl/source/gdi/gdimtf.cxx
25 +++ vcl/source/gdi/gdimtf.cxx
26 @@ -266,7 +266,8 @@ GDIMetaFile::GDIMetaFile() :
27 pOutDev ( NULL ),
28 pLabelList ( NULL ),
29 bPause ( FALSE ),
30 - bRecord ( FALSE )
31 + bRecord ( FALSE ),
32 + bUseCanvas ( FALSE )
36 @@ -281,7 +282,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
37 pNext ( rMtf.pNext ),
38 pOutDev ( NULL ),
39 bPause ( FALSE ),
40 - bRecord ( FALSE )
41 + bRecord ( FALSE ),
42 + bUseCanvas ( rMtf.bUseCanvas )
44 // RefCount der MetaActions erhoehen
45 for( void* pAct = First(); pAct; pAct = Next() )
46 @@ -335,6 +337,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
47 pOutDev = NULL;
48 bPause = FALSE;
49 bRecord = FALSE;
50 + bUseCanvas = rMtf.bUseCanvas;
52 if( rMtf.bRecord )
54 @@ -622,7 +625,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
56 GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
58 - if( !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
59 + if( bUseCanvas && !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
60 return;
62 Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );
63 @@ -2649,3 +2652,8 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
65 return !rBmpEx.IsEmpty();
68 +void GDIMetaFile::UseCanvas( BOOL _bUseCanvas )
70 + bUseCanvas = _bUseCanvas;
72 diff --git svtools/source/filter.vcl/wmf/winmtf.cxx svtools/source/filter.vcl/wmf/winmtf.cxx
73 index ded3948..c28a1c6 100644
74 --- svtools/source/filter.vcl/wmf/winmtf.cxx
75 +++ svtools/source/filter.vcl/wmf/winmtf.cxx
76 @@ -2263,6 +2263,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
77 mem << one << zero << zero << one << zero << zero;
79 mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const BYTE*) mem.GetData(), mem.GetSize() ) );
80 + mpGDIMetaFile->UseCanvas( TRUE );
83 void WinMtfOutput::PassEMFPlus( void* pBuffer, UINT32 nLength )