[Libreoffice-commits] .: 9 commits - vcl/inc vcl/Library_vclplug_gen.mk vcl/source vcl/unx

Thomas Arnhold tarnhold at kemper.freedesktop.org
Thu Jul 21 16:30:29 PDT 2011


 vcl/Library_vclplug_gen.mk                        |    2 
 vcl/inc/unx/cdeint.hxx                            |   47 ----
 vcl/inc/unx/dtint.hxx                             |   74 ------
 vcl/inc/unx/saldisp.hxx                           |    3 
 vcl/inc/unx/wmadaptor.hxx                         |    6 
 vcl/source/app/svapp.cxx                          |    5 
 vcl/source/glyphs/glyphcache.cxx                  |    2 
 vcl/unx/generic/app/saldisp.cxx                   |   63 -----
 vcl/unx/generic/app/salinst.cxx                   |    1 
 vcl/unx/generic/app/salsys.cxx                    |    1 
 vcl/unx/generic/app/wmadaptor.cxx                 |  123 -----------
 vcl/unx/generic/desktopdetect/desktopdetector.cxx |   20 -
 vcl/unx/generic/fontmanager/helper.cxx            |    6 
 vcl/unx/generic/gdi/cdeint.cxx                    |  237 ----------------------
 vcl/unx/generic/gdi/dtint.cxx                     |  143 -------------
 vcl/unx/generic/plugadapt/salplug.cxx             |    2 
 vcl/unx/generic/window/salframe.cxx               |   64 -----
 17 files changed, 6 insertions(+), 793 deletions(-)

New commits:
commit 40d3c23f74fa8111afcd422ab0186e5e4b7a5012
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 23:20:55 2011 +0200

    WaE: remove unused variables

diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index e3e67ab..9152073 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1008,15 +1008,6 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
 #endif
             }
 
-            if ( !bFoundIconSize )
-            {
-               // Unless someone has fixed olwm/olvwm, we have rejected
-               // the max icon size from |XGetIconSizes()|.  Provide a
-               // better icon size default value, in case our window manager
-               // is olwm/olvwm.
-               const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() );
-            }
-
             XFree( pIconSize );
         }
         else
@@ -1714,7 +1705,6 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
             }
 
             const Size& aScreenSize = pDisplay_->getDataForScreen( m_nScreen ).m_aSize;
-            const WMAdaptor *pWM = GetDisplay()->getWMAdaptor();
 
             if( bDoAdjust && aPosSize.GetWidth() <= aScreenSize.Width()
                 && aPosSize.GetHeight() <= aScreenSize.Height() )
commit 2e44d4e3611c94b0be69590ee43794eb47de48b1
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 23:15:34 2011 +0200

    Kill DtIntegrator
    
    Do settings directly at UpdateSettings without DtIntegrator. This is
    like it's done with kde, windows, aqua,...
    
    See vcl/unx/kde/salnativewidgets-kde.cxx

diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 1a7dfc8..8e1e842 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -111,7 +111,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
     vcl/unx/generic/dtrans/X11_selection \
     vcl/unx/generic/dtrans/X11_service \
     vcl/unx/generic/dtrans/X11_transferable \
-    vcl/unx/generic/gdi/dtint \
     vcl/unx/generic/gdi/gcach_xpeer \
     vcl/unx/generic/gdi/pspgraphics \
     vcl/unx/generic/gdi/salbmp \
diff --git a/vcl/inc/unx/dtint.hxx b/vcl/inc/unx/dtint.hxx
deleted file mode 100644
index 16bb7ca..0000000
--- a/vcl/inc/unx/dtint.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SV_DTINT_HXX
-#define _SV_DTINT_HXX
-
-#include <tools/link.hxx>
-#include <tools/string.hxx>
-#include <tools/color.hxx>
-#include <vcl/font.hxx>
-#include "svunx.h"
-
-class SalBitmap;
-class SalDisplay;
-class AllSettings;
-
-enum DtType {
-    DtGeneric,
-    DtCDE
-};
-
-class DtIntegrator
-{
-protected:
-    DtType				meType;
-    Display*			mpDisplay;
-    SalDisplay*			mpSalDisplay;
-    int					mnSystemLookCommandProcess;
-
-
-    DtIntegrator();
-
-    static String			aHomeDir;
-
-public:
-    static DtIntegrator* CreateDtIntegrator();
-
-    virtual ~DtIntegrator();
-
-    // SystemLook
-    virtual void GetSystemLook( AllSettings& rSettings );
-
-    DtType			GetDtType() { return meType; }
-    SalDisplay*		GetSalDisplay() { return mpSalDisplay; }
-    Display*		GetDisplay() { return mpDisplay; }
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 214666d..f69b543 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -55,7 +55,6 @@ class	SalFrame;
 class	ColorMask;
 
 namespace vcl_sal { class WMAdaptor; }
-class DtIntegrator;
 
 // -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 #define PROPERTY_SUPPORT_WM_SetPos				0x00000001
@@ -375,7 +374,6 @@ protected:
     rtl::OString m_aKeyboardName;
 
     vcl_sal::WMAdaptor*	m_pWMAdaptor;
-    DtIntegrator*       m_pDtIntegrator;
 
     bool			m_bXinerama;
     std::vector< Rectangle > m_aXineramaScreens;
@@ -497,7 +495,6 @@ public:
     { mpKbdExtension = pKbdExtension; }
     const char*	GetKeyboardName( bool bRefresh = false );
     ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; }
