summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/app/saldisp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-29 13:53:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-29 17:34:00 +0200
commit74cd0d0b281f8df75612bfb600df2eae62c4d21d (patch)
treebbfb2e37d317ffad49267fe71fd270198fdb81e1 /vcl/unx/generic/app/saldisp.cxx
parent4c51f2e0dfdddfe0efb4218d2cd1deefd90b6eff (diff)
loplugin:unusedmethods
Change-Id: I95ab7581dec35b113cb657ce8e5ee27c89c73593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/app/saldisp.cxx')
-rw-r--r--vcl/unx/generic/app/saldisp.cxx104
1 files changed, 0 insertions, 104 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 92f6f3457c70..6f6f0e22b864 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2648,108 +2648,4 @@ bool SalColormap::GetXPixels( XColor &rColor,
return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF );
}
-Pixel SalColormap::GetPixel( std::optional<Color> oColor ) const
-{
- if( !oColor ) return 0;
- if( COL_BLACK == oColor ) return m_nBlackPixel;
- if( COL_WHITE == oColor ) return m_nWhitePixel;
-
- Color nColor = *oColor;
-
- if( m_aVisual.GetClass() == TrueColor )
- return m_aVisual.GetTCPixel( nColor );
-
- if( m_aLookupTable.empty() )
- {
- if( m_aPalette.empty()
- && m_hColormap
- && m_aVisual.GetDepth() <= 12
- && m_aVisual.GetClass() == PseudoColor ) // what else ???
- const_cast<SalColormap*>(this)->GetPalette();
-
- if( !m_aPalette.empty() )
- for( Pixel i = 0; i < m_nUsed; i++ )
- if( m_aPalette[i] == nColor )
- return i;
-
- if( m_hColormap )
- {
- // DirectColor, StaticColor, StaticGray, GrayScale (PseudoColor)
- XColor aColor;
-
- if( GetXPixel( aColor,
- nColor.GetRed(),
- nColor.GetGreen(),
- nColor.GetBlue() ) )
- {
- if( !m_aPalette.empty() && m_aPalette[aColor.pixel] == Color(0) )
- {
- const_cast<SalColormap*>(this)->m_aPalette[aColor.pixel] = nColor;
-
- if( !(aColor.pixel & 1) && m_aPalette[aColor.pixel+1] == Color(0) )
- {
- XColor aInversColor;
-
- Color nInversColor(ColorTransparency, sal_uInt32(nColor) ^ 0xFFFFFF);
-
- GetXPixel( aInversColor,
- nInversColor.GetRed(),
- nInversColor.GetGreen(),
- nInversColor.GetBlue() );
-
- if( m_aPalette[aInversColor.pixel] == Color(0) )
- const_cast<SalColormap*>(this)->m_aPalette[aInversColor.pixel] = nInversColor;
-#ifdef DBG_UTIL
- else
- SAL_INFO("vcl.app", "SalColormap::GetPixel() "
- << std::showbase << std::setfill('0')
- << std::setw(6) << std::hex
- << static_cast< unsigned long >(
- sal_uInt32(nColor))
- << "="
- << std::dec
- << aColor.pixel << " "
- << std::showbase << std::setfill('0')
- << std::setw(6) << std::hex
- << static_cast< unsigned long >(
- sal_uInt32(nInversColor))
- << "="
- << std::dec
- << aInversColor.pixel);
-#endif
- }
- }
-
- return aColor.pixel;
- }
-
-#ifdef DBG_UTIL
- SAL_INFO("vcl.app", "SalColormap::GetPixel() !XAllocColor "
- << std::hex
- << static_cast< unsigned long >(sal_uInt32(nColor)));
-#endif
- }
-
- if( m_aPalette.empty() )
- {
-#ifdef DBG_UTIL
- SAL_INFO("vcl.app", "SalColormap::GetPixel() Palette empty "
- << std::hex
- << static_cast< unsigned long >(sal_uInt32(nColor)));
-#endif
- return sal_uInt32(nColor);
- }
-
- const_cast<SalColormap*>(this)->GetLookupTable();
- }
-
- // color matching via palette
- sal_uInt16 r = nColor.GetRed();
- sal_uInt16 g = nColor.GetGreen();
- sal_uInt16 b = nColor.GetBlue();
- return m_aLookupTable[ (((r+8)/17) << 8)
- + (((g+8)/17) << 4)
- + ((b+8)/17) ];
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */