diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2014-09-12 16:37:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-12 15:09:56 +0000 |
commit | 75b982c4b615acea9380b2507277c94078ba189e (patch) | |
tree | 7f4bffe95464fe57c764f657da2a9923d0a63a53 /vcl | |
parent | aa2fbfc4faa24cf7ee5aa9afdafddbd536ac4fec (diff) |
vcl: avoid calling GetResolution() twice
Since we want both horizontal and vertical resolution, just get both
with the same call.
Change-Id: I7b08b94e792b069b86e334608d6d6dc3901ad181
Reviewed-on: https://gerrit.libreoffice.org/11423
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index d99c406df8a8..10d374652d4c 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -481,8 +481,9 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons return; } - rDPIX = pDisplay->GetResolution().A(); - rDPIY = pDisplay->GetResolution().B(); + Pair dpi = pDisplay->GetResolution(); + rDPIX = dpi.A(); + rDPIY = dpi.B(); if ( rDPIY > 200 ) { |