diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-09 14:45:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-28 08:22:35 +0200 |
commit | 4b37df18a18b61521e5fcbf358c6bc85639abdfc (patch) | |
tree | 9b0ca1f6cd4db14d8b958028aed4d2257442ef25 /cui | |
parent | fdo#46808, Convert some bits to new-style UNO (diff) | |
download | core-4b37df18a18b61521e5fcbf358c6bc85639abdfc.tar.gz core-4b37df18a18b61521e5fcbf358c6bc85639abdfc.zip |
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')
-rw-r--r-- | cui/source/options/optupdt.cxx | 19 |
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)) |