~ubuntu-branches/ubuntu/lucid/libopenoffice-oodoc-perl/lucid

« back to all changes in this revision

Viewing changes to OODoc/File.pod

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov, Franck Joncourt
  • Date: 2009-05-28 08:42:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090528084206-oka569vsrwxhp038
Tags: 2.108-1
[ Franck Joncourt ]
* New upstream release
* d/control:
  + Bumped up Standards-Version to 3.8.1 (no changes).
  + Updated BDI from perl (>= 5.6.10-12) to perl.
  + Add /me to Uploaders.
* d/copyright: Updated copyright years for upstream
* Do not install scripts both in /usr/share/doc/$pkg/examples and /usr/bin.
* d/clean: Added both OODoc/config.xml and odftest.odt to remove them during
  the clean stage rather than *rm* them through d.rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
        available at that very moment. A raw_import method can be called
237
237
        before the imported file is available (no check of availability is
238
238
        made). An error will be caused if the file is absent at the time of
239
 
        the save call. If several raw_import statements are run against the
 
239
        the save() call. If several raw_import statements are run against the
240
240
        same filename, there will actually be a corresponding number of
241
241
        copies of the file in its final state which are imported at the
242
 
        moment of the save, even if it had perhaps been modified in the
 
242
        moment of the save() call, even if it had perhaps been modified in the
243
243
        meantime (probably not a very useful outcome).
244
244
 
245
245
=head3  save([<filename>])
248
248
        some or all of the XML members with data supplied by the linked
249
249
        OODoc::XPath object(s). Each updated member must be indicated in the
250
250
        form of a hash element whose key corresponds to a standard XML
251
 
        member of an OpenOffice.org file, in the same way as for an extract
 
251
        member of an OpenDocument file, in the same way as for an extract
252
252
        call with the value being the new XML content to be saved.
253
253
 
 
254
        In addition, the external, non-XML resources (i.e. image files) that
 
255
        have previously been targeted by import methods, if any, are
 
256
        physically imported when save() is called (and not before). If these
 
257
        resources are not available at this time, they are ignored and a
 
258
        warning is issued for each missing file. 
 
259
 
254
260
        Example:
255
261
 
256
262
                $archive->save("target.odt");
257
263
 
258
 
        Please note that File does not check the content, and the save
 
264
        Please note that File does not check the content, and the save()
259
265
        method can be used to force through any data which may produce a
260
 
        file unusable by StarOffice/OpenOffice.org. Normally, supplied data
261
 
        should have been produced by an XPath object or other application
262
 
        producing OpenOffice.org XML.
 
266
        file not compliant with the ODF packaging specification.
263
267
 
264
268
        The filename argument is optional. If it is omitted, the source file
265
269
        previously supplied by the constructor call is used. In fact in this
266
270
        case a more complex (but hidden) operation is carried out: firstly
267
271
        it writes to a temporary file and if no error occurs, the source file
268
 
        is deleted and its name given to the temporary file. OODoc::File never
269
 
        writes directly to the source file.
 
272
        is deleted and replaced by the temporary file. If something goes wrong
 
273
        during the process, the temporary file remains available in the
 
274
        working directory (whose path depends on the installation parameters).
 
275
        OODoc::File never writes directly to the source file.
270
276
 
271
277
        Even though the life of an OODoc::File object does not necessarily
272
278
        end with a save, it is recommended that you avoid repeated