Subject: | Bug : User field (set_field, set_variable) |
Dear,
I am using Perl 5.14 on Win XP, Win Vista... and I have ODF::lpOD 1.118
or 1.119.
The set_field and set_variable does not work and print and error message
: Unknown object insertion context.
That is my program :
#!/usr/bin/perl
use strict;
use warnings;
use ODF::lpOD;
my $document = odf_document->create('text');
my $context = $document->get_body;
my $paragraph = odf_paragraph->create(text => 'My name is ');
$context->insert_element($paragraph);
$document->set_variable('Client', type => 'string', value => 'djibel');
$paragraph->set_field('variable', name => 'Client', after => 'My name is ');
$document->save(target => 'UserFieldFile.odt');
I have try to replace $paragraph ->set_field('variable', name =>
'Client', after => 'My name is ');
by
$par->set_field('variable', name => 'Client', offset => 'end');
But I have the same error message.
Best Regards,
djibel