[cairo-commit] svgslides/src svgslides-4suite,1.3,1.4

Carl Worth commit at pdx.freedesktop.org
Sat Feb 12 20:00:48 PST 2005


Committed by: cworth

Update of /cvs/cairo/svgslides/src
In directory gabe:/tmp/cvs-serv4054/src

Modified Files:
	svgslides-4suite 
Log Message:

        * src/svgslides-4suite (find_height_content_node, transform_li)
        (transform_content_node): Add new <lc> tag, list-item
        continuation, as a shortcut for <li bullet=off>.

        * test/test.xml: test new <lc> tag.


Index: svgslides-4suite
===================================================================
RCS file: /cvs/cairo/svgslides/src/svgslides-4suite,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- svgslides-4suite	13 Feb 2005 03:41:48 -0000	1.3
+++ svgslides-4suite	13 Feb 2005 04:00:46 -0000	1.4
@@ -130,7 +130,7 @@
 	def find_height_content_node (node):
 	    if node.nodeName == u'ul':
 		height = 0
-	    elif node.nodeName == u'li':
+	    elif node.nodeName == u'li' or node.nodeName == u'lc':
 		height = font_size * 1.8
 	    else:
 		height = 0
@@ -163,7 +163,10 @@
             bullet_radius = font_size / 6
 
             bullet = get_attr (li, 'bullet')
-            if bullet != 'off':
+            if li.nodeName == 'lc' or bullet == 'off':
+                # no bullet for list continuation or explicitly disabled bullets
+                pass
+            else:
                 circle = doc.createElementNS (SVG, 'circle')
                 root.appendChild (circle)
                 circle.setAttributeNS (None, u'cx', `li.x + bullet_radius`)
@@ -225,7 +228,7 @@
 	def transform_content_node (node, root):
 	    if node.nodeName == u'ul':
 		return transform_ul (node, root)
-	    if node.nodeName == u'li':
+	    if node.nodeName == u'li' or node.nodeName == u'lc':
 		return transform_li (node, root)
             if node.nodeName == u'img':
 		return transform_img (node, root)




More information about the cairo-commit mailing list