#!/usr/bin/perl -I.
# writer-example1 - Creates a sxw Writer document

use ooolib;

# Set variables
$doc = new ooolib("sxw");
$doc->oooSet("builddir", ".");
$doc->oooSet("title", "OpenOffice.org Writer Document");
$doc->oooSet("subject", "Writer Examples");
$doc->oooSet("comments", "Simple Writer Document");
$doc->oooSet("author", "ooolib examples");

for($i = 1; $i <= 9; $i++) {
    $doc->oooData("h${i}", "Heading $i");
}

$doc->oooData("textbody", "The lazy fox jumped over the laying log. The log sat under the jumping fox.\nThe lazy fox jumped over the laying log. The log sat under the jumping fox.\nThe lazy fox jumped over the laying log. The log sat under the jumping fox.");

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

exit;
