Powerpoint writer: modify speaker notes in presentation.xml
We remove the `notesMasterIdLst` entry in `presentation.xml` if there no speaker notes in the presentation.
This commit is contained in:
parent
eace2357dd
commit
47a399303d
1 changed files with 12 additions and 1 deletions
|
@ -1340,7 +1340,18 @@ presentationToPresentationElement pres = do
|
|||
_ -> Elem e
|
||||
modifySldIdLst ct = ct
|
||||
|
||||
newContent = map modifySldIdLst $ elContent element
|
||||
removeSpeakerNotes' :: Content -> [Content]
|
||||
removeSpeakerNotes' (Elem e) = case elName e of
|
||||
(QName "notesMasterIdLst" _ _) -> []
|
||||
_ -> [Elem e]
|
||||
removeSpeakerNotes' ct = [ct]
|
||||
|
||||
removeSpeakerNotes :: [Content] -> [Content]
|
||||
removeSpeakerNotes = if not (hasSpeakerNotes pres)
|
||||
then concatMap removeSpeakerNotes'
|
||||
else id
|
||||
|
||||
newContent = removeSpeakerNotes $ map modifySldIdLst $ elContent element
|
||||
|
||||
return $ element{elContent = newContent}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue