diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-01-11 11:31:10 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-01-11 11:31:10 +0100 |
commit | 0014f10d9237e82357e11aedecca817f67827536 (patch) | |
tree | add4e7a1d9ee6b330f71d92d045bebd431c34334 /desktop/source | |
parent | 08d920b23f3817b0e2b5277eb5f3519e5cf355b6 (diff) |
#i105556#: remove unused code
Diffstat (limited to 'desktop/source')
21 files changed, 23 insertions, 601 deletions
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index 75005b728465..b19f1f672d69 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -81,19 +81,6 @@ PersistentMap::~PersistentMap() } //______________________________________________________________________________ -void PersistentMap::flush() const -{ - try { - int err = m_db.sync(0); - if (err != 0) - throw_rtexc(err); - } - catch (DbException & exc) { - throw_rtexc( exc.get_errno(), exc.what() ); - } -} - -//______________________________________________________________________________ PersistentMap::PersistentMap( OUString const & url_, bool readOnly ) : m_db( 0, 0 ) { diff --git a/desktop/source/deployment/gui/dp_gui.h b/desktop/source/deployment/gui/dp_gui.h index 7f2cb7a9626a..a2459bf64021 100644 --- a/desktop/source/deployment/gui/dp_gui.h +++ b/desktop/source/deployment/gui/dp_gui.h @@ -33,7 +33,6 @@ #include "dp_gui_updatedata.hxx" #include "dp_misc.h" -#include "dp_gui_updatability.hxx" #include "dp_gui.hrc" #include "rtl/ref.hxx" #include "rtl/instance.hxx" diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index b2620703a44a..986e661aeff3 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -769,12 +769,6 @@ ExtMgrDialog::~ExtMgrDialog() } //------------------------------------------------------------------------------ -void ExtMgrDialog::selectEntry( long nPos ) -{ - m_pExtensionBox->selectEntry( nPos ); -} - -//------------------------------------------------------------------------------ void ExtMgrDialog::setGetExtensionsURL( const ::rtl::OUString &rURL ) { m_aGetExtensions.SetURL( rURL ); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 7536aa403cfe..05e1680597d5 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -163,7 +163,6 @@ public: virtual void updatePackageInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ); void setGetExtensionsURL( const ::rtl::OUString &rURL ); - void selectEntry( long nPos ); virtual long addPackageToList( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &, const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackageManager > & ); bool enablePackage( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackageManager > &xPackageManager, diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 889fdc04c9e1..ff08dc3dfa35 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -252,7 +252,6 @@ public: const bool bEnable ); void checkForUpdates( const std::vector< TUpdateListEntry > &vExtensionList ); void stop(); - bool hasTerminated(); bool isBusy(); static OUString searchAndReplaceAll( const OUString &rSource, @@ -745,13 +744,6 @@ void ExtensionCmdQueue::Thread::stop() } //------------------------------------------------------------------------------ -bool ExtensionCmdQueue::Thread::hasTerminated() -{ - osl::MutexGuard aGuard( m_mutex ); - return m_bTerminated; -} - -//------------------------------------------------------------------------------ bool ExtensionCmdQueue::Thread::isBusy() { osl::MutexGuard aGuard( m_mutex ); @@ -1161,17 +1153,6 @@ void ExtensionCmdQueue::stop() m_thread->stop(); } -void ExtensionCmdQueue::stopAndWait() -{ - m_thread->stop(); - m_thread->join(); -} - -bool ExtensionCmdQueue::hasTerminated() -{ - return m_thread->hasTerminated(); -} - bool ExtensionCmdQueue::isBusy() { return m_thread->isBusy(); diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx index 2d24f00e3c8e..642c286206cb 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx @@ -96,14 +96,6 @@ public: */ void stop(); - /** Determines if thread of this class has terminated. - */ - bool hasTerminated(); - - /** Blocks until the thread has terminated. All URLs in the queue will be processed. - */ - void stopAndWait(); - bool isBusy(); private: ExtensionCmdQueue(ExtensionCmdQueue &); // not defined diff --git a/desktop/source/deployment/gui/dp_gui_updatability.cxx b/desktop/source/deployment/gui/dp_gui_updatability.cxx deleted file mode 100644 index 4d3d8efbce2b..000000000000 --- a/desktop/source/deployment/gui/dp_gui_updatability.cxx +++ /dev/null @@ -1,280 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: dp_gui_updatability.cxx,v $ - * $Revision: 1.6.86.1 $ - * - * 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 "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/XPackageManager.hpp" -#include "com/sun/star/deployment/XUpdateInformationProvider.hpp" -#include "com/sun/star/task/XAbortChannel.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/Reference.hxx" -#include "com/sun/star/uno/RuntimeException.hpp" -#include "com/sun/star/uno/Sequence.hxx" -#include "com/sun/star/uno/XInterface.hpp" -#include "osl/conditn.hxx" -#include "osl/diagnose.h" -#include "osl/mutex.hxx" -#include "rtl/ref.hxx" -#include "rtl/ustring.h" -#include "rtl/ustring.hxx" -#include "sal/types.h" -#include "vcl/svapp.hxx" -#include "vcl/window.hxx" -#include "vos/mutex.hxx" - -#include "dp_misc.h" -#include "dp_gui_thread.hxx" -#include "dp_gui_updatability.hxx" - -namespace com { namespace sun { namespace star { namespace uno { - class XComponentContext; -} } } } - -using dp_gui::Updatability; - -namespace { - -namespace css = com::sun::star; - -} - -class Updatability::Thread: public dp_gui::Thread { -public: - Thread( - css::uno::Sequence< css::uno::Reference< - css::deployment::XPackageManager > > const & packageManagers, - Window & enabled); - - void start(); - - void stop(); - -private: - Thread(Thread &); // not defined - void operator =(Thread &); // not defined - - virtual ~Thread(); - - virtual void execute(); - - enum Input { NONE, START, STOP }; - - bool m_predeterminedUpdateUrl; - css::uno::Sequence< css::uno::Reference< - css::deployment::XPackageManager > > m_packageManagers; - - osl::Condition m_wakeup; - osl::Mutex m_mutex; - Window * m_enabled; - Input m_input; - css::uno::Reference< css::task::XAbortChannel > m_abort; -}; - -Updatability::Thread::Thread( - css::uno::Sequence< css::uno::Reference< - css::deployment::XPackageManager > > const & packageManagers, - Window & enabled): - m_predeterminedUpdateUrl(dp_misc::getExtensionDefaultUpdateURL().getLength() > 0), - m_packageManagers(packageManagers), - m_enabled(&enabled), - m_input(NONE) -{} - -void Updatability::Thread::start() { - css::uno::Reference< css::task::XAbortChannel > abort; - { - osl::MutexGuard g(m_mutex); - m_input = START; - abort = m_abort; - m_abort.clear(); - } - m_wakeup.set(); - if (abort.is()) { - abort->sendAbort(); - } -} - -void Updatability::Thread::stop() { - css::uno::Reference< css::task::XAbortChannel > abort; - { - vos::OGuard g1(Application::GetSolarMutex()); - osl::MutexGuard g2(m_mutex); - m_input = STOP; - m_enabled = NULL; - abort = m_abort; - m_abort.clear(); - } - m_wakeup.set(); - if (abort.is()) { - abort->sendAbort(); - } -} - -Updatability::Thread::~Thread() {} - -void Updatability::Thread::execute() { - for (;;) { - - if (m_wakeup.wait() != osl::Condition::result_ok) { - dp_misc::TRACE("dp_gui::Updatability::Thread::run: ignored \n"); - dp_misc::TRACE("osl::Condition::wait failure\n"); - } - m_wakeup.reset(); - Input input; - { - osl::MutexGuard g(m_mutex); - input = m_input; - m_input = NONE; - } - if (input == NONE) { - continue; - } - start: - if (input == STOP) { - break; - } - bool enabled = false; - for (sal_Int32 i = 0; !enabled && i < m_packageManagers.getLength(); - ++i) - { - css::uno::Reference< css::task::XAbortChannel > abort( - m_packageManagers[i]->createAbortChannel()); - { - osl::MutexGuard g(m_mutex); - input = m_input; - m_input = NONE; - if (input == NONE) { - //In case input would be STOP then we would later break out of the loop - //before further calls to the XPackageManger are done. That is, the abort - //channel would not be used anyway. - m_abort = abort; - } - if (input != NONE) { - goto start; - } - } - css::uno::Sequence< - css::uno::Reference< css::deployment::XPackage > > ps; - try { - ps = m_packageManagers[i]->getDeployedPackages( - abort, - css::uno::Reference< css::ucb::XCommandEnvironment >()); - } catch (css::deployment::DeploymentException &) { - // If there are any problematic package managers, enable the - // update button and let the update process report any problems - // to the user: - enabled = true; - continue; - } catch (css::ucb::CommandFailedException &) { - throw css::uno::RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "CommandFailedException: cannot happen")), - css::uno::Reference< css::uno::XInterface >()); - } catch (css::ucb::CommandAbortedException &) { - osl::MutexGuard g(m_mutex); - input = m_input; - m_input = NONE; - OSL_ASSERT(input != NONE); - goto start; - } catch (css::lang::IllegalArgumentException &) { - throw css::uno::RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "IllegalArgumentException: cannot happen")), - css::uno::Reference< css::uno::XInterface >()); - } - if (m_predeterminedUpdateUrl && ps.getLength() != 0) { - enabled = true; - } else { - for (sal_Int32 j = 0; j < ps.getLength(); ++j) { - if (ps[j]->getUpdateInformationURLs().getLength() != 0) { - enabled = true; - break; - } - { - osl::MutexGuard g(m_mutex); - input = m_input; - m_input = NONE; - } - if (input != NONE) { - goto start; - } - } - } - } - vos::OGuard g1(Application::GetSolarMutex()); - Window * e; - { - osl::MutexGuard g2(m_mutex); - e = m_enabled; - } - if (e != NULL) { - e->Enable(enabled); - } - } -} - -Updatability::Updatability( - css::uno::Sequence< - css::uno::Reference< css::deployment::XPackageManager > > const & - packageManagers, - Window & enabled): - m_thread(new Thread(packageManagers, enabled)) -{ - m_thread->launch(); -} - -Updatability::~Updatability() { - -} - -void Updatability::start() { - m_thread->start(); -} - -void Updatability::stop() { - m_thread->stop(); - // Bad hack; m_thread calls Application::GetSolarMutex, which only works - // as long as DeInitVCL has not been called: - ULONG n = Application::ReleaseSolarMutex(); - m_thread->join(); - Application::AcquireSolarMutex(n); -} diff --git a/desktop/source/deployment/gui/dp_gui_updatability.hxx b/desktop/source/deployment/gui/dp_gui_updatability.hxx deleted file mode 100644 index 3cefdb019f6d..000000000000 --- a/desktop/source/deployment/gui/dp_gui_updatability.hxx +++ /dev/null @@ -1,104 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: dp_gui_updatability.hxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_UPDATABILITY_HXX -#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_UPDATABILITY_HXX - -#include "sal/config.h" -#include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/Sequence.hxx" -#include "rtl/ref.hxx" - -/// @HTML - -class Window; -namespace com { namespace sun { namespace star { - namespace deployment { class XPackageManager; } - namespace uno { class XComponentContext; } -} } } - -namespace dp_gui { - -/** - Asynchronously determine whether <code>dp_gui::DialogImpl</code>'s - “Check for Updates...” button shall be enabled (which - theoretically can take some time). - - <p>Note that, due to the asynchronous operation, the button may be enabled - even if there are no updatable extensions.</p> - - <p>Each instance of this class must be called from a single thread in order - to adhere to the following protocol: <code>stop</code> must be called exactly - once, with no intervening calls to <code>start</code>, before the destructor - is called.</p> -*/ -class Updatability { -public: - /** - Create an instance. - - @param packageManagers - a list of non-null package managers - - @param enabled - <code>dp_gui::DialogImpl</code>'s “Check for Updates...” - button; will only be accessed with the solar mutex locked - */ - Updatability( - com::sun::star::uno::Sequence< com::sun::star::uno::Reference< - com::sun::star::deployment::XPackageManager > > const & - packageManagers, - Window & enabled); - - ~Updatability(); - - /** - (Re-)start determining whether <code>dp_gui::DialogImpl</code>'s - “Check for Updates...” button shall be enabled. - */ - void start(); - - /** - Orderly shut down this instance. - */ - void stop(); - -private: - Updatability(Updatability &); // not defined - void operator =(Updatability &); // not defined - - class Thread; - - rtl::Reference< Thread > m_thread; -}; - -} - -#endif diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 58e2cbd9bd0a..197dce4a3251 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -256,9 +256,9 @@ private: virtual ~Thread(); virtual void execute(); - +#if 0 void handleGeneralError(css::uno::Any const & exception) const; - +#endif void handleSpecificError( css::uno::Reference< css::deployment::XPackage > const & package, css::uno::Any const & exception) const; @@ -413,7 +413,7 @@ void UpdateDialog::Thread::execute() m_dialog.checkingDone(); } } - +#if 0 void UpdateDialog::Thread::handleGeneralError(css::uno::Any const & exception) const { @@ -427,7 +427,7 @@ void UpdateDialog::Thread::handleGeneralError(css::uno::Any const & exception) m_dialog.addGeneralError(message); } } - +#endif //Parameter package can be null void UpdateDialog::Thread::handleSpecificError( css::uno::Reference< css::deployment::XPackage > const & package, @@ -782,7 +782,7 @@ void UpdateDialog::addDisabledUpdate(UpdateDialog::DisabledUpdate const & data) SvLBoxButtonKind_disabledCheckbox); // position overflow is rather harmless } - +#if 0 void UpdateDialog::addGeneralError(rtl::OUString const & message) { std::vector< rtl::OUString >::size_type n = m_generalErrors.size(); m_generalErrors.push_back(message); @@ -793,7 +793,7 @@ void UpdateDialog::addGeneralError(rtl::OUString const & message) { UpdateDialog::Index::newGeneralError(n), SvLBoxButtonKind_staticImage); // position overflow is rather harmless } - +#endif void UpdateDialog::addSpecificError(UpdateDialog::SpecificError const & data) { std::vector< UpdateDialog::SpecificError >::size_type n = m_specificErrors.size(); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index 578ad6b6f01d..484a60e02a4e 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -157,9 +157,9 @@ private: rtl::OUString const & name, dp_gui::UpdateData const & data); void addDisabledUpdate(UpdateDialog::DisabledUpdate const & data); - +#if 0 void addGeneralError(rtl::OUString const & message); - +#endif void addSpecificError(UpdateDialog::SpecificError const & data); void checkingDone(); diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk index 4d563ae1591a..328e1db3e29c 100644 --- a/desktop/source/deployment/gui/makefile.mk +++ b/desktop/source/deployment/gui/makefile.mk @@ -56,7 +56,6 @@ SLOFILES = \ $(SLO)$/license_dialog.obj \ $(SLO)$/dp_gui_dependencydialog.obj \ $(SLO)$/dp_gui_thread.obj \ - $(SLO)$/dp_gui_updatability.obj \ $(SLO)$/dp_gui_updatedialog.obj \ $(SLO)$/dp_gui_updateinstalldialog.obj \ $(SLO)$/dp_gui_autoscrolledit.obj \ diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx index bff5e2c8a89f..dc36685fd4a3 100644 --- a/desktop/source/deployment/inc/dp_dependencies.hxx +++ b/desktop/source/deployment/inc/dp_dependencies.hxx @@ -66,20 +66,6 @@ namespace Dependencies { check(::dp_misc::DescriptionInfoset const & infoset); /** - Obtain the (human-readable) name of a dependency. - - @param dependency - a dependency represented as a non-null XML element - - @return - the name of the dependency; will never be empty, as a localized - “unknown” is substituted for an empty/missing name - */ - DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::rtl::OUString name( - ::com::sun::star::uno::Reference< - ::com::sun::star::xml::dom::XElement > const & dependency); - - /** Obtain the (human-readable) error message of a failed dependency. @param dependency diff --git a/desktop/source/deployment/inc/dp_persmap.h b/desktop/source/deployment/inc/dp_persmap.h index 3a0873e5c05b..18e2e9cbad69 100644 --- a/desktop/source/deployment/inc/dp_persmap.h +++ b/desktop/source/deployment/inc/dp_persmap.h @@ -56,8 +56,6 @@ public: /** in mem db */ PersistentMap(); - void flush() const; - bool has( ::rtl::OString const & key ) const; bool get( ::rtl::OString * value, ::rtl::OString const & key ) const; t_string2string_map getEntries() const; diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 6ddadcf7c24a..6b5fb05187fe 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -127,18 +127,6 @@ check(::dp_misc::DescriptionInfoset const & infoset) { return unsatisfied; } -::rtl::OUString -name(css::uno::Reference< css::xml::dom::XElement > const & dependency) { - ::rtl::OUString n( - dependency->getAttributeNS( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")))); - return n.getLength() == 0 - ? ::rtl::OUString( - ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN))) - : n; -} - ::rtl::OUString getErrorText( css::uno::Reference< css::xml::dom::XElement > const & dependency ) { ::rtl::OUString sReason; diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index c21767a0f83d..10fb7b113f35 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -97,27 +97,20 @@ WelcomePage::WelcomePage( svt::OWizardMachine* parent, const ResId& resid, sal_B _setBold(m_ftHead); checkEval(); - // we need to choose the welcome text that is diplayed - // choices are the default text, default text+migradtion, - // OEM and extended OEM - // No OEM is built, remove the check -// switch (checkOEM()) -// { -// case OEM_NONE: - // check for migration - if (Migration::checkMigration()) - { - String aText(WizardResId(STR_WELCOME_MIGRATION)); - // replace %OLDPRODUCT with found version name - aText.SearchAndReplaceAll( UniString::CreateFromAscii("%OLD_VERSION"), Migration::getOldVersionName()); - m_ftBody.SetText( aText ); - } - else - if ( ! m_bLicenseNeedsAcceptance ) - { - String aText(WizardResId(STR_WELCOME_WITHOUT_LICENSE)); - m_ftBody.SetText( aText ); - } + + // check for migration + if (Migration::checkMigration()) + { + String aText(WizardResId(STR_WELCOME_MIGRATION)); + // replace %OLDPRODUCT with found version name + aText.SearchAndReplaceAll( UniString::CreateFromAscii("%OLD_VERSION"), Migration::getOldVersionName()); + m_ftBody.SetText( aText ); + } + else if ( ! m_bLicenseNeedsAcceptance ) + { + String aText(WizardResId(STR_WELCOME_WITHOUT_LICENSE)); + m_ftBody.SetText( aText ); + } } @@ -625,84 +618,4 @@ void RegistrationPage::executeSingleMode() ::utl::RegOptions().removeReminder(); } -// ----------------------------------------------------------------------- - -static char const OEM_PRELOAD_SECTION[] = "Bootstrap"; -static char const OEM_PRELOAD[] = "Preload"; -static char const STR_TRUE[] = "1"; -static char const STR_FALSE[] = "0"; - -static sal_Bool existsURL( OUString const& _sURL ) -{ - using namespace osl; - DirectoryItem aDirItem; - - if (_sURL.getLength() != 0) - return ( DirectoryItem::get( _sURL, aDirItem ) == DirectoryItem::E_None ); - - return sal_False; -} - - -// locate soffice.ini/.rc file -static OUString locateIniFile() -{ - OUString aUserDataPath; - OUString aSofficeIniFileURL; - - // Retrieve the default file URL for the soffice.ini/rc - rtl::Bootstrap().getIniName( aSofficeIniFileURL ); - - if ( utl::Bootstrap::locateUserData( aUserDataPath ) == utl::Bootstrap::PATH_EXISTS ) - { - const char CONFIG_DIR[] = "/config"; - - sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/'); - if ( nIndex > 0 ) - { - OUString aUserSofficeIniFileURL; - OUStringBuffer aBuffer( aUserDataPath ); - aBuffer.appendAscii( CONFIG_DIR ); - aBuffer.append( aSofficeIniFileURL.copy( nIndex )); - aUserSofficeIniFileURL = aBuffer.makeStringAndClear(); - - if ( existsURL( aUserSofficeIniFileURL )) - return aUserSofficeIniFileURL; - } - } - // Fallback try to use the soffice.ini/rc from program folder - return aSofficeIniFileURL; -} - -// check whether the OEMPreload flag was set in soffice.ini/.rc -static sal_Int32 checkOEMPreloadFlag() -{ - OUString aSofficeIniFileURL; - aSofficeIniFileURL = locateIniFile(); - Config aConfig(aSofficeIniFileURL); - aConfig.SetGroup( OEM_PRELOAD_SECTION ); - ByteString sResult = aConfig.ReadKey( OEM_PRELOAD ); - return sResult.ToInt32(); - /* - if ( sResult == STR_TRUE ) - return sal_True; - else - return sal_False; - */ -} - -WelcomePage::OEMType WelcomePage::checkOEM() -{ - sal_Int32 oemResult = checkOEMPreloadFlag(); - switch (oemResult) { - case 1: - return OEM_NORMAL; - case 2: - return OEM_EXTENDED; - default: - return OEM_NONE; - } -} - } // namespace desktop - diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx index b5e89860792c..05bb9ef825c2 100644 --- a/desktop/source/migration/pages.hxx +++ b/desktop/source/migration/pages.hxx @@ -54,7 +54,6 @@ private: { OEM_NONE, OEM_NORMAL, OEM_EXTENDED }; - OEMType checkOEM(); bool bIsEvalVersion; bool bNoEvalText; void checkEval(); diff --git a/desktop/source/migration/services/extensionmigration.cxx b/desktop/source/migration/services/extensionmigration.cxx index fc92ed805ca7..cb0c7609abd0 100755 --- a/desktop/source/migration/services/extensionmigration.cxx +++ b/desktop/source/migration/services/extensionmigration.cxx @@ -244,16 +244,6 @@ namespace migration } } - void ExtensionMigration::registerConfigurationPackage( const uno::Reference< deployment::XPackage > & xPkg) - { - const ::rtl::OUString sMediaType = xPkg->getPackageType()->getMediaType(); - if ( (sMediaType.equals(sConfigurationDataType) || sMediaType.equals(sConfigurationSchemaType) ) ) - { - xPkg->revokePackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ()); - xPkg->registerPackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ()); - } - } - bool ExtensionMigration::processExtensions( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ) { if (!copy(sSourceDir, sTargetDir)) diff --git a/desktop/source/migration/services/extensionmigration.hxx b/desktop/source/migration/services/extensionmigration.hxx index 55c66a7beea0..6a07e58782ee 100755 --- a/desktop/source/migration/services/extensionmigration.hxx +++ b/desktop/source/migration/services/extensionmigration.hxx @@ -101,8 +101,6 @@ namespace migration ::com::sun::star::deployment::XPackage > & xPkg); void registerBasicPackage( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg); - void registerConfigurationPackage( - const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg); public: ExtensionMigration(::com::sun::star::uno::Reference< diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx index ff0cd6021c13..3b34e9c9a08c 100644 --- a/desktop/source/migration/services/jvmfwk.cxx +++ b/desktop/source/migration/services/jvmfwk.cxx @@ -241,15 +241,6 @@ css::uno::Sequence< OUString > jvmfwk_getSupportedServiceNames() return css::uno::Sequence< OUString >( &str_name, 1 ); } -css::uno::Reference< css::uno::XInterface > SAL_CALL jvmfwk_create( - css::uno::Reference< css::uno::XComponentContext > const & ) - throw (css::uno::Exception) -{ - return static_cast< ::cppu::OWeakObject * >(new JavaMigration); - -} - - // XServiceInfo OUString SAL_CALL JavaMigration::getImplementationName() throw (css::uno::RuntimeException) diff --git a/desktop/source/migration/services/jvmfwk.hxx b/desktop/source/migration/services/jvmfwk.hxx index aad72ea911a3..ed3a486529f2 100644 --- a/desktop/source/migration/services/jvmfwk.hxx +++ b/desktop/source/migration/services/jvmfwk.hxx @@ -45,16 +45,9 @@ namespace css = com::sun::star; namespace migration { - rtl::OUString jvmfwk_getImplementationName(); css::uno::Sequence< rtl::OUString > jvmfwk_getSupportedServiceNames(); - -css::uno::Reference< css::uno::XInterface > SAL_CALL jvmfwk_create( - css::uno::Reference< css::uno::XComponentContext > const & ) - throw (css::uno::Exception); - - } //end blind namespace diff --git a/desktop/source/migration/services/makefile.mk b/desktop/source/migration/services/makefile.mk index 22d28ee00c73..de8059d57ea2 100644 --- a/desktop/source/migration/services/makefile.mk +++ b/desktop/source/migration/services/makefile.mk @@ -54,8 +54,7 @@ SLOFILES= \ $(SLO)$/cexports.obj \ $(SLO)$/basicmigration.obj \ $(SLO)$/wordbookmigration.obj \ - $(SLO)$/extensionmigration.obj \ - $(SLO)$/autocorrmigration.obj + $(SLO)$/extensionmigration.obj SHL1TARGET=$(TARGET) SHL1VERSIONMAP = migrationoo2.map |