summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-09 14:45:32 +0200
committerNoel Grandin <noel@peralex.com>2013-01-28 08:22:35 +0200
commit4b37df18a18b61521e5fcbf358c6bc85639abdfc (patch)
tree9b0ca1f6cd4db14d8b958028aed4d2257442ef25 /cui/source/options
parent1a92a885d65860b4b09b426bb4b10f7a6a336571 (diff)
fdo#46808, Adapt setup::UpdateCheckConfig UNO services to new style
The services already existed, it just did not have an IDL file. Change-Id: Iae319545e5bf2384ede0992715a4879554605a22
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/optupdt.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 10db1d46f87a..9dc4b72177f4 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -35,16 +35,11 @@
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/setup/UpdateCheckConfig.hpp>
#include <osl/file.hxx>
#include <osl/security.hxx>
-namespace beans = ::com::sun::star::beans;
-namespace container = ::com::sun::star::container;
-namespace dialogs = ::com::sun::star::ui::dialogs;
-namespace frame = ::com::sun::star::frame;
-namespace lang = ::com::sun::star::lang;
-namespace uno = ::com::sun::star::uno;
-namespace util = ::com::sun::star::util;
+using namespace ::com::sun::star;
// class SvxOnlineUpdateTabPage --------------------------------------------------
@@ -70,11 +65,9 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage( Window* pParent, const SfxItemSe
m_aCheckNowButton.SetClickHdl( LINK( this, SvxOnlineUpdateTabPage, CheckNowHdl_Impl ) );
m_aChangePathButton.SetClickHdl( LINK( this, SvxOnlineUpdateTabPage, FileDialogHdl_Impl ) );
- uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- m_xUpdateAccess = uno::Reference < container::XNameReplace >(
- xFactory->createInstance( "com.sun.star.setup.UpdateCheckConfig" ),
- uno::UNO_QUERY_THROW );
+ m_xUpdateAccess = setup::UpdateCheckConfig::create( xContext );
sal_Bool bDownloadSupported = sal_False;
m_xUpdateAccess->getByName( "DownloadSupported" ) >>= bDownloadSupported;
@@ -301,7 +294,7 @@ IMPL_LINK( SvxOnlineUpdateTabPage, AutoCheckHdl_Impl, CheckBox *, pBox )
IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, FileDialogHdl_Impl)
{
uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference < dialogs::XFolderPicker2 > xFolderPicker = dialogs::FolderPicker::create(xContext);
+ uno::Reference < ui::dialogs::XFolderPicker2 > xFolderPicker = ui::dialogs::FolderPicker::create(xContext);
rtl::OUString aURL;
if( osl::FileBase::E_None != osl::FileBase::getFileURLFromSystemPath(m_aDestPath.GetText(), aURL) )
@@ -310,7 +303,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, FileDialogHdl_Impl)
xFolderPicker->setDisplayDirectory( aURL );
sal_Int16 nRet = xFolderPicker->execute();
- if ( dialogs::ExecutableDialogResults::OK == nRet )
+ if ( ui::dialogs::ExecutableDialogResults::OK == nRet )
{
rtl::OUString aFolder;
if( osl::FileBase::E_None == osl::FileBase::getSystemPathFromFileURL(xFolderPicker->getDirectory(), aFolder))