[Libreoffice-commits] .: patches/dev300

Petr Mladek pmladek at kemper.freedesktop.org
Thu Mar 31 12:10:25 PDT 2011


 patches/dev300/apply                    |   19 
 patches/dev300/kde4_fpicker_fixes.diff  |  216 ----------
 patches/dev300/kde4_fpicker_fixes2.diff |  257 ------------
 patches/dev300/kde4_fpicker_fixes3.diff |   84 ----
 patches/dev300/kde4_vcl_fixes.diff      |  382 ------------------
 patches/dev300/kde4_vcl_fixes2.diff     |  657 --------------------------------
 patches/dev300/qt-moc-detect.diff       |   29 -
 7 files changed, 1644 deletions(-)

New commits:
commit 57f67dabee86ac6c30965039ec26797bd2463a24
Author: Petr Mladek <pmladek at suse.cz>
Date:   Thu Mar 31 21:09:54 2011 +0200

    bin already applied KDE4-related fixes

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 3c3845c..c6da7e5 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1144,25 +1144,6 @@ gcc-4.3-postgresql.diff
 sdbc-postgresql-config_office.diff
 sdbc-postgresql-oxt.diff
 
-[ KDE4 ]
-# Further fixes on top of existing kde4 support
-# upstreamed in m65
-# FIXME dev300-m77 kde4_fpicker_fixes.diff #disabled
-# FIXME dev300-m77 kde4_vcl_fixes.diff #disabled
-
-# Fixes filter issues and crash when dragging
-# FIXME dev300-m77 kde4_fpicker_fixes2.diff #disabled
-
-# fixes multiple auto extension checkboxes, fixes override of exising file bug
-# FIXME dev300-m77 kde4_fpicker_fixes3.diff #disabled
-
-# fixes 3rd party plugin support
-# FIXME dev300-m77 kde4_vcl_fixes2.diff #disabled
-
-# Fix qt/qt4 moc detection
-# FIXME ooo300-m11 qt-moc-detect.diff #disabled
-#qt-moc-detect.diff
-
 [ KDE4Experimental ]
 # Not yet ported to co-exist with the KDE3 stuff
 kde4-kab.diff
