Docx writer: Use Compact style for empty table cells.
Otherwise we get overly tall lines when there are empty table cells and the other cells are compact. Closes #1353.
This commit is contained in:
parent
3c059dbe60
commit
557b302731
1 changed files with 3 additions and 1 deletions
|
@ -571,10 +571,12 @@ blockToOpenXML opts (Table caption aligns widths headers rows) = do
|
|||
[ mknode "w:tcBorders" []
|
||||
$ mknode "w:bottom" [("w:val","single")] ()
|
||||
, mknode "w:vAlign" [("w:val","bottom")] () ]
|
||||
let emptyCell = [mknode "w:p" [] [mknode "w:pPr" [] $
|
||||
[mknode "w:pStyle" [("w:val","Compact")] ()]]]
|
||||
let mkcell border contents = mknode "w:tc" []
|
||||
$ [ borderProps | border ] ++
|
||||
if null contents
|
||||
then [mknode "w:p" [] ()]
|
||||
then emptyCell
|
||||
else contents
|
||||
let mkrow border cells = mknode "w:tr" [] $ map (mkcell border) cells
|
||||
let textwidth = 7920 -- 5.5 in in twips, 1/20 pt
|
||||
|
|
Loading…
Add table
Reference in a new issue