GSoC - Weekly Report - #1 - Table styles

Balázs Sántha santha.balazs at simonyi.bme.hu
Sun Jun 13 15:21:07 UTC 2021


Dear Community!

Here is the first week of work. This is the first time, so I will be a bit
more verbose.
With my mentor, our aim is to implement a better DOCX table style support.

First we worked on an optimization, to fix performance regressions with
DOCX table import. Para/run props in DOCX table styles are converted into
direct formatting, which is very fragile and very slow. We aim to solve
this by replacing the direct formatting by a new custom para style(s). I
also made a proof-of-concept ODF document about this option.

Right now, the conversion into direct formatting is in a single function
ApplyParagraphPropertiesFromTableStyles, where all the props that won
(which were not overriden by para or run styles) are gathered. I was
looking around in the codebase, where would be the best place to create the
new para style(s), but this function seemed to be good for me, as the
needed props are gathered here anyway.
I found the function StyleSheetTable::lcl_entry where the new styles are
being created normally. This seem to be working, but this is private from
the context of the named function.
So I still need to figure out, how to do this properly. If you have any
idea, how to implement this, I would be happy to hear that!

Answered questions on how are docDefaults and table styles imported and
exported.: All the docDefault run props are still there, but the para props
deleted and migrated into "Normal" para style during DOCX round-trip.
Exporting table styles, run properties seem to be deleted. Para properties
are exported, except shading.

Writer is using table-templates to mimic table-styles right now, but came
to the conclusion that mapping DOCX table styles to ODF table-templates
would be very difficult, e.g style inheritance.

Eventually our main goal is to improve interoperability, and create a
working UX for table styles too, what I already started. (Because Writer is
lacking of it, and of course end-users don't care if it is implemented by
templates or not.)
About UX, I made a minor fix, where changes in table-styles didn't
propagate.:
https://gerrit.libreoffice.org/c/core/+/117079

Next week my goal is to work on the optimization, also start testing Ivan
Alex's work (previous GSoC on implemeting real table styles). In parallel,
I test the UX, because most likely it has some further bugs like above, and
solve as many as I can.

If you have any questions, ideas, thoughts or suggestions, please share
with me!

Regards,
Balázs Sántha, santhab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20210613/6d64e4b8/attachment.htm>


More information about the LibreOffice mailing list