-    DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; }
     bool			IsXinerama() const { return m_bXinerama; }
     const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; }
     XLIB_Window     GetRootWindow( int nScreen ) const
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 6025ab3..4980504 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -92,7 +92,6 @@ Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*);
 #include <unx/salobj.h>
 #include <unx/sm.hxx>
 #include <unx/wmadaptor.hxx>
-#include <unx/dtint.hxx>
 
 #include <osl/socket.h>
 #include <poll.h>
@@ -505,7 +504,6 @@ SalDisplay::SalDisplay( Display *display ) :
         mpInputMethod( NULL ),
         pDisp_( display ),
         m_pWMAdaptor( NULL ),
-        m_pDtIntegrator( NULL ),
         m_bUseRandRWrapper( true ),
         m_nLastUserEventTime( CurrentTime )
 {
@@ -547,8 +545,6 @@ void SalDisplay::doDestruct()
 
     delete m_pWMAdaptor;
     m_pWMAdaptor = NULL;
-    delete m_pDtIntegrator;
-    m_pDtIntegrator = NULL;
     X11SalBitmap::ImplDestroyCache();
     X11SalGraphics::releaseGlyphPeer();
 
@@ -940,9 +936,6 @@ void SalDisplay::Init()
 
     InitXinerama();
 
-    // initialize system settings update
-    m_pDtIntegrator = DtIntegrator::CreateDtIntegrator();
-
 #ifdef DBG_UTIL
     PrintInfo();
 #endif
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index bd370cb..7eacbf0 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -41,7 +41,6 @@
 #include "unx/saldisp.hxx"
 #include "unx/salinst.h"
 #include "unx/salframe.h"
-#include "unx/dtint.hxx"
 #include "unx/salprn.h"
 #include "unx/sm.hxx"
 
diff --git a/vcl/unx/generic/app/salsys.cxx b/vcl/unx/generic/app/salsys.cxx
index c5f7174..ab69cda 100644
--- a/vcl/unx/generic/app/salsys.cxx
+++ b/vcl/unx/generic/app/salsys.cxx
@@ -30,7 +30,6 @@
 #include "precompiled_vcl.hxx"
 
 #include <unx/salunx.h>
-#include <unx/dtint.hxx>
 #include <unx/saldata.hxx>
 #include <unx/salinst.h>
 #include <unx/saldisp.hxx>
diff --git a/vcl/unx/generic/gdi/dtint.cxx b/vcl/unx/generic/gdi/dtint.cxx
deleted file mode 100644
index af0acb7..0000000
--- a/vcl/unx/generic/gdi/dtint.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dlfcn.h>
-
-#include "osl/file.h"
-#include "osl/process.h"
-#include "osl/security.h"
-
-#include "vcl/svapp.hxx"
-
-#include "unx/salunx.h"
-#include <X11/Xatom.h>
-#include "unx/dtint.hxx"
-#include "unx/saldisp.hxx"
-#include "unx/saldata.hxx"
-#include "unx/wmadaptor.hxx"
-
-#include "dtsetenum.hxx"
-
-#include <set>
-#include <stdio.h>
-
-// NETBSD has no RTLD_GLOBAL
-#ifndef RTLD_GLOBAL
-#define DLOPEN_MODE (RTLD_LAZY)
-#else
-#define DLOPEN_MODE (RTLD_GLOBAL | RTLD_LAZY)
-#endif
-
-
-using namespace vcl_sal;
-
-using ::rtl::OUString;
-
-String DtIntegrator::aHomeDir;
-
-DtIntegrator::DtIntegrator() :
-        meType( DtGeneric ),
-        mnSystemLookCommandProcess( -1 )
-{
-    mpSalDisplay = GetX11SalData()->GetDisplay();
-    mpDisplay = mpSalDisplay->GetDisplay();
-    OUString aDir;
-    oslSecurity aCur = osl_getCurrentSecurity();
-    if( aCur )
-    {
-        osl_getHomeDir( aCur, &aDir.pData );
-        osl_freeSecurityHandle( aCur );
-        OUString aSysDir;
-        osl_getSystemPathFromFileURL( aDir.pData, &aSysDir.pData );
-        aHomeDir = aSysDir;
-    }
-}
-
-DtIntegrator::~DtIntegrator()
-{
-}
-
-DtIntegrator* DtIntegrator::CreateDtIntegrator()
-{
-    /*
-     *  #i22061# override desktop detection
-     *  if environment variable OOO_FORCE_DESKTOP is set
-     *  to one of "cde" "kde" "gnome" then autodetection
-     *  is overridden.
-     */
-    static const char* pOverride = getenv( "OOO_FORCE_DESKTOP" );
-    if( pOverride && *pOverride )
-    {
-        OString aOver( pOverride );
-
-        if( aOver.equalsIgnoreAsciiCase( "none" ) )
-            return new DtIntegrator();
-    }
-
-    // default: generic implementation
-    return new DtIntegrator();
-}
-
-void DtIntegrator::GetSystemLook( AllSettings& rSettings )
-{
-    // #i48001# set a default blink rate
-    StyleSettings aStyleSettings = rSettings.GetStyleSettings();
-    aStyleSettings.SetCursorBlinkTime( 500 );
-    rSettings.SetStyleSettings( aStyleSettings );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index c17b526..e3e67ab 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -60,7 +60,6 @@
 #include "unx/salgdi.h"
 #include "unx/salframe.h"
 #include "unx/soicon.hxx"
-#include "unx/dtint.hxx"
 #include "unx/sm.hxx"
 #include "unx/wmadaptor.hxx"
 #include "unx/salprn.h"
@@ -2663,13 +2662,9 @@ inline Color getColorFromLong( long nColor )
 
 void X11SalFrame::UpdateSettings( AllSettings& rSettings )
 {
-
-    DtIntegrator* pIntegrator = GetDisplay()->getDtIntegrator();
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "DtIntegrator: %d\n", pIntegrator ? pIntegrator->GetDtType() : -1 );
-#endif
-    if( pIntegrator )
-        pIntegrator->GetSystemLook( rSettings );
+    StyleSettings aStyleSettings = rSettings.GetStyleSettings();
+    aStyleSettings.SetCursorBlinkTime( 500 );
+    rSettings.SetStyleSettings( aStyleSettings );
 }
 
 void X11SalFrame::CaptureMouse( sal_Bool bCapture )
commit eee44de57ce42979aa9e4a69c7b377bdcd6b4576
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 16:47:23 2011 +0200

    Remove SCO

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 9855ef7..6025ab3 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -920,11 +920,6 @@ void SalDisplay::Init()
             }
         }
         else
