Issue 97240

Summary: loadComponentFromURL, COM/OLE
Product: udk Reporter: parc <itlists>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 3.0   
Target Milestone: ---   
Hardware: Unknown   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description parc 2008-12-14 07:46:00 UTC
I have written OLE code to open OpenOffice documents via "loadComponentFromURL"
call. But OpenOffice opens the documents only in read-only mode, when opening an
already existing document. I installed the newest developer version of
OpenOffice, but this also failed. Then I deinstalled all OO 3.x versions and
installed OO 2.4.1 again and my code works without problems.
Comment 1 parc 2008-12-14 08:53:20 UTC
I changed the summary, due to the fact, that it has nothing to do with the
"HIDDEN" flag value.

I also would like to add, that the document is opened as if READONLY is set to
true, whenever I call this API call (but no parameters are set when I made this
call). 

*When* I set READONLY to false (within the parameters) I always get an VtUnknown
error from the OLE subsystem.
Comment 2 kay.ramme 2008-12-15 08:27:09 UTC
Andreas, please have a look ...
Comment 3 parc 2008-12-15 11:35:14 UTC
When I open a template (Vorlage) file I get a writeable text document, when I
open an already available writer file the writer file is opened readonly - on
all Windows machines I have access to (with OO 3.0.0).

Then I thought, that I did something wrong with my handling with boolean values
and did some tests with "Hidden" property (and this worked as expected) and the
property I mentioned in my first posting is of course "ReadOnly" (and not
"READONLY").
Comment 4 parc 2008-12-16 08:57:19 UTC
Got the error. I used as an URL 'file:///c:\test.odt' and this gave me the
readonly-document. Using 'file:///c:/test.odt' I get a writeable document !

But I think, that this is not a very nice behaviour ! Actually an exception
would be better.

Is this now an error - an feature ?


Stephan Bergmann schrieb:
> On 12/15/08 20:44, Marten Feldtmann wrote:
>> | writerDocument |
>>     writerDocument :=     aMSKOO desktop
>>         loadComponentFromURL: 'file:///c:\test.odt' "<string>"
>>         TargetFrameName: '_blank' "<string>"
>>         SearchFlags: 0 "<long>"
>>         Arguments: Array new.
>
> The only thing that catches my eye is the wrong "\" (vs. "/") in the file URL
(but I doubt that is of relevance her
Comment 5 parc 2008-12-16 09:05:54 UTC
And I get into another problem:

As I said before - the document can now be opened writeable. The lock file is
also there. 

But I still can open the document writeable (!) a second time just by opening
the document via the GUI and then I have two opened Writer windows.

If I close (the later via GUI opened) document, the lock goes away (which was
actually created by the API openened document.

Is this ok ?
Comment 6 Rob Weir 2013-07-30 02:35:31 UTC
Reset assignee on issues not touched by assignee in more than 1000 days.