summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas.kanapickas@gmail.com>2010-10-18 16:52:05 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-18 16:52:27 +0100
commit849a713ffd29a58ae79e48f80835c28bbd9d5a72 (patch)
tree7d2c662f43a00f3bc04a0d51c685544074538a5c /vcl/unx
parentf7cbde525450a1a9427873c264791c65056c4f2a (diff)
remove non-compiled code
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx7
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx52
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx70
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx10
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx8
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx9
-rw-r--r--vcl/unx/source/fontmanager/parseAFM.cxx89
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx8
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx19
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx15
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx4
-rw-r--r--vcl/unx/source/gdi/xfont.cxx16
-rw-r--r--vcl/unx/source/gdi/xrender_peer.cxx6
-rw-r--r--vcl/unx/source/gdi/xrender_peer.hxx10
14 files changed, 2 insertions, 321 deletions
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 0ef9b2d54248..3b74af8c1b54 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -128,12 +128,7 @@ static AtkRelationType mapRelationType( sal_Int16 nRelation )
default:
break;
}
-#if 0
- ATK_RELATION_NODE_CHILD_OF,
- ATK_RELATION_EMBEDS,
- ATK_RELATION_EMBEDDED_BY,
- ATK_RELATION_POPUP_FOR,
-#endif
+
return type;
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 864eda267f62..423e254aed6a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1547,12 +1547,6 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
// Make sure the thumb is at least the default width (so we don't get tiny thumbs),
// but if the VCL gives us a size smaller than the theme's default thumb size,
// honor the VCL size
-#if 0
- if ( (thumbRect.GetWidth() < min_slider_length)
- && ((scrollbarRect.GetWidth()-button1BoundRect.GetWidth()-button2BoundRect.GetWidth()) > min_slider_length) )
- thumbRect.SetSize( Size( min_slider_length, thumbRect.GetHeight() ) );
-#endif
-
thumbRect.Right() += magic;
// Center vertically in the track
thumbRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 );
@@ -1594,14 +1588,6 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
button22BoundRect.SetSize( Size( slider_width, stepper_size ) );
thumbRect.Right() = thumbRect.Left() + slider_width - 1;
-#if 0
- // Make sure the thumb is at least the default width (so we don't get tiny thumbs),
- // but if the VCL gives us a size smaller than the theme's default thumb size,
- // honor the VCL size
- if ( (thumbRect.GetHeight() < min_slider_length)
- && ((scrollbarRect.GetHeight()-button1BoundRect.GetHeight()-button2BoundRect.GetHeight()) > min_slider_length) )
- thumbRect.SetSize( Size( thumbRect.GetWidth(), min_slider_length ) );
-#endif
thumbRect.Bottom() += magic;
// Center horizontally in the track
@@ -3121,43 +3107,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
slider_width, slider_length,
eOri );
}
- #if 0
- // paint background
- gtk_paint_flat_box( gWidgetData[m_nScreen].gProgressBar->style,
- pixDrawable,
- GTK_STATE_NORMAL,
- GTK_SHADOW_NONE,
- NULL,
- gWidgetData[m_nScreen].gProgressBar,
- "trough",
- 0, 0, w, h );
- if( nProgressWidth > 0 )
- {
- // paint progress
- if( Application::GetSettings().GetLayoutRTL() )
- {
- gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style,
- pixDrawable,
- GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- NULL,
- gWidgetData[m_nScreen].gProgressBar,
- "bar",
- w-nProgressWidth, 0, nProgressWidth, h
- );
- }
- else
- {
- gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style,
- pixDrawable,
- GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- NULL,
- gWidgetData[m_nScreen].gProgressBar,
- "bar",
- 0, 0, nProgressWidth, h
- );
- }
- }
- #endif
+
BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
g_object_unref( pixmap );
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index a21c29269984..e130afbecd15 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -819,76 +819,6 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
default:
break;
}
-#if 0
-
-
- // Metrics of the scroll bar
- case CTRL_SCROLLBAR:
- //pWidget = pWidgetPainter->scrollBar( rControlRegion,
- //( part == PART_BUTTON_LEFT || part == PART_BUTTON_RIGHT ),
- //ImplControlValue() );
- //aStyleOption.initFrom( pWidget );
-
- switch ( part )
- {
- case PART_BUTTON_LEFT:
- case PART_BUTTON_UP:
- qRect = kapp->style()->subControlRect(
- QStyle::CC_ScrollBar, &aStyleOption, QStyle::SC_ScrollBarSubLine );
-
- // Workaround for Platinum style scroll bars. It makes the
- // left/up button invisible.
- if ( part == PART_BUTTON_LEFT )
- {
- if ( qRect.left() > kapp->style()->subControlRect(
- QStyle::CC_ScrollBar, &aStyleOption,
- QStyle::SC_ScrollBarSubPage ).left() )
- {
- qRect.setLeft( 0 );
- qRect.setRight( 0 );
- }
- }
- else
- {
- if ( qRect.top() > kapp->style()->subControlRect(
- QStyle::CC_ScrollBar, &aStyleOption,
- QStyle::SC_ScrollBarSubPage ).top() )
- {
- qRect.setTop( 0 );
- qRect.setBottom( 0 );
- }
- }
-
- qRect.translate( qBoundingRect.left(), qBoundingRect.top() );
-
- bReturn = TRUE;
- break;
-
- case PART_BUTTON_RIGHT:
- case PART_BUTTON_DOWN:
- qRect = kapp->style()->subControlRect(
- QStyle::CC_ScrollBar, &aStyleOption, QStyle::SC_ScrollBarAddLine );
-
- // Workaround for Platinum and 3 button style scroll bars.
- // It makes the right/down button bigger.
- if ( part == PART_BUTTON_RIGHT )
- qRect.setLeft( kapp->style()->subControlRect(
- QStyle::CC_ScrollBar, &aStyleOption,
- QStyle::SC_ScrollBarAddPage ).right() + 1 );
- else
- qRect.setTop( kapp->style()->subControlRect(
- QStyle::CC_ScrollBar, &aStyleOption,
- QStyle::SC_ScrollBarAddPage ).bottom() + 1 );
-
- qRect.translate( qBoundingRect.left(), qBoundingRect.top() );
-
- bReturn = TRUE;
- break;
- }
- break;
- }
-#endif
-
if (retVal)
{
// Bounding region
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index d569d5c40e79..6f45c4413a3f 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -346,16 +346,6 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
arguments.getConstArray()[0] >>= m_xDisplayConnection;
if( ! m_xDisplayConnection.is() )
{
-#if 0
- // for the time being try to live without XDisplayConnection
- // for the sake of clipboard service
- // clipboard service should be initialized with a XDisplayConnection
- // in the future
- Exception aExc;
- aExc.Message = OUString::createFromAscii( "initialize me with a valid XDisplayConnection" );
- aExc.Context = static_cast< OWeakObject* >(this);
- throw aExc;
-#endif
}
else
m_xDisplayConnection->addEventHandler( Any(), this, ~0 );
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index bc5164461aac..1de85367c39d 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -786,14 +786,6 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
// set family name
if( pUpdate->m_nFamilyName != nFamilyName )
{
-#if 0 // fontconfig prefers nameid=16 for the family name which is all fine
- // but Writer suffers from #i79878#
- // the only reasonable workaround for now is to use the classic nameid=1
- pUpdate->m_aAliases.remove( pUpdate->m_nFamilyName );
- pUpdate->m_aAliases.push_back( pUpdate->m_nFamilyName );
- pUpdate->m_aAliases.remove( nFamilyName );
- pUpdate->m_nFamilyName = nFamilyName;
-#endif
}
if( eWeightRes == FcResultMatch )
pUpdate->m_eWeight = convertWeight(weight);
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index e64740e367ed..cb43af0351c6 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -1198,15 +1198,6 @@ PrintFontManager::PrintFontManager() :
m_aUnicodeToAdobecode.insert( ::std::hash_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) );
m_aAdobecodeToUnicode.insert( ::std::hash_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) );
}
-#if 0
- m_aUnicodeToAdobename[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].pAdobename;
- m_aAdobenameToUnicode[ aAdobeCodes[i].pAdobename ] = aAdobeCodes[i].aUnicode;
- if( aAdobeCodes[i].aAdobeStandardCode )
- {
- m_aUnicodeToAdobecode[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].aAdobeStandardCode;
- m_aAdobecodeToUnicode[ aAdobeCodes[i].aAdobeStandardCode ] = aAdobeCodes[i].aUnicode;
- }
-#endif
}
}
diff --git a/vcl/unx/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx
index 5eabcd592071..6732f4253332 100644
--- a/vcl/unx/source/fontmanager/parseAFM.cxx
+++ b/vcl/unx/source/fontmanager/parseAFM.cxx
@@ -549,95 +549,6 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
} /* parseGlobals */
-#if 0
-/************************* initializeArray ************************/
-
-/* Unmapped character codes are (at Adobe Systems) assigned the
- * width of the space character (if one exists) else they get the
- * value of 250 ems. This function initializes all entries in the
- * char widths array to have this value. Then any mapped character
- * codes will be replaced with the width of the appropriate character
- * when parsing the character metric section.
-
- * This function parses the Character Metrics Section looking
- * for a space character (by comparing character names). If found,
- * the width of the space character will be used to initialize the
- * values in the array of character widths.
- *
- * Before returning, the position of the read/write pointer of the
- * FileInputStream is reset to be where it was upon entering this function.
- */
-
-static int initializeArray( FileInputStream* fp, register int* cwi)
-{
- bool cont = true, found = false;
- unsigned int opos = fp->tell();
- int code = 0, width = 0, i = 0, error = 0, tokenlen;
- register char *keyword;
-
- while (cont)
- {
- keyword = token(fp,tokenlen);
- if (keyword == NULL)
- {
- error = earlyEOF;
- break; /* get out of loop */
- }
- switch(recognize(keyword,tokenlen))
- {
- case COMMENT:
- keyword = linetoken(fp);
- break;
- case CODE:
- if ((keyword = token(fp,tokenlen)) != NULL)
- code = atoi(keyword);
- break;
- case CODEHEX:
- if ((keyword = token(fp,tokenlen)) != NULL)
- sscanf(keyword,"<%x>", &code);
- break;
- case XWIDTH:
- if ((keyword = token(fp,tokenlen)) != NULL)
- width = atoi(keyword);
- break;
- case X0WIDTH:
- (void) token(fp,tokenlen);
- break;
- case CHARNAME:
- if ((keyword = token(fp,tokenlen)) != NULL)
- if (MATCH(keyword, Space))
- {
- cont = false;
- found = true;
- }
- break;
- case ENDCHARMETRICS:
- cont = false;
- break;
- case ENDFONTMETRICS:
- cont = false;
- error = normalEOF;
- break;
- case NOPE:
- default:
- error = parseError;
- break;
- } /* switch */
- } /* while */
-
- if (!found)
- width = 250;
-
- for (i = 0; i < 256; ++i)
- cwi[i] = width;
-
- fp->seek(opos);
-
- return(error);
-
-} /* initializeArray */
-#endif
-
/************************* parseCharWidths **************************/
/* This function is called by "parseFile". It will parse the AFM file
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index 9ed242c5dd2f..0c4650a88dcc 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -721,14 +721,6 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
#ifdef ENABLE_GRAPHITE
else if (pGrLayout)
{
- #if 0 // HACK: disabled for now due to #i114460#, see #desc12 there
- // TODO: get rid of glyph->string mapping altogether for printing
- // TODO: fix GraphiteServerFontLayout's returned aCharPosAry
- // TODO: fix PrinterGfx's caching?
- pText = pGrLayout->getTextPtr();
- nMinCharPos = pGrLayout->getMinCharPos();
- nMaxCharPos = pGrLayout->getMaxCharPos();
- #endif
}
#endif
}
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 525359c891a2..9ad8854c59dd 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -225,22 +225,10 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, int nScreen )
void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen )
{
-#if 0 // TODO: use SetDrawable() instead
- m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
- hDrawable_ = aTarget;
- m_nScreen = nScreen;
- SetXRenderFormat( NULL );
- if( m_aRenderPicture )
- XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0;
- nPenPixel_ = GetPixel( nPenColor_ );
- nTextPixel_ = GetPixel( nTextColor_ );
- nBrushPixel_ = GetPixel( nBrushColor_ );
-#else
m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
m_nScreen = nScreen;
SetDrawable( aTarget, nScreen );
-#endif
bWindow_ = TRUE;
m_pFrame = pFrame;
@@ -1052,13 +1040,6 @@ XID X11SalGraphics::GetXRenderPicture()
m_aRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL );
}
-#if 0
- // setup clipping so the callers don't have to do it themselves
- // TODO: avoid clipping if already set correctly
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
- else
-#endif
{
// reset clip region
// TODO: avoid clip reset if already done
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
index cfb1b058639d..30094d46be52 100644
--- a/vcl/unx/source/gdi/salgdi2.cxx
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -49,21 +49,6 @@
// -=-= debugging =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#if 0
-
-static void sal_PrintImage( char *s, XImage*p )
-{
- fprintf( stderr, "%s %d %d %d\n", s, p->depth, p->width, p->height );
- int nW = Min( 64, p->width*p->bits_per_pixel >> 3 );
- for( int i = 0; i < Min( 16, p->height ); i++ )
- {
- for( int j = 0; j < nW; j++ )
- fprintf( stderr, "%02X", (UINT8)p->data[i*p->bytes_per_line+j] );
- fprintf( stderr, "\n" );
- }
-}
-
-#endif // DBG_UTIL
// -----------------------------------------------------------------------------
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index d3c3ff7381fd..fa0f695dee8b 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -1499,10 +1499,6 @@ ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const
{
// TODO: get ImplFontCharMap directly from fonts
if( !mpServerFont[0] )
-#if 0 // RIP XLFD fonts
- if( mXFont[0] )
- // TODO?: nPairCount = mXFont[0]->GetFontCodeRanges( NULL );
-#endif
return NULL;
CmapResult aCmapResult;
diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx
index d1d2147f5231..e383e779aad8 100644
--- a/vcl/unx/source/gdi/xfont.cxx
+++ b/vcl/unx/source/gdi/xfont.cxx
@@ -385,22 +385,6 @@ QueryCharWidth16( Display* pDisplay, XLIB_Font nFontID, sal_MultiByte nChar,
return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth;
}
-#if 0
-// currently not used
-static sal_Size
-QueryCharWidth8( XFontStruct* pXFontStruct, sal_Char nChar,
- sal_Size nDefaultWidth )
-{
- int nDirection, nFontAscent, nFontDescent;
- XCharStruct aBoundingBox;
-
- XTextExtents( pXFontStruct, &nChar, 1,
- &nDirection, &nFontAscent, &nFontDescent, &aBoundingBox );
-
- return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth;
-}
-#endif
-
sal_Size
ExtendedFontStruct::GetDefaultWidth()
{
diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx
index 816d5d58ee28..533836e2e5d0 100644
--- a/vcl/unx/source/gdi/xrender_peer.cxx
+++ b/vcl/unx/source/gdi/xrender_peer.cxx
@@ -166,16 +166,10 @@ void XRenderPeer::InitRenderLib()
int,int,unsigned int,unsigned int))pFunc;
pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeTrapezoids" );
-#if 0 // not having trapezoid support is supported
- if( !pFunc ) return;
-#endif
mpXRenderCompositeTrapezoids = (void(*)(Display*,int,Picture,Picture,
const XRenderPictFormat*,int,int,const XTrapezoid*,int))pFunc;
pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddTraps" );
-#if 0 // not having trapezoid support is supported
- if( !pFunc ) return;
-#endif
mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const _XTrap*,int))pFunc;
#endif // XRENDER_LINK
diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx
index 8c8fb0cebc61..f9417bb2be95 100644
--- a/vcl/unx/source/gdi/xrender_peer.hxx
+++ b/vcl/unx/source/gdi/xrender_peer.hxx
@@ -278,16 +278,6 @@ inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const
// #108209# disabled because of crash potential,
// the glyph leak is not too bad because they will
// be cleaned up when the glyphset is released
-#if 0 // TODO: reenable when it works without problems
- if( mnRenderVersion >= 0x05 )
- {
-#ifdef XRENDER_LINK
- XRenderFreeGlyphs( mpDisplay, aGS, &nGlyphId, 1 );
-#else
- (*mpXRenderFreeGlyphs)( mpDisplay, aGS, &nGlyphId, 1 );
-#endif
- }
-#endif
}
inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst,