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

use ooolib;

# Set variables
$doc = new ooolib("sxw");
$doc->oooSet("builddir", ".");
$doc->oooSet("title", "Writing Styles");
$doc->oooSet("subject", "Writer Example");
$doc->oooSet("comments", "Options can be turned on, then off again.");
$doc->oooSet("author", "ooolib examples");

# Left side
$doc->oooData("default", "Regular left");
$doc->oooSet("bold", "on");
$doc->oooData("default", "Bold left");
$doc->oooSet("bold", "off");
$doc->oooSet("italic", "on");
$doc->oooData("default", "Italic left");
$doc->oooSet("italic", "off");
$doc->oooSet("underline", "on");
$doc->oooData("default", "Underline left");
$doc->oooSet("underline", "off");

# Center
$doc->oooSet("justify", "center");
$doc->oooData("default", "Regular center");
$doc->oooSet("bold", "on");
$doc->oooData("default", "Bold center");
$doc->oooSet("bold", "off");
$doc->oooSet("italic", "on");
$doc->oooData("default", "Italic center");
$doc->oooSet("italic", "off");
$doc->oooSet("underline", "on");
$doc->oooData("default", "Underline center");
$doc->oooSet("underline", "off");

# Right
$doc->oooSet("justify", "right");
$doc->oooData("default", "Regular right");
$doc->oooSet("bold", "on");
$doc->oooData("default", "Bold right");
$doc->oooSet("bold", "off");
$doc->oooSet("italic", "on");
$doc->oooData("default", "Italic right");
$doc->oooSet("italic", "off");
$doc->oooSet("underline", "on");
$doc->oooData("default", "Underline right");
$doc->oooSet("underline", "off");

# Block
$doc->oooSet("justify", "block");
$doc->oooData("default", "Regular block");
$doc->oooSet("bold", "on");
$doc->oooData("default", "Bold block");
$doc->oooSet("bold", "off");
$doc->oooSet("italic", "on");
$doc->oooData("default", "Italic block");
$doc->oooSet("italic", "off");
$doc->oooSet("underline", "on");
$doc->oooData("default", "Underline block");
$doc->oooSet("underline", "off");

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

exit;
