|
|
@ -326,13 +326,13 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
let textContent = {}; |
|
|
|
textContent.values = []; |
|
|
|
|
|
|
|
let fontset, cancelLine="0", underLine="0", isInline=false, value, inlineStringArr=[]; |
|
|
|
let fontset, cancelLine="0", underLine="0", fontSize=11, isInline=false, value, inlineStringArr=[]; |
|
|
|
if(isInlineStringCell(cell)){ |
|
|
|
let sharedStrings = cell.ct.s, similarIndex = 0; |
|
|
|
for(let i=0;i<sharedStrings.length;i++){ |
|
|
|
let shareCell = sharedStrings[i]; |
|
|
|
let scfontset = luckysheetfontformat(shareCell); |
|
|
|
let fc = shareCell.fc, cl=shareCell.cl,un = shareCell.un, v = shareCell.v; |
|
|
|
let fc = shareCell.fc, cl=shareCell.cl,un = shareCell.un, v = shareCell.v, fs=shareCell.fs; |
|
|
|
v = v.replace(/\r\n/g, "_x000D_").replace(/ /g, "_x000D_").replace(/\r/g, "_x000D_").replace(/\n/g, "_x000D_"); |
|
|
|
let splitArr = v.split("_x000D_"), preNewValue=null; |
|
|
|
for(let x=0;x<splitArr.length;x++){ |
|
|
@ -344,7 +344,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
fc:fc==null?"#000":fc, |
|
|
|
cl:cl==null?0:cl, |
|
|
|
un:un==null?0:un, |
|
|
|
wrap:true |
|
|
|
wrap:true, |
|
|
|
fs:fs==null?11:fs, |
|
|
|
}); |
|
|
|
similarIndex++; |
|
|
|
} |
|
|
@ -359,7 +360,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
cl:cl==null?0:cl, |
|
|
|
un:un==null?0:un, |
|
|
|
v: nv, |
|
|
|
si:similarIndex |
|
|
|
si:similarIndex, |
|
|
|
fs:fs==null?11:fs, |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
@ -370,7 +372,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
fc:fc==null?"#000":fc, |
|
|
|
cl:cl==null?0:cl, |
|
|
|
un:un==null?0:un, |
|
|
|
wrap:true |
|
|
|
wrap:true, |
|
|
|
fs:fs==null?11:fs, |
|
|
|
}); |
|
|
|
similarIndex++; |
|
|
|
} |
|
|
@ -391,6 +394,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
|
|
|
|
cancelLine = checkstatusByCell(cell ,"cl");//cancelLine
|
|
|
|
underLine = checkstatusByCell(cell ,"un");//underLine
|
|
|
|
fontSize = checkstatusByCell(cell ,"fs"); |
|
|
|
|
|
|
|
if(cell instanceof Object){ |
|
|
|
value = cell.m; |
|
|
@ -609,7 +613,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
left:left, |
|
|
|
top:top+word.height-space_height, |
|
|
|
asc:word.height, |
|
|
|
desc:0 |
|
|
|
desc:0, |
|
|
|
fs:fontSize |
|
|
|
}); |
|
|
|
|
|
|
|
textContent.values.push(word); |
|
|
@ -662,6 +667,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
asc:sc.measureText.actualBoundingBoxAscent, |
|
|
|
desc:sc.measureText.actualBoundingBoxDescent, |
|
|
|
inline:true, |
|
|
|
fs:sc.fs |
|
|
|
} |
|
|
|
|
|
|
|
// if(rt!=0){//rotate
|
|
|
@ -691,6 +697,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
desc:measureText.actualBoundingBoxDescent, |
|
|
|
inline:true, |
|
|
|
wrap:true, |
|
|
|
fs:sc.fs |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -738,6 +745,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
asc:sc.measureText.actualBoundingBoxAscent, |
|
|
|
desc:sc.measureText.actualBoundingBoxDescent, |
|
|
|
inline:true, |
|
|
|
fs:sc.fs |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -761,6 +769,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
asc:sc.measureText.actualBoundingBoxAscent, |
|
|
|
desc:sc.measureText.actualBoundingBoxDescent, |
|
|
|
inline:true, |
|
|
|
fs:sc.fs |
|
|
|
}); |
|
|
|
} |
|
|
|
break; |
|
|
@ -790,6 +799,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
asc:sc.measureText.actualBoundingBoxAscent, |
|
|
|
desc:sc.measureText.actualBoundingBoxDescent, |
|
|
|
inline:true, |
|
|
|
fs:sc.fs |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -813,6 +823,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
asc:sc.measureText.actualBoundingBoxAscent, |
|
|
|
desc:sc.measureText.actualBoundingBoxDescent, |
|
|
|
inline:true, |
|
|
|
fs:sc.fs |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -857,7 +868,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
height:preTextHeight, |
|
|
|
width:preTextWidth, |
|
|
|
asc:measureText.actualBoundingBoxAscent, |
|
|
|
desc:measureText.actualBoundingBoxDescent |
|
|
|
desc:measureText.actualBoundingBoxDescent, |
|
|
|
fs:fontSize, |
|
|
|
}); |
|
|
|
|
|
|
|
splitIndex +=1; |
|
|
@ -876,7 +888,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
height:textHeight, |
|
|
|
width:textWidth, |
|
|
|
asc:measureText.actualBoundingBoxAscent, |
|
|
|
desc:measureText.actualBoundingBoxDescent |
|
|
|
desc:measureText.actualBoundingBoxDescent, |
|
|
|
fs:fontSize, |
|
|
|
}); |
|
|
|
break; |
|
|
|
} |
|
|
@ -901,7 +914,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
top:0, |
|
|
|
splitIndex:splitIndex, |
|
|
|
asc:measureText.actualBoundingBoxAscent, |
|
|
|
desc:measureText.actualBoundingBoxDescent |
|
|
|
desc:measureText.actualBoundingBoxDescent, |
|
|
|
fs:fontSize, |
|
|
|
}); |
|
|
|
|
|
|
|
splitIndex +=1; |
|
|
@ -919,7 +933,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
top:0, |
|
|
|
splitIndex:splitIndex, |
|
|
|
asc:measureText.actualBoundingBoxAscent, |
|
|
|
desc:measureText.actualBoundingBoxDescent |
|
|
|
desc:measureText.actualBoundingBoxDescent, |
|
|
|
fs:fontSize, |
|
|
|
}); |
|
|
|
|
|
|
|
break; |
|
|
@ -1095,7 +1110,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
left:left-wordGroup.width, |
|
|
|
top:top, |
|
|
|
asc:size.asc, |
|
|
|
desc:size.desc |
|
|
|
desc:size.desc, |
|
|
|
fs:wordGroup.fs |
|
|
|
}); |
|
|
|
|
|
|
|
textContent.values.push(wordGroup); |
|
|
@ -1178,7 +1194,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
left:left, |
|
|
|
top:top, |
|
|
|
asc:size.asc, |
|
|
|
desc:size.desc |
|
|
|
desc:size.desc, |
|
|
|
fs:wordGroup.fs |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
@ -1208,7 +1225,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
left:left, |
|
|
|
top:top, |
|
|
|
asc:size.asc, |
|
|
|
desc:size.desc |
|
|
|
desc:size.desc, |
|
|
|
fs:wordGroup.fs |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -1356,7 +1374,8 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
left:left, |
|
|
|
top:top, |
|
|
|
asc:measureText.actualBoundingBoxAscent, |
|
|
|
desc:measureText.actualBoundingBoxDescent |
|
|
|
desc:measureText.actualBoundingBoxDescent, |
|
|
|
fs:fontSize, |
|
|
|
}); |
|
|
|
|
|
|
|
textContent.values.push(wordGroup); |
|
|
@ -1376,7 +1395,7 @@ function getCellTextInfo(cell , ctx, option){ |
|
|
|
|
|
|
|
|
|
|
|
function drawLineInfo(wordGroup, cancelLine,underLine,option){ |
|
|
|
let left = option.left, top = option.top, width=option.width, height = option.height, asc = option.asc,desc = option.desc; |
|
|
|
let left = option.left, top = option.top, width=option.width, height = option.height, asc = option.asc,desc = option.desc,fs = option.fs; |
|
|
|
|
|
|
|
if(wordGroup.wrap===true){ |
|
|
|
return; |
|
|
@ -1395,6 +1414,8 @@ function drawLineInfo(wordGroup, cancelLine,underLine,option){ |
|
|
|
wordGroup.cancelLine.endX = left + width; |
|
|
|
wordGroup.cancelLine.endY = top-asc/2+1; |
|
|
|
|
|
|
|
wordGroup.cancelLine.fs = fs; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(underLine!="0"){ |
|
|
@ -1407,6 +1428,8 @@ function drawLineInfo(wordGroup, cancelLine,underLine,option){ |
|
|
|
item.endX = left + width; |
|
|
|
item.endY = top; |
|
|
|
|
|
|
|
item.fs = fs; |
|
|
|
|
|
|
|
wordGroup.underLine.push(item); |
|
|
|
} |
|
|
|
|
|
|
@ -1418,6 +1441,8 @@ function drawLineInfo(wordGroup, cancelLine,underLine,option){ |
|
|
|
item.endX = left + width; |
|
|
|
item.endY = top+desc; |
|
|
|
|
|
|
|
item.fs = fs; |
|
|
|
|
|
|
|
wordGroup.underLine.push(item); |
|
|
|
} |
|
|
|
|
|
|
@ -1429,6 +1454,8 @@ function drawLineInfo(wordGroup, cancelLine,underLine,option){ |
|
|
|
item.endX = left + width; |
|
|
|
item.endY = top+desc; |
|
|
|
|
|
|
|
item.fs = fs; |
|
|
|
|
|
|
|
wordGroup.underLine.push(item); |
|
|
|
} |
|
|
|
|
|
|
@ -1440,6 +1467,8 @@ function drawLineInfo(wordGroup, cancelLine,underLine,option){ |
|
|
|
item.endX = left + width; |
|
|
|
item.endY = top+desc+2; |
|
|
|
|
|
|
|
item.fs = fs; |
|
|
|
|
|
|
|
wordGroup.underLine.push(item); |
|
|
|
} |
|
|
|
} |
|
|
|