Merge pull request #389 from PHPOffice/revert-379-master

Revert "Add missing setters for pageSizeW and pageSizeH"
This commit is contained in:
Progi1984 2014-10-02 17:21:27 +02:00
commit 5e68fd9bbd
3 changed files with 6 additions and 44 deletions

View File

@ -34,8 +34,6 @@ Section settings
Below are the available settings for section: Below are the available settings for section:
- ``pageSizeW`` Page width in twips (the default is 11906/A4 size)
- ``pageSizeH`` Page height in twips (the default is 16838/A4 size)
- ``orientation`` Page orientation, i.e. 'portrait' (default) or - ``orientation`` Page orientation, i.e. 'portrait' (default) or
'landscape' 'landscape'
- ``marginTop`` Page margin top in twips - ``marginTop`` Page margin top in twips
@ -58,6 +56,12 @@ Below are the available settings for section:
- ``breakType`` Section break type (nextPage, nextColumn, continuous, - ``breakType`` Section break type (nextPage, nextColumn, continuous,
evenPage, oddPage) evenPage, oddPage)
The following two settings are automatically set by the use of the
``orientation`` setting. You can alter them but that's not recommended.
- ``pageSizeW`` Page width in twips
- ``pageSizeH`` Page height in twips
Page number Page number
~~~~~~~~~~~ ~~~~~~~~~~~

View File

@ -239,13 +239,6 @@ class Section extends Border
return $this->pageSizeW; return $this->pageSizeW;
} }
public function setPageSizeW($value = null)
{
$this->pageSizeW = $this->setNumericVal($value, self::DEFAULT_WIDTH);
return $this;
}
/** /**
* Get Page Size Height * Get Page Size Height
* *
@ -256,13 +249,6 @@ class Section extends Border
return $this->pageSizeH; return $this->pageSizeH;
} }
public function setPageSizeH($value = null)
{
$this->pageSizeH = $this->setNumericVal($value, self::DEFAULT_HEIGHT);
return $this;
}
/** /**
* Get Margin Top * Get Margin Top
* *

View File

@ -96,34 +96,6 @@ class SettingsTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($iVal, $oSettings->getMarginRight()); $this->assertEquals($iVal, $oSettings->getMarginRight());
} }
/**
* Set/get page width
*/
public function testPageWidth()
{
// Section Settings
$oSettings = new Section();
$this->assertEquals(11906, $oSettings->getPageSizeW());
$iVal = rand(1, 1000);
$oSettings->setSettingValue('pageSizeW', $iVal);
$this->assertEquals($iVal, $oSettings->getPageSizeW());
}
/**
* Set/get page height
*/
public function testPageHeight()
{
// Section Settings
$oSettings = new Section();
$this->assertEquals(16838, $oSettings->getPageSizeH());
$iVal = rand(1, 1000);
$oSettings->setSettingValue('pageSizeH', $iVal);
$this->assertEquals($iVal, $oSettings->getPageSizeH());
}
/** /**
* Set/get landscape orientation * Set/get landscape orientation
*/ */