-        if( GetServerVendor() == vendor_sco )
-        {
-            if( otherwm == eWindowManager_ ) eWindowManager_ = pmwm;
-        }
-        else
         if( GetServerVendor() == vendor_hummingbird )
         {
             if (GetVisual(m_nDefaultScreen).GetDepth() == 24)
@@ -1080,8 +1075,7 @@ void SalDisplay::ModifierMapping()
     nMod1KeySym_    = sal_XModifier2Keysym( pDisp_, pXModMap, Mod1MapIndex );
     // Auf Sun-Servern und SCO-Severn beruecksichtigt XLookupString
     // nicht den NumLock Modifier.
-    if( 	(GetServerVendor() == vendor_sun)
-        ||  (GetServerVendor() == vendor_sco) )
+    if( GetServerVendor() == vendor_sun )
     {
         XLIB_KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock );
 
commit b17baa39e5accd5b47a5e451c11084cc3d7f406b
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 16:22:41 2011 +0200

    Kill FourDwm

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 06e87d7..9855ef7 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -925,16 +925,6 @@ void SalDisplay::Init()
             if( otherwm == eWindowManager_ ) eWindowManager_ = pmwm;
         }
         else
-        if( GetServerVendor() == vendor_sgi )
-        {
-            if( GetVisual( m_nDefaultScreen ).GetDepth() > 8 && GetVisual( m_nDefaultScreen ).GetDepth() <= 16 )
-                nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor;
-            nProperties_ |= PROPERTY_SUPPORT_XSetClipMask;
-
-            if( otherwm == eWindowManager_ )
-                eWindowManager_ = FourDwm;
-        }
-        else
         if( GetServerVendor() == vendor_hummingbird )
         {
             if (GetVisual(m_nDefaultScreen).GetDepth() == 24)
commit fda590fc0879ee8459e06ea15f9ea9243ad2144a
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 16:20:21 2011 +0200

    Remove Olwm support and Windowmaker gravity handling
    
    WindowMaker works out of the box.

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 95cb6a3..06e87d7 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -918,9 +918,6 @@ void SalDisplay::Init()
                 if (VendorRelease ( GetDisplay() ) < 3600)
                     nProperties_ |= PROPERTY_BUG_FillPolygon_Tile;
             }
-
-            if( otherwm == eWindowManager_ )
-                eWindowManager_ = olwm;
         }
         else
         if( GetServerVendor() == vendor_sco )
@@ -944,13 +941,6 @@ void SalDisplay::Init()
                 nProperties_ |= PROPERTY_BUG_CopyArea_OnlySmallSlices;
         }
 
-        if( otherwm == eWindowManager_ )
-        {
-            if( !XInternAtom( pDisp_, "_MOTIF_WM_INFO", True ) )
-                eWindowManager_ = olwm;
-            // ???
-        }
-
         if( winmgr == eWindowManager_ )
         {
             nProperties_ &= ~PROPERTY_SUPPORT_WM_SetPos;
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 2b4290b..d446777 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -268,42 +268,6 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
 
     if( m_aWMName.Len() == 0 )
     {
-        // check for window maker - needs different gravity
-        Atom aWMakerRunning = XInternAtom( m_pDisplay, "_WINDOWMAKER_WM_PROTOCOLS", True );
-        if( aWMakerRunning != None &&
-            XGetWindowProperty( m_pDisplay,
-                                m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
-                                aWMakerRunning,
-                                0, 32,
-                                False,
-                                XA_ATOM,
-                                &aRealType,
-                                &nFormat,
-                                &nItems,
-                                &nBytesLeft,
-                                &pProperty ) == 0 )
-        {
-            if( aRealType == XA_ATOM )
-                m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM("Windowmaker" ) );
-            XFree( pProperty );
-            m_nInitWinGravity = NorthWestGravity;
-        }
-        else if( pProperty )
-        {
-            XFree( pProperty );
-            pProperty = NULL;
-        }
-    }
-    if( m_aWMName.Len() == 0 )
-    {
-        if( XInternAtom( m_pDisplay, "_OL_WIN_ATTR", True ) )
-        {
-            m_aWMName = String( RTL_CONSTASCII_USTRINGPARAM( "Olwm" ) );
-            m_nInitWinGravity = NorthWestGravity;
-        }
-    }
-    if( m_aWMName.Len() == 0 )
-    {
         // check for ReflectionX wm (as it needs a workaround in Windows mode
         Atom aRwmRunning = XInternAtom( m_pDisplay, "RWM_RUNNING", True );
         if( aRwmRunning != None &&
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 7405387..c17b526 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1016,9 +1016,6 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
                // better icon size default value, in case our window manager
                // is olwm/olvwm.
                const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() );
-
-               if ( rWM.EqualsAscii( "Olwm" ) )
-                   iconSize = 48;
             }
 
             XFree( pIconSize );
