File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/PhpWord/Writer/RTF/Style Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,24 @@ public function write()
38
38
\PhpOffice \PhpWord \Style \Tab::TAB_STOP_RIGHT => '\tqr ' ,
39
39
\PhpOffice \PhpWord \Style \Tab::TAB_STOP_CENTER => '\tqc ' ,
40
40
\PhpOffice \PhpWord \Style \Tab::TAB_STOP_DECIMAL => '\tqdec ' ,
41
+ \PhpOffice \PhpWord \Style \Tab::TAB_LEADER_DOT => '\tldot ' ,
42
+ \PhpOffice \PhpWord \Style \Tab::TAB_LEADER_HYPHEN => '\tlhyph ' ,
43
+ \PhpOffice \PhpWord \Style \Tab::TAB_LEADER_UNDERSCORE => '\tlul ' ,
44
+ \PhpOffice \PhpWord \Style \Tab::TAB_LEADER_HEAVY => '\tlth ' ,
45
+ \PhpOffice \PhpWord \Style \Tab::TAB_LEADER_MIDDLEDOT => '\tlmdot ' ,
41
46
];
42
47
$ content = '' ;
43
48
if (isset ($ tabs [$ style ->getType ()])) {
44
49
$ content .= $ tabs [$ style ->getType ()];
45
50
}
46
- $ content .= '\tx ' . round ($ style ->getPosition ());
51
+ if (isset ($ tabs [$ style ->getLeader ()])) {
52
+ $ content .= $ tabs [$ style ->getLeader ()];
53
+ }
54
+ if ($ style ->getType () == \PhpOffice \PhpWord \Style \Tab::TAB_STOP_BAR ) {
55
+ $ content .= '\tb ' . round ($ style ->getPosition ());
56
+ } else {
57
+ $ content .= '\tx ' . round ($ style ->getPosition ());
58
+ }
47
59
48
60
return $ content ;
49
61
}
You can’t perform that action at this time.
0 commit comments