summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r--vcl/unx/generic/app/saldisp.cxx23
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx8
2 files changed, 6 insertions, 25 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index c3435523d4c1..99060cdd5325 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -540,7 +540,7 @@ void SalDisplay::Init()
int nDisplayScreens = ScreenCount( pDisp_ );
m_aScreens = std::vector<ScreenData>(nDisplayScreens);
- mbExactResolution = false;
+ bool bExactResolution = false;
/* #i15507#
* Xft resolution should take precedence since
* it is what modern desktops use.
@@ -554,27 +554,12 @@ void SalDisplay::Init()
if( (nDPI >= 50) && (nDPI <= 500) )
{
aResolution_ = Pair( nDPI, nDPI );
- mbExactResolution = true;
+ bExactResolution = true;
}
}
- if( mbExactResolution == false )
+ if( bExactResolution == false )
{
- int nDisplayWidth = DisplayWidthMM ( pDisp_, m_nXDefaultScreen.getXScreen() );
- int nDisplayHeight = DisplayHeightMM( pDisp_, m_nXDefaultScreen.getXScreen() );
-
- if (nDisplayHeight == 0 || nDisplayWidth == 0)
- {
- aResolution_ = Pair( 96, 96 );
- SAL_WARN("vcl", "screen width/height reported as 0!, using fallback 96dpi");
- }
- else
- {
- aResolution_ =
- Pair( DPI( WidthOfScreen( DefaultScreenOfDisplay( pDisp_ ) ),
- nDisplayWidth ),
- DPI( HeightOfScreen( DefaultScreenOfDisplay( pDisp_ ) ),
- nDisplayHeight ) );
- }
+ aResolution_ = Pair( 96, 96 );
}
nMaxRequestSize_ = XExtendedMaxRequestSize( pDisp_ ) * 4;
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;