Skip to content

Commit 8ebe3b3

Browse files
committed
Revert "Add missing setters for pageSizeW and pageSizeH"
1 parent 1a783d1 commit 8ebe3b3

File tree

3 files changed

+6
-44
lines changed

3 files changed

+6
-44
lines changed

docs/containers.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ Section settings
3434

3535
Below are the available settings for section:
3636

37-
- ``pageSizeW`` Page width in twips (the default is 11906/A4 size)
38-
- ``pageSizeH`` Page height in twips (the default is 16838/A4 size)
3937
- ``orientation`` Page orientation, i.e. 'portrait' (default) or
4038
'landscape'
4139
- ``marginTop`` Page margin top in twips
@@ -58,6 +56,12 @@ Below are the available settings for section:
5856
- ``breakType`` Section break type (nextPage, nextColumn, continuous,
5957
evenPage, oddPage)
6058

59+
The following two settings are automatically set by the use of the
60+
``orientation`` setting. You can alter them but that's not recommended.
61+
62+
- ``pageSizeW`` Page width in twips
63+
- ``pageSizeH`` Page height in twips
64+
6165
Page number
6266
~~~~~~~~~~~
6367

src/PhpWord/Style/Section.php

-14
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,6 @@ public function getPageSizeW()
239239
return $this->pageSizeW;
240240
}
241241

242-
public function setPageSizeW($value = null)
243-
{
244-
$this->pageSizeW = $this->setNumericVal($value, self::DEFAULT_WIDTH);
245-
246-
return $this;
247-
}
248-
249242
/**
250243
* Get Page Size Height
251244
*
@@ -256,13 +249,6 @@ public function getPageSizeH()
256249
return $this->pageSizeH;
257250
}
258251

259-
public function setPageSizeH($value = null)
260-
{
261-
$this->pageSizeH = $this->setNumericVal($value, self::DEFAULT_HEIGHT);
262-
263-
return $this;
264-
}
265-
266252
/**
267253
* Get Margin Top
268254
*

tests/PhpWord/Tests/Style/SectionTest.php

-28
Original file line numberDiff line numberDiff line change
@@ -96,34 +96,6 @@ public function testMargin()
9696
$this->assertEquals($iVal, $oSettings->getMarginRight());
9797
}
9898

99-
/**
100-
* Set/get page width
101-
*/
102-
public function testPageWidth()
103-
{
104-
// Section Settings
105-
$oSettings = new Section();
106-
107-
$this->assertEquals(11906, $oSettings->getPageSizeW());
108-
$iVal = rand(1, 1000);
109-
$oSettings->setSettingValue('pageSizeW', $iVal);
110-
$this->assertEquals($iVal, $oSettings->getPageSizeW());
111-
}
112-
113-
/**
114-
* Set/get page height
115-
*/
116-
public function testPageHeight()
117-
{
118-
// Section Settings
119-
$oSettings = new Section();
120-
121-
$this->assertEquals(16838, $oSettings->getPageSizeH());
122-
$iVal = rand(1, 1000);
123-
$oSettings->setSettingValue('pageSizeH', $iVal);
124-
$this->assertEquals($iVal, $oSettings->getPageSizeH());
125-
}
126-
12799
/**
128100
* Set/get landscape orientation
129101
*/

0 commit comments

Comments
 (0)