1 diff --git svtools/source/filter.vcl/wmf/winmtf.cxx svtools/source/filter.vcl/wmf/winmtf.cxx
2 index d3e2c92..d634a4e 100644
3 --- svtools/source/filter.vcl/wmf/winmtf.cxx
4 +++ svtools/source/filter.vcl/wmf/winmtf.cxx
5 @@ -415,6 +415,14 @@ Point WinMtfOutput::ImplMap( const Point& rPt )
12 + fX2 *= 2540.0/mnUnitsPerInch;
13 + fY2 *= 2540.0/mnUnitsPerInch;
20 @@ -490,6 +498,10 @@ Size WinMtfOutput::ImplMap( const Size& rSz )
25 + fWidth *= 2540.0/mnUnitsPerInch;
26 + fHeight*= 2540.0/mnUnitsPerInch;
31 @@ -926,6 +938,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
32 mbFillStyleSelected ( sal_False ),
33 mnGfxMode ( GM_COMPATIBLE ),
34 mnMapMode ( MM_TEXT ),
35 + mnUnitsPerInch ( 96 ),
39 @@ -1660,7 +1673,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B
40 if ( aBmpEx.IsTransparent() )
41 mpGDIMetaFile->AddAction( new MetaBmpExScaleAction( rPos, rSize, aBmpEx ) );
43 - mpGDIMetaFile->AddAction( new MetaBmpScaleAction( rPos, rSize, aBmpEx.GetBitmap() ) );
44 + mpGDIMetaFile->AddAction( new MetaBmpScaleAction( rPos, rSize, aBmpEx.GetBitmap() ) );
47 //-----------------------------------------------------------------------------------
48 @@ -2023,6 +2036,14 @@ void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode )
50 //-----------------------------------------------------------------------------------
52 +void WinMtfOutput::SetUnitsPerInch( UINT16 nUnitsPerInch )
54 + if( nUnitsPerInch != 0 )
55 + mnUnitsPerInch = nUnitsPerInch;
58 +//-----------------------------------------------------------------------------------
60 void WinMtfOutput::SetWorldTransform( const XForm& rXForm )
62 maXForm.eM11 = rXForm.eM11;
63 diff --git svtools/source/filter.vcl/wmf/winmtf.hxx svtools/source/filter.vcl/wmf/winmtf.hxx
64 index f9ade1b..58189c0 100644
65 --- svtools/source/filter.vcl/wmf/winmtf.hxx
66 +++ svtools/source/filter.vcl/wmf/winmtf.hxx
67 @@ -574,6 +574,8 @@ class WinMtfOutput
71 + UINT16 mnUnitsPerInch;
74 sal_Int32 mnDevOrgX, mnDevOrgY;
75 sal_Int32 mnDevWidth, mnDevHeight;
76 @@ -620,6 +622,7 @@ class WinMtfOutput
78 sal_uInt32 GetMapMode() const { return mnMapMode; };
79 void SetMapMode( sal_uInt32 mnMapMode );
80 + void SetUnitsPerInch( UINT16 nUnitsPerInch );
81 void SetWorldTransform( const XForm& rXForm );
82 void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode );
84 diff --git svtools/source/filter.vcl/wmf/winwmf.cxx svtools/source/filter.vcl/wmf/winwmf.cxx
85 index 6901de7..19d7c61 100644
86 --- svtools/source/filter.vcl/wmf/winwmf.cxx
87 +++ svtools/source/filter.vcl/wmf/winwmf.cxx
88 @@ -977,6 +977,7 @@ BOOL WMFReader::ReadHeader()
89 pWMF->Seek( nStrmPos );
92 + pOut->SetUnitsPerInch( nUnitsPerInch );
93 pOut->SetWinOrg( aPlaceableBound.TopLeft() );
94 aWMFSize = Size( labs( aPlaceableBound.GetWidth() ), labs( aPlaceableBound.GetHeight() ) );
95 pOut->SetWinExt( aWMFSize );