Skip to content

DEV-26740 Improvements when importing cells, images, links and styles#68

Merged
harvestcore merged 10 commits into
developfrom
DEV-26740
Apr 21, 2026
Merged

DEV-26740 Improvements when importing cells, images, links and styles#68
harvestcore merged 10 commits into
developfrom
DEV-26740

Conversation

@luiisgallego

@luiisgallego luiisgallego commented Apr 16, 2026

Copy link
Copy Markdown
  • Borders properties have been added for cells. Custom borders are now processed per cell.
  • Images: Set the relationship when the image is imported.
  • Hyperlink: Set the URL when importing based on the relationship ID.
  • Two unknown relationships have been added: 'thumbnail' and 'stylesWithEffects'.
  • Publicly exposed default styles.

Comment thread lib/files/src/DocumentXml.ts
Comment thread lib/files/src/DocumentXml.ts Outdated
* Use this with caution, as this XML may differ from the
* content of DocumentXml as soon as it is used.
*/
#initialRawXml: Document | null = null;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rename this to xml.

Comment thread lib/files/src/index.ts Outdated
Comment thread lib/files/src/StylesXml.ts Outdated
Comment thread lib/enums.ts
@harvestcore

Copy link
Copy Markdown
Collaborator

LGTM, but please take a look at the comments.

@luiisgallego

Copy link
Copy Markdown
Author

All your suggestions have been added! @harvestcore

@harvestcore harvestcore left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

"shading": ./${QNS.w}tcPr/${QNS.w}shd/docxml:ct-shd(.),
"borders": ./${QNS.w}tcPr/${QNS.w}tcBorders/map {
"top": docxml:ct-border(${QNS.w}top),
"start": docxml:ct-border((${QNS.w}start|${QNS.w}left)[1]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it take the first value? (same question for bottom too)

"shading": ./${QNS.w}tcPr/${QNS.w}shd/docxml:ct-shd(.),
"borders": ./${QNS.w}tcPr/${QNS.w}tcBorders/map {
"top": docxml:ct-border(${QNS.w}top),
"start": docxml:ct-border((${QNS.w}start|${QNS.w}left)[1]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also according to the schema border doesn't have any start or end child https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_tcBorders_topic_ID0EBWRR.html#topic_ID0EBWRR

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have talked with Luis and it seems that these are from an old schema. We can keep it for now, but I'd prefer the current schema tbh

@harvestcore harvestcore merged commit 750f004 into develop Apr 21, 2026
2 checks passed
@harvestcore harvestcore deleted the DEV-26740 branch April 22, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants