diff options
author | Keith Curtis <keithcu@gmail.com> | 2014-02-21 19:21:27 -0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-05 09:10:28 -0600 |
commit | 9f308fbc02439e25f8932314a9374c205ebdbc4c (patch) | |
tree | 99c8a8e85a828f6db0879fd6a24633278ba0cef5 /vcl/unx/generic/gdi | |
parent | ff6f3164dfc454354bee79eac30d6cc279b8a0ec (diff) |
Simplify resolution calculation
Removed unnecessary complexity with resolutions because X in 2014 isn't
telling the truth about the size of the screen. My brand-new 13" laptop
with the latest X and everything apparently has a 33" x 18" monitor. So
if the data isn't reliable, just use 96 dpi anyway which is a very
reasonable default.
Also got rid of exact resolution member variable. LibreOffice can just
always think it has exact resolution. If it doesn't, then it just means
the code needs to be smarter, not that we need a flag about whether the
data we have is "exact" or not.
Change-Id: Ic41bdc3a82dbd1fdb6a987d6dc49adad8194ce14
Reviewed-on: https://gerrit.libreoffice.org/8166
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/generic/gdi')
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 018f83328c48..c4b9cf924fea 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -484,12 +484,8 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons rDPIX = pDisplay->GetResolution().A(); rDPIY = pDisplay->GetResolution().B(); - if( !pDisplay->GetExactResolution() && rDPIY < 96 ) - { - rDPIX = Divide( rDPIX * 96, rDPIY ); - rDPIY = 96; - } - else if ( rDPIY > 200 ) + + if ( rDPIY > 200 ) { rDPIX = Divide( rDPIX * 200, rDPIY ); rDPIY = 200; |