Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


From: Andrew Sayers <andrew-libreoffice.org@pileofstuff.org>

---
 .../odf2xhtml/export/common/styles/style_mapping_css.xsl | 11 ++++++++---
 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl       | 16 ++++++++++------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl 
filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
index 822ba0b..79b8954 100644
--- filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
+++ filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
@@ -344,9 +344,14 @@
                <xsl:param name="multiplier"/>
 
                <xsl:variable name="borderWidthByCentimeter">
-                       <xsl:call-template name="convert2cm">
-                               <xsl:with-param name="value" select="$borderWidth"/>
-                       </xsl:call-template>
+                       <xsl:choose>
+                               <xsl:when test="$borderWidth = ''">0</xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:call-template name="convert2cm">
+                                               <xsl:with-param name="value" select="$borderWidth"/>
+                                       </xsl:call-template>
+                               </xsl:otherwise>
+                       </xsl:choose>
                </xsl:variable>
                <xsl:variable name="minimalBorderWidth" select="0.0133 * $multiplier"/>
                <xsl:choose>
diff --git filter/source/xslt/odf2xhtml/export/xhtml/body.xsl 
filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 51fb7b6..1126f8e 100644
--- filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -596,9 +596,11 @@
 
                <xsl:text>position:absolute;left:</xsl:text>
                <xsl:variable name="tabPosition">
-                       <xsl:call-template name="convert2cm">
-                               <xsl:with-param name="value" 
select="$tabStops/style:tab-stop[$tabCount]/@style:position"/>
-                       </xsl:call-template>
+                       <xsl:if test="$tabStops/style:tab-stop[$tabCount]/@style:position">
+                               <xsl:call-template name="convert2cm">
+                                       <xsl:with-param name="value" 
select="$tabStops/style:tab-stop[$tabCount]/@style:position"/>
+                               </xsl:call-template>
+                       </xsl:if>
                </xsl:variable>
                <xsl:variable name="tabIndent">
                        <xsl:choose>
@@ -2000,9 +2002,11 @@
                                                                                                    
    <xsl:otherwise>
                                                                                                    
            <xsl:variable name="listLevelLabelAlignment" 
select="$listLevelStyle/style:list-level-properties/style:list-level-label-alignment"/>
                                                                                                    
            <xsl:variable name="listLevelTextIndent">
-                                                                                                   
                    <xsl:call-template name="convert2cm">
-                                                                                                   
                            <xsl:with-param name="value" 
select="string($listLevelLabelAlignment/@fo:text-indent)"/>
-                                                                                                   
                    </xsl:call-template>
+                                                                                                   
                    <xsl:if test="$listLevelLabelAlignment/@fo:text-indent">
+                                                                                                   
                            <xsl:call-template name="convert2cm">
+                                                                                                   
                                    <xsl:with-param name="value" 
select="string($listLevelLabelAlignment/@fo:text-indent)"/>
+                                                                                                   
                            </xsl:call-template>
+                                                                                                   
                    </xsl:if>
                                                                                                    
            </xsl:variable>
                                                                                                    
            <xsl:value-of select="-$listLevelTextIndent"/>
                                                                                                    
    </xsl:otherwise>
-- 
1.8.5.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.