116
116
Without argument, returns a label representing the signature of the
117
117
software which generated the document. Example of signature:
119
"OpenOffice.org/2.4$Linux OpenOffice.org_project/680m12$Build-9286"
119
"OpenOffice.org/3.1$Unix OpenOffice.org_project/310m11$Build-9399"
121
121
With argument, inserts any signature.
123
=head3 getUserProperty(name)
125
Retrieves the content of the user-defined property corresponding to the
128
In scalar context, returns the value only.
129
In array context, returns the data type (1st) and the value (2nd).
131
Returns undef if the property is not defined.
133
See also setUserProperty().
123
135
=head3 initial_creator()
125
137
Like creator(), but apply to the creator of the first version of the
152
164
Removes the given keyword if it exists.
166
=head3 removeUserProperty(name)
168
Deletes the user-defined property corresponding to the given name (does
169
nothing if the given property is not defined in the document).
171
=head3 setUserProperty(name, type => value_type, value => text)
173
Creates or updates a user-defined property with the given data type and
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
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()).
185
If the 'type' option is not provided, the 'string' type is selected
188
The return value reflects the new status of the user defined item,
189
in the same format as with getUserProperty().
154
191
=head3 statistic()
156
193
Without argument, returns a hash which represents the entire
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 " .
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.
195
232
and adds an arbitrary attribute 'status' with value 'OK'.
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.
218
254
=head3 user_defined()
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
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
229
By supplying a similar hash of 4 elements as an argument, this
230
method deletes and replaces the existing content.
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.
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.
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.
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
248
283
Contact: jmgdoc@cpan.org
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>
252
287
Initial English version of the reference manual by Graeme A. Hunter
253
288
(graeme.hunter@zen.co.uk).