source: branches/2.2/filemanager/tp/dompdf/include/table_row_frame_decorator.cls.php @ 3019

Revision 3019, 2.5 KB checked in by amuller, 14 years ago (diff)

Ticket #1135 - Corrigindo CSS e adicionando filemanager

Line 
1<?php
2/**
3 * DOMPDF - PHP5 HTML to PDF renderer
4 *
5 * File: $RCSfile: table_row_frame_decorator.cls.php,v $
6 * Created on: 2004-06-07
7 *
8 * Copyright (c) 2004 - Benj Carson <benjcarson@digitaljunkies.ca>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library in the file LICENSE.LGPL; if not, write to the
22 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 * 02111-1307 USA
24 *
25 * Alternatively, you may distribute this software under the terms of the
26 * PHP License, version 3.0 or later.  A copy of this license should have
27 * been distributed with this file in the file LICENSE.PHP .  If this is not
28 * the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
29 *
30 * The latest version of DOMPDF might be available at:
31 * http://www.digitaljunkies.ca/dompdf
32 *
33 * @link http://www.digitaljunkies.ca/dompdf
34 * @copyright 2004 Benj Carson
35 * @author Benj Carson <benjcarson@digitaljunkies.ca>
36 * @package dompdf
37 * @version 0.5.1
38 */
39
40/* $Id: table_row_frame_decorator.cls.php 186 2009-10-19 22:42:06Z eclecticgeek@gmail.com $ */
41
42/**
43 * Decorates Frames for table row layout
44 *
45 * @access private
46 * @package dompdf
47 */
48class Table_Row_Frame_Decorator extends Frame_Decorator {
49
50  // protected members
51 
52  function __construct(Frame $frame, DOMPDF $dompdf) {
53    parent::__construct($frame, $dompdf);
54  }
55 
56  //........................................................................
57
58  /**
59   * Remove all non table-cell frames from this row and move them after
60   * the table.
61   */
62  function normalise() {
63
64    // Find our table parent
65    $p = Table_Frame_Decorator::find_parent_table($this);
66   
67    $erroneous_frames = array();
68    foreach ($this->get_children() as $child) {     
69      $display = $child->get_style()->display;
70
71      if ( $display != "table-cell" )
72        $erroneous_frames[] = $child;
73    }
74   
75    //  dump the extra nodes after the table.
76    foreach ($erroneous_frames as $frame)
77      $p->move_after($frame);
78  }
79 
80 
81}
82?>
Note: See TracBrowser for help on using the repository browser.