Issue 44081 - Java Macros attached via the XStorage API are lost when saving the document
Summary: Java Macros attached via the XStorage API are lost when saving the document
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P4 Trivial
Target Milestone: ---
Assignee: marius_hillenbrand
QA Contact: issues@api
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-03-04 14:08 UTC by marius_hillenbrand
Modified: 2013-02-24 21:06 UTC (History)
1 user (show)

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


Attachments
document after deployment via XStorage, before hitting "Save" (6.79 KB, application/vnd.oasis.opendocument.text)
2005-03-04 14:10 UTC, marius_hillenbrand
no flags Details
document after hitting "Save" - all macros gone (6.05 KB, application/vnd.oasis.opendocument.text)
2005-03-04 14:10 UTC, marius_hillenbrand
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description marius_hillenbrand 2005-03-04 14:08:00 UTC
We deploy "Java macros" for the Scripting Framework by using the XStorage API to
embed them directly from the development tool into an open OpenOffice Document
via UNO. (More exactly, they are opened in an OpenOfficeBean)
But they are then lost after saving the document.

In the open OpenOffice instance, they are present after deployment - you can
attach keyboard shortcuts or new buttons to them.
At this time, they are even present in the document file (XStorage access
changes file on filesystem !) (grabbed a copy and opened with Winzip - see
attached file hust_withmacros.odt).

Saving the document (Ctrl-S or Save button) changes the situation again:
They are neither in the running Office instance, nor in the just saved file.
(See attached file hust_aftersave.odt)

Perhaps intersting side effect:
Putting a java macro by accessing the document as zip file, the effect is
different: The macros are present when opening the file in OpenOffice and by
saving the document again, they are still there.
But as soon as they are touched with XStorage (deployed using zip, opened in
OpenOffice to re-delpoy over XStorage) saving the document again makes them
disappear.

Sorry for no java code snippets - but it is just straight-forward plain file
access over XStorage, thereby creating the directory structure necessary for the
ScriptingFramework
Comment 1 marius_hillenbrand 2005-03-04 14:10:07 UTC
Created attachment 23345 [details]
document after deployment via XStorage, before hitting "Save"
Comment 2 marius_hillenbrand 2005-03-04 14:10:44 UTC
Created attachment 23346 [details]
document after hitting "Save" - all macros gone
Comment 3 marius_hillenbrand 2005-03-04 14:14:23 UTC
Also observed in 1.9.65 and StarOffice 8 Beta 
Comment 4 stephan.wunderlich 2005-03-04 15:10:56 UTC
as far as I know XStorage is your area
Comment 5 mikhail.voytenko 2005-03-04 16:06:49 UTC
First of all the root storage of the document should be commited only by the
document. Commiting of the root document storage from outside should never be done.

The "Script" substorage is removed because it is not treated as a part of the
document, since it has no mediatype, usually this storage has mediatype
"application/binary". ( To avoid removing of any document extension during
document storing, the extension must be placed in a substorage of the root
storage and this substorage must have a "unique" mediatype, means that is should
not be handled by the office itself ).
Comment 6 marius_hillenbrand 2005-03-07 15:01:43 UTC
This issue was no bug in the XStorage API, but in the handling by our code.
The "solution" is by no means semantically intuitive and definitely has to be
documented.
Comment 7 ace_dent 2008-05-17 20:59:00 UTC
The Issue you raised has been marked as 'Resolved' and not updated within the
last 1 year+. I am therefore setting this issue to 'Verified' as the first step
towards Closing it. If you feel this is incorrect, please re-open the issue and
add any comments.

Many thanks,
Andrew
 
Cleaning-up and Closing old Issues
~ The Grand Bug Squash, pre v3 ~
http://marketing.openoffice.org/3.0/announcementbeta.html
Comment 8 ace_dent 2008-05-17 23:00:35 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew