Commits

Anonymous committed 9f098e9

jl155 #i111592# removing inadvertently added dp_gui_updatedialog.cxx.orig

Comments (0)

Files changed (1)

desktop/source/deployment/gui/dp_gui_updatedialog.cxx.orig

-/*************************************************************************
- *
- * 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_desktop.hxx"
-
-#include "sal/config.h"
-
-#include <cstddef>
-#include <limits>
-#include <map>
-#include <memory>
-#include <utility>
-#include <vector>
-
-
-#include "boost/optional.hpp"
-#include "com/sun/star/awt/Rectangle.hpp"
-#include "com/sun/star/awt/WindowAttribute.hpp"
-#include "com/sun/star/awt/WindowClass.hpp"
-#include "com/sun/star/awt/WindowDescriptor.hpp"
-#include "com/sun/star/awt/XThrobber.hpp"
-#include "com/sun/star/awt/XToolkit.hpp"
-#include "com/sun/star/awt/XWindow.hpp"
-#include "com/sun/star/awt/XWindowPeer.hpp"
-#include "com/sun/star/beans/NamedValue.hpp"
-#include "com/sun/star/beans/Optional.hpp"
-#include "com/sun/star/beans/PropertyValue.hpp"
-#include "com/sun/star/beans/XPropertySet.hpp"
-#include "com/sun/star/container/XNameAccess.hpp"
-#include "com/sun/star/container/XNameContainer.hpp"
-#include "com/sun/star/deployment/DeploymentException.hpp"
-#include "com/sun/star/deployment/UpdateInformationProvider.hpp"
-#include "com/sun/star/deployment/XPackage.hpp"
-#include "com/sun/star/deployment/XExtensionManager.hpp"
-#include "com/sun/star/deployment/ExtensionManager.hpp"
-#include "com/sun/star/deployment/XUpdateInformationProvider.hpp"
-#include "com/sun/star/frame/XDesktop.hpp"
-#include "com/sun/star/frame/XDispatch.hpp"
-#include "com/sun/star/frame/XDispatchProvider.hpp"
-#include "com/sun/star/lang/IllegalArgumentException.hpp"
-#include "com/sun/star/lang/XMultiComponentFactory.hpp"
-#include "com/sun/star/lang/XSingleServiceFactory.hpp"
-#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
-#include "com/sun/star/system/XSystemShellExecute.hpp"
-#include "com/sun/star/task/XAbortChannel.hpp"
-#include "com/sun/star/task/XJob.hpp"
-#include "com/sun/star/ucb/CommandAbortedException.hpp"
-#include "com/sun/star/ucb/CommandFailedException.hpp"
-#include "com/sun/star/ucb/XCommandEnvironment.hpp"
-#include "com/sun/star/uno/Any.hxx"
-#include "com/sun/star/uno/Exception.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/Sequence.hxx"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "com/sun/star/util/URL.hpp"
-#include "com/sun/star/util/XChangesBatch.hpp"
-#include "com/sun/star/util/XURLTransformer.hpp"
-#include "com/sun/star/xml/dom/XElement.hpp"
-#include "com/sun/star/xml/dom/XNode.hpp"
-#include "com/sun/star/beans/Pair.hpp"
-#include "osl/diagnose.h"
-#include "rtl/bootstrap.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/string.h"
-#include "rtl/ustrbuf.hxx"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "svtools/svlbitm.hxx"
-#include "svtools/svlbox.hxx"
-#include <svtools/controldims.hrc>
-#include "svx/checklbx.hxx"
-#include "tools/gen.hxx"
-#include "tools/link.hxx"
-#include "tools/resid.hxx"
-#include "tools/resmgr.hxx"
-#include "tools/solar.h"
-#include "tools/string.hxx"
-#include "vcl/button.hxx"
-#include "vcl/dialog.hxx"
-#include "vcl/fixed.hxx"
-#include "vcl/image.hxx"
-#include "vcl/msgbox.hxx"
-#include "vcl/svapp.hxx"
-#include "vos/mutex.hxx"
-
-#include "comphelper/processfactory.hxx"
-#include "comphelper/sequence.hxx"
-#include "dp_dependencies.hxx"
-#include "dp_descriptioninfoset.hxx"
-#include "dp_identifier.hxx"
-#include "dp_version.hxx"
-#include "dp_misc.h"
-#include "dp_update.hxx"
-
-#include "dp_gui.h"
-#include "dp_gui.hrc"
-#include "dp_gui_thread.hxx"
-#include "dp_gui_updatedata.hxx"
-#include "dp_gui_updatedialog.hxx"
-#include "dp_gui_shared.hxx"
-#include "dp_gui_system.hxx"
-
-#include <hash_set>
-
-class KeyEvent;
-class MouseEvent;
-class Window;
-namespace com { namespace sun { namespace star { namespace uno {
-    class XComponentContext;
-} } } }
-
-using namespace ::com::sun::star;
-using dp_gui::UpdateDialog;
-
-namespace {
-
-static sal_Unicode const LF = 0x000A;
-static sal_Unicode const CR = 0x000D;
-static const USHORT CMD_ENABLE_UPDATE = 1;
-static const USHORT CMD_IGNORE_UPDATE = 2;
-static const USHORT CMD_IGNORE_ALL_UPDATES = 3;
-
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
-#define IGNORED_UPDATES     OUSTR("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates")
-#define PROPERTY_VERSION    OUSTR("Version")
-
-enum Kind { ENABLED_UPDATE, DISABLED_UPDATE, SPECIFIC_ERROR };
-
-rtl::OUString confineToParagraph(rtl::OUString const & text) {
-    // Confine arbitrary text to a single paragraph in a dp_gui::AutoScrollEdit.
-    // This assumes that U+000A and U+000D are the only paragraph separators in
-    // a dp_gui::AutoScrollEdit, and that replacing them with a single space
-    // each is acceptable:
-    return text.replace(LF, ' ').replace(CR, ' ');
-}
-
-
-bool isInterExtensionDependency(
-    uno::Reference< xml::dom::XElement > const & e)
-{
-    if (e->getNamespaceURI().equalsAsciiL(
-            RTL_CONSTASCII_STRINGPARAM("http://openoffice.org/extensions/description/2006"))
-        && e->getTagName().equalsAsciiL(
-            RTL_CONSTASCII_STRINGPARAM("extension")))
-    {
-        return true;
-    }
-    return false;
-}
-
-//Checks if there are other than inter-extension dependencies
-bool hasOtherDependency(uno::Sequence<uno::Reference<xml::dom::XElement> > const & seqDep)
-{
-    for (sal_Int32 i = 0; i < seqDep.getLength(); i++)
-    {
-        if (!isInterExtensionDependency(seqDep[i]))
-            return true;
-    }
-    return false;
-}
-
-struct MatchDependingExtension
-{
-    rtl::OUString m_identifier;
-    rtl::OUString m_version;
-
-    MatchDependingExtension(dp_gui::UpdateData const & data);
-    bool operator () (uno::Reference<xml::dom::XElement> const & dep) const;
-};
-
-MatchDependingExtension::MatchDependingExtension(
-    dp_gui::UpdateData const & data)
-{
-    m_identifier = dp_misc::getIdentifier(data.aInstalledExtension);
-    m_version = data.updateVersion;
-}
-
-bool MatchDependingExtension::operator ()( uno::Reference<xml::dom::XElement> const & dep ) const
-{
-    rtl::OUString id = dep->getAttribute(OUSTR("identifier"));
-    rtl::OUString version = dep->getAttribute(OUSTR("minimum-version"));
-    if (m_identifier.equals(id)
-        && dp_misc::compareVersions(m_version, version) != dp_misc::LESS)
-        return true;
-     return false;
-}
-
-struct MatchRequiredExtension
-{
-    rtl::OUString m_identifier;
-    rtl::OUString m_version;
-
-    MatchRequiredExtension(uno::Reference<xml::dom::XElement> const & dep);
-    bool operator () (dp_gui::UpdateData const & dep) const;
-};
-
-MatchRequiredExtension::MatchRequiredExtension(
-    uno::Reference<xml::dom::XElement> const & dep)
-{   
-    m_identifier = dep->getAttribute(OUSTR("identifier"));
-    m_version = dep->getAttribute(OUSTR("minimum-version"));
-}
-
-bool MatchRequiredExtension::operator ()( dp_gui::UpdateData const & data ) const
-{
-    if (m_identifier.equals(dp_misc::getIdentifier(data.aInstalledExtension))
-        && dp_misc::compareVersions(data.updateVersion, m_version) != dp_misc::LESS)
-        return true;
-     return false;
-}
-
-struct MatchUpdateData
-{
-    rtl::OUString m_identifier;
-    MatchUpdateData(dp_gui::UpdateData const & data);
-    MatchUpdateData(rtl::OUString const & identifier);
-    bool operator () (dp_gui::UpdateData const & addedData);
-};
-
-MatchUpdateData::MatchUpdateData(dp_gui::UpdateData const & data)
-{
-    m_identifier = dp_misc::getIdentifier(data.aInstalledExtension);
-}
-
-MatchUpdateData::MatchUpdateData(rtl::OUString const & identifier):
-    m_identifier(identifier)
-{
-}
-
-bool MatchUpdateData::operator () (dp_gui::UpdateData const & addedData)
-{
-    if (dp_misc::getIdentifier(addedData.aInstalledExtension).equals(m_identifier))
-        return true;
-    return false;
-}
-
-} //end namespace
-
-struct UpdateDialog::DisabledUpdate
-{
-    DisabledUpdate(){}
-    DisabledUpdate(
-        rtl::OUString const & _name,
-        rtl::OUString const & id,
-        uno::Sequence< uno::Reference< xml::dom::XElement > > const &
-        _unsatisfiedDependencies,
-        uno::Reference< xml::dom::XNode > _aUpdateInfo):
-        name(_name), identifier(id), unsatisfiedDependencies(_unsatisfiedDependencies),
-        aUpdateInfo(_aUpdateInfo)
-        {}
-    rtl::OUString name;
-    rtl::OUString identifier;
-    //Contains descriptions of the unsatisfied dependencies
-    uno::Sequence< uno::Reference< xml::dom::XElement > > unsatisfiedDependencies;
-    // We also want to show release notes and publisher for disabled updates
-    uno::Reference< xml::dom::XNode > aUpdateInfo;
-};
-
-struct UpdateDialog::SpecificError {
-    rtl::OUString name;
-    rtl::OUString identifier;
-    rtl::OUString message;
-};
-
-//------------------------------------------------------------------------------
-struct UpdateDialog::IgnoredUpdate {
-    rtl::OUString sExtensionID;
-    rtl::OUString sVersion;
-    bool          bRemoved;
-
-    IgnoredUpdate( const rtl::OUString &rExtensionID, const rtl::OUString &rVersion );
-};
-
-//------------------------------------------------------------------------------
-UpdateDialog::IgnoredUpdate::IgnoredUpdate( const rtl::OUString &rExtensionID, const rtl::OUString &rVersion ):
-    sExtensionID( rExtensionID ),
-    sVersion( rVersion ),
-    bRemoved( false )
-{}
-
-//------------------------------------------------------------------------------
-struct UpdateDialog::Index
-{
-    Kind          m_eKind;
-    bool          m_bIgnored; 
-    USHORT        m_nIndex;
-    rtl::OUString m_aName;
-    rtl::OUString m_identifier;
-
-    Index( Kind theKind, USHORT nIndex, const rtl::OUString &rName,
-           const rtl::OUString & rIdentifier);
-};
-
-//------------------------------------------------------------------------------
-UpdateDialog::Index::Index( Kind theKind, USHORT nIndex, const rtl::OUString &rName,
-                            rtl::OUString const & rIdentifier):
-    m_eKind( theKind ),
-    m_bIgnored( false ),
-    m_nIndex( nIndex ),
-    m_aName( rName ),
-    m_identifier(rIdentifier)
-{}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-class UpdateDialog::Thread: public dp_gui::Thread {
-public:
-    Thread(
-        uno::Reference< uno::XComponentContext > const & context,
-        UpdateDialog & dialog,
-        const std::vector< uno::Reference< deployment::XPackage >  > & vExtensionList);
-
-    void stop();
-
-private:
-    Thread(UpdateDialog::Thread &); // not defined
-    void operator =(UpdateDialog::Thread &); // not defined
-
-    struct Entry {
-        explicit Entry(
-            uno::Reference< deployment::XPackage > const & thePackage,
-            rtl::OUString const & theVersion);
-
-        uno::Reference< deployment::XPackage > package;
-        rtl::OUString version;
-        //Indicates that the extension provides its own update URLs.
-        //If this is true, then we must not use the default update
-        //URL to find the update information.
-        bool bProvidesOwnUpdate;
-        uno::Reference< xml::dom::XNode > info;
-	    UpdateDialog::DisabledUpdate disableUpdate;
-	    dp_gui::UpdateData updateData;
-    };
-
-    // A multimap in case an extension is installed in "user", "shared" or "bundled"
-    typedef std::map< rtl::OUString, Entry > Map;
-
-    virtual ~Thread();
-
-    virtual void execute();
-
-//     bool solveDependency(
-//         uno::Reference<xml::dom::XElement> const & dep,
-//         ::std::vector< dp_gui::UpdateData> & vecDisabledAndUpdateData);
-
-        bool solveDependency(
-        ::rtl::OUString const & identifier,
-        uno::Reference<xml::dom::XElement>  & dependency,
-        dp_misc::UpdateInfoMap const & updateInfos,
-        dp_misc::UpdateInfoMap  & inout_requiredUpdates,
-        dp_misc::UpdateInfoMap  & inout_unsolved,
-        ::std::vector< uno::Reference<xml::dom::XElement> > &
-        inout_unknownExtensions)  const;
-
-    void fixInterExtensionDependencies(
-        ::std::vector< dp_gui::UpdateData> & vecDisabledAndUpdateData);
-
-#if 0
-    void handleGeneralError(uno::Any const & exception) const;
-#endif
-    void handleSpecificError(
-        uno::Reference< deployment::XPackage > const & package,
-        uno::Any const & exception) const;
-
-    uno::Sequence< uno::Reference< xml::dom::XElement > >
-    getUpdateInformation(
-        uno::Reference< deployment::XPackage > const & package,
-        uno::Sequence< rtl::OUString > const & urls,
-        rtl::OUString const & identifier) const;
-
-    void getOwnUpdateInformation(
-        uno::Reference< deployment::XPackage > const & package,
-        Map * map);
-
-    ::rtl::OUString getUpdateDisplayString(
-        dp_gui::UpdateData const & data, ::rtl::OUString const & version = ::rtl::OUString()) const;
-
-    void prepareUpdateData(
-        uno::Reference< xml::dom::XNode > const & updateInfo,
-        dp_gui::UpdateData & out_data) const;
-
-    bool update(dp_gui::UpdateData & data) const;
-
-    ::std::hash_map< ::rtl::OUString,  dp_gui::UpdateData, ::rtl::OUStringHash>
-    getUpdateData(dp_misc::UpdateInfoMap const & updateInformation) const;
-    
-    uno::Reference< uno::XComponentContext > m_context;
-    UpdateDialog & m_dialog;
-    std::vector< uno::Reference< deployment::XPackage > > m_vExtensionList;
-    uno::Reference< deployment::XUpdateInformationProvider > m_updateInformation;
-    uno::Reference< task::XInteractionHandler > m_xInteractionHdl;
-
-    // guarded by Application::GetSolarMutex():
-    uno::Reference< task::XAbortChannel > m_abort;
-    bool m_stop;
-};
-
-UpdateDialog::Thread::Thread(
-    uno::Reference< uno::XComponentContext > const & context,
-    UpdateDialog & dialog,
-    const std::vector< uno::Reference< deployment::XPackage > > &vExtensionList):
-    m_context(context),
-    m_dialog(dialog),
-    m_vExtensionList(vExtensionList),
-    m_updateInformation(
-        deployment::UpdateInformationProvider::create(context)),
-    m_stop(false)
-{
-    if( m_context.is() )
-    {
-        uno::Reference< lang::XMultiComponentFactory > xServiceManager( m_context->getServiceManager() );
-
-        if( xServiceManager.is() )
-        {
-            m_xInteractionHdl = uno::Reference< task::XInteractionHandler > (
-                                xServiceManager->createInstanceWithContext( OUSTR( "com.sun.star.task.InteractionHandler" ), m_context),
-                                uno::UNO_QUERY );
-            if ( m_xInteractionHdl.is() )
-                m_updateInformation->setInteractionHandler( m_xInteractionHdl );
-        }
-    }
-}
-
-void UpdateDialog::Thread::stop() {
-    uno::Reference< task::XAbortChannel > abort;
-    {
-        vos::OGuard g(Application::GetSolarMutex());
-        abort = m_abort;
-        m_stop = true;
-    }
-    if (abort.is()) {
-        abort->sendAbort();
-    }
-    m_updateInformation->cancel();
-}
-
-UpdateDialog::Thread::Entry::Entry(
-    uno::Reference< deployment::XPackage > const & thePackage,
-    rtl::OUString const & theVersion):
-    
-    package(thePackage),
-    version(theVersion),
-    bProvidesOwnUpdate(false),
-    updateData(thePackage,
-               uno::Reference<xml::dom::XNode>())
-{
-}
-
-UpdateDialog::Thread::~Thread()
-{
-    if ( m_xInteractionHdl.is() )
-        m_updateInformation->setInteractionHandler( uno::Reference< task::XInteractionHandler > () );
-}
-
-//Todo ring dependencies
-//Only solves the inter-extenions dependencies among the update extensions
-// bool UpdateDialog::Thread::solveDependency(
-//     uno::Reference<xml::dom::XElement> const & dep,
-//     ::std::vector< dp_gui::UpdateData> & vecUpdateData)
-// {
-//     bool ret = false;
-//     //First check if it is a inter-extension dependency
-//     if (dep.is() && ! isInterExtensionDependency(dep))
-//         return false;
-//     const ::rtl::OUString idRequired = dep.is() ? dep->getAttribute(
-//         ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("identifier"))) :
-//         rtl::OUString();
-
-//     const ::rtl::OUString minVersion = dep.is() ? dep->getAttribute(
-//         ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("minimum-version"))) :
-//         rtl::OUString();
-
-//     bool bNoExtensionWithRequiredIdentifier = false;
-//     //find the required extension  among all pontential extension updates
-//     typedef ::std::vector< UpdateData>::iterator CIT;
-//     for (CIT i = vecUpdateData.begin(); i != vecUpdateData.end(); i++)
-//     {
-//         bool bCheckDependencies = false;
-//         if ( dep.is()) // in recursion
-//         {
-//             if (dp_misc::getIdentifier(i->aInstalledExtension).equals(idRequired))
-//             {
-//                 if (dp_misc::compareVersions( i->updateVersion, minVersion) != dp_misc::LESS )
-//                     bCheckDependencies = true;
-//                 else
-//                     //There is only one extension per identifier in the vecUpdateData
-//                     //We found one but it has no suitable version
-//                     break;
-//             }
-//         }
-//         if (!dep.is()) // First call
-//             bCheckDependencies = true;
-        
-        
-//         if (bCheckDependencies)
-//         {
-//             if (!i->dependencySolved)
-//             {
-//                 ret = true;
-//                 //Found the required extension with a suitable version. Now check if
-//                 //this extension has satisfied dependencies, otherwise we cannot use
-//                 //it.
-//                 //collect the unsolved dependencies in this vector and replace with it
-//                 //UpdateData.unsatisfiedDependencies later on.
-//                 ::std::vector<uno::Reference<xml::dom::XElement> > vecUnsolvedAll;
-//                 ::std::vector<uno::Reference<xml::dom::XElement> > vecRequiredUpdates;
-//                 for (sal_Int32 ii = 0; ii < i->unsatisfiedDependencies.getLength(); ii++)
-//                 {
-//                     uno::Reference<xml::dom::XElement> const & dep2 =
-//                         i->unsatisfiedDependencies[ii];
-//                     if (!solveDependency(dep2, vecUpdateData))
-//                         vecUnsolvedAll.push_back(dep2);
-//                     else if (isInterExtensionDependency(dep2))
-//                         vecRequiredUpdates.push_back(dep2);
-//                 }
-//                 i->unsatisfiedDependencies = ::comphelper::containerToSequence(vecUnsolvedAll);
-//                 i->requiredUpdates = vecRequiredUpdates;
-//                 if (i->unsatisfiedDependencies.getLength())
-//                     ret &= false;
-//                 i->dependencySolved = true;
-//             }
-//             else
-//             {
-//                 ret = i->unsatisfiedDependencies.getLength() ? false : true;
-                    
-//             }
-//             if (dep.is()) // in recursion,
-//                 break;
-//         }
-//     }
-
-//     // vecUpdateData does not contain an extension with a particular id.
-//     if (dep.is() && bNoExtensionWithRequiredIdentifier)
-//     {
-//     }
-//     return ret;
-// }
-//
-//The vector vecUpdateData contains information about all available
-//online updates. If vecUpdateData.unsatisfiedDependencies contains entries, then
-//it is no valid update, because its dependencies are not satisfied. However, it
-//can have entries which represent an unsatisfied inter-extension dependency. We try
-//to solve those cases where the required extension is another update and was
-//therefore not considered by the dp_misc::Dependencies::check function. It only
-//uses installed extensions when checking.
-//
-void UpdateDialog::Thread::fixInterExtensionDependencies(
-    ::std::vector< dp_gui::UpdateData> & vecUpdateData)
-{
-    // solveDependency(uno::Reference<xml::dom::XElement>(), vecUpdateData);
-}
-
-
-//todo version
-/*
-  @identifier
-  the extension identifier representing the extension which needs
-  to be found and verified.
-  @dependency
-  the dependency, which is to be resolved
-
-  @inout_unknownExtensions
-  contains the dependency information about an unknown extension, that is,
-  there is no extension with in update information available.
- */
-bool UpdateDialog::Thread::solveDependency(
-    ::rtl::OUString const & identifier,
-    uno::Reference<xml::dom::XElement>  & dependency,
-    dp_misc::UpdateInfoMap const & updateInfos,
-    dp_misc::UpdateInfoMap  & inout_requiredUpdates,
-    dp_misc::UpdateInfoMap & inout_unsolved,
-    ::std::vector< uno::Reference<xml::dom::XElement> > &
-    inout_unknownExtensions) const
-{
-    //See if we have information about the requested extension
-    dp_misc::UpdateInfoMap::const_iterator it_upd_infos =
-        updateInfos.find(identifier);
-    if (it_upd_infos == updateInfos.end())
-    {
-        if (dependency.is())
-            inout_unknownExtensions.push_back(dependency);
-        return false;
-    }
-
-    //Has the extension unsatisfied dependencies?
-    dp_misc::DescriptionInfoset  infoset(m_context, it_upd_infos->second);
-    uno::Sequence<uno::Reference<xml::dom::XElement> > seqUnsatisfiedDependencies =
-        dp_misc::Dependencies::check(m_context, infoset);
-
-    //We can only try to solve inter-extension dependencies
-    //Any other dependency will make this function return
-    if (hasOtherDependency(seqUnsatisfiedDependencies))
-    {
-        inout_unsolved.insert(*it_upd_infos);
-        return false;
-    }
-
-    //Check the version
-    
-
-    //There are only inter-extension dependencies.
-    //Solve them recursively
-    bool bAllSolved = true;
-    for (sal_Int32 i = 0; i < seqUnsatisfiedDependencies.getLength(); i++)
-    {
-        uno::Reference<xml::dom::XElement> dep = seqUnsatisfiedDependencies[i];
-        ::rtl::OUString id = dep->getAttribute(OUSTR("identifier"));
-        OSL_ASSERT(id.getLength());
-
-        bAllSolved &= solveDependency(
-            id, dep, updateInfos, inout_requiredUpdates, inout_unsolved,
-            inout_unknownExtensions);
-    }
-    if (bAllSolved)
-        inout_requiredUpdates.insert(*it_upd_infos);
-    return bAllSolved;
-}
-
-::std::hash_map< ::rtl::OUString,  dp_gui::UpdateData, ::rtl::OUStringHash> 
-UpdateDialog::Thread::getUpdateData(dp_misc::UpdateInfoMap const & updateInformation) const
-{
-    ::std::hash_map< ::rtl::OUString,  dp_gui::UpdateData, ::rtl::OUStringHash> mapUpData;
-    typedef ::std::vector<uno::Reference<deployment::XPackage> >::const_iterator CIT_EXT;
-    //iterate over all extensions for which we want an update and return the 
-    //corresponding update information
-    dp_misc::UpdateInfoMap mapRequiredUpdates;
-    dp_misc::UpdateInfoMap mapUnsolved;
-    ::std::vector< uno::Reference<xml::dom::XElement> > vecUnknown;
-    for (CIT_EXT i = m_vExtensionList.begin(); i != m_vExtensionList.end(); i++)
-    {
-        if (solveDependency(dp_misc::getIdentifier(*i),
-                            uno::Reference<xml::dom::XElement>(),
-                            updateInformation,
-                            mapRequiredUpdates, mapUnsolved, vecUnknown))
-        {
-            //make UpdateData (enabled) from mapRequiredUpdates
-            //all infos are in mapRequiredUpdates, including for the
-            //curent extension
-        }
-        else
-        {
-            
-            //make disabled UpdateData with all necessary information
-            //ignore mapRequiredUpdates for this extension.xs
-        }
-    }
-    return mapUpData;
-}
-    
-
-void UpdateDialog::Thread::execute()
-{
-    {
-        vos::OGuard g( Application::GetSolarMutex() );
-        if ( m_stop ) {
-            return;
-        }
-    }
-    uno::Reference<deployment::XExtensionManager> extMgr =
-        deployment::ExtensionManager::get(m_context);
-
-    std::vector<std::pair<uno::Reference<deployment::XPackage>, uno::Any > > errors;
-    
-    dp_misc::UpdateInfoMap updateInfoMap = dp_misc::getOnlineUpdateInfos(
-        m_context, extMgr, m_updateInformation, m_vExtensionList, errors);
-
-    typedef std::vector<std::pair<uno::Reference<deployment::XPackage>,
-        uno::Any> >::const_iterator ITERROR;
-    for (ITERROR ite = errors.begin(); ite != errors.end(); ite ++)
-        handleSpecificError(ite->first, ite->second);
-
-    ::std::hash_map< ::rtl::OUString,  dp_gui::UpdateData, ::rtl::OUStringHash> mapUpData =
-          getUpdateData(updateInfoMap);
-    
-    //iterate over all availabe online updates and check their dependencies.
-    //Accordingly fill the DisabledUpdate structure, in case of unsatisfied dependencies, or
-    //fill the UpdateData structure.
-    //In fact, both structures contain some data. To determine if the dependency check failed
-    //one can check if DisabledUpdate.unsatisfiedDependencies.getLength() is > 0
-    for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); i++)
-    {
-//         dp_misc::UpdateInfo const & info = i->second;
-//         UpdateData updateData(info.extension, info.info);
-//         //determine if online updates meet the requirements
-//         prepareUpdateData(info.info, updateData);
-//         vecUpdateData.push_back(updateData);
-    }
-    //checking inter-extension dependencies fails if one update depends
-    //on another update, which has not been processed. Now that we have information about
-    //all potential updates and the result of the respective dependency checks, we can
-    //check again those update which have only a failed interextension dependency
-    //        fixInterExtensionDependencies(vecUpdateData);
-    //See if there are still extensions with unsatisfied inter-extension dependencies.
-    //This can be the case if one only wants to update one extension which requires
-    //other extensions or an update requires extensions which are not yet installed.
-    
-    
-    // typedef ::std::vector< UpdateData>::const_iterator CIT;
-
-    // for (CIT ii = vecUpdateData.begin(); ii != vecUpdateData.end(); ii++)
-    // {
-    //     UpdateData updateData = *ii;
-    //     //determine if the update is installed in the user or shared repository
-    //     rtl::OUString sOnlineVersion;
-    //     //Set sOnlineVersion if there is a valid online update
-    //     if (updateData.unsatisfiedDependencies.getLength() == 0)
-    //         sOnlineVersion = updateData.onlineVersion;
-    //     rtl::OUString sVersionUser;
-    //     rtl::OUString sVersionShared;
-    //     rtl::OUString sVersionBundled;
-    //     uno::Sequence< uno::Reference< deployment::XPackage> > extensions;
-    //     try {
-    //         extensions = extMgr->getExtensionsWithSameIdentifier(
-    //             dp_misc::getIdentifier(updateData.aInstalledExtension),
-    //             updateData.aInstalledExtension->getName(),
-    //             uno::Reference<ucb::XCommandEnvironment>());
-    //     } catch (lang::IllegalArgumentException& ) {
-    //         OSL_ASSERT(0);
-    //         continue;
-    //     } catch (css::ucb::CommandFailedException& ) {
-    //         OSL_ASSERT(0);
-    //         continue;
-    //     }
-    //     OSL_ASSERT(extensions.getLength() == 3);
-    //     if (extensions[0].is() )
-    //         sVersionUser = extensions[0]->getVersion();
-    //     if (extensions[1].is() )
-    //         sVersionShared = extensions[1]->getVersion();
-    //     if (extensions[2].is() )
-    //         sVersionBundled = extensions[2]->getVersion();
-            
-    //     bool bSharedReadOnly = extMgr->isReadOnlyRepository(OUSTR("shared"));
-    //     //If there is no online update or there is one but the dependency check
-    //     //failed, then sOnlineVersion is an empty string.        
-    //     //Determine if the update is installed in the user repository and from where
-    //     //is is taken, that is from the online, shared or bundled repository.
-    //     dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension(
-    //         bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled, sOnlineVersion);
-    //     dp_misc::UPDATE_SOURCE sourceShared = dp_misc::isUpdateSharedExtension(
-    //         bSharedReadOnly, sVersionShared, sVersionBundled, sOnlineVersion);
-
-    //     uno::Reference<deployment::XPackage> updateSource;
-
-    //     if (sourceUser == dp_misc::UPDATE_SOURCE_SHARED)
-    //     {
-    //         //The local update source is always the same or better than
-    //         //the online update and has satisfied dependendencies. Otherwise
-    //         //it would be inoperative and XExtensionManager->getExtensionsWithSameIdentifier
-    //         //would not have retured this inoperative extension.
-    //         updateData.unsatisfiedDependencies =
-    //             uno::Sequence<uno::Reference<xml::dom::XElement> >();
-    //         updateData.requiredUpdates = ::std::vector<uno::Reference<xml::dom::XElement> >();
-    //         updateData.aUpdateSource = extensions[1];
-    //         updateData.updateVersion = extensions[1]->getVersion();
-    //     }
-    //     else if (sourceUser == dp_misc::UPDATE_SOURCE_BUNDLED)
-    //     {
-    //         updateData.unsatisfiedDependencies =
-    //             uno::Sequence<uno::Reference<xml::dom::XElement> >();
-    //         updateData.requiredUpdates = ::std::vector<uno::Reference<xml::dom::XElement> >();
-    //         updateData.aUpdateSource = extensions[2];
-    //         updateData.updateVersion = extensions[2]->getVersion();
-    //     }
-        
-    //     if (sourceShared == dp_misc::UPDATE_SOURCE_BUNDLED)
-    //     {
-    //        updateData.unsatisfiedDependencies =
-    //             uno::Sequence<uno::Reference<xml::dom::XElement> >();
-    //         updateData.requiredUpdates = ::std::vector<uno::Reference<xml::dom::XElement> >();
-    //         updateData.bIsShared = true;
-    //         updateData.aUpdateSource = extensions[2];
-    //         updateData.updateVersion = extensions[2]->getVersion();
-    //     }
-    //     else if (sourceShared == dp_misc::UPDATE_SOURCE_ONLINE)
-    //     {
-    //         updateData.bIsShared = true;
-    //     }
-
-    //     if (sourceShared != dp_misc::UPDATE_SOURCE_NONE ||
-    //         sourceUser != dp_misc::UPDATE_SOURCE_NONE)
-    //     {
-    //         update(updateData);
-    //     }
-    //     else if(sourceShared == dp_misc::UPDATE_SOURCE_NONE &&
-    //          sourceUser == dp_misc::UPDATE_SOURCE_NONE
-    //           && updateData.unsatisfiedDependencies.getLength())
-    //     {    
-    //         //Even show the possible update if it has unsatisfied dependencies
-    //         //which may only happen with online updates.
-    //         //It must have a greater version than the installed one
-    //         dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension(
-    //             bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled,
-    //             updateData.onlineVersion);
-    //         dp_misc::UPDATE_SOURCE sourceShared = dp_misc::isUpdateSharedExtension(
-    //             bSharedReadOnly, sVersionShared, sVersionBundled, updateData.onlineVersion);
-    //         if (sourceUser == dp_misc::UPDATE_SOURCE_ONLINE
-    //             || sourceShared == dp_misc::UPDATE_SOURCE_ONLINE)
-    //             update(updateData);
-    //     }
-
-    //     //ToDo: handle the case that there is a local update AND a online update
-    //     //with a better version but unsatisfied dependencies
-    // }
-
-    
-    vos::OGuard g(Application::GetSolarMutex());
-    if (!m_stop) {
-        m_dialog.checkingDone();
-    }
-}
-#if 0
-void UpdateDialog::Thread::handleGeneralError(uno::Any const & exception)
-    const
-{
-    rtl::OUString message;
-    uno::Exception e;
-    if (exception >>= e) {
-        message = e.Message;
-    }
-    vos::OGuard g(Application::GetSolarMutex());
-    if (!m_stop) {
-        m_dialog.addGeneralError(message);
-    }
-}
-#endif
-//Parameter package can be null
-void UpdateDialog::Thread::handleSpecificError(
-    uno::Reference< deployment::XPackage > const & package,
-    uno::Any const & exception) const
-{
-    UpdateDialog::SpecificError data;
-    if (package.is())
-    {
-        data.name = package->getDisplayName();
-        data.identifier = dp_misc::getIdentifier(package);
-    }
-    uno::Exception e;
-    if (exception >>= e) {
-        data.message = e.Message;
-    }
-    vos::OGuard g(Application::GetSolarMutex());
-    if (!m_stop) {
-        m_dialog.addSpecificError(data);
-    }
-}
-
-::rtl::OUString UpdateDialog::Thread::getUpdateDisplayString(
-    dp_gui::UpdateData const & data, ::rtl::OUString const & version) const
-{
-    OSL_ASSERT(data.aInstalledExtension.is());
-    rtl::OUStringBuffer b(data.aInstalledExtension->getDisplayName());
-    b.append(static_cast< sal_Unicode >(' '));
-    {
-        vos::OGuard g( Application::GetSolarMutex() );
-		if(!m_stop)
-			b.append(m_dialog.m_version);
-    }
-    b.append(static_cast< sal_Unicode >(' '));
-    if (version.getLength())
-        b.append(version);
-    else
-        b.append(data.updateVersion);
-    
-    if (data.sWebsiteURL.getLength()) 
-    {
-        b.append(static_cast< sal_Unicode >(' '));
-        {
-            vos::OGuard g( Application::GetSolarMutex() );
-			if(!m_stop)	
-				b.append(m_dialog.m_browserbased);
-        }
-    }        
-    return  b.makeStringAndClear();
-}
-
-
-/** out_data will only be filled if all dependencies are ok.
- */
-void UpdateDialog::Thread::prepareUpdateData(
-    uno::Reference< xml::dom::XNode > const & updateInfo,
-    dp_gui::UpdateData & out_data) const
-{
-    if (!updateInfo.is())
-        return;
-    dp_misc::DescriptionInfoset infoset(m_context, updateInfo);
-    OSL_ASSERT(infoset.getVersion().getLength() != 0);
-
-    out_data.unsatisfiedDependencies = dp_misc::Dependencies::check(m_context, infoset);
-    const ::boost::optional< ::rtl::OUString> updateWebsiteURL(infoset.getLocalizedUpdateWebsiteURL());
-    if (updateWebsiteURL)
-        out_data.sWebsiteURL = *updateWebsiteURL;
-
-    out_data.sUpdateDisplayString = getUpdateDisplayString(out_data, infoset.getVersion());
-    out_data.onlineVersion = out_data.updateVersion = infoset.getVersion();
-}
-
-bool UpdateDialog::Thread::update(
-    dp_gui::UpdateData & data) const
-{
-    bool ret = false;
-    if (data.unsatisfiedDependencies.getLength() == 0)
-    {
-        vos::OGuard g(Application::GetSolarMutex());
-        if (!m_stop) {
-            m_dialog.addEnabledUpdate(data.sUpdateDisplayString, data);
-        }
-        ret = !m_stop;
-    } else {
-        vos::OGuard g(Application::GetSolarMutex());
-        if (!m_stop) {
-            m_dialog.addDisabledUpdate(
-                DisabledUpdate(data.sUpdateDisplayString,
-                               dp_misc::getIdentifier(data.aInstalledExtension),
-                               data.unsatisfiedDependencies,
-                    data.aUpdateInfo));
-        }
-        ret = !m_stop;
-    }
-    return ret;
-}
-
-// UpdateDialog ----------------------------------------------------------
-UpdateDialog::UpdateDialog(
-    uno::Reference< uno::XComponentContext > const & context,
-    Window * parent,
-    const std::vector<uno::Reference< deployment::XPackage > > &vExtensionList,
-    std::vector< dp_gui::UpdateData > * updateData):
-    ModalDialog(parent,DpGuiResId(RID_DLG_UPDATE)),
-    m_context(context),
-    m_checking(this, DpGuiResId(RID_DLG_UPDATE_CHECKING)),
-    m_update(this, DpGuiResId(RID_DLG_UPDATE_UPDATE)),
-    m_updates(
-        *this, DpGuiResId(RID_DLG_UPDATE_UPDATES),
-        Image(DpGuiResId(RID_DLG_UPDATE_NORMALALERT)),
-        Image(DpGuiResId(RID_DLG_UPDATE_HIGHCONTRASTALERT))),
-    m_all(this, DpGuiResId(RID_DLG_UPDATE_ALL)),
-    m_description(this, DpGuiResId(RID_DLG_UPDATE_DESCRIPTION)),
-    m_PublisherLabel(this, DpGuiResId(RID_DLG_UPDATE_PUBLISHER_LABEL)),
-    m_PublisherLink(this, DpGuiResId(RID_DLG_UPDATE_PUBLISHER_LINK)),
-    m_ReleaseNotesLabel(this, DpGuiResId(RID_DLG_UPDATE_RELEASENOTES_LABEL)),
-    m_ReleaseNotesLink(this, DpGuiResId(RID_DLG_UPDATE_RELEASENOTES_LINK)),
-    m_descriptions(this, DpGuiResId(RID_DLG_UPDATE_DESCRIPTIONS)),
-    m_line(this, DpGuiResId(RID_DLG_UPDATE_LINE)),
-    m_help(this, DpGuiResId(RID_DLG_UPDATE_HELP)),
-    m_ok(this, DpGuiResId(RID_DLG_UPDATE_OK)),
-    m_close(this, DpGuiResId(RID_DLG_UPDATE_CLOSE)),
-    m_error(String(DpGuiResId(RID_DLG_UPDATE_ERROR))),
-    m_none(String(DpGuiResId(RID_DLG_UPDATE_NONE))),
-    m_noInstallable(String(DpGuiResId(RID_DLG_UPDATE_NOINSTALLABLE))),
-    m_failure(String(DpGuiResId(RID_DLG_UPDATE_FAILURE))),
-    m_unknownError(String(DpGuiResId(RID_DLG_UPDATE_UNKNOWNERROR))),
-    m_noDescription(String(DpGuiResId(RID_DLG_UPDATE_NODESCRIPTION))),
-    m_noInstall(String(DpGuiResId(RID_DLG_UPDATE_NOINSTALL))),
-    m_noDependency(String(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY))),
-    m_noDependencyCurVer(String(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER))),
-    m_browserbased(String(DpGuiResId(RID_DLG_UPDATE_BROWSERBASED))),
-    m_version(String(DpGuiResId(RID_DLG_UPDATE_VERSION))),
-    m_ignoredUpdate(String(DpGuiResId(RID_DLG_UPDATE_IGNORED_UPDATE))),
-    m_updateData(*updateData),
-    m_thread(
-        new UpdateDialog::Thread(
-            context, *this, vExtensionList)),
-    m_nFirstLineDelta(0),
-    m_nOneLineMissing(0),
-    m_nLastID(0),
-    m_bModified( false )
-    // TODO: check!
-//    ,
-//    m_extensionManagerDialog(extensionManagerDialog)
-{
-    OSL_ASSERT(updateData != NULL);
-
-    m_xExtensionManager = deployment::ExtensionManager::get( context );
-
-    uno::Reference< awt::XToolkit > toolkit;
-    try {
-        toolkit = uno::Reference< awt::XToolkit >(
-            (uno::Reference< lang::XMultiComponentFactory >(
-                m_context->getServiceManager(),
-                uno::UNO_QUERY_THROW)->
-             createInstanceWithContext(
-                 rtl::OUString(
-                     RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")),
-                 m_context)),
-            uno::UNO_QUERY_THROW);
-    } catch (uno::RuntimeException &) {
-        throw;
-    } catch (uno::Exception & e) {
-        throw uno::RuntimeException(e.Message, e.Context);
-    }
-    Control c(this, DpGuiResId(RID_DLG_UPDATE_THROBBER));
-    Point pos(c.GetPosPixel());
-    Size size(c.GetSizePixel());
-    try {
-        m_throbber = uno::Reference< awt::XThrobber >(
-            toolkit->createWindow(
-                awt::WindowDescriptor(
-                    awt::WindowClass_SIMPLE,
-                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Throbber")),
-                    GetComponentInterface(), 0,
-                    awt::Rectangle(
-                        pos.X(), pos.Y(), size.Width(), size.Height()),
-                    awt::WindowAttribute::SHOW)),
-            uno::UNO_QUERY_THROW);
-    } catch (lang::IllegalArgumentException & e) {
-        throw uno::RuntimeException(e.Message, e.Context);
-    }
-    m_updates.SetSelectHdl(LINK(this, UpdateDialog, selectionHandler));
-    m_updates.SetCheckButtonHdl(LINK(this, UpdateDialog, checkButtonHandler));
-    m_all.SetToggleHdl(LINK(this, UpdateDialog, allHandler));
-    m_ok.SetClickHdl(LINK(this, UpdateDialog, okHandler));
-    m_close.SetClickHdl(LINK(this, UpdateDialog, closeHandler));
-    if ( ! dp_misc::office_is_running())
-        m_help.Disable();
-    FreeResource();
-
-    initDescription();
-    getIgnoredUpdates();
-}
-
-//------------------------------------------------------------------------------
-UpdateDialog::~UpdateDialog()
-{
-    storeIgnoredUpdates();
-
-    for ( std::vector< UpdateDialog::Index* >::iterator i( m_ListboxEntries.begin() ); i != m_ListboxEntries.end(); ++i )
-    {
-        delete (*i);
-    }
-    for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i )
-    {
-        delete (*i);
-    }
-}
-
-//------------------------------------------------------------------------------
-BOOL UpdateDialog::Close() {
-    m_thread->stop();
-    return ModalDialog::Close();
-}
-
-short UpdateDialog::Execute() {
-    m_throbber->start();
-    m_thread->launch();
-    return ModalDialog::Execute();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-UpdateDialog::CheckListBox::CheckListBox( UpdateDialog & dialog, ResId const & resource,
-                                          Image const & normalStaticImage,
-                                          Image const & highContrastStaticImage ):
-    SvxCheckListBox( &dialog, resource, normalStaticImage, highContrastStaticImage ),
-    m_ignoreUpdate( String( DpGuiResId( RID_DLG_UPDATE_IGNORE ) ) ),
-    m_ignoreAllUpdates( String( DpGuiResId( RID_DLG_UPDATE_IGNORE_ALL ) ) ),
-    m_enableUpdate( String( DpGuiResId( RID_DLG_UPDATE_ENABLE ) ) ),
-    m_dialog(dialog)
-{}
-
-//------------------------------------------------------------------------------
-UpdateDialog::CheckListBox::~CheckListBox() {}
-
-//------------------------------------------------------------------------------
-USHORT UpdateDialog::CheckListBox::getItemCount() const {
-    ULONG i = GetEntryCount();
-    OSL_ASSERT(i <= std::numeric_limits< USHORT >::max());
-    return sal::static_int_cast< USHORT >(i);
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::CheckListBox::MouseButtonDown( MouseEvent const & event )
-{
-    // When clicking on a selected entry in an SvxCheckListBox, the entry's
-    // checkbox is toggled on mouse button down:
-    SvxCheckListBox::MouseButtonDown( event );
-
-    if ( event.IsRight() )
-    {
-        handlePopupMenu( event.GetPosPixel() );
-    }
-
-    m_dialog.enableOk();
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::CheckListBox::MouseButtonUp(MouseEvent const & event) {
-    // When clicking on an entry's checkbox in an SvxCheckListBox, the entry's
-    // checkbox is toggled on mouse button up:
-    SvxCheckListBox::MouseButtonUp(event);
-    m_dialog.enableOk();
-}
-
-void UpdateDialog::CheckListBox::KeyInput(KeyEvent const & event) {
-    SvxCheckListBox::KeyInput(event);
-    m_dialog.enableOk();
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos )
-{
-    SvListEntry *pData = GetEntry( rPos );
-
-    if ( pData )
-    {
-        USHORT nEntryPos = GetSelectEntryPos();
-        UpdateDialog::Index * p = static_cast< UpdateDialog::Index * >( GetEntryData( nEntryPos ) );
-
-        if ( ( p->m_eKind == ENABLED_UPDATE ) || ( p->m_eKind == DISABLED_UPDATE ) )
-        {
-            PopupMenu aPopup;
-
-            if ( p->m_bIgnored )
-                aPopup.InsertItem( CMD_ENABLE_UPDATE, m_enableUpdate );
-            else
-            {
-                aPopup.InsertItem( CMD_IGNORE_UPDATE, m_ignoreUpdate );
-                aPopup.InsertItem( CMD_IGNORE_ALL_UPDATES, m_ignoreAllUpdates );
-            }
-
-            USHORT aCmd = aPopup.Execute( this, rPos );
-            if ( ( aCmd == CMD_IGNORE_UPDATE ) || ( aCmd == CMD_IGNORE_ALL_UPDATES ) )
-            {
-                p->m_bIgnored = true;
-                if ( p->m_eKind == ENABLED_UPDATE )
-                {
-                    RemoveEntry( nEntryPos );
-                    m_dialog.addAdditional( p, SvLBoxButtonKind_disabledCheckbox );
-                }
-                if ( aCmd == CMD_IGNORE_UPDATE )
-                    m_dialog.setIgnoredUpdate( p, true, false );
-                else
-                    m_dialog.setIgnoredUpdate( p, true, true );
-                // TODO: reselect entry to display new description!
-            }
-            else if ( aCmd == CMD_ENABLE_UPDATE )
-            {
-                p->m_bIgnored = false;
-                if ( p->m_eKind == ENABLED_UPDATE )
-                {
-                    RemoveEntry( nEntryPos );
-                    m_dialog.insertItem( p, SvLBoxButtonKind_enabledCheckbox );
-                }
-                m_dialog.setIgnoredUpdate( p, false, false );
-            }
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-USHORT UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKind kind )
-{
-    m_updates.InsertEntry( pEntry->m_aName, LISTBOX_APPEND, static_cast< void * >( pEntry ), kind );
-
-    for ( USHORT i = m_updates.getItemCount(); i != 0 ; )
-    {
-        i -= 1;
-        UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData( i ) );
-        if ( p == pEntry )
-            return i;
-    }
-    OSL_ASSERT(0);
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::addAdditional( UpdateDialog::Index * index, SvLBoxButtonKind kind )
-{
-    m_all.Enable();
-    if (m_all.IsChecked())
-    {
-        insertItem( index, kind );
-        m_update.Enable();
-        m_updates.Enable();
-        m_description.Enable();
-        m_descriptions.Enable();
-    }
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::addEnabledUpdate( rtl::OUString const & name,
-                                     dp_gui::UpdateData & data )
-{
-    USHORT nIndex = sal::static_int_cast< USHORT >( m_enabledUpdates.size() );
-    UpdateDialog::Index *pEntry = new UpdateDialog::Index( ENABLED_UPDATE, nIndex, name,
-                                                           dp_misc::getIdentifier(data.aInstalledExtension));
-    m_enabledUpdates.push_back( data );
-    m_ListboxEntries.push_back( pEntry );
-
-    if ( ! isIgnoredUpdate( pEntry ) )
-    {
-        USHORT nPos = insertItem( pEntry, SvLBoxButtonKind_enabledCheckbox );
-        m_updates.CheckEntryPos( nPos );
-    }
-    else
-        addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox );
-
-    m_update.Enable();
-    m_updates.Enable();
-    m_description.Enable();
-    m_descriptions.Enable();
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::addDisabledUpdate( UpdateDialog::DisabledUpdate data )
-{
-    USHORT nIndex = sal::static_int_cast< USHORT >( m_disabledUpdates.size() );
-    UpdateDialog::Index *pEntry = new UpdateDialog::Index( DISABLED_UPDATE, nIndex, data.name,
-                                                           data.identifier);
-
-    m_disabledUpdates.push_back( data );
-    m_ListboxEntries.push_back( pEntry );
-
-    isIgnoredUpdate( pEntry );
-    addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox );
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::addSpecificError( UpdateDialog::SpecificError & data )
-{
-    USHORT nIndex = sal::static_int_cast< USHORT >( m_specificErrors.size() );
-    UpdateDialog::Index *pEntry = new UpdateDialog::Index( DISABLED_UPDATE, nIndex, data.name,
-        data.identifier);
-
-    m_specificErrors.push_back( data );
-    m_ListboxEntries.push_back( pEntry );
-
-    addAdditional( pEntry, SvLBoxButtonKind_staticImage);
-}
-
-void UpdateDialog::checkingDone() {
-    m_checking.Hide();
-    m_throbber->stop();
-    uno::Reference< awt::XWindow >(
-        m_throbber, uno::UNO_QUERY_THROW)->setVisible(false);
-    if (m_updates.getItemCount() == 0)
-    {
-        clearDescription();
-        m_description.Enable();
-        m_descriptions.Enable();
-
-        if ( m_disabledUpdates.empty() && m_specificErrors.empty() && m_ignoredUpdates.empty() )
-            showDescription( m_none, false );
-        else
-            showDescription( m_noInstallable, false );
-    }
-
-    enableOk();
-}
-
-void UpdateDialog::enableOk() {
-    if (!m_checking.IsVisible()) {
-        m_ok.Enable(m_updates.GetCheckedEntryCount() != 0);
-    }
-}
-
-// *********************************************************************************
-void UpdateDialog::createNotifyJob( bool bPrepareOnly,
-    uno::Sequence< uno::Sequence< rtl::OUString > > &rItemList )
-{
-    if ( !dp_misc::office_is_running() )
-        return;
-
-    // notify update check job
-    try
-    {
-        uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
-        uno::Reference< lang::XMultiServiceFactory > xConfigProvider(
-            xFactory->createInstance( OUSTR( "com.sun.star.configuration.ConfigurationProvider" )),
-            uno::UNO_QUERY_THROW);
-
-        beans::PropertyValue aProperty;
-        aProperty.Name  = OUSTR( "nodepath" );
-        aProperty.Value = uno::makeAny( OUSTR("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") );
-
-        uno::Sequence< uno::Any > aArgumentList( 1 );
-        aArgumentList[0] = uno::makeAny( aProperty );
-
-        uno::Reference< container::XNameAccess > xNameAccess(
-            xConfigProvider->createInstanceWithArguments(
-                OUSTR("com.sun.star.configuration.ConfigurationAccess"), aArgumentList ),
-            uno::UNO_QUERY_THROW );
-
-        util::URL aURL;
-        xNameAccess->getByName(OUSTR("URL")) >>= aURL.Complete;
-
-        uno::Reference < util::XURLTransformer > xTransformer( xFactory->createInstance( OUSTR( "com.sun.star.util.URLTransformer" ) ),
-            uno::UNO_QUERY_THROW );
-
-        xTransformer->parseStrict(aURL);
-
-        uno::Reference < frame::XDesktop > xDesktop( xFactory->createInstance( OUSTR( "com.sun.star.frame.Desktop" ) ),
-            uno::UNO_QUERY_THROW );
-        uno::Reference< frame::XDispatchProvider > xDispatchProvider( xDesktop->getCurrentFrame(),
-            uno::UNO_QUERY_THROW );
-        uno::Reference< frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, rtl::OUString(), 0);
-
-        if( xDispatch.is() )
-        {
-            uno::Sequence< beans::PropertyValue > aPropList(2);
-            aProperty.Name  = OUSTR( "updateList" );
-            aProperty.Value = uno::makeAny( rItemList );
-            aPropList[0] = aProperty;
-            aProperty.Name  = OUSTR( "prepareOnly" );
-            aProperty.Value = uno::makeAny( bPrepareOnly );
-            aPropList[1] = aProperty;
-
-            xDispatch->dispatch(aURL, aPropList );
-        }
-    }
-    catch( const uno::Exception& e )
-    {
-        dp_misc::TRACE( OUSTR("Caught exception: ") 
-            + e.Message + OUSTR("\n thread terminated.\n\n"));
-    }
-}
-
-// *********************************************************************************
-void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly )
-{
-    if ( !dp_misc::office_is_running() )
-        return;
-
-    uno::Sequence< uno::Sequence< rtl::OUString > > aItemList;
-    sal_Int32 nCount = 0;
-
-    if ( ! bRecheckOnly )
-    {
-        for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i )
-        {
-            uno::Sequence< rtl::OUString > aItem(2);
-           
-            UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >(m_updates.GetEntryData(i));
-    
-            if ( p->m_eKind == ENABLED_UPDATE )
-            {
-                dp_gui::UpdateData aUpdData = m_enabledUpdates[ p->m_nIndex ];
-                aItem[0] = dp_misc::getIdentifier( aUpdData.aInstalledExtension );
-    
-                dp_misc::DescriptionInfoset aInfoset( m_context, aUpdData.aUpdateInfo );
-                aItem[1] = aInfoset.getVersion();
-            }
-            else if ( p->m_eKind == DISABLED_UPDATE )
-                continue;
-            else
-                continue;
-    
-            aItemList.realloc( nCount + 1 );
-            aItemList[ nCount ] = aItem;
-            nCount += 1;
-        }
-    }
-
-    storeIgnoredUpdates();
-    createNotifyJob( bPrepareOnly, aItemList );
-}
-
-// *********************************************************************************
-
-void UpdateDialog::initDescription()
-{
-    m_PublisherLabel.Hide();
-    m_PublisherLink.Hide();
-    m_ReleaseNotesLabel.Hide();
-    m_ReleaseNotesLink.Hide();
-    m_descriptions.Hide();
-
-    Link aLink = LINK( this, UpdateDialog, hyperlink_clicked );
-    m_PublisherLink.SetClickHdl( aLink );
-    m_ReleaseNotesLink.SetClickHdl( aLink );
-
-    long nTextWidth = m_PublisherLabel.GetCtrlTextWidth( m_PublisherLabel.GetText() );
-    long nTemp = m_ReleaseNotesLabel.GetTextWidth( m_ReleaseNotesLabel.GetText() );
-    if ( nTemp > nTextWidth )
-        nTextWidth = nTemp;
-    nTextWidth = nTextWidth * 110 / 100;
-
-    Size aNewSize = m_PublisherLabel.GetSizePixel();
-    if ( nTextWidth > aNewSize.Width() )
-    {
-        long nDelta = nTextWidth - aNewSize.Width();
-        aNewSize.Width() = nTextWidth;
-        m_PublisherLabel.SetSizePixel( aNewSize );
-        m_ReleaseNotesLabel.SetSizePixel( aNewSize );
-
-        aNewSize = m_PublisherLink.GetSizePixel();
-        aNewSize.Width() = aNewSize.Width() - nDelta;
-        Point aNewPos = m_PublisherLink.GetPosPixel();
-        aNewPos.X() = aNewPos.X() + nDelta;
-        m_PublisherLink.SetPosSizePixel( aNewPos, aNewSize );
-        aNewPos.Y() = m_ReleaseNotesLink.GetPosPixel().Y();
-        m_ReleaseNotesLink.SetPosSizePixel( aNewPos, aNewSize );
-    }
-
-    m_aFirstLinePos = m_descriptions.GetPosPixel();
-    m_aFirstLineSize = m_descriptions.GetSizePixel();
-    Size aMarginSize = LogicToPixel( Size( RSC_SP_CTRL_GROUP_X, RSC_SP_CTRL_GROUP_Y ), MAP_APPFONT );
-    Point aThirdLinePos = m_ReleaseNotesLabel.GetPosPixel();
-    aThirdLinePos.Y() = aThirdLinePos.Y() + m_ReleaseNotesLabel.GetSizePixel().Height() + aMarginSize.Height();
-    m_nFirstLineDelta = aThirdLinePos.Y() - m_aFirstLinePos.Y();
-    m_nOneLineMissing = m_ReleaseNotesLabel.GetPosPixel().Y() - m_PublisherLabel.GetPosPixel().Y();
-}
-
-void UpdateDialog::clearDescription()
-{
-    String sEmpty;
-    m_PublisherLabel.Hide();
-    m_PublisherLink.Hide();
-    m_PublisherLink.SetDescription( sEmpty );
-    m_PublisherLink.SetURL( sEmpty );
-    m_ReleaseNotesLabel.Hide();
-    m_ReleaseNotesLink.Hide();
-    m_ReleaseNotesLink.SetURL( sEmpty );
-    if ( m_PublisherLabel.GetPosPixel().Y() == m_ReleaseNotesLabel.GetPosPixel().Y() )
-    {
-        Point aNewPos = m_ReleaseNotesLabel.GetPosPixel();
-        aNewPos.Y() += m_nOneLineMissing;
-        m_ReleaseNotesLabel.SetPosPixel( aNewPos );
-        aNewPos = m_ReleaseNotesLink.GetPosPixel();
-        aNewPos.Y() += m_nOneLineMissing;
-        m_ReleaseNotesLink.SetPosPixel( aNewPos );
-    }
-    m_descriptions.Hide();
-    m_descriptions.Clear();
-    m_descriptions.SetPosSizePixel( m_aFirstLinePos, m_aFirstLineSize );
-}
-
-bool UpdateDialog::showDescription(uno::Reference< xml::dom::XNode > const & aUpdateInfo)
-{
-    dp_misc::DescriptionInfoset infoset(m_context, aUpdateInfo);
-    return showDescription(infoset.getLocalizedPublisherNameAndURL(),
-                           infoset.getLocalizedReleaseNotesURL());
-}
-
-bool UpdateDialog::showDescription(uno::Reference< deployment::XPackage > const & aExtension)
-{
-    OSL_ASSERT(aExtension.is());
-    beans::StringPair pubInfo = aExtension->getPublisherInfo();
-    return showDescription(std::make_pair(pubInfo.First, pubInfo.Second),
-                           OUSTR(""));
-}
-
-bool UpdateDialog::showDescription(std::pair< rtl::OUString, rtl::OUString > const & pairPublisher,
-                                   rtl::OUString const & sReleaseNotes)
-{
-    rtl::OUString sPub = pairPublisher.first;
-    rtl::OUString sURL = pairPublisher.second;
-
-    if ( sPub.getLength() == 0 && sURL.getLength() == 0 && sReleaseNotes.getLength() == 0 )
-        // nothing to show
-        return false;
-
-    bool bPublisher = false;
-    if ( sPub.getLength() > 0 )
-    {
-        m_PublisherLabel.Show();
-        m_PublisherLink.Show();
-        m_PublisherLink.SetDescription( sPub );
-        m_PublisherLink.SetURL( sURL );
-        bPublisher = true;
-    }
-
-    if ( sReleaseNotes.getLength() > 0 )
-    {
-        if ( !bPublisher )
-        {
-            m_ReleaseNotesLabel.SetPosPixel( m_PublisherLabel.GetPosPixel() );
-            m_ReleaseNotesLink.SetPosPixel( m_PublisherLink.GetPosPixel() );
-        }
-        m_ReleaseNotesLabel.Show();
-        m_ReleaseNotesLink.Show();
-        m_ReleaseNotesLink.SetURL( sReleaseNotes );
-    }
-    return true;
-}
-
-bool UpdateDialog::showDescription( const String& rDescription, bool bWithPublisher )
-{
-    if ( rDescription.Len() == 0 )
-        // nothing to show
-        return false;
-
-    if ( bWithPublisher )
-    {
-        bool bOneLineMissing = !m_ReleaseNotesLabel.IsVisible() || !m_PublisherLabel.IsVisible();
-        Point aNewPos = m_aFirstLinePos;
-        aNewPos.Y() += m_nFirstLineDelta;
-        if ( bOneLineMissing )
-            aNewPos.Y() -= m_nOneLineMissing;
-        Size aNewSize = m_aFirstLineSize;
-        aNewSize.Height() -= m_nFirstLineDelta;
-        if ( bOneLineMissing )
-            aNewSize.Height() += m_nOneLineMissing;
-        m_descriptions.SetPosSizePixel( aNewPos, aNewSize );
-    }
-    m_descriptions.Show();
-    m_descriptions.SetDescription( rDescription );
-    return true;
-}
-
-bool UpdateDialog::isReadOnly( const uno::Reference< deployment::XPackage > &xPackage ) const
-{
-    if ( m_xExtensionManager.is() && xPackage.is() )
-    {
-        return m_xExtensionManager->isReadOnlyRepository( xPackage->getRepositoryName() );
-    }
-    else
-        return true;
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::getIgnoredUpdates()
-{
-    uno::Reference< lang::XMultiServiceFactory > xConfig( m_context->getServiceManager()->createInstanceWithContext(
-        OUSTR("com.sun.star.configuration.ConfigurationProvider"), m_context ), uno::UNO_QUERY_THROW);
-    beans::NamedValue aValue( OUSTR("nodepath"), uno::Any( IGNORED_UPDATES ) );
-    uno::Sequence< uno::Any > args(1);
-    args[0] <<= aValue;
-
-    uno::Reference< container::XNameAccess > xNameAccess( xConfig->createInstanceWithArguments( OUSTR("com.sun.star.configuration.ConfigurationAccess"), args), uno::UNO_QUERY_THROW );
-    uno::Sequence< rtl::OUString > aElementNames = xNameAccess->getElementNames();
-
-    for ( sal_Int32 i = 0; i < aElementNames.getLength(); i++ )
-    {
-        ::rtl::OUString aIdentifier = aElementNames[i];
-        ::rtl::OUString aVersion;
-
-        uno::Any aPropValue( uno::Reference< beans::XPropertySet >( xNameAccess->getByName( aIdentifier ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) );
-        aPropValue >>= aVersion;
-        IgnoredUpdate *pData = new IgnoredUpdate( aIdentifier, aVersion );
-        m_ignoredUpdates.push_back( pData );
-    }
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::storeIgnoredUpdates()
-{
-    if ( m_bModified && ( m_ignoredUpdates.size() != 0 ) )
-    {
-        uno::Reference< lang::XMultiServiceFactory > xConfig( m_context->getServiceManager()->createInstanceWithContext(
-            OUSTR("com.sun.star.configuration.ConfigurationProvider"), m_context ), uno::UNO_QUERY_THROW );
-        beans::NamedValue aValue( OUSTR("nodepath"), uno::Any( IGNORED_UPDATES ) );
-        uno::Sequence< uno::Any > args(1);
-        args[0] <<= aValue;
-
-        uno::Reference< container::XNameContainer > xNameContainer( xConfig->createInstanceWithArguments(
-            OUSTR("com.sun.star.configuration.ConfigurationUpdateAccess"), args ), uno::UNO_QUERY_THROW );
-
-        for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i )
-        {
-            if ( xNameContainer->hasByName( (*i)->sExtensionID ) )
-            {
-                if ( (*i)->bRemoved )
-                    xNameContainer->removeByName( (*i)->sExtensionID );
-                else
-                    uno::Reference< beans::XPropertySet >( xNameContainer->getByName( (*i)->sExtensionID ), uno::UNO_QUERY_THROW )->setPropertyValue( PROPERTY_VERSION, uno::Any( (*i)->sVersion ) );
-            }
-            else if ( ! (*i)->bRemoved )
-            {
-                uno::Reference< beans::XPropertySet > elem( uno::Reference< lang::XSingleServiceFactory >( xNameContainer, uno::UNO_QUERY_THROW )->createInstance(), uno::UNO_QUERY_THROW );
-                elem->setPropertyValue( PROPERTY_VERSION, uno::Any( (*i)->sVersion ) );
-                xNameContainer->insertByName( (*i)->sExtensionID, uno::Any( elem ) );
-            }
-        }
-    
-        uno::Reference< util::XChangesBatch > xChangesBatch( xNameContainer, uno::UNO_QUERY );
-        if ( xChangesBatch.is() && xChangesBatch->hasPendingChanges() )
-            xChangesBatch->commitChanges();
-    }
-
-    m_bModified = false;
-}
-
-//------------------------------------------------------------------------------
-bool UpdateDialog::isIgnoredUpdate( UpdateDialog::Index * index )
-{
-    bool bIsIgnored = false;
-
-    if ( m_ignoredUpdates.size() != 0 )
-    {
-        rtl::OUString aExtensionID;
-        rtl::OUString aVersion;
-
-        if ( index->m_eKind == ENABLED_UPDATE )
-        {
-            dp_gui::UpdateData aUpdData = m_enabledUpdates[ index->m_nIndex ];
-            aExtensionID = dp_misc::getIdentifier( aUpdData.aInstalledExtension );
-            aVersion = aUpdData.updateVersion;
-        }
-        else if ( index->m_eKind == DISABLED_UPDATE )
-        {
-            DisabledUpdate &rData = m_disabledUpdates[ index->m_nIndex ];
-            dp_misc::DescriptionInfoset aInfoset( m_context, rData.aUpdateInfo );
-            ::boost::optional< ::rtl::OUString > aID( aInfoset.getIdentifier() );
-            if ( aID )
-                aExtensionID = *aID;
-            aVersion = aInfoset.getVersion();
-        }
-
-        for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i )
-        {
-            if ( (*i)->sExtensionID == aExtensionID )
-            {
-                if ( ( (*i)->sVersion.getLength() == 0 ) || ( (*i)->sVersion == aVersion ) )
-                {
-                    bIsIgnored = true;
-                    index->m_bIgnored = true;
-                }
-                else // when we find another update of an ignored version, we will remove the old one to keep the ignored list small
-                    (*i)->bRemoved = true;
-                break;
-            }
-        }
-    }
-
-    return bIsIgnored;
-}
-
-//------------------------------------------------------------------------------
-void UpdateDialog::setIgnoredUpdate( UpdateDialog::Index *pIndex, bool bIgnore, bool bIgnoreAll )
-{
-    rtl::OUString aExtensionID;
-    rtl::OUString aVersion;
-
-    m_bModified = true;
-
-    if ( pIndex->m_eKind == ENABLED_UPDATE )
-    {
-        dp_gui::UpdateData aUpdData = m_enabledUpdates[ pIndex->m_nIndex ];
-        aExtensionID = dp_misc::getIdentifier( aUpdData.aInstalledExtension );
-        if ( !bIgnoreAll )
-            aVersion = aUpdData.updateVersion;
-    }
-    else if ( pIndex->m_eKind == DISABLED_UPDATE )
-    {
-        DisabledUpdate &rData = m_disabledUpdates[ pIndex->m_nIndex ];
-        dp_misc::DescriptionInfoset aInfoset( m_context, rData.aUpdateInfo );
-        ::boost::optional< ::rtl::OUString > aID( aInfoset.getIdentifier() );
-        if ( aID )
-            aExtensionID = *aID;
-        if ( !bIgnoreAll )
-            aVersion = aInfoset.getVersion();
-    }
-
-    if ( aExtensionID.getLength() )
-    {
-        bool bFound = false;
-        for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i )
-        {
-            if ( (*i)->sExtensionID == aExtensionID )
-            {
-                (*i)->sVersion = aVersion;
-                (*i)->bRemoved = !bIgnore;
-                bFound = true;
-                break;
-            }
-        }
-        if ( bIgnore && !bFound )
-        {
-            IgnoredUpdate *pData = new IgnoredUpdate( aExtensionID, aVersion );
-            m_ignoredUpdates.push_back( pData );
-        }
-    }
-}
-
-//ToDo: ring dependencies
-::std::vector<dp_gui::UpdateData> UpdateDialog::getAllDependingUpdates(
-    dp_gui::UpdateData const & upData) const
-{
-    //upData represents an update for an extension.
-    //Find all other updates which depend on it. This does not include
-    //updates from bundled or shared directory, because they have always
-    //satisfied dependencies. Otherwise they would be inoperative.
-    ::std::vector<dp_gui::UpdateData> vecReturn;
-
-    //iterate over all potential updates
-    typedef ::std::vector<dp_gui::UpdateData>::const_iterator CITU;
-    for (CITU i = m_enabledUpdates.begin(); i != m_enabledUpdates.end(); i++)
-    {
-        //check if the current potential update depends on the one represented
-        //by the parameter upData. That is, find in the member UpdateData::requiredUpdates
-        //the dependency which matches the extension representd by upData.
-        ::std::vector< uno::Reference<xml::dom::XElement> >::const_iterator iDep =
-            ::std::find_if(i->requiredUpdates.begin(),
-                           i->requiredUpdates.end(), MatchDependingExtension(upData));
-        if (iDep != i->requiredUpdates.end())
-        {
-            //now we must also find the extensions which depend from this one too
-            ::std::vector<dp_gui::UpdateData> vecDep = getAllDependingUpdates(*i);
-            for (CITU ii = vecDep.begin(); ii != vecDep.end(); ii++)
-                vecReturn.push_back(*ii);
-            //only the the selected updates are needed
-            if (m_updates.IsChecked(getListBoxPosition(*i)))
-                vecReturn.push_back(*i);
-        }
-    }
-    return vecReturn;
-}
-
-//ToDo: ring dependency
-::std::vector<dp_gui::UpdateData> UpdateDialog::getAllRequiredUpdates(
-    dp_gui::UpdateData const & upData) const
-{
-    ::std::vector<dp_gui::UpdateData> vecReturn;
-    typedef ::std::vector<uno::Reference<xml::dom::XElement> >::const_iterator CIT;
-    for (CIT i = upData.requiredUpdates.begin(); i != upData.requiredUpdates.end(); i++)
-    {
-        typedef ::std::vector< dp_gui::UpdateData >::const_iterator CIR;
-        CIR iReq =
-            ::std::find_if(m_enabledUpdates.begin(),
-                           m_enabledUpdates.end(), MatchRequiredExtension(*i));
-        if (iReq != m_enabledUpdates.end())
-        {
-            ::std::vector<dp_gui::UpdateData> vecReq = getAllRequiredUpdates(*iReq);
-            typedef ::std::vector<dp_gui::UpdateData>::const_iterator CIR;
-            for (CIR ii = vecReq.begin(); ii != vecReq.end(); ii++)
-                vecReturn.push_back(*ii);
-            //only the unselected updates are needed
-            if (!m_updates.IsChecked(getListBoxPosition(*iReq)))
-                vecReturn.push_back(*iReq);
-        }
-        
-    }
-    return vecReturn;
-}
-
-//ToDo ring dependency
-void UpdateDialog::addUpdateSorted(dp_gui::UpdateData const & curData,
-                     ::std::vector<dp_gui::UpdateData> const & vecUnorderedUpdates)
-{
-    //check if this UpdateData was already added.
-    ::std::vector< dp_gui::UpdateData >::const_iterator iData =
-        ::std::find_if(m_updateData.begin(), m_updateData.end(), MatchUpdateData(curData));
-    if (iData == m_updateData.end())
-    {
-        //Not added yet
-        //Only if all required updates are already in m_updateData then we can
-        //add this update as well.
-        typedef std::vector<uno::Reference<xml::dom::XElement> >::const_iterator CIT;
-        for (CIT i = curData.requiredUpdates.begin(); i != curData.requiredUpdates.end(); i++)
-        {
-            //We have the XElement which describes the dependency. Use it to get the
-            //corresponding UpdateData from the vecUnorderedUpdates. It must be contained
-            //otherwise this extension would not have been checked in the dialog
-            ::std::vector<dp_gui::UpdateData>::const_iterator iUpData =
-                ::std::find_if(vecUnorderedUpdates.begin(), vecUnorderedUpdates.end(),
-                               MatchUpdateData((*i)->getAttribute(OUSTR("identifier"))));
-            OSL_ASSERT(iUpData != vecUnorderedUpdates.end());
-            if (iUpData != vecUnorderedUpdates.end())
-                addUpdateSorted(*iUpData, vecUnorderedUpdates);
-        }
-            
-#if OSL_DEBUG_LEVEL > 0
-    iData = ::std::find_if(m_updateData.begin(), m_updateData.end(), MatchUpdateData(curData));
-    if (iData != m_updateData.end())
-        //OSL_ASSERT(must nut be added yet, otherwise ring dependency
-        OSL_ASSERT(0);
-#endif
-        m_updateData.push_back(curData);
-    }
-
-}
-
-void UpdateDialog::addUpdatesSorted(
-    ::std::vector<dp_gui::UpdateData> const & vecUnorderedUpdates)
-{
-    typedef ::std::vector<dp_gui::UpdateData>::const_iterator CIT;
-    for (CIT i = vecUnorderedUpdates.begin(); i != vecUnorderedUpdates.end(); i++)
-        addUpdateSorted(*i, vecUnorderedUpdates);
-}
-
-//We assume that the corresponding entry exist
-USHORT UpdateDialog::getListBoxPosition(dp_gui::UpdateData const & data) const
-{
-    UpdateDialog::Index const * pEntry = NULL;
-    USHORT i = 0;
-    do
-    {
-        pEntry = static_cast< UpdateDialog::Index const * >(
-            m_updates.GetEntryData(i++));
-        if (pEntry != NULL
-            && pEntry->m_identifier.equals(dp_misc::getIdentifier(data.aInstalledExtension)))
-            break;
-    }
-    while (pEntry != NULL);
-    OSL_ASSERT(pEntry);
-    return i - 1;
-}
-//------------------------------------------------------------------------------
-IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
-{
-    rtl::OUStringBuffer b;
-    bool bInserted = false;
-    UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >(
-        m_updates.GetEntryData(m_updates.GetSelectEntryPos()));
-    clearDescription();
-
-    if ( p != NULL )
-    {
-        USHORT pos = p->m_nIndex;
-
-        switch (p->m_eKind)
-        {
-            case ENABLED_UPDATE:
-            {
-                if ( m_enabledUpdates[ pos ].aUpdateSource.is() )
-                    bInserted = showDescription( m_enabledUpdates[ pos ].aUpdateSource );
-                else
-                    bInserted = showDescription( m_enabledUpdates[ pos ].aUpdateInfo );
-
-                if ( p->m_bIgnored )
-                    b.append( m_ignoredUpdate );