Few additions and fixes spread over 4 bigger changes provided by community.
- Change Nr 1
Few changes were made to allow to set the column widths for a table, on table level instead for each single cell.
The following methods/properties have been added:
- ColumnWidths - Returns a list (Of Double) with the width of all columns
- GetColumnWidth - Returns the width to a given single column index
- SetColumnWidth - Sets the column width to a given index
Property "AutoFit" has been modified to use the fixed table width; AutoFit will be set to "Fixed" if method "SetColumnWidth" is called.
Furthermore the enumeration: "AutoFit" got an addtional value: "Fixed".
If you apply a width on table level; the cell width value will be removed for all table cells!
- Change Nr 2
This one is a performance boost for cases where docs have lots of paragraphs inserted (through tables or whatever)...
In the case that I found the issue, I was creating a report that added a lot of plain text paragraphs followed by lots of tables.. (creating a 40 page doc)
(the fix is to avoid using the Paragraphs collection to get the one that was just added.. it fixes the reference to the "mainPart" so things like images that are added still work... )
All unit tests pass after this test (did have to fix some case issues with the one that does text replacements though)
-fix for default column widths (also works when column widths are not specified) - issue that was breaking tables with more than 14 cols
-New table method to set the widths for variable row tables... you can call Table.SetWidths(float  yourWidthsInPixels) then for each row added those cols will have that width applied.. can help clean up some code.. also caches the column count for performance..
- Change for DocX that turns on zip compression for the parts of the doc (created docs are as small as re-saved versions from word now)
- Change Nr 3
Change to add support for paragraph:
- "Keep With Next"
- "Keep Lines Together"
Also fixes an issue with:
Also 2 examples for Keep With Next and Keep Lines Together added into Exampels.
- Change Nr 4
Support for height in the Tables (SetHeight, MinHeight)
- Change Nr 5
Added numbers in UnderlineStyle to the original word automation model enum numbers(WdUnderline).
- Change Nr 6
Adding unit tests showing the table methods:
Converted UnitTests and added them as Examples as well.