File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ def get_pStyle(p, doc):
66 """
77 Get the referenced style element for a paragraph with a p.pPr.pStyle
88 """
9- if p . pPr is not None and \
9+ if getattr ( p , " pPr" , None ) is not None and \
1010 p .pPr .pStyle is not None :
1111 return doc .styles .element .find ("w:style[@w:styleId='%s']" % p .pPr .pStyle .val ,
1212 doc .styles .element .nsmap )
@@ -17,7 +17,7 @@ def get_num_style(p, doc):
1717 """
1818 The the paragraph's Numbering style
1919 """
20- if p . pPr is not None \
20+ if getattr ( p , " pPr" , None ) is not None \
2121 and p .pPr .numPr is not None \
2222 and p .pPr .numPr .numId is not None :
2323 # the numbering style doc
@@ -47,7 +47,7 @@ def get_paragraph_ind(p, doc):
4747 * Direct Formatting
4848 """
4949
50- if p . pPr is not None and \
50+ if getattr ( p , " pPr" , None ) is not None and \
5151 p .pPr .ind is not None :
5252 return p .pPr .ind
5353
You can’t perform that action at this time.
0 commit comments