aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-03-24 10:14:19 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-03-24 10:14:19 -0400
commit187fa4e444ed8fa4a948d965130c3b0b22483e47 (patch)
treea012ed0846a41a39c059e8c797aab6e141c20082 /src/Text/Pandoc
parent99fa850a37cc3e56b415754c70ea2d98da709584 (diff)
downloadpandoc-187fa4e444ed8fa4a948d965130c3b0b22483e47.tar.gz
Powerpoint reader: Check reference-doc for all layouts.
There were a few layouts where we were still just checking the built in pptx doc, instead of the supplied reference doc.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Output.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
index bad97547d..26b9c6df4 100644
--- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
@@ -342,8 +342,10 @@ getLayout layout = do
(TitleSlide _) -> "ppt/slideLayouts/slideLayout3.xml"
(ContentSlide _ _) -> "ppt/slideLayouts/slideLayout2.xml"
(TwoColumnSlide _ _ _) -> "ppt/slideLayouts/slideLayout4.xml"
+ refArchive <- asks envRefArchive
distArchive <- asks envDistArchive
- root <- case findEntryByPath layoutpath distArchive of
+ root <- case findEntryByPath layoutpath refArchive `mplus`
+ findEntryByPath layoutpath distArchive of
Just e -> case parseXMLDoc $ UTF8.toStringLazy $ fromEntry e of
Just element -> return $ element
Nothing -> throwError $
@@ -1166,8 +1168,10 @@ slideToElement (Slide _ l@(MetadataSlide titleElems subtitleElems authorElems da
getNotesMaster :: PandocMonad m => P m Element
getNotesMaster = do
let notesMasterPath = "ppt/notesMasters/notesMaster1.xml"
+ refArchive <- asks envRefArchive
distArchive <- asks envDistArchive
- root <- case findEntryByPath notesMasterPath distArchive of
+ root <- case findEntryByPath notesMasterPath refArchive `mplus`
+ findEntryByPath notesMasterPath distArchive of
Just e -> case parseXMLDoc $ UTF8.toStringLazy $ fromEntry e of
Just element -> return $ element
Nothing -> throwError $