Fix docx import of wrap 'Square' for groups

Miklos Vajna vmiklos at collabora.com
Fri Apr 16 07:31:24 UTC 2021


Hi Regina,

On Fri, Apr 16, 2021 at 12:42:28AM +0200, Regina Henschel <rb.henschel at t-online.de> wrote:
> Now I stuck, because some unit tests fail with small differences. But before
> I put a lot of time into it, to find whether the values in the unit tests
> are wrong or whether and where my patch is incorrect, I would like, if you
> have a look at the patch in general.

The approach looks reasonable to me in general. As I understand it, the
LO group shape is a simple container of shapes (with a name), while the
MSO group shape can have its own rotation, scaling, etc -- so their
document model can be more complex. Based on this, it's expected that
you may need the "original" rotation of the group shape in
writerfilter/.

Regarding the unit tests: I try to always document how a test failed
without the original fix. So in case you see that e.g. now the test
fails because of a 98 vs 99 difference and the comment says the old
value was 42, then this may suggest that only the test was poor and it
can be adapted.

You can always manually compare the import result of a particular test
document with and without your fix: if you see no differences, then that
also suggests that you are OK to change the test.

Otherwise it's likely that the test caught some badness and you need to
improve your patch.

Hope that helps,

Miklos


More information about the LibreOffice mailing list