Change Writer exceptions to PHPExcel_Writer_Exception

This commit is contained in:
Mark Baker 2012-10-31 22:00:40 +00:00
parent 4a76eeb5dd
commit 531803a919
31 changed files with 269 additions and 204 deletions

View File

@ -1033,7 +1033,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/** /**
* Set a cell value by using numeric cell coordinates * Set a cell value by using numeric cell coordinates
* *
* @param string $pColumn Numeric column coordinate of the cell * @param string $pColumn Numeric column coordinate of the cell (A = 0)
* @param string $pRow Numeric row coordinate of the cell * @param string $pRow Numeric row coordinate of the cell
* @param mixed $pValue Value of the cell * @param mixed $pValue Value of the cell
* @param bool $returnCell Return the worksheet (false, default) or the cell (true) * @param bool $returnCell Return the worksheet (false, default) or the cell (true)

View File

@ -103,7 +103,7 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFilename * @param string $pFilename
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null) {
// Fetch sheet // Fetch sheet
@ -117,7 +117,7 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
// Open file // Open file
$fileHandle = fopen($pFilename, 'wb+'); $fileHandle = fopen($pFilename, 'wb+');
if ($fileHandle === false) { if ($fileHandle === false) {
throw new Exception("Could not open file $pFilename for writing."); throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing.");
} }
if ($this->_excelCompatibility) { if ($this->_excelCompatibility) {
@ -278,7 +278,7 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
* *
* @param mixed $pFileHandle PHP filehandle * @param mixed $pFileHandle PHP filehandle
* @param array $pValues Array containing values in a row * @param array $pValues Array containing values in a row
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _writeLine($pFileHandle = null, $pValues = null) { private function _writeLine($pFileHandle = null, $pValues = null) {
if (is_array($pValues)) { if (is_array($pValues)) {
@ -313,7 +313,7 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
fwrite($pFileHandle, $line); fwrite($pFileHandle, $line);
} }
} else { } else {
throw new Exception("Invalid data row passed to CSV writer."); throw new PHPExcel_Writer_Exception("Invalid data row passed to CSV writer.");
} }
} }

View File

@ -191,7 +191,7 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFilename * @param string $pFilename
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = null) public function save($pFilename = null)
{ {
@ -245,7 +245,7 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
// Try opening the ZIP file // Try opening the ZIP file
if ($objZip->open($pFilename, $zipOverWrite) !== true) { if ($objZip->open($pFilename, $zipOverWrite) !== true) {
if ($objZip->open($pFilename, $zipCreate) !== true) { if ($objZip->open($pFilename, $zipCreate) !== true) {
throw new Exception("Could not open " . $pFilename . " for writing."); throw new PHPExcel_Writer_Exception("Could not open " . $pFilename . " for writing.");
} }
} }
@ -375,18 +375,18 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
// Close file // Close file
if ($objZip->close() === false) { if ($objZip->close() === false) {
throw new Exception("Could not close zip file $pFilename."); throw new PHPExcel_Writer_Exception("Could not close zip file $pFilename.");
} }
// If a temporary file was used, copy it to the correct file stream // If a temporary file was used, copy it to the correct file stream
if ($originalFilename != $pFilename) { if ($originalFilename != $pFilename) {
if (copy($pFilename, $originalFilename) === false) { if (copy($pFilename, $originalFilename) === false) {
throw new Exception("Could not copy temporary zip file $pFilename to $originalFilename."); throw new PHPExcel_Writer_Exception("Could not copy temporary zip file $pFilename to $originalFilename.");
} }
@unlink($pFilename); @unlink($pFilename);
} }
} else { } else {
throw new Exception("PHPExcel object unassigned."); throw new PHPExcel_Writer_Exception("PHPExcel object unassigned.");
} }
} }
@ -394,13 +394,13 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
* Get PHPExcel object * Get PHPExcel object
* *
* @return PHPExcel * @return PHPExcel
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function getPHPExcel() { public function getPHPExcel() {
if ($this->_spreadSheet !== null) { if ($this->_spreadSheet !== null) {
return $this->_spreadSheet; return $this->_spreadSheet;
} else { } else {
throw new Exception("No PHPExcel assigned."); throw new PHPExcel_Writer_Exception("No PHPExcel assigned.");
} }
} }
@ -408,7 +408,7 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
* Set PHPExcel object * Set PHPExcel object
* *
* @param PHPExcel $pPHPExcel PHPExcel object * @param PHPExcel $pPHPExcel PHPExcel object
* @throws Exception * @throws PHPExcel_Writer_Exception
* @return PHPExcel_Writer_Excel2007 * @return PHPExcel_Writer_Excel2007
*/ */
public function setPHPExcel(PHPExcel $pPHPExcel = null) { public function setPHPExcel(PHPExcel $pPHPExcel = null) {
@ -556,7 +556,7 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
* *
* @param boolean $pValue * @param boolean $pValue
* @param string $pDirectory Disk caching directory * @param string $pDirectory Disk caching directory
* @throws Exception Exception when directory does not exist * @throws PHPExcel_Writer_Exception Exception when directory does not exist
* @return PHPExcel_Writer_Excel2007 * @return PHPExcel_Writer_Excel2007
*/ */
public function setUseDiskCaching($pValue = false, $pDirectory = null) { public function setUseDiskCaching($pValue = false, $pDirectory = null) {
@ -566,7 +566,7 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
if (is_dir($pDirectory)) { if (is_dir($pDirectory)) {
$this->_diskCachingDirectory = $pDirectory; $this->_diskCachingDirectory = $pDirectory;
} else { } else {
throw new Exception("Directory does not exist: $pDirectory"); throw new PHPExcel_Writer_Exception("Directory does not exist: $pDirectory");
} }
} }
return $this; return $this;

View File

@ -40,7 +40,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart $pChart * @param PHPExcel_Chart $pChart
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeChart(PHPExcel_Chart $pChart = null) public function writeChart(PHPExcel_Chart $pChart = null)
{ {
@ -120,7 +120,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart_Title $title * @param PHPExcel_Chart_Title $title
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeTitle(PHPExcel_Chart_Title $title = null, $objWriter) private function _writeTitle(PHPExcel_Chart_Title $title = null, $objWriter)
{ {
@ -164,7 +164,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart_Legend $legend * @param PHPExcel_Chart_Legend $legend
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter) private function _writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter)
{ {
@ -217,7 +217,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* @param PHPExcel_Chart_Title $xAxisLabel * @param PHPExcel_Chart_Title $xAxisLabel
* @param PHPExcel_Chart_Title $yAxisLabel * @param PHPExcel_Chart_Title $yAxisLabel
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePlotArea(PHPExcel_Chart_PlotArea $plotArea, private function _writePlotArea(PHPExcel_Chart_PlotArea $plotArea,
PHPExcel_Chart_Title $xAxisLabel = NULL, PHPExcel_Chart_Title $xAxisLabel = NULL,
@ -355,7 +355,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Chart_Layout $chartLayout Chart layout * @param PHPExcel_Chart_Layout $chartLayout Chart layout
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDataLbls($objWriter, $chartLayout) private function _writeDataLbls($objWriter, $chartLayout)
{ {
@ -410,7 +410,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* @param string $id1 * @param string $id1
* @param string $id2 * @param string $id2
* @param boolean $isMultiLevelSeries * @param boolean $isMultiLevelSeries
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeCatAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries) private function _writeCatAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries)
{ {
@ -533,7 +533,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* @param string $id1 * @param string $id1
* @param string $id2 * @param string $id2
* @param boolean $isMultiLevelSeries * @param boolean $isMultiLevelSeries
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeValAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries) private function _writeValAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries)
{ {
@ -649,7 +649,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart_PlotArea $plotArea * @param PHPExcel_Chart_PlotArea $plotArea
* @return string|array * @return string|array
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private static function _getChartType($plotArea) private static function _getChartType($plotArea)
{ {
@ -664,7 +664,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
} }
$chartType = array_unique($chartTypes); $chartType = array_unique($chartTypes);
if (count($chartTypes) == 0) { if (count($chartTypes) == 0) {
throw new Exception('Chart is not yet implemented'); throw new PHPExcel_Reader_Exception('Chart is not yet implemented');
} }
} }
@ -681,7 +681,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* @param boolean &$valIsMultiLevelSeries Is value set a multi-series set * @param boolean &$valIsMultiLevelSeries Is value set a multi-series set
* @param string &$plotGroupingType Type of grouping for multi-series values * @param string &$plotGroupingType Type of grouping for multi-series values
* @param PHPExcel_Worksheet $pSheet * @param PHPExcel_Worksheet $pSheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePlotGroup( $plotGroup, private function _writePlotGroup( $plotGroup,
$groupType, $groupType,
@ -872,7 +872,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart_DataSeriesValues $plotSeriesLabel * @param PHPExcel_Chart_DataSeriesValues $plotSeriesLabel
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePlotSeriesLabel($plotSeriesLabel, $objWriter) private function _writePlotSeriesLabel($plotSeriesLabel, $objWriter)
{ {
@ -910,7 +910,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* @param string $groupType Type of plot for dataseries * @param string $groupType Type of plot for dataseries
* @param string $dataType Datatype of series values * @param string $dataType Datatype of series values
* @param PHPExcel_Worksheet $pSheet * @param PHPExcel_Worksheet $pSheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePlotSeriesValues( $plotSeriesValues, private function _writePlotSeriesValues( $plotSeriesValues,
$objWriter, $objWriter,
@ -1010,7 +1010,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeBubbles($plotSeriesValues, $objWriter, PHPExcel_Worksheet $pSheet) private function _writeBubbles($plotSeriesValues, $objWriter, PHPExcel_Worksheet $pSheet)
{ {
@ -1056,7 +1056,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Chart_Layout $layout * @param PHPExcel_Chart_Layout $layout
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeLayout(PHPExcel_Chart_Layout $layout = NULL, $objWriter) private function _writeLayout(PHPExcel_Chart_Layout $layout = NULL, $objWriter)
{ {
@ -1124,7 +1124,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* Write Alternate Content block * Write Alternate Content block
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeAlternateContent($objWriter) private function _writeAlternateContent($objWriter)
{ {
@ -1153,7 +1153,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
* Write Printer Settings * Write Printer Settings
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePrintSettings($objWriter) private function _writePrintSettings($objWriter)
{ {

View File

@ -40,7 +40,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Worksheet $pWorksheet * @param PHPExcel_Worksheet $pWorksheet
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeComments(PHPExcel_Worksheet $pWorksheet = null) public function writeComments(PHPExcel_Worksheet $pWorksheet = null)
{ {
@ -98,7 +98,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
* @param string $pCellReference Cell reference * @param string $pCellReference Cell reference
* @param PHPExcel_Comment $pComment Comment * @param PHPExcel_Comment $pComment Comment
* @param array $pAuthors Array of authors * @param array $pAuthors Array of authors
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function _writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null) public function _writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null)
{ {
@ -120,7 +120,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Worksheet $pWorksheet * @param PHPExcel_Worksheet $pWorksheet
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeVMLComments(PHPExcel_Worksheet $pWorksheet = null) public function writeVMLComments(PHPExcel_Worksheet $pWorksheet = null)
{ {
@ -193,7 +193,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string $pCellReference Cell reference * @param string $pCellReference Cell reference
* @param PHPExcel_Comment $pComment Comment * @param PHPExcel_Comment $pComment Comment
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function _writeVMLComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null) public function _writeVMLComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null)
{ {

View File

@ -41,7 +41,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @param boolean $includeCharts Flag indicating if we should include drawing details for charts * @param boolean $includeCharts Flag indicating if we should include drawing details for charts
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeContentTypes(PHPExcel $pPHPExcel = null, $includeCharts = FALSE) public function writeContentTypes(PHPExcel $pPHPExcel = null, $includeCharts = FALSE)
{ {
@ -205,7 +205,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
* *
* @param string $pFile Filename * @param string $pFile Filename
* @return string Mime Type * @return string Mime Type
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _getImageMimeType($pFile = '') private function _getImageMimeType($pFile = '')
{ {
@ -213,7 +213,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
$image = getimagesize($pFile); $image = getimagesize($pFile);
return image_type_to_mime_type($image[2]); return image_type_to_mime_type($image[2]);
} else { } else {
throw new Exception("File $pFile does not exist"); throw new PHPExcel_Writer_Exception("File $pFile does not exist");
} }
} }
@ -223,7 +223,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string $pPartname Part name * @param string $pPartname Part name
* @param string $pContentType Content type * @param string $pContentType Content type
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _writeDefaultContentType(PHPExcel_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '') private function _writeDefaultContentType(PHPExcel_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '')
{ {
@ -234,7 +234,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
$objWriter->writeAttribute('ContentType', $pContentType); $objWriter->writeAttribute('ContentType', $pContentType);
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Writer_Exception("Invalid parameters passed.");
} }
} }
@ -244,7 +244,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string $pPartname Part name * @param string $pPartname Part name
* @param string $pContentType Content type * @param string $pContentType Content type
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _writeOverrideContentType(PHPExcel_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '') private function _writeOverrideContentType(PHPExcel_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '')
{ {
@ -255,7 +255,7 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
$objWriter->writeAttribute('ContentType', $pContentType); $objWriter->writeAttribute('ContentType', $pContentType);
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Writer_Exception("Invalid parameters passed.");
} }
} }
} }

View File

@ -40,7 +40,7 @@ class PHPExcel_Writer_Excel2007_DocProps extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeDocPropsApp(PHPExcel $pPHPExcel = null) public function writeDocPropsApp(PHPExcel $pPHPExcel = null)
{ {
@ -137,7 +137,7 @@ class PHPExcel_Writer_Excel2007_DocProps extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeDocPropsCore(PHPExcel $pPHPExcel = null) public function writeDocPropsCore(PHPExcel $pPHPExcel = null)
{ {
@ -204,7 +204,7 @@ class PHPExcel_Writer_Excel2007_DocProps extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeDocPropsCustom(PHPExcel $pPHPExcel = null) public function writeDocPropsCustom(PHPExcel $pPHPExcel = null)
{ {

View File

@ -42,7 +42,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
* @param int &$chartRef Chart ID * @param int &$chartRef Chart ID
* @param boolean $includeCharts Flag indicating if we should include drawing details for charts * @param boolean $includeCharts Flag indicating if we should include drawing details for charts
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE) public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE)
{ {
@ -95,7 +95,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Chart $pChart * @param PHPExcel_Chart $pChart
* @param int $pRelationId * @param int $pRelationId
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function _writeChart(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Chart $pChart = null, $pRelationId = -1) public function _writeChart(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Chart $pChart = null, $pRelationId = -1)
{ {
@ -167,7 +167,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet_BaseDrawing $pDrawing * @param PHPExcel_Worksheet_BaseDrawing $pDrawing
* @param int $pRelationId * @param int $pRelationId
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function _writeDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet_BaseDrawing $pDrawing = null, $pRelationId = -1) public function _writeDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet_BaseDrawing $pDrawing = null, $pRelationId = -1)
{ {
@ -375,7 +375,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Writer_Exception("Invalid parameters passed.");
} }
} }
@ -384,7 +384,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
* *
* @param PHPExcel_Worksheet $pWorksheet * @param PHPExcel_Worksheet $pWorksheet
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeVMLHeaderFooterImages(PHPExcel_Worksheet $pWorksheet = null) public function writeVMLHeaderFooterImages(PHPExcel_Worksheet $pWorksheet = null)
{ {
@ -532,7 +532,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string $pReference Reference * @param string $pReference Reference
* @param PHPExcel_Worksheet_HeaderFooterDrawing $pImage Image * @param PHPExcel_Worksheet_HeaderFooterDrawing $pImage Image
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function _writeVMLHeaderFooterImage(PHPExcel_Shared_XMLWriter $objWriter = null, $pReference = '', PHPExcel_Worksheet_HeaderFooterDrawing $pImage = null) public function _writeVMLHeaderFooterImage(PHPExcel_Shared_XMLWriter $objWriter = null, $pReference = '', PHPExcel_Worksheet_HeaderFooterDrawing $pImage = null)
{ {
@ -574,7 +574,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Worksheet_Drawing[] All drawings in PHPExcel * @return PHPExcel_Worksheet_Drawing[] All drawings in PHPExcel
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function allDrawings(PHPExcel $pPHPExcel = null) public function allDrawings(PHPExcel $pPHPExcel = null)
{ {

View File

@ -40,7 +40,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeRelationships(PHPExcel $pPHPExcel = null) public function writeRelationships(PHPExcel $pPHPExcel = null)
{ {
@ -106,7 +106,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeWorkbookRelationships(PHPExcel $pPHPExcel = null) public function writeWorkbookRelationships(PHPExcel $pPHPExcel = null)
{ {
@ -177,7 +177,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
* @param int $pWorksheetId * @param int $pWorksheetId
* @param boolean $includeCharts Flag indicating if we should write charts * @param boolean $includeCharts Flag indicating if we should write charts
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeWorksheetRelationships(PHPExcel_Worksheet $pWorksheet = null, $pWorksheetId = 1, $includeCharts = FALSE) public function writeWorksheetRelationships(PHPExcel_Worksheet $pWorksheet = null, $pWorksheetId = 1, $includeCharts = FALSE)
{ {
@ -286,7 +286,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
* @param int &$chartRef Chart ID * @param int &$chartRef Chart ID
* @param boolean $includeCharts Flag indicating if we should write charts * @param boolean $includeCharts Flag indicating if we should write charts
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE) public function writeDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE)
{ {
@ -350,7 +350,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
* *
* @param PHPExcel_Worksheet $pWorksheet * @param PHPExcel_Worksheet $pWorksheet
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeHeaderFooterDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null) public function writeHeaderFooterDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null)
{ {
@ -394,7 +394,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
* @param string $pType Relationship type * @param string $pType Relationship type
* @param string $pTarget Relationship target * @param string $pTarget Relationship target
* @param string $pTargetMode Relationship target mode * @param string $pTargetMode Relationship target mode
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeRelationship(PHPExcel_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '') private function _writeRelationship(PHPExcel_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '')
{ {
@ -411,7 +411,7 @@ class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPar
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Reader_Exception("Invalid parameters passed.");
} }
} }
} }

View File

@ -41,7 +41,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @param string[] $pExistingTable Existing table to eventually merge with * @param string[] $pExistingTable Existing table to eventually merge with
* @return string[] String table for worksheet * @return string[] String table for worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function createStringTable($pSheet = null, $pExistingTable = null) public function createStringTable($pSheet = null, $pExistingTable = null)
{ {
@ -81,7 +81,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
// Return // Return
return $aStringTable; return $aStringTable;
} else { } else {
throw new Exception("Invalid PHPExcel_Worksheet object passed."); throw new PHPExcel_Reader_Exception("Invalid PHPExcel_Worksheet object passed.");
} }
} }
@ -90,7 +90,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
* *
* @param string[] $pStringTable * @param string[] $pStringTable
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeStringTable($pStringTable = null) public function writeStringTable($pStringTable = null)
{ {
@ -135,7 +135,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
// Return // Return
return $objWriter->getData(); return $objWriter->getData();
} else { } else {
throw new Exception("Invalid string table array passed."); throw new PHPExcel_Reader_Exception("Invalid string table array passed.");
} }
} }
@ -145,7 +145,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_RichText $pRichText Rich text * @param PHPExcel_RichText $pRichText Rich text
* @param string $prefix Optional Namespace prefix * @param string $prefix Optional Namespace prefix
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeRichText(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_RichText $pRichText = null, $prefix=NULL) public function writeRichText(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_RichText $pRichText = null, $prefix=NULL)
{ {
@ -227,7 +227,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string|PHPExcel_RichText $pRichText text string or Rich text * @param string|PHPExcel_RichText $pRichText text string or Rich text
* @param string $prefix Optional Namespace prefix * @param string $prefix Optional Namespace prefix
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeRichTextForCharts(PHPExcel_Shared_XMLWriter $objWriter = null, $pRichText = null, $prefix=NULL) public function writeRichTextForCharts(PHPExcel_Shared_XMLWriter $objWriter = null, $pRichText = null, $prefix=NULL)
{ {

View File

@ -40,7 +40,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeStyles(PHPExcel $pPHPExcel = null) public function writeStyles(PHPExcel $pPHPExcel = null)
{ {
@ -170,7 +170,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style_Fill $pFill Fill style * @param PHPExcel_Style_Fill $pFill Fill style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) private function _writeFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null)
{ {
@ -190,7 +190,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style_Fill $pFill Fill style * @param PHPExcel_Style_Fill $pFill Fill style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeGradientFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) private function _writeGradientFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null)
{ {
@ -234,7 +234,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style_Fill $pFill Fill style * @param PHPExcel_Style_Fill $pFill Fill style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePatternFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) private function _writePatternFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null)
{ {
@ -272,7 +272,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style_Font $pFont Font style * @param PHPExcel_Style_Font $pFont Font style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeFont(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Font $pFont = null) private function _writeFont(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Font $pFont = null)
{ {
@ -352,7 +352,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style_Borders $pBorders Borders style * @param PHPExcel_Style_Borders $pBorders Borders style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeBorder(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Borders $pBorders = null) private function _writeBorder(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Borders $pBorders = null)
{ {
@ -389,7 +389,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style $pStyle Style * @param PHPExcel_Style $pStyle Style
* @param PHPExcel $pPHPExcel Workbook * @param PHPExcel $pPHPExcel Workbook
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeCellStyleXf(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style $pStyle = null, PHPExcel $pPHPExcel = null) private function _writeCellStyleXf(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style $pStyle = null, PHPExcel $pPHPExcel = null)
{ {
@ -458,7 +458,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style $pStyle Style * @param PHPExcel_Style $pStyle Style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeCellStyleDxf(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style $pStyle = null) private function _writeCellStyleDxf(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style $pStyle = null)
{ {
@ -524,7 +524,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param string $pName Element name * @param string $pName Element name
* @param PHPExcel_Style_Border $pBorder Border style * @param PHPExcel_Style_Border $pBorder Border style
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeBorderPr(PHPExcel_Shared_XMLWriter $objWriter = null, $pName = 'left', PHPExcel_Style_Border $pBorder = null) private function _writeBorderPr(PHPExcel_Shared_XMLWriter $objWriter = null, $pName = 'left', PHPExcel_Style_Border $pBorder = null)
{ {
@ -548,7 +548,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Style_NumberFormat $pNumberFormat Number Format * @param PHPExcel_Style_NumberFormat $pNumberFormat Number Format
* @param int $pId Number Format identifier * @param int $pId Number Format identifier
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeNumFmt(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_NumberFormat $pNumberFormat = null, $pId = 0) private function _writeNumFmt(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_NumberFormat $pNumberFormat = null, $pId = 0)
{ {
@ -569,7 +569,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Style[] All styles in PHPExcel * @return PHPExcel_Style[] All styles in PHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function allStyles(PHPExcel $pPHPExcel = null) public function allStyles(PHPExcel $pPHPExcel = null)
{ {
@ -583,7 +583,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Style_Conditional[] All conditional styles in PHPExcel * @return PHPExcel_Style_Conditional[] All conditional styles in PHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function allConditionalStyles(PHPExcel $pPHPExcel = null) public function allConditionalStyles(PHPExcel $pPHPExcel = null)
{ {
@ -607,7 +607,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Style_Fill[] All fills in PHPExcel * @return PHPExcel_Style_Fill[] All fills in PHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function allFills(PHPExcel $pPHPExcel = null) public function allFills(PHPExcel $pPHPExcel = null)
{ {
@ -638,7 +638,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Style_Font[] All fonts in PHPExcel * @return PHPExcel_Style_Font[] All fonts in PHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function allFonts(PHPExcel $pPHPExcel = null) public function allFonts(PHPExcel $pPHPExcel = null)
{ {
@ -660,7 +660,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Style_Borders[] All borders in PHPExcel * @return PHPExcel_Style_Borders[] All borders in PHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function allBorders(PHPExcel $pPHPExcel = null) public function allBorders(PHPExcel $pPHPExcel = null)
{ {
@ -682,7 +682,7 @@ class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return PHPExcel_Style_NumberFormat[] All number formats in PHPExcel * @return PHPExcel_Style_NumberFormat[] All number formats in PHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function allNumberFormats(PHPExcel $pPHPExcel = null) public function allNumberFormats(PHPExcel $pPHPExcel = null)
{ {

View File

@ -134,7 +134,7 @@ class PHPExcel_Writer_Excel2007_Theme extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function writeTheme(PHPExcel $pPHPExcel = null) public function writeTheme(PHPExcel $pPHPExcel = null)
{ {
@ -820,7 +820,7 @@ class PHPExcel_Writer_Excel2007_Theme extends PHPExcel_Writer_Excel2007_WriterPa
* @param string $latinFont * @param string $latinFont
* @param array of string $fontSet * @param array of string $fontSet
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _writeFonts($objWriter, $latinFont, $fontSet) private function _writeFonts($objWriter, $latinFont, $fontSet)
{ {
@ -853,7 +853,7 @@ class PHPExcel_Writer_Excel2007_Theme extends PHPExcel_Writer_Excel2007_WriterPa
* *
* @param PHPExcel_Shared_XMLWriter $objWriter * @param PHPExcel_Shared_XMLWriter $objWriter
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _writeColourScheme($objWriter) private function _writeColourScheme($objWriter)
{ {

View File

@ -41,7 +41,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing * @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeWorkbook(PHPExcel $pPHPExcel = null, $recalcRequired = FALSE) public function writeWorkbook(PHPExcel $pPHPExcel = null, $recalcRequired = FALSE)
{ {
@ -95,7 +95,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* Write file version * Write file version
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeFileVersion(PHPExcel_Shared_XMLWriter $objWriter = null) private function _writeFileVersion(PHPExcel_Shared_XMLWriter $objWriter = null)
{ {
@ -111,7 +111,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* Write WorkbookPr * Write WorkbookPr
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeWorkbookPr(PHPExcel_Shared_XMLWriter $objWriter = null) private function _writeWorkbookPr(PHPExcel_Shared_XMLWriter $objWriter = null)
{ {
@ -131,7 +131,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeBookViews(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) private function _writeBookViews(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null)
{ {
@ -161,7 +161,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeWorkbookProtection(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) private function _writeWorkbookProtection(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null)
{ {
@ -188,7 +188,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing * @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeCalcPr(PHPExcel_Shared_XMLWriter $objWriter = null, $recalcRequired = TRUE) private function _writeCalcPr(PHPExcel_Shared_XMLWriter $objWriter = null, $recalcRequired = TRUE)
{ {
@ -207,7 +207,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheets(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) private function _writeSheets(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null)
{ {
@ -236,7 +236,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* @param int $pSheetId Sheet id * @param int $pSheetId Sheet id
* @param int $pRelId Relationship ID * @param int $pRelId Relationship ID
* @param string $sheetState Sheet state (visible, hidden, veryHidden) * @param string $sheetState Sheet state (visible, hidden, veryHidden)
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheet(PHPExcel_Shared_XMLWriter $objWriter = null, $pSheetname = '', $pSheetId = 1, $pRelId = 1, $sheetState = 'visible') private function _writeSheet(PHPExcel_Shared_XMLWriter $objWriter = null, $pSheetname = '', $pSheetId = 1, $pRelId = 1, $sheetState = 'visible')
{ {
@ -251,7 +251,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
$objWriter->writeAttribute('r:id', 'rId' . $pRelId); $objWriter->writeAttribute('r:id', 'rId' . $pRelId);
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Reader_Exception("Invalid parameters passed.");
} }
} }
@ -260,7 +260,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDefinedNames(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) private function _writeDefinedNames(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null)
{ {
@ -294,7 +294,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel $pPHPExcel * @param PHPExcel $pPHPExcel
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeNamedRanges(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel) private function _writeNamedRanges(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel)
{ {
@ -310,7 +310,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_NamedRange $pNamedRange * @param PHPExcel_NamedRange $pNamedRange
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDefinedNameForNamedRange(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_NamedRange $pNamedRange) private function _writeDefinedNameForNamedRange(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_NamedRange $pNamedRange)
{ {
@ -342,7 +342,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet * @param PHPExcel_Worksheet $pSheet
* @param int $pSheetId * @param int $pSheetId
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDefinedNameForAutofilter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0) private function _writeDefinedNameForAutofilter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0)
{ {
@ -378,7 +378,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet * @param PHPExcel_Worksheet $pSheet
* @param int $pSheetId * @param int $pSheetId
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDefinedNameForPrintTitles(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0) private function _writeDefinedNameForPrintTitles(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0)
{ {
@ -421,7 +421,7 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet * @param PHPExcel_Worksheet $pSheet
* @param int $pSheetId * @param int $pSheetId
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDefinedNameForPrintArea(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0) private function _writeDefinedNameForPrintArea(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0)
{ {

View File

@ -42,7 +42,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* @param string[] $pStringTable * @param string[] $pStringTable
* @param boolean $includeCharts Flag indicating if we should write charts * @param boolean $includeCharts Flag indicating if we should write charts
* @return string XML Output * @return string XML Output
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function writeWorksheet($pSheet = null, $pStringTable = null, $includeCharts = FALSE) public function writeWorksheet($pSheet = null, $pStringTable = null, $includeCharts = FALSE)
{ {
@ -132,7 +132,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
// Return // Return
return $objWriter->getData(); return $objWriter->getData();
} else { } else {
throw new Exception("Invalid PHPExcel_Worksheet object passed."); throw new PHPExcel_Reader_Exception("Invalid PHPExcel_Worksheet object passed.");
} }
} }
@ -141,7 +141,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheetPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeSheetPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -182,7 +182,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDimension(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeDimension(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -197,7 +197,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheetViews(PHPExcel_Shared_XMLWriter $objWriter = NULL, PHPExcel_Worksheet $pSheet = NULL) private function _writeSheetViews(PHPExcel_Shared_XMLWriter $objWriter = NULL, PHPExcel_Worksheet $pSheet = NULL)
{ {
@ -304,7 +304,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheetFormatPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeSheetFormatPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -356,7 +356,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeCols(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeCols(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -421,7 +421,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheetProtection(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeSheetProtection(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -456,7 +456,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeConditionalFormatting(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeConditionalFormatting(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -531,7 +531,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDataValidations(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeDataValidations(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -597,7 +597,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeHyperlinks(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeHyperlinks(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -638,7 +638,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeProtectedRanges(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeProtectedRanges(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -667,7 +667,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeMergeCells(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeMergeCells(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -692,7 +692,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePrintOptions(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writePrintOptions(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -718,7 +718,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePageMargins(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writePageMargins(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -738,7 +738,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeAutoFilter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeAutoFilter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -830,7 +830,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writePageSetup(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writePageSetup(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -865,7 +865,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeHeaderFooter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeHeaderFooter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -890,7 +890,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeBreaks(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeBreaks(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -948,7 +948,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @param string[] $pStringTable String table * @param string[] $pStringTable String table
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeSheetData(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pStringTable = null) private function _writeSheetData(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pStringTable = null)
{ {
@ -1033,7 +1033,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Reader_Exception("Invalid parameters passed.");
} }
} }
@ -1045,7 +1045,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* @param PHPExcel_Cell $pCellAddress Cell Address * @param PHPExcel_Cell $pCellAddress Cell Address
* @param string[] $pStringTable String table * @param string[] $pStringTable String table
* @param string[] $pFlippedStringTable String table (flipped), for faster index searching * @param string[] $pFlippedStringTable String table (flipped), for faster index searching
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeCell(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pCellAddress = null, $pStringTable = null, $pFlippedStringTable = null) private function _writeCell(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pCellAddress = null, $pStringTable = null, $pFlippedStringTable = null)
{ {
@ -1157,7 +1157,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
$objWriter->endElement(); $objWriter->endElement();
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Reader_Exception("Invalid parameters passed.");
} }
} }
@ -1167,7 +1167,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @param boolean $includeCharts Flag indicating if we should include drawing details for charts * @param boolean $includeCharts Flag indicating if we should include drawing details for charts
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeDrawings(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $includeCharts = FALSE) private function _writeDrawings(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $includeCharts = FALSE)
{ {
@ -1186,7 +1186,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeLegacyDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeLegacyDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {
@ -1203,7 +1203,7 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
* *
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @param PHPExcel_Worksheet $pSheet Worksheet * @param PHPExcel_Worksheet $pSheet Worksheet
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
private function _writeLegacyDrawingHF(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) private function _writeLegacyDrawingHF(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null)
{ {

View File

@ -46,7 +46,7 @@ abstract class PHPExcel_Writer_Excel2007_WriterPart
* Set parent IWriter object * Set parent IWriter object
* *
* @param PHPExcel_Writer_IWriter $pWriter * @param PHPExcel_Writer_IWriter $pWriter
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function setParentWriter(PHPExcel_Writer_IWriter $pWriter = null) { public function setParentWriter(PHPExcel_Writer_IWriter $pWriter = null) {
$this->_parentWriter = $pWriter; $this->_parentWriter = $pWriter;
@ -56,13 +56,13 @@ abstract class PHPExcel_Writer_Excel2007_WriterPart
* Get parent IWriter object * Get parent IWriter object
* *
* @return PHPExcel_Writer_IWriter * @return PHPExcel_Writer_IWriter
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function getParentWriter() { public function getParentWriter() {
if (!is_null($this->_parentWriter)) { if (!is_null($this->_parentWriter)) {
return $this->_parentWriter; return $this->_parentWriter;
} else { } else {
throw new Exception("No parent PHPExcel_Writer_IWriter assigned."); throw new PHPExcel_Reader_Exception("No parent PHPExcel_Writer_IWriter assigned.");
} }
} }
@ -70,7 +70,7 @@ abstract class PHPExcel_Writer_Excel2007_WriterPart
* Set parent IWriter object * Set parent IWriter object
* *
* @param PHPExcel_Writer_IWriter $pWriter * @param PHPExcel_Writer_IWriter $pWriter
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function __construct(PHPExcel_Writer_IWriter $pWriter = null) { public function __construct(PHPExcel_Writer_IWriter $pWriter = null) {
if (!is_null($pWriter)) { if (!is_null($pWriter)) {

View File

@ -120,7 +120,7 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFilename * @param string $pFilename
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null) {
@ -241,7 +241,7 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter
* *
* @deprecated * @deprecated
* @param string $pValue Temporary storage directory * @param string $pValue Temporary storage directory
* @throws Exception Exception when directory does not exist * @throws PHPExcel_Writer_Exception Exception when directory does not exist
* @return PHPExcel_Writer_Excel5 * @return PHPExcel_Writer_Excel5
*/ */
public function setTempDir($pValue = '') { public function setTempDir($pValue = '') {

View File

@ -122,7 +122,7 @@ class PHPExcel_Writer_Excel5_BIFFwriter
$byte_order = 1; // Big Endian $byte_order = 1; // Big Endian
} else { } else {
// Give up. I'll fix this in a later version. // Give up. I'll fix this in a later version.
throw new Exception("Required floating point format not supported on this platform."); throw new PHPExcel_Reader_Exception("Required floating point format not supported on this platform.");
} }
self::$_byte_order = $byte_order; self::$_byte_order = $byte_order;
} }

View File

@ -564,7 +564,7 @@ class PHPExcel_Writer_Excel5_Parser
} }
// TODO: use real error codes // TODO: use real error codes
throw new Exception("Unknown token $token"); throw new PHPExcel_Reader_Exception("Unknown token $token");
} }
/** /**
@ -598,7 +598,7 @@ class PHPExcel_Writer_Excel5_Parser
// chop away beggining and ending quotes // chop away beggining and ending quotes
$string = substr($string, 1, strlen($string) - 2); $string = substr($string, 1, strlen($string) - 2);
if (strlen($string) > 255) { if (strlen($string) > 255) {
throw new Exception("String is too long"); throw new PHPExcel_Reader_Exception("String is too long");
} }
return pack('C', $this->ptg['ptgStr']) . PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($string); return pack('C', $this->ptg['ptgStr']) . PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($string);
@ -644,7 +644,7 @@ class PHPExcel_Writer_Excel5_Parser
list($cell1, $cell2) = explode(':', $range); list($cell1, $cell2) = explode(':', $range);
} else { } else {
// TODO: use real error codes // TODO: use real error codes
throw new Exception("Unknown range separator"); throw new PHPExcel_Reader_Exception("Unknown range separator");
} }
// Convert the cell references // Convert the cell references
@ -660,7 +660,7 @@ class PHPExcel_Writer_Excel5_Parser
$ptgArea = pack("C", $this->ptg['ptgAreaA']); $ptgArea = pack("C", $this->ptg['ptgAreaA']);
} else { } else {
// TODO: use real error codes // TODO: use real error codes
throw new Exception("Unknown class $class"); throw new PHPExcel_Reader_Exception("Unknown class $class");
} }
return $ptgArea . $row1 . $row2 . $col1. $col2; return $ptgArea . $row1 . $row2 . $col1. $col2;
} }
@ -702,7 +702,7 @@ class PHPExcel_Writer_Excel5_Parser
// } elseif ($class == 2) { // } elseif ($class == 2) {
// $ptgArea = pack("C", $this->ptg['ptgArea3dA']); // $ptgArea = pack("C", $this->ptg['ptgArea3dA']);
// } else { // } else {
// throw new Exception("Unknown class $class"); // throw new PHPExcel_Reader_Exception("Unknown class $class");
// } // }
return $ptgArea . $ext_ref . $row1 . $row2 . $col1. $col2; return $ptgArea . $ext_ref . $row1 . $row2 . $col1. $col2;
@ -732,7 +732,7 @@ class PHPExcel_Writer_Excel5_Parser
$ptgRef = pack("C", $this->ptg['ptgRefA']); $ptgRef = pack("C", $this->ptg['ptgRefA']);
// } else { // } else {
// // TODO: use real error codes // // TODO: use real error codes
// throw new Exception("Unknown class $class"); // throw new PHPExcel_Reader_Exception("Unknown class $class");
// } // }
return $ptgRef.$row.$col; return $ptgRef.$row.$col;
} }
@ -766,7 +766,7 @@ class PHPExcel_Writer_Excel5_Parser
// } elseif ($class == 2) { // } elseif ($class == 2) {
$ptgRef = pack("C", $this->ptg['ptgRef3dA']); $ptgRef = pack("C", $this->ptg['ptgRef3dA']);
// } else { // } else {
// throw new Exception("Unknown class $class"); // throw new PHPExcel_Reader_Exception("Unknown class $class");
// } // }
return $ptgRef . $ext_ref. $row . $col; return $ptgRef . $ext_ref. $row . $col;
@ -812,11 +812,11 @@ class PHPExcel_Writer_Excel5_Parser
$sheet1 = $this->_getSheetIndex($sheet_name1); $sheet1 = $this->_getSheetIndex($sheet_name1);
if ($sheet1 == -1) { if ($sheet1 == -1) {
throw new Exception("Unknown sheet name $sheet_name1 in formula"); throw new PHPExcel_Reader_Exception("Unknown sheet name $sheet_name1 in formula");
} }
$sheet2 = $this->_getSheetIndex($sheet_name2); $sheet2 = $this->_getSheetIndex($sheet_name2);
if ($sheet2 == -1) { if ($sheet2 == -1) {
throw new Exception("Unknown sheet name $sheet_name2 in formula"); throw new PHPExcel_Reader_Exception("Unknown sheet name $sheet_name2 in formula");
} }
// Reverse max and min sheet numbers if necessary // Reverse max and min sheet numbers if necessary
@ -826,7 +826,7 @@ class PHPExcel_Writer_Excel5_Parser
} else { // Single sheet name only. } else { // Single sheet name only.
$sheet1 = $this->_getSheetIndex($ext_ref); $sheet1 = $this->_getSheetIndex($ext_ref);
if ($sheet1 == -1) { if ($sheet1 == -1) {
throw new Exception("Unknown sheet name $ext_ref in formula"); throw new PHPExcel_Reader_Exception("Unknown sheet name $ext_ref in formula");
} }
$sheet2 = $sheet1; $sheet2 = $sheet1;
} }
@ -858,11 +858,11 @@ class PHPExcel_Writer_Excel5_Parser
$sheet1 = $this->_getSheetIndex($sheet_name1); $sheet1 = $this->_getSheetIndex($sheet_name1);
if ($sheet1 == -1) { if ($sheet1 == -1) {
throw new Exception("Unknown sheet name $sheet_name1 in formula"); throw new PHPExcel_Reader_Exception("Unknown sheet name $sheet_name1 in formula");
} }
$sheet2 = $this->_getSheetIndex($sheet_name2); $sheet2 = $this->_getSheetIndex($sheet_name2);
if ($sheet2 == -1) { if ($sheet2 == -1) {
throw new Exception("Unknown sheet name $sheet_name2 in formula"); throw new PHPExcel_Reader_Exception("Unknown sheet name $sheet_name2 in formula");
} }
// Reverse max and min sheet numbers if necessary // Reverse max and min sheet numbers if necessary
@ -872,7 +872,7 @@ class PHPExcel_Writer_Excel5_Parser
} else { // Single sheet name only. } else { // Single sheet name only.
$sheet1 = $this->_getSheetIndex($ext_ref); $sheet1 = $this->_getSheetIndex($ext_ref);
if ($sheet1 == -1) { if ($sheet1 == -1) {
throw new Exception("Unknown sheet name $ext_ref in formula"); throw new PHPExcel_Reader_Exception("Unknown sheet name $ext_ref in formula");
} }
$sheet2 = $sheet1; $sheet2 = $sheet1;
} }
@ -942,10 +942,10 @@ class PHPExcel_Writer_Excel5_Parser
$cell = strtoupper($cell); $cell = strtoupper($cell);
list($row, $col, $row_rel, $col_rel) = $this->_cellToRowcol($cell); list($row, $col, $row_rel, $col_rel) = $this->_cellToRowcol($cell);
if ($col >= 256) { if ($col >= 256) {
throw new Exception("Column in: $cell greater than 255"); throw new PHPExcel_Reader_Exception("Column in: $cell greater than 255");
} }
if ($row >= 65536) { if ($row >= 65536) {
throw new Exception("Row in: $cell greater than 65536 "); throw new PHPExcel_Reader_Exception("Row in: $cell greater than 65536 ");
} }
// Set the high bits to indicate if row or col are relative. // Set the high bits to indicate if row or col are relative.
@ -983,7 +983,7 @@ class PHPExcel_Writer_Excel5_Parser
// FIXME: this changes for BIFF8 // FIXME: this changes for BIFF8
if (($row1 >= 65536) or ($row2 >= 65536)) { if (($row1 >= 65536) or ($row2 >= 65536)) {
throw new Exception("Row in: $range greater than 65536 "); throw new PHPExcel_Reader_Exception("Row in: $range greater than 65536 ");
} }
// Set the high bits to indicate if rows are relative. // Set the high bits to indicate if rows are relative.
@ -1372,7 +1372,7 @@ class PHPExcel_Writer_Excel5_Parser
$this->_advance(); // eat the "(" $this->_advance(); // eat the "("
$result = $this->_parenthesizedExpression(); $result = $this->_parenthesizedExpression();
if ($this->_current_token != ")") { if ($this->_current_token != ")") {
throw new Exception("')' token expected."); throw new PHPExcel_Reader_Exception("')' token expected.");
} }
$this->_advance(); // eat the ")" $this->_advance(); // eat the ")"
return $result; return $result;
@ -1442,7 +1442,7 @@ class PHPExcel_Writer_Excel5_Parser
$result = $this->_func(); $result = $this->_func();
return $result; return $result;
} }
throw new Exception("Syntax error: ".$this->_current_token. throw new PHPExcel_Reader_Exception("Syntax error: ".$this->_current_token.
", lookahead: ".$this->_lookahead. ", lookahead: ".$this->_lookahead.
", current char: ".$this->_current_char); ", current char: ".$this->_current_char);
} }
@ -1469,7 +1469,7 @@ class PHPExcel_Writer_Excel5_Parser
{ {
$this->_advance(); // eat the "," or ";" $this->_advance(); // eat the "," or ";"
} else { } else {
throw new Exception("Syntax error: comma expected in ". throw new PHPExcel_Reader_Exception("Syntax error: comma expected in ".
"function $function, arg #{$num_args}"); "function $function, arg #{$num_args}");
} }
$result2 = $this->_condition(); $result2 = $this->_condition();
@ -1481,12 +1481,12 @@ class PHPExcel_Writer_Excel5_Parser
++$num_args; ++$num_args;
} }
if (!isset($this->_functions[$function])) { if (!isset($this->_functions[$function])) {
throw new Exception("Function $function() doesn't exist"); throw new PHPExcel_Reader_Exception("Function $function() doesn't exist");
} }
$args = $this->_functions[$function][1]; $args = $this->_functions[$function][1];
// If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid. // If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid.
if (($args >= 0) and ($args != $num_args)) { if (($args >= 0) and ($args != $num_args)) {
throw new Exception("Incorrect number of arguments in function $function() "); throw new PHPExcel_Reader_Exception("Incorrect number of arguments in function $function() ");
} }
$result = $this->_createTree($function, $result, $num_args); $result = $this->_createTree($function, $result, $num_args);

View File

@ -2579,7 +2579,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
// Open file. // Open file.
$bmp_fd = @fopen($bitmap,"rb"); $bmp_fd = @fopen($bitmap,"rb");
if (!$bmp_fd) { if (!$bmp_fd) {
throw new Exception("Couldn't import $bitmap"); throw new PHPExcel_Reader_Exception("Couldn't import $bitmap");
} }
// Slurp the file into a string. // Slurp the file into a string.
@ -2587,13 +2587,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
// Check that the file is big enough to be a bitmap. // Check that the file is big enough to be a bitmap.
if (strlen($data) <= 0x36) { if (strlen($data) <= 0x36) {
throw new Exception("$bitmap doesn't contain enough data.\n"); throw new PHPExcel_Reader_Exception("$bitmap doesn't contain enough data.\n");
} }
// The first 2 bytes are used to identify the bitmap. // The first 2 bytes are used to identify the bitmap.
$identity = unpack("A2ident", $data); $identity = unpack("A2ident", $data);
if ($identity['ident'] != "BM") { if ($identity['ident'] != "BM") {
throw new Exception("$bitmap doesn't appear to be a valid bitmap image.\n"); throw new PHPExcel_Reader_Exception("$bitmap doesn't appear to be a valid bitmap image.\n");
} }
// Remove bitmap data: ID. // Remove bitmap data: ID.
@ -2617,20 +2617,20 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
$height = $width_and_height[2]; $height = $width_and_height[2];
$data = substr($data, 8); $data = substr($data, 8);
if ($width > 0xFFFF) { if ($width > 0xFFFF) {
throw new Exception("$bitmap: largest image width supported is 65k.\n"); throw new PHPExcel_Reader_Exception("$bitmap: largest image width supported is 65k.\n");
} }
if ($height > 0xFFFF) { if ($height > 0xFFFF) {
throw new Exception("$bitmap: largest image height supported is 65k.\n"); throw new PHPExcel_Reader_Exception("$bitmap: largest image height supported is 65k.\n");
} }
// Read and remove the bitmap planes and bpp data. Verify them. // Read and remove the bitmap planes and bpp data. Verify them.
$planes_and_bitcount = unpack("v2", substr($data, 0, 4)); $planes_and_bitcount = unpack("v2", substr($data, 0, 4));
$data = substr($data, 4); $data = substr($data, 4);
if ($planes_and_bitcount[2] != 24) { // Bitcount if ($planes_and_bitcount[2] != 24) { // Bitcount
throw new Exception("$bitmap isn't a 24bit true color bitmap.\n"); throw new PHPExcel_Reader_Exception("$bitmap isn't a 24bit true color bitmap.\n");
} }
if ($planes_and_bitcount[1] != 1) { if ($planes_and_bitcount[1] != 1) {
throw new Exception("$bitmap: only 1 plane supported in bitmap image.\n"); throw new PHPExcel_Reader_Exception("$bitmap: only 1 plane supported in bitmap image.\n");
} }
// Read and remove the bitmap compression. Verify compression. // Read and remove the bitmap compression. Verify compression.
@ -2639,7 +2639,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
//$compression = 0; //$compression = 0;
if ($compression['comp'] != 0) { if ($compression['comp'] != 0) {
throw new Exception("$bitmap: compression not supported in bitmap image.\n"); throw new PHPExcel_Reader_Exception("$bitmap: compression not supported in bitmap image.\n");
} }
// Remove bitmap data: data size, hres, vres, colours, imp. colours. // Remove bitmap data: data size, hres, vres, colours, imp. colours.
@ -2895,7 +2895,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
$formula1 = $this->_parser->toReversePolish(); $formula1 = $this->_parser->toReversePolish();
$sz1 = strlen($formula1); $sz1 = strlen($formula1);
} catch(Exception $e) { } catch(PHPExcel_Reader_Exception $e) {
$sz1 = 0; $sz1 = 0;
$formula1 = ''; $formula1 = '';
} }
@ -2906,13 +2906,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
try { try {
$formula2 = $dataValidation->getFormula2(); $formula2 = $dataValidation->getFormula2();
if ($formula2 === '') { if ($formula2 === '') {
throw new Exception('No formula2'); throw new PHPExcel_Reader_Exception('No formula2');
} }
$this->_parser->parse($formula2); $this->_parser->parse($formula2);
$formula2 = $this->_parser->toReversePolish(); $formula2 = $this->_parser->toReversePolish();
$sz2 = strlen($formula2); $sz2 = strlen($formula2);
} catch(Exception $e) { } catch(PHPExcel_Reader_Exception $e) {
$sz2 = 0; $sz2 = 0;
$formula2 = ''; $formula2 = '';
} }

View File

@ -0,0 +1,52 @@
<?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2012 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/
/**
* PHPExcel_Writer_Exception
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Writer_Exception extends Exception {
/**
* Error handler callback
*
* @param mixed $code
* @param mixed $string
* @param mixed $file
* @param mixed $line
* @param mixed $context
*/
public static function errorHandlerCallback($code, $string, $file, $line, $context) {
$e = new self($string, $code);
$e->line = $line;
$e->file = $file;
throw $e;
}
}

View File

@ -146,7 +146,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFilename * @param string $pFilename
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null) {
// garbage collect // garbage collect
@ -163,7 +163,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
// Open file // Open file
$fileHandle = fopen($pFilename, 'wb+'); $fileHandle = fopen($pFilename, 'wb+');
if ($fileHandle === false) { if ($fileHandle === false) {
throw new Exception("Could not open file $pFilename for writing."); throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing.");
} }
// Write headers // Write headers
@ -300,12 +300,12 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* *
* @param boolean $pIncludeStyles Include styles? * @param boolean $pIncludeStyles Include styles?
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function generateHTMLHeader($pIncludeStyles = false) { public function generateHTMLHeader($pIncludeStyles = false) {
// PHPExcel object known? // PHPExcel object known?
if (is_null($this->_phpExcel)) { if (is_null($this->_phpExcel)) {
throw new Exception('Internal PHPExcel object not set to an instance of an object.'); throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
} }
// Construct HTML // Construct HTML
@ -351,12 +351,12 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* Generate sheet data * Generate sheet data
* *
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function generateSheetData() { public function generateSheetData() {
// PHPExcel object known? // PHPExcel object known?
if (is_null($this->_phpExcel)) { if (is_null($this->_phpExcel)) {
throw new Exception('Internal PHPExcel object not set to an instance of an object.'); throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
} }
// Ensure that Spans have been calculated? // Ensure that Spans have been calculated?
@ -470,13 +470,13 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* Generate sheet tabs * Generate sheet tabs
* *
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function generateNavigation() public function generateNavigation()
{ {
// PHPExcel object known? // PHPExcel object known?
if (is_null($this->_phpExcel)) { if (is_null($this->_phpExcel)) {
throw new Exception('Internal PHPExcel object not set to an instance of an object.'); throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
} }
// Fetch sheets // Fetch sheets
@ -514,7 +514,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* @param PHPExcel_Worksheet $pSheet PHPExcel_Worksheet * @param PHPExcel_Worksheet $pSheet PHPExcel_Worksheet
* @param string $coordinates Cell coordinates * @param string $coordinates Cell coordinates
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _writeImageTagInCell(PHPExcel_Worksheet $pSheet, $coordinates) { private function _writeImageTagInCell(PHPExcel_Worksheet $pSheet, $coordinates) {
// Construct HTML // Construct HTML
@ -557,12 +557,12 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* *
* @param boolean $generateSurroundingHTML Generate surrounding HTML tags? (<style> and </style>) * @param boolean $generateSurroundingHTML Generate surrounding HTML tags? (<style> and </style>)
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function generateStyles($generateSurroundingHTML = true) { public function generateStyles($generateSurroundingHTML = true) {
// PHPExcel object known? // PHPExcel object known?
if (is_null($this->_phpExcel)) { if (is_null($this->_phpExcel)) {
throw new Exception('Internal PHPExcel object not set to an instance of an object.'); throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
} }
// Build CSS // Build CSS
@ -598,12 +598,12 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* *
* @param boolean $generateSurroundingHTML Generate surrounding HTML style? (html { }) * @param boolean $generateSurroundingHTML Generate surrounding HTML style? (html { })
* @return array * @return array
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function buildCSS($generateSurroundingHTML = true) { public function buildCSS($generateSurroundingHTML = true) {
// PHPExcel object known? // PHPExcel object known?
if (is_null($this->_phpExcel)) { if (is_null($this->_phpExcel)) {
throw new Exception('Internal PHPExcel object not set to an instance of an object.'); throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
} }
// Cached? // Cached?
@ -894,7 +894,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* *
* @param PHPExcel_Worksheet $pSheet The worksheet for the table we are writing * @param PHPExcel_Worksheet $pSheet The worksheet for the table we are writing
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _generateTableHeader($pSheet) { private function _generateTableHeader($pSheet) {
$sheetIndex = $pSheet->getParent()->getIndex($pSheet); $sheetIndex = $pSheet->getParent()->getIndex($pSheet);
@ -938,7 +938,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
/** /**
* Generate table footer * Generate table footer
* *
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _generateTableFooter() { private function _generateTableFooter() {
// Construct HTML // Construct HTML
@ -956,7 +956,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
* @param array $pValues Array containing cells in a row * @param array $pValues Array containing cells in a row
* @param int $pRow Row number (0-based) * @param int $pRow Row number (0-based)
* @return string * @return string
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
private function _generateRow(PHPExcel_Worksheet $pSheet, $pValues = null, $pRow = 0) { private function _generateRow(PHPExcel_Worksheet $pSheet, $pValues = null, $pRow = 0) {
if (is_array($pValues)) { if (is_array($pValues)) {
@ -1172,7 +1172,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
// Return // Return
return $html; return $html;
} else { } else {
throw new Exception("Invalid parameters passed."); throw new PHPExcel_Writer_Exception("Invalid parameters passed.");
} }
} }

View File

@ -39,7 +39,7 @@ interface PHPExcel_Writer_IWriter
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFilename * @param string $pFilename
* @throws Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = null); public function save($pFilename = null);
} }

View File

@ -41,17 +41,18 @@ class PHPExcel_Writer_PDF {
* Create a new PHPExcel_Writer_PDF * Create a new PHPExcel_Writer_PDF
* *
* @param PHPExcel $phpExcel PHPExcel object * @param PHPExcel $phpExcel PHPExcel object
* @throws PHPExcel_Writer_Exception Exception when directory does not exist
*/ */
public function __construct(PHPExcel $phpExcel) { public function __construct(PHPExcel $phpExcel) {
$pdfLibraryName = PHPExcel_Settings::getPdfRendererName(); $pdfLibraryName = PHPExcel_Settings::getPdfRendererName();
if (is_null($pdfLibraryName)) { if (is_null($pdfLibraryName)) {
throw new Exception("PDF Rendering library has not been defined."); throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined.");
} }
$pdfLibraryPath = PHPExcel_Settings::getPdfRendererPath(); $pdfLibraryPath = PHPExcel_Settings::getPdfRendererPath();
if (is_null($pdfLibraryName)) { if (is_null($pdfLibraryName)) {
throw new Exception("PDF Rendering library path has not been defined."); throw new PHPExcel_Writer_Exception("PDF Rendering library path has not been defined.");
} }
$includePath = str_replace('\\','/',get_include_path()); $includePath = str_replace('\\','/',get_include_path());
$rendererPath = str_replace('\\','/',$pdfLibraryPath); $rendererPath = str_replace('\\','/',$pdfLibraryPath);
@ -67,7 +68,7 @@ class PHPExcel_Writer_PDF {
public function __call($name, $arguments) public function __call($name, $arguments)
{ {
if ($this->_renderer === NULL) { if ($this->_renderer === NULL) {
throw new Exception("PDF Renderer has not been defined."); throw new PHPExcel_Writer_Exception("PDF Renderer has not been defined.");
} }
return call_user_func_array(array($this->_renderer,$name),$arguments); return call_user_func_array(array($this->_renderer,$name),$arguments);

View File

@ -225,14 +225,14 @@ abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML {
* Set temporary storage directory * Set temporary storage directory
* *
* @param string $pValue Temporary storage directory * @param string $pValue Temporary storage directory
* @throws Exception Exception when directory does not exist * @throws PHPExcel_Writer_Exception Exception when directory does not exist
* @return PHPExcel_Writer_PDF * @return PHPExcel_Writer_PDF
*/ */
public function setTempDir($pValue = '') { public function setTempDir($pValue = '') {
if (is_dir($pValue)) { if (is_dir($pValue)) {
$this->_tempDir = $pValue; $this->_tempDir = $pValue;
} else { } else {
throw new Exception("Directory does not exist: $pValue"); throw new PHPExcel_Writer_Exception("Directory does not exist: $pValue");
} }
return $this; return $this;
} }

View File

@ -31,7 +31,7 @@ $pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/dompdf_confi
if (file_exists($pdfRendererClassFile)) { if (file_exists($pdfRendererClassFile)) {
require_once $pdfRendererClassFile; require_once $pdfRendererClassFile;
} else { } else {
throw new Exception('Unable to load PDF Rendering library'); throw new PHPExcel_Reader_Exception('Unable to load PDF Rendering library');
} }
/** /**
@ -55,7 +55,7 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFileName * @param string $pFileName
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null) {
// garbage collect // garbage collect
@ -67,7 +67,7 @@ class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHP
// Open file // Open file
$fileHandle = fopen($pFilename, 'w'); $fileHandle = fopen($pFilename, 'w');
if ($fileHandle === false) { if ($fileHandle === false) {
throw new Exception("Could not open file $pFilename for writing."); throw new PHPExcel_Reader_Exception("Could not open file $pFilename for writing.");
} }
// Set PDF // Set PDF

View File

@ -31,7 +31,7 @@ $pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/mpdf.php';
if (file_exists($pdfRendererClassFile)) { if (file_exists($pdfRendererClassFile)) {
require_once $pdfRendererClassFile; require_once $pdfRendererClassFile;
} else { } else {
throw new Exception('Unable to load PDF Rendering library'); throw new PHPExcel_Reader_Exception('Unable to load PDF Rendering library');
} }
/** /**
@ -55,7 +55,7 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFileName * @param string $pFileName
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null) {
// garbage collect // garbage collect
@ -67,7 +67,7 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
// Open file // Open file
$fileHandle = fopen($pFilename, 'w'); $fileHandle = fopen($pFilename, 'w');
if ($fileHandle === false) { if ($fileHandle === false) {
throw new Exception("Could not open file $pFilename for writing."); throw new PHPExcel_Reader_Exception("Could not open file $pFilename for writing.");
} }
// Set PDF // Set PDF
@ -108,8 +108,11 @@ class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPEx
// Create PDF // Create PDF
$pdf = new mpdf(); $pdf = new mpdf();
$pdf->_setPageSize(strtoupper($paperSize), $orientation); $ortmp = $orientation;
$pdf->_setPageSize(strtoupper($paperSize), $ortmp);
$pdf->DefOrientation = $orientation; $pdf->DefOrientation = $orientation;
$pdf->AddPage($orientation);
// Document info // Document info
$pdf->SetTitle($this->_phpExcel->getProperties()->getTitle()); $pdf->SetTitle($this->_phpExcel->getProperties()->getTitle());
$pdf->SetAuthor($this->_phpExcel->getProperties()->getCreator()); $pdf->SetAuthor($this->_phpExcel->getProperties()->getCreator());

View File

@ -32,7 +32,7 @@ if (file_exists($pdfRendererClassFile)) {
$k_path_url = PHPExcel_Settings::getPdfRendererPath(); $k_path_url = PHPExcel_Settings::getPdfRendererPath();
require_once $pdfRendererClassFile; require_once $pdfRendererClassFile;
} else { } else {
throw new Exception('Unable to load PDF Rendering library'); throw new PHPExcel_Reader_Exception('Unable to load PDF Rendering library');
} }
/** /**
@ -56,7 +56,7 @@ class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPE
* Save PHPExcel to file * Save PHPExcel to file
* *
* @param string $pFileName * @param string $pFileName
* @throws Exception * @throws PHPExcel_Reader_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null) {
// garbage collect // garbage collect
@ -68,7 +68,7 @@ class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPE
// Open file // Open file
$fileHandle = fopen($pFilename, 'w'); $fileHandle = fopen($pFilename, 'w');
if ($fileHandle === false) { if ($fileHandle === false) {
throw new Exception("Could not open file $pFilename for writing."); throw new PHPExcel_Reader_Exception("Could not open file $pFilename for writing.");
} }
// Set PDF // Set PDF

View File

@ -106,6 +106,10 @@ $objPHPExcel->getActiveSheet()->setCellValue('A11', 'Date/Time')
->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); ->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow ));
$objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME); $objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME);
$objPHPExcel->getActiveSheet()->setCellValue('A12', 'NULL')
->setCellValue('C12', NULL);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);

View File

@ -106,7 +106,11 @@ $objPHPExcel->getActiveSheet()->setCellValue('A11', 'Date/Time')
->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); ->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow ));
$objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME); $objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); $objPHPExcel->getActiveSheet()->setCellValue('A12', 'NULL')
->setCellValue('C12', NULL);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);
// Rename worksheet // Rename worksheet

View File

@ -43,11 +43,11 @@ require_once '../Classes/PHPExcel/IOFactory.php';
// Change these values to select the Rendering library that you wish to use // Change these values to select the Rendering library that you wish to use
// and its directory location on your server // and its directory location on your server
//$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF; $rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF;
$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF; //$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF;
//$rendererLibrary = 'tcPDF5.9'; //$rendererLibrary = 'tcPDF5.9';
//$rendererLibrary = 'mPDF5.4'; $rendererLibrary = 'mPDF5.4';
$rendererLibrary = 'domPDF0.6.0beta3'; //$rendererLibrary = 'domPDF0.6.0beta3';
$rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary; $rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary;

View File

@ -26,9 +26,10 @@
Fixed in develop branch: Fixed in develop branch:
- Bugfix: (Asker) Work item 18777 - Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check) - Bugfix: (Asker) Work item 18777 - Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check)
- Bugfix: (MBaker) Work item 18794 - CSV files without a file extension being identified as HTML - Bugfix: (MBaker) Work item 18794 - CSV files without a file extension being identified as HTML
- Bugfix: (MBaker) Work item GH-66 - Wrong check for maximum number of rows in Excel5 Writer - Bugfix: (AndreKR) Work item GH-66 - Wrong check for maximum number of rows in Excel5 Writer
- General: (kea) Improved AdvancedValueBinder for currency - General: (kea) Work item GH-69 - Improved AdvancedValueBinder for currency
- Bugfix: (techhead) Work item GH-70 - Fixed formula/formatting bug when removing rows - Bugfix: (techhead) Work item GH-70 - Fixed formula/formatting bug when removing rows
- Bugfix: (alexgann) Work item GH-63 - Fix to cellExists for non-existent namedRanges
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------