'Alignment and protection objects are implemented as child elements.
This is a completely different API to other format objects. :-/'

def to_tree(self):

    attrs = {}
    for key in (self.__attrs__ + ('applyProtection', 'applyAlignment')):
        value = getattr(self, key)
        if (key in ('alignmentId', 'protectionId')):
            continue
        elif ((key in ('quotePrefix', 'pivotButton', 'applyProtection', 'applyAlignment')) and (not value)):
            continue
        attrs[key] = value
    attrs = dict(((k, safe_string(v)) for (k, v) in attrs.items()))
    return Element(self.tagname, attrs)
