[Libreoffice-commits] .: 28 commits - bridges/source configure.in idl/inc idl/source l10ntools/inc l10ntools/source libexttextcat/libexttextcat-3.1.1.patch libexttextcat/makefile.mk libexttextcat/prj ooo.lst.in sc/source sd/qa set_soenv.in svl/inc svtools/inc svtools/qa svtools/source svx/inc svx/source tools/bootstrp unotools/inc unotools/source unusedcode.easy vcl/generic vcl/inc vcl/Library_vclplug_gen.mk vcl/source vcl/unx writerfilter/inc writerfilter/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Nov 14 00:52:52 PST 2011


 bridges/source/cpp_uno/gcc3_linux_arm/except.cxx     |   53 -
 bridges/source/cpp_uno/gcc3_linux_arm/share.hxx      |    4 
 configure.in                                         |   63 +-
 dev/null                                             |binary
 idl/inc/lex.hxx                                      |    6 
 idl/source/cmptools/lex.cxx                          |    6 
 idl/source/prj/command.cxx                           |    8 
 l10ntools/inc/xmlparse.hxx                           |    4 
 l10ntools/source/xmlparse.cxx                        |   36 -
 libexttextcat/libexttextcat-3.1.1.patch              |   22 
 libexttextcat/makefile.mk                            |    7 
 libexttextcat/prj/d.lst                              |    2 
 ooo.lst.in                                           |    2 
 sc/source/core/data/cell2.cxx                        |   11 
 sc/source/core/data/dptabres.cxx                     |    8 
 sc/source/filter/excel/xestring.cxx                  |   10 
 sc/source/filter/qpro/qproform.cxx                   |    8 
 sc/source/ui/Accessibility/DrawModelBroadcaster.cxx  |   10 
 sc/source/ui/dbgui/scuiasciiopt.cxx                  |    5 
 sc/source/ui/docshell/impex.cxx                      |    1 
 sd/qa/unit/data/ppt/fail/CVE-2010-0033-1.ppt         |binary
 sd/qa/unit/data/ppt/pass/CVE-2006-3655-1.ppt         |binary
 sd/qa/unit/data/ppt/pass/CVE-2006-3656-1.ppt         |binary
 sd/qa/unit/data/ppt/pass/CVE-2006-3660-1.ppt         |binary
 sd/qa/unit/data/ppt/pass/CVE-2006-5296-1.ppt         |binary
 set_soenv.in                                         |    1 
 svl/inc/svl/svstdarr.hxx                             |    1 
 svtools/inc/svtools/ivctrl.hxx                       |   21 
 svtools/qa/cppunit/data/wmf/fail/CVE-2005-4560-1.wmf |binary
 svtools/source/contnr/imivctl.hxx                    |   11 
 svtools/source/contnr/imivctl1.cxx                   |  218 -------
 svtools/source/contnr/ivctrl.cxx                     |   69 --
 svx/inc/svx/dlgctrl.hxx                              |    1 
 svx/inc/svx/gallery.hxx                              |    2 
 svx/inc/svx/paraprev.hxx                             |    2 
 svx/source/dialog/dlgctrl.cxx                        |    7 
 svx/source/dialog/paraprev.cxx                       |    9 
 svx/source/gallery2/galexpl.cxx                      |   22 
 tools/bootstrp/cppdep.cxx                            |   12 
 unotools/inc/unotools/configitem.hxx                 |    3 
 unotools/source/config/configitem.cxx                |   17 
 unusedcode.easy                                      |   33 -
 vcl/Library_vclplug_gen.mk                           |    5 
 vcl/generic/glyphs/glyphcache.cxx                    |   17 
 vcl/inc/generic/glyphcache.hxx                       |    1 
 vcl/inc/outdev.h                                     |    1 
 vcl/inc/vcl/graphictools.hxx                         |    7 
 vcl/inc/vcl/rendergraphic.hxx                        |    4 
 vcl/source/gdi/outdev3.cxx                           |   17 
 vcl/source/gdi/rendergraphic.cxx                     |   12 
 vcl/unx/generic/gdi/gcach_xpeer.cxx                  |  569 -------------------
 vcl/unx/generic/gdi/gcach_xpeer.hxx                  |   46 -
 vcl/unx/generic/gdi/salgdi2.cxx                      |   26 
 vcl/unx/generic/gdi/xrender_peer.cxx                 |  177 -----
 vcl/unx/generic/gdi/xrender_peer.hxx                 |  158 -----
 writerfilter/inc/resourcemodel/TagLogger.hxx         |    2 
 writerfilter/source/resourcemodel/TagLogger.cxx      |   19 
 57 files changed, 148 insertions(+), 1608 deletions(-)

New commits:
commit 74500c21a462ed6555bcbdc2a68cbc632ac68329
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 23:17:06 2011 +0000

    ByteString->rtl::OString

diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index c3d28f1..293c4d6 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -146,11 +146,11 @@ class SvTokenStream
 
     void        InitCtor();
 
-    ByteString          aBufStr;
+    rtl::OString aBufStr;
     int             GetNextChar();
     int             GetFastNextChar()
                     {
-                        return aBufStr.GetChar((sal_uInt16)nBufPos++);
+                        return aBufStr[nBufPos++];
                     }
 
     void            FillTokenList();
@@ -171,7 +171,7 @@ class SvTokenStream
                             sal_uInt16 n = 0;
                             nColumn = 0;
                             while( n < nBufPos )
-                                nColumn += aBufStr.GetChar(n++) == '\t' ? nTabSize : 1;
+                                nColumn += aBufStr[n++] == '\t' ? nTabSize : 1;
                         }
                     }
 public:
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index fcb33fa..582170e 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -165,7 +165,7 @@ void SvTokenStream::FillTokenList()
 int SvTokenStream::GetNextChar()
 {
     int nChar;
-    if( (int)aBufStr.Len() < nBufPos )
+    if( aBufStr.getLength() < nBufPos )
     {
         if( rInStream.ReadLine( aBufStr ) )
         {
@@ -175,13 +175,13 @@ int SvTokenStream::GetNextChar()
         }
         else
         {
-            aBufStr.Erase();
+            aBufStr = rtl::OString();
             nColumn = 0;
             nBufPos = 0;
             return '\0';
         }
     }
-    nChar = aBufStr.GetChar( (sal_uInt16)nBufPos++ );
+    nChar = aBufStr[nBufPos++];
     nColumn += nChar == '\t' ? nTabSize : 1;
     return nChar;
 }
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index b40e139..26cf5c0 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -196,20 +196,20 @@ static sal_Bool ResponseFile( StringList * pList, int argc, char ** argv )
             if( aStm.GetError() != SVSTREAM_OK )
                 return sal_False;
 
-            ByteString aStr;
+            rtl::OString aStr;
             while( aStm.ReadLine( aStr ) )
             {
                 sal_uInt16 n = 0;
                 sal_uInt16 nPos = 1;
                 while( n != nPos )
                 {
-                    while( aStr.GetChar(n) && isspace( aStr.GetChar(n) ) )
+                    while( aStr[n] && isspace( aStr[n] ) )
                         n++;
                     nPos = n;
-                    while( aStr.GetChar(n) && !isspace( aStr.GetChar(n) ) )
+                    while( aStr[n] && !isspace( aStr[n] ) )
                         n++;
                     if( n != nPos )
-                        pList->push_back( new String( String::CreateFromAscii( aStr.Copy( nPos, n - nPos ).GetBuffer() ) ) );
+                        pList->push_back( new String( rtl::OStringToOUString(aStr.copy(nPos, n - nPos), RTL_TEXTENCODING_ASCII_US) ) );
                 }
             }
         }
diff --git a/tools/bootstrp/cppdep.cxx b/tools/bootstrp/cppdep.cxx
index 9829cee..44e0844 100644
--- a/tools/bootstrp/cppdep.cxx
+++ b/tools/bootstrp/cppdep.cxx
@@ -96,18 +96,20 @@ sal_Bool CppDep::Search( ByteString aFileName )
     sal_Bool bRet = sal_False;
 
     SvFileStream aFile;
-    ByteString aReadLine;
+    rtl::OString aReadLine;
 
     UniString suFileName(aFileName, osl_getThreadTextEncoding());
 
     aFile.Open( suFileName, STREAM_READ );
     while ( aFile.ReadLine( aReadLine ))
     {
-        sal_uInt16 nPos = aReadLine.Search( "include" );
-        if ( nPos != STRING_NOTFOUND  )
+        using comphelper::string::indexOfL;
+        sal_Int32 nPos = indexOfL(aReadLine,
+            RTL_CONSTASCII_STRINGPARAM("include"));
+        if ( nPos != -1 )
         {
 #ifdef DEBUG_VERBOSE
-            fprintf( stderr, "found : %d %s\n", nPos, aReadLine.GetBuffer() );
+            fprintf( stderr, "found : %d %s\n", nPos, aReadLine.getStr() );
 #endif
             ByteString aResult = IsIncludeStatement( aReadLine );
 #ifdef DEBUG_VERBOSE
@@ -127,7 +129,7 @@ sal_Bool CppDep::Search( ByteString aFileName )
                         bFound = sal_True;
                 }
 #ifdef DEBUG_VERBOSE
-                fprintf( stderr, "not in list : %d %s\n", nPos, aReadLine.GetBuffer() );
+                fprintf( stderr, "not in list : %d %s\n", nPos, aReadLine.getStr() );
 #endif
                 if ( !bFound )
                 {
commit ca48cd4c6061650a407358575369c66df72b767e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 22:42:24 2011 +0000

    bump libexttextcat to 3.2.0

diff --git a/libexttextcat/libexttextcat-3.1.1.patch b/libexttextcat/libexttextcat-3.1.1.patch
deleted file mode 100644
index a6aaa27..0000000
--- a/libexttextcat/libexttextcat-3.1.1.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- misc/libexttextcat-3.1.1/src/makefile.mk	2011-09-30 13:04:43.000000000 +0200
-+++ misc/build/libexttextcat-3.1.1/src/makefile.mk	2011-10-05 07:18:03.509285358 +0200
-@@ -27,8 +27,8 @@
- 
- PRJ = ..$/..$/..$/..$/..
- 
--PRJNAME = libtextcat
--TARGET  = libtextcat
-+PRJNAME = libexttextcat
-+TARGET  = libexttextcat
- CFLAGSCALL=gsd
- 
- USE_DEFFILE=TRUE
-@@ -65,7 +65,7 @@
- DEF1NAME=       $(SHL1TARGET)
- DEF1DEPN=$(MISC)$/$(SHL1TARGET).flt
- 
--SHL1VERSIONMAP= libtextcat.map
-+SHL1VERSIONMAP= libexttextcat.map
- 
- # --- Targets ------------------------------------------------------
- 
diff --git a/libexttextcat/makefile.mk b/libexttextcat/makefile.mk
index c25b0d9..e4b8fc5 100644
--- a/libexttextcat/makefile.mk
+++ b/libexttextcat/makefile.mk
@@ -44,10 +44,9 @@ all:
 
 # See http://cgit.freedesktop.org/libreoffice/libexttextcat/ for upstream
 # sources, far better to commit your changes in there
-TARFILE_NAME=libexttextcat-3.1.1
-TARFILE_MD5=33f01c57f92eb6f940b59015c35a4eea
-TARFILE_ROOTDIR=libexttextcat-3.1.1
-PATCH_FILES=libexttextcat-3.1.1.patch
+TARFILE_NAME=libexttextcat-3.2.0
+TARFILE_MD5=e1c178b18f130b40494561f02bc1a948
+TARFILE_ROOTDIR=libexttextcat-3.2.0
 
 .IF "$(GUI)"=="UNX"
 #relative to CONFIGURE_DIR
diff --git a/libexttextcat/prj/d.lst b/libexttextcat/prj/d.lst
index 5414254..daabc3c 100644
--- a/libexttextcat/prj/d.lst
+++ b/libexttextcat/prj/d.lst
@@ -4,7 +4,7 @@
 ..\%__SRC%\bin\l*.dll         %_DEST%\bin\*.dll
 
 mkdir: %_DEST%\inc\external\libexttextcat
-..\%__SRC%\misc\build\libexttextcat-3.1.1\src\*.h %_DEST%\inc\external\libexttextcat\*.h
+..\%__SRC%\misc\build\libexttextcat-3.2.0\src\*.h %_DEST%\inc\external\libexttextcat\*.h
 
 # data for language guessing
 ..\%COMMON_OUTDIR%\bin\*.zip %COMMON_DEST%\pck\*.zip
diff --git a/ooo.lst.in b/ooo.lst.in
index 740327d..7c65411 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -3,7 +3,7 @@ http://dev-www.libreoffice.org/src
 63ddc5116488985e820075e65fbe6aa4-openssl-0.9.8o.tar.gz
 09357cc74975b01714e00c5899ea1881-pixman-0.12.0.tar.gz
 0b49ede71c21c0599b0cc19b353a6cb3-README_apache-commons.txt
-33f01c57f92eb6f940b59015c35a4eea-libexttextcat-3.1.1.tar.bz2
+e1c178b18f130b40494561f02bc1a948-libexttextcat-3.2.0.tar.bz2
 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
 1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
 18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
commit f13bebfa302da81217e03609b7374a41b60eb759
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 21:07:42 2011 +0000

    strip down includes and forward declarations

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index d10597b..ebab207 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -29,20 +29,13 @@
 #ifndef _SV_GCACH_XPEER_HXX
 #define _SV_GCACH_XPEER_HXX
 
-#include <tools/prex.h>
-#include <X11/extensions/Xrender.h>
-#include <tools/postx.h>
-
 #include "generic/glyphcache.hxx"
 
-class SalDisplay;
-
-class X11GlyphPeer
-: public GlyphCachePeer
+class X11GlyphPeer : public GlyphCachePeer
 {
 public:
-                        X11GlyphPeer();
-    virtual            ~X11GlyphPeer();
+    X11GlyphPeer();
+    virtual ~X11GlyphPeer();
 };
 
 class X11GlyphCache : public GlyphCache
diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx
index 57c8d3e..784ff89 100644
--- a/vcl/unx/generic/gdi/xrender_peer.hxx
+++ b/vcl/unx/generic/gdi/xrender_peer.hxx
@@ -42,7 +42,7 @@ class XRenderPeer
 public:
     static XRenderPeer& GetInstance();
 
-protected:
+private:
                         XRenderPeer();
     void                InitRenderLib();
 
commit 62bb49f9d567227b6616e61fb00a55234b92a84e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 21:02:11 2011 +0000

    we can use default implementations of these

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 8da1101..ea485a0 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -73,19 +73,6 @@ X11GlyphPeer::~X11GlyphPeer()
     }
 }
 
