Skip to content

Commit

Permalink
[ve] Add cell existance check
Browse files Browse the repository at this point in the history
  • Loading branch information
fedek1324 committed Feb 14, 2025
1 parent 258e361 commit 5445a54
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions visio/model/ooxmlApi/convertFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,12 @@
AscCommon.consoleLog("horizontal align cell was not found so default is set (left)");
}

// handle bullet list
let bulletTypeCell = paragraphPropsFinal && paragraphPropsFinal.getCell("Bullet");
let bulletType = bulletTypeCell.getNumberValue();
let bulletType;
if (bulletTypeCell) {
bulletType = bulletTypeCell.getNumberValue();
}

let bulletChar;
let bulletFont;
Expand Down Expand Up @@ -420,8 +424,12 @@
bulletFont = "Wingdings";
}

// handle left indentation
let indentationLeftCell = paragraphPropsFinal && paragraphPropsFinal.getCell("IndLeft");
let indentationLeft = indentationLeftCell.getNumberValue() * AscCommonWord.g_dKoef_in_to_mm;
let indentationLeft;
if (indentationLeftCell) {
indentationLeft = indentationLeftCell.getNumberValue() * AscCommonWord.g_dKoef_in_to_mm;
}



Expand Down Expand Up @@ -450,8 +458,8 @@
paragraph.Pr.SetJc(horizontalAlign);

// // CPresentationBullet
paragraph.Pr.Bullet = new AscFormat.CBullet();
if (bulletChar) {
paragraph.Pr.Bullet = new AscFormat.CBullet();
// smth wrong with Symbol font see:
// https://disk.yandex.ru/d/uNQ2eMfNyVtUFQ // https://disk.yandex.ru/i/2a0drnBXaVxJNw
// paragraph.Pr.Bullet.fillBulletFromCharAndFont(bulletChar, bulletFont);
Expand Down

0 comments on commit 5445a54

Please sign in to comment.