On 01/13/2012 05:08 AM, Markus Mohrhard wrote:
I did not push that patch directly because I'm not sure if we really
want to introduce another registry entry for this.
No idea about that either (I think Michael Stahl has previously been
exposed heavily to locking, maybe he has some input), just two comments
on the patch:
+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;
+}
can be reduced to
#include "officecfg/Office/Common.hxx"
bool IsLockingUsed()
{
return officecfg::Office::Common::Misc::UseLocking::get(
comphelper::getProcessComponentContext());
}
(I haven't announced this new C++ API yet, as some issues about
change-notification are not yet completely thought out for it. Shame on
me, should really do that soon.)
And
+ <oor:component-data oor:name="Common" oor:package="org.openoffice.Office">
+ <node oor:name="Misc">
+ <prop oor:name="UseDocumentSystemFileLocking">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UseDocumentOOoLockFile">
+ <value>false</value>
+ </prop>
+ </node>
+ </oor:component-data>
should instead set "UseLocking" to false, right?
Stephan
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.