예제 #1
0
 def _add_numId(self, val=0):
     """
     Return a newly added CT_DecimalNumber element having tagname
     'w:numId' and ``val`` attribute set to *val*.
     """
     numId = CT_DecimalNumber.new('w:numId', val)
     return self._insert_numId(numId)
예제 #2
0
 def _add_ilvl(self, val=0):
     """
     Return a newly added CT_DecimalNumber element having tagname 'w:ilvl'
     and ``val`` attribute set to *val*.
     """
     ilvl = CT_DecimalNumber.new('w:ilvl', val)
     return self._insert_ilvl(ilvl)
예제 #3
0
 def _add_numId(self, val=0):
     """
     Return a newly added CT_DecimalNumber element having tagname
     'w:numId' and ``val`` attribute set to *val*.
     """
     numId = CT_DecimalNumber.new('w:numId', val)
     return self._insert_numId(numId)
예제 #4
0
 def _add_ilvl(self, val=0):
     """
     Return a newly added CT_DecimalNumber element having tagname 'w:ilvl'
     and ``val`` attribute set to *val*.
     """
     ilvl = CT_DecimalNumber.new('w:ilvl', val)
     return self._insert_ilvl(ilvl)
예제 #5
0
 def add_startOverride(self, val):
     """
     Return a newly added CT_DecimalNumber element having tagname
     ``w:startOverride`` and ``val`` attribute set to *val*.
     """
     startOverride = CT_DecimalNumber.new('w:startOverride', val)
     self.insert(0, startOverride)
     return startOverride
예제 #6
0
 def add_startOverride(self, val):
     """
     Return a newly added CT_DecimalNumber element having tagname
     ``w:startOverride`` and ``val`` attribute set to *val*.
     """
     startOverride = CT_DecimalNumber.new('w:startOverride', val)
     self.insert(0, startOverride)
     return startOverride
예제 #7
0
 def new(cls, num_id, abstractNum_id):
     """
     Return a new ``<w:num>`` element having numId of *num_id* and having
     a ``<w:abstractNumId>`` child with val attribute set to
     *abstractNum_id*.
     """
     abstractNumId = CT_DecimalNumber.new('w:abstractNumId', abstractNum_id)
     num = OxmlElement('w:num', {qn('w:numId'): str(num_id)})
     num.append(abstractNumId)
     return num
예제 #8
0
 def new(cls, num_id, abstractNum_id):
     """
     Return a new ``<w:num>`` element having numId of *num_id* and having
     a ``<w:abstractNumId>`` child with val attribute set to
     *abstractNum_id*.
     """
     abstractNumId = CT_DecimalNumber.new(
         'w:abstractNumId', abstractNum_id
     )
     num = OxmlElement('w:num', {qn('w:numId'): str(num_id)})
     num.append(abstractNumId)
     return num