Commits

Anonymous committed b538814

vcl122: #i117746# remove unused SalColormap constructor, SalColormap::SetPalette

Comments (0)

Files changed (2)

vcl/inc/unx/saldisp.hxx

     SalColormap( const SalDisplay*  pSalDisplay,
                  Colormap           hColormap,
                  int                nScreen );
-    SalColormap( const BitmapPalette &rpPalette );
     SalColormap( sal_uInt16             nDepth );
     SalColormap();
 	~SalColormap();
 									   int      b ) const;
     Pixel			GetPixel( SalColor nColor ) const;
     SalColor		GetColor( Pixel nPixel ) const;
-    void			SetPalette( const BitmapPalette &rPalette );
 };
 
 // -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

vcl/unx/generic/app/saldisp.cxx

     }
 }
 
-// PseudoColor
-SalColormap::SalColormap( const BitmapPalette &rPalette )
-    : m_pDisplay( GetX11SalData()->GetDisplay() ),
-      m_hColormap( None ),
-      m_nWhitePixel( SALCOLOR_NONE ),
-      m_nBlackPixel( SALCOLOR_NONE ),
-      m_nUsed( rPalette.GetEntryCount() ),
-      m_nScreen( GetX11SalData()->GetDisplay()->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( GetX11SalData()->GetDisplay() ),
 }
 
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void SalColormap::SetPalette( const BitmapPalette &rPalette )
-{
-	if( this != &GetX11SalData()->GetDisplay()->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;