diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-10-06 07:38:24 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-10-06 07:38:24 +0200 |
commit | b06310548b2b1908ac9a03f225acae109a3af5c3 (patch) | |
tree | f46346af0dd6c7527efa52070bf41ca9f7ee38d9 /desktop | |
parent | 71db90a924df762c6f0884e26d9483470d91341f (diff) |
#103496#: move VCL free ConfigItems to unotools
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 26 | ||||
-rw-r--r-- | desktop/source/app/appinit.cxx | 30 | ||||
-rw-r--r-- | desktop/source/app/langselect.cxx | 28 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 4 | ||||
-rw-r--r-- | desktop/source/migration/pages.cxx | 16 |
5 files changed, 52 insertions, 52 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index a68c043390..0e09b8b87d 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -114,14 +114,14 @@ #include <unotools/ucbhelper.hxx> #include <tools/tempfile.hxx> #include <tools/urlobj.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <osl/module.h> #include <osl/file.hxx> #include <osl/signal.h> #include <rtl/uuid.h> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <svtools/languageoptions.hxx> -#include <svtools/internaloptions.hxx> +#include <unotools/internaloptions.hxx> #include <svtools/miscopt.hxx> #include <svtools/menuoptions.hxx> #include <svtools/syslocaleoptions.hxx> @@ -149,7 +149,7 @@ #include <svtools/apearcfg.hxx> #include <svtools/misccfg.hxx> #include <svtools/filter.hxx> -#include <svtools/regoptions.hxx> +#include <unotools/regoptions.hxx> #include "langselect.hxx" @@ -1397,10 +1397,10 @@ void Desktop::Main() if ( ! pCmdLineArgs->IsNoFirstStartWizard()) { RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ FirstStartWizard" ); - + if (IsFirstStartWizardNeeded()) { - ::svt::RegOptions().removeReminder(); // remove patch registration reminder + ::utl::RegOptions().removeReminder(); // remove patch registration reminder Reference< XJob > xFirstStartJob( xSMgr->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.comp.desktop.FirstStart" ) ), UNO_QUERY ); if (xFirstStartJob.is()) @@ -1411,7 +1411,7 @@ void Desktop::Main() lArgs[0].Value <<= LicenseNeedsAcceptance(); lArgs[1].Name = ::rtl::OUString::createFromAscii("LicensePath"); lArgs[1].Value <<= GetLicensePath(); - + xFirstStartJob->execute(lArgs) >>= bDone; if ( !bDone ) { @@ -1421,7 +1421,7 @@ void Desktop::Main() } else if ( RegistrationPage::hasReminderDateCome() ) RegistrationPage::executeSingleMode(); - + RTL_LOGFILE_CONTEXT_TRACE( aLog, "} FirstStartWizard" ); } @@ -2472,7 +2472,7 @@ void Desktop::OpenClients() } } } - + OfficeIPCThread::EnableRequests(); sal_Bool bShutdown( sal_False ); @@ -2809,11 +2809,11 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xDesktop( xSMGR->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), ::com::sun::star::uno::UNO_QUERY ); - + // check provider ... we know it's weak reference only if ( ! xDesktop.is()) return; - + css::uno::Reference< css::util::XURLTransformer > xParser(xSMGR->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), css::uno::UNO_QUERY_THROW); css::util::URL aCommand; if( rAppEvent.GetData().EqualsAscii( "PREFERENCES" ) ) @@ -2823,7 +2823,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) if( aCommand.Complete.getLength() ) { xParser->parseStrict(aCommand); - + css::uno::Reference< css::frame::XDispatch > xDispatch = xDesktop->queryDispatch(aCommand, rtl::OUString(), 0); if (xDispatch.is()) xDispatch->dispatch(aCommand, css::uno::Sequence< css::beans::PropertyValue >()); diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index a477eb2ad4..94bd3c55b3 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -75,9 +75,9 @@ #include <unotools/tempfile.hxx> #include <ucbhelper/contentbroker.hxx> #include <vcl/svapp.hxx> -#include <svtools/startoptions.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/internaloptions.hxx> +#include <unotools/startoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/internaloptions.hxx> #define DEFINE_CONST_OUSTRING(CONSTASCII) OUString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) @@ -131,7 +131,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) aArgs[4] <<= rtl::OUString::createFromAscii("PORTAL"); aArgs[5] <<= aPortal.makeStringAndClear(); - bool ret = + bool ret = ::ucbhelper::ContentBroker::initialize( xServiceFactory, aArgs ) != false; #ifdef GNOME_VFS_ENABLED @@ -178,7 +178,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) // Workaround for P1 #124597#. Instanciate GNOME-VFS-UCP in the thread that initialized // GNOME in order to avoid a deadlock that may occure in case UCP gets initialized from - // a different thread. The latter may happen when calling the Office remotely via UNO. + // a different thread. The latter may happen when calling the Office remotely via UNO. // THIS IS NOT A FIX, JUST A WORKAROUND! try @@ -201,16 +201,16 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) } } catch (RuntimeException e) { } - } + } #endif // GNOME_VFS_ENABLED - + return ret;; } Reference< XMultiServiceFactory > Desktop::CreateApplicationServiceManager() { RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createApplicationServiceManager" ); - + try { Reference<XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); @@ -332,7 +332,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString) Sequence< Any > aSeq( 2 ); aSeq[0] <<= aAcceptString; aSeq[1] <<= bAccept; - Reference<XInitialization> rAcceptor( + Reference<XInitialization> rAcceptor( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii( "com.sun.star.office.Acceptor" )), UNO_QUERY ); if ( rAcceptor.is() ) { @@ -366,7 +366,7 @@ class enable } } }; - + void Desktop::enableAcceptors() { RTL_LOGFILE_CONTEXT(aLog, "desktop (lo119109) Desktop::enableAcceptors"); @@ -389,14 +389,14 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString) AcceptorMap &rMap = acceptorMap::get(); if (aAcceptString.compareToAscii("all") == 0) { rMap.clear(); - + } else { // try to remove acceptor from map AcceptorMap::const_iterator pIter = rMap.find(aAcceptString); if (pIter != rMap.end() ) { // remove reference from map // this is the last reference and the acceptor will be destructed - rMap.erase(aAcceptString); + rMap.erase(aAcceptString); } else { OSL_ENSURE(sal_False, "Found no acceptor to remove"); } @@ -407,7 +407,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString) void Desktop::DeregisterServices() { // stop all acceptors by clearing the map - acceptorMap::get().clear(); + acceptorMap::get().clear(); } void Desktop::CreateTemporaryDirectory() @@ -434,7 +434,7 @@ void Desktop::CreateTemporaryDirectory() e.Message = aMsg + e.Message; throw e; } - + // remove possible old directory and base directory SvtInternalOptions aInternalOpt; diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 2ad0b382e4..114997b5d1 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -39,7 +39,7 @@ #include <rtl/string.hxx> #endif #ifndef _SVTOOLS_PATHOPTIONS_HXX -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #endif #include <tools/resid.hxx> #include <i18npool/mslangid.hxx> @@ -84,7 +84,7 @@ bool LanguageSelection::prepareLanguage() OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider"); Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory(); Reference< XLocalizable > theConfigProvider; - try + try { theConfigProvider = Reference< XLocalizable >(theMSF->createInstance( sConfigSrvc ),UNO_QUERY_THROW ); } @@ -95,7 +95,7 @@ bool LanguageSelection::prepareLanguage() return false; sal_Bool bSuccess = sal_False; - + // #i42730#get the windows 16Bit locale - it should be preferred over the UI language try { @@ -109,17 +109,17 @@ bool LanguageSelection::prepareLanguage() catch(const Exception&) { } - + // #i32939# use system locale to set document default locale - try + try { OUString usLocale; Reference< XPropertySet > xLocaleProp(getConfigAccess( "org.openoffice.System/L10N", sal_True), UNO_QUERY_THROW); - xLocaleProp->getPropertyValue(OUString::createFromAscii("Locale")) >>= usLocale; + xLocaleProp->getPropertyValue(OUString::createFromAscii("Locale")) >>= usLocale; setDefaultLanguage(usLocale); - } - catch (Exception&) + } + catch (Exception&) { } // get the selected UI language as string @@ -138,7 +138,7 @@ bool LanguageSelection::prepareLanguage() Reference< XFlushable >(theConfigProvider, UNO_QUERY_THROW)-> flush(); theConfigProvider->setLocale(loc); - + Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.Setup/L10N/", sal_True), UNO_QUERY_THROW); xProp->setPropertyValue(OUString::createFromAscii("ooLocale"), makeAny(aLocaleString)); Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges(); @@ -289,7 +289,7 @@ static Sequence< OUString > _getFallbackLocales(const OUString& aIsoLang) if (aIsoLang.equalsAscii("zh-HK")) { seqFallbacks = Sequence< OUString >(1); seqFallbacks[0] = OUString::createFromAscii("zh-TW"); - } + } return seqFallbacks; } @@ -305,8 +305,8 @@ sal_Bool LanguageSelection::isInstalledLanguage(OUString& usLocale, sal_Bool bEx break; } } - - if (!bInstalled && !bExact) + + if (!bInstalled && !bExact) { // try fallback locales Sequence< OUString > seqFallbacks = _getFallbackLocales(usLocale); @@ -330,7 +330,7 @@ sal_Bool LanguageSelection::isInstalledLanguage(OUString& usLocale, sal_Bool bEx OUString aInstalledLocale; for (sal_Int32 i=0; i<seqLanguages.getLength(); i++) { - if (usLocale.indexOf(seqLanguages[i]) == 0) + if (usLocale.indexOf(seqLanguages[i]) == 0) { // requested locale starts with the installed locale // (i.e. installed locale has index 0 in requested locale) diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 9e158b7030..650a73ea3f 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -47,7 +47,7 @@ #include <rtl/ustrbuf.hxx> #include <rtl/instance.hxx> #include <osl/conditn.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <rtl/bootstrap.hxx> #include <rtl/strbuf.hxx> #include <comphelper/processfactory.hxx> diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index b430e235c0..efdf4caaf3 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * 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 @@ -43,8 +43,8 @@ #include <osl/file.hxx> #include <unotools/bootstrap.hxx> #include <unotools/configmgr.hxx> -#include <svtools/regoptions.hxx> -#include <svtools/useroptions.hxx> +#include <unotools/regoptions.hxx> +#include <unotools/useroptions.hxx> #include <sfx2/basedlgs.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -334,7 +334,7 @@ MigrationPage::MigrationPage( svt::OWizardMachine* parent, const ResId& resid) sal_Bool MigrationPage::commitPage( CommitPageReason _eReason ) { if (_eReason == eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone) - { + { EnterWait(); Migration::doMigration(); LeaveWait(); @@ -419,7 +419,7 @@ UpdateCheckPage::UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resi sal_Bool UpdateCheckPage::commitPage( CommitPageReason _eReason ) { if ( _eReason == eTravelForward ) - { + { try { Reference < XNameReplace > xUpdateAccess; Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); @@ -546,7 +546,7 @@ sal_Bool RegistrationPage::commitPage( CommitPageReason _eReason ) { if ( _eReason == eFinish ) { - ::svt::RegOptions aOptions; + ::utl::RegOptions aOptions; rtl::OUString aEvent; if ( m_rbNow.IsChecked()) @@ -603,7 +603,7 @@ void RegistrationPage::prepareSingleMode() bool RegistrationPage::hasReminderDateCome() { - return ::svt::RegOptions().hasReminderDateCome(); + return ::utl::RegOptions().hasReminderDateCome(); } void RegistrationPage::executeSingleMode() @@ -620,7 +620,7 @@ void RegistrationPage::executeSingleMode() if ( eMode == RegistrationPage::rmNow || eMode == RegistrationPage::rmLater ) pPage->commitPage( IWizardPage::eFinish ); if ( eMode != RegistrationPage::rmLater ) - ::svt::RegOptions().removeReminder(); + ::utl::RegOptions().removeReminder(); } // ----------------------------------------------------------------------- |