-// ---------------------------------------------------------------------------
-
-void X11GlyphPeer::RemovingFont( ServerFont& )
-{
-}
-
-// ---------------------------------------------------------------------------
-
-// notification to clean up GlyphPeer resources for this glyph
-void X11GlyphPeer::RemovingGlyph( ServerFont&, GlyphData&, int /*nGlyphIndex*/ )
-{
-}
-
 // ===========================================================================
 
 X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 0efd0fa..d10597b 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -43,10 +43,6 @@ class X11GlyphPeer
 public:
                         X11GlyphPeer();
     virtual            ~X11GlyphPeer();
-
-protected:
-    virtual void        RemovingFont( ServerFont& );
-    virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
 };
 
 class X11GlyphCache : public GlyphCache
commit 1c064d1460fbf84a2fc6c2cdc7824937735a4312
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 21:00:16 2011 +0000

    I don't see that any of this makes sense anymore

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 09acf20..8da1101 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -43,19 +43,7 @@
 // ===========================================================================
 
 X11GlyphPeer::X11GlyphPeer()
-:   mpDisplay( GetGenericData()->GetSalDisplay()->GetDisplay() )
-,   mnMaxScreens(0)
-,   mnDefaultScreen(0)
 {
-    if( !mpDisplay )
-        return;
-
-    SalDisplay& rSalDisplay = *GetGenericData()->GetSalDisplay();
-    mpDisplay    = rSalDisplay.GetDisplay();
-    mnMaxScreens = rSalDisplay.GetScreenCount();
-    if( mnMaxScreens > MAX_GCACH_SCREENS )
-        mnMaxScreens = MAX_GCACH_SCREENS;
-    mnDefaultScreen = rSalDisplay.GetDefaultScreenNumber();
 }
 
 // ---------------------------------------------------------------------------
@@ -65,10 +53,13 @@ X11GlyphPeer::~X11GlyphPeer()
     if( !ImplGetSVData() )
         return;
 
+    //Why do this here, move into dtor/shutdown of display?
     SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
     Display* const pX11Disp = pSalDisp->GetDisplay();
+    int nMaxScreens = pSalDisp->GetScreenCount();
     XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
-    for( int i = 0; i < mnMaxScreens; i++ )
+
+    for( int i = 0; i < nMaxScreens; i++ )
     {
         SalDisplay::RenderEntryMap& rMap = pSalDisp->GetRenderEntries( i );
         for( SalDisplay::RenderEntryMap::iterator it = rMap.begin(); it != rMap.end(); ++it )
@@ -82,85 +73,17 @@ X11GlyphPeer::~X11GlyphPeer()
     }
 }
 
-// ===========================================================================
-
-enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP };
-static const Glyph NO_GLYPHID = 0;
-static RawBitmap* const NO_RAWBMP = NULL;
-static const Pixmap NO_PIXMAP = ~0;
-
 // ---------------------------------------------------------------------------
 
-void X11GlyphPeer::RemovingFont( ServerFont& rServerFont )
+void X11GlyphPeer::RemovingFont( ServerFont& )
 {
-    void* pFontExt = rServerFont.GetExtPointer();
-    switch( rServerFont.GetExtInfo() )
-    {
-        case INFO_PIXMAP:
-        case INFO_RAWBMP:
-            // nothing to do
-            break;
-
-        case INFO_XRENDER:
-            XRenderPeer::GetInstance().FreeGlyphSet( (GlyphSet)pFontExt );
-            break;
-    }
-
-    rServerFont.SetExtended( INFO_EMPTY, NULL );
 }
 
 // ---------------------------------------------------------------------------
 
 // notification to clean up GlyphPeer resources for this glyph
-void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, int /*nGlyphIndex*/ )
+void X11GlyphPeer::RemovingGlyph( ServerFont&, GlyphData&, int /*nGlyphIndex*/ )
 {
-    // nothing to do if the GlyphPeer hasn't allocated resources for the glyph
-    if( rGlyphData.ExtDataRef().meInfo == INFO_EMPTY )
-        return;
-
-    const GlyphMetric& rGM = rGlyphData.GetMetric();
-    const int nWidth  = rGM.GetSize().Width();
-    const int nHeight = rGM.GetSize().Height();
-
-    void* pGlyphExt = rGlyphData.ExtDataRef().mpData;
-    switch( rGlyphData.ExtDataRef().meInfo )
-    {
-        case INFO_PIXMAP:
-            {
-                Pixmap aPixmap = (Pixmap)pGlyphExt;
-                if( aPixmap != None )
-                {
-                    XFreePixmap( mpDisplay, aPixmap );
-                    mnBytesUsed -= nHeight * ((nWidth + 7) >> 3);
-                }
-            }
-            break;
-
-        case INFO_RAWBMP:
-            {
-                RawBitmap* pRawBitmap = (RawBitmap*)pGlyphExt;
-                if( pRawBitmap != NULL )
-                {
-                    mnBytesUsed -= pRawBitmap->mnScanlineSize * pRawBitmap->mnHeight;
-                    mnBytesUsed -= sizeof(RawBitmap);
-                    delete pRawBitmap;
-                }
-            }
-            break;
-
-        case INFO_XRENDER:
-            {
-                // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
-                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
-                mnBytesUsed -= nHeight * ((nWidth + 3) & ~3);
-            }
-            break;
-    }
-
-    if( mnBytesUsed < 0 )   // TODO: eliminate nBytesUsed calc mismatch
-        mnBytesUsed = 0;
-
-    rGlyphData.ExtDataRef() = ExtGlyphData();
 }
 
 // ===========================================================================
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 42032d4..0efd0fa 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -47,14 +47,6 @@ public:
 protected:
     virtual void        RemovingFont( ServerFont& );
     virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
-
-private:
-    Display*            mpDisplay;
-
-    // thirty-two screens should be enough for everyone...
-    static const int MAX_GCACH_SCREENS = 32;
-    int                 mnMaxScreens;
-    int                 mnDefaultScreen;
 };
 
 class X11GlyphCache : public GlyphCache
commit 5670184ea887276643f4921e456a242455cbdc32
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 20:38:25 2011 +0000

    no way to construct a MultiScreenGlyph now

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 6f9bd69..09acf20 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -42,18 +42,6 @@
 
 // ===========================================================================
 
-// all glyph specific data needed by the XGlyphPeer is quite trivial
-// with one exception: if multiple screens are involved and non-antialiased
-// glyph rendering is active, then we need screen specific pixmaps
-struct MultiScreenGlyph
-{
-    const RawBitmap*    mpRawBitmap;
-    Glyph               maXRGlyphId;
-    Pixmap              maPixmaps[1];   // [mnMaxScreens]
-};
-
-// ===========================================================================
-
 X11GlyphPeer::X11GlyphPeer()
 :   mpDisplay( GetGenericData()->GetSalDisplay()->GetDisplay() )
 ,   mnMaxScreens(0)
@@ -96,7 +84,7 @@ X11GlyphPeer::~X11GlyphPeer()
 
 // ===========================================================================
 
-enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP, INFO_MULTISCREEN };
+enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP };
 static const Glyph NO_GLYPHID = 0;
 static RawBitmap* const NO_RAWBMP = NULL;
 static const Pixmap NO_PIXMAP = ~0;
@@ -112,9 +100,6 @@ void X11GlyphPeer::RemovingFont( ServerFont& rServerFont )
         case INFO_RAWBMP:
             // nothing to do
             break;
-        case INFO_MULTISCREEN:
-            // cannot happen...
-            break;
 
         case INFO_XRENDER:
             XRenderPeer::GetInstance().FreeGlyphSet( (GlyphSet)pFontExt );
@@ -151,25 +136,6 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph
             }
             break;
 
-        case INFO_MULTISCREEN:
-            {
-                MultiScreenGlyph* pMSGlyph = reinterpret_cast<MultiScreenGlyph*>(pGlyphExt);
-                for( int i = 0; i < mnMaxScreens; ++i)
-                {
-                    if( pMSGlyph->maPixmaps[i] == NO_PIXMAP )
-                        continue;
-                    if( pMSGlyph->maPixmaps[i] == None )
-                        continue;
-                    XFreePixmap( mpDisplay, pMSGlyph->maPixmaps[i] );
-                    mnBytesUsed -= nHeight * ((nWidth + 7) >> 3);
-                }
-                delete pMSGlyph->mpRawBitmap;
-                // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
-                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
-                delete[] pMSGlyph; // it was allocated with new char[]
-            }
-            break;
-
         case INFO_RAWBMP:
             {
                 RawBitmap* pRawBitmap = (RawBitmap*)pGlyphExt;
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 2418356..42032d4 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -36,7 +36,6 @@
 #include "generic/glyphcache.hxx"
 
 class SalDisplay;
-struct MultiScreenGlyph;
 
 class X11GlyphPeer
 : public GlyphCachePeer
commit 74730d4ace1cf603575b052698e6de36b50e189b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 20:29:02 2011 +0000

    callcatcher: remove freshly unused methods

diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 42dddf9..39adb96 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -413,23 +413,6 @@ void ServerFont::GarbageCollect( long nMinLruIndex )
     }
 }
 
-bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
-{
-    if (!mbCollectedZW)
-    {
-        mnZWJ = GetGlyphIndex( 0x200D );
-        mnZWNJ = GetGlyphIndex( 0x200C );
-        mbCollectedZW = true;
-    }
-
-    if( !nGlyphIndex ) // don't hide the NotDef glyph
-        return false;
-    if( (nGlyphIndex == mnZWNJ) || (nGlyphIndex == mnZWJ) )
-        return true;
-
-    return false;
-}
-
 // =======================================================================
 
 ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 6ed1cb8..7d46ff7 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -224,7 +224,6 @@ public:
     int                 FixupGlyphIndex( int nGlyphIndex, sal_UCS4 ) const;
     bool                GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const;
     bool                GetAntialiasAdvice( void ) const;
-    bool                        IsGlyphInvisible( int nGlyphIndex );
     bool                GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
     bool                GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
 
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 460ea72..6f9bd69 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -58,7 +58,6 @@ X11GlyphPeer::X11GlyphPeer()
 :   mpDisplay( GetGenericData()->GetSalDisplay()->GetDisplay() )
 ,   mnMaxScreens(0)
 ,   mnDefaultScreen(0)
