From 765c6d9916b1959ff92811e80bf0fc4870e7ab29 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 13 Feb 2012 22:15:02 +0100 Subject: Make simplified configuration API available down in comphelper --- comphelper/prj/build.lst | 2 +- comphelper/source/misc/mediadescriptor.cxx | 28 +++------------------------- 2 files changed, 4 insertions(+), 26 deletions(-) (limited to 'comphelper') diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index 7dde46c47c7e..722ac8161de6 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -1,2 +1,2 @@ -ph comphelper : cppuhelper ucbhelper offapi salhelper LIBXSLT:libxslt NULL +ph comphelper : cppuhelper ucbhelper offapi officecfg salhelper LIBXSLT:libxslt NULL ch comphelper\prj nmake - all ch_all NULL diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 038e718d03d0..d86bb0807653 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -47,13 +47,12 @@ #include #include #include - +#include #include #include #include #include #include -#include #include @@ -445,29 +444,8 @@ sal_Bool MediaDescriptor::addInputStream() /*-----------------------------------------------*/ sal_Bool MediaDescriptor::addInputStreamOwnLock() { - // Own lock file implementation - - sal_Bool bUseLock = sal_True; // the system file locking is used per default - try - { - - css::uno::Reference< css::uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig( - ::comphelper::getProcessServiceFactory(), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common" ) ), - ::comphelper::ConfigurationHelper::E_STANDARD ); - if ( !xCommonConfig.is() ) - throw css::uno::RuntimeException(); - - ::comphelper::ConfigurationHelper::readRelativeKey( - xCommonConfig, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Misc/" ) ), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseDocumentSystemFileLocking" ) ) ) >>= bUseLock; - } - catch( const css::uno::Exception& ) - { - } - - return impl_addInputStream( bUseLock ); + return impl_addInputStream( + officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::get()); } /*-----------------------------------------------*/ -- cgit