commit 3228709f43bc817cd578ded1bd65da90dbd2676b
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 16:08:08 2011 +0200

    Remove SAL_FONTPATH and SAL_FONTPATH_PRIVATE

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 5b9e31e..44f5d5b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1592,11 +1592,6 @@ sal_uInt16 Application::GetSystemWindowMode()
 const String& Application::GetFontPath()
 {
     ImplSVData* pSVData = ImplGetSVData();
-    if( !pSVData->maAppData.mpFontPath )
-    {
-        if( const char* pFontPath = ::getenv( "SAL_FONTPATH_PRIVATE" ) )
-            pSVData->maAppData.mpFontPath = new String( String::CreateFromAscii( pFontPath ) );
-    }
 
     if( pSVData->maAppData.mpFontPath )
         return *(pSVData->maAppData.mpFontPath);
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx
index 71b18a6..3a5ff24 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -177,8 +177,6 @@ GlyphCache& GlyphCache::GetInstance()
 
 void GlyphCache::LoadFonts()
 {
-    if( const char* pFontPath = ::getenv( "SAL_FONTPATH_PRIVATE" ) )
-        AddFontPath( String::CreateFromAscii( pFontPath ) );
     const String& rFontPath = Application::GetFontPath();
     if( rFontPath.Len() > 0 )
         AddFontPath( rFontPath );
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 945b4e2..95cb6a3 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2576,8 +2576,6 @@ void SalDisplay::PrintInfo() const
                  GetEnv( "DISPLAY" ) );
         fprintf( stderr, "\t$SAL_VISUAL       \t\"%s\"\n",
                  GetEnv( "SAL_VISUAL" ) );
-        fprintf( stderr, "\t$SAL_FONTPATH     \t\"%s\"\n",
-                 GetEnv( "SAL_FONTPATH" ) );
         fprintf( stderr, "\t$SAL_NOSEGV       \t\"%s\"\n",
                  GetEnv( "SAL_NOSEGV" ) );
         fprintf( stderr, "\t$SAL_IGNOREXERRORS\t\"%s\"\n",
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index 4b0d327..673d8b0 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -243,12 +243,6 @@ OUString psp::getFontPath()
                 aPathBuffer.appendAscii( "/user/fonts" );
             }
         }
-        OString aEnvPath( getEnvironmentPath( "SAL_FONTPATH_PRIVATE" ) );
-        if( aEnvPath.getLength() )
-        {
-            aPathBuffer.append( sal_Unicode(';') );
-            aPathBuffer.append( OStringToOUString( aEnvPath, osl_getThreadTextEncoding() ) );
-        }
 
         aPath = aPathBuffer.makeStringAndClear();
 #if OSL_DEBUG_LEVEL > 1
commit eb1f82a37d3f771dfedda624d2828672ff0af78a
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 16:02:52 2011 +0200

    Remove SAL_WM

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index a7ab579..945b4e2 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -863,19 +863,6 @@ void SalDisplay::Init()
 
     // - - - - - - - - - - Window Manager  - - - - - - - - - - -
     m_pWMAdaptor = ::vcl_sal::WMAdaptor::createWMAdaptor( this );
-    const char *pWM = getenv( "SAL_WM" );
-    if( pWM )
-    {
-        long int nWM = 0;
-        sscanf( pWM, "%li", &nWM );
-        eWindowManager_ = SalWM(nWM);
-    }
-    else if( XInternAtom( pDisp_, "_SGI_TELL_WM", True ) )
-        eWindowManager_ = FourDwm;
-    else if( XInternAtom( pDisp_, "KWM_RUNNING", True ) )
-        eWindowManager_ = mwm; // naja, eigentlich kwm ...
-    else if( XInternAtom( pDisp_, "_OL_WIN_ATTR", True ) )
-        eWindowManager_ = olwm;
 
     // - - - - - - - - - - Properties  - - - - - - - - - - - - -
     const char *pProperties = getenv( "SAL_PROPERTIES" );
@@ -2597,8 +2584,6 @@ void SalDisplay::PrintInfo() const
                  GetEnv( "SAL_IGNOREXERRORS" ) );
         fprintf( stderr, "\t$SAL_PROPERTIES   \t\"%s\"\n",
                  GetEnv( "SAL_PROPERTIES" ) );
-        fprintf( stderr, "\t$SAL_WM           \t\"%s\"\n",
-                 GetEnv( "SAL_WM" ) );
         fprintf( stderr, "\t$SAL_SYNCHRONIZE  \t\"%s\"\n",
                  GetEnv( "SAL_SYNCHRONIZE" ) );
 
commit d49ba1ae3ec4b602dc7acee65180d2c5d02d88bf
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 16:00:30 2011 +0200

    Remove supportsICCCMPos. Resize working with Sawfish anyway.

diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 1138eed..7948ca0 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -323,12 +323,6 @@ public:
     Atom getAtom( WMAtom eAtom ) const
     { return m_aWMAtoms[ eAtom ]; }
 
