Trouble with unittests testDmlTextshape and testDmlTextshapeB

Regina Henschel rb.henschel at t-online.de
Tue May 18 18:10:36 UTC 2021


Hi Miklos, hi all,

after having looked over the problems again, I think that it is not 
enough to improve the import. The export must be fixed at the same time, 
otherwise the user gets a heavily modified document after saving and 
reloading. Until now, saving and reloading deliver a mostly unchanged 
document, because the errors in saving and loading cancelled each other 
out. If the user only worked with LibreOffice in docx format, he did not 
even notice that the document would look completely different in Word.

I think, that I have found a wrong part in DrawingML::WriterTransform() 
in oox/source/export/drawingml.cxx. For a group shape not only nLeft and 
nTop need to be zero, but nChildLeft and nChildTop too. Having that 
changed, only tiny adaptions of unit tests are needed.

But I wonder, why the values are not zero from the beginning. Looking up 
the call chain I see, that rRect gets it position from properties 
"HoriOrientPosition" and "VertOrientPosition". Shouldn't they be zero 
for a group, because all position adaptions are incorporated into the 
group members?

Another export problem is with wrong dist* and effectExtent values. I 
have found calculations with them in DocxSdrExport::startDMLAnchorInline 
in sw/source/filter/ww8/docxsdrexport.cxx. Is that the only place to 
consider?

Because this seems to be going to be a large patch, I would appreciate 
getting feedback as early as possible so that I do not oversee affected 
areas and the general direction is correct.

Kind regards
Regina



Miklos Vajna schrieb am 17.05.2021 um 09:28:
> Hi Regina,
> 
> On Sun, May 16, 2021 at 08:03:18PM +0200, Regina Henschel <rb.henschel at t-online.de> wrote:
>> May I remove the positioning parts from these unittests?
> 
> If the test fails and your manual testing confirms that this is a poor
> test and not badness caught by the test, then it sounds reasonable to
> adjust the test.
> 
> In case that is possible, I would recommend adjusting the test, not
> removing it, to avoid decreasing the test coverage. You can also comment
> there, noting that a given asserted value is not ideal, and what would
> be the ideal instead.
> 
> Regards,
> 
> Miklos
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
> 



More information about the LibreOffice mailing list