diff options
Diffstat (limited to 'vcl/unx/source/gdi/salvd.cxx')
-rw-r--r-- | vcl/unx/source/gdi/salvd.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx index ce8421f14f49..dc8b4b103eaa 100644 --- a/vcl/unx/source/gdi/salvd.cxx +++ b/vcl/unx/source/gdi/salvd.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -100,7 +100,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, SalDisplay *pDisplay = pDevice->GetDisplay(); m_nScreen = pDevice->GetScreenNumber(); - + int nVisualDepth = pDisplay->GetColormap( m_nScreen ).GetVisual().GetDepth(); int nDeviceDepth = pDevice->GetDepth(); @@ -113,18 +113,18 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, else if( nDeviceDepth == nVisualDepth ) m_pColormap = &pDisplay->GetColormap( m_nScreen ); - else + else if( nDeviceDepth == 1 ) m_pColormap = m_pDeleteColormap = new SalColormap(); - + if (m_pDeleteColormap != pOrigDeleteColormap) delete pOrigDeleteColormap; const Drawable aVdevDrawable = pDevice->GetDrawable(); SetDrawable( aVdevDrawable, m_nScreen ); - m_pVDev = pDevice; - m_pFrame = NULL; + m_pVDev = pDevice; + m_pFrame = NULL; bWindow_ = pDisplay->IsDisplay(); bVirDev_ = TRUE; @@ -143,7 +143,7 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay, bool bDeleteColormap = false; pDisplay_ = pDisplay; - pGraphics_ = new X11SalGraphics(); + pGraphics_ = new X11SalGraphics(); m_nScreen = nScreen; if( pXRenderFormat ) { pGraphics_->SetXRenderFormat( pXRenderFormat ); @@ -221,7 +221,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) { if( bExternPixmap_ ) return FALSE; - + // #144688# // the X protocol request CreatePixmap puts an upper bound // of 16 bit to the size. Beyond that there may be implementation @@ -261,7 +261,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) if( pGraphics_ ) InitGraphics( this ); - + return TRUE; } |