Subject: | text:list-style can only be retrieved by name; as a result it cannot be created |
Date: | Mon, 28 Jan 2013 16:32:58 +0100 |
To: | bug-OpenOffice-OODoc [...] rt.cpan.org |
From: | Erik van Veelen <evveelen [...] aimvalley.nl> |
L.S.
Detected using OODoc-2.125.
When a text:list-style is present in an openoffice document (styles
section) it can be retrieved by calling:
my $style_elem = $stylesRef->getStyleElement($styleName, namespace
=>'text', type =>'list-style');
but when trying to create such an element this will turn out to be
impossible (with the createStyle call).
The following calls will be done, when calling:
my $style_elem = $stylesRef->createStyle($styleName, parent =>undef,
family => undef,
namespace => 'text',
type => 'list-style',
check => 'true',
properties => $myProps_ref,
references => {style:list-style-name => ""});
createStyle() -- this will yield a '<text:list-style/>' and then call
updateStyle() on the just created element
getStyleElement() will be called on the reference to the element
isStyle will be called since a ref was passed
isStyle will return undef
getStyleElement will return undef
updateStyle will warn (and return undef) for "unknown style"
createStyle will return undef
The difference lies in the fact that in the first case isStyle is never
called and isStyle does not consider a text:list-style to be a style.
I believe the isStyle should consider a text:list-style to be a style,
or at the very least the behavior should be symmetrical.
Please let me know if more details are needed, but it is pretty
straightforward from the code in Styles.pm
Regards,
--
Erik van Veelen
AimValley B.V.
P.O. Box 2194, 1200 CD Hilversum, The Netherlands
Tel: +31 35 689 1929, Fax: +31 35 689 1901
AimValley certificate
http://www.aimvalley.com/aimvalley-ca-certificate-2007.crt