What happened?
Some Word documents use document-specific identifiers for built-in styles. These identifiers can vary by language and document producer.
For example, a document's Heading 1 style might not use the identifier Heading1. It may use an identifier such as Ttulo1, Kop1, or 1.
When SuperDoc v1 imports these documents, it can add fallback styles even though the document already contains equivalent authored styles. This can cause:
- Customized headings or titles to use fallback formatting.
- Newly created headings to use a different style from existing headings.
- Authored and fallback versions of the same style to appear separately.
- Default paragraph formatting to be ignored when its identifier is not
Normal.
- Formatting to change after export and reopen.
Expected behavior:
- Existing content uses the exact style definitions referenced by the document.
- Built-in editing actions reuse the document's authored styles when available.
- Fallback styles are used only when the document does not provide an appropriate style.
- Style changes apply consistently across paragraphs, runs, tables, and other document content.
- Export and reopen preserve the same style references and formatting.
This behavior is not specific to Portuguese. It has also been reproduced with Arabic and Chinese Word documents.
Steps to reproduce
- Create a DOCX file in Word with customized Title and Heading styles.
- Use a document where the built-in styles have document-specific identifiers instead of identifiers such as
Heading1 and Normal.
- Import the document into SuperDoc v1.
- Compare the imported heading and title formatting with Microsoft Word.
- Insert a new Heading 1 paragraph.
- Compare the new heading with an existing Heading 1 paragraph.
- Export the document and reopen it.
- Observe that authored formatting can be replaced or separated from fallback styles added by SuperDoc.
SuperDoc version
Current v1 editor. The behavior is not believed to be limited to one v1 release.
Browser
Not browser-specific.
Additional context
PR #3807 identified a real interaction between imported styles and SuperDoc's fallback styles.
The proposed fix uses a list of localized aliases. That approach cannot cover every language because DOCX style identifiers are document-specific and can be arbitrary. Removing fallback styles based on aliases can also prevent newly created headings from finding a valid style.
This is planned for the v2 editor's style system rather than being addressed through a language-specific change in v1.
The original report includes a private document and private business context, so those materials are intentionally not attached. Minimized fixtures with generic text have been prepared for Portuguese, Arabic, Chinese, and linked-style catalog behavior.
Thanks to @replicant026 for identifying the problem and opening #3807.
localized-styles-arabic.docx
localized-styles-chinese.docx
localized-styles-portuguese.docx
styles-panel-linked-styles.docx
What happened?
Some Word documents use document-specific identifiers for built-in styles. These identifiers can vary by language and document producer.
For example, a document's Heading 1 style might not use the identifier
Heading1. It may use an identifier such asTtulo1,Kop1, or1.When SuperDoc v1 imports these documents, it can add fallback styles even though the document already contains equivalent authored styles. This can cause:
Normal.Expected behavior:
This behavior is not specific to Portuguese. It has also been reproduced with Arabic and Chinese Word documents.
Steps to reproduce
Heading1andNormal.SuperDoc version
Current v1 editor. The behavior is not believed to be limited to one v1 release.
Browser
Not browser-specific.
Additional context
PR #3807 identified a real interaction between imported styles and SuperDoc's fallback styles.
The proposed fix uses a list of localized aliases. That approach cannot cover every language because DOCX style identifiers are document-specific and can be arbitrary. Removing fallback styles based on aliases can also prevent newly created headings from finding a valid style.
This is planned for the v2 editor's style system rather than being addressed through a language-specific change in v1.
The original report includes a private document and private business context, so those materials are intentionally not attached. Minimized fixtures with generic text have been prepared for Portuguese, Arabic, Chinese, and linked-style catalog behavior.
Thanks to @replicant026 for identifying the problem and opening #3807.
localized-styles-arabic.docx
localized-styles-chinese.docx
localized-styles-portuguese.docx
styles-panel-linked-styles.docx