-,   mnExtByteCount(0)
 {
     if( !mpDisplay )
         return;
@@ -68,10 +67,6 @@ X11GlyphPeer::X11GlyphPeer()
     mnMaxScreens = rSalDisplay.GetScreenCount();
     if( mnMaxScreens > MAX_GCACH_SCREENS )
         mnMaxScreens = MAX_GCACH_SCREENS;
-    // if specific glyph data has to be kept for many screens
-    // then prepare the allocation of MultiScreenGlyph objects
-    if( mnMaxScreens > 1 )
-        mnExtByteCount = sizeof(MultiScreenGlyph) + sizeof(Pixmap) * (mnMaxScreens - 1);
     mnDefaultScreen = rSalDisplay.GetDefaultScreenNumber();
 }
 
@@ -108,40 +103,6 @@ static const Pixmap NO_PIXMAP = ~0;
 
 // ---------------------------------------------------------------------------
 
-MultiScreenGlyph* X11GlyphPeer::PrepareForMultiscreen( ExtGlyphData& rEGD ) const
-{
-    // prepare to store screen specific pixmaps
-    MultiScreenGlyph* pMSGlyph = (MultiScreenGlyph*)new char[ mnExtByteCount ];
-
-    // init the glyph formats
-    pMSGlyph->mpRawBitmap = NO_RAWBMP;
-    pMSGlyph->maXRGlyphId = NO_GLYPHID;
-    for( int i = 0; i < mnMaxScreens; ++i )
-        pMSGlyph->maPixmaps[i] = NO_PIXMAP;
-    // reuse already available glyph formats
-    if( rEGD.meInfo == INFO_XRENDER )
-        pMSGlyph->maXRGlyphId = reinterpret_cast<Glyph>(rEGD.mpData);
-    else if( rEGD.meInfo == INFO_RAWBMP )
-        pMSGlyph->mpRawBitmap = reinterpret_cast<RawBitmap*>(rEGD.mpData);
-    else if( rEGD.meInfo == INFO_PIXMAP )
-    {
-        Pixmap aPixmap = reinterpret_cast<Pixmap>(rEGD.mpData);
-        if( aPixmap != None )
-            // pixmap for the default screen is available
-            pMSGlyph->maPixmaps[ mnDefaultScreen ] = aPixmap;
-        else // empty pixmap for all screens is available
-            for( int i = 0; i < mnMaxScreens; ++i )
-                pMSGlyph->maPixmaps[ i ] = None;
-    }
-    // enable use of multiscreen glyph
-    rEGD.mpData = (void*)pMSGlyph;
-    rEGD.meInfo = INFO_MULTISCREEN;
-
-    return pMSGlyph;
- }
-
-// ---------------------------------------------------------------------------
-
 void X11GlyphPeer::RemovingFont( ServerFont& rServerFont )
 {
     void* pFontExt = rServerFont.GetExtPointer();
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 6a00a4a..2418356 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -49,8 +49,6 @@ protected:
     virtual void        RemovingFont( ServerFont& );
     virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
 
-    MultiScreenGlyph*   PrepareForMultiscreen( ExtGlyphData& ) const;
-
 private:
     Display*            mpDisplay;
 
@@ -58,7 +56,6 @@ private:
     static const int MAX_GCACH_SCREENS = 32;
     int                 mnMaxScreens;
     int                 mnDefaultScreen;
-    int                 mnExtByteCount;
 };
 
 class X11GlyphCache : public GlyphCache
commit 734fd917e38a087071ef1b31527846079ab29981
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 18:29:52 2011 +0000

    no consumers of maRawBitmap remain

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 80992fe..460ea72 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -60,8 +60,6 @@ X11GlyphPeer::X11GlyphPeer()
 ,   mnDefaultScreen(0)
 ,   mnExtByteCount(0)
 {
-    maRawBitmap.mnAllocated = 0;
-    maRawBitmap.mpBits = NULL;
     if( !mpDisplay )
         return;
 
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 762221e..6a00a4a 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -59,7 +59,6 @@ private:
     int                 mnMaxScreens;
     int                 mnDefaultScreen;
     int                 mnExtByteCount;
-    RawBitmap           maRawBitmap;
 };
 
 class X11GlyphCache : public GlyphCache
commit bc69731a300109d02471c675214724f09da2614c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 18:28:27 2011 +0000

    the only thing calling GetRawBitmap is itself

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 8592ff9..80992fe 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -144,45 +144,6 @@ MultiScreenGlyph* X11GlyphPeer::PrepareForMultiscreen( ExtGlyphData& rEGD ) cons
 
 // ---------------------------------------------------------------------------
 
-const RawBitmap* X11GlyphPeer::GetRawBitmap( const GlyphData& rGD ) const
-{
-    const RawBitmap* pRawBitmap = NO_RAWBMP;
-    const ExtGlyphData& rEGD = rGD.ExtDataRef();
-    if( rEGD.meInfo == INFO_RAWBMP )
-        pRawBitmap = reinterpret_cast<RawBitmap*>(rEGD.mpData);
-    else if( rEGD.meInfo == INFO_MULTISCREEN )
-        pRawBitmap = reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->mpRawBitmap;
-    return pRawBitmap;
-}
-
-// ---------------------------------------------------------------------------
-
-void X11GlyphPeer::SetRawBitmap( GlyphData& rGD, const RawBitmap* pRawBitmap ) const
-{
-    ExtGlyphData& rEGD = rGD.ExtDataRef();
-    switch( rEGD.meInfo )
-    {
-        case INFO_EMPTY:
-            rEGD.meInfo = INFO_RAWBMP;
-            // fall through
-        case INFO_RAWBMP:
-            rEGD.mpData = (void*)pRawBitmap;
-            break;
-        case INFO_PIXMAP:
-        case INFO_XRENDER:
-            PrepareForMultiscreen( rEGD );
-            // fall through
-        case INFO_MULTISCREEN:
-            reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->mpRawBitmap = pRawBitmap;
-            break;
-        default:
-            // cannot happen...
-            break;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
 void X11GlyphPeer::RemovingFont( ServerFont& rServerFont )
 {
     void* pFontExt = rServerFont.GetExtPointer();
@@ -277,40 +238,6 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph
     rGlyphData.ExtDataRef() = ExtGlyphData();
 }
 
-// ---------------------------------------------------------------------------
-
-const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
-    int nGlyphIndex )
-{
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
-        return NO_RAWBMP;
-
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
-
-    const RawBitmap* pRawBitmap = GetRawBitmap( rGlyphData );
-    if( pRawBitmap == NO_RAWBMP )
-    {
-        RawBitmap* pNewBitmap = new RawBitmap;
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, *pNewBitmap ) )
-        {
-            pRawBitmap = pNewBitmap;
-            mnBytesUsed += pNewBitmap->mnScanlineSize * pNewBitmap->mnHeight;
-            mnBytesUsed += sizeof(pNewBitmap);
-        }
-        else
-        {
-            delete pNewBitmap;
-            // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
-                pRawBitmap = GetRawBitmap( rServerFont, 0 );
-        }
-
-        SetRawBitmap( rGlyphData, pRawBitmap );
-    }
-
-    return pRawBitmap;
-}
-
 // ===========================================================================
 
 X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 1da8a90..762221e 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -45,15 +45,11 @@ public:
                         X11GlyphPeer();
     virtual            ~X11GlyphPeer();
 
-    const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
-
 protected:
     virtual void        RemovingFont( ServerFont& );
     virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
 
     MultiScreenGlyph*   PrepareForMultiscreen( ExtGlyphData& ) const;
-    void                SetRawBitmap( GlyphData&, const RawBitmap* ) const;
-    const RawBitmap*    GetRawBitmap( const GlyphData& ) const;
 
 private:
     Display*            mpDisplay;
commit 45ed9cca5b70f5785c288ffcb58d06f777fcda71
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 17:45:24 2011 +0000

    the only thing calling GetPixmap is itself

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 318d34d..8592ff9 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -183,44 +183,6 @@ void X11GlyphPeer::SetRawBitmap( GlyphData& rGD, const RawBitmap* pRawBitmap ) c
 
 // ---------------------------------------------------------------------------
 
-Pixmap X11GlyphPeer::GetPixmap( const GlyphData& rGD, int nScreen ) const
-{
-    Pixmap aPixmap = NO_PIXMAP;
-    const ExtGlyphData& rEGD = rGD.ExtDataRef();
-    if( (rEGD.meInfo == INFO_PIXMAP) && (nScreen == mnDefaultScreen) )
-        aPixmap = (Pixmap)rEGD.mpData;
-    else if( rEGD.meInfo == INFO_MULTISCREEN )
-        aPixmap = (Pixmap)(reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->maPixmaps[nScreen]);
-    return aPixmap;
-}
-
-// ---------------------------------------------------------------------------
-
-void X11GlyphPeer::SetPixmap( GlyphData& rGD, Pixmap aPixmap, int nScreen ) const
-{
-    if( aPixmap == NO_PIXMAP )
-        aPixmap = None;
-
-    ExtGlyphData& rEGD = rGD.ExtDataRef();
-    if( (rEGD.meInfo == INFO_EMPTY) && (nScreen == mnDefaultScreen) )
-    {
-        rEGD.meInfo = INFO_PIXMAP;
-        rEGD.mpData = (void*)aPixmap;
-    }
-    else
-    {
-        MultiScreenGlyph* pMSGlyph;
-        if( rEGD.meInfo == INFO_MULTISCREEN )
-            pMSGlyph = reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData);
-        else
-            pMSGlyph = PrepareForMultiscreen( rEGD );
-
-        pMSGlyph->maPixmaps[ nScreen ] = aPixmap;
-    }
-}
-
-// ---------------------------------------------------------------------------
-
 void X11GlyphPeer::RemovingFont( ServerFont& rServerFont )
 {
     void* pFontExt = rServerFont.GetExtPointer();
@@ -317,111 +279,6 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph
 
 // ---------------------------------------------------------------------------
 
-Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen )
-{
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
-        return None;
-
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
-    Pixmap aPixmap = GetPixmap( rGlyphData, nReqScreen );
-    if( aPixmap == NO_PIXMAP )
-    {
-        aPixmap = None;
-        if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) )
-        {
-            // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163
-            sal_uLong nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
-            nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth );
-
-            rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) );
-            rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset );
-
-            const sal_uLong nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize;
-            if( nBytes > 0 )
-            {
-                // conversion table LSB<->MSB (for XCreatePixmapFromData)
-                static const unsigned char lsb2msb[256] =
-                {
-                    0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
-                    0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
-                    0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
-                    0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
-                    0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
-                    0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
-                    0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
-                    0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
-                    0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
-                    0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
-                    0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
-                    0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
-                    0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
-                    0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
-                    0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
-                    0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
-                    0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
-                    0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
-                    0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
-                    0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
-                    0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
-                    0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
-                    0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
-                    0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
-                    0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
-                    0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
-                    0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
-                    0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
-                    0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
-                    0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
-                    0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
-                    0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
-                };
-
-                unsigned char* pTemp = maRawBitmap.mpBits;
-                for( int i = nBytes; --i >= 0; ++pTemp )
-                    *pTemp = lsb2msb[ *pTemp ];
-
-                // often a glyph pixmap is only needed on the default screen
-                // => optimize for this common case
-                int nMinScreen = 0;
-                int nEndScreen = mnMaxScreens;
-                if( nReqScreen == mnDefaultScreen ) {
-                    nMinScreen = mnDefaultScreen;
-                    nEndScreen = mnDefaultScreen + 1;
-                }
-                // prepare glyph pixmaps for the different screens
-                for( int i = nMinScreen; i < nEndScreen; ++i )
-                {
-                    // don't bother if the pixmap is already there
-                    if( GetPixmap( rGlyphData, i ) != NO_PIXMAP )
-                        continue;
-                    // create the glyph pixmap
-                    Pixmap aScreenPixmap = XCreatePixmapFromBitmapData( mpDisplay,
-                        RootWindow( mpDisplay, i ), (char*)maRawBitmap.mpBits,
-                        nPixmapWidth, maRawBitmap.mnHeight, 1, 0, 1 );
-                    // and cache it as glyph specific data
-                    SetPixmap( rGlyphData, aScreenPixmap, i );
-                    mnBytesUsed += nBytes;
-                    if( i == nReqScreen )
-                        aPixmap = aScreenPixmap;
-                }
-            }
-        }
-        else
-        {
-            // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
-                aPixmap = GetPixmap( rServerFont, 0, nReqScreen );
-
-            if( aPixmap == NO_PIXMAP )
-                aPixmap = None;
-        }
-    }
-
-    return aPixmap;
-}
-
-// ---------------------------------------------------------------------------
-
 const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
     int nGlyphIndex )
 {
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 8618e83..1da8a90 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -45,7 +45,6 @@ public:
                         X11GlyphPeer();
     virtual            ~X11GlyphPeer();
 
-    Pixmap              GetPixmap( ServerFont&, int nGlyphIndex, int nScreen );
     const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
 
 protected:
@@ -54,9 +53,7 @@ protected:
 
     MultiScreenGlyph*   PrepareForMultiscreen( ExtGlyphData& ) const;
     void                SetRawBitmap( GlyphData&, const RawBitmap* ) const;
-    void                SetPixmap( GlyphData&, Pixmap, int nScreen ) const;
     const RawBitmap*    GetRawBitmap( const GlyphData& ) const;
-    Pixmap              GetPixmap( const GlyphData&, int nScreen ) const;
 
 private:
     Display*            mpDisplay;
diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index b0e721a..729a0b7 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -38,8 +38,6 @@
 #include <unx/saldata.hxx>
 #include <unx/saldisp.hxx>
 
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
 #include <xrender_peer.hxx>
 
 using namespace rtl;
commit 4ef21de5138532b92a23eb17517130780386a67c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 14:15:02 2011 +0000

    drop ScopedPic

diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index bac2f1b..05c575a 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -894,7 +894,6 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
         rTR.mnSrcX, rTR.mnSrcY, 0, 0,
         rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight );
 
