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

« back to all changes in this revision

Viewing changes to OODoc/Image.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:
208
208
        should be imported from an external file and, implicitly, that the
209
209
        image link (which it is useless to give here) points to the image
210
210
        imported into the OpenOffice.org file. The import will only be made
211
 
        when all the updates are validated by a save(). See importImage
 
211
        when all the updates are validated by a save(). See importImage()
212
212
        about importing images. An imported image is *not* embedded in the
213
213
        XML image element; it's always referred to through a link, and stored
214
214
        in a separate, non-XML member of the ODF archive. However, with the
490
490
 
491
491
        Allows you to read or modify the display size of an image. Returns
492
492
        the height and width as a pair of values. If height and width
493
 
        arguments are provided, they replace the image's old size. Caution:
494
 
        it is up to the application to maintain the proportions of an image
495
 
        if needed.
496
 
 
497
 
        See imagePosition about measure formats.
 
493
        arguments are provided, they replace the image's old size.
 
494
 
 
495
        Note that this method deals with the display size only, and ignores
 
496
        the original size of the image; in other words, it doesn't change
 
497
        anything in the graphic object itself.
 
498
 
 
499
        Caution: it is up to the application to maintain the aspect ratio of
 
500
        the image if needed.
 
501
 
 
502
        See the "size" option about the createImageElement() method.
 
503
 
 
504
        See imagePosition() about measure formats.
498
505
 
499
506
=head3  imageStyle(image [, style])
500
507
 
511
518
 
512
519
                $doc->importImage("Image1", "C:\Images\Portrait.jpg");
513
520
 
514
 
        This import cancels and replaces any previous image content.
 
521
        This import cancels and replaces any previous image content, if any.
515
522
 
516
523
        The first argument is either the image's name (as the user would see
517
524
        it) or the image's corresponding element reference. In any case, the
518
 
        image must already exist, created if necessary using
519
 
        insertImageElement. Obviously, the imported file should preferably
520
 
        be in a graphics format supported by OpenOffice.org, but this method
521
 
        actually allows you to import anything, including data which could
522
 
        not be displayed in an OpenOffice.org document.
 
525
        image element must already exist, created if necessary using
 
526
        insertImageElement().
 
527
 
 
528
        The second argument is the full path of the image file to be
 
529
        imported and associated to the ODF image object. If this argument is
 
530
        omitted, importImage() assumes that the full path of the needed
 
531
        resource file is indicated by an external link already associated
 
532
        with the image object in the document (see imageLink).
 
533
 
 
534
        Obviously, the imported file should preferably be in a graphic format
 
535
        supported by most office software products, but this method actually
 
536
        allows you to import anything, including data which could not be
 
537
        displayed.
523
538
 
524
539
        Caution: this method does not carry out the import immediately and
525
540
        does not check for the presence of the file to be imported. It only
526
541
        sends the request to the associated OODoc::File object (via its
527
 
        raw_import method) which performs the operation at the next save
528
 
        call.
 
542
        raw_import method) which performs the operation at the next save()
 
543
        call. As a consequence, the image file is needed later, but its
 
544
        availability is not required by the importImage() method itself.
529
545
 
530
546
=head3  insertImageElement(name [, options])
531
547
 
548
564
=head3  selectImageElementByDescription(expression)
549
565
 
550
566
        Returns the first (or only) image (if found) which has an image
551
 
        description and which matches the regular expression.
 
567
        description matching the provided regular expression.
 
568
 
 
569
        See also selectImageElementsByDescription().
552
570
 
553
571
=head3  selectImageElementByLink(link)
554
572
 
568
586
 
569
587
        Note: if an application needs to get a list of individual or
570
588
        multiple images which share the same target, the easiest way is to
571
 
        loop through the list returned by getImageElementList and perform an
572
 
        imageLink on each element.
 
589
        loop through the list returned by getImageElementList() and perform an
 
590
        imageLink() on each element.
 
591
 
 
592
        See also selectImageElementsByLink().
573
593
 
574
594
=head3  selectImageElementsByDescription(expression)
575
595
 
589
609
 
590
610
                my @webimages = $doc->selectImageElementsByLink("^http:");
591
611
 
592
 
        allows you to get a list of images which will not be visible if the
593
 
        user's machine is not connected to the internet.
 
612
        allows you to get a list of images referred to through an HTTP URL
 
613
        (i.e. which will not be visible if the user's machine is not connected
 
614
        to the internet).
594
615
 
595
616
=head3  selectImageElementsByName(expression)
596
617
 
620
641
 
621
642
Contact: jmgdoc@cpan.org
622
643
 
623
 
Copyright 2004-2006 by Genicorp, S.A. L<http://www.genicorp.com>
 
644
Copyright 2004-2009 by Genicorp, S.A. L<http://www.genicorp.com>
624
645
 
625
646
Initial English version of the reference manual by Graeme A. Hunter
626
647
(graeme.hunter@zen.co.uk).