File: calc-example5

package info (click to toggle)
ooolib-perl 0.1.9-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 256 kB
  • ctags: 58
  • sloc: perl: 1,657; makefile: 89; sh: 78
file content (56 lines) | stat: -rwxr-xr-x 1,484 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/perl
# calc-example5 - Set Column sizes

use ooolib;

# Set variables
$doc = new ooolib("sxc");
$doc->oooSet("builddir", ".");
$doc->oooSet("title", "Calc Cell Styles");
$doc->oooSet("subject", "Calc Example");
$doc->oooSet("comments", "Styles include bold, italics, and colors");
$doc->oooSet("author", "ooolib Example");
$doc->oooSet("meta1-name", "Programmer");
$doc->oooSet("meta1-value", "Joseph Colton");

# Column 1
$doc->oooSet("bold", "on");
$doc->oooSet("cell-loc", 1, 1);
$doc->oooData("cell-text", "bold");

$doc->oooSet("text-color", "ff0000");
$doc->oooSet("cell-loc", 1, 2);
$doc->oooData("cell-text", "red");

$doc->oooSet("text-color", "00ff00");
$doc->oooSet("cell-loc", 1, 3);
$doc->oooData("cell-text", "green");

$doc->oooSet("text-color", "0000ff");
$doc->oooSet("cell-loc", 1, 4);
$doc->oooData("cell-text", "blue");
$doc->oooSet("bold", "off");
$doc->oooSet("text-color", "000000");

# Column 2
$doc->oooSet("italic", "on");
$doc->oooSet("cell-loc", 2, 1);
$doc->oooData("cell-text", "italic");

$doc->oooSet("text-color", "ff0000");
$doc->oooSet("cell-loc", 2, 2);
$doc->oooData("cell-text", "red");

$doc->oooSet("text-color", "00ff00");
$doc->oooSet("cell-loc", 2, 3);
$doc->oooData("cell-text", "green");

$doc->oooSet("text-color", "0000ff");
$doc->oooSet("cell-loc", 2, 4);
$doc->oooData("cell-text", "blue");
$doc->oooSet("italic", "off");
$doc->oooSet("text-color", "000000");

my($filename) = $doc->oooGenerate("calc-example5.sxc");

exit;