-    // TODO: used ScopedPic
     rPeer.FreePicture( aAlphaPic );
     XFreePixmap(pXDisplay, aAlphaPM);
     rPeer.FreePicture( aSrcPic );
diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx
index 75b6e28..57c8d3e 100644
--- a/vcl/unx/generic/gdi/xrender_peer.hxx
+++ b/vcl/unx/generic/gdi/xrender_peer.hxx
@@ -85,24 +85,6 @@ public:
 
 //=====================================================================
 
-class ScopedPic
-{
-public:
-               ScopedPic( XRenderPeer& rPeer, Picture& rPic );
-               ~ScopedPic();
-    Picture&   Get();
-
-private:
-    XRenderPeer& mrRenderPeer;
-    Picture      maPicture;
-
-private: // prevent copy and assignmet
-           ScopedPic( const ScopedPic& );
-    void   operator=( const ScopedPic& );
-};
-
-//=====================================================================
-
 inline XRenderPictFormat* XRenderPeer::GetStandardFormatA8() const
 {
     return mpStandardFormatA8;
@@ -216,24 +198,6 @@ inline void XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs,
 
 //=====================================================================
 
-inline ScopedPic::ScopedPic( XRenderPeer& rPeer, Picture& rPic )
-:   mrRenderPeer( rPeer)
-,   maPicture( rPic )
-{}
-
-inline ScopedPic::~ScopedPic()
-{
-    if( maPicture )
-        mrRenderPeer.FreePicture( maPicture );
-}
-
-inline Picture& ScopedPic::Get()
-{
-    return maPicture;
-}
-
-//=====================================================================
-
 inline XRenderColor GetXRenderColor( const SalColor& rSalColor, double fTransparency = 0.0 )
 {
     XRenderColor aRetVal;
commit 4faf8c24ecb1fd3cbc6c3a510bfa448c8cf6fc47
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 13:23:44 2011 +0000

    InitRenderText only queries, and ret is unused

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 7027916..318d34d 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -75,8 +75,6 @@ X11GlyphPeer::X11GlyphPeer()
     if( mnMaxScreens > 1 )
         mnExtByteCount = sizeof(MultiScreenGlyph) + sizeof(Pixmap) * (mnMaxScreens - 1);
     mnDefaultScreen = rSalDisplay.GetDefaultScreenNumber();
-
-    InitAntialiasing();
 }
 
 // ---------------------------------------------------------------------------
@@ -103,25 +101,6 @@ X11GlyphPeer::~X11GlyphPeer()
     }
 }
 
-// ---------------------------------------------------------------------------
-
-void X11GlyphPeer::InitAntialiasing()
-{
-    int nEnvAntiAlias = 0;
-    const char* pEnvAntiAlias = getenv( "SAL_ANTIALIAS_DISABLE" );
-    if( pEnvAntiAlias )
-    {
-        nEnvAntiAlias = atoi( pEnvAntiAlias );
-        if( nEnvAntiAlias == 0 )
-            return;
-    }
-
-    // enable XRENDER accelerated aliasing on screens that support it
-    // unless it explicitly disabled by an environment variable
-    if( (nEnvAntiAlias & 2) == 0 )
-        XRenderPeer::GetInstance().InitRenderText();
-}
-
 // ===========================================================================
 
 enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP, INFO_MULTISCREEN };
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 8b20eb6..8618e83 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -49,8 +49,6 @@ public:
     const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
 
 protected:
-    void                InitAntialiasing();
-
     virtual void        RemovingFont( ServerFont& );
     virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
 
diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index 3b00dfa..b0e721a 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -74,36 +74,4 @@ void XRenderPeer::InitRenderLib()
     mpStandardFormatA8 = FindPictureFormat( PictFormatAlphaMask|PictFormatDepth, aPictFormat );
 }
 
-// ---------------------------------------------------------------------------
-
-// return mask of screens capable of XRENDER text
-sal_uInt32 XRenderPeer::InitRenderText()
-{
-    if( !mpStandardFormatA8 )
-        return 0;
-
-    // and the visual must be supported too on at least one screen
-    sal_uInt32 nRetMask = 0;
-    SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
-    const int nScreenCount = pSalDisp->GetScreenCount();
-    XRenderPictFormat* pVisualFormat = NULL;
-    int nMaxDepth = 0;
-    for( int nScreen = 0; nScreen < nScreenCount; ++nScreen )
-    {
-        Visual* pXVisual = pSalDisp->GetVisual( nScreen ).GetVisual();
-        pVisualFormat = FindVisualFormat( pXVisual );
-        if( pVisualFormat != NULL )
-        {
-            int nVDepth = pSalDisp->GetVisual( nScreen ).GetDepth();
-            if( nVDepth > nMaxDepth )
-                nMaxDepth = nVDepth;
-            nRetMask |= 1U << nScreen;
-        }
-    }
-
-    return nRetMask;
-}
-
-// ---------------------------------------------------------------------------
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx
index 2c095da..75b6e28 100644
--- a/vcl/unx/generic/gdi/xrender_peer.hxx
+++ b/vcl/unx/generic/gdi/xrender_peer.hxx
@@ -42,8 +42,6 @@ class XRenderPeer
 public:
     static XRenderPeer& GetInstance();
 
-    sal_uInt32          InitRenderText();
-
 protected:
                         XRenderPeer();
     void                InitRenderLib();
commit cca9ca6290d2b1e1c909c12ee4818683e3808007
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 13:20:01 2011 +0000

    mnUsingXRender unnecessary now

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 6c49db9..7027916 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -59,7 +59,6 @@ X11GlyphPeer::X11GlyphPeer()
 ,   mnMaxScreens(0)
 ,   mnDefaultScreen(0)
 ,   mnExtByteCount(0)
-,   mnUsingXRender(0)
 {
     maRawBitmap.mnAllocated = 0;
     maRawBitmap.mpBits = NULL;
@@ -117,12 +116,10 @@ void X11GlyphPeer::InitAntialiasing()
             return;
     }
 
-    mnUsingXRender = 0;
-
     // enable XRENDER accelerated aliasing on screens that support it
     // unless it explicitly disabled by an environment variable
     if( (nEnvAntiAlias & 2) == 0 )
-        mnUsingXRender = XRenderPeer::GetInstance().InitRenderText();
+        XRenderPeer::GetInstance().InitRenderText();
 }
 
 // ===========================================================================
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index c3e3bb9..8b20eb6 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -69,7 +69,6 @@ private:
     int                 mnDefaultScreen;
     int                 mnExtByteCount;
     RawBitmap           maRawBitmap;
-    sal_uInt32          mnUsingXRender;
 };
 
 class X11GlyphCache : public GlyphCache
commit f2adfadfa850510e87df7f200ef79e84fdb65f39
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 11:38:10 2011 +0000

    mnForcedAA no longer connected to anything, skip setting it

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index ebcecda..6c49db9 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -59,7 +59,6 @@ X11GlyphPeer::X11GlyphPeer()
 ,   mnMaxScreens(0)
 ,   mnDefaultScreen(0)
 ,   mnExtByteCount(0)
-,   mnForcedAA(0)
 ,   mnUsingXRender(0)
 {
     maRawBitmap.mnAllocated = 0;
@@ -119,38 +118,11 @@ void X11GlyphPeer::InitAntialiasing()
     }
 
     mnUsingXRender = 0;
-    mnForcedAA = 0;
 
     // enable XRENDER accelerated aliasing on screens that support it
     // unless it explicitly disabled by an environment variable
     if( (nEnvAntiAlias & 2) == 0 )
         mnUsingXRender = XRenderPeer::GetInstance().InitRenderText();
-
-    // else enable client side antialiasing for these screens
-    // unless it is explicitly disabled by an environment variable
-    if( (nEnvAntiAlias & 1) != 0 )
-        return;
-
-    // enable client side antialiasing for screen visuals that are suitable
-    // mnForcedAA is a bitmask of screens enabled for client side antialiasing
-    mnForcedAA = (~(~0U << mnMaxScreens)) ^ mnUsingXRender;
-    SalDisplay& rSalDisplay = *GetGenericData()->GetSalDisplay();
-    for( int nScreen = 0; nScreen < mnMaxScreens; ++nScreen)
-    {
-        Visual* pVisual = rSalDisplay.GetVisual( nScreen ).GetVisual();
-        XVisualInfo aXVisualInfo;
-        aXVisualInfo.visualid = pVisual->visualid;
-        int nVisuals = 0;
-        XVisualInfo* pXVisualInfo = XGetVisualInfo( mpDisplay, VisualIDMask, &aXVisualInfo, &nVisuals );
-        for( int i = nVisuals; --i >= 0; )
-        {
-            if( ((pXVisualInfo[i].c_class==PseudoColor) || (pXVisualInfo[i].depth<24))
-            && ((pXVisualInfo[i].c_class>GrayScale) || (pXVisualInfo[i].depth!=8) ) )
-                mnForcedAA &= ~(1U << nScreen);
-        }
-        if( pXVisualInfo != NULL )
-            XFree( pXVisualInfo );
-    }
 }
 
 // ===========================================================================
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 0de3d1e..c3e3bb9 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -69,7 +69,6 @@ private:
     int                 mnDefaultScreen;
     int                 mnExtByteCount;
     RawBitmap           maRawBitmap;
-    sal_uInt32          mnForcedAA;
     sal_uInt32          mnUsingXRender;
 };
 
commit c3ee916c2936d559d8027780f70d57663d8aa511
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 11:34:29 2011 +0000

    I think we can now drop checks for minor of 1 when current is 11

diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index 2b26120..bac2f1b 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -790,10 +790,6 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
     if( rTR.mnDestHeight!= rTR.mnSrcHeight )
         return false;
 
-    XRenderPeer& rPeer = XRenderPeer::GetInstance();
-    if( rPeer.GetVersion() < 0x02 )
-        return false;
-
     // create destination picture
     Picture aDstPic = GetXRenderPicture();
     if( !aDstPic )
@@ -824,6 +820,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
     // create source picture
     // TODO: use scoped picture
     Visual* pSrcXVisual = rSalVis.GetVisual();
+    XRenderPeer& rPeer = XRenderPeer::GetInstance();
     XRenderPictFormat* pSrcVisFmt = rPeer.FindVisualFormat( pSrcXVisual );
     if( !pSrcVisFmt )
         return false;
@@ -917,10 +914,6 @@ bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
     if( m_pVDev && m_pVDev->GetDepth() < 8 )
         return false;
 
-    XRenderPeer& rPeer = XRenderPeer::GetInstance();
-    if( rPeer.GetVersion() < 0x02 ) // TODO: replace with better test
-        return false;
-
     Picture aDstPic = GetXRenderPicture();
     if( !aDstPic )
         return false;
@@ -928,6 +921,7 @@ bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
     const double fTransparency = (100 - nTransparency) * (1.0/100);
     const XRenderColor aRenderColor = GetXRenderColor( nBrushColor_ , fTransparency);
 
