diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-05-18 23:30:39 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-07-20 13:52:18 +0200 |
commit | 2243edc6e9136f5fbbeb5a876993944ffad64dac (patch) | |
tree | 3055680e8759db023cb2af4aa3f0a83846344f32 | |
parent | 668d28b19508ec313e6a771e5c118e742e463a8a (diff) |
fdo#72590 scale or map only when EMR_EXTSELECTCLIPRGN action
Conflicts:
vcl/source/filter/wmf/enhwmf.cxx
vcl/source/filter/wmf/winmtf.cxx
Change-Id: Ie42c855e696922b38760876d4090d572deaa689a
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 28 |
2 files changed, 14 insertions, 16 deletions
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index e487d73d7c95..c4e062b4b58c 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -990,7 +990,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() PolyPolygon aPolyPoly; if ( cbRgnData ) ImplReadRegion( aPolyPoly, *pWMF, nRecSize ); - pOut->SetClipPath( aPolyPoly, iMode, sal_True ); + pOut->SetClipPath( aPolyPoly, iMode, sal_False ); } break; diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index f21d54a69ba3..f87336c20973 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -304,14 +304,11 @@ Color WinMtf::ReadColor() Point WinMtfOutput::ImplScale( const Point& rPt) // Hack to set varying defaults for incompletely defined files. { - if (mbIsMapDevSet) - return rPt; //fdo#73764 - - if (mbIsMapWinSet) + if (!mbIsMapDevSet) return Point(rPt.X() * UNDOCUMENTED_WIN_RCL_RELATION - mrclFrame.Left(), rPt.Y() * UNDOCUMENTED_WIN_RCL_RELATION - mrclFrame.Top()); - - return ImplMap(rPt); + else + return rPt; } @@ -816,17 +813,18 @@ void WinMtfOutput::MoveClipRegion( const Size& rSize ) void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, sal_Bool bIsMapped ) { - mbClipNeedsUpdate=true; - if ( bIsMapped ) - { - PolyPolygon aPP( rPolyPolygon ); - aClipPath.setClipPath( ImplScale( aPP ), nClippingMode ); - } - else + + mbClipNeedsUpdate = true; + PolyPolygon aPolyPolygon(rPolyPolygon); + + if (!bIsMapped) { - PolyPolygon aPP( rPolyPolygon ); - aClipPath.setClipPath( ImplMap( aPP ), nClippingMode ); + if (!mbIsMapDevSet && (mnMapMode == MM_ISOTROPIC || mnMapMode == MM_ANISOTROPIC)) + aPolyPolygon = ImplScale(aPolyPolygon); + else + aPolyPolygon = ImplMap(aPolyPolygon); } + aClipPath.setClipPath(aPolyPolygon, nClippingMode); } |