summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-02 17:26:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-02 17:26:45 +0000
commit7b6a9445d39825d7cb561761c95e4059c861e17a (patch)
tree37c9dbf89e89a7968721fd9fbd6a0c561749ab21
parent697b378bc4ef5bb9d850bfda6498c09cea83ad16 (diff)
INTEGRATION: CWS geordi2q14 (1.28.26); FILE MERGED
2004/01/28 16:38:20 hr 1.28.26.1: #111934#: merge CWS vcl7pp1r3
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 9af7818ab1c2..45418949ef44 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.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: vg $ $Date: 2004-01-06 14:38:13 $
+ * last change: $Author: hr $ $Date: 2004-02-02 18:26:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -512,10 +512,30 @@ void X11SalGraphics::GetResolution( long &rDPIX, long &rDPIY ) // const
rDPIX = Divide( rDPIX * 96, rDPIY );
rDPIY = 96;
}
+ else if ( rDPIY > 200 )
+ {
+ rDPIX = Divide( rDPIX * 200, rDPIY );
+ rDPIY = 200;
+ }
#ifndef _USE_PRINT_EXTENSION_
}
#endif
+
+ // #i12705# equalize x- and y-resolution if they are close enough
+ if( rDPIX != rDPIY )
+ {
+ // different x- and y- resolutions are usually artifacts of
+ // a wrongly calculated screen size.
+ //if( (13*rDPIX >= 10*rDPIY) && (13*rDPIY >= 10*rDPIX) ) //+-30%
+ {
+#ifdef DEBUG
+ printf("Forcing Resolution from %dx%d to %dx%d\n",
+ rDPIX,rDPIY,rDPIY,rDPIY);
+#endif
+ rDPIX = rDPIY; // y-resolution is more trustworthy
+ }
+ }
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=