-    /*
-     * supports correct positioning
-     */
-
-    virtual bool supportsICCCMPos () const;
-
     int getPositionWinGravity () const
     { return m_nWinGravity; }
     int getInitWinGravity() const
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index cfff1b3..2b4290b 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -73,7 +73,6 @@ public:
     virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const;
     virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const;
     virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const;
-    virtual bool supportsICCCMPos() const;
     virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const;
     virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const;
     virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const;
@@ -1773,26 +1772,6 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
 }
 
 /*
- *  WMAdaptor::supportsICCCMPos
- */
-
-bool WMAdaptor::supportsICCCMPos() const
-{
-    return
-        m_aWMName.EqualsAscii( "Sawfish" );
-}
-
-/*
- *  NetWMAdaptor::supportsICCCMPos
- */
-
-bool NetWMAdaptor::supportsICCCMPos() const
-{
-    return true;
-}
-
-
-/*
  *  WMAdaptor::enableAlwaysOnTop
  */
 void WMAdaptor::enableAlwaysOnTop( X11SalFrame*, bool /*bEnable*/ ) const
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 40e3c56..7405387 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1752,17 +1752,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
                     aPosSize.Move( 0, (long)aGeom.nTopDecoration - (long)aPosSize.Top() );
             }
 
-            // resize with new args
-            if (pWM->supportsICCCMPos())
-            {
-                if( mpParent )
-                    aPosSize.Move( -mpParent->maGeometry.nX,
-                -mpParent->maGeometry.nY );
-                SetPosSize( aPosSize );
-                bDefaultPosition_ = False;
-            }
-            else
-                SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
+            SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
         }
     }
 
commit 3e7b05f4965adf7e50eb4e02ea60576253d90c79
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Jul 21 15:59:25 2011 +0200

    Kill Dtwm/CDE

diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index d195400..1a7dfc8 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -111,7 +111,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
     vcl/unx/generic/dtrans/X11_selection \
     vcl/unx/generic/dtrans/X11_service \
     vcl/unx/generic/dtrans/X11_transferable \
-    vcl/unx/generic/gdi/cdeint \
     vcl/unx/generic/gdi/dtint \
     vcl/unx/generic/gdi/gcach_xpeer \
     vcl/unx/generic/gdi/pspgraphics \
diff --git a/vcl/inc/unx/cdeint.hxx b/vcl/inc/unx/cdeint.hxx
deleted file mode 100644
index c2b7d57..0000000
--- a/vcl/inc/unx/cdeint.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SV_CDEINT_HXX
-#define _SV_CDEINT_HXX
-
-#include <unx/dtint.hxx>
-
-class CDEIntegrator : public DtIntegrator
-{
-    friend DtIntegrator* DtIntegrator::CreateDtIntegrator();
-private:
-    CDEIntegrator();
-
-public:
-    virtual ~CDEIntegrator();
-
-    virtual void GetSystemLook( AllSettings& rSettings );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 94a75c3..a7ab579 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -876,8 +876,6 @@ void SalDisplay::Init()
         eWindowManager_ = mwm; // naja, eigentlich kwm ...
     else if( XInternAtom( pDisp_, "_OL_WIN_ATTR", True ) )
         eWindowManager_ = olwm;
-    else if( m_pWMAdaptor->getWindowManagerName().EqualsAscii( "Dtwm" ) )
-        eWindowManager_ = dtwm;
 
     // - - - - - - - - - - Properties  - - - - - - - - - - - - -
     const char *pProperties = getenv( "SAL_PROPERTIES" );
@@ -953,11 +951,6 @@ void SalDisplay::Init()
                 eWindowManager_ = FourDwm;
         }
         else
-        if( GetServerVendor() == vendor_hp )
-        {
-            if( otherwm == eWindowManager_ ) eWindowManager_ = dtwm;
-        }
-        else
         if( GetServerVendor() == vendor_hummingbird )
         {
             if (GetVisual(m_nDefaultScreen).GetDepth() == 24)
@@ -977,10 +970,6 @@ void SalDisplay::Init()
             nProperties_ &= ~PROPERTY_SUPPORT_WM_Screen;
             nProperties_ |= PROPERTY_FEATURE_Maximize;
         }
