1
<?xml version="1.0" encoding="utf-8"?>
4
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
xmlns:fo="http://www.w3.org/1999/XSL/Format"
6
xmlns:office="http://openoffice.org/2000/office"
7
xmlns:style="http://openoffice.org/2000/style"
8
xmlns:text="http://openoffice.org/2000/text"
9
xmlns:table="http://openoffice.org/2000/table"
10
xmlns:draw="http://openoffice.org/2000/drawing"
11
xmlns:xlink="http://www.w3.org/1999/xlink"
12
xmlns:number="http://openoffice.org/2000/datastyle"
13
xmlns:svg="http://www.w3.org/2000/svg"
14
xmlns:chart="http://openoffice.org/2000/chart"
15
xmlns:dr3d="http://openoffice.org/2000/dr3d"
16
xmlns:math="http://www.w3.org/1998/Math/MathML"
17
xmlns:form="http://openoffice.org/2000/form"
18
xmlns:script="http://openoffice.org/2000/script"
19
office:class="text" office:version="1.0"
20
exclude-result-prefixes = "xsl fo office style text table draw xlink number svg chart dr3d math form script">
22
<!--TODO's: indent, picture cache (trml2pdf) -->
24
<xsl:output method="xml" indent="yes" />
25
<xsl:strip-space elements="*"/>
27
<xsl:key name="text_style" match="style:style[@style:family='text']" use="@style:name" />
28
<xsl:key name="page_break_before" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-before='page']" use="@style:name" />
29
<xsl:key name="page_break_after" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-after='page']" use="@style:name" />
30
<xsl:key name="table_column_style" match="style:style[@style:family='table-column']" use="@style:name" />
31
<xsl:key name="table_cell_style" match="style:style[@style:family='table-cell']" use="@style:name" />
32
<xsl:key name="paragraph_style" match="style:style[@style:family='paragraph']" use="@style:name" />
34
<xsl:template match="office:document-content">
35
<document filename="test.pdf">
36
<xsl:apply-templates select="office:automatic-styles" />
37
<xsl:apply-templates select="office:body" />
41
<xsl:template name="page_size">
42
<xsl:attribute name="pageSize">
43
<xsl:text>(</xsl:text>
44
<xsl:value-of select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
45
<xsl:text>,</xsl:text>
46
<xsl:value-of select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height" />
47
<xsl:text>)</xsl:text>
51
<xsl:template name="fixed_frame">
52
<xsl:for-each select="//draw:text-box">
54
<xsl:attribute name="id"><xsl:value-of select="./@draw:name" /></xsl:attribute>
55
<xsl:attribute name="x1"><xsl:value-of select="./@svg:x" /></xsl:attribute>
56
<xsl:attribute name="y1">
58
select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height - ./@svg:y - ./@fo:min-height" />
60
<xsl:attribute name="width">
61
<xsl:value-of select="./@svg:width" />
63
<xsl:attribute name="height">
64
<xsl:value-of select="./@fo:min-height" />
70
<xsl:template name="margin_sizes">
71
<xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-left" />
72
<xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-right" />
73
<xsl:variable name="margin_top" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-top" />
74
<xsl:variable name="margin_bottom" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-bottom" />
75
<xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
76
<xsl:variable name="page_height" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height" />
77
<xsl:attribute name="x1"><xsl:value-of select="$margin_left" /></xsl:attribute>
78
<xsl:attribute name="y1"><xsl:value-of select="$margin_bottom" /></xsl:attribute>
79
<xsl:attribute name="width"><xsl:value-of select="$page_width - $margin_left - $margin_right"/></xsl:attribute>
80
<xsl:attribute name="height"><xsl:value-of select="$page_height - $margin_bottom - $margin_top"/></xsl:attribute>
83
<xsl:template name="text_width">
84
<!-- You need this for the workaround to make primitive outlines-->
85
<xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-left" />
86
<xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-right" />
87
<xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
88
<xsl:value-of select="$page_width - $margin_left - $margin_right - 18"/>
93
<xsl:template match="office:automatic-styles">
94
<!--<template pageSize="(21cm, 29.7cm)" leftMargin="1.0cm" rightMargin="2.0cm" topMargin="1.0cm" bottomMargin="1.0cm" title="Test" author="Martin Simon" allowSplitting="20">-->
95
<template pageSize="(21cm, 29.7cm)" title="Test" author="Martin Simon" allowSplitting="20">
96
<xsl:call-template name="page_size" />
97
<pageTemplate id="first">
98
<xsl:call-template name="fixed_frame" />
99
<frame id="first" x1="2cm" y1="2cm" width="17cm" height="26cm">
100
<xsl:call-template name="margin_sizes" />
105
<!--A table style to simulate primitive outlines -till the <addOutline> tag is implemented in trml2pdf -->
106
<blockTableStyle id="Standard_Outline">
107
<blockAlignment value="LEFT"/>
108
<blockValign value="TOP"/>
110
<!--use two standard table grid styles like PyOpenOffice "Old Way": with and without a grid-->
111
<!--TODO insert table cell colors here, not within the <td> tag - otherwise
112
it will not work with flowables as cell content-->
113
<xsl:call-template name="make_blocktablestyle" />
115
<paraStyle name="all" alignment="justify" />
117
<xsl:apply-templates select="style:style" />
121
<xsl:template name="make_blocktablestyle">
122
<xsl:for-each select="//table:table">
123
<xsl:variable name="test">
124
<xsl:value-of select="./@table:name" />
126
<xsl:if test="not(boolean(count(preceding-sibling::table:table[@table:name=$test])))">
127
<!--Test if this is the first table with this style, nested tables not counted-->
128
<blockTableStyle id="{@table:name}">
129
<xsl:if test=".//draw:image">
130
<blockTopPadding value="0"/>
131
<blockBottomPadding value="0"/>
133
<blockAlignment value="LEFT" />
134
<blockValign value="TOP" />
135
<xsl:call-template name="make_linestyle" />
136
<xsl:call-template name="make_tablebackground" />
142
<xsl:template name="make_linestyle">
143
<xsl:for-each select=".//table:table-row">
144
<xsl:variable name="row" select="position() - 1"/>
145
<xsl:for-each select=".//table:table-cell">
146
<xsl:variable name="col" select="position() - 1"/>
147
<xsl:variable name="linebefore">
148
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-left"/>
150
<xsl:if test="not($linebefore='') and not($linebefore='none')">
151
<xsl:variable name="colorname">
152
<xsl:value-of select="substring-after($linebefore,'#')"/>
154
<lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
156
<xsl:variable name="lineafter">
157
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-right"/>
159
<xsl:if test="not($lineafter='') and not($lineafter='none')">
160
<xsl:variable name="colorname">
161
<xsl:value-of select="substring-after($lineafter,'#')"/>
163
<lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
165
<xsl:variable name="lineabove">
166
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-top"/>
168
<xsl:if test="not($lineabove='') and not($lineabove='none')">
169
<xsl:variable name="colorname">
170
<xsl:value-of select="substring-after($lineabove,'#')"/>
172
<lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
174
<xsl:variable name="linebelow">
175
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-bottom"/>
177
<xsl:if test="not($linebelow='') and not($linebelow='none')">
178
<xsl:variable name="colorname">
179
<xsl:value-of select="substring-after($linebelow,'#')"/>
181
<lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
183
<xsl:variable name="grid">
184
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border"/>
186
<xsl:if test="not($grid='') and not($grid='none')">
187
<xsl:variable name="colorname">
188
<xsl:value-of select="substring-after($grid,'#')"/>
190
<!-- Don't use grid because we don't need a line between each rows -->
191
<lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
192
<lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
193
<lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
194
<lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
200
<!-- Was needed to simulate bulleted lists:
201
<xsl:template match="text:ordered-list|text:unordered-list">
202
<xsl:variable name = "text_width">
203
<xsl:call-template name="text_width" />
205
<blockTable style="Standard_Outline" colWidths="18,{$text_width}">
206
<xsl:apply-templates match="text:list-item" />
210
<xsl:template match="text:list-item">
212
<td><para><font face="Helvetica-Bold" size="10">*</font></para></td>
214
<xsl:apply-templates />
222
<xsl:template match="office:body">
224
<xsl:apply-templates />
225
<xsl:for-each select="//draw:text-box">
227
<xsl:attribute name="name">
228
<xsl:value-of select="./@draw:name" />
231
<xsl:apply-templates>
232
<xsl:with-param name="skip_draw" select="0" />
233
</xsl:apply-templates>
236
<xsl:for-each select="//text:ordered-list">
237
<para><seqReset id="{./@text:style-name}"/></para>
242
<xsl:template match="table:table">
244
<xsl:attribute name="colWidths">
245
<xsl:call-template name="make_columns" />
247
<xsl:call-template name="make_tableheaders" />
248
<xsl:attribute name="style">
249
<xsl:value-of select="@table:name" />
251
<xsl:apply-templates />
255
<xsl:template name="make_tableheaders">
256
<xsl:if test="boolean(count(table:table-header-rows))">
257
<xsl:attribute name="repeatRows">1</xsl:attribute>
261
<xsl:template name="make_tablebackground">
262
<xsl:for-each select=".//table:table-row">
263
<!--Be careful when there are table:table-header-rows as
264
parent node of table:table-row -->
265
<xsl:variable name="row" select="position() - 1" />
266
<xsl:for-each select="./table:table-cell">
267
<xsl:variable name="col" select="position() - 1" />
268
<xsl:variable name="background">
269
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:background-color" />
271
<xsl:if test="not($background='') and boolean(key('table_cell_style',@table:style-name)/style:properties/@fo:background-color) and starts-with($background,'#')">
272
<!--only RGB hexcolors are accepted -->
273
<blockBackground colorName="{$background}" start="{$col},{$row}" stop="{$col},-1" />
279
<xsl:template name="make_columns">
280
<xsl:variable name="columns" >
281
<xsl:for-each select="table:table-column">
282
<xsl:value-of select="key('table_column_style',@table:style-name)/style:properties/@style:column-width" />
283
<xsl:text>,</xsl:text>
286
<xsl:value-of select="substring($columns,1,string-length($columns) - 1)" />
287
<!--strip the last comma-->
290
<xsl:template match="table:table-row">
292
<xsl:apply-templates />
296
<xsl:template match="table:table-cell">
298
<xsl:apply-templates />
302
<xsl:template match="text:section">
304
<xsl:apply-templates />
309
<xsl:template match="text:span">
311
<xsl:call-template name="make_fontnames_span" />
312
<xsl:call-template name="make_fontsize_span" />
313
<xsl:apply-templates />
317
<xsl:template name="make_fontsize_span">
318
<xsl:variable name ="fontsize">
319
<xsl:value-of select="key('text_style',@text:style-name)/style:properties/@fo:font-size" />
321
<xsl:if test="not($fontsize='') and boolean(key('text_style',@text:style-name)/style:properties/@fo:font-size)" >
322
<xsl:attribute name="size">
323
<xsl:value-of select="$fontsize" />
328
<xsl:template name="make_fontnames_span">
329
<xsl:attribute name="face">
330
<xsl:call-template name="make_fontnames">
331
<xsl:with-param name="fontName" select="key('text_style',@text:style-name)/style:properties/@style:font-name" />
332
<xsl:with-param name="fontWeight" select="key('text_style',@text:style-name)/style:properties/@fo:font-weight" />
333
<xsl:with-param name="fontStyle" select="key('text_style',@text:style-name)/style:properties/@fo:font-style" />
338
<xsl:template name="make_image">
339
<illustration height="{.//draw:image/@svg:height}" width="{.//draw:image/@svg:width}">
340
<image x="0" y="0" file="{substring-after(.//draw:image/@xlink:href,'#Pictures/')}" height="{.//draw:image/@svg:height}" width="{.//draw:image/@svg:width}" />
344
<xsl:template name="empty_paragraph">
345
<xsl:if test="not(boolean(count(descendant::node())))">
346
<xsl:call-template name="distance_point">
347
<xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
352
<xsl:template name="distance_point">
353
<xsl:param name="background" />
354
<xsl:param name="tab_stop"></xsl:param>
355
<xsl:variable name="local_back">
357
<xsl:when test="not(boolean($background)) or not(contains($background,'#'))">
358
<!-- Do not accept OO colors like "transparent", only hex-colors -->
359
<xsl:text>white</xsl:text>
362
<xsl:value-of select="$background" />
366
<font color="{$local_back}">
367
<xsl:text> </xsl:text>
368
<xsl:if test="boolean($tab_stop)">
369
<!-- simulate a tabstop with white/background-color points -->
370
<xsl:text>.........</xsl:text>
375
<xsl:template match="text:ordered-list">
376
<xsl:apply-templates />
378
<!-- Reset the counter. seqreset is not a trml2pdf tag, but a Platypus Intra Paragraph Markup,
379
so it needs a dummy paragraph to enclose it -->
382
<xsl:template name="make_listitem">
383
<xsl:if test="(name(..)='text:list-item')">
384
<xsl:attribute name="leftIndent">15</xsl:attribute>
385
<xsl:attribute name="bulletIndent">0</xsl:attribute>
387
<xsl:when test="(name(../..)='text:unordered-list')">
388
<xsl:variable name="fontsize">
389
<xsl:value-of select="number(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)" />
392
<xsl:when test="$fontsize='NaN'">
393
<!-- you should exclude non-numerical values for bulletFontSize. <== Sometimes the preprocessing went wrong.-->
394
<!--use a default bullet font size-->
395
<xsl:attribute name="bulletFontSize">6</xsl:attribute>
398
<xsl:attribute name="bulletFontSize"><xsl:value-of select="floor(($fontsize div 2) + 1)" /></xsl:attribute>
401
<xsl:attribute name="bulletFontName">ZapfDingbats</xsl:attribute>
402
<xsl:attribute name="bulletText">l</xsl:attribute>
405
<!-- Generate the numbers for an ordered list -->
406
<xsl:variable name="size">
407
<xsl:value-of select="key('paragraph_style',@text:style-name)/style:properties/@fo:font-size" />
409
<!-- For ordered lists we use the bullet tag from Platypus Intra Paragraph Markup -->
411
<xsl:if test="not($size='') and boolean(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)">
412
<xsl:attribute name="size">
413
<!-- adapt the fontsize to the fontsize of the current paragraph -->
414
<xsl:value-of select="$size" />
417
<seq id="{../../@text:style-name}"/>.</bullet>
424
<xsl:template match="text:drop-down">
425
<xsl:value-of select="text:label[2]/@text:value" />
429
<xsl:template match="text:p|text:h">
430
<xsl:param name="skip_draw" select="1" />
431
<xsl:if test="boolean(key('page_break_before',@text:style-name))" >
435
<xsl:when test="boolean(.//draw:image)">
436
<xsl:call-template name="make_image" />
438
<xsl:when test="boolean(name(..) = 'draw:text-box') and boolean($skip_draw)">
442
<xsl:attribute name="style">
443
<xsl:value-of select="@text:style-name" />
445
<xsl:call-template name="make_listitem" />
446
<xsl:apply-templates />
447
<xsl:call-template name="empty_paragraph" />
451
<xsl:if test="boolean(key('page_break_after',@text:style-name))" >
456
<xsl:template match="text:p/text:tab-stop">
457
<!-- simulate a tabstop -->
458
<xsl:call-template name="distance_point">
459
<xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
460
<xsl:with-param name="tab_stop">yes</xsl:with-param>
464
<!-- experimental - switched off
465
<xsl:template match="text:h">
467
<xsl:attribute name="style">
468
<xsl:value-of select="@text:style-name" />
470
<xsl:call-template name="make_number" />
471
<xsl:apply-templates />
472
<xsl:call-template name="empty_paragraph" />
476
<xsl:template name="make_number">
478
<xsl:when test="@text:level='1'">
479
<xsl:number format="1. " />
481
<xsl:when test="@text:level='2'">
482
<xsl:number count="text:h[@text:level='1']|text:h[text:level='2']" level="any" format="1.1." />
489
<xsl:template match="style:style[@style:family='paragraph']">
491
<xsl:attribute name="name">
492
<xsl:value-of select="@style:name" />
494
<xsl:call-template name="make_indent_paragraph" />
495
<xsl:call-template name="make_fontnames_paragraph" />
496
<xsl:call-template name="make_fontsize" />
497
<!--<xsl:call-template name="make_parent" /> not necessary -
498
parent styles processed by PyOpenOffice -->
499
<xsl:call-template name="make_alignment" />
500
<xsl:call-template name="make_background" />
501
<xsl:call-template name="make_space_beforeafter" />
502
<xsl:call-template name="make_fontcolor" />
506
<xsl:template name="make_indent_paragraph">
507
<xsl:variable name="right_indent"><xsl:value-of select="style:properties/@fo:margin-right" /></xsl:variable>
508
<xsl:variable name="left_indent"><xsl:value-of select="style:properties/@fo:margin-left" /></xsl:variable>
509
<xsl:if test="not($right_indent='') and boolean(style:properties/@fo:margin-right)">
510
<xsl:attribute name="rightIndent">
511
<xsl:value-of select="$right_indent" />
514
<xsl:if test="not($left_indent='') and boolean(style:properties/@fo:margin-left)">
515
<xsl:attribute name="leftIndent">
516
<xsl:value-of select="$left_indent" />
521
<xsl:template name="make_background">
522
<xsl:variable name="background">
523
<xsl:value-of select="style:properties/@fo:background-color" />
525
<xsl:if test="not($background='') and boolean(style:properties/@fo:background-color) and starts-with($background,'#')" >
526
<xsl:attribute name="backColor">
527
<xsl:value-of select="$background" />
532
<xsl:template name="make_space_beforeafter">
533
<xsl:variable name="before">
534
<xsl:value-of select="style:properties/@fo:margin-top" />
536
<xsl:variable name="after">
537
<xsl:value-of select="style:properties/@fo:margin-bottom" />
539
<xsl:if test="not($before='') and boolean(style:properties/@fo:margin-top)" >
540
<xsl:attribute name="spaceBefore">
541
<xsl:value-of select="$before" />
544
<xsl:if test="not($after='') and boolean(style:properties/@fo:margin-bottom)" >
545
<xsl:attribute name="spaceAfter">
546
<xsl:value-of select="$after" />
551
<xsl:template name="make_fontsize">
552
<xsl:variable name="fontSize">
553
<xsl:value-of select="style:properties/@fo:font-size" />
555
<xsl:if test="not($fontSize='') and boolean(style:properties/@fo:font-size)">
556
<xsl:attribute name="fontSize">
557
<xsl:value-of select="$fontSize" />
559
<xsl:attribute name="leading">
560
<xsl:value-of select="$fontSize + floor($fontSize div 5) + 1" />
561
<!--use a standard leading related to the font size -->
566
<!--this template is not needed anymore for "normalized" sxw files -->
567
<xsl:template name="make_parent">
568
<xsl:variable name="parent">
569
<xsl:value-of select="@style:parent-style-name" />
571
<xsl:if test="not($parent='') and boolean(@style:parent-style-name)">
572
<xsl:attribute name="parent">
573
<xsl:value-of select="$parent" />
578
<xsl:template name="make_alignment">
579
<xsl:variable name="alignment">
580
<xsl:value-of select="style:properties/@fo:text-align" />
582
<xsl:if test="not($alignment='') and boolean(style:properties/@fo:text-align)">
584
<xsl:when test="$alignment='start'">
585
<xsl:attribute name="alignment">LEFT</xsl:attribute>
587
<xsl:when test="$alignment='center'">
588
<xsl:attribute name="alignment">CENTER</xsl:attribute>
590
<xsl:when test="$alignment='end'">
591
<xsl:attribute name="alignment">RIGHT</xsl:attribute>
593
<xsl:when test="$alignment='justify'">
594
<xsl:attribute name="alignment">JUSTIFY</xsl:attribute>
600
<xsl:template name="make_fontnames_paragraph">
601
<xsl:attribute name="fontName">
602
<xsl:call-template name="make_fontnames">
603
<xsl:with-param name="fontName" select="style:properties/@style:font-name" />
604
<xsl:with-param name="fontWeight" select="style:properties/@fo:font-weight" />
605
<xsl:with-param name="fontStyle" select="style:properties/@fo:font-style" />
610
<xsl:template name="make_fontnames">
611
<!--much too verbose, needs improvement-->
612
<xsl:param name="fontName" />
613
<xsl:param name="fontWeight" />
614
<xsl:param name="fontStyle" />
616
<xsl:when test="not($fontName='') and boolean($fontName)">
618
<xsl:when test="contains($fontName,'Courier')">
620
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
621
<xsl:text>Courier-BoldOblique</xsl:text>
623
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
624
<xsl:text>Courier-Bold</xsl:text>
626
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
627
<xsl:text>Courier-Oblique</xsl:text>
630
<xsl:text>Courier</xsl:text>
634
<xsl:when test="contains($fontName,'Helvetica') or contains($fontName,'Arial') or contains($fontName,'Sans')">
636
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
637
<xsl:text>Helvetica-BoldOblique</xsl:text>
639
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
640
<xsl:text>Helvetica-Bold</xsl:text>
642
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
643
<xsl:text>Helvetica-Oblique</xsl:text>
646
<xsl:text>Helvetica</xsl:text>
652
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
653
<xsl:text>Times-BoldItalic</xsl:text>
655
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
656
<xsl:text>Times-Bold</xsl:text>
658
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
659
<xsl:text>Times-Italic</xsl:text>
662
<xsl:text>Times-Roman</xsl:text>
669
<!--Use this as default -->
670
<xsl:text>Times-Roman</xsl:text>
674
<xsl:template name="make_fontcolor">
675
<xsl:variable name="textColor">
676
<xsl:value-of select="style:properties/@fo:color"/>
678
<xsl:if test="not($textColor='') and boolean(style:properties/@fo:color)">
679
<xsl:attribute name="textColor">
680
<xsl:value-of select="$textColor" />
686
This stylesheet is part of:
687
PyOpenOffice Version 0.4
688
Copyright (C) 2005: Martin Simon
689
Homepage: www.bezirksreiter.de
691
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999