[Libreoffice-commits] .: 4 commits - vcl/unx
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sat Jan 28 12:40:45 PST 2012
vcl/unx/generic/app/saldata.cxx | 7 ----
vcl/unx/generic/app/saldisp.cxx | 59 ----------------------------------------
2 files changed, 66 deletions(-)
New commits:
commit da15496978332189d3eb002b1c49e4b7fb6b2848
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Jan 28 21:39:48 2012 +0100
Remove VisualClassName
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index d253cd6..5269065 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -99,15 +99,6 @@ using ::rtl::OUString;
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-= static variables -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static const char* const VisualClassName[] = {
- "StaticGray",
- "GrayScale",
- "StaticColor",
- "PseudoColor",
- "TrueColor",
- "DirectColor"
-};
-
static const char* const EventNames[] =
{
NULL,
@@ -2245,10 +2236,6 @@ void SalDisplay::PrintInfo() const
GetVisual(m_nXDefaultScreen).red_mask,
GetVisual(m_nXDefaultScreen).green_mask,
GetVisual(m_nXDefaultScreen).blue_mask );
- fprintf( stderr, "\tVisual \t%d-bit %s ID=0x%x\n",
- GetVisual(m_nXDefaultScreen).GetDepth(),
- VisualClassName[ GetVisual(m_nXDefaultScreen).GetClass() ],
- sal::static_int_cast< unsigned int >(GetVisual(m_nXDefaultScreen).GetVisualId()) );
}
void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight )
commit c3ac689d50d5fe3c01ddf304506d6b4711062bea
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Jan 28 21:31:34 2012 +0100
simplify PSEUDOCOLOR12
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index b343195..d253cd6 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -92,14 +92,6 @@ using ::rtl::OUString;
// -=-= #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_BLACK MAKE_SALCOLOR( 0x00, 0x00, 0x00 )
@@ -296,10 +288,8 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay,
{
if( pVInfos[i].depth <= 8 )
bUsable = sal_True;
-#ifdef PSEUDOCOLOR12
else if( pVInfos[i].depth == 12 )
bUsable = sal_True;
-#endif
}
pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024;
pWeight[ i ] -= pVInfos[ i ].visualid;
@@ -2803,11 +2793,7 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const
if( m_aPalette.empty()
&& m_hColormap
-#ifdef PSEUDOCOLOR12
&& m_aVisual.GetDepth() <= 12
-#else
- && m_aVisual.GetDepth() <= 8
-#endif
&& m_aVisual.GetClass() == PseudoColor )
((SalColormap*)this)->GetPalette();
}
@@ -2867,11 +2853,7 @@ Pixel SalColormap::GetPixel( SalColor nSalColor ) const
{
if( m_aPalette.empty()
&& m_hColormap
-#ifdef PSEUDOCOLOR12
&& m_aVisual.GetDepth() <= 12
-#else
- && m_aVisual.GetDepth() <= 8
-#endif
&& m_aVisual.GetClass() == PseudoColor ) // what else ???
((SalColormap*)this)->GetPalette();
commit 10e3da7bf2125091ab69efa2b8f72dc1232052f0
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Jan 28 21:27:54 2012 +0100
sal_TrueCOLOR is never defined
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 119f08c..b343195 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -291,30 +291,6 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay,
nTrueColor = 2048;
if( pVInfos[i].depth == 24 )
bUsable = sal_True;
-#ifdef sal_TrueCOLOR8
- else if( pVInfos[i].depth == 8 )
- {
- nTrueColor = -1; // strongly discourage 8 bit true color
- bUsable = sal_True;
- }
-#endif
-#ifdef sal_TrueCOLOR15
- else if( pVInfos[i].depth == 15 )
- bUsable = sal_True;
-#endif
-#ifdef sal_TrueCOLOR16
- else if( pVInfos[i].depth == 16 )
- bUsable = sal_True;
-#endif
-#ifdef sal_TrueCOLOR32
- else if( pVInfos[i].depth == 32 )
- {
- nTrueColor = 256;
- // we do not have use for an alpha channel
- // better use a 24 or 16 bit truecolor visual if possible
- bUsable = sal_True;
- }
-#endif
}
else if( pVInfos[i].c_class == PseudoColor )
{
commit 047696ea1072ff5fd31e3950da59a9c1804694ea
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Jan 28 21:24:40 2012 +0100
SAL_XT is never used
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 306fc4e..d4e8b74 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -26,13 +26,6 @@
*
************************************************************************/
-
-#ifdef USE_XTOOLKIT
-# define SAL_XT
-#endif
-
-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
#include <unistd.h>
#include <fcntl.h>
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 09bc091..119f08c 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -26,10 +26,6 @@
*
************************************************************************/
-
-#define SAL_XT
-
-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
More information about the Libreoffice-commits
mailing list