+    XRenderPeer& rPeer = XRenderPeer::GetInstance();
     rPeer.FillRectangle( PictOpOver,
                          aDstPic,
                          &aRenderColor,
@@ -1131,16 +1125,13 @@ bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const
     case OutDevSupport_B2DDraw:
         {
             XRenderPeer& rPeer = XRenderPeer::GetInstance();
-            if( rPeer.GetVersion() >= 0x02 )
-            {
-                const SalDisplay* pSalDisp = GetDisplay();
-                const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen );
+            const SalDisplay* pSalDisp = GetDisplay();
+            const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen );
 
-                Visual* pDstXVisual = rSalVis.GetVisual();
-                XRenderPictFormat* pDstVisFmt = rPeer.FindVisualFormat( pDstXVisual );
-                if( pDstVisFmt )
-                    bRet = true;
-            }
+            Visual* pDstXVisual = rSalVis.GetVisual();
+            XRenderPictFormat* pDstVisFmt = rPeer.FindVisualFormat( pDstXVisual );
+            if( pDstVisFmt )
+                bRet = true;
         }
         break;
     default: break;
diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index a46b444..3b00dfa 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -49,7 +49,6 @@ using namespace rtl;
 XRenderPeer::XRenderPeer()
     : mpDisplay( GetGenericData()->GetSalDisplay()->GetDisplay() )
     , mpStandardFormatA8( NULL )
-    , mnRenderVersion( 0 )
 {
     InitRenderLib();
 }
@@ -70,10 +69,6 @@ void XRenderPeer::InitRenderLib()
     // needed to initialize libXrender internals
     XRenderQueryExtension( mpDisplay, &nDummy, &nDummy );
 
-    int nMajor, nMinor;
-    XRenderQueryVersion( mpDisplay, &nMajor, &nMinor );
-    mnRenderVersion = 16*nMajor + nMinor;
-
     // the 8bit alpha mask format must be there
     XRenderPictFormat aPictFormat={0,0,8,{0,0,0,0,0,0,0,0xFF},0};
     mpStandardFormatA8 = FindPictureFormat( PictFormatAlphaMask|PictFormatDepth, aPictFormat );
@@ -84,15 +79,6 @@ void XRenderPeer::InitRenderLib()
 // return mask of screens capable of XRENDER text
 sal_uInt32 XRenderPeer::InitRenderText()
 {
-    if( mnRenderVersion < 0x01 )
-        return 0;
-
-    // #93033# disable XRENDER for old RENDER versions if XINERAMA is present
-    int nDummy;
-    if( XQueryExtension( mpDisplay, "XINERAMA", &nDummy, &nDummy, &nDummy ) )
-        if( mnRenderVersion < 0x02 )
-            return 0;
-
     if( !mpStandardFormatA8 )
         return 0;
 
diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx
index be45fee..2c095da 100644
--- a/vcl/unx/generic/gdi/xrender_peer.hxx
+++ b/vcl/unx/generic/gdi/xrender_peer.hxx
@@ -41,7 +41,6 @@ class XRenderPeer
 {
 public:
     static XRenderPeer& GetInstance();
-    int                 GetVersion() const;
 
     sal_uInt32          InitRenderText();
 
@@ -51,7 +50,6 @@ protected:
 
     Display*            mpDisplay;
     XRenderPictFormat*  mpStandardFormatA8;
-    int                 mnRenderVersion;
 
 public:
     XRenderPictFormat* GetStandardFormatA8() const;
@@ -107,11 +105,6 @@ private: // prevent copy and assignmet
 
 //=====================================================================
 
-inline int XRenderPeer::GetVersion() const
-{
-    return mnRenderVersion;
-}
-
 inline XRenderPictFormat* XRenderPeer::GetStandardFormatA8() const
 {
     return mpStandardFormatA8;
commit 945f1127e20bd32b159da2c4f205cc7bbce3c682
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Nov 13 11:26:57 2011 +0000

    ditch unused direct XRender text rendering calls

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index f014732..ebcecda 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -196,44 +196,6 @@ MultiScreenGlyph* X11GlyphPeer::PrepareForMultiscreen( ExtGlyphData& rEGD ) cons
 
 // ---------------------------------------------------------------------------
 
-Glyph X11GlyphPeer::GetRenderGlyph( const GlyphData& rGD ) const
-{
-    Glyph aGlyphId = NO_GLYPHID;
-    const ExtGlyphData& rEGD = rGD.ExtDataRef();
-    if( rEGD.meInfo == INFO_XRENDER )
-        aGlyphId = reinterpret_cast<Glyph>(rEGD.mpData);
-    else if( rEGD.meInfo == INFO_MULTISCREEN )
-        aGlyphId = reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->maXRGlyphId;
-    return aGlyphId;
-}
-
-// ---------------------------------------------------------------------------
-
-void X11GlyphPeer::SetRenderGlyph( GlyphData& rGD, Glyph aGlyphId ) const
-{
-    ExtGlyphData& rEGD = rGD.ExtDataRef();
-    switch( rEGD.meInfo )
-    {
-        case INFO_EMPTY:
-            rEGD.meInfo = INFO_XRENDER;
-            // fall through
-        case INFO_XRENDER:
-            rEGD.mpData = reinterpret_cast<void*>(aGlyphId);
-            break;
-        case INFO_PIXMAP:
-        case INFO_RAWBMP:
-            PrepareForMultiscreen( rEGD );
-            // fall through
-        case INFO_MULTISCREEN:
-            reinterpret_cast<MultiScreenGlyph*>(rEGD.mpData)->maXRGlyphId = aGlyphId;
-            break;
-        default:
-            break;  // cannot happen...
-    }
-}
-
-// ---------------------------------------------------------------------------
-
 const RawBitmap* X11GlyphPeer::GetRawBitmap( const GlyphData& rGD ) const
 {
     const RawBitmap* pRawBitmap = NO_RAWBMP;
@@ -407,46 +369,6 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph
 
 // ---------------------------------------------------------------------------
 
-GlyphSet X11GlyphPeer::GetGlyphSet( ServerFont& rServerFont, int nScreen )
-{
-    if( (nScreen >= 0) && ((mnUsingXRender >> nScreen) & 1) == 0 )
-        return 0;
-
-    GlyphSet aGlyphSet;
-
-    switch( rServerFont.GetExtInfo() )
-    {
-        case INFO_XRENDER:
-            aGlyphSet = (GlyphSet)rServerFont.GetExtPointer();
-            break;
-
-        case INFO_EMPTY:
-            {
-                // antialiasing for reasonable font heights only
-                // => prevents crashes caused by X11 requests >= 256k
-                // => prefer readablity of hinted glyphs at small sizes
-                // => prefer "grey clouds" to "black clouds" at very small sizes
-                int nHeight = rServerFont.GetFontSelData().mnHeight;
-                if( nHeight<250 && rServerFont.GetAntialiasAdvice() )
-                {
-                    aGlyphSet = XRenderPeer::GetInstance().CreateGlyphSet();
-                    rServerFont.SetExtended( INFO_XRENDER, (void*)aGlyphSet );
-                }
-                else
-                    aGlyphSet = 0;
-            }
-            break;
-
-        default:
-            aGlyphSet = 0;
-            break;
-    }
-
-    return aGlyphSet;
-}
-
-// ---------------------------------------------------------------------------
-
 Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen )
 {
     if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index a426e3b..0de3d1e 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -48,8 +48,6 @@ public:
     Pixmap              GetPixmap( ServerFont&, int nGlyphIndex, int nScreen );
     const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
 
-    GlyphSet            GetGlyphSet( ServerFont&, int nScreen );
-
 protected:
     void                InitAntialiasing();
 
@@ -57,10 +55,8 @@ protected:
     virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
 
     MultiScreenGlyph*   PrepareForMultiscreen( ExtGlyphData& ) const;
-    void                SetRenderGlyph( GlyphData&, Glyph ) const;
     void                SetRawBitmap( GlyphData&, const RawBitmap* ) const;
     void                SetPixmap( GlyphData&, Pixmap, int nScreen ) const;
-    Glyph               GetRenderGlyph( const GlyphData& ) const;
     const RawBitmap*    GetRawBitmap( const GlyphData& ) const;
     Pixmap              GetPixmap( const GlyphData&, int nScreen ) const;
 
commit 5e083eb18b4e83078cb73a35862113e754e3267f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 12 22:59:20 2011 +0000

    post cairo text-rendering GetGlyphId only called by GetGlyphId

diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index f68314b..f014732 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -584,56 +584,6 @@ const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
     return pRawBitmap;
 }
 
-// ---------------------------------------------------------------------------
-
-Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
-{
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
-        return NO_GLYPHID;
-
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
-
-    Glyph aGlyphId = GetRenderGlyph( rGlyphData );
-    if( aGlyphId == NO_GLYPHID )
-    {
-        // prepare GlyphInfo and Bitmap
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) )
-        {
-            XGlyphInfo aGlyphInfo;
-            aGlyphInfo.width    = maRawBitmap.mnWidth;
-            aGlyphInfo.height   = maRawBitmap.mnHeight;
-            aGlyphInfo.x        = -maRawBitmap.mnXOffset;
-            aGlyphInfo.y        = -maRawBitmap.mnYOffset;
-
-            rGlyphData.SetSize( Size( maRawBitmap.mnWidth, maRawBitmap.mnHeight ) );
-            rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset );
-
-            const GlyphMetric& rGM = rGlyphData.GetMetric();
-            aGlyphInfo.xOff     = +rGM.GetDelta().X();
-            aGlyphInfo.yOff     = +rGM.GetDelta().Y();
-
-            // upload glyph bitmap to server
-            GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 );
-
-            aGlyphId = nGlyphIndex & 0x00FFFFFF;
-            const sal_uLong nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
-            XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId,
-                aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes );
-            mnBytesUsed += nBytes;
-        }
-        else
-        {
-            // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
-                aGlyphId = GetGlyphId( rServerFont, 0 );
-        }
-
-        SetRenderGlyph( rGlyphData, aGlyphId );
-    }
-
-    return aGlyphId;
-}
-
 // ===========================================================================
 
 X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index df5f516..a426e3b 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -49,7 +49,6 @@ public:
     const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
 
     GlyphSet            GetGlyphSet( ServerFont&, int nScreen );
-    Glyph               GetGlyphId( ServerFont&, int nGlyphIndex );
 
 protected:
     void                InitAntialiasing();
commit 988ff97e6f2fe115168a999decc36beb3e0df542
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 12 22:54:45 2011 +0000

    ditch hackaround for 15bit displays and XFree < 4.2.0

diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index 185cc30..a46b444 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -115,11 +115,6 @@ sal_uInt32 XRenderPeer::InitRenderText()
         }
     }
 
-    // #97763# disable XRENDER on <15bit displays for XFree<=4.2.0
-    if( mnRenderVersion <= 0x02 )
-        if( nMaxDepth < 15 )
-            nRetMask = 0;
-
     return nRetMask;
 }
 
commit f163867ff49526f39bb329c698b74899c4b5c0e3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 12 22:43:15 2011 +0000

    Link with libXrender instead of dynamically open it
    
    Let's not mess around dlopening it and leaving gaps
    in the support whereby we currently require it to
    exist either linked or "dlopenable+display supports it"
    with dlopenable + display doesn't support it leaves
    a crashing gap where there are no appropiate checks
    for that case.

diff --git a/configure.in b/configure.in
index 9292e14..9a5fb68 100644
--- a/configure.in
+++ b/configure.in
@@ -64,6 +64,7 @@ dnl These values may be checked and reset later.
 dnl ===================================================================
 #defaults unless the os test overrides this:
 test_randr=yes
+test_xrender=yes
 test_cups=yes
 test_fontconfig=yes
 
@@ -109,6 +110,7 @@ linux-gnu*|k*bsd*-gnu*)
 
 gnu)
     test_randr=no
+    test_xrender=no
     _os=GNU
      ;;
 
@@ -131,6 +133,7 @@ cygwin*|interix*|mingw32*)
 
     test_cups=no
     test_randr=no
+    test_xrender=no
     test_freetype=no
     test_fontconfig=no
     _os=WINNT
@@ -157,6 +160,7 @@ cygwin*|interix*|mingw32*)
 darwin*) # Mac OS X or iOS
     test_gtk=yes
     test_randr=no
+    test_xrender=no
     test_freetype=no
     test_fontconfig=no
     if test "$host_cpu" = "arm"; then
