Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-149

OdfPackag.save(..) should save as well all its open documents

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • odfdom-0.8.6
    • odfdom-0.9
    • java
    • None
    • Operating System: All
      Platform: All
    • 219

    Description

      After the design changes due to embedded documents (issue 166) the Package will be aware of all its open documents and may now save them all (securing all potential changes).

      Any document will therefore dispatch the save call in the future to its OdfPackage.

      In addition the method OdfPackage.save() without parameter will be added.

      This new method will distinct the save of changes into the original document/package from a save into a new document/package.

      The reason herefore is that JDK ZIP implementation is read-only and the save into the original document always requires the copy of all resources (taking time).

      The new method gives the user the change to trigger this extra work of copying only when required.

      The existing OdfPackage.save(InputStream in) could not distinct any earlier, if the stream will be written into the original or a new file and copying was always being done.

      NOTE: Still a fallback for save(..) into original Package will be provided using exception handling.

      Attachments

        Issue Links

          Activity

            People

              svanteschubert@odftoolkit.org Svante Schubert
              svanteschubert@odftoolkit.org Svante Schubert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: