diff --git a/Spreadsheet/Excel/Writer/Format.php b/Spreadsheet/Excel/Writer/Format.php index a036148..38342cb 100644 --- a/Spreadsheet/Excel/Writer/Format.php +++ b/Spreadsheet/Excel/Writer/Format.php @@ -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.". diff --git a/package.xml b/package.xml index 7bc8542..970b9f7 100644 --- a/package.xml +++ b/package.xml @@ -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]