Skip to content

Commit 18c58b4

Browse files
committed
Fix grid vertical lines when converting to picture and there is explicitly no background set ACI0105520
1 parent 09cb7ac commit 18c58b4

File tree

2 files changed

+19
-33
lines changed

2 files changed

+19
-33
lines changed

Project/Sources/Methods/VP Convert to picture.4dm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var $lineObj; $obj; $defaultStyle : Object
1212
var $namedStyle; $workbook; $parsedStyle; $bcObj : Object
1313
var $strPart : Object
1414
var $svgSource; $svgRef; $elemRef : Text
15-
var $shrinkStr; $defaultFontSize; $fontSize; $valueStr; $defaultGridLineColor : Text
15+
var $shrinkStr; $defaultFontSize; $fontSize; $valueStr : Text
1616

1717
var $textWidth; $i; $index; $indexColWidth; $indexRowHeight; $rowCount; $colCount; $maxSvgWidth; $maxSvgHeight : Integer
1818
var $iterX; $iterY; $svgHeight; $svgWidth; $x1; $x2; $y1; $y2; $height; $width : Integer
@@ -32,8 +32,6 @@ var $visible; $condition; $cascadingStyleSheet; $borderOrientation; $drawLine; $
3232
// MARK:- Initialize Objects and Constants
3333
$bcObj:=New object:C1471("bcGrid"; New object:C1471; "bcCol"; New collection:C1472)
3434

35-
$defaultGridLineColor:="rgb(212,212,212)"
36-
3735
svg_defineColorConstant
3836

3937
/// CONSTANTS VALUES ///

Project/Sources/Methods/svg_drawGridline.4dm

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
//%attributes = {"invisible":true,"preemptive":"capable"}
2-
C_TEXT:C284($svgRef; $1)
3-
C_OBJECT:C1216($lineObj; $2; $bcObj; $3; $range; $4; $gridInfo; $7)
4-
C_POINTER:C301($colPos; $5; $rowPos; $6)
5-
C_COLLECTION:C1488($mergeTab; $8)
6-
7-
$svgRef:=$1
8-
$lineObj:=$2
9-
$bcObj:=$3
10-
$range:=$4
11-
$colPos:=$5
12-
$rowPos:=$6
13-
$gridInfo:=$7
14-
$mergeTab:=$8
15-
16-
C_TEXT:C284($color)
17-
C_OBJECT:C1216($cellMergeStatus)
2+
#DECLARE($svgRef : Text; $lineObj : Object; $bcObj : Object; $range : Object; $colPos : Pointer; $rowPos : Pointer; $gridInfo : Object; $mergeTab : Collection)
183

4+
var $color : Text
195
$color:="rgb(212,212,212)"
206

217
Case of
@@ -27,8 +13,7 @@ Case of
2713
ASSERT:C1129(Structure file:C489#Structure file:C489(*); "grid info.color is not a text value")
2814
End case
2915

30-
C_BOOLEAN:C305($drawVGrid)
31-
16+
var $drawVGrid : Boolean
3217
$drawVGrid:=True:C214
3318

3419
Case of
@@ -38,8 +23,7 @@ Case of
3823
$drawVGrid:=$gridInfo.showVerticalGridline
3924
End case
4025

41-
C_BOOLEAN:C305($drawHGrid)
42-
26+
var $drawHGrid : Boolean
4327
$drawHGrid:=True:C214
4428

4529
Case of
@@ -49,13 +33,14 @@ Case of
4933
$drawHGrid:=$gridInfo.showHorizontalGridline
5034
End case
5135

36+
var $cellMergeStatus : Object
37+
var $elemRef : Text
38+
var $X; $Y : Integer
39+
5240
If ($drawHGrid)
5341

54-
C_LONGINT:C283($X; $Y)
55-
C_OBJECT:C1216($lineH)
56-
C_BOOLEAN:C305($noBgH)
57-
C_BOOLEAN:C305($noBrdH)
58-
C_TEXT:C284($elemRef)
42+
var $lineH : Object
43+
var $noBgH; $noBrdH : Boolean
5944

6045
For ($Y; $range.y1; $range.y2+1)
6146

@@ -151,9 +136,8 @@ End if
151136

152137
If ($drawVGrid)
153138

154-
C_OBJECT:C1216($lineV)
155-
C_BOOLEAN:C305($noBgV)
156-
C_BOOLEAN:C305($noBrdV)
139+
var $lineV : Object
140+
var $noBgV; $noBrdV : Boolean
157141

158142
For ($X; $range.x1; $range.x2+1)
159143

@@ -169,10 +153,14 @@ If ($drawVGrid)
169153
If ($bcObj.bcGrid#Null:C1517)
170154
If ($bcObj.bcGrid[String:C10($Y)]#Null:C1517)
171155
If ($bcObj.bcGrid[String:C10($Y)][String:C10($X)]#Null:C1517)
172-
$noBgV:=False:C215
156+
If (String:C10($bcObj.bcGrid[String:C10($Y)][String:C10($X)].col)#"$4D_NOCOLOR")
157+
$noBgV:=False:C215
158+
End if
173159
End if
174160
If ($bcObj.bcGrid[String:C10($Y)][String:C10($X-1)]#Null:C1517)
175-
$noBgV:=False:C215
161+
If (String:C10($bcObj.bcGrid[String:C10($Y)][String:C10($X-1)].col)#"$4D_NOCOLOR")
162+
$noBgV:=False:C215
163+
End if
176164
End if
177165
End if
178166
End if

0 commit comments

Comments
 (0)