Skip to content

Revert "Add missing setters for pageSizeW and pageSizeH" #389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Section settings

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
'landscape'
- ``marginTop`` Page margin top in twips
Expand All @@ -58,6 +56,12 @@ Below are the available settings for section:
- ``breakType`` Section break type (nextPage, nextColumn, continuous,
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
~~~~~~~~~~~

Expand Down
14 changes: 0 additions & 14 deletions src/PhpWord/Style/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,6 @@ public function getPageSizeW()
return $this->pageSizeW;
}

public function setPageSizeW($value = null)
{
$this->pageSizeW = $this->setNumericVal($value, self::DEFAULT_WIDTH);

return $this;
}

/**
* Get Page Size Height
*
Expand All @@ -256,13 +249,6 @@ public function getPageSizeH()
return $this->pageSizeH;
}

public function setPageSizeH($value = null)
{
$this->pageSizeH = $this->setNumericVal($value, self::DEFAULT_HEIGHT);

return $this;
}

/**
* Get Margin Top
*
Expand Down
28 changes: 0 additions & 28 deletions tests/PhpWord/Tests/Style/SectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,34 +96,6 @@ public function testMargin()
$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
*/
Expand Down