-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
LT-21785: Add more style support #77
Conversation
- When a run is created set the style name. (It may get modified with basedOn information as we get other notifications.) - Add styles during run creation. - Allow styles to be based on other styles, which can be based on other styles… - Support different styles on different document fragments. TODO: A remaining task is to change the style names from the config.Style to the config.DisplayLabel. This will improve the style names that appear in Word. At that time we will need to add additional code to generate a unique style name if the properties of a style are different. Change-Id: I12b308232559b4845970d0b345a840ae230f7534
I'm not sure what this bit on the comment is about. |
I'm wondering if we should also include this logic in AddRun? Code quote: string styleName = style.StyleId;
if (!_styleDictionary.ContainsKey(styleName))
{
_styleDictionary[styleName] = style;
}
// If the content is the same, we don't need to do anything--the style is already in the dictionary.
// But if the content is NOT the same, re-name this style and add it to the dictionary.
else if (!WordStylesGenerator.AreStylesEquivalent(_styleDictionary[styleName], style))
{
// Otherwise get a unique but useful style name and re-name the style
styleName = GetBestUniqueNameForNode(_styleDictionary, node);
style.StyleId = styleName;
style.StyleName = new StyleName() { Val = styleName };
_styleDictionary[styleName] = style;
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)
Src/xWorks/LcmWordGenerator.cs
line 253 at r1 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
I'm not sure what this bit on the comment is about.
custom fields are an example that will hit this code. I'll clarify the comment.
- When a run is created set the style name. (It may get modified with basedOn information as we get other notifications.) - Add styles during run creation. - Allow styles to be based on other styles, which can be based on other styles… - Support different styles on different document fragments. TODO: A remaining task is to change the style names from the config.Style to the config.DisplayLabel. This will improve the style names that appear in Word. At that time we will need to add additional code to generate a unique style name if the properties of a style are different. Change-Id: I6b993e1f83b41a0ff2fb05afa1410ff336110427
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)
TODO:
A remaining task is to change the style names from the config.Style to the config.DisplayLabel. This will improve the style names that appear in Word. At that time we will need to add additional code to generate a unique style name if the properties of a style are different.
This change is