diff --git a/patches/dev300/kde4_fpicker_fixes.diff b/patches/dev300/kde4_fpicker_fixes.diff
deleted file mode 100644
index 89fd7f6..0000000
--- a/patches/dev300/kde4_fpicker_fixes.diff
+++ /dev/null
@@ -1,216 +0,0 @@
-From d235132c5f167ab61baa79f225cc628f56728a34 Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:01:01 +0200
-Subject: [PATCH 438/878] kde4_fpicker_fixes.diff
-
----
- fpicker/source/unx/kde4/KDE4FPEntry.cxx    |    6 +-
- fpicker/source/unx/kde4/KDE4FilePicker.cxx |   88 +++++++++++++++++++++-------
- 2 files changed, 70 insertions(+), 24 deletions(-)
-
-diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
-index e3d3e81..4424210 100644
---- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx
-+++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
-@@ -50,12 +50,12 @@ static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiS
- // the three uno functions that will be exported
- extern "C" 
- {
--    void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
-+    void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
-     {
-         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-     }
- 
--    sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey )
-+    sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
-     {
-         sal_Bool bRetVal = sal_True;
- 
-@@ -76,7 +76,7 @@ extern "C"
-         return bRetVal;
-     }
- 
--    void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey )
-+    void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* )
-     {
-         void* pRet = 0;
- 
-diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-index 4c11f34..bbc27ad 100644
---- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-@@ -84,6 +84,8 @@ using namespace ::com::sun::star::uno;
- // helper functions
- //////////////////////////////////////////////////////////////////////////
- 
-+#include <QDebug>
-+
- namespace
- {
-     // controling event notifications    
-@@ -133,7 +135,7 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
-     
-     _layout = new QGridLayout(_extraControls);
-     
--    _dialog = new KFileDialog(KUrl(""), QString(""), 0, _extraControls);
-+    _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
-     _dialog->setMode(KFile::File | KFile::LocalOnly);
-     
-     //default mode
-@@ -180,21 +182,19 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
-         }
-     }
-     
-+    _dialog->clearFilter();
-     _dialog->setFilter(_filter);
-+
-     _dialog->exec();
-     
-     //nasty hack to get a local qt event loop going to process the dialog
-     //otherwise the dialog returns immediately
-     while (_dialog->isVisible())
--    {
-         kapp->processEvents(QEventLoop::WaitForMoreEvents);
--    }
-     
-     //block and wait for user input
-     if (_dialog->result() == KFileDialog::Accepted)
--    {
-         return ExecutableDialogResults::OK;
--    }
-     
-     return ExecutableDialogResults::CANCEL;
- }
-@@ -203,13 +203,9 @@ void SAL_CALL KDE4FilePicker::setMultiSelectionMode( sal_Bool multiSelect )
-     throw( uno::RuntimeException )
- {
-     if (multiSelect)
--    {
-         _dialog->setMode(KFile::Files | KFile::LocalOnly);
--    }
-     else
--    {
-         _dialog->setMode(KFile::File | KFile::LocalOnly);
--    }
- }
- 
- void SAL_CALL KDE4FilePicker::setDefaultName( const ::rtl::OUString &name )
-@@ -223,7 +219,7 @@ void SAL_CALL KDE4FilePicker::setDisplayDirectory( const rtl::OUString &dir )
-     throw( uno::RuntimeException )
- {
-     const QString url = toQString(dir);
--    _dialog->setStartDir(KUrl(url));
-+    _dialog->setUrl(KUrl(url));
- }
- 
- rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory()
-@@ -236,16 +232,54 @@ rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory()
- uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
-     throw( uno::RuntimeException )
- {
--    QStringList files = _dialog->selectedFiles();
-+    QStringList rawFiles = _dialog->selectedFiles();
-+    QStringList files;
-     
--    uno::Sequence< ::rtl::OUString > seq(files.size());
-+    // check if we need to add an extension
-+    QString extension = "";
-+    if ( _dialog->operationMode() == KFileDialog::Saving )
-+    {
-+        QCheckBox *cb = dynamic_cast<QCheckBox*> (
-+            _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]);
-+
-+        if (cb->isChecked())
-+        {
-+            extension = _dialog->currentFilter(); // assuming filter value is like this *.ext
-+            extension.replace("*","");
-+        }
-+    }
-+
-+    // Workaround for the double click selection KDE4 bug
-+    // kde file picker returns the file and directories for selectedFiles()
-+    // when a file is double clicked
-+    // make a true list of files
-+    const QString dir = "file://" + KUrl(rawFiles[0]).directory();
-     
--    for (int i=0 ; i<files.size() ; ++i)
-+    // by appending the dir, we make OO treat all opens like multifile opens
-+    // this makes the code for adding the the OO sequence simpler
-+    files.append(dir);
-+
-+    for (USHORT i = 0; i < rawFiles.size(); ++i)
-     {
--        const QString fileName = "file:" + files[i];
--        seq[i] = toOUString(fileName);
-+        // if the raw file is not the base directory (see above kde bug)
-+        // we add the file to list of avail files
-+        if ((dir + "/") != ("file://" + rawFiles[i]))
-+        {
-+            const QString filename = KUrl(rawFiles[i]).fileName();
-+
-+            //prevent extension append if we already have one
-+            if (filename.endsWith(extension))
-+                files.append(filename);
-+            else
-+                files.append(filename + extension);
-+        }
-     }
-     
-+    // add all files and leading directory to outgoing OO sequence
-+    uno::Sequence< ::rtl::OUString > seq(files.size());
-+    for (int i = 0; i < files.size(); ++i)
-+        seq[i] = toOUString(files[i]);
-+
-     return seq;
- }
- 
-@@ -256,9 +290,7 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
-     QString f = toQString(filter);
-     
-     if (!_filter.isNull())
--    {
-         _filter.append("\n");
--    }
-     
-     //add to hash map for reverse lookup in getCurrentFilter
-     _filters.insert(f, t);
-@@ -285,17 +317,31 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
-     
-     //default if not found
-     if (filter.isNull())
--    {
-         filter = "ODF Text Document (.odt)";
--    }
-     
-     return toOUString(filter);
- }
- 
--void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString&, const uno::Sequence<beans::StringPair>& )
-+void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString&, const uno::Sequence<beans::StringPair>&)
-     throw( lang::IllegalArgumentException, uno::RuntimeException )
- {
--    //TODO
-+    //TODO ... don't really like this behavior... Shtylman
-+#if 0
-+    if (!_filter.isNull())
-+        _filter.append(QString("\n"));
-+
-+    for (USHORT i = 0; i < filters.getLength(); ++i)
-+    {
-+        beans::StringPair aPair = filters[i];
-+
-+        _filter.append(QString("%1|%2").arg(
-+            toQString(aPair.Second).replace(";", " ")).arg(
-+            toQString(aPair.First).replace("/","\\/") + "\n" ));
-+    }
-+
-+    if (filters.getLength() > 0)
-+        _filter.append(QString("*.*|*.*"));
-+#endif
- }
- 
- void SAL_CALL KDE4FilePicker::setValue( sal_Int16 controlId, sal_Int16, const uno::Any &value )
--- 
-1.7.0.1
-
diff --git a/patches/dev300/kde4_fpicker_fixes2.diff b/patches/dev300/kde4_fpicker_fixes2.diff
deleted file mode 100644
index 200cf41..0000000
--- a/patches/dev300/kde4_fpicker_fixes2.diff
+++ /dev/null
@@ -1,257 +0,0 @@
-From 34bf8396cd63fe634e7ecc2885abe8d477c23524 Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:01:04 +0200
-Subject: [PATCH 440/878] kde4_fpicker_fixes2.diff
-
----
- fpicker/source/unx/kde4/KDE4FilePicker.cxx |   57 ++++++++++++++--------------
- vcl/unx/kde4/KDESalFrame.cxx               |   23 +++++------
- vcl/unx/kde4/KDEXLib.cxx                   |   15 ++++++-
- 3 files changed, 52 insertions(+), 43 deletions(-)
-
-diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-index bbc27ad..0421d01 100644
---- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-@@ -132,14 +132,12 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
-           _resMgr( CREATEVERSIONRESMGR( fps_office ) )
- {
-     _extraControls = new QWidget();
--    
-     _layout = new QGridLayout(_extraControls);
-     
-     _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
-     _dialog->setMode(KFile::File | KFile::LocalOnly);
-     
--    //default mode
--    _dialog->setOperationMode(KFileDialog::Opening);
-+    _dialog->setStyleSheet("color: black;");
- }
- 
- KDE4FilePicker::~KDE4FilePicker()
-@@ -185,15 +183,8 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
-     _dialog->clearFilter();
-     _dialog->setFilter(_filter);
- 
--    _dialog->exec();
--    
--    //nasty hack to get a local qt event loop going to process the dialog
--    //otherwise the dialog returns immediately
--    while (_dialog->isVisible())
--        kapp->processEvents(QEventLoop::WaitForMoreEvents);
--    
-     //block and wait for user input
--    if (_dialog->result() == KFileDialog::Accepted)
-+    if (_dialog->exec() == KFileDialog::Accepted)
-         return ExecutableDialogResults::OK;
-     
-     return ExecutableDialogResults::CANCEL;
-@@ -255,9 +246,15 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
-     // make a true list of files
-     const QString dir = "file://" + KUrl(rawFiles[0]).directory();
-     
--    // by appending the dir, we make OO treat all opens like multifile opens
--    // this makes the code for adding the the OO sequence simpler
--    files.append(dir);
-+    bool singleFile = true;
-+    if (rawFiles.size() > 1)
-+    {
-+        singleFile = false;
-+        //for multi file sequences, oo expects the first param to be the directory
-+        //can't treat all cases like multi file because in some instances (inserting image)
-+        //oo WANTS only one entry in the final list
-+        files.append(dir);
-+    }
- 
-     for (USHORT i = 0; i < rawFiles.size(); ++i)
-     {
-@@ -265,7 +262,10 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
-         // we add the file to list of avail files
-         if ((dir + "/") != ("file://" + rawFiles[i]))
-         {
--            const QString filename = KUrl(rawFiles[i]).fileName();
-+            QString filename = KUrl(rawFiles[i]).fileName();
-+
-+            if (singleFile)
-+                filename.prepend(dir + "/");
- 
-             //prevent extension append if we already have one
-             if (filename.endsWith(extension))
-@@ -299,21 +299,24 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
-     //see the docs
-     t.replace("/", "\\/");
-     
-+    // openoffice gives us filters separated by ';' qt dialogs just want space separated
-+    f.replace(";", " ");
-+
-     _filter.append(QString("%1|%2").arg(f).arg(t));
- }
- 
- void SAL_CALL KDE4FilePicker::setCurrentFilter( const rtl::OUString &title )
-     throw( lang::IllegalArgumentException, uno::RuntimeException )
- {
--    QString filter = toQString(title);
--    filter.replace("/", "\\/");
--    _dialog->filterWidget()->setCurrentFilter(filter);
-+    QString t = toQString(title);
-+    t.replace("/", "\\/");
-+    _dialog->filterWidget()->setCurrentFilter(t);
- }
- 
- rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
-     throw( uno::RuntimeException )
- {
--    QString filter = _filters[_dialog->currentFilter()];
-+    QString filter = _dialog->filterWidget()->currentText();
-     
-     //default if not found
-     if (filter.isNull())
-@@ -322,26 +325,24 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
-     return toOUString(filter);
- }
- 
--void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString&, const uno::Sequence<beans::StringPair>&)
-+void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const uno::Sequence<beans::StringPair>& filters)
-     throw( lang::IllegalArgumentException, uno::RuntimeException )
- {
--    //TODO ... don't really like this behavior... Shtylman
--#if 0
-     if (!_filter.isNull())
-         _filter.append(QString("\n"));
- 
--    for (USHORT i = 0; i < filters.getLength(); ++i)
-+    const USHORT length = filters.getLength();
-+    for (USHORT i = 0; i < length; ++i)
-     {
-         beans::StringPair aPair = filters[i];
- 
-         _filter.append(QString("%1|%2").arg(
-             toQString(aPair.Second).replace(";", " ")).arg(
--            toQString(aPair.First).replace("/","\\/") + "\n" ));
--    }
-+            toQString(aPair.First).replace("/","\\/")));
- 
--    if (filters.getLength() > 0)
--        _filter.append(QString("*.*|*.*"));
--#endif
-+        if (i != length - 1)
-+            _filter.append('\n');
-+    }
- }
- 
- void SAL_CALL KDE4FilePicker::setValue( sal_Int16 controlId, sal_Int16, const uno::Any &value )
-diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
-index 5da4008..f322fa8 100644
---- a/vcl/unx/kde4/KDESalFrame.cxx
-+++ b/vcl/unx/kde4/KDESalFrame.cxx
-@@ -180,7 +180,6 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
- {
-     StyleSettings style( rSettings.GetStyleSettings() );
-     BOOL bSetTitleFont = false;
--
-     
-     // General settings
-     QPalette pal = kapp->palette();
-@@ -214,6 +213,14 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
-         pKey = "Theme";
-         if ( aGroup.hasKey( pKey ) )
-             style.SetPreferredSymbolsStyleName( readEntryUntranslated( &aGroup, pKey ) );
-+
-+        //toolbar
-+        pKey = "toolbarFont";
-+        if ( aGroup.hasKey( pKey ) )
-+        {
-+            Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), rSettings.GetUILocale() );
-+            style.SetToolFont( aFont );
-+        }
-     }
-     
-     Color aFore = toColor( pal.color( QPalette::Active, QPalette::WindowText ) );
-@@ -288,7 +295,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
-     
-     style.SetFloatTitleFont( aFont );
-     style.SetMenuFont( aFont ); // will be changed according to pMenuBar
--    style.SetToolFont( aFont ); // will be changed according to pToolBar
-+    //style.SetToolFont( aFont ); //already set above
-     style.SetLabelFont( aFont );
-     style.SetInfoFont( aFont );
-     style.SetRadioCheckFont( aFont );
-@@ -300,11 +307,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
-     int flash_time = QApplication::cursorFlashTime();
-     style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME );
- 
--    KMainWindow qMainWindow;
--
-     // Menu
-     style.SetSkipDisabledInMenus( TRUE );
--    KMenuBar *pMenuBar = qMainWindow.menuBar();
-+    KMenuBar* pMenuBar = new KMenuBar();
-     if ( pMenuBar )
-     {
-         // Color
-@@ -337,13 +342,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
-         style.SetMenuFont( aFont );
-     }
- 
--    // Tool bar
--    KToolBar *pToolBar = qMainWindow.toolBar();
--    if ( pToolBar )
--    {
--        aFont = toFont( pToolBar->font(), rSettings.GetUILocale() );
--        style.SetToolFont( aFont );
--    }
-+    delete pMenuBar;
- 
-     // Scroll bar size
-     style.SetScrollBarSize( kapp->style()->pixelMetric( QStyle::PM_ScrollBarExtent ) );
-diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
-index 042f331..34d3745 100644
---- a/vcl/unx/kde4/KDEXLib.cxx
-+++ b/vcl/unx/kde4/KDEXLib.cxx
-@@ -78,24 +78,32 @@ void KDEXLib::Init()
-     pInputMethod->SetLocale();
-     XrmInitialize();
- 
--    KAboutData *kAboutData = new KAboutData( "OpenOffice.org",
--            "OpenOffice.org",
-+    KAboutData *kAboutData = new KAboutData("OpenOffice.org",
-+            "kdelibs4",
-             ki18n( "OpenOffice.org" ),
-             "3.0.0",
-             ki18n( "OpenOffice.org with KDE Native Widget Support." ),
-             KAboutData::License_LGPL,
--            ki18n( "Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 Novell, Inc"),
-+            ki18n( "Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Novell, Inc"),
-             ki18n( "OpenOffice.org is an office suite.\n" ),
-             "http://kde.openoffice.org/index.html",
-             "dev at kde.openoffice.org" );
-+
-     kAboutData->addAuthor( ki18n( "Jan Holesovsky" ),
-             ki18n( "Original author and maintainer of the KDE NWF." ),
-             "kendy at artax.karlin.mff.cuni.cz",
-             "http://artax.karlin.mff.cuni.cz/~kendy" );
-+    kAboutData->addAuthor( ki18n("Roman Shtylman"),
-+            ki18n( "Porting to KDE 4." ),
-+            "shtylman at gmail.com", "http://shtylman.com" );
-     kAboutData->addAuthor( ki18n("Eric Bischoff"),
-             ki18n( "Accessibility fixes, porting to KDE 4." ),
-             "bischoff at kde.org" );
- 
-+#if KDE_IS_VERSION(4,0,90) // version 4.1 and above
-+    kAboutData->setProgramIconName("x-office-document");
-+#endif
-+
-     m_nFakeCmdLineArgs = 1;
-     USHORT nIdx;
-     vos::OExtCommandLine aCommandLine;
-@@ -136,6 +144,7 @@ void KDEXLib::Init()
-     
-     m_pApplication = new VCLKDEApplication();
-     kapp->disableSessionManagement();
-+    KApplication::setQuitOnLastWindowClosed(false);
-     
-     Display* pDisp = QX11Info::display();
-     SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
--- 
-1.7.0.1
-
diff --git a/patches/dev300/kde4_fpicker_fixes3.diff b/patches/dev300/kde4_fpicker_fixes3.diff
deleted file mode 100644
index c3ad234..0000000
--- a/patches/dev300/kde4_fpicker_fixes3.diff
+++ /dev/null
@@ -1,84 +0,0 @@
-From 53a2a5abdf0c51bc1db985033fc438d718325e14 Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:01:05 +0200
-Subject: [PATCH 441/878] kde4_fpicker_fixes3.diff
-
----
- fpicker/source/unx/kde4/KDE4FilePicker.cxx |   16 +++++++++-------
- 1 files changed, 9 insertions(+), 7 deletions(-)
-
-diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-index 0421d01..afa125f 100644
---- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
-@@ -136,8 +136,6 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
-     
-     _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
-     _dialog->setMode(KFile::File | KFile::LocalOnly);
--    
--    _dialog->setStyleSheet("color: black;");
- }
- 
- KDE4FilePicker::~KDE4FilePicker()
-@@ -182,6 +180,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
-     
-     _dialog->clearFilter();
-     _dialog->setFilter(_filter);
-+    _dialog->filterWidget()->setEditable(false);
- 
-     //block and wait for user input
-     if (_dialog->exec() == KFileDialog::Accepted)
-@@ -233,7 +232,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
-         QCheckBox *cb = dynamic_cast<QCheckBox*> (
-             _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]);
- 
--        if (cb->isChecked())
-+        if (cb && cb->isChecked())
-         {
-             extension = _dialog->currentFilter(); // assuming filter value is like this *.ext
-             extension.replace("*","");
-@@ -628,27 +627,27 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
-             
-         case FILESAVE_AUTOEXTENSION:
-             operationMode = KFileDialog::Saving;
--            addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-+            //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-             break;
- 
-         case FILESAVE_AUTOEXTENSION_PASSWORD:
-         {
-             operationMode = KFileDialog::Saving;
--            addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-+            //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-             addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD );
-             break;
-         }
-         case FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS:
-         {
-             operationMode = KFileDialog::Saving;
--            addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-+            //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-             addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD );
-             addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS );
-             break;
-         }
-         case FILESAVE_AUTOEXTENSION_SELECTION:
-             operationMode = KFileDialog::Saving;
--            addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-+            //addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
-             addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_SELECTION );
-             break;
- 
-@@ -685,6 +684,9 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
-     }
-     
-     _dialog->setOperationMode(operationMode);
-+#if KDE_IS_VERSION(4,2,0) // version 4.2 and above
-+    _dialog->setConfirmOverwrite(true);
-+#endif
- }
- 
- void SAL_CALL KDE4FilePicker::cancel()
--- 
-1.7.0.1
-
diff --git a/patches/dev300/kde4_vcl_fixes.diff b/patches/dev300/kde4_vcl_fixes.diff
deleted file mode 100644
index 9b66e97..0000000
--- a/patches/dev300/kde4_vcl_fixes.diff
+++ /dev/null
@@ -1,382 +0,0 @@
-From f0aa3428867db41adaf0f4a3ad451d71a9c59302 Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:01:02 +0200
-Subject: [PATCH 439/878] kde4_vcl_fixes.diff
-
----
- vcl/unx/kde4/KDESalGraphics.cxx    |  184 +++++++++++++++---------------------
- vcl/unx/kde4/KDEXLib.cxx           |    5 +-
- vcl/unx/kde4/KDEXLib.hxx           |    4 +-
- vcl/unx/kde4/VCLKDEApplication.cxx |    3 +
- 4 files changed, 87 insertions(+), 109 deletions(-)
-
-diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
-index 59b7fc8..d80e76c 100644
---- a/vcl/unx/kde4/KDESalGraphics.cxx
-+++ b/vcl/unx/kde4/KDESalGraphics.cxx
-@@ -94,53 +94,36 @@ QRect region2QRect( const Region& rControlRegion )
- 
- BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
- {
-+    //don't do a catch all incase new controls are added
-     if (type == CTRL_PUSHBUTTON) return true;
--    
--    if (type == CTRL_MENUBAR) return true;
--    
--    if (type == CTRL_MENU_POPUP) return true;
--    
--    if (type == CTRL_EDITBOX) return true;
--    
--    if (type == CTRL_COMBOBOX) return true;
--    
--    if (type == CTRL_TOOLBAR) return true;
--    
--    if (type == CTRL_CHECKBOX) return true;
--    
--    if (type == CTRL_LISTBOX) return true;
--    
--    if (type == CTRL_LISTNODE) return true;
--    
--    if (type == CTRL_FRAME) return true;
--    
--    if (type == CTRL_SCROLLBAR) return true;
--    
--    if (type == CTRL_WINDOW_BACKGROUND) return true;
--    
--    if (type == CTRL_SPINBOX && (part == PART_ENTIRE_CONTROL || part == HAS_BACKGROUND_TEXTURE) ) return true;
-+    else if (type == CTRL_MENUBAR) return true;
-+    else if (type == CTRL_MENU_POPUP) return true;
-+    else if (type == CTRL_EDITBOX) return true;
-+    else if (type == CTRL_COMBOBOX) return true;
-+    else if (type == CTRL_TOOLBAR) return true;
-+    else if (type == CTRL_CHECKBOX) return true;
-+    else if (type == CTRL_LISTBOX) return true;
-+    else if (type == CTRL_LISTNODE) return true;
-+    else if (type == CTRL_FRAME) return true;
-+    else if (type == CTRL_SCROLLBAR) return true;
-+    else if (type == CTRL_WINDOW_BACKGROUND) return true;
-+    else if (type == CTRL_SPINBOX && (part == PART_ENTIRE_CONTROL || part == HAS_BACKGROUND_TEXTURE) ) return true;
- 
-     // no spinbuttons for KDE, paint spinbox complete
-     //if (type == CTRL_SPINBUTTONS) return true;
--    
--    if (type == CTRL_GROUPBOX) return true;
--    
--    if (type == CTRL_FIXEDLINE) return true;
--    
--    if (type == CTRL_FIXEDBORDER) return true;
--    
--    if (type == CTRL_TOOLTIP) return true;
--    
--    if (type == CTRL_RADIOBUTTON) return true;
-+
-+    else if (type == CTRL_GROUPBOX) return true;
-+    else if (type == CTRL_FIXEDLINE) return true;
-+    else if (type == CTRL_FIXEDBORDER) return true;
-+    else if (type == CTRL_TOOLTIP) return true;
-+    else if (type == CTRL_RADIOBUTTON) return true;
-     
-     return false;
-     
--    if ( (type == CTRL_TAB_ITEM) && (part == PART_ENTIRE_CONTROL) ) return true;
--    if ( (type == CTRL_TAB_PANE) && (part == PART_ENTIRE_CONTROL) ) return true;
-+    //if ( (type == CTRL_TAB_ITEM) && (part == PART_ENTIRE_CONTROL) ) return true;
-+    //if ( (type == CTRL_TAB_PANE) && (part == PART_ENTIRE_CONTROL) ) return true;
-     // no CTRL_TAB_BODY for KDE
--    if ( (type == CTRL_PROGRESS)    && (part == PART_ENTIRE_CONTROL) ) return true;
--        
--    return false;
-+    //if ( (type == CTRL_PROGRESS)    && (part == PART_ENTIRE_CONTROL) ) return true;
- }
- 
- 
-@@ -180,19 +163,20 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-                                         const ImplControlValue& value, SalControlHandle&,
-                                         const OUString& )
- {
--    // put not implemented types here
--    if (type == CTRL_SPINBUTTONS)
--    {
-+
-+    if (!IsNativeControlSupported(type, part))
-         return false;
--    }
-     
-     BOOL returnVal = true;
- 
-+    SelectFont();
-+    SelectPen();
-+
-     Display* dpy = GetXDisplay();
-     XLIB_Window drawable = GetDrawable();
-     GC gc = SelectPen();
-     
--    QRect widgetRect = region2QRect(rControlRegion);
-+    QRect widgetRect = region2QRect(rControlRegion.GetBoundRect());
-     if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS )
-         type = CTRL_SPINBUTTONS;
-     if( type == CTRL_SPINBUTTONS )
-@@ -204,30 +188,13 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-                             aButtonRect.Right(), aButtonRect.Bottom() );
-     }
-     
--    //draw right onto the window
-     QPixmap pixmap(widgetRect.width(), widgetRect.height());
-     
--    if (pixmap.isNull())
--    {
--        return false;
--    }
-+    // always fill the background
-+    // this way we avoid copying the screen contents over to our pixmap
-+    pixmap.fill(KApplication::palette().color(QPalette::Window));
-     
-     QPainter painter(&pixmap);
--    // painter.setBackgroundMode(Qt::OpaqueMode);
--    
--    //copy previous screen contents for proper blending
--    #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
--    QPixmap screen = QPixmap::fromX11Pixmap(drawable);
--    painter.drawPixmap(0,0, screen, widgetRect.left(), widgetRect.top(), widgetRect.width(), widgetRect.height());
--    #else
--    const QX11Info& rX11Info( pixmap.x11Info() );
--    X11SalGraphics::CopyScreenArea( dpy,
--                              drawable, GetScreenNumber(), GetBitCount(),
--                              pixmap.handle(), rX11Info.screen(), rX11Info.depth(),
--                              GetDisplay()->GetCopyGC( GetScreenNumber() ),
--                              widgetRect.left(), widgetRect.top(), widgetRect.width(), widgetRect.height(),
--                              0, 0 );
--    #endif
-     
-     if (type == CTRL_PUSHBUTTON)
-     {
-@@ -249,9 +216,8 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-             
-             kapp->style()->drawControl( QStyle::CE_MenuBarItem, &styleOption, &painter);
-         }
--        else
-+        else if (part == PART_ENTIRE_CONTROL)
-         {
--            pixmap.fill(KApplication::palette().color(QPalette::Window));
-         }
-     }
-     else if (type == CTRL_MENU_POPUP)
-@@ -291,7 +257,6 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-         }
-         else
-         {
--            pixmap.fill(KApplication::palette().color(QPalette::Window));
-             
-             #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
-             QStyleOptionFrameV3 styleOption;
-@@ -308,42 +273,48 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-             kapp->style()->drawPrimitive( QStyle::PE_FrameMenu, &styleOption, &painter);
-         }
-     }
--    else if ( (type == CTRL_TOOLBAR) && (part == PART_BUTTON) )
--    {
--        QStyleOptionToolButton styleOption;
--        
--        styleOption.arrowType = Qt::NoArrow;
--        styleOption.subControls = QStyle::SC_ToolButton;
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        styleOption.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
--        
--        kapp->style()->drawComplexControl( QStyle::CC_ToolButton, &styleOption, &painter);
--    }
--    else if ( (type == CTRL_TOOLBAR) && (part == PART_ENTIRE_CONTROL) )
-+    else if (type == CTRL_TOOLBAR)
-     {
--        QStyleOptionToolBar styleOption;
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        kapp->style()->drawControl( QStyle::CE_ToolBar, &styleOption, &painter);
--    }
--    else if ( (type == CTRL_TOOLBAR) && (part == PART_THUMB_VERT) )
--    {
--        QStyleOption styleOption;
--        
--        int width = kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent);
--        
--        styleOption.rect = QRect(0, 0, width, widgetRect.height());
--        styleOption.state = QStyle::State_Horizontal;
--        
--        kapp->style()->drawPrimitive( QStyle::PE_IndicatorToolBarHandle, &styleOption, &painter);
-+        if (part == PART_BUTTON)
-+        {
-+            QStyleOptionToolButton styleOption;
-+
-+            styleOption.arrowType = Qt::NoArrow;
-+            styleOption.subControls = QStyle::SC_ToolButton;
-+
-+            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-+            styleOption.state = vclStateValue2StateFlag( nControlState, value );
-+            styleOption.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
-+
-+            kapp->style()->drawComplexControl( QStyle::CC_ToolButton, &styleOption, &painter);
-+        }
-+        else if (part == PART_THUMB_VERT)
-+        {
-+            QStyleOption styleOption;
-+
-+            int width = kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent);
-+
-+            styleOption.rect = QRect(0, 0, width, widgetRect.height());
-+            styleOption.state = QStyle::State_Horizontal;
-+
-+            kapp->style()->drawPrimitive( QStyle::PE_IndicatorToolBarHandle, &styleOption, &painter);
-+        }
-+        else if (part == PART_ENTIRE_CONTROL)
-+        {
-+            QStyleOptionToolBar styleOption;
-+
-+            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-+            styleOption.state = vclStateValue2StateFlag( nControlState, value );
-+
-+            kapp->style()->drawControl( QStyle::CE_ToolBar, &styleOption, &painter);
-+        }
-+        else
-+        {
-+            returnVal = false;
-+        }
-     }
-     else if (type == CTRL_EDITBOX)
-     {
--        pixmap.fill(KApplication::palette().color(QPalette::Window));
-         
-         //TODO hover?? OO does not seem to do this for line edits
-         
-@@ -364,7 +335,6 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-     }
-     else if (type == CTRL_COMBOBOX)
-     {
--        pixmap.fill(KApplication::palette().color(QPalette::Window));
-         
-         QStyleOptionComboBox styleOption;
-         
-@@ -383,6 +353,12 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-         }
-         else
-         {
-+        if( part == PART_WINDOW )
-+        {
-+            lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
-+        }
-+        else
-+        {
-             QStyleOptionComboBox styleOption;
-             
-             styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-@@ -397,6 +373,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-                 kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
-             }
-         }
-+        }
-     }
-     else if (type == CTRL_LISTNODE)
-     {
-@@ -426,8 +403,6 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-     }
-     else if (type == CTRL_SCROLLBAR)
-     {
--        pixmap.fill(KApplication::palette().color(QPalette::Window));
--        
-         if ((part == PART_DRAW_BACKGROUND_VERT) || (part == PART_DRAW_BACKGROUND_HORZ))
-         {
-             ScrollbarValue* sbVal = static_cast<ScrollbarValue *> ( value.getOptionalVal() );
-@@ -470,8 +445,6 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-     }
-     else if (type == CTRL_SPINBOX)
-     {
--        pixmap.fill(KApplication::palette().color(QPalette::Window));
--        
-         QStyleOptionSpinBox styleOption;
-         styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-         styleOption.state = vclStateValue2StateFlag( nControlState, value );
-@@ -521,7 +494,6 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-     }
-     else if (type == CTRL_WINDOW_BACKGROUND)
-     {
--        pixmap.fill(KApplication::palette().color(QPalette::Window));	
-     }
-     else if (type == CTRL_FIXEDLINE)
-     {
-@@ -558,7 +530,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
- {
-     bool retVal = false;
-     
--    QRect boundingRect = region2QRect( controlRegion );
-+    QRect boundingRect = region2QRect( controlRegion.GetBoundRect() );
-     QRect contentRect = boundingRect;
-     QStyleOptionComplex styleOption;
-     
-diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
-index a7a84cc..042f331 100644
---- a/vcl/unx/kde4/KDEXLib.cxx
-+++ b/vcl/unx/kde4/KDEXLib.cxx
-@@ -34,6 +34,7 @@
- #include <kaboutdata.h>
- #include <kcmdlineargs.h>
- #include <kstartupinfo.h>
-+#include <kmainwindow.h>
- 
- #undef Region
- 
-@@ -59,7 +60,7 @@ KDEXLib::KDEXLib() :
- 
- KDEXLib::~KDEXLib()
- {
--    delete (VCLKDEApplication*)m_pApplication;
-+    delete m_pApplication;
-     
-     // free the faked cmdline arguments no longer needed by KApplication
-     for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
-@@ -139,7 +140,7 @@ void KDEXLib::Init()
-     Display* pDisp = QX11Info::display();
-     SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
-     
--    ((VCLKDEApplication*)m_pApplication)->disp = pSalDisplay;
-+    m_pApplication->disp = pSalDisplay;
- 
-     XSetIOErrorHandler	  ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
-     XSetErrorHandler	  ( (XErrorHandler)X11SalData::XErrorHdl );
-diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
-index 4c79876..59a78cb 100644
---- a/vcl/unx/kde4/KDEXLib.hxx
-+++ b/vcl/unx/kde4/KDEXLib.hxx
-@@ -29,11 +29,13 @@
- 
- #include <saldisp.hxx>
- 
-+class VCLKDEApplication;
-+
- class KDEXLib : public SalXLib
- {
-     private:
-         bool m_bStartupDone;
--        void* m_pApplication;
-+        VCLKDEApplication* m_pApplication;
-         char** m_pFreeCmdLineArgs;
-         char** m_pAppCmdLineArgs;
-         int m_nFakeCmdLineArgs;
-diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
-index 3af71cb..87071ba 100644
---- a/vcl/unx/kde4/VCLKDEApplication.cxx
-+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
-@@ -41,6 +41,9 @@ VCLKDEApplication::VCLKDEApplication() :
- 
- bool VCLKDEApplication::x11EventFilter(XEvent* event)
- {
-+    disp->DispatchInternalEvent();
-+    disp->GetXLib()->CheckTimeout(true);
-+
-     //if we have a display and the display consumes the event
-     //do not process the event in qt
-     if (disp && disp->Dispatch(event) > 0)
--- 
-1.7.0.1
-
diff --git a/patches/dev300/kde4_vcl_fixes2.diff b/patches/dev300/kde4_vcl_fixes2.diff
deleted file mode 100644
index 58f1f0f..0000000
--- a/patches/dev300/kde4_vcl_fixes2.diff
+++ /dev/null
@@ -1,657 +0,0 @@
-From 463521c1776e7df0fc808a17926aa26f77317d0d Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:01:06 +0200
-Subject: [PATCH 442/878] kde4_vcl_fixes2.diff
-
----
- vcl/unx/kde4/KDESalGraphics.cxx |  440 ++++++++++++++++++---------------------
- vcl/unx/kde4/KDESalGraphics.hxx |   12 +-
- 2 files changed, 214 insertions(+), 238 deletions(-)
-
-diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
-index d80e76c..0609e11 100644
---- a/vcl/unx/kde4/KDESalGraphics.cxx
-+++ b/vcl/unx/kde4/KDESalGraphics.cxx
-@@ -87,9 +87,18 @@ QStyle::State vclStateValue2StateFlag( ControlState nControlState,
- QRect region2QRect( const Region& rControlRegion )
- {
-     Rectangle aRect = rControlRegion.GetBoundRect();
-+    return QRect(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.GetHeight());
-+}
- 
--    return QRect( QPoint( aRect.Left(), aRect.Top() ),
--          QPoint( aRect.Right(), aRect.Bottom() ) );
-+KDESalGraphics::KDESalGraphics() :
-+    m_image(0)
-+{
-+}
-+
-+KDESalGraphics::~KDESalGraphics()
-+{
-+    if (m_image)
-+        delete m_image;
- }
- 
- BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
-@@ -126,7 +135,6 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
-     //if ( (type == CTRL_PROGRESS)    && (part == PART_ENTIRE_CONTROL) ) return true;
- }
- 
--
- BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
-                                            const Region&, const Point&,
-                                            SalControlHandle&, BOOL& )
-@@ -134,28 +142,57 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
-     return FALSE;
- }
- 
--void lcl_drawFrame( QRect& i_rRect, QPainter& i_rPainter, QStyle::PrimitiveElement i_nElement,
--                    ControlState i_nState, const ImplControlValue& i_rValue )
-+/// helper drawing methods
-+namespace
- {
-+    void draw(QStyle::ControlElement element, QStyleOption* option, QImage* image, QStyle::State state)
-+    {
-+        option->state |= state;
-+        option->rect = image->rect();
-+
-+        QPainter painter(image);
-+        kapp->style()->drawControl(element, option, &painter);
-+    }
-+
-+    void draw(QStyle::PrimitiveElement element, QStyleOption* option, QImage* image, QStyle::State state)
-+    {
-+        option->state |= state;
-+        option->rect = image->rect();
-+
-+        QPainter painter(image);
-+        kapp->style()->drawPrimitive(element, option, &painter);
-+    }
-+
-+    void draw(QStyle::ComplexControl element, QStyleOptionComplex* option, QImage* image, QStyle::State state)
-+    {
-+        option->state |= state;
-+        option->rect = image->rect();
-+
-+        QPainter painter(image);
-+        kapp->style()->drawComplexControl(element, option, &painter);
-+    }
-+
-+    void lcl_drawFrame(QStyle::PrimitiveElement element, QImage* image, QStyle::State state)
-+    {
-     #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
--    QStyleOptionFrameV3 styleOption;
--    styleOption.frameShape = QFrame::StyledPanel;		
-+        QStyleOptionFrameV3 option;
-+        option.frameShape = QFrame::StyledPanel;
-+        option.state = QStyle::State_Sunken;
-     #else
--    QStyleOptionFrame styleOption;
--    QFrame aFrame( NULL );
--    aFrame.setFrameRect( QRect(0, 0, i_rRect.width(), i_rRect.height()) );
--    aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
--    aFrame.ensurePolished();
--    styleOption.initFrom( &aFrame );
--    styleOption.lineWidth = aFrame.lineWidth();
--    styleOption.midLineWidth = aFrame.midLineWidth();
--    #endif
--    styleOption.rect = QRect(0, 0, i_rRect.width(), i_rRect.height());
--    styleOption.state = vclStateValue2StateFlag( i_nState, i_rValue );
--    #if ( QT_VERSION < QT_VERSION_CHECK( 4, 5, 0 ) )
--    styleOption.state |= QStyle::State_Sunken;
-+        QStyleOptionFrame option;
-+
-+        QFrame aFrame( NULL );
-+        aFrame.setFrameRect( QRect(0, 0, image->width(), image->height()) );
-+        aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
-+        aFrame.ensurePolished();
-+
-+        option.initFrom( &aFrame );
-+        option.lineWidth = aFrame.lineWidth();
-+        option.midLineWidth = aFrame.midLineWidth();
-     #endif
--    kapp->style()->drawPrimitive(i_nElement, &styleOption, &i_rPainter);
-+
-+        draw(element, &option, image, state);
-+    }
- }
- 
- BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-@@ -163,22 +200,15 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-                                         const ImplControlValue& value, SalControlHandle&,
-                                         const OUString& )
- {
--
-     if (!IsNativeControlSupported(type, part))
-         return false;
-     
-     BOOL returnVal = true;
- 
--    SelectFont();
--    SelectPen();
--
--    Display* dpy = GetXDisplay();
--    XLIB_Window drawable = GetDrawable();
--    GC gc = SelectPen();
--    
-     QRect widgetRect = region2QRect(rControlRegion.GetBoundRect());
-     if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS )
-         type = CTRL_SPINBUTTONS;
-+
-     if( type == CTRL_SPINBUTTONS )
-     {
-         SpinbuttonValue* pSpinVal = (SpinbuttonValue *)(value.getOptionalVal());
-@@ -188,125 +218,105 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-                             aButtonRect.Right(), aButtonRect.Bottom() );
-     }
-     
--    QPixmap pixmap(widgetRect.width(), widgetRect.height());
--    
--    // always fill the background
--    // this way we avoid copying the screen contents over to our pixmap
--    pixmap.fill(KApplication::palette().color(QPalette::Window));
--    
--    QPainter painter(&pixmap);
--    
-+    //if no image, or resized, make a new image
-+    if (!m_image || m_image->size() != widgetRect.size())
-+    {
-+        if (m_image)
-+            delete m_image;
-+
-+        m_image = new QImage(widgetRect.width(), widgetRect.height(),
-+                             QImage::Format_ARGB32);
-+        m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
-+    }
-+
-     if (type == CTRL_PUSHBUTTON)
-     {
--        QStyleOptionButton styleOption;
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state =vclStateValue2StateFlag( nControlState, value );
--        
--        kapp->style()->drawControl( QStyle::CE_PushButton, &styleOption, &painter);
-+        QStyleOptionButton option;
-+        draw(QStyle::CE_PushButton, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
--    else if ( (type == CTRL_MENUBAR))
-+    else if (type == CTRL_MENUBAR)
-     {
--        if (part == PART_MENU_ITEM) 
-+        if (part == PART_MENU_ITEM)
-         {
--            QStyleOptionMenuItem styleOption;
--            
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            
--            kapp->style()->drawControl( QStyle::CE_MenuBarItem, &styleOption, &painter);
-+            QStyleOptionMenuItem option;
-+            draw(QStyle::CE_MenuBarItem, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-         }
-         else if (part == PART_ENTIRE_CONTROL)
-         {
-+            QStyleOption option;
-+            draw(QStyle::CE_MenuBarEmptyArea, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-+        }
-+        else
-+        {
-+            returnVal = false;
-         }
-     }
-     else if (type == CTRL_MENU_POPUP)
-     {		
-         if (part == PART_MENU_ITEM)
-         {
--            QStyleOptionMenuItem styleOption;
--            
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            
--            kapp->style()->drawControl( QStyle::CE_MenuItem, &styleOption, &painter);
-+            QStyleOptionMenuItem option;
-+            draw(QStyle::CE_MenuItem, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-         }
--        else if (part == PART_MENU_ITEM_CHECK_MARK)
-+        else if (part == PART_MENU_ITEM_CHECK_MARK && nControlState & CTRL_STATE_PRESSED)
-         {
--            QStyleOptionButton styleOption;
--            
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            
--            if (nControlState & CTRL_STATE_PRESSED)
--            {
--                kapp->style()->drawPrimitive( QStyle::PE_IndicatorMenuCheckMark, &styleOption, &painter);
--            }
-+            QStyleOptionButton option;
-+            draw(QStyle::PE_IndicatorMenuCheckMark, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-         }
--        else if (part == PART_MENU_ITEM_RADIO_MARK)
-+        else if (part == PART_MENU_ITEM_RADIO_MARK && nControlState & CTRL_STATE_PRESSED)
-         {
--            QStyleOptionButton styleOption;
--            
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            
--            if (nControlState & CTRL_STATE_PRESSED)
--            {
--                kapp->style()->drawPrimitive( QStyle::PE_IndicatorRadioButton, &styleOption, &painter);
--            }
-+            QStyleOptionButton option;
-+            draw(QStyle::PE_IndicatorRadioButton, &option, m_image,
-+                vclStateValue2StateFlag(nControlState, value));
-         }
-         else
-         {
-             
--            #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
--            QStyleOptionFrameV3 styleOption;
--            #else
--            QStyleOptionFrameV2 styleOption;
--            #endif
--        
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
--            styleOption.frameShape = QFrame::StyledPanel;
--            #endif
--            
--            kapp->style()->drawPrimitive( QStyle::PE_FrameMenu, &styleOption, &painter);
-+#if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
-+            QStyleOptionFrameV3 option;
-+            option.frameShape = QFrame::StyledPanel;
-+#else
-+            QStyleOptionFrameV2 option;
-+#endif
-+            draw(QStyle::PE_FrameMenu, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-         }
-     }
-     else if (type == CTRL_TOOLBAR)
-     {
-         if (part == PART_BUTTON)
-         {
--            QStyleOptionToolButton styleOption;
--
--            styleOption.arrowType = Qt::NoArrow;
--            styleOption.subControls = QStyle::SC_ToolButton;
-+            QStyleOptionToolButton option;
-+            option.arrowType = Qt::NoArrow;
-+            option.subControls = QStyle::SC_ToolButton;
-+            option.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
- 
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            styleOption.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
--
--            kapp->style()->drawComplexControl( QStyle::CC_ToolButton, &styleOption, &painter);
-+            draw(QStyle::CC_ToolButton, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-         }
-         else if (part == PART_THUMB_VERT)
-         {
--            QStyleOption styleOption;
-+            const int tw = widgetRect.width();
-+            widgetRect.setWidth(kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent));
- 
--            int width = kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent);
-+            QStyleOption option;
-+            option.state = QStyle::State_Horizontal;
- 
--            styleOption.rect = QRect(0, 0, width, widgetRect.height());
--            styleOption.state = QStyle::State_Horizontal;
-+            draw(QStyle::PE_IndicatorToolBarHandle, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
- 
--            kapp->style()->drawPrimitive( QStyle::PE_IndicatorToolBarHandle, &styleOption, &painter);
-+            widgetRect.setWidth(tw);
-         }
-         else if (part == PART_ENTIRE_CONTROL)
-         {
--            QStyleOptionToolBar styleOption;
--
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--
--            kapp->style()->drawControl( QStyle::CE_ToolBar, &styleOption, &painter);
-+            QStyleOptionToolBar option;
-+            draw(QStyle::CE_ToolBar, &option, m_image,
-+                 vclStateValue2StateFlag(nControlState, value));
-         }
-         else
-         {
-@@ -315,211 +325,171 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
-     }
-     else if (type == CTRL_EDITBOX)
-     {
--        
--        //TODO hover?? OO does not seem to do this for line edits
--        
--        #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
--        QStyleOptionFrameV3 styleOption;
--        #else
--        QStyleOptionFrameV2 styleOption;
--        #endif
--        
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        //TODO...how does the line edit draw itself internally??
--        styleOption.rect = QRect(2, 2, widgetRect.width()-4, widgetRect.height()-4);
--        kapp->style()->drawPrimitive( QStyle::PE_PanelLineEdit, &styleOption, &painter);
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        kapp->style()->drawPrimitive( QStyle::PE_FrameLineEdit, &styleOption, &painter);
-+        QStyleOptionFrameV2 option;
-+        draw(QStyle::PE_FrameLineEdit, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-+
-+        draw(QStyle::PE_PanelLineEdit, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_COMBOBOX)
-     {
--        
--        QStyleOptionComboBox styleOption;
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        styleOption.editable = true;
--        
--        kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
-+        QStyleOptionComboBox option;
-+        option.editable = true;
-+
-+        draw(QStyle::CC_ComboBox, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_LISTBOX)
-     {
-         if( part == PART_WINDOW )
-         {
--            lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
--        }
--        else
--        {
--        if( part == PART_WINDOW )
--        {
--            lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
-+            lcl_drawFrame(QStyle::PE_Frame, m_image,
-+                          vclStateValue2StateFlag(nControlState, value));
-         }
-         else
-         {
--            QStyleOptionComboBox styleOption;
--            
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            styleOption.state = vclStateValue2StateFlag( nControlState, value );
--            
-+            QStyleOptionComboBox option;
-             if (part == PART_SUB_EDIT)
--            {
--                kapp->style()->drawControl(QStyle::CE_ComboBoxLabel, &styleOption, &painter);
--            }
-+                draw(QStyle::CE_ComboBoxLabel, &option, m_image,
-+                     vclStateValue2StateFlag(nControlState, value));
-             else
--            {
--                kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
--            }
--        }
-+                draw(QStyle::CC_ComboBox, &option, m_image,
-+                     vclStateValue2StateFlag(nControlState, value));
-         }
-     }
-     else if (type == CTRL_LISTNODE)
-     {
--        QStyleOption styleOption;
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        styleOption.state |= QStyle::State_Item;
--        styleOption.state |= QStyle::State_Children;
--        
-+        QStyleOption option;
-+        option.state = QStyle::State_Item | QStyle::State_Children;
-+
-         if (nControlState & CTRL_STATE_PRESSED)
--        {
--            styleOption.state |= QStyle::State_Open;
--        }
--        
--        kapp->style()->drawPrimitive(QStyle::PE_IndicatorBranch, &styleOption, &painter);
-+            option.state |= QStyle::State_Open;
-+
-+        draw(QStyle::PE_IndicatorBranch, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_CHECKBOX)
-     {	
--        QStyleOptionButton styleOption;
--        
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        kapp->style()->drawControl(QStyle::CE_CheckBox, &styleOption, &painter);
-+        QStyleOptionButton option;
-+        draw(QStyle::CE_CheckBox, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_SCROLLBAR)
-     {
-         if ((part == PART_DRAW_BACKGROUND_VERT) || (part == PART_DRAW_BACKGROUND_HORZ))
-         {
-+            QStyleOptionSlider option;
-+
-             ScrollbarValue* sbVal = static_cast<ScrollbarValue *> ( value.getOptionalVal() );
-             
--            QStyleOptionSlider styleOption;
--            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--            
-             //if the scroll bar is active (aka not degenrate...allow for hover events
-             if (sbVal->mnVisibleSize < sbVal->mnMax)
--            {
--                styleOption.state = vclStateValue2StateFlag( nControlState, value );
--                styleOption.state |= QStyle::State_MouseOver;
--            }
-+                option.state = QStyle::State_MouseOver;
-             
-             //horizontal or vertical
-             if (part == PART_DRAW_BACKGROUND_VERT)
--            {
--                styleOption.orientation = Qt::Vertical;
--            }
-+                option.orientation = Qt::Vertical;
-             else
--            {
--                styleOption.state |= QStyle::State_Horizontal;
--            }
-+                option.state |= QStyle::State_Horizontal;
-             
-             //setup parameters from the OO values
--            styleOption.minimum = sbVal->mnMin;
--            styleOption.maximum = sbVal->mnMax - sbVal->mnVisibleSize;
--            styleOption.sliderValue = sbVal->mnCur;
--            styleOption.sliderPosition = sbVal->mnCur;
--            styleOption.pageStep = sbVal->mnVisibleSize;
-+            option.minimum = sbVal->mnMin;
-+            option.maximum = sbVal->mnMax - sbVal->mnVisibleSize;
-+            option.sliderValue = sbVal->mnCur;
-+            option.sliderPosition = sbVal->mnCur;
-+            option.pageStep = sbVal->mnVisibleSize;
-             
-             //setup the active control...always the slider
-             if (sbVal->mnThumbState & CTRL_STATE_ROLLOVER)
--            {
--                styleOption.activeSubControls = QStyle::SC_ScrollBarSlider;
--            }
--            
--            kapp->style()->drawComplexControl(QStyle::CC_ScrollBar, &styleOption, &painter);
-+                option.activeSubControls = QStyle::SC_ScrollBarSlider;
-+
-+            draw(QStyle::CC_ScrollBar, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-+        }
-+        else
-+        {
-+            returnVal = false;
-         }
-     }
-     else if (type == CTRL_SPINBOX)
-     {
--        QStyleOptionSpinBox styleOption;
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
-+        QStyleOptionSpinBox option;
-+
-         // determine active control
-         SpinbuttonValue* pSpinVal = (SpinbuttonValue *)(value.getOptionalVal());
-         if( pSpinVal )
-         {
-             if( (pSpinVal->mnUpperState & CTRL_STATE_PRESSED) )
--                styleOption.activeSubControls |= QStyle::SC_SpinBoxUp;
-+                option.activeSubControls |= QStyle::SC_SpinBoxUp;
-             if( (pSpinVal->mnLowerState & CTRL_STATE_PRESSED) )
--                styleOption.activeSubControls |= QStyle::SC_SpinBoxDown;
-+                option.activeSubControls |= QStyle::SC_SpinBoxDown;
-         }
--        
--        kapp->style()->drawComplexControl(QStyle::CC_SpinBox, &styleOption, &painter);
-+
-+        draw(QStyle::CC_SpinBox, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_GROUPBOX)
-     {
--        QStyleOptionGroupBox styleOption;
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        kapp->style()->drawComplexControl(QStyle::CC_GroupBox, &styleOption, &painter);
-+        QStyleOptionGroupBox option;
-+        draw(QStyle::CC_GroupBox, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_RADIOBUTTON)
-     {
--        QStyleOptionButton styleOption;
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        kapp->style()->drawControl(QStyle::CE_RadioButton, &styleOption, &painter);
-+        QStyleOptionButton option;
-+        draw(QStyle::CE_RadioButton, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_TOOLTIP)
-     {
--        QStyleOption styleOption;
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        
--        kapp->style()->drawPrimitive(QStyle::PE_PanelTipLabel, &styleOption, &painter);
-+        QStyleOption option;
-+        draw(QStyle::PE_PanelTipLabel, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_FRAME)
-     {
--        lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
-+        lcl_drawFrame(QStyle::PE_Frame, m_image,
-+                      vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_FIXEDBORDER)
-     {
--        lcl_drawFrame( widgetRect, painter, QStyle::PE_FrameWindow, nControlState, value );
-+        lcl_drawFrame(QStyle::PE_FrameWindow, m_image,
-+                      vclStateValue2StateFlag(nControlState, value));
-     }
-     else if (type == CTRL_WINDOW_BACKGROUND)
-     {
-+        m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
-     }
-     else if (type == CTRL_FIXEDLINE)
-     {
--        QStyleOptionMenuItem styleOption;
--            
--        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
--        styleOption.state = vclStateValue2StateFlag( nControlState, value );
--        styleOption.menuItemType = QStyleOptionMenuItem::Separator;
--        styleOption.state |= QStyle::State_Item;
--        
--        kapp->style()->drawControl( QStyle::CE_MenuItem, &styleOption, &painter);
-+        QStyleOptionMenuItem option;
-+        option.menuItemType = QStyleOptionMenuItem::Separator;
-+        option.state |= QStyle::State_Item;
-+
-+        draw(QStyle::CE_MenuItem, &option, m_image,
-+             vclStateValue2StateFlag(nControlState, value));
-     }
-     else
-     {
--        returnVal = false;
-+        return false;
-     }
--    
-+
-     if (returnVal)
-     {
--        X11SalGraphics::CopyScreenArea( dpy,
-+        if( SelectFont() == 0 )
-+            return false;
-+
-+        QPixmap pixmap = QPixmap::fromImage(*m_image, Qt::ColorOnly | Qt::OrderedDither | Qt::OrderedAlphaDither);
-+        X11SalGraphics::CopyScreenArea( GetXDisplay(),
-             pixmap.handle(), pixmap.x11Info().screen(), pixmap.x11Info().depth(),
--            drawable, GetScreenNumber(), GetVisual().GetDepth(), gc,
--            0, 0, widgetRect.width(), widgetRect.height(), widgetRect.left(), widgetRect.top() );
-+            GetDrawable(), GetScreenNumber(), GetVisual().GetDepth(),
-+            SelectFont(), 0, 0, widgetRect.width(), widgetRect.height(), widgetRect.left(), widgetRect.top());
-+
-+        return true;
-     }
- 
--    return returnVal;
-+    return false;
- }
- 
- BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
-diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
-index 9948722..0ffbc8e 100644
---- a/vcl/unx/kde4/KDESalGraphics.hxx
-+++ b/vcl/unx/kde4/KDESalGraphics.hxx
-@@ -31,13 +31,19 @@
- #include <saldisp.hxx>
- #include <salgdi.h>
- 
-+#define Region QtXRegion
-+#include <QImage>
-+#undef Region
-+
- /** handles graphics drawings requests and performs the needed drawing operations */
- class KDESalGraphics : public X11SalGraphics
- {
-+    QImage* m_image;
-+
-     public:
--        KDESalGraphics() {}
--        virtual ~KDESalGraphics() {}
--        
-+        KDESalGraphics();
-+        virtual ~KDESalGraphics();
-+
-         /**
-             What widgets can be drawn the native way.
-             @param type Type of the widget.
--- 
-1.7.0.1
-
diff --git a/patches/dev300/qt-moc-detect.diff b/patches/dev300/qt-moc-detect.diff
deleted file mode 100644
index b2ae65c..0000000
--- a/patches/dev300/qt-moc-detect.diff
+++ /dev/null
@@ -1,29 +0,0 @@
----
- configure.in |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git configure.in configure.in
-index 3620984..a555c99 100644
---- configure.in
-+++ configure.in
-@@ -6481,7 +6481,7 @@ your Qt installation by exporting QTDIR before running "configure".])
-     fi
- 
-     dnl Check for Meta Object Compiler
--    AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] )
-+    AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH])
-     if test "$MOC" = "no" ; then
-         AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
- the root of your Qt installation by exporting QTDIR before running "configure".])
-@@ -6588,7 +6588,7 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
-    fi
- 
-    dnl Check for Meta Object Compiler
--   AC_PATH_PROG( MOC4, moc, no, [$PATH:$QT4DIR/bin] )
-+   AC_PATH_PROG( MOC4, moc, no, [$QT4DIR/bin:$PATH])
-    if test "$MOC4" = "no" ; then
-       AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
- the root of your Qt installation by exporting QT4DIR before running "configure".])
--- 
-1.7.0.1
-


More information about the Libreoffice-commits mailing list