File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/PhpWord/Writer/RTF/Style Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,23 @@ public function write()
5353 $ content .= $ this ->getValueIf ($ style ->getMarginLeft () !== null , '\marglsxn ' . round ($ style ->getMarginLeft ()));
5454 $ content .= $ this ->getValueIf ($ style ->getHeaderHeight () !== null , '\headery ' . round ($ style ->getHeaderHeight ()));
5555 $ content .= $ this ->getValueIf ($ style ->getFooterHeight () !== null , '\footery ' . round ($ style ->getFooterHeight ()));
56- $ content .= $ this ->getValueIf ($ style ->getGutter () !== null , '\guttersxn ' . round ($ style ->getGutter ()));
56+ $ content .= $ this ->getValueIf ($ style ->getGutter () !== null && $ style -> getGutter () !== SectionStyle:: DEFAULT_GUTTER , '\guttersxn ' . round ($ style ->getGutter ()));
5757 $ content .= $ this ->getValueIf ($ style ->getPageNumberingStart () !== null , '\pgnstarts ' . $ style ->getPageNumberingStart () . '\pgnrestart ' );
58+ $ content .= $ this ->getValueIf ($ style ->getColsNum () !== null && $ style ->getColsNum () !== SectionStyle::DEFAULT_COLUMN_COUNT , '\cols ' . $ style ->getColsNum ());
59+ $ content .= $ this ->getValueIf ($ style ->getColsSpace () !== null && $ style ->getColsNum () !== SectionStyle::DEFAULT_COLUMN_COUNT , '\colsx ' . round ($ style ->getColsSpace ()));
60+
61+ // Break Type
62+ $ breakTypes = [
63+ 'nextPage ' => '\sbkpage ' ,
64+ 'nextColumn ' => '\sbkcol ' ,
65+ 'continuous ' => '\sbknone ' ,
66+ 'evenPage ' => '\sbkeven ' ,
67+ 'oddPage ' => '\sbkodd ' ,
68+ ];
69+ if (isset ($ breakTypes [$ style ->getBreakType ()])) {
70+ $ content .= $ breakTypes [$ style ->getBreakType ()];
71+ }
72+
5873 $ content .= ' ' ;
5974
6075 // Borders
You can’t perform that action at this time.
0 commit comments