def get_all_styles(document, style):
    """Returns list of styles on which specified style is based on.

    :Args:
      - document (:class:`ooxml.doc.Document`): Document object
      - style (:class:`ooxml.doc.Style`): Style object

    :Returns:
      List of style objects.
    """

    classes = []

    while True:
        classes.insert(0, get_style_name(style))

        if style.based_on:
            style = document.styles.get_by_id(style.based_on)
        else:
            break

    return classes
def get_all_styles ( document , style ) : classes = [ ] while True : classes . insert ( 0 , get_style_name ( style ) ) if style . based_on : style = document . styles . get_by_id ( style . based_on ) else : break return classes
Returns list of styles on which specified style is based on.

    :Args:
      - document (:class:`ooxml.doc.Document`): Document object
      - style (:class:`ooxml.doc.Style`): Style object

    :Returns:
      List of style objects.