bnc#881024 Don't world transform font size in WMF/EMF import
Change-Id: Ia865b84ee2b159ff7251ab5a769a2b635dd2a1ea
This commit is contained in:
@@ -389,13 +389,22 @@ Point WinMtfOutput::ImplMap( const Point& rPt )
|
|||||||
return Point();
|
return Point();
|
||||||
};
|
};
|
||||||
|
|
||||||
Size WinMtfOutput::ImplMap( const Size& rSz )
|
Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform)
|
||||||
{
|
{
|
||||||
if ( mnWinExtX && mnWinExtY )
|
if ( mnWinExtX && mnWinExtY )
|
||||||
{
|
{
|
||||||
// #i121382# apply the whole WorldTransform, else a rotation will be misinterpreted
|
// #i121382# apply the whole WorldTransform, else a rotation will be misinterpreted
|
||||||
double fWidth = rSz.Width() * maXForm.eM11 + rSz.Height() * maXForm.eM21;
|
double fWidth, fHeight;
|
||||||
double fHeight = rSz.Width() * maXForm.eM12 + rSz.Height() * maXForm.eM22;
|
if (bDoWorldTransform)
|
||||||
|
{
|
||||||
|
fWidth = rSz.Width() * maXForm.eM11 + rSz.Height() * maXForm.eM21;
|
||||||
|
fHeight = rSz.Width() * maXForm.eM12 + rSz.Height() * maXForm.eM22;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fWidth = rSz.Width();
|
||||||
|
fHeight = rSz.Height();
|
||||||
|
}
|
||||||
|
|
||||||
if ( mnGfxMode == GM_COMPATIBLE )
|
if ( mnGfxMode == GM_COMPATIBLE )
|
||||||
{
|
{
|
||||||
@@ -457,7 +466,7 @@ void WinMtfOutput::ImplMap( Font& rFont )
|
|||||||
{
|
{
|
||||||
// !!! HACK: we now always set the width to zero because the OS width is interpreted differently;
|
// !!! HACK: we now always set the width to zero because the OS width is interpreted differently;
|
||||||
// must later be made portable in SV (KA 1996-02-08)
|
// must later be made portable in SV (KA 1996-02-08)
|
||||||
Size aFontSize = ImplMap (rFont.GetSize());
|
Size aFontSize = ImplMap (rFont.GetSize(), false);
|
||||||
|
|
||||||
if( aFontSize.Height() < 0 )
|
if( aFontSize.Height() < 0 )
|
||||||
aFontSize.Height() *= -1;
|
aFontSize.Height() *= -1;
|
||||||
|
@@ -635,7 +635,7 @@ class WinMtfOutput
|
|||||||
|
|
||||||
Point ImplMap( const Point& rPt );
|
Point ImplMap( const Point& rPt );
|
||||||
Point ImplScale( const Point& rPt );
|
Point ImplScale( const Point& rPt );
|
||||||
Size ImplMap( const Size& rSz );
|
Size ImplMap( const Size& rSize, bool bDoWorldTransform = true);
|
||||||
Rectangle ImplMap( const Rectangle& rRectangle );
|
Rectangle ImplMap( const Rectangle& rRectangle );
|
||||||
void ImplMap( Font& rFont );
|
void ImplMap( Font& rFont );
|
||||||
Polygon& ImplMap( Polygon& rPolygon );
|
Polygon& ImplMap( Polygon& rPolygon );
|
||||||
|
Reference in New Issue
Block a user