Another chunk of namespacing work

This commit is contained in:
MarkBaker 2015-06-01 21:08:48 +01:00
parent ebca5d1a57
commit c86a72ac1a
12 changed files with 649 additions and 635 deletions

File diff suppressed because it is too large Load Diff

View File

@ -39,42 +39,42 @@ class Chart
/** /**
* Worksheet * Worksheet
* *
* @var \PHPExcel\Worksheet * @var Worksheet
*/ */
private $worksheet; private $worksheet;
/** /**
* Chart Title * Chart Title
* *
* @var PHPExcel_Chart_Title * @var Chart\Title
*/ */
private $title; private $title;
/** /**
* Chart Legend * Chart Legend
* *
* @var PHPExcel_Chart_Legend * @var Chart\Legend
*/ */
private $legend; private $legend;
/** /**
* X-Axis Label * X-Axis Label
* *
* @var PHPExcel_Chart_Title * @var Chart\Title
*/ */
private $xAxisLabel; private $xAxisLabel;
/** /**
* Y-Axis Label * Y-Axis Label
* *
* @var PHPExcel_Chart_Title * @var Chart\Title
*/ */
private $yAxisLabel; private $yAxisLabel;
/** /**
* Chart Plot Area * Chart Plot Area
* *
* @var PHPExcel_Chart_PlotArea * @var Chart\PlotArea
*/ */
private $plotArea; private $plotArea;
@ -95,28 +95,28 @@ class Chart
/** /**
* Chart Asix Y as * Chart Asix Y as
* *
* @var PHPExcel_Chart_Axis * @var Chart\Axis
*/ */
private $yAxis; private $yAxis;
/** /**
* Chart Asix X as * Chart Asix X as
* *
* @var PHPExcel_Chart_Axis * @var Chart\Axis
*/ */
private $xAxis; private $xAxis;
/** /**
* Chart Major Gridlines as * Chart Major Gridlines as
* *
* @var PHPExcel_Chart_GridLines * @var Chart\GridLines
*/ */
private $majorGridlines; private $majorGridlines;
/** /**
* Chart Minor Gridlines as * Chart Minor Gridlines as
* *
* @var PHPExcel_Chart_GridLines * @var Chart\GridLines
*/ */
private $minorGridlines; private $minorGridlines;
@ -169,9 +169,9 @@ class Chart
/** /**
* Create a new PHPExcel_Chart * Create a new Chart
*/ */
public function __construct($name, PHPExcel_Chart_Title $title = null, PHPExcel_Chart_Legend $legend = null, PHPExcel_Chart_PlotArea $plotArea = null, $plotVisibleOnly = true, $displayBlanksAs = '0', PHPExcel_Chart_Title $xAxisLabel = null, PHPExcel_Chart_Title $yAxisLabel = null, PHPExcel_Chart_Axis $xAxis = null, PHPExcel_Chart_Axis $yAxis = null, PHPExcel_Chart_GridLines $majorGridlines = null, PHPExcel_Chart_GridLines $minorGridlines = null) public function __construct($name, Chart\Title $title = null, Chart\Legend $legend = null, Chart\PlotArea $plotArea = null, $plotVisibleOnly = true, $displayBlanksAs = '0', Chart\Title $xAxisLabel = null, Chart\Title $yAxisLabel = null, Chart\Axis $xAxis = null, Chart\Axis $yAxis = null, Chart\GridLines $majorGridlines = null, Chart\GridLines $minorGridlines = null)
{ {
$this->name = $name; $this->name = $name;
$this->title = $title; $this->title = $title;
@ -200,7 +200,7 @@ class Chart
/** /**
* Get Worksheet * Get Worksheet
* *
* @return PHPExcel_Worksheet * @return Worksheet
*/ */
public function getWorksheet() public function getWorksheet()
{ {
@ -210,11 +210,11 @@ class Chart
/** /**
* Set Worksheet * Set Worksheet
* *
* @param PHPExcel_Worksheet $pValue * @param Worksheet $pValue
* @throws PHPExcel_Chart_Exception * @throws Chart\Exception
* @return PHPExcel_Chart * @return Chart
*/ */
public function setWorksheet(PHPExcel_Worksheet $pValue = null) public function setWorksheet(Worksheet $pValue = null)
{ {
$this->worksheet = $pValue; $this->worksheet = $pValue;
@ -224,7 +224,7 @@ class Chart
/** /**
* Get Title * Get Title
* *
* @return PHPExcel_Chart_Title * @return Chart\Title
*/ */
public function getTitle() public function getTitle()
{ {
@ -234,10 +234,10 @@ class Chart
/** /**
* Set Title * Set Title
* *
* @param PHPExcel_Chart_Title $title * @param Chart\Title $title
* @return PHPExcel_Chart * @return Chart
*/ */
public function setTitle(PHPExcel_Chart_Title $title) public function setTitle(Chart\Title $title)
{ {
$this->title = $title; $this->title = $title;
@ -247,7 +247,7 @@ class Chart
/** /**
* Get Legend * Get Legend
* *
* @return PHPExcel_Chart_Legend * @return Chart\Legend
*/ */
public function getLegend() public function getLegend()
{ {
@ -257,10 +257,10 @@ class Chart
/** /**
* Set Legend * Set Legend
* *
* @param PHPExcel_Chart_Legend $legend * @param Chart\Legend $legend
* @return PHPExcel_Chart * @return Chart
*/ */
public function setLegend(PHPExcel_Chart_Legend $legend) public function setLegend(Chart\Legend $legend)
{ {
$this->legend = $legend; $this->legend = $legend;
@ -270,7 +270,7 @@ class Chart
/** /**
* Get X-Axis Label * Get X-Axis Label
* *
* @return PHPExcel_Chart_Title * @return Chart\Title
*/ */
public function getXAxisLabel() public function getXAxisLabel()
{ {
@ -280,10 +280,10 @@ class Chart
/** /**
* Set X-Axis Label * Set X-Axis Label
* *
* @param PHPExcel_Chart_Title $label * @param Chart\Title $label
* @return PHPExcel_Chart * @return Chart
*/ */
public function setXAxisLabel(PHPExcel_Chart_Title $label) public function setXAxisLabel(Chart\Title $label)
{ {
$this->xAxisLabel = $label; $this->xAxisLabel = $label;
@ -293,7 +293,7 @@ class Chart
/** /**
* Get Y-Axis Label * Get Y-Axis Label
* *
* @return PHPExcel_Chart_Title * @return Chart\Title
*/ */
public function getYAxisLabel() public function getYAxisLabel()
{ {
@ -303,10 +303,10 @@ class Chart
/** /**
* Set Y-Axis Label * Set Y-Axis Label
* *
* @param PHPExcel_Chart_Title $label * @param Chart\Title $label
* @return PHPExcel_Chart * @return Chart
*/ */
public function setYAxisLabel(PHPExcel_Chart_Title $label) public function setYAxisLabel(Chart\Title $label)
{ {
$this->yAxisLabel = $label; $this->yAxisLabel = $label;
@ -316,7 +316,7 @@ class Chart
/** /**
* Get Plot Area * Get Plot Area
* *
* @return PHPExcel_Chart_PlotArea * @return Chart\PlotArea
*/ */
public function getPlotArea() public function getPlotArea()
{ {
@ -337,7 +337,7 @@ class Chart
* Set Plot Visible Only * Set Plot Visible Only
* *
* @param boolean $plotVisibleOnly * @param boolean $plotVisibleOnly
* @return PHPExcel_Chart * @return Chart
*/ */
public function setPlotVisibleOnly($plotVisibleOnly = true) public function setPlotVisibleOnly($plotVisibleOnly = true)
{ {
@ -360,7 +360,7 @@ class Chart
* Set Display Blanks as * Set Display Blanks as
* *
* @param string $displayBlanksAs * @param string $displayBlanksAs
* @return PHPExcel_Chart * @return Chart
*/ */
public function setDisplayBlanksAs($displayBlanksAs = '0') public function setDisplayBlanksAs($displayBlanksAs = '0')
{ {
@ -371,7 +371,7 @@ class Chart
/** /**
* Get yAxis * Get yAxis
* *
* @return PHPExcel_Chart_Axis * @return Chart\Axis
*/ */
public function getChartAxisY() public function getChartAxisY()
{ {
@ -379,13 +379,13 @@ class Chart
return $this->yAxis; return $this->yAxis;
} }
return new PHPExcel_Chart_Axis(); return new Chart\Axis();
} }
/** /**
* Get xAxis * Get xAxis
* *
* @return PHPExcel_Chart_Axis * @return Chart\Axis
*/ */
public function getChartAxisX() public function getChartAxisX()
{ {
@ -393,13 +393,13 @@ class Chart
return $this->xAxis; return $this->xAxis;
} }
return new PHPExcel_Chart_Axis(); return new Chart\Axis();
} }
/** /**
* Get Major Gridlines * Get Major Gridlines
* *
* @return PHPExcel_Chart_GridLines * @return Chart\GridLines
*/ */
public function getMajorGridlines() public function getMajorGridlines()
{ {
@ -407,13 +407,13 @@ class Chart
return $this->majorGridlines; return $this->majorGridlines;
} }
return new PHPExcel_Chart_GridLines(); return new Chart\GridLines();
} }
/** /**
* Get Minor Gridlines * Get Minor Gridlines
* *
* @return PHPExcel_Chart_GridLines * @return Chart\GridLines
*/ */
public function getMinorGridlines() public function getMinorGridlines()
{ {
@ -421,7 +421,7 @@ class Chart
return $this->minorGridlines; return $this->minorGridlines;
} }
return new PHPExcel_Chart_GridLines(); return new Chart\GridLines();
} }
@ -431,7 +431,7 @@ class Chart
* @param string $cell * @param string $cell
* @param integer $xOffset * @param integer $xOffset
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return Chart
*/ */
public function setTopLeftPosition($cell, $xOffset = null, $yOffset = null) public function setTopLeftPosition($cell, $xOffset = null, $yOffset = null)
{ {
@ -474,7 +474,7 @@ class Chart
* Set the Top Left cell position for the chart * Set the Top Left cell position for the chart
* *
* @param string $cell * @param string $cell
* @return PHPExcel_Chart * @return Chart
*/ */
public function setTopLeftCell($cell) public function setTopLeftCell($cell)
{ {
@ -488,7 +488,7 @@ class Chart
* *
* @param integer $xOffset * @param integer $xOffset
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return Chart
*/ */
public function setTopLeftOffset($xOffset = null, $yOffset = null) public function setTopLeftOffset($xOffset = null, $yOffset = null)
{ {
@ -545,7 +545,7 @@ class Chart
* @param string $cell * @param string $cell
* @param integer $xOffset * @param integer $xOffset
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return Chart
*/ */
public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null) public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null)
{ {
@ -596,7 +596,7 @@ class Chart
* *
* @param integer $xOffset * @param integer $xOffset
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return Chart
*/ */
public function setBottomRightOffset($xOffset = null, $yOffset = null) public function setBottomRightOffset($xOffset = null, $yOffset = null)
{ {
@ -657,21 +657,21 @@ class Chart
public function render($outputDestination = null) public function render($outputDestination = null)
{ {
$libraryName = PHPExcel_Settings::getChartRendererName(); $libraryName = Settings::getChartRendererName();
if (is_null($libraryName)) { if (is_null($libraryName)) {
return false; return false;
} }
// Ensure that data series values are up-to-date before we render // Ensure that data series values are up-to-date before we render
$this->refresh(); $this->refresh();
$libraryPath = PHPExcel_Settings::getChartRendererPath(); $libraryPath = Settings::getChartRendererPath();
$includePath = str_replace('\\', '/', get_include_path()); $includePath = str_replace('\\', '/', get_include_path());
$rendererPath = str_replace('\\', '/', $libraryPath); $rendererPath = str_replace('\\', '/', $libraryPath);
if (strpos($rendererPath, $includePath) === false) { if (strpos($rendererPath, $includePath) === false) {
set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath); set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath);
} }
$rendererName = 'PHPExcel_Chart_Renderer_'.$libraryName; $rendererName = '\\PHPExcel\\Chart\\Renderer\\'.$libraryName;
$renderer = new $rendererName($this); $renderer = new $rendererName($this);
if ($outputDestination == 'php://output') { if ($outputDestination == 'php://output') {

View File

@ -39,7 +39,7 @@ class Comment implements IComparable
/** /**
* Rich text comment * Rich text comment
* *
* @var PHPExcel_RichText * @var RichText
*/ */
private $text; private $text;
@ -81,7 +81,7 @@ class Comment implements IComparable
/** /**
* Comment fill color * Comment fill color
* *
* @var PHPExcel_Style_Color * @var Style\Color
*/ */
private $fillColor; private $fillColor;
@ -93,17 +93,17 @@ class Comment implements IComparable
private $alignment; private $alignment;
/** /**
* Create a new PHPExcel_Comment * Create a new Comment
* *
* @throws PHPExcel_Exception * @throws Exception
*/ */
public function __construct() public function __construct()
{ {
// Initialise variables // Initialise variables
$this->author = 'Author'; $this->author = 'Author';
$this->text = new PHPExcel_RichText(); $this->text = new RichText();
$this->fillColor = new PHPExcel_Style_Color('FFFFFFE1'); $this->fillColor = new Style\Color('FFFFFFE1');
$this->alignment = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL; $this->alignment = Style\Alignment::HORIZONTAL_GENERAL;
} }
/** /**
@ -120,7 +120,7 @@ class Comment implements IComparable
* Set Author * Set Author
* *
* @param string $pValue * @param string $pValue
* @return PHPExcel_Comment * @return Comment
*/ */
public function setAuthor($pValue = '') public function setAuthor($pValue = '')
{ {
@ -131,7 +131,7 @@ class Comment implements IComparable
/** /**
* Get Rich text comment * Get Rich text comment
* *
* @return PHPExcel_RichText * @return RichText
*/ */
public function getText() public function getText()
{ {
@ -141,10 +141,10 @@ class Comment implements IComparable
/** /**
* Set Rich text comment * Set Rich text comment
* *
* @param PHPExcel_RichText $pValue * @param RichText $pValue
* @return PHPExcel_Comment * @return Comment
*/ */
public function setText(PHPExcel_RichText $pValue) public function setText(RichText $pValue)
{ {
$this->text = $pValue; $this->text = $pValue;
return $this; return $this;
@ -164,7 +164,7 @@ class Comment implements IComparable
* Set comment width (CSS style, i.e. XXpx or YYpt) * Set comment width (CSS style, i.e. XXpx or YYpt)
* *
* @param string $value * @param string $value
* @return PHPExcel_Comment * @return Comment
*/ */
public function setWidth($value = '96pt') public function setWidth($value = '96pt')
{ {
@ -186,7 +186,7 @@ class Comment implements IComparable
* Set comment height (CSS style, i.e. XXpx or YYpt) * Set comment height (CSS style, i.e. XXpx or YYpt)
* *
* @param string $value * @param string $value
* @return PHPExcel_Comment * @return Comment
*/ */
public function setHeight($value = '55.5pt') public function setHeight($value = '55.5pt')
{ {
@ -208,7 +208,7 @@ class Comment implements IComparable
* Set left margin (CSS style, i.e. XXpx or YYpt) * Set left margin (CSS style, i.e. XXpx or YYpt)
* *
* @param string $value * @param string $value
* @return PHPExcel_Comment * @return Comment
*/ */
public function setMarginLeft($value = '59.25pt') public function setMarginLeft($value = '59.25pt')
{ {
@ -230,7 +230,7 @@ class Comment implements IComparable
* Set top margin (CSS style, i.e. XXpx or YYpt) * Set top margin (CSS style, i.e. XXpx or YYpt)
* *
* @param string $value * @param string $value
* @return PHPExcel_Comment * @return Comment
*/ */
public function setMarginTop($value = '1.5pt') public function setMarginTop($value = '1.5pt')
{ {
@ -252,7 +252,7 @@ class Comment implements IComparable
* Set comment default visibility * Set comment default visibility
* *
* @param boolean $value * @param boolean $value
* @return PHPExcel_Comment * @return Comment
*/ */
public function setVisible($value = false) public function setVisible($value = false)
{ {
@ -263,7 +263,7 @@ class Comment implements IComparable
/** /**
* Get fill color * Get fill color
* *
* @return PHPExcel_Style_Color * @return Style\Color
*/ */
public function getFillColor() public function getFillColor()
{ {
@ -274,9 +274,9 @@ class Comment implements IComparable
* Set Alignment * Set Alignment
* *
* @param string $pValue * @param string $pValue
* @return PHPExcel_Comment * @return Comment
*/ */
public function setAlignment($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL) public function setAlignment($pValue = Style\Alignment::HORIZONTAL_GENERAL)
{ {
$this->alignment = $pValue; $this->alignment = $pValue;
return $this; return $this;

View File

@ -69,7 +69,7 @@ class HashTable
if ($pSource == null) { if ($pSource == null) {
return; return;
} elseif (!is_array($pSource)) { } elseif (!is_array($pSource)) {
throw new PHPExcel_Exception('Invalid array parameter passed.'); throw new Exception('Invalid array parameter passed.');
} }
foreach ($pSource as $item) { foreach ($pSource as $item) {
@ -80,10 +80,10 @@ class HashTable
/** /**
* Add HashTable item * Add HashTable item
* *
* @param PHPExcel_IComparable $pSource Item to add * @param IComparable $pSource Item to add
* @throws Exception * @throws Exception
*/ */
public function add(PHPExcel_IComparable $pSource = null) public function add(IComparable $pSource = null)
{ {
$hash = $pSource->getHashCode(); $hash = $pSource->getHashCode();
if (!isset($this->items[$hash])) { if (!isset($this->items[$hash])) {
@ -98,7 +98,7 @@ class HashTable
* @param IComparable $pSource Item to remove * @param IComparable $pSource Item to remove
* @throws Exception * @throws Exception
*/ */
public function remove(PHPExcel_IComparable $pSource = null) public function remove(IComparable $pSource = null)
{ {
$hash = $pSource->getHashCode(); $hash = $pSource->getHashCode();
if (isset($this->items[$hash])) { if (isset($this->items[$hash])) {

View File

@ -37,8 +37,8 @@ class IOFactory
* @static * @static
*/ */
private static $searchLocations = array( private static $searchLocations = array(
array( 'type' => 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ), array( 'type' => 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => '\\PHPExcel\\Writer\\{0}' ),
array( 'type' => 'IReader', 'path' => 'PHPExcel/Reader/{0}.php', 'class' => 'PHPExcel_Reader_{0}' ) array( 'type' => 'IReader', 'path' => 'PHPExcel/Reader/{0}.php', 'class' => '\\PHPExcel\\Reader\\{0}' )
); );
/** /**
@ -60,7 +60,7 @@ class IOFactory
); );
/** /**
* Private constructor for PHPExcel_IOFactory * Private constructor for IOFactory
*/ */
private function __construct() private function __construct()
{ {
@ -84,14 +84,14 @@ class IOFactory
* @static * @static
* @access public * @access public
* @param array $value * @param array $value
* @throws PHPExcel_Reader_Exception * @throws Reader\Exception
*/ */
public static function setSearchLocations($value) public static function setSearchLocations($value)
{ {
if (is_array($value)) { if (is_array($value)) {
self::$searchLocations = $value; self::$searchLocations = $value;
} else { } else {
throw new PHPExcel_Reader_Exception('Invalid parameter passed.'); throw new Reader\Exception('Invalid parameter passed.');
} }
} }
@ -102,7 +102,7 @@ class IOFactory
* @access public * @access public
* @param string $type Example: IWriter * @param string $type Example: IWriter
* @param string $location Example: PHPExcel/Writer/{0}.php * @param string $location Example: PHPExcel/Writer/{0}.php
* @param string $classname Example: PHPExcel_Writer_{0} * @param string $classname Example: Writer\{0}
*/ */
public static function addSearchLocation($type = '', $location = '', $classname = '') public static function addSearchLocation($type = '', $location = '', $classname = '')
{ {
@ -110,14 +110,14 @@ class IOFactory
} }
/** /**
* Create PHPExcel_Writer_IWriter * Create Writer\IWriter
* *
* @static * @static
* @access public * @access public
* @param PHPExcel $phpExcel * @param PHPExcel $phpExcel
* @param string $writerType Example: Excel2007 * @param string $writerType Example: Excel2007
* @return PHPExcel_Writer_IWriter * @return Writer\IWriter
* @throws PHPExcel_Reader_Exception * @throws Writer\Exception
*/ */
public static function createWriter(PHPExcel $phpExcel, $writerType = '') public static function createWriter(PHPExcel $phpExcel, $writerType = '')
{ {
@ -137,17 +137,17 @@ class IOFactory
} }
// Nothing found... // Nothing found...
throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType"); throw new Writer\Exception("No $searchType found for type $writerType");
} }
/** /**
* Create PHPExcel_Reader_IReader * Create Reader\IReader
* *
* @static * @static
* @access public * @access public
* @param string $readerType Example: Excel2007 * @param string $readerType Example: Excel2007
* @return PHPExcel_Reader_IReader * @return Reader\IReader
* @throws PHPExcel_Reader_Exception * @throws Reader\Exception
*/ */
public static function createReader($readerType = '') public static function createReader($readerType = '')
{ {
@ -167,17 +167,17 @@ class IOFactory
} }
// Nothing found... // Nothing found...
throw new PHPExcel_Reader_Exception("No $searchType found for type $readerType"); throw new Reader\Exception("No $searchType found for type $readerType");
} }
/** /**
* Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution * Loads PHPExcel from file using automatic Reader\IReader resolution
* *
* @static * @static
* @access public * @access public
* @param string $pFilename The name of the spreadsheet file * @param string $pFilename The name of the spreadsheet file
* @return PHPExcel * @return PHPExcel
* @throws PHPExcel_Reader_Exception * @throws Reader\Exception
*/ */
public static function load($pFilename) public static function load($pFilename)
{ {
@ -186,13 +186,13 @@ class IOFactory
} }
/** /**
* Identify file type using automatic PHPExcel_Reader_IReader resolution * Identify file type using automatic Reader\IReader resolution
* *
* @static * @static
* @access public * @access public
* @param string $pFilename The name of the spreadsheet file to identify * @param string $pFilename The name of the spreadsheet file to identify
* @return string * @return string
* @throws PHPExcel_Reader_Exception * @throws Reader\Exception
*/ */
public static function identify($pFilename) public static function identify($pFilename)
{ {
@ -204,13 +204,13 @@ class IOFactory
} }
/** /**
* Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution * Create Reader\IReader for file using automatic Reader\IReader resolution
* *
* @static * @static
* @access public * @access public
* @param string $pFilename The name of the spreadsheet file * @param string $pFilename The name of the spreadsheet file
* @return PHPExcel_Reader_IReader * @return Reader\IReader
* @throws PHPExcel_Reader_Exception * @throws Reader\Exception
*/ */
public static function createReaderForFile($pFilename) public static function createReaderForFile($pFilename)
{ {
@ -277,6 +277,6 @@ class IOFactory
} }
} }
throw new PHPExcel_Reader_Exception('Unable to identify a reader for this file'); throw new Reader\Exception('Unable to identify a reader for this file');
} }
} }

View File

@ -39,7 +39,7 @@ class NamedRange
/** /**
* Worksheet on which the named range can be resolved * Worksheet on which the named range can be resolved
* *
* @var PHPExcel_Worksheet * @var Worksheet
*/ */
private $worksheet; private $worksheet;
@ -60,7 +60,7 @@ class NamedRange
/** /**
* Scope * Scope
* *
* @var PHPExcel_Worksheet * @var Worksheet
*/ */
private $scope; private $scope;
@ -68,17 +68,17 @@ class NamedRange
* Create a new NamedRange * Create a new NamedRange
* *
* @param string $pName * @param string $pName
* @param PHPExcel_Worksheet $pWorksheet * @param Worksheet $pWorksheet
* @param string $pRange * @param string $pRange
* @param bool $pLocalOnly * @param bool $pLocalOnly
* @param PHPExcel_Worksheet|null $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope. * @param Worksheet|null $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope.
* @throws PHPExcel_Exception * @throws Exception
*/ */
public function __construct($pName = null, PHPExcel_Worksheet $pWorksheet, $pRange = 'A1', $pLocalOnly = false, $pScope = null) public function __construct($pName = null, Worksheet $pWorksheet, $pRange = 'A1', $pLocalOnly = false, $pScope = null)
{ {
// Validate data // Validate data
if (($pName === null) || ($pWorksheet === null) || ($pRange === null)) { if (($pName === null) || ($pWorksheet === null) || ($pRange === null)) {
throw new PHPExcel_Exception('Parameters can not be null.'); throw new Exception('Parameters can not be null.');
} }
// Set local members // Set local members
@ -103,7 +103,7 @@ class NamedRange
* Set name * Set name
* *
* @param string $value * @param string $value
* @return PHPExcel_NamedRange * @return NamedRange
*/ */
public function setName($value = null) public function setName($value = null)
{ {
@ -123,7 +123,7 @@ class NamedRange
// New title // New title
$newTitle = $this->name; $newTitle = $this->name;
PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->worksheet->getParent(), $oldTitle, $newTitle); ReferenceHelper::getInstance()->updateNamedFormulas($this->worksheet->getParent(), $oldTitle, $newTitle);
} }
return $this; return $this;
} }
@ -131,7 +131,7 @@ class NamedRange
/** /**
* Get worksheet * Get worksheet
* *
* @return PHPExcel_Worksheet * @return Worksheet
*/ */
public function getWorksheet() public function getWorksheet()
{ {
@ -141,10 +141,10 @@ class NamedRange
/** /**
* Set worksheet * Set worksheet
* *
* @param PHPExcel_Worksheet $value * @param Worksheet $value
* @return PHPExcel_NamedRange * @return NamedRange
*/ */
public function setWorksheet(PHPExcel_Worksheet $value = null) public function setWorksheet(Worksheet $value = null)
{ {
if ($value !== null) { if ($value !== null) {
$this->worksheet = $value; $this->worksheet = $value;
@ -166,7 +166,7 @@ class NamedRange
* Set range * Set range
* *
* @param string $value * @param string $value
* @return PHPExcel_NamedRange * @return NamedRange
*/ */
public function setRange($value = null) public function setRange($value = null)
{ {
@ -190,7 +190,7 @@ class NamedRange
* Set localOnly * Set localOnly
* *
* @param bool $value * @param bool $value
* @return PHPExcel_NamedRange * @return NamedRange
*/ */
public function setLocalOnly($value = false) public function setLocalOnly($value = false)
{ {
@ -202,7 +202,7 @@ class NamedRange
/** /**
* Get scope * Get scope
* *
* @return PHPExcel_Worksheet|null * @return Worksheet|null
*/ */
public function getScope() public function getScope()
{ {
@ -212,10 +212,10 @@ class NamedRange
/** /**
* Set scope * Set scope
* *
* @param PHPExcel_Worksheet|null $value * @param Worksheet|null $value
* @return PHPExcel_NamedRange * @return NamedRange
*/ */
public function setScope(PHPExcel_Worksheet $value = null) public function setScope(Worksheet $value = null)
{ {
$this->scope = $value; $this->scope = $value;
$this->localOnly = ($value == null) ? false : true; $this->localOnly = ($value == null) ? false : true;
@ -226,10 +226,10 @@ class NamedRange
* Resolve a named range to a regular cell range * Resolve a named range to a regular cell range
* *
* @param string $pNamedRange Named range * @param string $pNamedRange Named range
* @param PHPExcel_Worksheet|null $pSheet Scope. Use null for global scope * @param Worksheet|null $pSheet Scope. Use null for global scope
* @return PHPExcel_NamedRange * @return NamedRange
*/ */
public static function resolveRange($pNamedRange = '', PHPExcel_Worksheet $pSheet) public static function resolveRange($pNamedRange = '', Worksheet $pSheet)
{ {
return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet); return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet);
} }

View File

@ -44,20 +44,20 @@ class Excel2003XML extends BaseReader implements IReader
protected $charSet = 'UTF-8'; protected $charSet = 'UTF-8';
/** /**
* Create a new PHPExcel_Reader_Excel2003XML * Create a new Excel2003XML
*/ */
public function __construct() public function __construct()
{ {
$this->readFilter = new PHPExcel_Reader_DefaultReadFilter(); $this->readFilter = new DefaultReadFilter();
} }
/** /**
* Can the current PHPExcel_Reader_IReader read the file? * Can the current IReader read the file?
* *
* @param string $pFilename * @param string $pFilename
* @return boolean * @return boolean
* @throws PHPExcel_Reader_Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {
@ -108,21 +108,25 @@ class Excel2003XML extends BaseReader implements IReader
* Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object
* *
* @param string $pFilename * @param string $pFilename
* @throws PHPExcel_Reader_Exception * @throws Exception
*/ */
public function listWorksheetNames($pFilename) public function listWorksheetNames($pFilename)
{ {
// Check if file exists // Check if file exists
if (!file_exists($pFilename)) { if (!file_exists($pFilename)) {
throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); throw new Exception("Could not open " . $pFilename . " for reading! File does not exist.");
} }
if (!$this->canRead($pFilename)) { if (!$this->canRead($pFilename)) {
throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); throw new Exception($pFilename . " is an Invalid Spreadsheet file.");
} }
$worksheetNames = array(); $worksheetNames = array();
$xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); $xml = simplexml_load_string(
$this->securityScan(file_get_contents($pFilename)),
'SimpleXMLElement',
\PHPExcel\Settings::getLibXmlLoaderOptions()
);
$namespaces = $xml->getNamespaces(true); $namespaces = $xml->getNamespaces(true);
$xml_ss = $xml->children($namespaces['ss']); $xml_ss = $xml->children($namespaces['ss']);
@ -139,18 +143,22 @@ class Excel2003XML extends BaseReader implements IReader
* Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns)
* *
* @param string $pFilename * @param string $pFilename
* @throws PHPExcel_Reader_Exception * @throws Exception
*/ */
public function listWorksheetInfo($pFilename) public function listWorksheetInfo($pFilename)
{ {
// Check if file exists // Check if file exists
if (!file_exists($pFilename)) { if (!file_exists($pFilename)) {
throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); throw new Exception("Could not open " . $pFilename . " for reading! File does not exist.");
} }
$worksheetInfo = array(); $worksheetInfo = array();
$xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); $xml = simplexml_load_string(
$this->securityScan(file_get_contents($pFilename)),
'SimpleXMLElement',
\PHPExcel\Settings::getLibXmlLoaderOptions()
);
$namespaces = $xml->getNamespaces(true); $namespaces = $xml->getNamespaces(true);
$worksheetID = 1; $worksheetID = 1;
@ -195,7 +203,7 @@ class Excel2003XML extends BaseReader implements IReader
} }
} }
$tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); $tmpInfo['lastColumnLetter'] = \PHPExcel\Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']);
$tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1;
$worksheetInfo[] = $tmpInfo; $worksheetInfo[] = $tmpInfo;
@ -210,8 +218,8 @@ class Excel2003XML extends BaseReader implements IReader
* Loads PHPExcel from file * Loads PHPExcel from file
* *
* @param string $pFilename * @param string $pFilename
* @return PHPExcel * @return Spreadsheet
* @throws PHPExcel_Reader_Exception * @throws Exception
*/ */
public function load($pFilename) public function load($pFilename)
{ {
@ -273,7 +281,7 @@ class Excel2003XML extends BaseReader implements IReader
* @param string $pFilename * @param string $pFilename
* @param PHPExcel $objPHPExcel * @param PHPExcel $objPHPExcel
* @return PHPExcel * @return PHPExcel
* @throws PHPExcel_Reader_Exception * @throws Exception
*/ */
public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
{ {
@ -281,25 +289,25 @@ class Excel2003XML extends BaseReader implements IReader
$toFormats = array('-', ' '); $toFormats = array('-', ' ');
$underlineStyles = array ( $underlineStyles = array (
PHPExcel_Style_Font::UNDERLINE_NONE, \PHPExcel\Style\Font::UNDERLINE_NONE,
PHPExcel_Style_Font::UNDERLINE_DOUBLE, \PHPExcel\Style\Font::UNDERLINE_DOUBLE,
PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING, \PHPExcel\Style\Font::UNDERLINE_DOUBLEACCOUNTING,
PHPExcel_Style_Font::UNDERLINE_SINGLE, \PHPExcel\Style\Font::UNDERLINE_SINGLE,
PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING \PHPExcel\Style\Font::UNDERLINE_SINGLEACCOUNTING
); );
$verticalAlignmentStyles = array ( $verticalAlignmentStyles = array (
PHPExcel_Style_Alignment::VERTICAL_BOTTOM, \PHPExcel\Style\Alignment::VERTICAL_BOTTOM,
PHPExcel_Style_Alignment::VERTICAL_TOP, \PHPExcel\Style\Alignment::VERTICAL_TOP,
PHPExcel_Style_Alignment::VERTICAL_CENTER, \PHPExcel\Style\Alignment::VERTICAL_CENTER,
PHPExcel_Style_Alignment::VERTICAL_JUSTIFY \PHPExcel\Style\Alignment::VERTICAL_JUSTIFY
); );
$horizontalAlignmentStyles = array ( $horizontalAlignmentStyles = array (
PHPExcel_Style_Alignment::HORIZONTAL_GENERAL, \PHPExcel\Style\Alignment::HORIZONTAL_GENERAL,
PHPExcel_Style_Alignment::HORIZONTAL_LEFT, \PHPExcel\Style\Alignment::HORIZONTAL_LEFT,
PHPExcel_Style_Alignment::HORIZONTAL_RIGHT, \PHPExcel\Style\Alignment::HORIZONTAL_RIGHT,
PHPExcel_Style_Alignment::HORIZONTAL_CENTER, \PHPExcel\Style\Alignment::HORIZONTAL_CENTER,
PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS, \PHPExcel\Style\Alignment::HORIZONTAL_CENTER_CONTINUOUS,
PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY \PHPExcel\Style\Alignment::HORIZONTAL_JUSTIFY
); );
$timezoneObj = new DateTimeZone('Europe/London'); $timezoneObj = new DateTimeZone('Europe/London');
@ -307,14 +315,18 @@ class Excel2003XML extends BaseReader implements IReader
// Check if file exists // Check if file exists
if (!file_exists($pFilename)) { if (!file_exists($pFilename)) {
throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); throw new Exception("Could not open " . $pFilename . " for reading! File does not exist.");
} }
if (!$this->canRead($pFilename)) { if (!$this->canRead($pFilename)) {
throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); throw new Exception($pFilename . " is an Invalid Spreadsheet file.");
} }
$xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); $xml = simplexml_load_string(
$this->securityScan(file_get_contents($pFilename)),
'SimpleXMLElement',
\PHPExcel\Settings::getLibXmlLoaderOptions()
);
$namespaces = $xml->getNamespaces(true); $namespaces = $xml->getNamespaces(true);
$docProps = $objPHPExcel->getProperties(); $docProps = $objPHPExcel->getProperties();
@ -362,27 +374,27 @@ class Excel2003XML extends BaseReader implements IReader
if (isset($xml->CustomDocumentProperties)) { if (isset($xml->CustomDocumentProperties)) {
foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) { foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) {
$propertyAttributes = $propertyValue->attributes($namespaces['dt']); $propertyAttributes = $propertyValue->attributes($namespaces['dt']);
$propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/', 'PHPExcel_Reader_Excel2003XML::hex2str', $propertyName); $propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/', '\\PHPExcel\\Reader\\Excel2003XML::hex2str', $propertyName);
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_UNKNOWN; $propertyType = \PHPExcel\Document\Properties::PROPERTY_TYPE_UNKNOWN;
switch ((string) $propertyAttributes) { switch ((string) $propertyAttributes) {
case 'string': case 'string':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING; $propertyType = \PHPExcel\Document\Properties::PROPERTY_TYPE_STRING;
$propertyValue = trim($propertyValue); $propertyValue = trim($propertyValue);
break; break;
case 'boolean': case 'boolean':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN; $propertyType = \PHPExcel\Document\Properties::PROPERTY_TYPE_BOOLEAN;
$propertyValue = (bool) $propertyValue; $propertyValue = (bool) $propertyValue;
break; break;
case 'integer': case 'integer':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_INTEGER; $propertyType = \PHPExcel\Document\Properties::PROPERTY_TYPE_INTEGER;
$propertyValue = intval($propertyValue); $propertyValue = intval($propertyValue);
break; break;
case 'float': case 'float':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT; $propertyType = \PHPExcel\Document\Properties::PROPERTY_TYPE_FLOAT;
$propertyValue = floatval($propertyValue); $propertyValue = floatval($propertyValue);
break; break;
case 'dateTime.tz': case 'dateTime.tz':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE; $propertyType = \PHPExcel\Document\Properties::PROPERTY_TYPE_DATE;
$propertyValue = strtotime(trim($propertyValue)); $propertyValue = strtotime(trim($propertyValue));
break; break;
} }
@ -432,7 +444,7 @@ class Excel2003XML extends BaseReader implements IReader
// echo $borderStyleKey.' = '.$borderStyleValue.'<br />'; // echo $borderStyleKey.' = '.$borderStyleValue.'<br />';
switch ($borderStyleKey) { switch ($borderStyleKey) {
case 'LineStyle': case 'LineStyle':
$thisBorder['style'] = PHPExcel_Style_Border::BORDER_MEDIUM; $thisBorder['style'] = \PHPExcel\Style\Border::BORDER_MEDIUM;
// $thisBorder['style'] = $borderStyleValue; // $thisBorder['style'] = $borderStyleValue;
break; break;
case 'Weight': case 'Weight':
@ -547,7 +559,7 @@ class Excel2003XML extends BaseReader implements IReader
foreach ($worksheet->Table->Column as $columnData) { foreach ($worksheet->Table->Column as $columnData) {
$columnData_ss = $columnData->attributes($namespaces['ss']); $columnData_ss = $columnData->attributes($namespaces['ss']);
if (isset($columnData_ss['Index'])) { if (isset($columnData_ss['Index'])) {
$columnID = PHPExcel_Cell::stringFromColumnIndex($columnData_ss['Index']-1); $columnID = \PHPExcel\Cell::stringFromColumnIndex($columnData_ss['Index']-1);
} }
if (isset($columnData_ss['Width'])) { if (isset($columnData_ss['Width'])) {
$columnWidth = $columnData_ss['Width']; $columnWidth = $columnData_ss['Width'];
@ -573,7 +585,7 @@ class Excel2003XML extends BaseReader implements IReader
foreach ($rowData->Cell as $cell) { foreach ($rowData->Cell as $cell) {
$cell_ss = $cell->attributes($namespaces['ss']); $cell_ss = $cell->attributes($namespaces['ss']);
if (isset($cell_ss['Index'])) { if (isset($cell_ss['Index'])) {
$columnID = PHPExcel_Cell::stringFromColumnIndex($cell_ss['Index']-1); $columnID = \PHPExcel\Cell::stringFromColumnIndex($cell_ss['Index']-1);
} }
$cellRange = $columnID.$rowID; $cellRange = $columnID.$rowID;
@ -587,7 +599,7 @@ class Excel2003XML extends BaseReader implements IReader
$columnTo = $columnID; $columnTo = $columnID;
if (isset($cell_ss['MergeAcross'])) { if (isset($cell_ss['MergeAcross'])) {
$additionalMergedCells += (int)$cell_ss['MergeAcross']; $additionalMergedCells += (int)$cell_ss['MergeAcross'];
$columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1); $columnTo = \PHPExcel\Cell::stringFromColumnIndex(\PHPExcel\Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1);
} }
$rowTo = $rowID; $rowTo = $rowID;
if (isset($cell_ss['MergeDown'])) { if (isset($cell_ss['MergeDown'])) {
@ -610,7 +622,7 @@ class Excel2003XML extends BaseReader implements IReader
} }
if (isset($cell->Data)) { if (isset($cell->Data)) {
$cellValue = $cellData = $cell->Data; $cellValue = $cellData = $cell->Data;
$type = PHPExcel_Cell_DataType::TYPE_NULL; $type = \PHPExcel\Cell_DataType::TYPE_NULL;
$cellData_ss = $cellData->attributes($namespaces['ss']); $cellData_ss = $cellData->attributes($namespaces['ss']);
if (isset($cellData_ss['Type'])) { if (isset($cellData_ss['Type'])) {
$cellDataType = $cellData_ss['Type']; $cellDataType = $cellData_ss['Type'];
@ -626,33 +638,33 @@ class Excel2003XML extends BaseReader implements IReader
*/ */
case 'String': case 'String':
$cellValue = self::convertStringEncoding($cellValue, $this->charSet); $cellValue = self::convertStringEncoding($cellValue, $this->charSet);
$type = PHPExcel_Cell_DataType::TYPE_STRING; $type = \PHPExcel\Cell\DataType::TYPE_STRING;
break; break;
case 'Number': case 'Number':
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC; $type = \PHPExcel\Cell\DataType::TYPE_NUMERIC;
$cellValue = (float) $cellValue; $cellValue = (float) $cellValue;
if (floor($cellValue) == $cellValue) { if (floor($cellValue) == $cellValue) {
$cellValue = (integer) $cellValue; $cellValue = (integer) $cellValue;
} }
break; break;
case 'Boolean': case 'Boolean':
$type = PHPExcel_Cell_DataType::TYPE_BOOL; $type = \PHPExcel\Cell\DataType::TYPE_BOOL;
$cellValue = ($cellValue != 0); $cellValue = ($cellValue != 0);
break; break;
case 'DateTime': case 'DateTime':
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC; $type = \PHPExcel\Cell\DataType::TYPE_NUMERIC;
$cellValue = PHPExcel_Shared_Date::PHPToExcel(strtotime($cellValue)); $cellValue = \PHPExcel\Shared\Date::PHPToExcel(strtotime($cellValue));
break; break;
case 'Error': case 'Error':
$type = PHPExcel_Cell_DataType::TYPE_ERROR; $type = \PHPExcel\Cell\DataType::TYPE_ERROR;
break; break;
} }
} }
if ($hasCalculatedValue) { if ($hasCalculatedValue) {
// echo 'FORMULA<br />'; // echo 'FORMULA<br />';
$type = PHPExcel_Cell_DataType::TYPE_FORMULA; $type = \PHPExcel\Cell\DataType::TYPE_FORMULA;
$columnNumber = PHPExcel_Cell::columnIndexFromString($columnID); $columnNumber = \PHPExcel\Cell::columnIndexFromString($columnID);
if (substr($cellDataFormula, 0, 3) == 'of:') { if (substr($cellDataFormula, 0, 3) == 'of:') {
$cellDataFormula = substr($cellDataFormula, 3); $cellDataFormula = substr($cellDataFormula, 3);
// echo 'Before: ', $cellDataFormula,'<br />'; // echo 'Before: ', $cellDataFormula,'<br />';
@ -698,7 +710,7 @@ class Excel2003XML extends BaseReader implements IReader
if ($columnReference{0} == '[') { if ($columnReference{0} == '[') {
$columnReference = $columnNumber + trim($columnReference, '[]'); $columnReference = $columnNumber + trim($columnReference, '[]');
} }
$A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference; $A1CellReference = \PHPExcel\Cell::stringFromColumnIndex($columnReference-1).$rowReference;
$value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));
} }
} }
@ -781,7 +793,7 @@ class Excel2003XML extends BaseReader implements IReader
protected static function convertStringEncoding($string, $charset) protected static function convertStringEncoding($string, $charset)
{ {
if ($charset != 'UTF-8') { if ($charset != 'UTF-8') {
return PHPExcel_Shared_String::ConvertEncoding($string, 'UTF-8', $charset); return \PHPExcel\Shared\String::ConvertEncoding($string, 'UTF-8', $charset);
} }
return $string; return $string;
} }
@ -789,7 +801,7 @@ class Excel2003XML extends BaseReader implements IReader
protected function parseRichText($is = '') protected function parseRichText($is = '')
{ {
$value = new PHPExcel_RichText(); $value = new \PHPExcel\RichText();
$value->createText(self::convertStringEncoding($is, $this->charSet)); $value->createText(self::convertStringEncoding($is, $this->charSet));

View File

@ -419,8 +419,8 @@ class Excel2007 extends BaseReader implements IReader
$cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');
$attributeType = $cellDataOfficeChildren->getName(); $attributeType = $cellDataOfficeChildren->getName();
$attributeValue = (string) $cellDataOfficeChildren->{$attributeType}; $attributeValue = (string) $cellDataOfficeChildren->{$attributeType};
$attributeValue = PHPExcel_DocumentProperties::convertProperty($attributeValue, $attributeType); $attributeValue = \PHPExcel\Document\Properties::convertProperty($attributeValue, $attributeType);
$attributeType = PHPExcel_DocumentProperties::convertPropertyType($attributeType); $attributeType = \PHPExcel\Document\Properties::convertPropertyType($attributeType);
$docProps->setCustomProperty($propertyName, $attributeValue, $attributeType); $docProps->setCustomProperty($propertyName, $attributeValue, $attributeType);
} }
} }

View File

@ -1,5 +1,7 @@
<?php <?php
namespace PHPExcel\Reader\Excel5;
/** /**
* PHPExcel_Reader_Excel5_RC4 * PHPExcel_Reader_Excel5_RC4
* *
@ -25,7 +27,7 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class PHPExcel_Reader_Excel5_RC4 class RC4
{ {
// Context // Context
protected $s = array(); protected $s = array();

View File

@ -383,26 +383,26 @@ class OOCalc extends BaseReader implements IReader
$docProps->setCreated($creationDate); $docProps->setCreated($creationDate);
break; break;
case 'user-defined': case 'user-defined':
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING; $propertyValueType = \PHPExcel\Document\Properties::PROPERTY_TYPE_STRING;
foreach ($propertyValueAttributes as $key => $value) { foreach ($propertyValueAttributes as $key => $value) {
if ($key == 'name') { if ($key == 'name') {
$propertyValueName = (string) $value; $propertyValueName = (string) $value;
} elseif ($key == 'value-type') { } elseif ($key == 'value-type') {
switch ($value) { switch ($value) {
case 'date': case 'date':
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'date'); $propertyValue = \PHPExcel\Document\Properties::convertProperty($propertyValue, 'date');
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE; $propertyValueType = \PHPExcel\Document\Properties::PROPERTY_TYPE_DATE;
break; break;
case 'boolean': case 'boolean':
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'bool'); $propertyValue = \PHPExcel\Document\Properties::convertProperty($propertyValue, 'bool');
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN; $propertyValueType = \PHPExcel\Document\Properties::PROPERTY_TYPE_BOOLEAN;
break; break;
case 'float': case 'float':
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'r4'); $propertyValue = \PHPExcel\Document\Properties::convertProperty($propertyValue, 'r4');
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT; $propertyValueType = \PHPExcel\Document\Properties::PROPERTY_TYPE_FLOAT;
break; break;
default: default:
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING; $propertyValueType = \PHPExcel\Document\Properties::PROPERTY_TYPE_STRING;
} }
} }
} }

View File

@ -31,8 +31,8 @@ class Settings
{ {
/** constants */ /** constants */
/** Available Zip library classes */ /** Available Zip library classes */
const PCLZIP = 'PHPExcel_Shared_ZipArchive'; const PCLZIP = '\\PHPExcel\\Shared\\ZipArchive';
const ZIPARCHIVE = 'ZipArchive'; const ZIPARCHIVE = '\\ZipArchive';
/** Optional Chart Rendering libraries */ /** Optional Chart Rendering libraries */
const CHART_RENDERER_JPGRAPH = 'jpgraph'; const CHART_RENDERER_JPGRAPH = 'jpgraph';
@ -108,7 +108,7 @@ class Settings
* Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive) * Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive)
* *
* @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive * e.g. \PHPExcel\Settings::PCLZip or \PHPExcel\Settings::ZipArchive
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setZipClass($zipClass) public static function setZipClass($zipClass)
@ -128,7 +128,7 @@ class Settings
* *
* @return string Name of the Zip handler Class that PHPExcel is configured to use * @return string Name of the Zip handler Class that PHPExcel is configured to use
* for Zip file management * for Zip file management
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive * e.g. \PHPExcel\Settings::PCLZip or \PHPExcel\Settings::ZipArchive
*/ */
public static function getZipClass() public static function getZipClass()
{ {
@ -143,7 +143,7 @@ class Settings
*/ */
public static function getCacheStorageMethod() public static function getCacheStorageMethod()
{ {
return PHPExcel_CachedObjectStorageFactory::getCacheStorageMethod(); return CachedObjectStorageFactory::getCacheStorageMethod();
} }
@ -154,7 +154,7 @@ class Settings
*/ */
public static function getCacheStorageClass() public static function getCacheStorageClass()
{ {
return PHPExcel_CachedObjectStorageFactory::getCacheStorageClass(); return CachedObjectStorageFactory::getCacheStorageClass();
} }
@ -165,9 +165,9 @@ class Settings
* @param array $arguments Optional configuration arguments for the cacheing method * @param array $arguments Optional configuration arguments for the cacheing method
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory, $arguments = array()) public static function setCacheStorageMethod($method = CachedObjectStorageFactory::cache_in_memory, $arguments = array())
{ {
return PHPExcel_CachedObjectStorageFactory::initialize($method, $arguments); return CachedObjectStorageFactory::initialize($method, $arguments);
} }
@ -179,7 +179,7 @@ class Settings
*/ */
public static function setLocale($locale = 'en_us') public static function setLocale($locale = 'en_us')
{ {
return PHPExcel_Calculation::getInstance()->setLocale($locale); return Calculation::getInstance()->setLocale($locale);
} }
@ -187,7 +187,7 @@ class Settings
* Set details of the external library that PHPExcel should use for rendering charts * Set details of the external library that PHPExcel should use for rendering charts
* *
* @param string $libraryName Internal reference name of the library * @param string $libraryName Internal reference name of the library
* e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH * e.g. \PHPExcel\Settings::CHART_RENDERER_JPGRAPH
* @param string $libraryBaseDir Directory path to the library's base folder * @param string $libraryBaseDir Directory path to the library's base folder
* *
* @return boolean Success or failure * @return boolean Success or failure
@ -205,7 +205,7 @@ class Settings
* Identify to PHPExcel the external library to use for rendering charts * Identify to PHPExcel the external library to use for rendering charts
* *
* @param string $libraryName Internal reference name of the library * @param string $libraryName Internal reference name of the library
* e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH * e.g. \PHPExcel\Settings::CHART_RENDERER_JPGRAPH
* *
* @return boolean Success or failure * @return boolean Success or failure
*/ */
@ -242,7 +242,7 @@ class Settings
* *
* @return string|NULL Internal reference name of the Chart Rendering Library that PHPExcel is * @return string|NULL Internal reference name of the Chart Rendering Library that PHPExcel is
* currently configured to use * currently configured to use
* e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH * e.g. \PHPExcel\Settings::CHART_RENDERER_JPGRAPH
*/ */
public static function getChartRendererName() public static function getChartRendererName()
{ {
@ -266,9 +266,9 @@ class Settings
* Set details of the external library that PHPExcel should use for rendering PDF files * Set details of the external library that PHPExcel should use for rendering PDF files
* *
* @param string $libraryName Internal reference name of the library * @param string $libraryName Internal reference name of the library
* e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, * e.g. \PHPExcel\Settings::PDF_RENDERER_TCPDF,
* PHPExcel_Settings::PDF_RENDERER_DOMPDF * \PHPExcel\Settings::PDF_RENDERER_DOMPDF
* or PHPExcel_Settings::PDF_RENDERER_MPDF * or \PHPExcel\Settings::PDF_RENDERER_MPDF
* @param string $libraryBaseDir Directory path to the library's base folder * @param string $libraryBaseDir Directory path to the library's base folder
* *
* @return boolean Success or failure * @return boolean Success or failure
@ -286,9 +286,9 @@ class Settings
* Identify to PHPExcel the external library to use for rendering PDF files * Identify to PHPExcel the external library to use for rendering PDF files
* *
* @param string $libraryName Internal reference name of the library * @param string $libraryName Internal reference name of the library
* e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, * e.g. \PHPExcel\Settings::PDF_RENDERER_TCPDF,
* PHPExcel_Settings::PDF_RENDERER_DOMPDF * \PHPExcel\Settings::PDF_RENDERER_DOMPDF
* or PHPExcel_Settings::PDF_RENDERER_MPDF * or \PHPExcel\Settings::PDF_RENDERER_MPDF
* *
* @return boolean Success or failure * @return boolean Success or failure
*/ */
@ -325,9 +325,9 @@ class Settings
* *
* @return string|NULL Internal reference name of the PDF Rendering Library that PHPExcel is * @return string|NULL Internal reference name of the PDF Rendering Library that PHPExcel is
* currently configured to use * currently configured to use
* e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, * e.g. \PHPExcel\Settings::PDF_RENDERER_TCPDF,
* PHPExcel_Settings::PDF_RENDERER_DOMPDF * \PHPExcel\Settings::PDF_RENDERER_DOMPDF
* or PHPExcel_Settings::PDF_RENDERER_MPDF * or \PHPExcel\Settings::PDF_RENDERER_MPDF
*/ */
public static function getPdfRendererName() public static function getPdfRendererName()
{ {

View File

@ -39,14 +39,14 @@ class Spreadsheet
/** /**
* Document properties * Document properties
* *
* @var DocumentProperties * @var Document\Properties
*/ */
private $properties; private $properties;
/** /**
* Document security * Document security
* *
* @var DocumentSecurity * @var Document\Security
*/ */
private $security; private $security;
@ -424,7 +424,7 @@ class Spreadsheet
/** /**
* Get properties * Get properties
* *
* @return DocumentProperties * @return Document\Properties
*/ */
public function getProperties() public function getProperties()
{ {
@ -434,9 +434,9 @@ class Spreadsheet
/** /**
* Set properties * Set properties
* *
* @param DocumentProperties $pValue * @param Document\Properties $pValue
*/ */
public function setProperties(DocumentProperties $pValue) public function setProperties(Document\Properties $pValue)
{ {
$this->properties = $pValue; $this->properties = $pValue;
} }
@ -444,7 +444,7 @@ class Spreadsheet
/** /**
* Get security * Get security
* *
* @return DocumentSecurity * @return Document\Security
*/ */
public function getSecurity() public function getSecurity()
{ {
@ -454,9 +454,9 @@ class Spreadsheet
/** /**
* Set security * Set security
* *
* @param DocumentSecurity $pValue * @param Document\Security $pValue
*/ */
public function setSecurity(DocumentSecurity $pValue) public function setSecurity(Document\Security $pValue)
{ {
$this->security = $pValue; $this->security = $pValue;
} }