Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello Stephan

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());
}

Wow that looks much better.


(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?


Oh yes of course. That happens if you're editing both the file in test
and the copy in solver ;)

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.