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

« back to all changes in this revision

Viewing changes to OODoc/Meta.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:
6
6
 
7
7
The OpenOffice::OODoc::Meta class is a specialist derivative of
8
8
OpenOffice::OODoc::XPath for XML members which describe the metadata
9
 
of OpenDocument (ODF) and OpenOffice.org documents.
 
9
of ODF documents.
10
10
 
11
11
=head2  Methods
12
12
 
46
46
 
47
47
        Example of returned value:
48
48
 
49
 
            2002-11-12T08:22:50
 
49
            2008-11-12T08:22:50
50
50
 
51
51
        The returned value can be converted in standard numeric time format
52
52
        with the ooTimelocal() function.
116
116
        Without argument, returns a label representing the signature of the
117
117
        software which generated the document. Example of signature:
118
118
 
119
 
        "OpenOffice.org/2.4$Linux OpenOffice.org_project/680m12$Build-9286"
 
119
        "OpenOffice.org/3.1$Unix OpenOffice.org_project/310m11$Build-9399"
120
120
 
121
121
        With argument, inserts any signature.
122
122
 
 
123
=head3  getUserProperty(name)
 
124
 
 
125
        Retrieves the content of the user-defined property corresponding to the
 
126
        given name, if any.
 
127
 
 
128
        In scalar context, returns the value only.
 
129
        In array context, returns the data type (1st) and the value (2nd).
 
130
 
 
131
        Returns undef if the property is not defined.
 
132
 
 
133
        See also setUserProperty().
 
134
 
123
135
=head3  initial_creator()
124
136
 
125
137
        Like creator(), but apply to the creator of the first version of the
151
163
 
152
164
        Removes the given keyword if it exists.
153
165
 
 
166
=head3  removeUserProperty(name)
 
167
 
 
168
        Deletes the user-defined property corresponding to the given name (does
 
169
        nothing if the given property is not defined in the document).
 
170
 
 
171
=head3  setUserProperty(name, type => value_type, value => text)
 
172
 
 
173
        Creates or updates a user-defined property with the given data type and
 
174
        the given value.
 
175
        
 
176
        According to the ODF specification, the presently allowed data types in
 
177
        a meta property are float, date, time, boolean and string.
 
178
        However, the given type is not checked so the application can provide any
 
179
        abritrary type.
 
180
 
 
181
        While the consistency between the type and the value is not checked, the
 
182
        ODF compliance requires 'true' or 'false' for a boolean, and the ISO-8601
 
183
        format for a date (see odfLocaltime()).
 
184
 
 
185
        If the 'type' option is not provided, the 'string' type is selected
 
186
        by default.
 
187
 
 
188
        The return value reflects the new status of the user defined item,
 
189
        in the same format as with getUserProperty().
 
190
 
154
191
=head3  statistic()
155
192
 
156
193
        Without argument, returns a hash which represents the entire
175
212
 
176
213
        Example:
177
214
 
178
 
            my $meta    = OpenOffice::OODoc::Meta->new("invoice.sxc");
 
215
            my $meta    = odfMeta->new("invoice.ods");
179
216
            my %stat    = $meta->statistic;
180
217
            print       "This invoice contains " .
181
218
                "$stat{'meta:cell-count'} cells and "   .
183
220
 
184
221
        With arguments, you can modify (or falsify ?!) all or some of the
185
222
        statistical data and even create attributes which are not created by
186
 
        the OpenOffice.org or StarOffice software. Arguments are passed in
187
 
        pairs [key => value] and handled without checking.
 
223
        the office software. Arguments are passed in pairs [key => value] and
 
224
        handled without checking.
188
225
 
189
226
        Example:
190
227
 
195
232
        and adds an arbitrary attribute 'status' with value 'OK'.
196
233
        
197
234
        Note : Such forced attributes do not upset the function of
198
 
        OpenOffice.org which ignores them. They could therefore be useful in
199
 
        programs which handle documents out of reach of the end user.
200
 
        However, if such a document is then edited or updated by
201
 
        OpenOffice.org or StarOffice (using currently released versions),
202
 
        these "foreign" attributes will be lost and the software will
203
 
        replace what it considers to be the "real" values to those
204
 
        attributes it manages.
 
235
        the office software which ignores them. They could therefore be useful
 
236
        in programs which handle documents out of reach of the end user.
 
237
        However, if such a document is then edited or updated by a typical
 
238
        end-user desktop application, these "foreign" attributes could be lost
 
239
        and and replaced by what this application considers to be the "real"
 
240
        values to those attributes it manages.
205
241
 
206
242
=head3  subject()
207
243
 
217
253
 
218
254
=head3  user_defined()
219
255
 
220
 
        Returns a list of the four fields which appear in the User tab of
221
 
        the Properties dialog in OpenOffice.org. These fields are called, by
222
 
        default, "Info 1" to "Info 4". The end user can change their names
223
 
        and their content.
224
 
 
225
 
        The list is returned in the form of a hash of 4 elements whose
226
 
        keywords represent the field names and whose values represent their
227
 
        content.
228
 
 
229
 
        By supplying a similar hash of 4 elements as an argument, this
230
 
        method deletes and replaces the existing content.
231
 
 
232
 
        If the number of elements supplied in the hash is less than 4, the
233
 
        last fields are left untouched. If, however, the hash contains more
234
 
        than 4 elements, only the first 4 are taken into account.
 
256
        Returns the list of the user defined fields of the document.
 
257
 
 
258
        The list is returned in the form of a hash elements whose keys represent
 
259
        the field names and whose values represent their content.
 
260
 
 
261
        By supplying a similar hash of elements as an argument, this method
 
262
        deletes and replaces the existing content. However, if the number of
 
263
        provided items is less than the numbers of existing user defined
 
264
        properties, the exceding properties are left unchanged.
 
265
 
 
266
        Warning: this method is deprecated; it fits with some legacy
 
267
        documents where the number of user defined properties was fixed.
 
268
        The newer getUserProperty() and setUserProperty() methods should
 
269
        be preferred.
235
270
 
236
271
=head3  version()
237
272
 
247
282
 
248
283
Contact: jmgdoc@cpan.org
249
284
 
250
 
Copyright 2004-2008 by Genicorp, S.A. L<http://www.genicorp.com>
 
285
Copyright 2004-2009 by Genicorp, S.A. L<http://www.genicorp.com>
251
286
 
252
287
Initial English version of the reference manual by Graeme A. Hunter
253
288
(graeme.hunter@zen.co.uk).