GSoC - cleanup of the mapmodes in Calc

Jan Holesovsky kendy at collabora.com
Tue Jun 9 07:21:09 PDT 2015


Hi Krisztian,

I've created a commit that removes the need for SetMapMode for
ScOutputData::DrawGrid(), hopefully it will make it easier for you to do
the rest:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f76b2b3b1184383695a35fa104470fa3027e477b

It was quite a struggle to understand what is going on: Apparently
ScOutputData is initialized (and works) in pixels when it is initialized
with OUTTYPE_WINDOW, but in logic units, when it is initialized with
OUTTYPE_PRINTER.

For the moment, we unfortunately have to distinguish the pixel and
non-pixel cases, it's not possible to there a common case.  So let's
first continue with this and convert the rest of the methods so that
they don't need SetMapMode(MAP_PIXEL) any more.

Please do them one-by-one, and always test with the normal rendering,
rendering via gtktiledviewer, and export to PDF.

When we have that, the next will be to switch the ScOutputData's that
are initialized with OUTTYPE_WINDOW to use the logic units internally
too; there is just few of them - but I am sure that'll lead to some
other things to sort out too.

Thanks a lot,
Kendy



More information about the LibreOffice mailing list