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-21778: Fix image textframe styles #44

Merged
merged 1 commit into from
May 7, 2024
Merged

LT-21778: Fix image textframe styles #44

merged 1 commit into from
May 7, 2024

Conversation

mark-sil
Copy link
Contributor

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

Fixed the problem with the continuation style being written to paragraphs containing images/captions (instead of the textframe style being written).
To prevent the problem with the paragraph following the image/caption from using the textframe style, we now base the continuation style on the first paragraph instead of the last.

Change-Id: Ibae531ebf142719d55b912efe72746299a1ce642


This change is Reviewable

Fixed the problem with the continuation style being written to
paragraphs containing images/captions (instead of the textframe
style being written).
To prevent the problem with the paragraph following the
image/caption from using the textframe style, we now base the
continuation style on the first paragraph instead of the last.

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

@jasonleenaylor
Copy link
Contributor

Src/xWorks/LcmWordGenerator.cs line 1217 at r1 (raw file):

								}

								wordWriter.WordFragment.GetNewParagraph();

Why is this better? (I just want to know if I end up working on any of these)

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:

:lgtm:

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

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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)


Src/xWorks/LcmWordGenerator.cs line 1217 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…

Why is this better? (I just want to know if I end up working on any of these)

If we call AppendToParagraph() and pass true to force a new paragraph, then the new paragraph will have the continuation style. In this situation we want the PictureAndCaptionTextframeStyle, but the LinkParaStyle() call two lines later does not overwrite a style that is already set. So, by creating our own new paragraph and just appending the run to it, we are able to set the style that we want.

@mark-sil mark-sil merged commit 540ff24 into release/9.1 May 7, 2024
5 checks passed
@mark-sil mark-sil deleted the LT-21778 branch May 7, 2024 19:38
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