@@ -344,17 +344,7 @@ getLayout layout = do
344344 (TwoColumnSlide _ _ _) -> "ppt/slideLayouts/slideLayout4.xml"
345345 refArchive <- asks envRefArchive
346346 distArchive <- asks envDistArchive
347− root <- case findEntryByPath layoutpath refArchive `mplus`
348− findEntryByPath layoutpath distArchive of
349− Just e -> case parseXMLDoc $ UTF8.toStringLazy $ fromEntry e of
350− Just element -> return $ element
351− Nothing -> throwError $
352− PandocSomeError $
353− layoutpath ++ " corrupt in reference file"
354− Nothing -> throwError $
355− PandocSomeError $
356− layoutpath ++ " missing in reference file"
357− return root
347+ parseXml refArchive distArchive layoutpath
358348
359349shapeHasId :: NameSpaces -> String -> Element -> Bool
360350shapeHasId ns ident element
@@ -1171,20 +1161,9 @@ slideToElement (Slide _ l@(MetadataSlide titleElems subtitleElems authorElems da
11711161
11721162getNotesMaster :: PandocMonad m => P m Element
11731163getNotesMaster = do
1174− let notesMasterPath = "ppt/notesMasters/notesMaster1.xml"
11751164 refArchive <- asks envRefArchive
11761165 distArchive <- asks envDistArchive
1177− root <- case findEntryByPath notesMasterPath refArchive `mplus`
1178− findEntryByPath notesMasterPath distArchive of
1179− Just e -> case parseXMLDoc $ UTF8.toStringLazy $ fromEntry e of
1180− Just element -> return $ element
1181− Nothing -> throwError $
1182− PandocSomeError $
1183− notesMasterPath ++ " corrupt in reference file"
1184− Nothing -> throwError $
1185− PandocSomeError $
1186− notesMasterPath ++ " missing in reference file"
1187− return root
1166+ parseXml refArchive distArchive "ppt/notesMasters/notesMaster1.xml"
11881167
11891168getSlideNumberFieldId :: PandocMonad m => Element -> P m String
11901169getSlideNumberFieldId notesMaster