diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-07-26 22:10:15 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-07-26 22:10:30 +0200 |
commit | c02b3f8517e159c462a288d82e3b62cc4b2ab682 (patch) | |
tree | 852f46b675c21518feaa168504ebf4e50292038d /sfx2/source/doc/docfile.cxx | |
parent | 225d50da607a8a4115f45b2c433cb280fac70361 (diff) |
fdo#46037: less occurrences of comphelper/configurationhelper in sfx2/doc
Change-Id: Id1416ae6c1efaa251a979ac67e90b5261f64bd9a
Diffstat (limited to 'sfx2/source/doc/docfile.cxx')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index ef2f85e2f846..8a93ef20a36b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -88,7 +88,6 @@ #include <comphelper/storagehelper.hxx> #include <comphelper/mediadescriptor.hxx> -#include <comphelper/configurationhelper.hxx> #include <comphelper/docpasswordhelper.hxx> #include <tools/inetmime.hxx> #include <unotools/ucblockbytes.hxx> @@ -141,55 +140,13 @@ static const sal_Int8 LOCK_UI_TRY = 2; bool IsSystemFileLockingUsed() { - // check whether system file locking has been used, the default value is false - bool bUseSystemLock = false; - try - { - - uno::Reference< uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig( - ::comphelper::getProcessComponentContext(), - OUString( "/org.openoffice.Office.Common" ), - ::comphelper::ConfigurationHelper::E_STANDARD ); - if ( !xCommonConfig.is() ) - throw uno::RuntimeException(); - - ::comphelper::ConfigurationHelper::readRelativeKey( - xCommonConfig, - OUString( "Misc/" ), - OUString( "UseDocumentSystemFileLocking" ) ) >>= bUseSystemLock; - } - catch( const uno::Exception& ) - { - } - - return bUseSystemLock; + return officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::get(); } //---------------------------------------------------------------- bool IsOOoLockFileUsed() { - // check whether system file locking has been used, the default value is false - bool bOOoLockFileUsed = false; - try - { - - uno::Reference< uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig( - ::comphelper::getProcessComponentContext(), - OUString( "/org.openoffice.Office.Common" ), - ::comphelper::ConfigurationHelper::E_STANDARD ); - if ( !xCommonConfig.is() ) - throw uno::RuntimeException(); - - ::comphelper::ConfigurationHelper::readRelativeKey( - xCommonConfig, - OUString( "Misc/" ), - OUString( "UseDocumentOOoLockFile" ) ) >>= bOOoLockFileUsed; - } - catch( const uno::Exception& ) - { - } - - return bOOoLockFileUsed; + return officecfg::Office::Common::Misc::UseDocumentOOoLockFile::get(); } bool IsLockingUsed() |