#!/usr/bin/perl
# writer-example5 - Creates a sxw Writer document with sizes colors

use ooolib;

# Set variables
$doc = new ooolib("sxw");
$doc->oooSet("builddir", ".");
$doc->oooSet("title", "Colored Sizes");
$doc->oooSet("subject", "Writer Examples");
$doc->oooSet("comments", "Some fonts cannot be used with some sizes");
$doc->oooSet("author", "ooolib examples");

for($size = 6; $size <= 96; $size+=2) {
    $red = $size * 2;
    $blue = 256 - $red;
    $color = sprintf("%02X99%02X", $red, $blue);

    $doc->oooSet("text-color", $color);
    $doc->oooSet("text-size", $size);
    $doc->oooData("default", "ABC");
}

my($filename) = $doc->oooGenerate("writer-example5.sxw");

exit;

