aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-01-03 11:00:49 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-01-03 11:00:49 -0500
commit576ed3f41625c0b245ecbfdc47bf6d1878785365 (patch)
treec240a8133c0b323825ebbb5f5daaf324feb44733 /src/Text
parentdcc6e6b777ff6f35331118346ee2ebe845740e7e (diff)
downloadpandoc-576ed3f41625c0b245ecbfdc47bf6d1878785365.tar.gz
Powerpoint writer: Appease compiler
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint.hs19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs
index 7aed2e43f..c43910741 100644
--- a/src/Text/Pandoc/Writers/Powerpoint.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint.hs
@@ -192,11 +192,11 @@ data Slide = MetadataSlide { metadataSlideTitle :: [ParaElem]
, metadataSlideAuthors :: [[ParaElem]]
, metadataSlideDate :: [ParaElem]
}
- | TitleSlide { slideHeader :: [ParaElem]}
- | ContentSlide { slideHeader :: [ParaElem]
+ | TitleSlide { titleSlideHeader :: [ParaElem]}
+ | ContentSlide { contentSlideHeader :: [ParaElem]
, contentSlideContent :: [Shape]
}
- | TwoColumnSlide { slideHeader :: [ParaElem]
+ | TwoColumnSlide { twoColumnSlideHeader :: [ParaElem]
, twoColumnSlideLeft :: [Shape]
, twoColumnSlideRight :: [Shape]
}
@@ -573,13 +573,16 @@ blocksToSlide' :: PandocMonad m => Int -> [Block] -> P m Slide
blocksToSlide' lvl ((Header n _ ils) : blks)
| n < lvl = do
hdr <- inlinesToParElems ils
- return $ TitleSlide {slideHeader = hdr}
+ return $ TitleSlide {titleSlideHeader = hdr}
| n == lvl = do
hdr <- inlinesToParElems ils
-- Now get the slide without the header, and then add the header
-- in.
slide <- blocksToSlide' lvl blks
- return $ slide {slideHeader = hdr}
+ return $ case slide of
+ ContentSlide _ _ -> slide {contentSlideHeader = hdr}
+ TwoColumnSlide _ _ _ -> slide {twoColumnSlideHeader = hdr}
+ _ -> slide
blocksToSlide' _ (blk : blks)
| Div (_, classes, _) divBlks <- blk
, "columns" `elem` classes
@@ -591,7 +594,7 @@ blocksToSlide' _ (blk : blks)
(mapM (P.report . BlockNotRendered) remaining >> return ())
shapesL <- blocksToShapes blksL
shapesR <- blocksToShapes blksR
- return $ TwoColumnSlide { slideHeader = []
+ return $ TwoColumnSlide { twoColumnSlideHeader = []
, twoColumnSlideLeft = shapesL
, twoColumnSlideRight = shapesR
}
@@ -600,10 +603,10 @@ blocksToSlide' _ (blk : blks) = do
shapes <- if inNoteSlide
then forceFontSize noteSize $ blocksToShapes (blk : blks)
else blocksToShapes (blk : blks)
- return $ ContentSlide { slideHeader = []
+ return $ ContentSlide { contentSlideHeader = []
, contentSlideContent = shapes
}
-blocksToSlide' _ [] = return $ ContentSlide { slideHeader = []
+blocksToSlide' _ [] = return $ ContentSlide { contentSlideHeader = []
, contentSlideContent = []
}