-        else if( dtwm == eWindowManager_ )
-        {
-            nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
-        }
         else if( pmwm == eWindowManager_ )
         {
             nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 38ed2fa..cfff1b3 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -184,7 +184,6 @@ static const WMAdaptorProtocol aAtomTab[] =
     { "SAL_EXTTEXTEVENT", WMAdaptor::SAL_EXTTEXTEVENT },
     { "SAL_GETTIMEEVENT", WMAdaptor::SAL_GETTIMEEVENT },
     { "VCL_SYSTEM_SETTINGS", WMAdaptor::VCL_SYSTEM_SETTINGS },
-    { "DTWM_IS_RUNNING", WMAdaptor::DTWM_IS_RUNNING },
     { "_XSETTINGS_SETTINGS", WMAdaptor::XSETTINGS },
     { "_XEMBED", WMAdaptor::XEMBED },
     { "_XEMBED_INFO", WMAdaptor::XEMBED_INFO },
@@ -268,48 +267,6 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
     initAtoms();
     getNetWmName(); // try to discover e.g. Sawfish
 
-    // check for dtwm running
-    if( m_aWMAtoms[ DTWM_IS_RUNNING ] )
-    {
-        if (   (XGetWindowProperty( m_pDisplay,
-                                    m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
-                                    m_aWMAtoms[ DTWM_IS_RUNNING ],
-                                    0, 1,
-                                    False,
-                                    XA_INTEGER,
-                                    &aRealType,
-                                    &nFormat,
-                                    &nItems,
-                                    &nBytesLeft,
-                                    &pProperty) == 0
-                && nItems)
-               || (XGetWindowProperty( m_pDisplay,
-                                       m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
-                                       m_aWMAtoms[ DTWM_IS_RUNNING ],
-                                       0, 1,
-                                       False,
-                                       m_aWMAtoms[ DTWM_IS_RUNNING ],
-                                       &aRealType,
-                                       &nFormat,
-                                       &nItems,
-                                       &nBytesLeft,
-                                       &pProperty) == 0
-                   && nItems))
-        {
-            if (*pProperty)
-            {
-                m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("Dtwm"));
-                m_bTransientBehaviour = false;
-                m_nWinGravity = CenterGravity;
-            }
-            XFree (pProperty);
-        }
-        else if( pProperty )
-        {
-            XFree( pProperty );
-            pProperty = NULL;
-        }
-    }
     if( m_aWMName.Len() == 0 )
     {
         // check for window maker - needs different gravity
@@ -1079,9 +1036,6 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
     rtl::OString aTitle(rtl::OUStringToOString(rWMName,
         osl_getThreadTextEncoding()));
 
-    if( ! rWMName.Len() && m_aWMName.EqualsAscii( "Dtwm" ) )
-        aTitle = rtl::OString(' ');
-
     ::rtl::OString aWMLocale;
     rtl_Locale* pLocale = NULL;
     osl_getProcessLocale( &pLocale );
@@ -1513,10 +1467,6 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
         if( ! pReferenceFrame->bMapped_ )
             pFrame->mbTransientForRoot = true;
     }
-    // #110333# in case no one ever sets a title prevent
-    // the Dtwm taking the class instead
-    if( m_aWMName.EqualsAscii( "Dtwm" ) )
-        setWMName( pFrame, String() );
 }
 
 /*
@@ -1675,16 +1625,6 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
                             RevertToNone,
                             CurrentTime
                             );
-            if( m_aWMName.EqualsAscii( "Dtwm" ) )
-            {
-                /*
-                 *  Dtwm will only position  correctly with center gravity
-                 *  and in this case the request actually changes the frame
-                 *  not the shell window
-                 */
-                aTarget = Rectangle( Point( 0, 0 ), aScreenSize );
-                aRestore.Move( -rGeom.nLeftDecoration, -rGeom.nTopDecoration );
-            }
         }
 
         if( pFrame->maRestorePosSize.IsEmpty() )
@@ -1708,11 +1648,6 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
         pFrame->maRestorePosSize = Rectangle();
         pFrame->nWidth_ 			= rGeom.nWidth;
         pFrame->nHeight_			= rGeom.nHeight;
-        if( m_aWMName.EqualsAscii( "Dtwm" ) && pFrame->bMapped_ )
-        {
-            pFrame->maGeometry.nX += rGeom.nLeftDecoration;
-            pFrame->maGeometry.nY += rGeom.nTopDecoration;
-        }
     }
 }
 
