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

LT-21771: Word Export – support indenting for groups #58

Merged
merged 3 commits into from
May 20, 2024

Conversation

mark-sil
Copy link
Contributor

@mark-sil mark-sil commented May 15, 2024

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 them related to no longer needing to calculate ancestorMargin.

  • The AddStyles() call that was removed from GenerateGroupingNode() was a duplicate call.

This change is Reviewable

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
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.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: 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.'

mark-sil and others added 2 commits May 16, 2024 07:46
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
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: 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.

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 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)

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.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)

@jasonleenaylor jasonleenaylor merged commit 796784b into release/9.1 May 20, 2024
5 checks passed
@jasonleenaylor jasonleenaylor deleted the LT-21771a branch May 20, 2024 23: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.

2 participants