@@ -242,6 +246,7 @@ linux-androideabi*)
     test_kde=no
     test_kde4=no
     test_randr=no
+    test_xrender=no
     test_unix_quickstarter=no
     _os=Android
 
@@ -680,11 +685,6 @@ AC_ARG_ENABLE(rpath,
         [Disable the use of relative paths in shared libraries.]),
 ,)
 
-AC_ARG_ENABLE(xrender-link,
-    AS_HELP_STRING([--enable-xrender-link],
-        [Link with libXrender instead of dynamically open it.]),
-,)
-
 AC_ARG_ENABLE(randr,
     AS_HELP_STRING([--disable-randr],
         [Disable RandR support in the vcl project.]),
@@ -911,7 +911,7 @@ AC_ARG_WITH(system-headers,
     AS_HELP_STRING([--with-system-headers],
         [Use headers already on system -- enables all --with-system-* flags for
          external packages whose headers are the only entities used i.e.
-         boost/vigra/odbc/sane/xrender-header(s).]),
+         boost/vigra/odbc/sane-header(s).]),
 ,)
 
 AC_ARG_WITH(system-jars,
@@ -1233,10 +1233,12 @@ AC_ARG_WITH(system-sane,
         [Use sane.h already on system.]),,
     [with_system_sane="$with_system_headers"])
 
-AC_ARG_WITH(system-xrender-headers,
-    AS_HELP_STRING([--with-system-xrender-headers],
-        [Use XRender headers already on system.]),
-    [with_system_xrender_headers="$with_system_headers"])
+AC_ARG_WITH(system-xextensions-headers,
+    AS_HELP_STRING([--with-system-xextensions-headers],
+        [To build without system X11 extensions headers, use
+         --without-system-xextensions-headers. This is possibly
+         useful on legacy unix systems which ship with the libs
+         but without the headers.]))
 
 AC_ARG_WITH(system-mesa-headers,
     AS_HELP_STRING([--with-system-mesa-headers],
@@ -6238,36 +6240,31 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os"
      [#include <X11/Intrinsic.h>])
 fi
 
+AC_MSG_CHECKING([whether to use internal X11 extensions headers])
+if test "$with_system_xextensions_headers" != "no"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+    BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
+fi
 
 dnl ===================================================================
 dnl Check for system Xrender
 dnl ===================================================================
-AC_MSG_CHECKING([whether to link to Xrender])
-if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
+AC_MSG_CHECKING([whether to use Xrender])
+if test "$test_xrender" = "yes"; then
     AC_MSG_RESULT([yes])
-    XRENDER_LINK=YES
-    with_system_xrender_headers=yes
-else
-    AC_MSG_RESULT([no, dynamically open it])
-    XRENDER_LINK=NO
-fi
-AC_MSG_CHECKING([which Xrender headers to use])
-if test "$with_system_xrender_headers" = "yes"; then
-    AC_MSG_RESULT([external])
-    SYSTEM_XRENDER_HEADERS=YES
-    AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
-      [AC_MSG_ERROR(Xrender not found. install X)], [])
-else
-    AC_MSG_RESULT([internal])
-    SYSTEM_XRENDER_HEADERS=NO
-    BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
-fi
-if test "$XRENDER_LINK" = "YES"; then
     AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
       [AC_MSG_ERROR(libXrender not found or functional)], [])
+    AC_MSG_CHECKING([which Xrender headers to use])
+    if test "$with_system_xextensions_headers" != "no"; then
+        AC_MSG_RESULT([external])
+        AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
+          [AC_MSG_ERROR(Xrender not found. install X)], [])
+    else
+        AC_MSG_RESULT([internal])
+    fi
 fi
-AC_SUBST(SYSTEM_XRENDER_HEADERS)
-AC_SUBST(XRENDER_LINK)
 
 dnl ===================================================================
 dnl Check for XRandr
@@ -8571,7 +8568,7 @@ if test "$with_system_cairo" = "yes"; then
 
     PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
 
-    if test "$with_system_xrender_headers" = "yes"; then
+    if test "$with_system_xextensions_headers" != "no"; then
          AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
          AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <X11/extensions/Xrender.h>
diff --git a/set_soenv.in b/set_soenv.in
index f0cee21..d45d245 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1947,7 +1947,6 @@ ToFile( "LIBXSLT_CFLAGS",    "@LIBXSLT_CFLAGS@",   "e" );
 ToFile( "LIBXSLT_LIBS",      "@LIBXSLT_LIBS@",     "e" );
 ToFile( "XSLTPROC",          "@XSLTPROC@",         "e" );
 ToFile( "SYSTEM_SANE_HEADER","@SYSTEM_SANE_HEADER@","e" );
-ToFile( "SYSTEM_XRENDER_HEADERS","@SYSTEM_XRENDER_HEADERS@","e" );
 ToFile( "SYSTEM_MESA_HEADERS","@SYSTEM_MESA_HEADERS@","e" );
 ToFile( "SYSTEM_CURL",       "@SYSTEM_CURL@",      "e" );
 ToFile( "CURL_CFLAGS",       "@CURL_CFLAGS@",      "e" );
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index a0b1531..9e885aa 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -172,14 +172,9 @@ endif
 endif
 
 ## handle Render linking
-ifeq ($(XRENDER_LINK),YES)
-$(eval $(call gb_Library_add_defs,vclplug_gen,\
-    -DXRENDER_LINK \
-))
 $(eval $(call gb_Library_add_libs,vclplug_gen,\
     $(shell pkg-config --libs xrender) \
 ))
-endif
 
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index 52611e7..185cc30 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -47,27 +47,15 @@ using namespace rtl;
 // ---------------------------------------------------------------------------
 
 XRenderPeer::XRenderPeer()
-:   mpDisplay( GetGenericData()->GetSalDisplay()->GetDisplay() ),
-    mpStandardFormatA8( NULL ),
-    mnRenderVersion( 0 ),
-    mpRenderLib( NULL )
-#ifndef XRENDER_LINK
-,   mpXRenderCompositeTrapezoids( NULL )
-,   mpXRenderAddTraps( NULL )
-#endif // XRENDER_LINK
+    : mpDisplay( GetGenericData()->GetSalDisplay()->GetDisplay() )
+    , mpStandardFormatA8( NULL )
+    , mnRenderVersion( 0 )
 {
     InitRenderLib();
 }
 
 // ---------------------------------------------------------------------------
 
