Issue 107830 - XStorable.storeAsURL() fails if try to overwrite a file
Summary: XStorable.storeAsURL() fails if try to overwrite a file
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOO320m8
Hardware: All All
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 11:17 UTC by lars.langhans
Modified: 2017-05-20 11:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
complex test for such problem (2.77 KB, application/x-tar)
2009-12-22 11:19 UTC, lars.langhans
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description lars.langhans 2009-12-22 11:17:17 UTC
Create an empty file (0 bytes) long and now try to overwrite this file by
storeAsURL(file, empty propertyvalues)
It will fail.

Create a property 'Overwrite=true' and storeAsURL(file, Property("Overwrite=TRUE"))
It will fail.

simple remove the file.
storeAsURL() works as expected.

- Conclusion:
- The returned exception are not very helpful. There is no message.
- Overwrite=true should work, but it doesn't.
Comment 1 lars.langhans 2009-12-22 11:19:05 UTC
Created attachment 66761 [details]
complex test for such problem
Comment 2 lars.langhans 2009-12-22 11:29:54 UTC
The attached file contains a simple complex test for such problem.

Directory structure in the test:
qa/complex/loadandstore

The test:
- create a new document
- create an empty temp file
- store document to temp file via
 storeAsURL() with property 'Overwrite=TRUE'
- reopen the temp file
- check if the content is the same as before.
Comment 3 bmarcelly 2009-12-25 08:56:29 UTC
Tested on Windows XP, OOo 3.1.1 : no such error.
I used a simple Basic macro instead of the java example.

So if confirmed, it is a regression on OOo320m8 and should be considered as a stopper.

Put this macro in "My Macro", open a new document, run the macro.
 Sub Main
  ThisComponent.storeAsURL(ConvertToURL("C:\Tests\EmptyFile.odt"), array() )
 End Sub
Comment 4 lars.langhans 2009-12-25 11:29:18 UTC
Sorry I've forgot to mention:
It only occurs within java. Basic is ok.
This is the reason I wrote a java complex test.
Comment 5 Marcus 2017-05-20 11:33:34 UTC
Reset assigne to the default "issues@openoffice.apache.org".