To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=100373





------- Additional comments from a...@openoffice.org Mon Mar 30 12:31:19 +0000 
2009 -------
AW: I have a pretty simple, working fix which i checked in different scenarios.
Basic problem is that the Fonts streamed to the MetaFiles when creating the OLE
contents is slightly different for WIN32 nad other systems. On WIN32, the
definition for not scaled fonts is that FontWidth == 0, while on all other
systems this definition and Width == Height are allowed. This means that
definitions when using them in WIN32 need to be either also interpreted using
both definitions or to be corrected.

When correcting the Font import (which is uded on MetaFile read) in font.cxx

SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )

using

#ifdef WIN32
    // #i100373# handle font scaling for WIN32
    //
    // When width and height are identical and we are on a windows system,
    // translate the width to zero to express that the font is not to be
    // scaled at all. The width == height definition was probably created
    // by another Linux- or Mac-based system, but will be interpreted
    // different on WIN32 systems, thus this correction on import is
    // necessary
    if(rImpl_Font.maSize.getWidth() == rImpl_Font.maSize.getHeight())
    {
        rImpl_Font.maSize.setWidth(0);
    }
#endif

after the line

    rIStm >> rImpl_Font.maSize;

this difference gets corrected and the visualisation works as expected. The
advantage is that this solution does not change the current MetaFile format or
it's creation, but only corrects the import, so all already written files will 
work.

The better solution would be to have a unique definition for non-scaled fonts in
WIN32 and all other systems. This means to interpret Width==Height as non-scaled
on WIN32, too. It would be hard to ensure this, there may be several places in
VCL involved (HDU would know).

AW->PL: Do You see any caveats with such a solution? I checked WIN32- and
Linux-created MetaFiles, viewed on WIN32 and Linux, all seems to work well.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@graphics.openoffice.org
For additional commands, e-mail: issues-h...@graphics.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to