diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-13 22:15:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-13 22:15:33 +0100 |
commit | 765c6d9916b1959ff92811e80bf0fc4870e7ab29 (patch) | |
tree | cfc106a88ee96954411caa330195c3eba9629477 /comphelper/source/misc | |
parent | c26d9befbab1f60b5b8c191c883569eae3d08c2d (diff) |
Make simplified configuration API available down in comphelper
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r-- | comphelper/source/misc/mediadescriptor.cxx | 28 |
1 files changed, 3 insertions, 25 deletions
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 <com/sun/star/uri/XUriReference.hpp> #include <com/sun/star/ucb/PostCommandArgument2.hpp> #include <com/sun/star/container/XNameAccess.hpp> - +#include <officecfg/Office/Common.hxx> #include <ucbhelper/interceptedinteraction.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/commandenvironment.hxx> #include <ucbhelper/activedatasink.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/configurationhelper.hxx> #include <rtl/ustrbuf.hxx> @@ -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()); } /*-----------------------------------------------*/ |