diff options
-rw-r--r-- | vcl/inc/unx/saldisp.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 54 |
2 files changed, 0 insertions, 56 deletions
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index ded2d1c65ac8..8fd0507deb36 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -163,7 +163,6 @@ public: SalColormap( const SalDisplay* pSalDisplay, Colormap hColormap, int nScreen ); - SalColormap( const BitmapPalette &rpPalette ); SalColormap( sal_uInt16 nDepth ); SalColormap(); ~SalColormap(); @@ -189,7 +188,6 @@ public: int b ) const; Pixel GetPixel( SalColor nColor ) const; SalColor GetColor( Pixel nPixel ) const; - void SetPalette( const BitmapPalette &rPalette ); }; // -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 3c53b7b0c968..75882cc21b31 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2777,30 +2777,6 @@ SalColormap::SalColormap( const SalDisplay *pDisplay, Colormap hColormap, int nS } } -// PseudoColor -SalColormap::SalColormap( const BitmapPalette &rPalette ) - : m_pDisplay( GetGenericData()->GetSalDisplay() ), - m_hColormap( None ), - m_nWhitePixel( SALCOLOR_NONE ), - m_nBlackPixel( SALCOLOR_NONE ), - m_nUsed( rPalette.GetEntryCount() ), - m_nScreen( GetGenericData()->GetSalDisplay()->GetDefaultScreenNumber() ) -{ - m_aPalette = std::vector<SalColor>(m_nUsed); - - for( unsigned int i = 0; i < m_nUsed; i++ ) - { - const BitmapColor &rColor = rPalette[i]; - m_aPalette[i] = MAKE_SALCOLOR( rColor.GetRed(), - rColor.GetGreen(), - rColor.GetBlue() ); - if( (m_nBlackPixel == SALCOLOR_NONE) && (SALCOLOR_BLACK == m_aPalette[i]) ) - m_nBlackPixel = i; - else if( (m_nWhitePixel == SALCOLOR_NONE) && (SALCOLOR_WHITE == m_aPalette[i]) ) - m_nWhitePixel = i; - } -} - // MonoChrome SalColormap::SalColormap() : m_pDisplay( GetGenericData()->GetSalDisplay() ), @@ -2913,36 +2889,6 @@ SalColormap::~SalColormap() #endif } -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void SalColormap::SetPalette( const BitmapPalette &rPalette ) -{ - if( this != &GetGenericData()->GetSalDisplay()->GetColormap(m_nScreen) ) - { - m_nBlackPixel = SALCOLOR_NONE; - m_nWhitePixel = SALCOLOR_NONE; - } - - if( rPalette.GetEntryCount() > m_nUsed ) - { - m_nBlackPixel = SALCOLOR_NONE; - m_nWhitePixel = SALCOLOR_NONE; - m_nUsed = rPalette.GetEntryCount(); - m_aPalette = std::vector<SalColor>(m_nUsed); - } - - for( int i = 0; i < rPalette.GetEntryCount(); i++ ) - { - const BitmapColor &rColor = rPalette[i]; - m_aPalette[i] = MAKE_SALCOLOR( rColor.GetRed(), - rColor.GetGreen(), - rColor.GetBlue() ); - if( (m_nBlackPixel == SALCOLOR_NONE) && (SALCOLOR_BLACK == m_aPalette[i]) ) - m_nBlackPixel = i; - else if( (m_nWhitePixel == SALCOLOR_NONE) && (SALCOLOR_WHITE == m_aPalette[i]) ) - m_nWhitePixel = i; - } -} - void SalColormap::GetPalette() { Pixel i; |