For God so loved the world, that He gave His only begotten Son, that all who believe in Him should not perish but have everlasting life
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

233 lines
4.4 KiB

  1. <?php
  2. /**
  3. * PHPExcel
  4. *
  5. * Copyright (c) 2006 - 2015 PHPExcel
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. * @category PHPExcel
  22. * @package PHPExcel_Worksheet
  23. * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  24. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
  25. * @version ##VERSION##, ##DATE##
  26. */
  27. /**
  28. * PHPExcel_Worksheet_PageMargins
  29. *
  30. * @category PHPExcel
  31. * @package PHPExcel_Worksheet
  32. * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  33. */
  34. class PHPExcel_Worksheet_PageMargins
  35. {
  36. /**
  37. * Left
  38. *
  39. * @var double
  40. */
  41. private $left = 0.7;
  42. /**
  43. * Right
  44. *
  45. * @var double
  46. */
  47. private $right = 0.7;
  48. /**
  49. * Top
  50. *
  51. * @var double
  52. */
  53. private $top = 0.75;
  54. /**
  55. * Bottom
  56. *
  57. * @var double
  58. */
  59. private $bottom = 0.75;
  60. /**
  61. * Header
  62. *
  63. * @var double
  64. */
  65. private $header = 0.3;
  66. /**
  67. * Footer
  68. *
  69. * @var double
  70. */
  71. private $footer = 0.3;
  72. /**
  73. * Create a new PHPExcel_Worksheet_PageMargins
  74. */
  75. public function __construct()
  76. {
  77. }
  78. /**
  79. * Get Left
  80. *
  81. * @return double
  82. */
  83. public function getLeft()
  84. {
  85. return $this->left;
  86. }
  87. /**
  88. * Set Left
  89. *
  90. * @param double $pValue
  91. * @return PHPExcel_Worksheet_PageMargins
  92. */
  93. public function setLeft($pValue)
  94. {
  95. $this->left = $pValue;
  96. return $this;
  97. }
  98. /**
  99. * Get Right
  100. *
  101. * @return double
  102. */
  103. public function getRight()
  104. {
  105. return $this->right;
  106. }
  107. /**
  108. * Set Right
  109. *
  110. * @param double $pValue
  111. * @return PHPExcel_Worksheet_PageMargins
  112. */
  113. public function setRight($pValue)
  114. {
  115. $this->right = $pValue;
  116. return $this;
  117. }
  118. /**
  119. * Get Top
  120. *
  121. * @return double
  122. */
  123. public function getTop()
  124. {
  125. return $this->top;
  126. }
  127. /**
  128. * Set Top
  129. *
  130. * @param double $pValue
  131. * @return PHPExcel_Worksheet_PageMargins
  132. */
  133. public function setTop($pValue)
  134. {
  135. $this->top = $pValue;
  136. return $this;
  137. }
  138. /**
  139. * Get Bottom
  140. *
  141. * @return double
  142. */
  143. public function getBottom()
  144. {
  145. return $this->bottom;
  146. }
  147. /**
  148. * Set Bottom
  149. *
  150. * @param double $pValue
  151. * @return PHPExcel_Worksheet_PageMargins
  152. */
  153. public function setBottom($pValue)
  154. {
  155. $this->bottom = $pValue;
  156. return $this;
  157. }
  158. /**
  159. * Get Header
  160. *
  161. * @return double
  162. */
  163. public function getHeader()
  164. {
  165. return $this->header;
  166. }
  167. /**
  168. * Set Header
  169. *
  170. * @param double $pValue
  171. * @return PHPExcel_Worksheet_PageMargins
  172. */
  173. public function setHeader($pValue)
  174. {
  175. $this->header = $pValue;
  176. return $this;
  177. }
  178. /**
  179. * Get Footer
  180. *
  181. * @return double
  182. */
  183. public function getFooter()
  184. {
  185. return $this->footer;
  186. }
  187. /**
  188. * Set Footer
  189. *
  190. * @param double $pValue
  191. * @return PHPExcel_Worksheet_PageMargins
  192. */
  193. public function setFooter($pValue)
  194. {
  195. $this->footer = $pValue;
  196. return $this;
  197. }
  198. /**
  199. * Implement PHP __clone to create a deep clone, not just a shallow copy.
  200. */
  201. public function __clone()
  202. {
  203. $vars = get_object_vars($this);
  204. foreach ($vars as $key => $value) {
  205. if (is_object($value)) {
  206. $this->$key = clone $value;
  207. } else {
  208. $this->$key = $value;
  209. }
  210. }
  211. }
  212. }