How to deal with dpi-dependent values in unit tests?

Tomaž Vajngerl quikee at
Sat Oct 16 13:35:04 UTC 2021

Hi Regina,

On Fri, Oct 15, 2021 at 1:29 PM Regina Henschel <rb.henschel at>

> Hi all,
> the values of the bound rectangle of a Fontwork shape are dpi dependent
> (I don't know why). I could increase the tolerance to cover more dpi
> settings as done in or I
> add
>      if (!IsDefaultDPI()) return;
> as done in
> What is the preferred way to handle it?

If you can get away with IsDefaultDPI, then use that (you can't always).
Technically we shouldn't be dependent on DPI when we deal with logical
units, so until we find where the bug is that makes that DPI dependent,
only the default DPI (96) should return the correct results (I think).

Kind regards
> Regina

Best Regards, Tomaž
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list