File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class Title extends Text
26
26
{
27
27
protected function getStyles ()
28
28
{
29
- /** @var \PhpOffice\PhpWord\Element\Text $element Type hint */
29
+ /** @var \PhpOffice\PhpWord\Element\Title $element Type hint */
30
30
$ element = $ this ->element ;
31
31
$ style = $ element ->getStyle ();
32
32
if (is_string ($ style )) {
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ private function writeFormatting()
117
117
/**
118
118
* Write titlepg directive if any "f" headers or footers
119
119
*
120
- * @param \PhpOffice\PhpWord\PhpWord\ Element\Section $section
120
+ * @param \PhpOffice\PhpWord\Element\Section $section
121
121
* @return string
122
122
*/
123
123
private static function writeTitlepg ($ section )
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ public function write()
52
52
Jc::END => '\qr ' ,
53
53
Jc::CENTER => '\qc ' ,
54
54
Jc::BOTH => '\qj ' ,
55
- Jc:: LEFT => '\ql ' ,
56
- Jc:: RIGHT => '\qr ' ,
55
+ " left " => '\ql ' ,
56
+ " right " => '\qr ' ,
57
57
);
58
58
59
59
$ spaceAfter = $ style ->getSpaceAfter ();
@@ -70,11 +70,11 @@ public function write()
70
70
$ content .= $ this ->getValueIf ($ spaceBefore !== null , '\sb ' . round ($ spaceBefore ));
71
71
$ content .= $ this ->getValueIf ($ spaceAfter !== null , '\sa ' . round ($ spaceAfter ));
72
72
$ lineHeight = $ style ->getLineHeight ();
73
- if ($ lineHeight !== null ) {
73
+ if ($ lineHeight ) {
74
74
$ lineHeightAdjusted = (int ) ($ lineHeight * 240 );
75
75
$ content .= "\\sl $ lineHeightAdjusted \\slmult1 " ;
76
76
}
77
- if ($ style ->getPageBreakBefore ()) {
77
+ if ($ style ->hasPageBreakBefore ()) {
78
78
$ content .= '\\page ' ;
79
79
}
80
80
You can’t perform that action at this time.
0 commit comments