MCPcopy Index your code
hub / github.com/python-openxml/python-docx / next_paragraph_style

Method next_paragraph_style

src/docx/styles/style.py:207–219  ·  view source on GitHub ↗

|_ParagraphStyle| object representing the style to be applied automatically to a new paragraph inserted after a paragraph of this style. Returns self if no next paragraph style is defined. Assigning |None| or `self` removes the setting such that new paragraphs are created us

(self)

Source from the content-addressed store, hash-verified

205
206 @property
207 def next_paragraph_style(self):
208 """|_ParagraphStyle| object representing the style to be applied automatically
209 to a new paragraph inserted after a paragraph of this style.
210
211 Returns self if no next paragraph style is defined. Assigning |None| or `self`
212 removes the setting such that new paragraphs are created using this same style.
213 """
214 next_style_elm = self._element.next_style
215 if next_style_elm is None:
216 return self
217 if next_style_elm.type != WD_STYLE_TYPE.PARAGRAPH:
218 return self
219 return StyleFactory(next_style_elm)
220
221 @next_paragraph_style.setter
222 def next_paragraph_style(self, style):

Callers

nothing calls this directly

Calls 1

StyleFactoryFunction · 0.85

Tested by

no test coverage detected