Logo Search packages:      
Sourcecode: calibre version File versions

def odf::odf2xhtml::ODF2XHTML::s_draw_frame (   self,
  tag,
  attrs 
)

A <draw:frame> is made into a <div> in HTML which is then styled

Definition at line 560 of file odf2xhtml.py.

00560                                       :
        """ A <draw:frame> is made into a <div> in HTML which is then styled
        """
        anchor_type = attrs.get((TEXTNS,'anchor-type'),'char')
        htmltag = 'div'
        name = "G-" + attrs.get( (DRAWNS,'style-name'), "")
        if name == 'G-':
            name = "PR-" + attrs.get( (PRESENTATIONNS,'style-name'), "")
        name = name.replace(".","_")
        if anchor_type == "paragraph":
            style = 'position:relative;'
        elif anchor_type == 'char':
            style = "position:relative;"
        elif anchor_type == 'as-char':
            htmltag = 'div'
            style = ''
        else:
            style = "position: absolute;"
        if attrs.has_key( (SVGNS,"width") ):
            style = style + "width:" + attrs[(SVGNS,"width")] + ";"
        if attrs.has_key( (SVGNS,"height") ):
            style = style + "height:" +  attrs[(SVGNS,"height")] + ";"
        if attrs.has_key( (SVGNS,"x") ):
            style = style + "left:" +  attrs[(SVGNS,"x")] + ";"
        if attrs.has_key( (SVGNS,"y") ):
            style = style + "top:" +  attrs[(SVGNS,"y")] + ";"
        if self.generate_css:
            self.opentag(htmltag, {'class': name, 'style': style})
        else:
            self.opentag(htmltag)

    def e_draw_frame(self, tag, attrs):


Generated by  Doxygen 1.6.0   Back to index