add a config-less fallback here

Change-Id: Iee6bb57445a066d43c0d62ca0d56fd13bd589980
This commit is contained in:
Caolán McNamara
2017-03-06 11:16:57 +00:00
parent 929358286c
commit 866d4db725

View File

@@ -19,6 +19,7 @@
#include <comphelper/docpasswordhelper.hxx>
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/mediadescriptor.hxx>
#include <unotools/securityoptions.hxx>
#include <unotools/ucbhelper.hxx>
@@ -483,8 +484,10 @@ bool MediaDescriptor::addInputStream()
/*-----------------------------------------------*/
bool MediaDescriptor::addInputStreamOwnLock()
{
return impl_addInputStream(
officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::get());
const bool bLock = utl::ConfigManager::IsAvoidConfig()
? false
: officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::get();
return impl_addInputStream(bLock);
}
/*-----------------------------------------------*/