def __init__(self, worksheet, model, projectedContents=None):
		super( TextSpanEditor, self ).__init__( worksheet, model )
		spanAttrs = RichTextAttributes()
		for a in model['styleAttrs']:
			spanAttrs.putOverride(a['name'], a['value'])
		if projectedContents is None:
			projectedContents = self._computeText()
		self._editorModel = WSEditor.RichTextController.WorksheetRichTextController.instance.editorModelSpan( projectedContents, spanAttrs )
		def computeStyleValues(listOfSpanAttrs):
			value = bool(listOfSpanAttrs[0].getValue(attrName, 0))
			value = not value
			attrs = RichTextAttributes()
			attrs.putOverride(attrName, '1'   if value   else None)
			return attrs
Example #3
0
		def computeStyleValues(listOfSpanAttrs):
			value = listOfSpanAttrs[0].getValue(attrName, 0)
			value = not value
			attrs = RichTextAttributes()
			attrs.putOverride(attrName, value)
			return attrs