fdo#72590 scale or map only when EMR_EXTSELECTCLIPRGN action
Change-Id: Ie42c855e696922b38760876d4090d572deaa689a
This commit is contained in:
@@ -1000,21 +1000,21 @@ bool EnhWMFReader::ReadEnhWMF()
|
||||
case EMR_SELECTCLIPPATH :
|
||||
{
|
||||
sal_Int32 nClippingMode;
|
||||
pWMF->ReadInt32( nClippingMode );
|
||||
pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, true );
|
||||
pWMF->ReadInt32(nClippingMode);
|
||||
pOut->SetClipPath(pOut->GetPathObj(), nClippingMode, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case EMR_EXTSELECTCLIPRGN :
|
||||
{
|
||||
sal_Int32 iMode, cbRgnData;
|
||||
pWMF->ReadInt32( cbRgnData )
|
||||
.ReadInt32( iMode );
|
||||
sal_Int32 nClippingMode, cbRgnData;
|
||||
pWMF->ReadInt32(cbRgnData);
|
||||
pWMF->ReadInt32(nClippingMode);
|
||||
|
||||
PolyPolygon aPolyPoly;
|
||||
if ( cbRgnData )
|
||||
ImplReadRegion( aPolyPoly, *pWMF, nRecSize );
|
||||
pOut->SetClipPath( aPolyPoly, iMode, true );
|
||||
if (cbRgnData)
|
||||
ImplReadRegion(aPolyPoly, *pWMF, nRecSize);
|
||||
pOut->SetClipPath(aPolyPoly, nClippingMode, false);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -294,16 +294,13 @@ Color WinMtf::ReadColor()
|
||||
return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
|
||||
};
|
||||
|
||||
Point WinMtfOutput::ImplScale( const Point& rPt) // Hack to set varying defaults for incompletely defined files.
|
||||
Point WinMtfOutput::ImplScale(const Point& rPoint) // Hack to set varying defaults for incompletely defined files.
|
||||
{
|
||||
if (mbIsMapDevSet)
|
||||
return rPt; //fdo#73764
|
||||
|
||||
if (mbIsMapWinSet)
|
||||
return Point(rPt.X() * UNDOCUMENTED_WIN_RCL_RELATION - mrclFrame.Left(),
|
||||
rPt.Y() * UNDOCUMENTED_WIN_RCL_RELATION - mrclFrame.Top());
|
||||
|
||||
return ImplMap(rPt);
|
||||
if (!mbIsMapDevSet)
|
||||
return Point(rPoint.X() * UNDOCUMENTED_WIN_RCL_RELATION - mrclFrame.Left(),
|
||||
rPoint.Y() * UNDOCUMENTED_WIN_RCL_RELATION - mrclFrame.Top());
|
||||
else
|
||||
return rPoint;
|
||||
}
|
||||
|
||||
Point WinMtfOutput::ImplMap( const Point& rPt )
|
||||
@@ -782,16 +779,16 @@ void WinMtfOutput::MoveClipRegion( const Size& rSize )
|
||||
void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, bool bIsMapped )
|
||||
{
|
||||
mbClipNeedsUpdate = true;
|
||||
if (bIsMapped)
|
||||
PolyPolygon aPolyPolygon(rPolyPolygon);
|
||||
|
||||
if (!bIsMapped)
|
||||
{
|
||||
PolyPolygon aPP( rPolyPolygon );
|
||||
aClipPath.setClipPath( ImplScale( aPP ), nClippingMode );
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
|
||||
|
Reference in New Issue
Block a user