Hi-DPI patches for 4.2

Jan Holesovsky kendy at collabora.com
Mon Mar 10 11:24:11 PDT 2014


Hi Caolán, all,

I've just pushed a backport of the hi-dpi patches from master to gerrit
for libreoffice-4-2 integration - as was requested earlier, to fix the
unfortunate state of LibreOffice on the hi-dpi displays.  It is the
following 5 patches (order is important):

https://gerrit.libreoffice.org/#/c/8516/
https://gerrit.libreoffice.org/#/c/8517/
https://gerrit.libreoffice.org/#/c/8518/
https://gerrit.libreoffice.org/#/c/8519/
https://gerrit.libreoffice.org/#/c/8520/

Keith confirmed that they fix the hi-dpi issues he was seeing in
LibreOffice 4.2.

They are supposed to be safe for normal displays; that is anything
non-safe should be enclosed in an "if (mnDPIScaleFactor > 1)".  Few
cases make the computation a bit more general, like:

+    long yOffset = (aRect.GetHeight() - mpImpl->maImage.GetSizePixel().Height()) / 2;
+
     if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_OK )
     {
-        ++aRect.Top();
+        aRect.Top() += yOffset;

etc. but hopefully such places are safe enough too.

It is only 5 patches, as I have squashed the follow-up fixes into the
appropriate patches, but other than that, it should bring us to the very
same state that is in master.

Thank you in advance,
Kendy



More information about the LibreOffice mailing list