Skip to content

Commit a662f34

Browse files
committed
When converting to a picture, prioritize cell textDecoration over column-defined ones. ACI0105482
1 parent 4c7e16a commit a662f34

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

Project/Sources/Methods/svg_drawCellValue.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ End for each
910910

911911
//// TEXT DECORATION ////
912912

913-
If ($valObj.textDecoration#"")
913+
If (($valObj.textDecoration#"") && ($valObj.textDecoration#"$4D_tdnull"))
914914

915915
// Double underline not implemented so it is replaced by a simple underline
916916
$valObj.textDecoration:=Replace string:C233($valObj.textDecoration; "double"; "")

Project/Sources/Methods/svg_parseStyle.4dm

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -195,31 +195,35 @@ If ($parsed.font="")
195195
End if
196196

197197
If ($parsed.textDecoration="")
198-
If (Value type:C1509($style.textDecoration)=Is real:K8:4)
199-
200-
If ($style.textDecoration=0)
201-
$parsed.textDecoration:="none"
202-
203-
Else
204-
205-
Case of
206-
: (($style.textDecoration & 1)>0)
207-
$parsed.textDecoration:="underline"
208-
: (($style.textDecoration & 8)>0)
209-
$parsed.textDecoration:="double underline"
210-
End case
198+
Case of
199+
: (Value type:C1509($style.textDecoration)=Is real:K8:4)
211200

212-
If (($style.textDecoration & 2)>0)
213-
$parsed.textDecoration:=$parsed.textDecoration+" line-through"
201+
If ($style.textDecoration=0)
202+
$parsed.textDecoration:="none"
203+
204+
Else
205+
206+
Case of
207+
: (($style.textDecoration & 1)>0)
208+
$parsed.textDecoration:="underline"
209+
: (($style.textDecoration & 8)>0)
210+
$parsed.textDecoration:="double underline"
211+
End case
212+
213+
If (($style.textDecoration & 2)>0)
214+
$parsed.textDecoration:=$parsed.textDecoration+" line-through"
215+
End if
216+
217+
If (($style.textDecoration & 4)>0)
218+
$parsed.textDecoration:=$parsed.textDecoration+" overline"
219+
End if
220+
214221
End if
222+
: (Value type:C1509($style.textDecoration)=Is null:K8:31)
215223

216-
If (($style.textDecoration & 4)>0)
217-
$parsed.textDecoration:=$parsed.textDecoration+" overline"
218-
End if
224+
$parsed.textDecoration:="$4D_tdnull"
219225

220-
End if
221-
222-
End if
226+
End case
223227
End if
224228

225229
If ($parsed.isVerticalText=2)

0 commit comments

Comments
 (0)