@@ -571,23 +571,25 @@ bodyPartToBlocks (Tbl cap _ look (r:rs)) = do
571 True | null rs -> (Nothing, [r])
571 True | null rs -> (Nothing, [r])
572 | otherwise -> (Just r, rs)
572 | otherwise -> (Just r, rs)
573 False -> (Nothing, r:rs)
573 False -> (Nothing, r:rs)
575+ cells <- mapM rowToBlocksList rows
577+ let width = case cells of
574 hdrCells <- case hdr of
582 hdrCells <- case hdr of
575 Just r' -> rowToBlocksList r'
583 Just r' -> rowToBlocksList r'
576− Nothing -> return []
584+ Nothing -> return $ replicate width mempty
578− cells <- mapM rowToBlocksList rows
580− let size = case null hdrCells of
581− True -> length $ head cells
582− False -> length $ hdrCells
584 -- The two following variables (horizontal column alignment and
586 -- The two following variables (horizontal column alignment and
585 -- relative column widths) go to the default at the
587 -- relative column widths) go to the default at the
586 -- moment. Width information is in the TblGrid field of the Tbl,
588 -- moment. Width information is in the TblGrid field of the Tbl,
587 -- so should be possible. Alignment might be more difficult,
589 -- so should be possible. Alignment might be more difficult,
588 -- since there doesn't seem to be a column entity in docx.
590 -- since there doesn't seem to be a column entity in docx.
589− alignments = replicate size AlignDefault
591+ let alignments = replicate width AlignDefault
590− widths = replicate size 0 :: [Double]
592+ widths = replicate width 0 :: [Double]
592 return $ table caption (zip alignments widths) hdrCells cells
594 return $ table caption (zip alignments widths) hdrCells cells
593bodyPartToBlocks (OMathPara e) = do
595bodyPartToBlocks (OMathPara e) = do