2.4 Remove Empty Paragraphs within Table Cell

There is an exception for paragraphs that are the only child elements.

<..table:table-cell -= empty text:p..>
 Node child = tblCell.getLastChild();
 while( child != null ){
    Node prevChild = child.getPreviousSibling();
    if(
        (child.getNodeType() == Node.ELEMENT_NODE)
      &&
         child.getNodeName().equals("text:p")
    ){
      Node sibling = child.getPreviousSibling();
      while( (sibling != null)
             &&
             (sibling.getNodeType() != Node.ELEMENT_NODE)
      ){
        sibling = sibling.getPreviousSibling();
      }
      if( sibling == null ){
        sibling = child.getNextSibling();
        while( (sibling != null)
               &&
               (sibling.getNodeType() != Node.ELEMENT_NODE)
        ){
           sibling = sibling.getNextSibling();
      } }
      if( (sibling != null)
          && child.getTextContent().trim().equals("")
      ){
          tblCell.removeChild(child);
    } }
    child = prevChild;
 }
-_-_-