lib/PHPRtfLite/Container/Base.php
private function needToAddParagraphEnd($key)
    {
        if (isset($this->_elements[$key + 1])) {
            $nextElement = $this->_elements[$key + 1];
            $element = $this->_elements[$key];
            $isNextElementTable = $nextElement instanceof PHPRtfLite_Table;

            if ($nextElement instanceof PHPRtfLite_List && $element instanceof PHPRtfLite_Element) {
                return true;
            }
            if ($element instanceof PHPRtfLite_Table && $element->getNestDepth() == 1) {
                return !$element->getPreventEmptyParagraph();
            }
            if ($element instanceof PHPRtfLite_Element) {
                return (!$element->isEmptyParagraph() && ($isNextElementTable || $nextElement->getParFormat()));
            }
            if ($element instanceof PHPRtfLite_Image) {
                return ($isNextElementTable || $nextElement->getParFormat());
            }
            if ($nextElement instanceof PHPRtfLite_List) {
                return true;
            }
        }

        return false;
    }
private function needToAddParagraphEnd($key)
    {
        if (isset($this->_elements[$key + 1])) {
            $nextElement = $this->_elements[$key + 1];
            $element = $this->_elements[$key];
            $isNextElementTable = $nextElement instanceof PHPRtfLite_Table;

            if ($nextElement instanceof PHPRtfLite_List && $element instanceof PHPRtfLite_Element) {
                return true;
            }
            if ($element instanceof PHPRtfLite_Table && $element->getNestDepth() == 1) {
                return !$element->getPreventEmptyParagraph();
            }
            if ($element instanceof PHPRtfLite_Element) {
                return (!$element->isEmptyParagraph() && ($isNextElementTable || $nextElement->getParFormat()));
            }
            if ($element instanceof PHPRtfLite_Image) {
                return ($isNextElementTable || $nextElement->getParFormat());
            }
            if ($nextElement instanceof PHPRtfLite_List) {
                return true;
            }
        }

        return false;
    }
private function needToAddParagraphEnd ( $ key ) { if ( isset ( $ this -> _elements [ $ key + 1 ] ) ) { $ nextElement = $ this -> _elements [ $ key + 1 ] ; $ element = $ this -> _elements [ $ key ] ; $ isNextElementTable = $ nextElement instanceof PHPRtfLite_Table ; if ( $ nextElement instanceof PHPRtfLite_List && $ element instanceof PHPRtfLite_Element ) { return true ; } if ( $ element instanceof PHPRtfLite_Table && $ element -> getNestDepth ( ) == 1 ) { return ! $ element -> getPreventEmptyParagraph ( ) ; } if ( $ element instanceof PHPRtfLite_Element ) { return ( ! $ element -> isEmptyParagraph ( ) && ( $ isNextElementTable || $ nextElement -> getParFormat ( ) ) ) ; } if ( $ element instanceof PHPRtfLite_Image ) { return ( $ isNextElementTable || $ nextElement -> getParFormat ( ) ) ; } if ( $ nextElement instanceof PHPRtfLite_List ) { return true ; } } return false ; }
checks, if a \par has to be added

@param   integer $key
@return  boolean
checks if a \ par has to be added