Skip to content

Commit 99b43ce

Browse files
committed
Merge branch 'develop' of https://github.com/PHPOffice/PHPWord into develop
2 parents 9b793e5 + 63a535b commit 99b43ce

File tree

18 files changed

+910
-77
lines changed

18 files changed

+910
-77
lines changed

Classes/PHPWord.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,23 @@
3939
class PHPWord
4040
{
4141

42+
/**
43+
* Default font name (Arial)
44+
*/
4245
const DEFAULT_FONT_NAME = 'Arial';
43-
const DEFAULT_FONT_SIZE = 20;
46+
47+
/**
48+
* Default font size in points (10pt)
49+
*
50+
* OOXML defined font size values in halfpoints, i.e. twice of what PHPWord
51+
* use, and the conversion will be conducted during XML writing.
52+
*/
53+
const DEFAULT_FONT_SIZE = 10;
54+
55+
/**
56+
* Default font color (black)
57+
*/
58+
const DEFAULT_FONT_COLOR = '000000';
4459

4560
/**
4661
* Document properties

Classes/PHPWord/Shared/Drawing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public static function pixelsToCentimeters($pValue = 0)
128128
public static function centimetersToPixels($pValue = 0)
129129
{
130130
if ($pValue != 0) {
131-
return $pValue * 0.028;
131+
return $pValue / 0.028;
132132
} else {
133133
return 0;
134134
}

Classes/PHPWord/Style/Cell.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,6 @@ public function setBgColor($pValue = null)
198198
$this->_bgColor = $pValue;
199199
}
200200

201-
public function setHeight($pValue = null)
202-
{
203-
$this->_height = $pValue;
204-
}
205-
206201
public function setBorderSize($pValue = null)
207202
{
208203
$this->_borderTopSize = $pValue;

0 commit comments

Comments
 (0)