@@ -1844,8 +1779,7 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
 bool WMAdaptor::supportsICCCMPos() const
 {
     return
-        m_aWMName.EqualsAscii( "Sawfish" )
-        || m_aWMName.EqualsAscii( "Dtwm" );
+        m_aWMName.EqualsAscii( "Sawfish" );
 }
 
 /*
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index ed755fa..a22bdbe 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -227,22 +227,6 @@ static bool is_kde4_desktop( Display* pDisplay )
     return false;
 }
 
-static bool is_cde_desktop( Display* pDisplay )
-{
-    void* pLibrary = NULL;
-
-    Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True );
-    OUString aPathName( RTL_CONSTASCII_USTRINGPARAM( "file:///usr/dt/lib/libDtSvc.so" ) );
-    if( nDtAtom && ( pLibrary = osl_loadModule( aPathName.pData, SAL_LOADMODULE_DEFAULT ) ) )
-    {
-        osl_unloadModule( (oslModule)pLibrary );
-        return true;
-    }
-
-    return false;
-}
-
-
 extern "C"
 {
 
@@ -254,8 +238,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
     {
         OString aOver( pOverride );
 
-        if ( aOver.equalsIgnoreAsciiCase( "cde" ) )
-            return DESKTOP_CDE;
         if ( aOver.equalsIgnoreAsciiCase( "kde4" ) )
             return DESKTOP_KDE4;
         if ( aOver.equalsIgnoreAsciiCase( "gnome" ) )
@@ -323,8 +305,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
         ret = DESKTOP_KDE4;
     else if ( is_gnome_desktop( pDisplay ) )
         ret = DESKTOP_GNOME;
-    else if ( is_cde_desktop( pDisplay ) )
-        ret = DESKTOP_CDE;
     else if ( is_kde_desktop( pDisplay ) )
         ret = DESKTOP_KDE;
     else
diff --git a/vcl/unx/generic/gdi/cdeint.cxx b/vcl/unx/generic/gdi/cdeint.cxx
deleted file mode 100644
index c6d20fb..0000000
--- a/vcl/unx/generic/gdi/cdeint.cxx
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-
-#include <tools/stream.hxx>
-#include <tools/debug.hxx>
-
-#include <vcl/settings.hxx>
-
-#include <unx/salunx.h>
-#include <unx/saldisp.hxx>
-#include <unx/cdeint.hxx>
-
-CDEIntegrator::CDEIntegrator()
-{
-    meType = DtCDE;
-}
-
-CDEIntegrator::~CDEIntegrator()
-{
-}
-
-static int getHexDigit( const char c )
-{
-    if( c >= '0' && c <= '9' )
-        return (int)(c-'0');
-    else if( c >= 'a' && c <= 'f' )
-        return (int)(c-'a'+10);
-    else if( c >= 'A' && c <= 'F' )
-        return (int)(c-'A'+10);
-    return -1;
-}
-
-
-void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
-{
-    static Color aColors[ 8 ];
-    static sal_Bool bRead  = sal_False;
-    static sal_Bool bValid = sal_False;
-
-    if( ! bRead )
-    {
-        // get used palette from xrdb
-        char **ppStringList = 0;
-        int nStringCount;
-        XTextProperty aTextProperty;
-        aTextProperty.value = 0;
-
-        static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False );
-
-        if( XGetTextProperty( mpDisplay,
-                              RootWindow( mpDisplay, 0 ),
-                              &aTextProperty,
-                              nResMgrAtom )
-            && aTextProperty.value
-            && XTextPropertyToStringList( &aTextProperty, &ppStringList, &nStringCount )
-            )
-        {
-            // format of ColorPalette resource:
-            // *n*ColorPalette: palettefile
-
-            ByteString aLines;
-            int i;
-            for( i=0; i < nStringCount; i++ )
-                aLines += ppStringList[i];
-            for( i = aLines.GetTokenCount( '\n' )-1; i >= 0; i-- )
-            {
-                ByteString aLine = aLines.GetToken( i, '\n' );
-                int nIndex = aLine.Search( "ColorPalette" );
-                if( nIndex != STRING_NOTFOUND )
-                {
-                    int nPos = nIndex;
-
-                    nIndex+=12;
-                    const char* pStr = aLine.GetBuffer() +nIndex;
-                    while( *pStr && isspace( *pStr ) && *pStr != ':' )
-                    {
-                        pStr++;
-                        nIndex++;
-                    }
-                    if( *pStr != ':' )
-                        continue;
-                    pStr++, nIndex++;
-                    for( ; *pStr && isspace( *pStr ); pStr++, nIndex++ )
-                        ;
-                    if( ! *pStr )
-                        continue;
-                    int nIndex2 = nIndex;
-                    for( ; *pStr && ! isspace( *pStr ); pStr++, nIndex2++ )
-                        ;
-                    ByteString aPaletteFile( aLine.Copy( nIndex, nIndex2 - nIndex ) );
-                    // extract number before ColorPalette;
-                    for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
-                        ;
-                    nPos--;
-                    for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
-                        ;
-                    int nNumber = aLine.Copy( ++nPos ).ToInt32();
-
-                    OSL_TRACE( "found palette %d in resource \"%s\"", nNumber, aLine.GetBuffer() );
-
-                    // found no documentation what this number actually means;
-                    // might be the screen number. 0 seems to be the right one
-                    // in most cases.
-                    if( nNumber )
-                        continue;
-
-                    OSL_TRACE( "Palette file is \"%s\".\n", aPaletteFile.GetBuffer() );
-
-                    String aPath( aHomeDir );
-                    aPath.AppendAscii( "/.dt/palettes/" );
-                    aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
-
-                    SvFileStream aStream( aPath, STREAM_READ );
-                    if( ! aStream.IsOpen() )
-                    {
-                        aPath = String::CreateFromAscii( "/usr/dt/palettes/" );
-                        aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
-                        aStream.Open( aPath, STREAM_READ );
-                        if( ! aStream.IsOpen() )
-                            continue;
-                    }
-
-                    ByteString aBuffer;
-                    for( nIndex = 0; nIndex < 8; nIndex++ )
-                    {
-                        aStream.ReadLine( aBuffer );
-                        // format is "#RRRRGGGGBBBB"
-
-                        OSL_TRACE( "\t\"%s\".\n", aBuffer.GetBuffer() );
-
-                        if( aBuffer.Len() )
-                        {
-                            const char* pArr = (const char*)aBuffer.GetBuffer()+1;
-                            aColors[nIndex] = Color(
-                                getHexDigit( pArr[1] )
-                                | ( getHexDigit( pArr[0] ) << 4 ),
-                                getHexDigit( pArr[5] )
-                                | ( getHexDigit( pArr[4] ) << 4 ),
-                                getHexDigit( pArr[9] )
-                                | ( getHexDigit( pArr[8] ) << 4 )
-                                );
-
-                            OSL_TRACE( "\t\t%lx\n", aColors[nIndex].GetColor() );
-                        }
-                    }
-
-                    bValid = sal_True;
-                    break;
-                }
-            }
-        }
-
-        if( ppStringList )
-            XFreeStringList( ppStringList );
-        if( aTextProperty.value )
-            XFree( aTextProperty.value );
-    }
-
-
-    StyleSettings aStyleSettings = rSettings.GetStyleSettings();
-    // #i48001# set a default blink rate
-    aStyleSettings.SetCursorBlinkTime( 500 );
-    if (bValid)
-    {
-        aStyleSettings.SetActiveColor( aColors[0] );
-        aStyleSettings.SetActiveColor2( aColors[0] );
-        aStyleSettings.SetActiveBorderColor( aColors[0] );
-
-        aStyleSettings.SetDeactiveColor( aColors[0] );
-        aStyleSettings.SetDeactiveColor2( aColors[0] );
-        aStyleSettings.SetDeactiveBorderColor( aColors[0] );
-
-        Color aActive =
-            aColors[ 0 ].GetBlue() < 128		||
-            aColors[ 0 ].GetGreen() < 128		||
-            aColors[ 0 ].GetRed() < 128
-            ? Color( COL_WHITE ) : Color( COL_BLACK );
-        Color aDeactive =
-            aColors[ 1 ].GetBlue() < 128		||
-            aColors[ 1 ].GetGreen() < 128		||
-            aColors[ 1 ].GetRed() < 128
-            ? Color( COL_WHITE ) : Color( COL_BLACK );
-        aStyleSettings.SetActiveTextColor( aActive );
-        aStyleSettings.SetDeactiveTextColor( aDeactive );
-
-        aStyleSettings.SetDialogTextColor( aDeactive );
-        aStyleSettings.SetMenuTextColor( aDeactive );
-        aStyleSettings.SetMenuBarTextColor( aDeactive );
-        aStyleSettings.SetButtonTextColor( aDeactive );
-        aStyleSettings.SetRadioCheckTextColor( aDeactive );
-        aStyleSettings.SetGroupTextColor( aDeactive );
-        aStyleSettings.SetLabelTextColor( aDeactive );
-        aStyleSettings.SetInfoTextColor( aDeactive );
-
-        aStyleSettings.Set3DColors( aColors[1] );
-        aStyleSettings.SetFaceColor( aColors[1] );
-        aStyleSettings.SetDialogColor( aColors[1] );
-        aStyleSettings.SetMenuColor( aColors[1] );
-        aStyleSettings.SetMenuBarColor( aColors[1] );
-        aStyleSettings.SetCheckedColorSpecialCase( );
-    }
-    rSettings.SetStyleSettings( aStyleSettings );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/dtint.cxx b/vcl/unx/generic/gdi/dtint.cxx
index df1826d..af0acb7 100644
--- a/vcl/unx/generic/gdi/dtint.cxx
+++ b/vcl/unx/generic/gdi/dtint.cxx
@@ -43,9 +43,6 @@
 
 #include "unx/salunx.h"
 #include <X11/Xatom.h>
-#ifdef USE_CDE
-#include "unx/cdeint.hxx"
-#endif
 #include "unx/dtint.hxx"
 #include "unx/saldisp.hxx"
 #include "unx/saldata.hxx"
@@ -105,29 +102,10 @@ DtIntegrator* DtIntegrator::CreateDtIntegrator()
     {
         OString aOver( pOverride );
 
-#if USE_CDE
-        if( aOver.equalsIgnoreAsciiCase( "cde" ) )
-            return new CDEIntegrator();
-#endif
         if( aOver.equalsIgnoreAsciiCase( "none" ) )
             return new DtIntegrator();
     }
 
-#ifdef USE_CDE
-    void* pLibrary = NULL;
-
-    // check dt type
-    // CDE
-    SalDisplay* pSalDisplay = GetX11SalData()->GetDisplay();
-    Display* pDisplay = pSalDisplay->GetDisplay();
-    Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True );
-    if( nDtAtom && ( pLibrary = dlopen( "/usr/dt/lib/libDtSvc.so", DLOPEN_MODE ) ) )
-    {
-        dlclose( pLibrary );
-        return new CDEIntegrator();
-    }
-#endif
-
     // default: generic implementation
     return new DtIntegrator();
 }
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index b09ce7c..5bc742d 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -276,7 +276,7 @@ void SalAbort( const XubString& rErrorText )
     exit(-1);
 }
 
-static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4", "CDE" };
+static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4" };
 
 const OUString& SalGetDesktopEnvironment()
 {
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 4967abe..40e3c56 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -4123,10 +4123,6 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
             }
             else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_SAVE_YOURSELF ) )
             {
-                bool bSession = rWMAdaptor.getWindowManagerName().EqualsAscii( "Dtwm" );
-
-                if( ! bSession )
-                {
                     if( this == s_pSaveYourselfFrame )
                     {
                         rtl::OString aExec(rtl::OUStringToOString(SessionManagerClient::getExecName(), osl_getThreadTextEncoding()));
@@ -4141,14 +4137,6 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
                     else
                         // can only happen in race between WM and window closing
                         XChangeProperty( GetXDisplay(), GetShellWindow(), rWMAdaptor.getAtom( WMAdaptor::WM_COMMAND ), XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0 );
-                }
-                else
-                {
-                    // save open documents; would be good for non Dtwm, too,
-                    // but there is no real Shutdown message in the ancient
-                    // SM protocol; on Dtwm SaveYourself really means Shutdown, too.
-                    IceSalSession::handleOldX11SaveYourself( this );
-                }
             }
         }
     }
@@ -4372,22 +4360,6 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
 
                     if( hPresentationWindow != None && GetShellWindow() == hPresentationWindow )
                         XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToParent, CurrentTime );
-                    /*  For unknown reasons Dtwm does respect the input_hint
-                     *  set to False, but not when mapping the window. So
-                     *  emulate the correct behaviour and set the focus back
-                     *  to where it most probably should have been.
-                     */
-                    if( (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) &&
-                        mpParent &&
-                        GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Dtwm" )
-                        )
-                    {
-                        XSetInputFocus( GetXDisplay(),
-                                        mpParent->GetShellWindow(),
-                                        RevertToParent,
-                                        CurrentTime );
-                        bSetFocus = false;
-                    }
 
                     if( bSetFocus )
                     {


More information about the Libreoffice-commits mailing list