summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-16 08:44:23 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-16 08:46:09 +0100
commit84c9a4d5518fd2a986e09af50b72553214a24902 (patch)
tree7e8fdb055bdf4c120c162d125bdb0a77eacff72b /sfx2
parent9fb5c5d69e8db855d0414bdbe60285cbfe59d705 (diff)
e the new way to access the config
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx23
1 files changed, 2 insertions, 21 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index d2089b2b9968..b030d4e0d645 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -137,6 +137,7 @@ using namespace ::com::sun::star::io;
#include "sfx2/sfxresid.hxx"
#include <sfx2/appuno.hxx>
#include "sfxacldetect.hxx"
+#include "officecfg/Office/Common.hxx"
#define MAX_REDIRECT 5
@@ -204,27 +205,7 @@ sal_Bool IsOOoLockFileUsed()
bool IsLockingUsed()
{
- bool bLocking = true;
- try
- {
-
- uno::Reference< 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 uno::RuntimeException();
-
- ::comphelper::ConfigurationHelper::readRelativeKey(
- xCommonConfig,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Misc/" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseLocking" ) ) ) >>= bLocking;
- }
- catch( const uno::Exception& )
- {
- }
-
- return bLocking;
+ return officecfg::Office::Common::Misc::UseLocking::get(comphelper::getProcessComponentContext());
}
} // anonymous namespace