-XRenderPeer::~XRenderPeer()
-{
-    osl_unloadModule( mpRenderLib );
-}
-
-// ---------------------------------------------------------------------------
-
 XRenderPeer& XRenderPeer::GetInstance()
 {
     static XRenderPeer aPeer;
@@ -79,117 +67,11 @@ XRenderPeer& XRenderPeer::GetInstance()
 void XRenderPeer::InitRenderLib()
 {
     int nDummy;
-    if( !XQueryExtension( mpDisplay, "RENDER", &nDummy, &nDummy, &nDummy ) )
-        return;
-
-#ifndef XRENDER_LINK
-    // we don't know if we are running on a system with xrender library
-    // we don't want to install system libraries ourselves
-    // => load them dynamically when they are there
-    const OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.so.1" ));
-    mpRenderLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
-    if( !mpRenderLib ) {
-#ifdef DEBUG
-        fprintf( stderr, "Display can do XRender, but no %s installed.\n"
-            "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(),
-                                                                                    osl_getThreadTextEncoding() ).getStr() );
-#endif
-        return;
-    }
-
-    oslGenericFunction pFunc;
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderQueryExtension" );
-    if( !pFunc ) return;
-    mpXRenderQueryExtension = (Bool(*)(Display*,int*,int*))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderQueryVersion" );
-    if( !pFunc ) return;
-    mpXRenderQueryVersion = (void(*)(Display*,int*,int*))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindVisualFormat" );
-    if( !pFunc ) return;
-    mpXRenderFindVisualFormat = (XRenderPictFormat*(*)(Display*,Visual*))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindStandardFormat" );
-    if( !pFunc ) return;
-    mpXRenderFindStandardFormat = (XRenderPictFormat*(*)(Display*,int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFindFormat" );
-    if( !pFunc ) return;
-    mpXRenderFindFormat = (XRenderPictFormat*(*)(Display*,unsigned long,
-        const XRenderPictFormat*,int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCreateGlyphSet" );
-    if( !pFunc ) return;
-    mpXRenderCreateGlyphSet = (GlyphSet(*)(Display*,const XRenderPictFormat*))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreeGlyphSet" );
-    if( !pFunc ) return;
-    mpXRenderFreeGlyphSet = (void(*)(Display*,GlyphSet))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddGlyphs" );
-    if( !pFunc ) return;
-    mpXRenderAddGlyphs = (void(*)(Display*,GlyphSet,Glyph*,const XGlyphInfo*,
-        int,const char*,int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreeGlyphs" );
-    if( !pFunc ) return;
-    mpXRenderFreeGlyphs = (void(*)(Display*,GlyphSet,Glyph*,int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeString32" );
-    if( !pFunc ) return;
-    mpXRenderCompositeString32 = (void(*)(Display*,int,Picture,Picture,
-        const XRenderPictFormat*,GlyphSet,int,int,int,int,const unsigned*,int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCreatePicture" );
-    if( !pFunc ) return;
-    mpXRenderCreatePicture = (Picture(*)(Display*,Drawable,const XRenderPictFormat*,
-        unsigned long,const XRenderPictureAttributes*))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderChangePicture" );
-    if( !pFunc ) return;
-    mpXRenderChangePicture = (void(*)(Display*,Picture,unsigned long,const XRenderPictureAttributes*))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderSetPictureClipRegion" );
-    if( !pFunc ) return;
-    mpXRenderSetPictureClipRegion = (void(*)(Display*,Picture,XLIB_Region))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFreePicture" );
-    if( !pFunc ) return;
-    mpXRenderFreePicture = (void(*)(Display*,Picture))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderComposite" );
-    if( !pFunc ) return;
-    mpXRenderComposite = (void(*)(Display*,int,Picture,Picture,Picture,
-        int,int,int,int,int,int,unsigned,unsigned))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderFillRectangle" );
-    if( !pFunc ) return;
-    mpXRenderFillRectangle = (void(*)(Display*,int,Picture,const XRenderColor*,
-        int,int,unsigned int,unsigned int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeTrapezoids" );
-    mpXRenderCompositeTrapezoids = (void(*)(Display*,int,Picture,Picture,
-        const XRenderPictFormat*,int,int,const XTrapezoid*,int))pFunc;
-
-    pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddTraps" );
-    mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const _XTrap*,int))pFunc;
-
-#endif // XRENDER_LINK
-
-    // needed to initialize libXrender internals, we already know its there
-#ifdef XRENDER_LINK
+    // needed to initialize libXrender internals
     XRenderQueryExtension( mpDisplay, &nDummy, &nDummy );
-#else
-    (*mpXRenderQueryExtension)( mpDisplay, &nDummy, &nDummy );
-#endif
 
     int nMajor, nMinor;
-#ifdef XRENDER_LINK
     XRenderQueryVersion( mpDisplay, &nMajor, &nMinor );
-#else
-    (*mpXRenderQueryVersion)( mpDisplay, &nMajor, &nMinor );
-#endif
     mnRenderVersion = 16*nMajor + nMinor;
 
     // the 8bit alpha mask format must be there
diff --git a/vcl/unx/generic/gdi/xrender_peer.hxx b/vcl/unx/generic/gdi/xrender_peer.hxx
index f9417bb..be45fee 100644
--- a/vcl/unx/generic/gdi/xrender_peer.hxx
+++ b/vcl/unx/generic/gdi/xrender_peer.hxx
@@ -47,13 +47,11 @@ public:
 
 protected:
                         XRenderPeer();
-                        ~XRenderPeer();
     void                InitRenderLib();
 
     Display*            mpDisplay;
     XRenderPictFormat*  mpStandardFormatA8;
     int                 mnRenderVersion;
-    oslModule           mpRenderLib;
 
 public:
     XRenderPictFormat* GetStandardFormatA8() const;
@@ -85,45 +83,8 @@ public:
     void        CompositeTrapezoids( int nOp, Picture aSrc, Picture aDst,
                     const XRenderPictFormat*, int nXSrc, int nYSrc,
                     const XTrapezoid*, int nCount ) const;
-    bool        AddTraps( Picture aDst, int nXOfs, int nYOfs,
+    void        AddTraps( Picture aDst, int nXOfs, int nYOfs,
                     const _XTrap*, int nCount ) const;
-
-    bool        AreTrapezoidsSupported() const
-#ifdef XRENDER_LINK
-                    { return true; }
-#else
-                    { return mpXRenderCompositeTrapezoids!=NULL; }
-
-private:
-    XRenderPictFormat* (*mpXRenderFindFormat)(Display*,unsigned long,
-        const XRenderPictFormat*,int);
-    XRenderPictFormat* (*mpXRenderFindVisualFormat)(Display*,Visual*);
-    XRenderPictFormat* (*mpXRenderFindStandardFormat)(Display*,int);
-    Bool        (*mpXRenderQueryExtension)(Display*,int*,int*);
-    void        (*mpXRenderQueryVersion)(Display*,int*,int*);
-
-    Picture     (*mpXRenderCreatePicture)(Display*,Drawable, const XRenderPictFormat*,
-                    unsigned long,const XRenderPictureAttributes*);
-    void        (*mpXRenderChangePicture)(Display*,Picture,
-                    unsigned long,const XRenderPictureAttributes*);
-    void        (*mpXRenderSetPictureClipRegion)(Display*,Picture,XLIB_Region);
-    void        (*mpXRenderFreePicture)(Display*,Picture);
-    void        (*mpXRenderComposite)(Display*,int,Picture,Picture,Picture,
-                    int,int,int,int,int,int,unsigned,unsigned);
-
-    GlyphSet    (*mpXRenderCreateGlyphSet)(Display*, const XRenderPictFormat*);
-    void        (*mpXRenderFreeGlyphSet)(Display*,GlyphSet);
-    void        (*mpXRenderAddGlyphs)(Display*,GlyphSet,Glyph*,
-                    const XGlyphInfo*,int,const char*,int);
-    void        (*mpXRenderFreeGlyphs)(Display*,GlyphSet,Glyph*,int);
-    void        (*mpXRenderCompositeString32)(Display*,int,Picture,Picture,
-                    const XRenderPictFormat*,GlyphSet,int,int,int,int,const unsigned*,int);
-    void        (*mpXRenderFillRectangle)(Display*,int,Picture,
-                    const XRenderColor*,int,int,unsigned int,unsigned int);
-    void        (*mpXRenderCompositeTrapezoids)(Display*,int,Picture,Picture,
-                    const XRenderPictFormat*,int,int,const XTrapezoid*,int);
-    void        (*mpXRenderAddTraps)(Display*,Picture,int,int,const _XTrap*,int);
-#endif // XRENDER_LINK
 };
 
 //=====================================================================
@@ -158,63 +119,38 @@ inline XRenderPictFormat* XRenderPeer::GetStandardFormatA8() const
 
 inline XRenderPictFormat* XRenderPeer::FindStandardFormat(int nFormat) const
 {
-#ifdef XRENDER_LINK
     return XRenderFindStandardFormat(mpDisplay, nFormat);
-#else
-    return (*mpXRenderFindStandardFormat)(mpDisplay, nFormat);
-#endif
 }
 
 inline XRenderPictFormat* XRenderPeer::FindVisualFormat( Visual* pVisual ) const
 {
-#ifdef XRENDER_LINK
     return XRenderFindVisualFormat ( mpDisplay, pVisual );
-#else
-    return (*mpXRenderFindVisualFormat)( mpDisplay, pVisual );
-#endif
 }
 
 inline XRenderPictFormat* XRenderPeer::FindPictureFormat( unsigned long nFormatMask,
     const XRenderPictFormat& rFormatAttr ) const
 {
-#ifdef XRENDER_LINK
     return XRenderFindFormat( mpDisplay, nFormatMask, &rFormatAttr, 0 );
-#else
-    return (*mpXRenderFindFormat)( mpDisplay, nFormatMask, &rFormatAttr, 0 );
-#endif
 }
 
 inline Picture XRenderPeer::CreatePicture( Drawable aDrawable,
     const XRenderPictFormat* pVisFormat, unsigned long nValueMask,
     const XRenderPictureAttributes* pRenderAttr ) const
 {
-#ifdef XRENDER_LINK
     return XRenderCreatePicture( mpDisplay, aDrawable, pVisFormat,
                                  nValueMask, pRenderAttr );
-#else
-    return (*mpXRenderCreatePicture)( mpDisplay, aDrawable, pVisFormat,
-        nValueMask, pRenderAttr );
-#endif
 }
 
 inline void XRenderPeer::ChangePicture( Picture aPicture,
     unsigned long nValueMask, const XRenderPictureAttributes* pRenderAttr ) const
 {
-#ifdef XRENDER_LINK
     XRenderChangePicture( mpDisplay, aPicture, nValueMask, pRenderAttr );
-#else
-    (*mpXRenderChangePicture)( mpDisplay, aPicture, nValueMask, pRenderAttr );
-#endif
 }
 
 inline void XRenderPeer::SetPictureClipRegion( Picture aPicture,
     XLIB_Region aXlibRegion ) const
 {
-#ifdef XRENDER_LINK
     XRenderSetPictureClipRegion( mpDisplay, aPicture, aXlibRegion );
-#else
-    (*mpXRenderSetPictureClipRegion)( mpDisplay, aPicture, aXlibRegion );
-#endif
 }
 
 inline void XRenderPeer::CompositePicture( int nXRenderOp,
@@ -222,52 +158,30 @@ inline void XRenderPeer::CompositePicture( int nXRenderOp,
     int nSrcX, int nSrcY, int nMaskX, int nMaskY, int nDstX, int nDstY,
     unsigned nWidth, unsigned nHeight ) const
 {
-#ifdef XRENDER_LINK
     XRenderComposite( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic,
                       nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight );
-#else
-    (*mpXRenderComposite)( mpDisplay, nXRenderOp, aSrcPic, aMaskPic, aDstPic,
-        nSrcX, nSrcY, nMaskX, nMaskY, nDstX, nDstY, nWidth, nHeight );
-#endif
 }
 
 inline void XRenderPeer::FreePicture( Picture aPicture ) const
 {
-#ifdef XRENDER_LINK
     XRenderFreePicture( mpDisplay, aPicture );
-#else
-    (*mpXRenderFreePicture)( mpDisplay, aPicture );
-#endif
 }
 
 inline GlyphSet XRenderPeer::CreateGlyphSet() const
 {
-#ifdef XRENDER_LINK
     return XRenderCreateGlyphSet( mpDisplay, mpStandardFormatA8 );
-#else
-    return (*mpXRenderCreateGlyphSet)( mpDisplay, mpStandardFormatA8 );
-#endif
 }
 
 inline void XRenderPeer::FreeGlyphSet( GlyphSet aGS ) const
 {
-#ifdef XRENDER_LINK
     XRenderFreeGlyphSet( mpDisplay, aGS );
-#else
-    (*mpXRenderFreeGlyphSet)( mpDisplay, aGS );
-#endif
 }
 
 inline void XRenderPeer::AddGlyph( GlyphSet aGS, Glyph nGlyphId,
     const XGlyphInfo& rGI, const char* pBuffer, int nBufSize ) const
 {
-#ifdef XRENDER_LINK
     XRenderAddGlyphs( mpDisplay, aGS, &nGlyphId, &rGI, 1,
                       const_cast<char*>(pBuffer), nBufSize );
-#else
-    (*mpXRenderAddGlyphs)( mpDisplay, aGS, &nGlyphId, &rGI, 1,
-        const_cast<char*>(pBuffer), nBufSize );
-#endif
 }
 
 inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const
@@ -284,23 +198,14 @@ inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst,
     GlyphSet aGlyphSet, int nDstX, int nDstY,
     const unsigned* pText, int nTextLen ) const
 {
-#ifdef XRENDER_LINK
     XRenderCompositeString32( mpDisplay, PictOpOver, aSrc, aDst, NULL,
                               aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen );
-#else
-    (*mpXRenderCompositeString32)( mpDisplay, PictOpOver, aSrc, aDst, NULL,
-        aGlyphSet, 0, 0, nDstX, nDstY, pText, nTextLen );
-#endif
 }
 
 inline void XRenderPeer::FillRectangle( int a, Picture b, const XRenderColor* c,
     int d, int e, unsigned int f, unsigned int g) const
 {
-#ifdef XRENDER_LINK
     XRenderFillRectangle( mpDisplay, a, b, c, d, e, f, g );
-#else
-    (*mpXRenderFillRectangle)( mpDisplay, a, b, c, d, e, f, g );
-#endif
 }
 
 
@@ -308,26 +213,14 @@ inline void XRenderPeer::CompositeTrapezoids( int nOp,
     Picture aSrc, Picture aDst, const XRenderPictFormat* pXRPF,
     int nXSrc, int nYSrc, const XTrapezoid* pXT, int nCount ) const
 {
-#ifdef XRENDER_LINK
     XRenderCompositeTrapezoids( mpDisplay, nOp, aSrc, aDst, pXRPF,
         nXSrc, nYSrc, pXT, nCount );
-#else
-    (*mpXRenderCompositeTrapezoids)( mpDisplay, nOp, aSrc, aDst, pXRPF,
-        nXSrc, nYSrc, pXT, nCount );
-#endif
 }
 
-inline bool XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs,
+inline void XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs,
     const _XTrap* pTraps, int nCount ) const
 {
-#ifdef XRENDER_LINK
     XRenderAddTraps( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount );
-#else
-    if( !mpXRenderAddTraps )
-        return false;
-    (*mpXRenderAddTraps)( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount );
-#endif
-    return true;
 }
 
 //=====================================================================
commit 93c5ac9ff1033492bec1aefcda94c1507cafcccd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 12 20:20:42 2011 +0000

    ReleaseConfigMgr not called by anything

diff --git a/sd/qa/unit/data/ppt/fail/CVE-2010-0033-1.ppt b/sd/qa/unit/data/ppt/fail/CVE-2010-0033-1.ppt
new file mode 100644
index 0000000..0e4f502
Binary files /dev/null and b/sd/qa/unit/data/ppt/fail/CVE-2010-0033-1.ppt differ
diff --git a/svtools/qa/cppunit/data/wmf/fail/CVE-2005-4560-1.wmf b/svtools/qa/cppunit/data/wmf/fail/CVE-2005-4560-1.wmf
new file mode 100644
index 0000000..aab3400
Binary files /dev/null and b/svtools/qa/cppunit/data/wmf/fail/CVE-2005-4560-1.wmf differ
diff --git a/unotools/inc/unotools/configitem.hxx b/unotools/inc/unotools/configitem.hxx
index fe3a0e9..7910b68 100644
--- a/unotools/inc/unotools/configitem.hxx
+++ b/unotools/inc/unotools/configitem.hxx
@@ -183,9 +183,6 @@ namespace utl
                 PropertyChangeListener if the sub tree broadcasts changes. */
             virtual void            Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames)=0;
 
-            /** is called from the ConfigManager if it is destroyed before the ConfigItem. */
-            void                    ReleaseConfigMgr();
-
             const rtl::OUString&    GetSubTreeName() const {return sSubTree;}
 
             sal_Bool                IsModified() const;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index a0200e6..cb06d05 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -250,23 +250,6 @@ ConfigItem::~ConfigItem()
     delete pImpl;
 }
 
-void    ConfigItem::ReleaseConfigMgr()
-{
-    Reference<XHierarchicalNameAccess> xHierarchyAccess = GetTree();
-    if(xHierarchyAccess.is())
-    {
-        try
-        {
-            Reference<XChangesBatch> xBatch(xHierarchyAccess, UNO_QUERY);
-            xBatch->commitChanges();
-        }
-        CATCH_INFO("Exception from commitChanges(): ")
-    }
-    RemoveChangesListener();
-    OSL_ENSURE(pImpl->pManager, "ConfigManager already released");
-    pImpl->pManager = 0;
-}
-
 void ConfigItem::CallNotify( const com::sun::star::uno::Sequence<OUString>& rPropertyNames )
 {
     // the call is forwarded to the virtual Notify() method
diff --git a/unusedcode.easy b/unusedcode.easy
index 3584071..c1ec1e3 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2056,16 +2056,6 @@ layoutimpl::WidgetFactory::sfx2CreateWindow(VCLXWindow**, Window*, rtl::OUString
 layoutimpl::getParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>)
 layoutimpl::prophlp::getProperty(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&)
 libcmis::SessionFactory::getRepositories(std::__debug::map<int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >)
-libvisio::VSDXCharacterList::getElement(unsigned int)
-libvisio::VSDXContentCollector::charStyleFromStyleSheet(unsigned int)
-libvisio::VSDXContentCollector::paraStyleFromStyleSheet(unsigned int)
-libvisio::VSDXContentCollector::textBlockStyleFromStyleSheet(unsigned int)
-libvisio::VSDXOutputElementList::addEllipse(WPXPropertyList const&)
-libvisio::VSDXOutputElementList::addEndLayer()
-libvisio::VSDXOutputElementList::addStartLayer(WPXPropertyList const&)
-libvisio::VSDXOutputElementList::clear()
-libvisio::VSDXPage::VSDXPage(double, double, unsigned int, unsigned int, libvisio::VSDXOutputElementList const&)
-libvisio::VSDXParagraphList::getElement(unsigned int)
 libvisio::VisioDocument::generateSVG(WPXInputStream*, WPXString&)
 libwpg::WPGraphics::generateSVG(unsigned char const*, unsigned long, WPXString&, libwpg::WPGFileFormat)
 libwpg::WPGraphics::parse(unsigned char const*, unsigned long, libwpg::WPGPaintInterface*, libwpg::WPGFileFormat)
@@ -2392,7 +2382,6 @@ unicode::isTitle(unsigned short)
 unicode::isUnicodeScriptType(unsigned short, short)
 unographic::GraphicDescriptor::isValid() const
 utl::AccessibleStateSetHelper::Compare(utl::AccessibleStateSetHelper const&, utl::AccessibleStateSetHelper&, utl::AccessibleStateSetHelper&)
-utl::ConfigManager::ConfigManager(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>)
 utl::MultiAtomProvider::getLastAtom(int) const
 utl::MultiAtomProvider::hasAtom(int, int) const
 utl::MultiAtomProvider::insertAtomClass(int)
commit 1987a5c7772fafc1e863deeead9081fd747f7713
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 12 12:53:02 2011 +0000

    callcatcher: remove unused code

diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 1c5f0d0..6cf4953 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -206,7 +206,6 @@ typedef boost::unordered_map<ByteString , sal_Bool ,
 class XMLFile : public XMLParentNode
 {
 public:
-    XMLFile() ;
     XMLFile(
                 const String &rFileName // the file name, empty if created from memory stream
     );
@@ -217,9 +216,6 @@ public:
     void        Print( XMLNode *pCur = NULL, sal_uInt16 nLevel = 0 );
     virtual void SearchL10NElements( XMLParentNode *pCur, int pos = 0 );
     void        Extract( XMLFile *pCur = NULL );
-    void        View();
-//  void static Signal_handler(int signo);//void*,oslSignalInfo * pInfo);
-    void        showType(XMLParentNode* node);
 
     XMLHashMap* GetStrings(){return XMLStrings;}
     sal_Bool        Write( ByteString &rFilename );
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index f7d8018..c63a461 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -497,22 +497,6 @@ void XMLFile::Extract( XMLFile *pCur )
 }
 
 /*****************************************************************************/
-void XMLFile::View(){
-/*****************************************************************************/
-    XMLElement* cur;
-    for(XMLHashMap::iterator pos=XMLStrings->begin(); pos!=XMLStrings->end();++pos){
-        fprintf(stdout,"\nid=%s\n",(pos->first).GetBuffer());
-        LangHashMap* elem=pos->second;
-        for(LangHashMap::iterator pos2=elem->begin(); pos2!=elem->end();++pos2){
-            fprintf( stdout,"\nlanguage=%s\n",(pos2->first).GetBuffer() );
-            cur=pos2->second;
-            fprintf(stdout,"\n%s\n",((XMLElement*)cur)->ToOString().getStr());
-
-        }
-    }
-}
-
-/*****************************************************************************/
 void XMLFile::InsertL10NElement( XMLElement* pElement ){
 /*****************************************************************************/
     ByteString tmpStr,id,oldref,language("");
@@ -552,26 +536,6 @@ void XMLFile::InsertL10NElement( XMLElement* pElement ){
         (*elem)[ language ]=pElement;
     }
 }
-/*****************************************************************************/
-void XMLFile::showType(XMLParentNode* node){
-/*****************************************************************************/
-    switch (node->GetNodeType()){
-        case XML_NODE_TYPE_ELEMENT: fprintf(stdout,"ELEMENT\n") ;break;
-        case XML_NODE_TYPE_FILE:    fprintf(stdout,"FILE\n")    ;break;
-        case XML_NODE_TYPE_COMMENT: fprintf(stdout,"COMMENT\n") ;break;
-        case XML_NODE_TYPE_DATA:    fprintf(stdout,"DATA\n")    ;break;
-        case XML_NODE_TYPE_DEFAULT: fprintf(stdout,"DEFAULT\n") ;break;
-        default: break;
-    }
-}
-XMLFile::XMLFile()
-/*****************************************************************************/
-                : XMLParentNode( NULL ),
-                  ID           ( "id" ),
-                  OLDREF       ( "oldref" ),
-                  XML_LANG     ( "xml-lang" ),
-                  XMLStrings   ( NULL ){};
-
 
 XMLFile::XMLFile( const XMLFile& obj )
 /*****************************************************************************/
diff --git a/svtools/inc/svtools/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx
index 8abaae6..f78957f 100644
--- a/svtools/inc/svtools/ivctrl.hxx
+++ b/svtools/inc/svtools/ivctrl.hxx
@@ -120,7 +120,6 @@ class SvxIconChoiceCtrlEntry
                             }
 
 public:
-                            SvxIconChoiceCtrlEntry( sal_uInt16 nFlags = 0 );
                             SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 nFlags = 0 );
                             ~SvxIconChoiceCtrlEntry () {}
 
@@ -148,7 +147,7 @@ public:
     sal_Bool                    IsDropTarget() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_DROP_TARGET) !=0); }
     sal_Bool                    IsBlockingEmphasis() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_BLOCK_EMPHASIS) !=0); }
     sal_Bool                    IsPosLocked() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_POS_LOCKED) !=0); }
