dilfridge 15/02/22 22:38:30 Modified: libreoffice-4.3.5.2-DPI.patch Log: Update DPI patch so it actually builds... (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key EBE6A336BE19039C!)
Revision Changes Path 1.2 app-office/libreoffice/files/libreoffice-4.3.5.2-DPI.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.3.5.2-DPI.patch?rev=1.2&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.3.5.2-DPI.patch?rev=1.2&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.3.5.2-DPI.patch?r1=1.1&r2=1.2 Index: libreoffice-4.3.5.2-DPI.patch =================================================================== RCS file: /var/cvsroot/gentoo-x86/app-office/libreoffice/files/libreoffice-4.3.5.2-DPI.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- libreoffice-4.3.5.2-DPI.patch 8 Feb 2015 22:42:18 -0000 1.1 +++ libreoffice-4.3.5.2-DPI.patch 22 Feb 2015 22:38:30 -0000 1.2 @@ -1,25 +1,34 @@ -From 1964870db4ad1e4334e8fc5050795469dc1fb05e Mon Sep 17 00:00:00 2001 -From: Giuseppe Bilotta <[email protected]> -Date: Tue, 9 Sep 2014 21:34:45 +0200 -Subject: [PATCH] Fallback DPI detection on X11 +Merged upstream commits for bug 523822: -When the Xft.dpi setting is not found, and if only one screen is -available, fall back to detecting the screen DPI from the reported -resolution and monitor size. +a2d4bd6864e108a11d6ca2b69de5ebce265102dc "Refactor DPI settings validity check" +1964870db4ad1e4334e8fc5050795469dc1fb05e "[PATCH] Fallback DPI detection on X11" -Change-Id: I1481d94b5dc4072c1f8da4659a221dfc7971080b -Reviewed-on: https://gerrit.libreoffice.org/11377 -Reviewed-by: Chris Sherlock <[email protected]> -Tested-by: Chris Sherlock <[email protected]> ---- - vcl/unx/generic/app/saldisp.cxx | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx -index 7c97a24..ee6aad7 100644 ---- a/vcl/unx/generic/app/saldisp.cxx +diff -u b/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx +--- b/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx -@@ -569,7 +569,25 @@ void SalDisplay::Init() +@@ -120,6 +120,12 @@ + return nBits; + } + ++// check if the resolution is sane ++static bool sal_ValidDPI(long nDPI) ++{ ++ return (nDPI >= 50) && (nDPI <= 500); ++} ++ + static bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI ) + { + int nInfos; +@@ -555,7 +561,7 @@ + const OString aValStr( pValStr ); + const long nDPI = (long) aValStr.toDouble(); + // guard against insane resolution +- if( (nDPI >= 50) && (nDPI <= 500) ) ++ if( sal_ValidDPI(nDPI) ) + { + aResolution_ = Pair( nDPI, nDPI ); + bExactResolution = true; +@@ -569,7 +575,25 @@ } if( bExactResolution == false ) { @@ -46,6 +55,3 @@ } nMaxRequestSize_ = XExtendedMaxRequestSize( pDisp_ ) * 4; --- -2.3.0 -
