[Libreoffice] Make check from master fails in sc_datapilotfieldobj

Michael Stahl mstahl at redhat.com
Thu Dec 8 03:33:53 PST 2011


On 08/12/11 11:39, Markus Mohrhard wrote:
> Hello Michael,
> 
> 
>> of course there is:
>>
>>            PropertyValue[] loadProps = new PropertyValue[1];
>>            loadProps[0] = new PropertyValue();
>>            loadProps[0].Name = "ReadOnly";
>>            loadProps[0].Value = new Boolean(true);
>>
>> now pass that as the last argument to loadComponentFromURL
>>
> 
> This is not an option. If you set the document read-only you can at
> least in calc no longer do a lot of actions. We have a function that
> tests the SfxMedium if it is read only and prevent modification in
> this case.

ah of course, i was wondering why most of my complex tests don't
actually use it :)

> I'll work on the copy idea.

there is the following in sfx2/source/doc/docfile.cxx, function
IsSystemFileLockingUsed():

	xCommonConfig =
	ConfigurationHelper::openConfig("/org.openoffice.Office.Common")

	ConfigurationHelper::readRelativeKey(
                xCommonConfig,
                "Misc/",
                "UseDocumentSystemFileLocking") >>= bUseSystemLock;

which looks like it disables the creation of the lock file and uses
system file locking instead, which should go away automatically when the
office process exits or crashes.

perhaps you could try to set this configuration item, if that works...

(there may also be some way to force opening as a copy automatically,
but i don't know how)



More information about the LibreOffice mailing list