-    void                    LockPos( sal_Bool bLock );
+
     // Nur bei AutoArrange gesetzt. Den Kopf der Liste gibts per SvxIconChoiceCtrl::GetPredecessorHead
     SvxIconChoiceCtrlEntry*         GetSuccessor() const { return pflink; }
     SvxIconChoiceCtrlEntry*         GetPredecessor() const { return pblink; }
@@ -281,7 +280,6 @@ public:
 
     sal_Bool                SetChoiceWithCursor ( sal_Bool bDo = sal_True );
 
-    void                SetUpdateMode( sal_Bool bUpdateMode );
     void                SetFont( const Font& rFont );
     void                SetPointFont( const Font& rFont );
 
@@ -294,9 +292,6 @@ public:
     void                ArrangeIcons();
 
 
-    SvxIconChoiceCtrlEntry* InsertEntry( sal_uLong nPos = LIST_APPEND,
-                                     const Point* pPos = 0,
-                                     sal_uInt16 nFlags = 0 );
     SvxIconChoiceCtrlEntry* InsertEntry( const String& rText,
                                          const Image& rImage,
                                          sal_uLong nPos = LIST_APPEND,
@@ -317,12 +312,9 @@ public:
     */
     void                CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics );
 
-    void                RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
-
     sal_Bool                DoKeyInput( const KeyEvent& rKEvt );
 
     sal_Bool                IsEntryEditing() const;
-    void                Clear();
 
     sal_uLong                   GetEntryCount() const;
     SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const;
@@ -337,19 +329,11 @@ public:
     // bHit==sal_False: Eintrag gilt als getroffen, wenn Position im BoundRect liegt
     //     ==sal_True : Bitmap oder Text muss getroffen sein
     SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, sal_Bool bHit = sal_False ) const;
-    // Gibt den naechsten ueber pCurEntry liegenden Eintrag (ZOrder)
-    SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool  ) const;
 
     // in dem sal_uLong wird die Position in der Liste des gefunden Eintrags zurueckgegeben
     SvxIconChoiceCtrlEntry* GetSelectedEntry( sal_uLong& rPos ) const;
 
     void                        SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
-    SvxIconChoiceCtrlTextMode   GetEntryTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const;
-
-    // offene asynchron abzuarbeitende Aktionen ausfuehren. Muss vor dem Speichern von
-    // Eintragspositionen etc. gerufen werden
-    void                Flush();
-
 
     virtual sal_Bool        HasBackground() const;
     virtual sal_Bool        HasFont() const;
@@ -359,12 +343,9 @@ public:
     void                SetFontColorToBackground ( sal_Bool bDo = sal_True ) { _bAutoFontColor = bDo; }
     sal_Bool                AutoFontColor () { return _bAutoFontColor; }
 
-    Point               GetLogicPos( const Point& rPosPixel ) const;
     Point               GetPixelPos( const Point& rPosLogic ) const;
     void                SetSelectionMode( SelectionMode eMode );
 
-    sal_Bool                HandleShortCutKey( const KeyEvent& rKeyEvent );
-
     Rectangle           GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const;
     Rectangle           GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const;
 
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 021f657..7c7b0af 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -124,17 +124,12 @@ private:
     SvxIconChoiceCtrlEntryList_impl maIconChoiceCtrlEntryList;
     SvxIconChoiceCtrl_Impl*         _pOwner;
 
-    void                    Removed_Impl( SvxIconChoiceCtrlEntry* pEntry );
-
 public:
                             EntryList_Impl( SvxIconChoiceCtrl_Impl* );
                             ~EntryList_Impl();
 
     void                    clear();
 
-    SvxIconChoiceCtrlEntry* remove( size_t nPos );
-    void                    remove( SvxIconChoiceCtrlEntry* pEntry );
-
     size_t                  size()
                             {
                                 return maIconChoiceCtrlEntryList.size();
@@ -261,7 +256,6 @@ class SvxIconChoiceCtrl_Impl
                             rPosPixel -= pView->GetMapMode().GetOrigin();
                         }
     void                InitScrollBarBox();
-    SvxIconChoiceCtrlEntry* FindNewCursor();
     void                ToggleSelection( SvxIconChoiceCtrlEntry* );
     void                DeselectAllBut( SvxIconChoiceCtrlEntry*, sal_Bool bPaintSync=sal_False );
     void                Center( SvxIconChoiceCtrlEntry* pEntry ) const;
@@ -349,7 +343,6 @@ public:
     WinBits             GetStyle() const { return nWinBits; }
     void                InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=0 );
     void                CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL );
-    void                RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
     void                FontModified();
     void                SelectAll( sal_Bool bSelect = sal_True, sal_Bool bPaint = sal_True );
     void                SelectEntry(
@@ -410,7 +403,6 @@ public:
                         );
 
     SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, sal_Bool bHit = sal_False );
-    SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
 
     Point               GetEntryPos( SvxIconChoiceCtrlEntry* );
     void                MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound = sal_True );
@@ -550,7 +542,6 @@ public:
     void                SetPositionMode( SvxIconChoiceCtrlPositionMode );
     SvxIconChoiceCtrlPositionMode GetPositionMode() const { return ePositionMode;}
 
-    void                Flush();
     void                SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
     const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
 
@@ -569,8 +560,6 @@ public:
                         );
     void                StopSelectTimer() { aCallSelectHdlTimer.Stop(); }
 
-    sal_Bool            HandleShortCutKey( const KeyEvent& rKeyEvent );
-
     void                CallEventListeners( sal_uLong nEvent, void* pData = NULL );
 
     inline ::svt::IAccessibleFactory& GetAccessibleFactory()
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 12d4829..da49174 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -381,85 +381,6 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
     nFlags |= F_ENTRYLISTPOS_VALID;
 }
 
-void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
-{
-    sal_Bool bSyncSingleSelection;
-    // bei Single-Selection wird die Selektion beim Umsetzen des Cursors
-    // mitgefuehrt. Das soll aber nur erfolgen, wenn ueberhaupt ein
-    // Eintrag selektiert ist.
-    if( GetSelectionCount() )
-        bSyncSingleSelection = sal_True;
-    else
-        bSyncSingleSelection = sal_False;
-
-    if( pEntry == pCurHighlightFrame )
-        pCurHighlightFrame = 0;
-
-    if( pEntry->IsSelected() )
-        CallSelectHandler( 0 );
-
-    if( aEntries.size() == 1 && aEntries[ 0 ] == pEntry )
-    {
-        Clear();
-        return;
-    }
-
-    StopEditTimer();
-    if( pEntry == pAnchor )
-        pAnchor = 0;
-    if( pEntry->IsSelected() )
-        nSelectionCount--;
-    sal_Bool bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list