Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word Export Style Display Names #84

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

mark-sil
Copy link
Contributor

@mark-sil mark-sil commented Jun 19, 2024

This submission adds support for displaying the style Display Name in the Word Styles dialog (instead of displaying the style Id).

This addresses the main cases; more work is needed to handle the ‘normal’ styles, “Dictionary-Normal”, abbreviations, paragraph Styles properties, and the possibility of the same Display Name being used by different style Ids.


This change is Reviewable

This submission adds support for displaying the style Display
Name in the Word Styles dialog (instead of displaying the style
Id).

This addresses the main cases; more work is need to handle the
‘normal’ styles, “Dictionary-Normal”, abbreviations, paragraph
Styles properties, and the possibility of the same Display Name
Being used by different style Ids.

Change-Id: I0271f97a0e0640c88a7be81a0281b84a079aea2c
@jasonleenaylor
Copy link
Contributor

Src/xWorks/WordStylesGenerator.cs line 350 at r1 (raw file):

						if (!string.IsNullOrEmpty(configNode.Style))
						{
							if (configNode.StyleType == ConfigurableDictionaryNode.StyleTypes.Paragraph)

So where do Character styles get handled?

Copy link
Contributor Author

@mark-sil mark-sil left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @jasonleenaylor)


Src/xWorks/WordStylesGenerator.cs line 350 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…

So where do Character styles get handled?

Most of the character styles are added to the _styleDictionary when they are first referenced. An example is in AddRun(). When we add support for styles with different properties but the same DisplayName, I think it is going to be easier to move all style creation to when it's first referenced. If we don't then I think we are going to have a difficult time trying to determine when to use a style like 'Definition1' instead of 'Definition'.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)

@JakeOliver28 JakeOliver28 merged commit bfeb515 into release/9.1 Jun 19, 2024
5 checks passed
@JakeOliver28 JakeOliver28 deleted the WordDisplayNames branch June 19, 2024 17:01
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.

3 participants