#NEWLINE# def extractParagraphProperties( self , style , parent = None ) : #NEWLINE# #INDENT# ' Extracts paragraph properties from a style element. ' #NEWLINE# paraProps = ParagraphProps ( ) #NEWLINE# name = style . getAttribute ( 'style:name' ) #NEWLINE# if name . startswith ( 'Heading_20_' ) : #NEWLINE# #INDENT# level = name [ 11 : ] #NEWLINE# try : #NEWLINE# #INDENT# level = int ( level ) #NEWLINE# paraProps . setHeading ( level ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# level = 0 #NEWLINE# #UNINDENT# #UNINDENT# if ( name == 'Title' ) : #NEWLINE# #INDENT# paraProps . setTitle ( True ) #NEWLINE# #UNINDENT# paraPropEl = style . getElementsByTagName ( 'style:paragraph-properties' ) #NEWLINE# if paraPropEl : #NEWLINE# #INDENT# paraPropEl = paraPropEl [ 0 ] #NEWLINE# leftMargin = paraPropEl . getAttribute ( 'fo:margin-left' ) #NEWLINE# if leftMargin : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# leftMargin = float ( leftMargin [ : ( - 2 ) ] ) #NEWLINE# if ( leftMargin > 0.01 ) : #NEWLINE# #INDENT# paraProps . setIndented ( True ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# textProps = self . extractTextProperties ( style ) #NEWLINE# if textProps . fixed : #NEWLINE# #INDENT# paraProps . setCode ( True ) #NEWLINE# #UNINDENT# return paraProps