Skip to content

Conversation

@pull
Copy link

@pull pull bot commented May 14, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

mark-sil and others added 23 commits April 25, 2024 15:34
* LT-21761 & LT-21674: Handle Before, Between, After and more

Handle Before, Between, After, and DisplayInSeparateParagraphs.
Remaining tasks:
- Tables still need indenting.
- The first line after a table is shifted to the left. A new
‘continuation’ style is needed when we start a new paragraph.
- Before, Between, and After might need to use a different style.
* Dispose and recreate the FocusBoxController if the writing system has changed
- Add based on property when generating styles from LCM
stylesheet that have based on specified in FLEx. (LT-21769)

- Edit styleDictionary to store individual styles
instead of groups of styles.

- Revise AddStyles so it adds each style one time only,
using the stylenames instead of css classes as the
dictionary keys.

NOTE: In the Word export, the style dictionary should save
each style individually rather than a collection of
styles associated with a given css class.
Otherwise, any given style may be added to the styles xml
multiple times, once for each css class using that style.

Remaining task:
- Homograph-Number style is still being duplicated. It is
handled in a different function and requires its own fix.
…er (#34)

* Add NUnit3TestAdapter nuget package to our build
* Use the adapter in the ITextTests project

Co-authored-by: name <[email protected]>
* LT-21761: Add Table indenting and right justification

Use the table parent as the basis.

Change-Id: I9e49a9570c7c9d09696e1bb4c4ba22636e5cb1af
* Change to liblcm beta0089
* Add sorted list of choices based on prioritization from liblcm
Change-Id: I3c558a1a9337dfa2bf11ae21133fb49df2461f14
* LT-21761: Fix indenting for the first line after a Table

The first line of an entry typically uses FirstLineIndent to
indented to the left. When we have multiple paragraphs for an
entry (because the entry contains Tables or Pictures)
then we do not want the line following the Table or Picture to
also be indented to the left. We now create a ‘continuation’
style for paragraphs following a table or picture.  It is the
same as the original style except it does not use FirstLineIndent.
- When starting a run, add a writing system style
if the run has a WS specified.

- If the run should have an additional style associated
with it, replace the writing system style with a link to
the writing system specific version of the additional style.

- Use RunFonts object instead of Font object
to specify fonts for character styles in word
Add a new attribute to analysis in the export when they are guesses not yet accepted by the user
---------
Co-authored-by: Jason Naylor <[email protected]>
- Comment out handling of borders in Word Export

Borders do not currently display in FLEx.
But once a border is added to a style in FLEx, deselecting
the border does not actually remove the border object from
the FLEx style. This means if a border has ever been added
in FLEx, it will still exist in the configuration node
and be added in the word export. Until this is fixed, we
should disable borders in the word export.
Fixed the problem with the continuation style being written to
paragraphs containing images/captions (instead of the textframe
style being written).
Also, 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.
When we are creating references to writing styles, don’t add
a language tag to the style if it is a magic ws.
When we are creating the style, don’t create a ws specific style
for a magic ws.
There are no logic changes in this PR, just cleanup.
- Changed the name of some methods.
- Changed eachInAParagraph to eachOnANewLine. For Word Export a
Paragraph is a class and carries a specific meaning. We are not
putting the data in a separate OpenXml.Wordprocessing.Paragraph,
just starting a new line. So I changed the names to try and
reduce confusion.
-	Support multiple groups on a single lex entry.
-	Support before and after.
-	Support displaying each group on a new line.
-	Support the group style.

Remaining tasks:
-	Need to add support for indenting when each group is
displayed on a new line.
@pull pull bot added the ⤵️ pull label May 15, 2024
jtmaxwell3 and others added 6 commits May 15, 2024 12:25
…54)

* Also fix undesired behavior in Sandbox and update liblcm

---------

Co-authored-by: Jason Naylor <[email protected]>
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.
* Pass a fragment to AddLexReferences and AddCollection

Converting the fragment to a string was resulting in the
loss of all styling for Word Export.  Now we pass the
content fragment to both AddLexReferences() and AddCollection().
The xhtml and json generators do the conversion to a string.
jtmaxwell3 and others added 30 commits December 12, 2024 09:46
…237)

* Complete work for LT-21963
* Add new build task for copying locale
* Add 'zlm' to the installer

---------

Co-authored-by: John Maxwell <[email protected]>
* Add unit test showing the failure in LT-22017

* LT-22017: Suppress between content inside a multirun string

---------

Co-authored-by: Ariel Rorabaugh <[email protected]>
- Use .net framework 462 for palaso and chorus
- For Chorus, modify the versions for the specific package names
  instead of everything that begins with SIL.Chorus. This
  prevents modifying the version of SIL.Chorus.l10ns

A remaining task is to either remove the line containing
  "SIL.Core" version="8.1.0-beta0035"
from packages.config, or modify the sed command so that it
does not change this version number.
* Word Export: prevent cross-thread exception

Use InvokeRequired and Invoke to re-execute the TextForReal call.

Notes:
- XHTML export is also calling this from a different thread but we
were not seeing this error because the text string was the same
as the current value so no change was made.
- The exception was only happening when there were reversals
and it seemed to only/mostly happen in debug builds.
* LT-22021 Add documentation for export to Word

Added access to Publishing Flex dictionaries via Word

Change-Id: I1c2beaaa92f18b07ef8d6ab7764edaad48a4b2c2

* Replaced OnHelpPublishToWord

---------

Co-authored-by: Ken Zook <[email protected]>
Co-authored-by: Mark Kidder <[email protected]>
* LT-22025: Fix font issues in image captions

Root problem is that some image caption component styles
were not based on writing system styles in the Word export.

* Create function "GenerateContentForSimpleString" that gets a
writing system and passes it to AddProperty to generate the
string property content.
* Use first analysis language as the default writing system
for string properties.
* In AddProperty, use AddRun with the writing system to
get/create a style that is based on the writing system.
* Delete unused WriteElementContents method.
* This work also exposed incorrect logic for missing licenses
  on Webonary upload
Fix logic for determining at least and exact line spacing
in the Word Export.
- Keep the node path back to the root in the css file.  This is
needed to ensure that styles are applied from the most specific
(leaf node) to the lease specific (root node).
- All node names now have a unique identifier.  This is to
prevent the wrong style from being used when nodes have the same
display name (ie. Headword) but are located at different places
in the tree. Without the unique identifier a node without a style
could end up using a style from a different node with the same
display name. With unique names, a node without a style will look
to its parent node for style information, and then it’s
grandparent node, … up to the root.
- The change in RemoveBeforeAndAfterForNoteInParaRules(): Changed
the method so that we keep non-before/after rules. This fixes a
problem with notes that should be in their own paragraph, not
displaying correctly in Flex.

Additional cleanup still needed for the .css files (these issues
existed before this PR):
- We are currently creating multiple css entries with the same
fields but different values.  In this case we always use the
values from the last entry in the file.  We need to figure out
why we are doing this and either support the intended behavior
in a different way or remove the duplicates.
Example: ‘.subentries .subentry{}’ is written multiple times
with the same 12 fields. The only field that ever changes
value is ‘margin-left’.

- Sometimes we are removing the last letter from entry names in
the css file for ‘between’ content. Need to investigate if this
currently works to provide ‘between’ content.
Example: .headword> .headwor+ .headwor:before{ content:', ';}
* LT-22042: Fix incorrect styles being used for subentries

The style information used for the nodes under
MainEntry->Subentries, is also used for
MainEntry->Senses->Subentries. Fix the problem so that we
now use the style information for both node paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants