Workitem 7895 - Excel5 : Formula : String constant containing double quotation mark

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@60517 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Progi1984 2010-09-07 11:40:06 +00:00
parent fc9450b2a4
commit b245b2842a
2 changed files with 5 additions and 4 deletions

View File

@ -522,7 +522,7 @@ class PHPExcel_Writer_Excel5_Parser
*/ */
function _convert($token) function _convert($token)
{ {
if (preg_match("/^\"[^\"]{0,255}\"$/", $token)) { if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $token)) {
return $this->_convertString($token); return $this->_convertString($token);
} elseif (is_numeric($token)) { } elseif (is_numeric($token)) {
@ -1231,7 +1231,7 @@ class PHPExcel_Writer_Excel5_Parser
return $token; return $token;
} }
// If it's a string (of maximum 255 characters) // If it's a string (of maximum 255 characters)
elseif (preg_match("/^\"[^\"]{0,255}\"$/",$token)) elseif (preg_match("/\"([^\"]|\"\"){0,255}\"/",$token) and $this->_lookahead != '"' and (substr_count($token, '"')%2 == 0))
{ {
return $token; return $token;
} }
@ -1323,8 +1323,8 @@ class PHPExcel_Writer_Excel5_Parser
function _expression() function _expression()
{ {
// If it's a string return a string node // If it's a string return a string node
if (preg_match("/^\"[^\"]{0,255}\"$/", $this->_current_token)) { if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $this->_current_token)) {
$result = $this->_createTree($this->_current_token, '', ''); $result = $this->_createTree(str_replace('""', '"', $this->_current_token), '', '');
$this->_advance(); $this->_advance();
return $result; return $result;
// If it's an error code // If it's an error code

View File

@ -24,6 +24,7 @@
Fixed in SVN: Fixed in SVN:
- Bugfix: (Progi1984) Workitem 7895 - Excel5 : Formula : String constant containing double quotation mark
- Feature: (MBaker) Work item 8769 - Implement Gnumeric File Format - Feature: (MBaker) Work item 8769 - Implement Gnumeric File Format
Initial work on Gnumeric Reader (Worksheet Data, Document Properties and basic Formatting) Initial work on Gnumeric Reader (Worksheet Data, Document Properties and basic Formatting)
- Feature: (MBaker) Support for Extended Workbook Properties in Excel2007, Excel5 and OOCalc Readers; support for User-defined Workbook Properties in Excel2007 and OOCalc Readers - Feature: (MBaker) Support for Extended Workbook Properties in Excel2007, Excel5 and OOCalc Readers; support for User-defined Workbook Properties in Excel2007 and OOCalc Readers