示例#1
0
 def getitem_fixture(self, request):
     cxml, name, idx = request.param
     latentStyles_cxml = 'w:latentStyles/(%s)' % cxml
     latentStyles = element(latentStyles_cxml)
     lsdException = latentStyles[idx]
     latent_styles = LatentStyles(latentStyles)
     return latent_styles, name, lsdException
示例#2
0
 def latent_styles(self):
     """
     A |LatentStyles| object providing access to the default behaviors for
     latent styles and the collection of |_LatentStyle| objects that
     define overrides of those defaults for a particular named latent
     style.
     """
     return LatentStyles(self._element.get_or_add_latentStyles())
示例#3
0
 def priority_set_fixture(self, request):
     latentStyles_cxml, value, expected_cxml = request.param
     latent_styles = LatentStyles(element(latentStyles_cxml))
     expected_xml = xml(expected_cxml)
     return latent_styles, value, expected_xml
示例#4
0
 def priority_get_fixture(self, request):
     latentStyles_cxml, expected_value = request.param
     latent_styles = LatentStyles(element(latentStyles_cxml))
     return latent_styles, expected_value
示例#5
0
 def len_fixture(self, request):
     latentStyles_cxml, count = request.param
     latent_styles = LatentStyles(element(latentStyles_cxml))
     return latent_styles, count
示例#6
0
 def getitem_raises_fixture(self):
     latent_styles = LatentStyles(element('w:latentStyles'))
     return latent_styles, 'Foobar'
示例#7
0
 def bool_prop_set_fixture(self, request):
     latentStyles_cxml, prop_name, value, expected_cxml = request.param
     latent_styles = LatentStyles(element(latentStyles_cxml))
     expected_xml = xml(expected_cxml)
     return latent_styles, prop_name, value, expected_xml
示例#8
0
 def add_fixture(self):
     latent_styles = LatentStyles(element('w:latentStyles'))
     name = 'Heading 1'
     expected_xml = xml('w:latentStyles/w:lsdException{w:name=heading 1}')
     return latent_styles, name, expected_xml