diff options
author | Philipp Lohmann <pl@openoffice.org> | 2002-11-13 19:24:06 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2002-11-13 19:24:06 +0000 |
commit | f67d08b2027de1989f42d8c202cd445f84f54b55 (patch) | |
tree | c73edf396faa921bcc7fdf976a9f74bb9dd70641 | |
parent | 847a6fbf65572061d02bd4dc5c3d76475b5ab38f (diff) |
#i9060# use single logical resolution in psprint
-rw-r--r-- | vcl/unx/inc/salprn.h | 6 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salprnpsp.cxx | 21 |
3 files changed, 17 insertions, 20 deletions
diff --git a/vcl/unx/inc/salprn.h b/vcl/unx/inc/salprn.h index 06b571d468cc..89dcf349a5ba 100644 --- a/vcl/unx/inc/salprn.h +++ b/vcl/unx/inc/salprn.h @@ -2,9 +2,9 @@ * * $RCSfile: salprn.h,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: pl $ $Date: 2001-11-29 12:04:20 $ + * last change: $Author: pl $ $Date: 2002-11-13 20:24:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -125,8 +125,6 @@ public: #include <prntypes.hxx> #endif -#include <ppdparser.hxx> - // forward declarations class SalInfoPrinter; diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 42893d3a93c7..93931aab03e9 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salgdi.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: hdu $ $Date: 2002-10-29 13:16:59 $ + * last change: $Author: pl $ $Date: 2002-11-13 20:24:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -491,10 +491,10 @@ void SalGraphics::GetResolution( long &rDPIX, long &rDPIY ) // const #ifndef _USE_PRINT_EXTENSION_ if (maGraphicsData.m_pJobData != NULL) { - int x, y; - maGraphicsData.m_pJobData->m_aContext.getResolution( x, y ); + int x = maGraphicsData.m_pJobData->m_aContext.getRenderResolution(); + rDPIX = x; - rDPIY = y; + rDPIY = x; } else { diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx index 0c0e70f7eb0d..187425fbf3b5 100644 --- a/vcl/unx/source/gdi/salprnpsp.cxx +++ b/vcl/unx/source/gdi/salprnpsp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salprnpsp.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: hr $ $Date: 2002-08-27 17:31:42 $ + * last change: $Author: pl $ $Date: 2002-11-13 20:24:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -707,27 +707,26 @@ void SalInfoPrinter::GetPageInfo( String aPaper; int width, height; int left = 0, top = 0, right = 0, bottom = 0; - int nDPIx, nDPIy; + int nDPI = aData.m_aContext.getRenderResolution(); if( aData.m_eOrientation == psp::orientation::Portrait ) { aData.m_aContext.getPageSize( aPaper, width, height ); - aData.m_aContext.getResolution( nDPIx, nDPIy ); aData.m_pParser->getMargins( aPaper, left, right, top, bottom ); } else { aData.m_aContext.getPageSize( aPaper, height, width ); - aData.m_aContext.getResolution( nDPIy, nDPIx ); aData.m_pParser->getMargins( aPaper, bottom, top, left, right ); } - rPageWidth = width * nDPIx / 72; - rPageHeight = height * nDPIy / 72; - rPageOffX = left * nDPIx / 72; - rPageOffY = top * nDPIy / 72; - rOutWidth = ( width - left - right ) * nDPIx / 72; - rOutHeight = ( height - top - bottom ) * nDPIy / 72; + + rPageWidth = width * nDPI / 72; + rPageHeight = height * nDPI / 72; + rPageOffX = left * nDPI / 72; + rPageOffY = top * nDPI / 72; + rOutWidth = ( width - left - right ) * nDPI / 72; + rOutHeight = ( height - top - bottom ) * nDPI / 72; } } |