Kaydet (Commit) c3ac689d authored tarafından Thomas Arnhold's avatar Thomas Arnhold

simplify PSEUDOCOLOR12

üst 10e3da7b
...@@ -92,14 +92,6 @@ using ::rtl::OUString; ...@@ -92,14 +92,6 @@ using ::rtl::OUString;
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#define PSEUDOCOLOR12
#define PSEUDOCOLOR8
#define TRUECOLOR24
#define TRUECOLOR16
#define TRUECOLOR15
#define TRUECOLOR12
#define TRUECOLOR8
#define SALCOLOR_WHITE MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) #define SALCOLOR_WHITE MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF )
#define SALCOLOR_BLACK MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) #define SALCOLOR_BLACK MAKE_SALCOLOR( 0x00, 0x00, 0x00 )
...@@ -296,10 +288,8 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay, ...@@ -296,10 +288,8 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay,
{ {
if( pVInfos[i].depth <= 8 ) if( pVInfos[i].depth <= 8 )
bUsable = sal_True; bUsable = sal_True;
#ifdef PSEUDOCOLOR12
else if( pVInfos[i].depth == 12 ) else if( pVInfos[i].depth == 12 )
bUsable = sal_True; bUsable = sal_True;
#endif
} }
pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024; pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024;
pWeight[ i ] -= pVInfos[ i ].visualid; pWeight[ i ] -= pVInfos[ i ].visualid;
...@@ -2803,11 +2793,7 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const ...@@ -2803,11 +2793,7 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const
if( m_aPalette.empty() if( m_aPalette.empty()
&& m_hColormap && m_hColormap
#ifdef PSEUDOCOLOR12
&& m_aVisual.GetDepth() <= 12 && m_aVisual.GetDepth() <= 12
#else
&& m_aVisual.GetDepth() <= 8
#endif
&& m_aVisual.GetClass() == PseudoColor ) && m_aVisual.GetClass() == PseudoColor )
((SalColormap*)this)->GetPalette(); ((SalColormap*)this)->GetPalette();
} }
...@@ -2867,11 +2853,7 @@ Pixel SalColormap::GetPixel( SalColor nSalColor ) const ...@@ -2867,11 +2853,7 @@ Pixel SalColormap::GetPixel( SalColor nSalColor ) const
{ {
if( m_aPalette.empty() if( m_aPalette.empty()
&& m_hColormap && m_hColormap
#ifdef PSEUDOCOLOR12
&& m_aVisual.GetDepth() <= 12 && m_aVisual.GetDepth() <= 12
#else
&& m_aVisual.GetDepth() <= 8
#endif
&& m_aVisual.GetClass() == PseudoColor ) // what else ??? && m_aVisual.GetClass() == PseudoColor ) // what else ???
((SalColormap*)this)->GetPalette(); ((SalColormap*)this)->GetPalette();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment