function _splitMultilineRows() {
        ksort($this->_data);
        $sections = array(&$this->_headers, &$this->_data);
        $max_rows = array(count($this->_headers), $this->_max_rows);
        $row_height_offset = array(-1, 0);

        for ($s = 0; $s <= 1; $s++) {
            $inserted = 0;
            $new_data = $sections[$s];

            for ($i = 0; $i < $max_rows[$s]; $i++) {
                // Process only rows that have many lines.
                $height = $this->_row_heights[$i + $row_height_offset[$s]];
                if ($height > 1) {
                    // Split column data into one-liners.
                    $split = array();
                    for ($j = 0; $j < $this->_max_cols; $j++) {
                        $split[$j] = preg_split('/\r?\n|\r/',
                            $sections[$s][$i][$j]);
                    }

                    $new_rows = array();
                    // Construct new 'virtual' rows - insert empty strings for
                    // columns that have less lines that the highest one.
                    for ($i2 = 0; $i2 < $height; $i2++) {
                        for ($j = 0; $j < $this->_max_cols; $j++) {
                            $new_rows[$i2][$j] = !isset($split[$j][$i2])
                                ? ''
                                : $split[$j][$i2];
                        }
                    }

                    // Replace current row with smaller rows.  $inserted is
                    // used to take account of bigger array because of already
                    // inserted rows.
                    array_splice($new_data, $i + $inserted, 1, $new_rows);
                    $inserted += count($new_rows) - 1;
                }
            }

            // Has the data been modified?
            if ($inserted > 0) {
                $sections[$s] = $new_data;
                $this->_updateRowsCols();
            }
        }
    }
function _splitMultilineRows() {
        ksort($this->_data);
        $sections = array(&$this->_headers, &$this->_data);
        $max_rows = array(count($this->_headers), $this->_max_rows);
        $row_height_offset = array(-1, 0);

        for ($s = 0; $s <= 1; $s++) {
            $inserted = 0;
            $new_data = $sections[$s];

            for ($i = 0; $i < $max_rows[$s]; $i++) {
                // Process only rows that have many lines.
                $height = $this->_row_heights[$i + $row_height_offset[$s]];
                if ($height > 1) {
                    // Split column data into one-liners.
                    $split = array();
                    for ($j = 0; $j < $this->_max_cols; $j++) {
                        $split[$j] = preg_split('/\r?\n|\r/',
                            $sections[$s][$i][$j]);
                    }

                    $new_rows = array();
                    // Construct new 'virtual' rows - insert empty strings for
                    // columns that have less lines that the highest one.
                    for ($i2 = 0; $i2 < $height; $i2++) {
                        for ($j = 0; $j < $this->_max_cols; $j++) {
                            $new_rows[$i2][$j] = !isset($split[$j][$i2])
                                ? ''
                                : $split[$j][$i2];
                        }
                    }

                    // Replace current row with smaller rows.  $inserted is
                    // used to take account of bigger array because of already
                    // inserted rows.
                    array_splice($new_data, $i + $inserted, 1, $new_rows);
                    $inserted += count($new_rows) - 1;
                }
            }

            // Has the data been modified?
            if ($inserted > 0) {
                $sections[$s] = $new_data;
                $this->_updateRowsCols();
            }
        }
    }
function _splitMultilineRows ( ) { ksort ( $ this -> _data ) ; $ sections = array ( & $ this -> _headers , & $ this -> _data ) ; $ max_rows = array ( count ( $ this -> _headers ) , $ this -> _max_rows ) ; $ row_height_offset = array ( - 1 , 0 ) ; for ( $ s = 0 ; $ s <= 1 ; $ s ++ ) { $ inserted = 0 ; $ new_data = $ sections [ $ s ] ; for ( $ i = 0 ; $ i < $ max_rows [ $ s ] ; $ i ++ ) { // Process only rows that have many lines. $ height = $ this -> _row_heights [ $ i + $ row_height_offset [ $ s ] ] ; if ( $ height > 1 ) { // Split column data into one-liners. $ split = array ( ) ; for ( $ j = 0 ; $ j < $ this -> _max_cols ; $ j ++ ) { $ split [ $ j ] = preg_split ( '/\r?\n|\r/' , $ sections [ $ s ] [ $ i ] [ $ j ] ) ; } $ new_rows = array ( ) ; // Construct new 'virtual' rows - insert empty strings for // columns that have less lines that the highest one. for ( $ i2 = 0 ; $ i2 < $ height ; $ i2 ++ ) { for ( $ j = 0 ; $ j < $ this -> _max_cols ; $ j ++ ) { $ new_rows [ $ i2 ] [ $ j ] = ! isset ( $ split [ $ j ] [ $ i2 ] ) ? '' : $ split [ $ j ] [ $ i2 ] ; } } // Replace current row with smaller rows.  $inserted is // used to take account of bigger array because of already // inserted rows. array_splice ( $ new_data , $ i + $ inserted , 1 , $ new_rows ) ; $ inserted += count ( $ new_rows ) - 1 ; } } // Has the data been modified? if ( $ inserted > 0 ) { $ sections [ $ s ] = $ new_data ; $ this -> _updateRowsCols ( ) ; } } }
Splits multiline rows into many smaller one-line rows.

@return void
Splits multiline rows into many smaller one - line rows .