-
-
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-21771: Word Export – support indenting for groups #58
Conversation
This change will also fix indenting for any other node type that has an ancestor with indenting. Which doesn’t seem common, usually it’s zero or the ancestor does not have a paragraph style. Notes: - The only line of code in WordStylesGenerator.cs that changes logic is in CalculateMarginLeft() where I changed: leadingIndent -= ancestorMargin + hangingIndent; to: leadingIndent -= hangingIndent; The rest of the changes are all cleanup, most of then related to no longer needing to calculate ancestorMargin. - The AddStyles() call that was removed from GenerateGroupingNode() was a duplicate call. Change-Id: I1a1301c5b5444056119c915816f0c2a66d861a6a
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 2 of 2 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @mark-sil)
Src/xWorks/WordStylesGenerator.cs
line 817 at r1 (raw file):
/// <summary> /// Calculate the left margin. /// Note that for Word Styles the left margin value is not going to later on be combined with its
This sentence is awkward, is this alternative accurate?
'Note that in Word Styles the left margin is not combined with its ancestor so no adjustment is necessary.'
This change will also fix indenting for any other node type that has an ancestor with indenting. Which doesn’t seem common, usually it’s zero or the ancestor does not have a paragraph style. Notes: - The only line of code in WordStylesGenerator.cs that changes logic is in CalculateMarginLeft() where I changed: leadingIndent -= ancestorMargin + hangingIndent; to: leadingIndent -= hangingIndent; The rest of the changes are all cleanup, most of then related to no longer needing to calculate ancestorMargin. - The AddStyles() call that was removed from GenerateGroupingNode() was a duplicate call. Change-Id: I3522b48daa58bb4bd852270461236f6e9726ff9d
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: 1 of 2 files reviewed, all discussions resolved (waiting on @jasonleenaylor)
Src/xWorks/WordStylesGenerator.cs
line 817 at r1 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
This sentence is awkward, is this alternative accurate?
'Note that in Word Styles the left margin is not combined with its ancestor so no adjustment is necessary.'
Yes, I agree. That sounds much better.
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)
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)
This change will also fix indenting for any other node type that has an ancestor with indenting. Which doesn’t seem common, usually it’s zero or the ancestor does not have a paragraph style.
Notes:
leadingIndent -= ancestorMargin + hangingIndent;
to:
leadingIndent -= hangingIndent;
The rest of the changes are all cleanup, most of them related to no longer needing to calculate ancestorMargin.
This change is