Fix Bug #8701: Problems with the method setTextRotation() [progi1984]

git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@287106 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christian Weiske 2009-08-11 17:27:01 +00:00
parent f935c52a11
commit f70336321a
2 changed files with 14 additions and 1 deletions

View File

@ -429,7 +429,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
$header = pack("vv", $record, $length);
$rotation = 0x00;
$rotation = $this->_rotation;
$biff8_options = 0x00;
$data = pack("vvvC", $ifnt, $ifmt, $style, $align);
$data .= pack("CCC", $rotation, $biff8_options, $used_attrib);
@ -996,13 +996,25 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
$this->_rotation = 0;
break;
case 90:
if ($this->_BIFF_version == 0x0500) {
$this->_rotation = 3;
} elseif ($this->_BIFF_version == 0x0600) {
$this->_rotation = 180;
}
break;
case 270:
if ($this->_BIFF_version == 0x0500) {
$this->_rotation = 2;
} elseif ($this->_BIFF_version == 0x0600) {
$this->_rotation = 90;
}
break;
case -1:
if ($this->_BIFF_version == 0x0500) {
$this->_rotation = 1;
} elseif ($this->_BIFF_version == 0x0600) {
$this->_rotation = 255;
}
break;
default :
return $this->raiseError("Invalid value for angle.".

View File

@ -47,6 +47,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fix Bug #14932: The name of the Workbook stream MUST be "Workbook", not
"Book" [progi1984]
- Fix Bug #14587: tmpfile() used despite setTempDir() [sberg]
- Fix Bug #8701: Problems with the method setTextRotation() [progi1984]
</notes>
<contents>