From 8dbea4909211ef7b2acc677288be7c5f10cbb40e Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Wed, 25 Aug 2021 14:35:19 +0100 Subject: pptx: Restructure tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use dashes consistently rather than underscores - Make a folder for each set of tests - List test files explicitly (Cabal doesn’t support ** until version 2.4) --- test/pptx/endnotes-toc/deleted-layouts.pptx | Bin 0 -> 30596 bytes test/pptx/endnotes-toc/moved-layouts.pptx | Bin 0 -> 41384 bytes test/pptx/endnotes-toc/output.pptx | Bin 0 -> 27747 bytes test/pptx/endnotes-toc/templated.pptx | Bin 0 -> 40899 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/pptx/endnotes-toc/deleted-layouts.pptx create mode 100644 test/pptx/endnotes-toc/moved-layouts.pptx create mode 100644 test/pptx/endnotes-toc/output.pptx create mode 100644 test/pptx/endnotes-toc/templated.pptx (limited to 'test/pptx/endnotes-toc') diff --git a/test/pptx/endnotes-toc/deleted-layouts.pptx b/test/pptx/endnotes-toc/deleted-layouts.pptx new file mode 100644 index 000000000..46708544c Binary files /dev/null and b/test/pptx/endnotes-toc/deleted-layouts.pptx differ diff --git a/test/pptx/endnotes-toc/moved-layouts.pptx b/test/pptx/endnotes-toc/moved-layouts.pptx new file mode 100644 index 000000000..d1200bd7d Binary files /dev/null and b/test/pptx/endnotes-toc/moved-layouts.pptx differ diff --git a/test/pptx/endnotes-toc/output.pptx b/test/pptx/endnotes-toc/output.pptx new file mode 100644 index 000000000..a028b346f Binary files /dev/null and b/test/pptx/endnotes-toc/output.pptx differ diff --git a/test/pptx/endnotes-toc/templated.pptx b/test/pptx/endnotes-toc/templated.pptx new file mode 100644 index 000000000..38a0c437d Binary files /dev/null and b/test/pptx/endnotes-toc/templated.pptx differ -- cgit v1.2.3 From b82a01b6883c1f6a9ce5d3edd80d5a2453ecef9e Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Thu, 19 Aug 2021 15:53:21 +0100 Subject: pptx: Add support for more layouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now, the pptx writer only supported four slide layouts: “Title Slide” (used for the automatically generated metadata slide), “Section Header” (used for headings above the slide level), “Two Column” (used when there’s a columns div containing at least two column divs), and “Title and Content” (used for all other slides). This commit adds support for three more layouts: Comparison, Content with Caption, and Blank. - Support “Comparison” slide layout This layout is used when a slide contains at least two columns, at least one of which contains some text followed by some non-text (e.g. an image or table). The text in each column is inserted into the “body” placeholder for that column, and the non-text is inserted into the ObjType placeholder. Any extra content after the non-text is overlaid on top of the preceding content, rather than dropping it completely (as currently happens for the two-column layout). + Accept straightforward test changes Adding the new layout means the “-deleted-layouts” tests have an additional layout added to the master and master rels. + Add new tests for the comparison layout + Add new tests to pandoc.cabal - Support “Content with Caption” slide layout This layout is used when a slide’s body contains some text, followed by non-text (e.g. and image or a table). Before now, in this case the image or table would break onto a new slide: to get that output again, users can add a horizontal rule before the image or table. + Accept straightforward tests The “-deleted-layouts” tests all have an extra layout and relationship in the master for the Content with Caption layout. + Accept remove-empty-slides test Empty slides are still removed, but the Content with Caption layout is now used. + Change slide-level-0/h1-h2-with-text description This test now triggers the content with caption layout, giving a different (but still correct) result. + Add new tests for the new layout + Add new tests to the cabal file - Support “Blank” slide layout This layout is used when a slide contains only blank content (e.g. non-breaking spaces). No content is inserted into any placeholders in the layout. Fixes #5097. + Accept straightforward test changes Blank layout now copied over from reference doc as well, when layouts have been deleted. + Add some new tests A slide should use the blank layout if: - It contains only speaker notes - It contains only an empty heading with a body of nbsps - It contains only a heading containing only nbsps - Change ContentType -> Placeholder This type was starting to have a constructor for each placeholder on each slide (e.g. `ComparisonUpperLeftContent`). I’ve changed it instead to identify a placeholder by type and index, as I think that’s clearer and less redundant. - Describe layout-choosing logic in manual --- MANUAL.txt | 52 +++++- pandoc.cabal | 30 +++- src/Text/Pandoc/Writers/Powerpoint/Output.hs | 179 ++++++++++++++++--- src/Text/Pandoc/Writers/Powerpoint/Presentation.hs | 189 +++++++++++++++++---- test/Tests/Writers/Powerpoint.hs | 61 ++++++- .../blanks/just-speaker-notes/deleted-layouts.pptx | Bin 0 -> 35181 bytes test/pptx/blanks/just-speaker-notes/input.native | 7 + .../blanks/just-speaker-notes/moved-layouts.pptx | Bin 0 -> 45873 bytes test/pptx/blanks/just-speaker-notes/output.pptx | Bin 0 -> 32304 bytes test/pptx/blanks/just-speaker-notes/templated.pptx | Bin 0 -> 45369 bytes test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx | Bin 0 -> 30444 bytes test/pptx/blanks/nbsp-in-body/input.native | 6 + test/pptx/blanks/nbsp-in-body/moved-layouts.pptx | Bin 0 -> 41131 bytes test/pptx/blanks/nbsp-in-body/output.pptx | Bin 0 -> 27562 bytes test/pptx/blanks/nbsp-in-body/templated.pptx | Bin 0 -> 40630 bytes .../blanks/nbsp-in-heading/deleted-layouts.pptx | Bin 0 -> 30444 bytes test/pptx/blanks/nbsp-in-heading/input.native | 5 + .../pptx/blanks/nbsp-in-heading/moved-layouts.pptx | Bin 0 -> 41131 bytes test/pptx/blanks/nbsp-in-heading/output.pptx | Bin 0 -> 27562 bytes test/pptx/blanks/nbsp-in-heading/templated.pptx | Bin 0 -> 40630 bytes test/pptx/code-custom/deleted-layouts.pptx | Bin 31033 -> 31069 bytes test/pptx/code/deleted-layouts.pptx | Bin 31032 -> 31068 bytes .../comparison/both-columns/deleted-layouts.pptx | Bin 0 -> 45804 bytes test/pptx/comparison/both-columns/input.native | 23 +++ .../comparison/both-columns/moved-layouts.pptx | Bin 0 -> 56524 bytes test/pptx/comparison/both-columns/output.pptx | Bin 0 -> 42932 bytes test/pptx/comparison/both-columns/templated.pptx | Bin 0 -> 56025 bytes .../comparison/extra-image/deleted-layouts.pptx | Bin 0 -> 45833 bytes test/pptx/comparison/extra-image/input.native | 24 +++ .../pptx/comparison/extra-image/moved-layouts.pptx | Bin 0 -> 56552 bytes test/pptx/comparison/extra-image/output.pptx | Bin 0 -> 42961 bytes test/pptx/comparison/extra-image/templated.pptx | Bin 0 -> 56053 bytes .../comparison/extra-text/deleted-layouts.pptx | Bin 0 -> 45804 bytes test/pptx/comparison/extra-text/input.native | 23 +++ test/pptx/comparison/extra-text/moved-layouts.pptx | Bin 0 -> 56524 bytes test/pptx/comparison/extra-text/output.pptx | Bin 0 -> 42932 bytes test/pptx/comparison/extra-text/templated.pptx | Bin 0 -> 56025 bytes .../comparison/non-text-first/deleted-layouts.pptx | Bin 0 -> 45717 bytes test/pptx/comparison/non-text-first/input.native | 21 +++ .../comparison/non-text-first/moved-layouts.pptx | Bin 0 -> 56417 bytes test/pptx/comparison/non-text-first/output.pptx | Bin 0 -> 42845 bytes test/pptx/comparison/non-text-first/templated.pptx | Bin 0 -> 55918 bytes .../comparison/one-column/deleted-layouts.pptx | Bin 0 -> 29136 bytes test/pptx/comparison/one-column/input.native | 21 +++ test/pptx/comparison/one-column/moved-layouts.pptx | Bin 0 -> 39856 bytes test/pptx/comparison/one-column/output.pptx | Bin 0 -> 26258 bytes test/pptx/comparison/one-column/templated.pptx | Bin 0 -> 39357 bytes .../heading-text-image/deleted-layouts.pptx | Bin 0 -> 45549 bytes .../heading-text-image/input.native | 3 + .../heading-text-image/moved-layouts.pptx | Bin 0 -> 56248 bytes .../heading-text-image/output.pptx | Bin 0 -> 42677 bytes .../heading-text-image/templated.pptx | Bin 0 -> 55749 bytes .../image-text/deleted-layouts.pptx | Bin 0 -> 46248 bytes .../content-with-caption/image-text/input.native | 2 + .../image-text/moved-layouts.pptx | Bin 0 -> 56934 bytes .../content-with-caption/image-text/output.pptx | Bin 0 -> 43374 bytes .../content-with-caption/image-text/templated.pptx | Bin 0 -> 56435 bytes .../text-image/deleted-layouts.pptx | Bin 0 -> 45488 bytes .../content-with-caption/text-image/input.native | 2 + .../text-image/moved-layouts.pptx | Bin 0 -> 56188 bytes .../content-with-caption/text-image/output.pptx | Bin 0 -> 42616 bytes .../content-with-caption/text-image/templated.pptx | Bin 0 -> 55689 bytes .../deleted-layouts.pptx | Bin 29806 -> 29842 bytes test/pptx/document-properties/deleted-layouts.pptx | Bin 30210 -> 30246 bytes test/pptx/endnotes-toc/deleted-layouts.pptx | Bin 30596 -> 30632 bytes test/pptx/endnotes/deleted-layouts.pptx | Bin 29774 -> 29810 bytes test/pptx/images/deleted-layouts.pptx | Bin 47437 -> 47473 bytes test/pptx/inline-formatting/deleted-layouts.pptx | Bin 28966 -> 29002 bytes test/pptx/lists/deleted-layouts.pptx | Bin 29861 -> 29897 bytes test/pptx/raw-ooxml/deleted-layouts.pptx | Bin 29754 -> 29790 bytes test/pptx/remove-empty-slides/deleted-layouts.pptx | Bin 46867 -> 46218 bytes test/pptx/remove-empty-slides/moved-layouts.pptx | Bin 57656 -> 56903 bytes test/pptx/remove-empty-slides/output.pptx | Bin 44025 -> 43346 bytes test/pptx/remove-empty-slides/templated.pptx | Bin 57172 -> 56404 bytes .../deleted-layouts.pptx | Bin 30554 -> 30590 bytes test/pptx/slide-breaks-toc/deleted-layouts.pptx | Bin 32328 -> 32364 bytes test/pptx/slide-breaks/deleted-layouts.pptx | Bin 31378 -> 31414 bytes .../h1-h2-with-table/deleted-layouts.pptx | Bin 29828 -> 29137 bytes .../h1-h2-with-table/moved-layouts.pptx | Bin 40552 -> 39829 bytes .../slide-level-0/h1-h2-with-table/output.pptx | Bin 26985 -> 26259 bytes .../slide-level-0/h1-h2-with-table/templated.pptx | Bin 40052 -> 39330 bytes .../h1-with-image/deleted-layouts.pptx | Bin 45433 -> 45469 bytes .../h1-with-table/deleted-layouts.pptx | Bin 29008 -> 29044 bytes .../h2-with-image/deleted-layouts.pptx | Bin 45433 -> 45469 bytes .../deleted-layouts.pptx | Bin 34473 -> 34509 bytes .../speaker-notes-afterheader/deleted-layouts.pptx | Bin 33500 -> 33536 bytes .../speaker-notes-afterseps/deleted-layouts.pptx | Bin 54396 -> 54432 bytes test/pptx/speaker-notes/deleted-layouts.pptx | Bin 38203 -> 38239 bytes test/pptx/start-numbering-at/deleted-layouts.pptx | Bin 29837 -> 29873 bytes test/pptx/tables/deleted-layouts.pptx | Bin 30381 -> 30417 bytes test/pptx/two-column/deleted-layouts.pptx | Bin 28883 -> 28919 bytes 91 files changed, 580 insertions(+), 68 deletions(-) create mode 100644 test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx create mode 100644 test/pptx/blanks/just-speaker-notes/input.native create mode 100644 test/pptx/blanks/just-speaker-notes/moved-layouts.pptx create mode 100644 test/pptx/blanks/just-speaker-notes/output.pptx create mode 100644 test/pptx/blanks/just-speaker-notes/templated.pptx create mode 100644 test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx create mode 100644 test/pptx/blanks/nbsp-in-body/input.native create mode 100644 test/pptx/blanks/nbsp-in-body/moved-layouts.pptx create mode 100644 test/pptx/blanks/nbsp-in-body/output.pptx create mode 100644 test/pptx/blanks/nbsp-in-body/templated.pptx create mode 100644 test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx create mode 100644 test/pptx/blanks/nbsp-in-heading/input.native create mode 100644 test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx create mode 100644 test/pptx/blanks/nbsp-in-heading/output.pptx create mode 100644 test/pptx/blanks/nbsp-in-heading/templated.pptx create mode 100644 test/pptx/comparison/both-columns/deleted-layouts.pptx create mode 100644 test/pptx/comparison/both-columns/input.native create mode 100644 test/pptx/comparison/both-columns/moved-layouts.pptx create mode 100644 test/pptx/comparison/both-columns/output.pptx create mode 100644 test/pptx/comparison/both-columns/templated.pptx create mode 100644 test/pptx/comparison/extra-image/deleted-layouts.pptx create mode 100644 test/pptx/comparison/extra-image/input.native create mode 100644 test/pptx/comparison/extra-image/moved-layouts.pptx create mode 100644 test/pptx/comparison/extra-image/output.pptx create mode 100644 test/pptx/comparison/extra-image/templated.pptx create mode 100644 test/pptx/comparison/extra-text/deleted-layouts.pptx create mode 100644 test/pptx/comparison/extra-text/input.native create mode 100644 test/pptx/comparison/extra-text/moved-layouts.pptx create mode 100644 test/pptx/comparison/extra-text/output.pptx create mode 100644 test/pptx/comparison/extra-text/templated.pptx create mode 100644 test/pptx/comparison/non-text-first/deleted-layouts.pptx create mode 100644 test/pptx/comparison/non-text-first/input.native create mode 100644 test/pptx/comparison/non-text-first/moved-layouts.pptx create mode 100644 test/pptx/comparison/non-text-first/output.pptx create mode 100644 test/pptx/comparison/non-text-first/templated.pptx create mode 100644 test/pptx/comparison/one-column/deleted-layouts.pptx create mode 100644 test/pptx/comparison/one-column/input.native create mode 100644 test/pptx/comparison/one-column/moved-layouts.pptx create mode 100644 test/pptx/comparison/one-column/output.pptx create mode 100644 test/pptx/comparison/one-column/templated.pptx create mode 100644 test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx create mode 100644 test/pptx/content-with-caption/heading-text-image/input.native create mode 100644 test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx create mode 100644 test/pptx/content-with-caption/heading-text-image/output.pptx create mode 100644 test/pptx/content-with-caption/heading-text-image/templated.pptx create mode 100644 test/pptx/content-with-caption/image-text/deleted-layouts.pptx create mode 100644 test/pptx/content-with-caption/image-text/input.native create mode 100644 test/pptx/content-with-caption/image-text/moved-layouts.pptx create mode 100644 test/pptx/content-with-caption/image-text/output.pptx create mode 100644 test/pptx/content-with-caption/image-text/templated.pptx create mode 100644 test/pptx/content-with-caption/text-image/deleted-layouts.pptx create mode 100644 test/pptx/content-with-caption/text-image/input.native create mode 100644 test/pptx/content-with-caption/text-image/moved-layouts.pptx create mode 100644 test/pptx/content-with-caption/text-image/output.pptx create mode 100644 test/pptx/content-with-caption/text-image/templated.pptx (limited to 'test/pptx/endnotes-toc') diff --git a/MANUAL.txt b/MANUAL.txt index f81f4c70b..afdd66ddd 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1182,11 +1182,15 @@ header when requesting a document from a URL: - Title and Content - Section Header - Two Content + - Comparison + - Content with Caption + - Blank For each name, the first layout found with that name will be used. If no layout is found with one of the names, pandoc will output a warning and use the layout with that name from the default reference - doc instead. + doc instead. (How these layouts are used is described in [PowerPoint + layout choice](#powerpoint-layout-choice).) All templates included with a recent version of MS PowerPoint will fit these criteria. (You can click on `Layout` under the @@ -1195,8 +1199,8 @@ header when requesting a document from a URL: You can also modify the default `reference.pptx`: first run `pandoc -o custom-reference.pptx --print-default-data-file reference.pptx`, and then modify `custom-reference.pptx` - in MS PowerPoint (pandoc will use the first four layout - slides, as mentioned above). + in MS PowerPoint (pandoc will use the layouts with the names + listed above). `--epub-cover-image=`*FILE* @@ -5833,6 +5837,48 @@ you use deeper nesting of section levels with reveal.js unless you set `--slide-level=0` (which lets reveal.js produce a one-dimensional layout and only interprets horizontal rules as slide boundaries). +### PowerPoint layout choice + +When creating slides, the pptx writer chooses from a number of pre-defined +layouts, based on the content of the slide: + +Title Slide +: This layout is used for the initial slide, which is generated and + filled from the metadata fields `date`, `author`, and `title`, if + they are present. + +Section Header +: This layout is used for what pandoc calls “title slides”, i.e. + slides which start with a header which is above the slide level in + the hierarchy. + +Two Content +: This layout is used for two-column slides, i.e. slides containing a + div with class `columns` which contains at least two divs with class + `column`. + +Comparison +: This layout is used instead of “Two Content” for any two-column + slides in which at least one column contains text followed by + non-text (e.g. an image or a table). + +Content with Caption +: This layout is used for any non-two-column slides which contain text + followed by non-text (e.g. an image or a table). + +Blank +: This layout is used for any slides which only contain blank content, + e.g. a slide containing only speaker notes, or a slide containing + only a non-breaking space. + +Title and Content +: This layout is used for all slides which do not match the criteria + for another layout. + +These layouts are chosen from the default pptx reference doc included with +pandoc, unless an alternative reference doc is specified using +`--reference-doc`. + ## Incremental lists By default, these writers produce lists that display "all at once." diff --git a/pandoc.cabal b/pandoc.cabal index 7fb951488..3de7da39c 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -380,17 +380,31 @@ extra-source-files: test/rtf/*.native test/rtf/*.rtf test/pptx/*.pptx + test/pptx/blanks/just-speaker-notes/input.native + test/pptx/blanks/just-speaker-notes/*.pptx + test/pptx/blanks/nbsp-in-body/input.native + test/pptx/blanks/nbsp-in-body/*.pptx + test/pptx/blanks/nbsp-in-heading/input.native + test/pptx/blanks/nbsp-in-heading/*.pptx test/pptx/code-custom/*.pptx test/pptx/code/input.native test/pptx/code/*.pptx - test/pptx/comparison-both-columns/input.native - test/pptx/comparison-both-columns/*.pptx - test/pptx/comparison-extra-text/input.native - test/pptx/comparison-extra-text/*.pptx - test/pptx/comparison-non-text-first/input.native - test/pptx/comparison-non-text-first/*.pptx - test/pptx/comparison-one-column/input.native - test/pptx/comparison-one-column/*.pptx + test/pptx/content-with-caption/heading-text-image/input.native + test/pptx/content-with-caption/heading-text-image/*.pptx + test/pptx/content-with-caption/image-text/input.native + test/pptx/content-with-caption/image-text/*.pptx + test/pptx/content-with-caption/text-image/input.native + test/pptx/content-with-caption/text-image/*.pptx + test/pptx/comparison/both-columns/input.native + test/pptx/comparison/both-columns/*.pptx + test/pptx/comparison/extra-image/input.native + test/pptx/comparison/extra-image/*.pptx + test/pptx/comparison/extra-text/input.native + test/pptx/comparison/extra-text/*.pptx + test/pptx/comparison/non-text-first/input.native + test/pptx/comparison/non-text-first/*.pptx + test/pptx/comparison/one-column/input.native + test/pptx/comparison/one-column/*.pptx test/pptx/document-properties-short-desc/input.native test/pptx/document-properties-short-desc/*.pptx test/pptx/document-properties/input.native diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 0e6a67861..d83fb2182 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -1,6 +1,7 @@ {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} +{-# LANGUAGE RecordWildCards #-} {- | Module : Text.Pandoc.Writers.Powerpoint.Output Copyright : Copyright (C) 2017-2020 Jesse Rosenthal @@ -115,7 +116,7 @@ data WriterEnv = WriterEnv { envRefArchive :: Archive -- the end of the slide file name and -- the rId number , envSlideIdOffset :: Int - , envContentType :: ContentType + , envPlaceholder :: Placeholder , envSlideIdMap :: M.Map SlideId Int -- maps the slide number to the -- corresponding notes id number. If there @@ -139,7 +140,7 @@ instance Default WriterEnv where , envInNoteSlide = False , envCurSlideId = 1 , envSlideIdOffset = 1 - , envContentType = NormalContent + , envPlaceholder = Placeholder ObjType 0 , envSlideIdMap = mempty , envSpeakerNotesIdMap = mempty , envInSpeakerNotes = False @@ -153,6 +154,9 @@ data SlideLayoutsOf a = SlideLayouts , title :: a , content :: a , twoColumn :: a + , comparison :: a + , contentWithCaption :: a + , blank :: a } deriving (Show, Functor, Foldable, Traversable) data SlideLayout = SlideLayout @@ -170,10 +174,14 @@ getSlideLayouts = asks envSlideLayouts >>= maybe (throwError e) pure e = PandocSomeError ("Slide layouts aren't defined, even though they should " <> "always be. This is a bug in pandoc.") -data ContentType = NormalContent - | TwoColumnLeftContent - | TwoColumnRightContent - deriving (Show, Eq) +-- | A placeholder within a layout, identified by type and index. +-- +-- E.g., @Placeholder ObjType 2@ is the third placeholder of type 'ObjType' in +-- the layout. +data Placeholder = Placeholder + { placeholderType :: PHType + , index :: Int + } deriving (Show, Eq) data MediaInfo = MediaInfo { mInfoFilePath :: FilePath , mInfoLocalId :: Int @@ -446,6 +454,9 @@ presentationToArchive opts meta pres = do , title = "Section Header" , content = "Title and Content" , twoColumn = "Two Content" + , comparison = "Comparison" + , contentWithCaption = "Content with Caption" + , blank = "Blank" } layouts <- for layoutTitles $ \layoutTitle -> do let layout = M.lookup (CI.mk layoutTitle) referenceLayouts @@ -550,10 +561,13 @@ getLayout layout = getElement <$> getSlideLayouts where getElement = slElement . case layout of - MetadataSlide{} -> metadata - TitleSlide{} -> title - ContentSlide{} -> content - TwoColumnSlide{} -> twoColumn + MetadataSlide{} -> metadata + TitleSlide{} -> title + ContentSlide{} -> content + TwoColumnSlide{} -> twoColumn + ComparisonSlide{} -> comparison + ContentWithCaptionSlide{} -> contentWithCaption + BlankSlide{} -> blank shapeHasId :: NameSpaces -> T.Text -> Element -> Bool shapeHasId ns ident element @@ -566,17 +580,31 @@ shapeHasId ns ident element getContentShape :: PandocMonad m => NameSpaces -> Element -> P m Element getContentShape ns spTreeElem | isElem ns "p" "spTree" spTreeElem = do - contentType <- asks envContentType - let contentShapes = getShapesByPlaceHolderType ns spTreeElem ObjType - case contentType of - NormalContent | (sp : _) <- contentShapes -> return sp - TwoColumnLeftContent | (sp : _) <- contentShapes -> return sp - TwoColumnRightContent | (_ : sp : _) <- contentShapes -> return sp - _ -> throwError $ PandocSomeError - "Could not find shape for Powerpoint content" + ph@Placeholder{..} <- asks envPlaceholder + case drop index (getShapesByPlaceHolderType ns spTreeElem placeholderType) of + sp : _ -> return sp + [] -> throwError $ PandocSomeError $ missingPlaceholderMessage ph getContentShape _ _ = throwError $ PandocSomeError "Attempted to find content on non shapeTree" +missingPlaceholderMessage :: Placeholder -> Text +missingPlaceholderMessage Placeholder{..} = + "Could not find a " <> ordinal + <> " placeholder of type " <> placeholderText + where + ordinal = T.pack (show index) <> + case (index `mod` 100, index `mod` 10) of + (11, _) -> "th" + (12, _) -> "th" + (13, _) -> "th" + (_, 1) -> "st" + (_, 2) -> "nd" + (_, 3) -> "rd" + _ -> "th" + placeholderText = case placeholderType of + ObjType -> "obj (or nothing)" + PHType t -> t + getShapeDimensions :: NameSpaces -> Element -> Maybe ((Integer, Integer), (Integer, Integer)) @@ -1302,7 +1330,7 @@ contentToElement layout hdrShape shapes element <- nonBodyTextToElement layout [PHType "title"] hdrShape let hdrShapeElements = [Elem element | not (null hdrShape)] contentElements <- local - (\env -> env {envContentType = NormalContent}) + (\env -> env {envPlaceholder = Placeholder ObjType 0}) (shapesToElements layout shapes) return $ buildSpTree ns spTree (hdrShapeElements <> contentElements) contentToElement _ _ _ = return $ mknode "p:sp" [] () @@ -1315,10 +1343,10 @@ twoColumnToElement layout hdrShape shapesL shapesR element <- nonBodyTextToElement layout [PHType "title"] hdrShape let hdrShapeElements = [Elem element | not (null hdrShape)] contentElementsL <- local - (\env -> env {envContentType =TwoColumnLeftContent}) + (\env -> env {envPlaceholder = Placeholder ObjType 0}) (shapesToElements layout shapesL) contentElementsR <- local - (\env -> env {envContentType =TwoColumnRightContent}) + (\env -> env {envPlaceholder = Placeholder ObjType 1}) (shapesToElements layout shapesR) -- let contentElementsL' = map (setIdx ns "1") contentElementsL -- contentElementsR' = map (setIdx ns "2") contentElementsR @@ -1326,6 +1354,76 @@ twoColumnToElement layout hdrShape shapesL shapesR hdrShapeElements <> contentElementsL <> contentElementsR twoColumnToElement _ _ _ _= return $ mknode "p:sp" [] () +comparisonToElement :: + PandocMonad m => + Element -> + [ParaElem] -> + ([Shape], [Shape]) -> + ([Shape], [Shape]) -> + P m Element +comparisonToElement layout hdrShape (shapesL1, shapesL2) (shapesR1, shapesR2) + | ns <- elemToNameSpaces layout + , Just cSld <- findChild (elemName ns "p" "cSld") layout + , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do + element <- nonBodyTextToElement layout [PHType "title"] hdrShape + let hdrShapeElements = [Elem element | not (null hdrShape)] + contentElementsL1 <- local + (\env -> env {envPlaceholder = Placeholder (PHType "body") 0}) + (shapesToElements layout shapesL1) + contentElementsL2 <- local + (\env -> env {envPlaceholder = Placeholder ObjType 0}) + (shapesToElements layout shapesL2) + contentElementsR1 <- local + (\env -> env {envPlaceholder = Placeholder (PHType "body") 1}) + (shapesToElements layout shapesR1) + contentElementsR2 <- local + (\env -> env {envPlaceholder = Placeholder ObjType 1}) + (shapesToElements layout shapesR2) + return $ buildSpTree ns spTree $ + mconcat [ hdrShapeElements + , contentElementsL1 + , contentElementsL2 + , contentElementsR1 + , contentElementsR2 + ] +comparisonToElement _ _ _ _= return $ mknode "p:sp" [] () + +contentWithCaptionToElement :: + PandocMonad m => + Element -> + [ParaElem] -> + [Shape] -> + [Shape] -> + P m Element +contentWithCaptionToElement layout hdrShape textShapes contentShapes + | ns <- elemToNameSpaces layout + , Just cSld <- findChild (elemName ns "p" "cSld") layout + , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do + element <- nonBodyTextToElement layout [PHType "title"] hdrShape + let hdrShapeElements = [Elem element | not (null hdrShape)] + textElements <- local + (\env -> env {envPlaceholder = Placeholder (PHType "body") 0}) + (shapesToElements layout textShapes) + contentElements <- local + (\env -> env {envPlaceholder = Placeholder ObjType 0}) + (shapesToElements layout contentShapes) + return $ buildSpTree ns spTree $ + mconcat [ hdrShapeElements + , textElements + , contentElements + ] +contentWithCaptionToElement _ _ _ _ = return $ mknode "p:sp" [] () + +blankToElement :: + PandocMonad m => + Element -> + P m Element +blankToElement layout + | ns <- elemToNameSpaces layout + , Just cSld <- findChild (elemName ns "p" "cSld") layout + , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do + return $ buildSpTree ns spTree [] +blankToElement _ = return $ mknode "p:sp" [] () titleToElement :: PandocMonad m => Element -> [ParaElem] -> P m Element titleToElement layout titleElems @@ -1380,6 +1478,17 @@ slideToElement (Slide _ l@(TwoColumnSlide hdrElems shapesL shapesR) _) = do ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"), ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main") ] [mknode "p:cSld" [] [spTree]] +slideToElement (Slide _ l@(ComparisonSlide hdrElems shapesL shapesR) _) = do + layout <- getLayout l + spTree <- local (\env -> if null hdrElems + then env + else env{envSlideHasHeader=True}) $ + comparisonToElement layout hdrElems shapesL shapesR + return $ mknode "p:sld" + [ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"), + ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"), + ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main") + ] [mknode "p:cSld" [] [spTree]] slideToElement (Slide _ l@(TitleSlide hdrElems) _) = do layout <- getLayout l spTree <- titleToElement layout hdrElems @@ -1396,7 +1505,22 @@ slideToElement (Slide _ l@(MetadataSlide titleElems subtitleElems authorElems da ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"), ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main") ] [mknode "p:cSld" [] [spTree]] - +slideToElement (Slide _ l@(ContentWithCaptionSlide hdrElems captionShapes contentShapes) _) = do + layout <- getLayout l + spTree <- contentWithCaptionToElement layout hdrElems captionShapes contentShapes + return $ mknode "p:sld" + [ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"), + ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"), + ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main") + ] [mknode "p:cSld" [] [spTree]] +slideToElement (Slide _ BlankSlide _) = do + layout <- getLayout BlankSlide + spTree <- blankToElement layout + return $ mknode "p:sld" + [ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"), + ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"), + ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main") + ] [mknode "p:cSld" [] [spTree]] -------------------------------------------------------------------- -- Notes: @@ -1800,10 +1924,13 @@ slideToSlideRelElement slide = do target <- flip fmap getSlideLayouts $ T.pack . ("../slideLayouts/" <>) . takeFileName . slPath . case slide of - (Slide _ MetadataSlide{} _) -> metadata - (Slide _ TitleSlide{} _) -> title - (Slide _ ContentSlide{} _) -> content - (Slide _ TwoColumnSlide{} _) -> twoColumn + (Slide _ MetadataSlide{} _) -> metadata + (Slide _ TitleSlide{} _) -> title + (Slide _ ContentSlide{} _) -> content + (Slide _ TwoColumnSlide{} _) -> twoColumn + (Slide _ ComparisonSlide{} _) -> comparison + (Slide _ ContentWithCaptionSlide{} _) -> contentWithCaption + (Slide _ BlankSlide _) -> blank speakerNotesRels <- maybeToList <$> speakerNotesSlideRelElement slide diff --git a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs index 284b9ae62..10060d975 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs @@ -2,6 +2,7 @@ {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE LambdaCase #-} {- | Module : Text.Pandoc.Writers.Powerpoint.Presentation Copyright : Copyright (C) 2017-2020 Jesse Rosenthal @@ -61,11 +62,13 @@ import Text.Pandoc.Writers.Shared (lookupMetaInlines, lookupMetaBlocks , toLegacyTable) import qualified Data.Map as M import qualified Data.Set as S -import Data.Maybe (maybeToList, fromMaybe) +import Data.Maybe (maybeToList, fromMaybe, listToMaybe) import Text.Pandoc.Highlighting import qualified Data.Text as T import Control.Applicative ((<|>)) import Skylighting +import Data.Bifunctor (bimap) +import Data.Char (isSpace) data WriterEnv = WriterEnv { envMetadata :: Meta , envRunProps :: RunProps @@ -195,6 +198,11 @@ data Layout = MetadataSlide [ParaElem] [ParaElem] [[ParaElem]] [ParaElem] -- heading content | TwoColumnSlide [ParaElem] [Shape] [Shape] -- heading left right + | ComparisonSlide [ParaElem] ([Shape], [Shape]) ([Shape], [Shape]) + -- heading left@(text, content) right@(text, content) + | ContentWithCaptionSlide [ParaElem] [Shape] [Shape] + -- heading text content + | BlankSlide deriving (Show, Eq) data Shape = Pic PicProps FilePath T.Text [ParaElem] @@ -584,7 +592,30 @@ isImage Image{} = True isImage (Link _ (Image{} : _) _) = True isImage _ = False -splitBlocks' :: [Block] -> [[Block]] -> [Block] -> Pres [[Block]] +plainOrPara :: Block -> Maybe [Inline] +plainOrPara (Plain ils) = Just ils +plainOrPara (Para ils) = Just ils +plainOrPara _ = Nothing + +notText :: Block -> Bool +notText block | startsWithImage block = True +notText Table{} = True +notText _ = False + +startsWithImage :: Block -> Bool +startsWithImage block = fromMaybe False $ do + inline <- plainOrPara block >>= listToMaybe + pure (isImage inline) + +-- | Group blocks into a number of "splits" +splitBlocks' :: + -- | Blocks so far in the current split + [Block] -> + -- | Splits so far + [[Block]] -> + -- | All remaining blocks + [Block] -> + Pres [[Block]] splitBlocks' cur acc [] = return $ acc ++ ([cur | not (null cur)]) splitBlocks' cur acc (HorizontalRule : blks) = splitBlocks' [] (acc ++ ([cur | not (null cur)])) blks @@ -609,7 +640,9 @@ splitBlocks' cur acc (Para (il:ils) : blks) | isImage il = do (acc ++ [cur ++ [Para [il]] ++ nts]) (if null ils then blks' else Para ils : blks') _ -> splitBlocks' [] - (acc ++ ([cur | not (null cur)]) ++ [Para [il] : nts]) + (if any notText cur + then acc ++ ([cur | not (null cur)]) ++ [Para [il] : nts] + else acc ++ [cur ++ [Para [il]] ++ nts]) (if null ils then blks' else Para ils : blks') splitBlocks' cur acc (tbl@Table{} : blks) = do slideLevel <- asks envSlideLevel @@ -617,7 +650,11 @@ splitBlocks' cur acc (tbl@Table{} : blks) = do case cur of [Header n _ _] | n == slideLevel || slideLevel == 0 -> splitBlocks' [] (acc ++ [cur ++ [tbl] ++ nts]) blks' - _ -> splitBlocks' [] (acc ++ ([cur | not (null cur)]) ++ [tbl : nts]) blks' + _ -> splitBlocks' [] + (if any notText cur + then acc ++ ([cur | not (null cur)]) ++ [tbl : nts] + else acc ++ ([cur ++ [tbl] ++ nts])) + blks' splitBlocks' cur acc (d@(Div (_, classes, _) _): blks) | "columns" `elem` classes = do slideLevel <- asks envSlideLevel let (nts, blks') = span isNotesDiv blks @@ -639,38 +676,56 @@ bodyBlocksToSlide _ (blk : blks) spkNotes , Div (_, clsL, _) blksL : Div (_, clsR, _) blksR : remaining <- divBlks , "column" `elem` clsL, "column" `elem` clsR = do mapM_ (addLogMessage . BlockNotRendered) (blks ++ remaining) - mbSplitBlksL <- splitBlocks blksL - mbSplitBlksR <- splitBlocks blksR - let blksL' = case mbSplitBlksL of - bs : _ -> bs - [] -> [] - let blksR' = case mbSplitBlksR of - bs : _ -> bs - [] -> [] - shapesL <- blocksToShapes blksL' - shapesR <- blocksToShapes blksR' - sldId <- asks envCurSlideId - return $ Slide - sldId - (TwoColumnSlide [] shapesL shapesR) - spkNotes + let mkTwoColumn left right = do + blksL' <- join . take 1 <$> splitBlocks left + blksR' <- join . take 1 <$> splitBlocks right + shapesL <- blocksToShapes blksL' + shapesR <- blocksToShapes blksR' + sldId <- asks envCurSlideId + return $ Slide + sldId + (TwoColumnSlide [] shapesL shapesR) + spkNotes + let mkComparison blksL1 blksL2 blksR1 blksR2 = do + shapesL1 <- blocksToShapes blksL1 + shapesL2 <- blocksToShapes blksL2 + shapesR1 <- blocksToShapes blksR1 + shapesR2 <- blocksToShapes blksR2 + sldId <- asks envCurSlideId + return $ Slide + sldId + (ComparisonSlide [] (shapesL1, shapesL2) (shapesR1, shapesR2)) + spkNotes + case (break notText blksL, break notText blksR) of + ((_, []), (_, [])) -> mkTwoColumn blksL blksR + (([], _), ([], _)) -> mkTwoColumn blksL blksR + ((blksL1, blksL2), (blksR1, blksR2)) -> mkComparison blksL1 blksL2 blksR1 blksR2 bodyBlocksToSlide _ (blk : blks) spkNotes = do - inNoteSlide <- asks envInNoteSlide - shapes <- if inNoteSlide - then forceFontSize noteSize $ blocksToShapes (blk : blks) - else blocksToShapes (blk : blks) sldId <- asks envCurSlideId - return $ - Slide - sldId - (ContentSlide [] shapes) - spkNotes + inNoteSlide <- asks envInNoteSlide + let mkSlide s = + Slide sldId s spkNotes + if inNoteSlide + then mkSlide . ContentSlide [] <$> + forceFontSize noteSize (blocksToShapes (blk : blks)) + else let + contentOrBlankSlide = + if makesBlankSlide (blk : blks) + then pure (mkSlide BlankSlide) + else mkSlide . ContentSlide [] <$> blocksToShapes (blk : blks) + in case break notText (blk : blks) of + ([], _) -> contentOrBlankSlide + (_, []) -> contentOrBlankSlide + (textBlocks, contentBlocks) -> do + textShapes <- blocksToShapes textBlocks + contentShapes <- blocksToShapes contentBlocks + return (mkSlide (ContentWithCaptionSlide [] textShapes contentShapes)) bodyBlocksToSlide _ [] spkNotes = do sldId <- asks envCurSlideId return $ Slide sldId - (ContentSlide [] []) + BlankSlide spkNotes blocksToSlide' :: Int -> [Block] -> SpeakerNotes -> Pres Slide @@ -689,6 +744,9 @@ blocksToSlide' lvl (Header n (ident, _, _) ils : blks) spkNotes let layout = case slideLayout slide of ContentSlide _ cont -> ContentSlide hdr cont TwoColumnSlide _ contL contR -> TwoColumnSlide hdr contL contR + ComparisonSlide _ contL contR -> ComparisonSlide hdr contL contR + ContentWithCaptionSlide _ text content -> ContentWithCaptionSlide hdr text content + BlankSlide -> if all inlineIsBlank ils then BlankSlide else ContentSlide hdr [] layout' -> layout' return $ slide{slideLayout = layout} blocksToSlide' lvl blks spkNotes = bodyBlocksToSlide lvl blks spkNotes @@ -834,6 +892,19 @@ applyToLayout f (TwoColumnSlide hdr contentL contentR) = do contentL' <- mapM (applyToShape f) contentL contentR' <- mapM (applyToShape f) contentR return $ TwoColumnSlide hdr' contentL' contentR' +applyToLayout f (ComparisonSlide hdr (contentL1, contentL2) (contentR1, contentR2)) = do + hdr' <- mapM f hdr + contentL1' <- mapM (applyToShape f) contentL1 + contentL2' <- mapM (applyToShape f) contentL2 + contentR1' <- mapM (applyToShape f) contentR1 + contentR2' <- mapM (applyToShape f) contentR2 + return $ ComparisonSlide hdr' (contentL1', contentL2') (contentR1', contentR2') +applyToLayout f (ContentWithCaptionSlide hdr textShapes contentShapes) = do + hdr' <- mapM f hdr + textShapes' <- mapM (applyToShape f) textShapes + contentShapes' <- mapM (applyToShape f) contentShapes + return $ ContentWithCaptionSlide hdr' textShapes' contentShapes' +applyToLayout _ BlankSlide = pure BlankSlide applyToSlide :: Monad m => (ParaElem -> m ParaElem) -> Slide -> m Slide applyToSlide f slide = do @@ -885,10 +956,70 @@ emptyLayout layout = case layout of all emptyParaElem hdr && all emptyShape shapes1 && all emptyShape shapes2 + ComparisonSlide hdr (shapesL1, shapesL2) (shapesR1, shapesR2) -> + all emptyParaElem hdr && + all emptyShape shapesL1 && + all emptyShape shapesL2 && + all emptyShape shapesR1 && + all emptyShape shapesR2 + ContentWithCaptionSlide hdr textShapes contentShapes -> + all emptyParaElem hdr && + all emptyShape textShapes && + all emptyShape contentShapes + BlankSlide -> False + emptySlide :: Slide -> Bool emptySlide (Slide _ layout notes) = (notes == mempty) && emptyLayout layout +makesBlankSlide :: [Block] -> Bool +makesBlankSlide = all blockIsBlank + +blockIsBlank :: Block -> Bool +blockIsBlank + = \case + Plain ins -> all inlineIsBlank ins + Para ins -> all inlineIsBlank ins + LineBlock inss -> all (all inlineIsBlank) inss + CodeBlock _ txt -> textIsBlank txt + RawBlock _ txt -> textIsBlank txt + BlockQuote bls -> all blockIsBlank bls + OrderedList _ blss -> all (all blockIsBlank) blss + BulletList blss -> all (all blockIsBlank) blss + DefinitionList ds -> all (uncurry (&&) . bimap (all inlineIsBlank) (all (all blockIsBlank))) ds + Header _ _ ils -> all inlineIsBlank ils + HorizontalRule -> True + Table{} -> False + Div _ bls -> all blockIsBlank bls + Null -> True + +textIsBlank :: T.Text -> Bool +textIsBlank = T.all isSpace + +inlineIsBlank :: Inline -> Bool +inlineIsBlank + = \case + (Str txt) -> textIsBlank txt + (Emph ins) -> all inlineIsBlank ins + (Underline ins) -> all inlineIsBlank ins + (Strong ins) -> all inlineIsBlank ins + (Strikeout ins) -> all inlineIsBlank ins + (Superscript ins) -> all inlineIsBlank ins + (Subscript ins) -> all inlineIsBlank ins + (SmallCaps ins) -> all inlineIsBlank ins + (Quoted _ ins) -> all inlineIsBlank ins + (Cite _ _) -> False + (Code _ txt) -> textIsBlank txt + Space -> True + SoftBreak -> True + LineBreak -> True + (Math _ txt) -> textIsBlank txt + (RawInline _ txt) -> textIsBlank txt + (Link _ ins (t1, t2)) -> all inlineIsBlank ins && textIsBlank t1 && textIsBlank t2 + (Image _ ins (t1, t2)) -> all inlineIsBlank ins && textIsBlank t1 && textIsBlank t2 + (Note bls) -> all blockIsBlank bls + (Span _ ins) -> all inlineIsBlank ins + blocksToPresentationSlides :: [Block] -> Pres [Slide] blocksToPresentationSlides blks = do opts <- asks envOpts diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index fd9871659..256ee1f7f 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -166,9 +166,66 @@ tests = groupPptxTests [ pptxTests "Inline formatting" "pptx/slide-level-0/h1-with-table/output.pptx" , pptxTests ("Using slide level 0, if the first thing on " <> "a slide is a heading it's used as the " - <> "slide title (two headings forces a " - <> "slide break though)") + <> "slide title (content with caption layout)") def { writerSlideLevel = Just 0 } "pptx/slide-level-0/h1-h2-with-table/input.native" "pptx/slide-level-0/h1-h2-with-table/output.pptx" + , pptxTests ("comparison layout used when two columns " + <> "contain text plus non-text") + def + "pptx/comparison/both-columns/input.native" + "pptx/comparison/both-columns/output.pptx" + , pptxTests ("comparison layout used even when only one " + <> "column contains text plus non-text") + def + "pptx/comparison/one-column/input.native" + "pptx/comparison/one-column/output.pptx" + , pptxTests ("extra text in one column in comparison " + <> "layout gets overlaid") + def + "pptx/comparison/extra-text/input.native" + "pptx/comparison/extra-text/output.pptx" + , pptxTests ("extra image in one column in comparison " + <> "layout gets overlaid") + def + "pptx/comparison/extra-image/input.native" + "pptx/comparison/extra-image/output.pptx" + , pptxTests "comparison not used if the non-text comes first" + def + "pptx/comparison/non-text-first/input.native" + "pptx/comparison/non-text-first/output.pptx" + , pptxTests ("Heading, text and an image on the same " + <> "slide uses the Content with Caption " + <> "layout") + def + "pptx/content-with-caption/heading-text-image/input.native" + "pptx/content-with-caption/heading-text-image/output.pptx" + , pptxTests ("Text and an image on the same " + <> "slide uses the Content with Caption " + <> "layout") + def + "pptx/content-with-caption/text-image/input.native" + "pptx/content-with-caption/text-image/output.pptx" + , pptxTests ("If the image comes first, Content with " + <> "Caption is not used") + def + "pptx/content-with-caption/image-text/input.native" + "pptx/content-with-caption/image-text/output.pptx" + , pptxTests ("If a slide contains only speaker notes, the " + <> "Blank layout is used") + def + "pptx/blanks/just-speaker-notes/input.native" + "pptx/blanks/just-speaker-notes/output.pptx" + , pptxTests ("If a slide contains only an empty heading " + <> "with a body of only non-breaking spaces" + <> ", the Blank layout is used") + def + "pptx/blanks/nbsp-in-body/input.native" + "pptx/blanks/nbsp-in-body/output.pptx" + , pptxTests ("If a slide contains only a heading " + <> "containing only non-breaking spaces, " + <> "the Blank layout is used") + def + "pptx/blanks/nbsp-in-heading/input.native" + "pptx/blanks/nbsp-in-heading/output.pptx" ] diff --git a/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx b/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx new file mode 100644 index 000000000..82800a074 Binary files /dev/null and b/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/input.native b/test/pptx/blanks/just-speaker-notes/input.native new file mode 100644 index 000000000..d2e2cfbe2 --- /dev/null +++ b/test/pptx/blanks/just-speaker-notes/input.native @@ -0,0 +1,7 @@ +[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"] +,Para [Str "Nothing",Space,Str "to",Space,Str "see",Space,Str "here"] +,Header 1 ("section",[],[]) [] +,Div ("",["notes"],[]) + [Para [Str "Some",Space,Str "notes",Space,Str "here:",Space,Str "this",Space,Str "first",Space,Str "slide",Space,Str "should",Space,Str "use",Space,Str "the",Space,Str "Blank",Space,Str "template"]] +,Header 1 ("third-slide",[],[]) [Str "Third",Space,Str "slide"] +,Para [Str "The",Space,Str "second",Space,Str "slide",Space,Str "should",Space,Str "be",Space,Str "blank"]] diff --git a/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx b/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx new file mode 100644 index 000000000..f5ef1d7bd Binary files /dev/null and b/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/output.pptx b/test/pptx/blanks/just-speaker-notes/output.pptx new file mode 100644 index 000000000..59a643c3e Binary files /dev/null and b/test/pptx/blanks/just-speaker-notes/output.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/templated.pptx b/test/pptx/blanks/just-speaker-notes/templated.pptx new file mode 100644 index 000000000..8cc7be75b Binary files /dev/null and b/test/pptx/blanks/just-speaker-notes/templated.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx b/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx new file mode 100644 index 000000000..98a1586df Binary files /dev/null and b/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/input.native b/test/pptx/blanks/nbsp-in-body/input.native new file mode 100644 index 000000000..56c105fb0 --- /dev/null +++ b/test/pptx/blanks/nbsp-in-body/input.native @@ -0,0 +1,6 @@ +[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"] +,Para [Str "Uninteresting,",Space,Str "normal"] +,Header 1 ("section",[],[]) [] +,Para [Str "\160"] +,Header 1 ("third-slide",[],[]) [Str "Third",Space,Str "slide"] +,Para [Str "Was",Space,Str "the",Space,Str "previous",Space,Str "one",Space,Str "blank?"]] diff --git a/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx b/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx new file mode 100644 index 000000000..fca99b672 Binary files /dev/null and b/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/output.pptx b/test/pptx/blanks/nbsp-in-body/output.pptx new file mode 100644 index 000000000..ed5c77e05 Binary files /dev/null and b/test/pptx/blanks/nbsp-in-body/output.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/templated.pptx b/test/pptx/blanks/nbsp-in-body/templated.pptx new file mode 100644 index 000000000..4104f6230 Binary files /dev/null and b/test/pptx/blanks/nbsp-in-body/templated.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx b/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx new file mode 100644 index 000000000..98a1586df Binary files /dev/null and b/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/input.native b/test/pptx/blanks/nbsp-in-heading/input.native new file mode 100644 index 000000000..a5c7fc1ca --- /dev/null +++ b/test/pptx/blanks/nbsp-in-heading/input.native @@ -0,0 +1,5 @@ +[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"] +,Para [Str "Uninteresting,",Space,Str "normal"] +,Header 1 ("section",[],[]) [Str "\160"] +,Header 1 ("third-slide",[],[]) [Str "Third",Space,Str "slide"] +,Para [Str "Was",Space,Str "the",Space,Str "previous",Space,Str "one",Space,Str "blank?"]] diff --git a/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx b/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx new file mode 100644 index 000000000..fca99b672 Binary files /dev/null and b/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/output.pptx b/test/pptx/blanks/nbsp-in-heading/output.pptx new file mode 100644 index 000000000..ed5c77e05 Binary files /dev/null and b/test/pptx/blanks/nbsp-in-heading/output.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/templated.pptx b/test/pptx/blanks/nbsp-in-heading/templated.pptx new file mode 100644 index 000000000..4104f6230 Binary files /dev/null and b/test/pptx/blanks/nbsp-in-heading/templated.pptx differ diff --git a/test/pptx/code-custom/deleted-layouts.pptx b/test/pptx/code-custom/deleted-layouts.pptx index 9282e6354..fdcc7ce1d 100644 Binary files a/test/pptx/code-custom/deleted-layouts.pptx and b/test/pptx/code-custom/deleted-layouts.pptx differ diff --git a/test/pptx/code/deleted-layouts.pptx b/test/pptx/code/deleted-layouts.pptx index 0f503f553..c7f78ac40 100644 Binary files a/test/pptx/code/deleted-layouts.pptx and b/test/pptx/code/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/both-columns/deleted-layouts.pptx b/test/pptx/comparison/both-columns/deleted-layouts.pptx new file mode 100644 index 000000000..6a5affdbf Binary files /dev/null and b/test/pptx/comparison/both-columns/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/both-columns/input.native b/test/pptx/comparison/both-columns/input.native new file mode 100644 index 000000000..2557880d4 --- /dev/null +++ b/test/pptx/comparison/both-columns/input.native @@ -0,0 +1,23 @@ +[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Table ("",[],[]) (Caption Nothing + []) + [(AlignDefault,ColWidth 0.125) + ,(AlignDefault,ColWidth 0.125)] + (TableHead ("",[],[]) + []) + [(TableBody ("",[],[]) (RowHeadColumns 0) + [] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "plus"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "a",Space,Str "table"]]]])] + (TableFoot ("",[],[]) + []) + ,Para [Str "Then",Space,Str "some",Space,Str "more",Space,Str "text"]] + ,Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Para [Image ("",[],[]) [Str "Plus",Space,Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]] diff --git a/test/pptx/comparison/both-columns/moved-layouts.pptx b/test/pptx/comparison/both-columns/moved-layouts.pptx new file mode 100644 index 000000000..88282fabb Binary files /dev/null and b/test/pptx/comparison/both-columns/moved-layouts.pptx differ diff --git a/test/pptx/comparison/both-columns/output.pptx b/test/pptx/comparison/both-columns/output.pptx new file mode 100644 index 000000000..477072fb4 Binary files /dev/null and b/test/pptx/comparison/both-columns/output.pptx differ diff --git a/test/pptx/comparison/both-columns/templated.pptx b/test/pptx/comparison/both-columns/templated.pptx new file mode 100644 index 000000000..431d22392 Binary files /dev/null and b/test/pptx/comparison/both-columns/templated.pptx differ diff --git a/test/pptx/comparison/extra-image/deleted-layouts.pptx b/test/pptx/comparison/extra-image/deleted-layouts.pptx new file mode 100644 index 000000000..beed077f7 Binary files /dev/null and b/test/pptx/comparison/extra-image/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/extra-image/input.native b/test/pptx/comparison/extra-image/input.native new file mode 100644 index 000000000..34aeb8f2b --- /dev/null +++ b/test/pptx/comparison/extra-image/input.native @@ -0,0 +1,24 @@ +[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Table ("",[],[]) (Caption Nothing + []) + [(AlignDefault,ColWidth 0.125) + ,(AlignDefault,ColWidth 0.125)] + (TableHead ("",[],[]) + []) + [(TableBody ("",[],[]) (RowHeadColumns 0) + [] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "plus"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "a",Space,Str "table"]]]])] + (TableFoot ("",[],[]) + []) + ,Para [Str "Then",Space,Str "some",Space,Str "more",Space,Str "text"]] + ,Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Para [Image ("",[],[]) [Str "Plus",Space,Str "an",Space,Str "image"] ("lalune.jpg","fig:")] + ,Para [Image ("",[],[]) [Str "And",Space,Str "another",Space,Str "image"] ("lalune.jpg","fig:")]]]] diff --git a/test/pptx/comparison/extra-image/moved-layouts.pptx b/test/pptx/comparison/extra-image/moved-layouts.pptx new file mode 100644 index 000000000..f86f5b043 Binary files /dev/null and b/test/pptx/comparison/extra-image/moved-layouts.pptx differ diff --git a/test/pptx/comparison/extra-image/output.pptx b/test/pptx/comparison/extra-image/output.pptx new file mode 100644 index 000000000..a0eb5e847 Binary files /dev/null and b/test/pptx/comparison/extra-image/output.pptx differ diff --git a/test/pptx/comparison/extra-image/templated.pptx b/test/pptx/comparison/extra-image/templated.pptx new file mode 100644 index 000000000..a434ba29f Binary files /dev/null and b/test/pptx/comparison/extra-image/templated.pptx differ diff --git a/test/pptx/comparison/extra-text/deleted-layouts.pptx b/test/pptx/comparison/extra-text/deleted-layouts.pptx new file mode 100644 index 000000000..6a5affdbf Binary files /dev/null and b/test/pptx/comparison/extra-text/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/extra-text/input.native b/test/pptx/comparison/extra-text/input.native new file mode 100644 index 000000000..2557880d4 --- /dev/null +++ b/test/pptx/comparison/extra-text/input.native @@ -0,0 +1,23 @@ +[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Table ("",[],[]) (Caption Nothing + []) + [(AlignDefault,ColWidth 0.125) + ,(AlignDefault,ColWidth 0.125)] + (TableHead ("",[],[]) + []) + [(TableBody ("",[],[]) (RowHeadColumns 0) + [] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "plus"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "a",Space,Str "table"]]]])] + (TableFoot ("",[],[]) + []) + ,Para [Str "Then",Space,Str "some",Space,Str "more",Space,Str "text"]] + ,Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Para [Image ("",[],[]) [Str "Plus",Space,Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]] diff --git a/test/pptx/comparison/extra-text/moved-layouts.pptx b/test/pptx/comparison/extra-text/moved-layouts.pptx new file mode 100644 index 000000000..88282fabb Binary files /dev/null and b/test/pptx/comparison/extra-text/moved-layouts.pptx differ diff --git a/test/pptx/comparison/extra-text/output.pptx b/test/pptx/comparison/extra-text/output.pptx new file mode 100644 index 000000000..8de7d23b2 Binary files /dev/null and b/test/pptx/comparison/extra-text/output.pptx differ diff --git a/test/pptx/comparison/extra-text/templated.pptx b/test/pptx/comparison/extra-text/templated.pptx new file mode 100644 index 000000000..431d22392 Binary files /dev/null and b/test/pptx/comparison/extra-text/templated.pptx differ diff --git a/test/pptx/comparison/non-text-first/deleted-layouts.pptx b/test/pptx/comparison/non-text-first/deleted-layouts.pptx new file mode 100644 index 000000000..bd7aa69b7 Binary files /dev/null and b/test/pptx/comparison/non-text-first/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/non-text-first/input.native b/test/pptx/comparison/non-text-first/input.native new file mode 100644 index 000000000..a8caad151 --- /dev/null +++ b/test/pptx/comparison/non-text-first/input.native @@ -0,0 +1,21 @@ +[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Table ("",[],[]) (Caption Nothing + []) + [(AlignDefault,ColWidth 0.125) + ,(AlignDefault,ColWidth 0.125)] + (TableHead ("",[],[]) + []) + [(TableBody ("",[],[]) (RowHeadColumns 0) + [] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "a"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "table"]]]])] + (TableFoot ("",[],[]) + []) + ,Para [Str "Plus",Space,Str "a",Space,Str "paragraph",Space,Str "here"]] + ,Div ("",["column"],[]) + [Para [Image ("",[],[]) [Str "Just",Space,Str "an",Space,Str "image",Space,Str "on",Space,Str "this",Space,Str "side"] ("lalune.jpg","fig:")]]]] diff --git a/test/pptx/comparison/non-text-first/moved-layouts.pptx b/test/pptx/comparison/non-text-first/moved-layouts.pptx new file mode 100644 index 000000000..a01def95c Binary files /dev/null and b/test/pptx/comparison/non-text-first/moved-layouts.pptx differ diff --git a/test/pptx/comparison/non-text-first/output.pptx b/test/pptx/comparison/non-text-first/output.pptx new file mode 100644 index 000000000..cb7843fce Binary files /dev/null and b/test/pptx/comparison/non-text-first/output.pptx differ diff --git a/test/pptx/comparison/non-text-first/templated.pptx b/test/pptx/comparison/non-text-first/templated.pptx new file mode 100644 index 000000000..32db19cbf Binary files /dev/null and b/test/pptx/comparison/non-text-first/templated.pptx differ diff --git a/test/pptx/comparison/one-column/deleted-layouts.pptx b/test/pptx/comparison/one-column/deleted-layouts.pptx new file mode 100644 index 000000000..5fd7cf9b6 Binary files /dev/null and b/test/pptx/comparison/one-column/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/one-column/input.native b/test/pptx/comparison/one-column/input.native new file mode 100644 index 000000000..b99740a14 --- /dev/null +++ b/test/pptx/comparison/one-column/input.native @@ -0,0 +1,21 @@ +[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Para [Str "A",Space,Str "paragraph",Space,Str "here"] + ,Table ("",[],[]) (Caption Nothing + []) + [(AlignDefault,ColWidth 0.125) + ,(AlignDefault,ColWidth 0.125)] + (TableHead ("",[],[]) + []) + [(TableBody ("",[],[]) (RowHeadColumns 0) + [] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "plus"]] + ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "a",Space,Str "table"]]]])] + (TableFoot ("",[],[]) + [])] + ,Div ("",["column"],[]) + [Para [Str "Only",Space,Str "a",Space,Str "paragraph",Space,Str "here"]]]] diff --git a/test/pptx/comparison/one-column/moved-layouts.pptx b/test/pptx/comparison/one-column/moved-layouts.pptx new file mode 100644 index 000000000..d5df2b751 Binary files /dev/null and b/test/pptx/comparison/one-column/moved-layouts.pptx differ diff --git a/test/pptx/comparison/one-column/output.pptx b/test/pptx/comparison/one-column/output.pptx new file mode 100644 index 000000000..6914162ff Binary files /dev/null and b/test/pptx/comparison/one-column/output.pptx differ diff --git a/test/pptx/comparison/one-column/templated.pptx b/test/pptx/comparison/one-column/templated.pptx new file mode 100644 index 000000000..a30a24453 Binary files /dev/null and b/test/pptx/comparison/one-column/templated.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx b/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx new file mode 100644 index 000000000..b5afcc021 Binary files /dev/null and b/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/input.native b/test/pptx/content-with-caption/heading-text-image/input.native new file mode 100644 index 000000000..576bc1658 --- /dev/null +++ b/test/pptx/content-with-caption/heading-text-image/input.native @@ -0,0 +1,3 @@ +[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"] +,Para [Str "Some",Space,Str "text",Space,Str "here"] +,Para [Image ("",[],[]) [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "picture"] ("lalune.jpg","fig:")]] diff --git a/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx b/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx new file mode 100644 index 000000000..05806a767 Binary files /dev/null and b/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/output.pptx b/test/pptx/content-with-caption/heading-text-image/output.pptx new file mode 100644 index 000000000..b3e89757b Binary files /dev/null and b/test/pptx/content-with-caption/heading-text-image/output.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/templated.pptx b/test/pptx/content-with-caption/heading-text-image/templated.pptx new file mode 100644 index 000000000..3b0fe64c3 Binary files /dev/null and b/test/pptx/content-with-caption/heading-text-image/templated.pptx differ diff --git a/test/pptx/content-with-caption/image-text/deleted-layouts.pptx b/test/pptx/content-with-caption/image-text/deleted-layouts.pptx new file mode 100644 index 000000000..e9e0551ac Binary files /dev/null and b/test/pptx/content-with-caption/image-text/deleted-layouts.pptx differ diff --git a/test/pptx/content-with-caption/image-text/input.native b/test/pptx/content-with-caption/image-text/input.native new file mode 100644 index 000000000..2ffbf0888 --- /dev/null +++ b/test/pptx/content-with-caption/image-text/input.native @@ -0,0 +1,2 @@ +[Para [Image ("",[],[]) [Str "The",Space,Str "picture",Space,Str "first"] ("lalune.jpg","fig:")] +,Para [Str "Then",Space,Str "some",Space,Str "text",Space,Str "here"]] diff --git a/test/pptx/content-with-caption/image-text/moved-layouts.pptx b/test/pptx/content-with-caption/image-text/moved-layouts.pptx new file mode 100644 index 000000000..77d706ed3 Binary files /dev/null and b/test/pptx/content-with-caption/image-text/moved-layouts.pptx differ diff --git a/test/pptx/content-with-caption/image-text/output.pptx b/test/pptx/content-with-caption/image-text/output.pptx new file mode 100644 index 000000000..94a2e8b88 Binary files /dev/null and b/test/pptx/content-with-caption/image-text/output.pptx differ diff --git a/test/pptx/content-with-caption/image-text/templated.pptx b/test/pptx/content-with-caption/image-text/templated.pptx new file mode 100644 index 000000000..bef1921a7 Binary files /dev/null and b/test/pptx/content-with-caption/image-text/templated.pptx differ diff --git a/test/pptx/content-with-caption/text-image/deleted-layouts.pptx b/test/pptx/content-with-caption/text-image/deleted-layouts.pptx new file mode 100644 index 000000000..68d3d7b9b Binary files /dev/null and b/test/pptx/content-with-caption/text-image/deleted-layouts.pptx differ diff --git a/test/pptx/content-with-caption/text-image/input.native b/test/pptx/content-with-caption/text-image/input.native new file mode 100644 index 000000000..762d18426 --- /dev/null +++ b/test/pptx/content-with-caption/text-image/input.native @@ -0,0 +1,2 @@ +[Para [Str "Some",Space,Str "text",Space,Str "here"] +,Para [Image ("",[],[]) [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "picture"] ("lalune.jpg","fig:")]] diff --git a/test/pptx/content-with-caption/text-image/moved-layouts.pptx b/test/pptx/content-with-caption/text-image/moved-layouts.pptx new file mode 100644 index 000000000..feade1096 Binary files /dev/null and b/test/pptx/content-with-caption/text-image/moved-layouts.pptx differ diff --git a/test/pptx/content-with-caption/text-image/output.pptx b/test/pptx/content-with-caption/text-image/output.pptx new file mode 100644 index 000000000..efa814d65 Binary files /dev/null and b/test/pptx/content-with-caption/text-image/output.pptx differ diff --git a/test/pptx/content-with-caption/text-image/templated.pptx b/test/pptx/content-with-caption/text-image/templated.pptx new file mode 100644 index 000000000..ebd552252 Binary files /dev/null and b/test/pptx/content-with-caption/text-image/templated.pptx differ diff --git a/test/pptx/document-properties-short-desc/deleted-layouts.pptx b/test/pptx/document-properties-short-desc/deleted-layouts.pptx index e4cf6bd7b..a866f3c1f 100644 Binary files a/test/pptx/document-properties-short-desc/deleted-layouts.pptx and b/test/pptx/document-properties-short-desc/deleted-layouts.pptx differ diff --git a/test/pptx/document-properties/deleted-layouts.pptx b/test/pptx/document-properties/deleted-layouts.pptx index a00c8059d..1f52481f3 100644 Binary files a/test/pptx/document-properties/deleted-layouts.pptx and b/test/pptx/document-properties/deleted-layouts.pptx differ diff --git a/test/pptx/endnotes-toc/deleted-layouts.pptx b/test/pptx/endnotes-toc/deleted-layouts.pptx index 46708544c..60110a64e 100644 Binary files a/test/pptx/endnotes-toc/deleted-layouts.pptx and b/test/pptx/endnotes-toc/deleted-layouts.pptx differ diff --git a/test/pptx/endnotes/deleted-layouts.pptx b/test/pptx/endnotes/deleted-layouts.pptx index 5c69a6310..0b0bd2f53 100644 Binary files a/test/pptx/endnotes/deleted-layouts.pptx and b/test/pptx/endnotes/deleted-layouts.pptx differ diff --git a/test/pptx/images/deleted-layouts.pptx b/test/pptx/images/deleted-layouts.pptx index 053928863..2f8754e90 100644 Binary files a/test/pptx/images/deleted-layouts.pptx and b/test/pptx/images/deleted-layouts.pptx differ diff --git a/test/pptx/inline-formatting/deleted-layouts.pptx b/test/pptx/inline-formatting/deleted-layouts.pptx index bbd5bfeb4..2fbe21a45 100644 Binary files a/test/pptx/inline-formatting/deleted-layouts.pptx and b/test/pptx/inline-formatting/deleted-layouts.pptx differ diff --git a/test/pptx/lists/deleted-layouts.pptx b/test/pptx/lists/deleted-layouts.pptx index 6512e44bb..e527d3c5f 100644 Binary files a/test/pptx/lists/deleted-layouts.pptx and b/test/pptx/lists/deleted-layouts.pptx differ diff --git a/test/pptx/raw-ooxml/deleted-layouts.pptx b/test/pptx/raw-ooxml/deleted-layouts.pptx index 2ea155657..2da1b7a63 100644 Binary files a/test/pptx/raw-ooxml/deleted-layouts.pptx and b/test/pptx/raw-ooxml/deleted-layouts.pptx differ diff --git a/test/pptx/remove-empty-slides/deleted-layouts.pptx b/test/pptx/remove-empty-slides/deleted-layouts.pptx index 7ae4a5fab..51981b241 100644 Binary files a/test/pptx/remove-empty-slides/deleted-layouts.pptx and b/test/pptx/remove-empty-slides/deleted-layouts.pptx differ diff --git a/test/pptx/remove-empty-slides/moved-layouts.pptx b/test/pptx/remove-empty-slides/moved-layouts.pptx index 2572f2447..ddca32a52 100644 Binary files a/test/pptx/remove-empty-slides/moved-layouts.pptx and b/test/pptx/remove-empty-slides/moved-layouts.pptx differ diff --git a/test/pptx/remove-empty-slides/output.pptx b/test/pptx/remove-empty-slides/output.pptx index c6df8e18e..9e8b5eed2 100644 Binary files a/test/pptx/remove-empty-slides/output.pptx and b/test/pptx/remove-empty-slides/output.pptx differ diff --git a/test/pptx/remove-empty-slides/templated.pptx b/test/pptx/remove-empty-slides/templated.pptx index 1df48c5ad..579467452 100644 Binary files a/test/pptx/remove-empty-slides/templated.pptx and b/test/pptx/remove-empty-slides/templated.pptx differ diff --git a/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx b/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx index 2c7fd4d8b..2c891cd1d 100644 Binary files a/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx and b/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx differ diff --git a/test/pptx/slide-breaks-toc/deleted-layouts.pptx b/test/pptx/slide-breaks-toc/deleted-layouts.pptx index 1e0b76d46..b63994cce 100644 Binary files a/test/pptx/slide-breaks-toc/deleted-layouts.pptx and b/test/pptx/slide-breaks-toc/deleted-layouts.pptx differ diff --git a/test/pptx/slide-breaks/deleted-layouts.pptx b/test/pptx/slide-breaks/deleted-layouts.pptx index 86dfad3b2..fbf4054be 100644 Binary files a/test/pptx/slide-breaks/deleted-layouts.pptx and b/test/pptx/slide-breaks/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx index 5e776e05c..217b000b6 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx b/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx index 35204de1b..d8a6c90fe 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx index 197a6833f..512b324bf 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx b/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx index 5c659952e..5ab88e94c 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx index 16c61d1be..5be799e3b 100644 Binary files a/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx and b/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx index 0eb7c0b08..127dcea01 100644 Binary files a/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx and b/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx b/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx index afc096ce6..5be799e3b 100644 Binary files a/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx and b/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx b/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx index 1298870e2..33304ae3e 100644 Binary files a/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx and b/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx b/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx index 853b918cb..00f05fae5 100644 Binary files a/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx and b/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx b/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx index 9fec1c279..139af783b 100644 Binary files a/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx and b/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes/deleted-layouts.pptx b/test/pptx/speaker-notes/deleted-layouts.pptx index 6a5ad524f..c63125d8a 100644 Binary files a/test/pptx/speaker-notes/deleted-layouts.pptx and b/test/pptx/speaker-notes/deleted-layouts.pptx differ diff --git a/test/pptx/start-numbering-at/deleted-layouts.pptx b/test/pptx/start-numbering-at/deleted-layouts.pptx index d9cf91804..68b4215df 100644 Binary files a/test/pptx/start-numbering-at/deleted-layouts.pptx and b/test/pptx/start-numbering-at/deleted-layouts.pptx differ diff --git a/test/pptx/tables/deleted-layouts.pptx b/test/pptx/tables/deleted-layouts.pptx index a52222551..d533d3c28 100644 Binary files a/test/pptx/tables/deleted-layouts.pptx and b/test/pptx/tables/deleted-layouts.pptx differ diff --git a/test/pptx/two-column/deleted-layouts.pptx b/test/pptx/two-column/deleted-layouts.pptx index 60a244f94..9622ed2cd 100644 Binary files a/test/pptx/two-column/deleted-layouts.pptx and b/test/pptx/two-column/deleted-layouts.pptx differ -- cgit v1.2.3 From 2b98991551a95f9f91fd6b643f52bf6065f5057a Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Thu, 2 Sep 2021 16:56:40 +0100 Subject: pptx: Include all themes in output archive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Accept test changes: they’re adding the second theme (for all tests not containing speaker notes), or changing its position in the XML (for the ones containing speaker notes). --- src/Text/Pandoc/Writers/Powerpoint/Output.hs | 6 ++---- .../blanks/just-speaker-notes/deleted-layouts.pptx | Bin 35233 -> 35178 bytes .../blanks/just-speaker-notes/moved-layouts.pptx | Bin 45925 -> 45870 bytes test/pptx/blanks/just-speaker-notes/output.pptx | Bin 32356 -> 32297 bytes test/pptx/blanks/just-speaker-notes/templated.pptx | Bin 45421 -> 45365 bytes test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx | Bin 30444 -> 32092 bytes test/pptx/blanks/nbsp-in-body/moved-layouts.pptx | Bin 41131 -> 42780 bytes test/pptx/blanks/nbsp-in-body/output.pptx | Bin 27562 -> 29211 bytes test/pptx/blanks/nbsp-in-body/templated.pptx | Bin 40630 -> 42280 bytes .../blanks/nbsp-in-heading/deleted-layouts.pptx | Bin 30444 -> 32092 bytes test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx | Bin 41131 -> 42780 bytes test/pptx/blanks/nbsp-in-heading/output.pptx | Bin 27562 -> 29211 bytes test/pptx/blanks/nbsp-in-heading/templated.pptx | Bin 40630 -> 42280 bytes test/pptx/code-custom/deleted-layouts.pptx | Bin 31069 -> 32717 bytes test/pptx/code-custom/moved-layouts.pptx | Bin 41822 -> 43405 bytes test/pptx/code-custom/output.pptx | Bin 28184 -> 29836 bytes test/pptx/code-custom/templated.pptx | Bin 41337 -> 42905 bytes test/pptx/code/deleted-layouts.pptx | Bin 31068 -> 32716 bytes test/pptx/code/moved-layouts.pptx | Bin 41826 -> 43405 bytes test/pptx/code/output.pptx | Bin 28183 -> 29835 bytes test/pptx/code/templated.pptx | Bin 41337 -> 42905 bytes .../comparison/both-columns/deleted-layouts.pptx | Bin 45804 -> 47453 bytes .../pptx/comparison/both-columns/moved-layouts.pptx | Bin 56524 -> 58172 bytes test/pptx/comparison/both-columns/output.pptx | Bin 42932 -> 44581 bytes test/pptx/comparison/both-columns/templated.pptx | Bin 56025 -> 57674 bytes .../comparison/extra-image/deleted-layouts.pptx | Bin 45833 -> 47482 bytes test/pptx/comparison/extra-image/moved-layouts.pptx | Bin 56552 -> 58200 bytes test/pptx/comparison/extra-image/output.pptx | Bin 42961 -> 44610 bytes test/pptx/comparison/extra-image/templated.pptx | Bin 56053 -> 57702 bytes .../pptx/comparison/extra-text/deleted-layouts.pptx | Bin 45804 -> 47453 bytes test/pptx/comparison/extra-text/moved-layouts.pptx | Bin 56524 -> 58172 bytes test/pptx/comparison/extra-text/output.pptx | Bin 42932 -> 44581 bytes test/pptx/comparison/extra-text/templated.pptx | Bin 56025 -> 57674 bytes .../comparison/non-text-first/deleted-layouts.pptx | Bin 45717 -> 47366 bytes .../comparison/non-text-first/moved-layouts.pptx | Bin 56417 -> 58065 bytes test/pptx/comparison/non-text-first/output.pptx | Bin 42845 -> 44494 bytes test/pptx/comparison/non-text-first/templated.pptx | Bin 55918 -> 57567 bytes .../pptx/comparison/one-column/deleted-layouts.pptx | Bin 29136 -> 30785 bytes test/pptx/comparison/one-column/moved-layouts.pptx | Bin 39856 -> 41506 bytes test/pptx/comparison/one-column/output.pptx | Bin 26258 -> 27906 bytes test/pptx/comparison/one-column/templated.pptx | Bin 39357 -> 41006 bytes .../heading-text-image/deleted-layouts.pptx | Bin 45549 -> 47198 bytes .../heading-text-image/moved-layouts.pptx | Bin 56248 -> 57896 bytes .../heading-text-image/output.pptx | Bin 42677 -> 44326 bytes .../heading-text-image/templated.pptx | Bin 55749 -> 57398 bytes .../image-text/deleted-layouts.pptx | Bin 46248 -> 47896 bytes .../image-text/moved-layouts.pptx | Bin 56934 -> 58584 bytes .../content-with-caption/image-text/output.pptx | Bin 43374 -> 45022 bytes .../content-with-caption/image-text/templated.pptx | Bin 56435 -> 58084 bytes .../text-image/deleted-layouts.pptx | Bin 45488 -> 47137 bytes .../text-image/moved-layouts.pptx | Bin 56188 -> 57836 bytes .../content-with-caption/text-image/output.pptx | Bin 42616 -> 44265 bytes .../content-with-caption/text-image/templated.pptx | Bin 55689 -> 57338 bytes .../deleted-layouts.pptx | Bin 29842 -> 31490 bytes .../moved-layouts.pptx | Bin 40600 -> 42178 bytes .../pptx/document-properties-short-desc/output.pptx | Bin 26967 -> 28619 bytes .../document-properties-short-desc/templated.pptx | Bin 40113 -> 41678 bytes test/pptx/document-properties/deleted-layouts.pptx | Bin 30246 -> 31894 bytes test/pptx/document-properties/moved-layouts.pptx | Bin 41004 -> 42582 bytes test/pptx/document-properties/output.pptx | Bin 27375 -> 29025 bytes test/pptx/document-properties/templated.pptx | Bin 40517 -> 42082 bytes test/pptx/endnotes-toc/deleted-layouts.pptx | Bin 30632 -> 32280 bytes test/pptx/endnotes-toc/moved-layouts.pptx | Bin 41384 -> 42967 bytes test/pptx/endnotes-toc/output.pptx | Bin 27747 -> 29399 bytes test/pptx/endnotes-toc/templated.pptx | Bin 40899 -> 42467 bytes test/pptx/endnotes/deleted-layouts.pptx | Bin 29810 -> 31458 bytes test/pptx/endnotes/moved-layouts.pptx | Bin 40566 -> 42146 bytes test/pptx/endnotes/output.pptx | Bin 26928 -> 28580 bytes test/pptx/endnotes/templated.pptx | Bin 40078 -> 41645 bytes test/pptx/images/deleted-layouts.pptx | Bin 47473 -> 49121 bytes test/pptx/images/moved-layouts.pptx | Bin 58160 -> 59809 bytes test/pptx/images/output.pptx | Bin 44596 -> 46244 bytes test/pptx/images/templated.pptx | Bin 57660 -> 59308 bytes test/pptx/inline-formatting/deleted-layouts.pptx | Bin 29002 -> 30651 bytes test/pptx/inline-formatting/moved-layouts.pptx | Bin 39758 -> 41339 bytes test/pptx/inline-formatting/output.pptx | Bin 26121 -> 27772 bytes test/pptx/inline-formatting/templated.pptx | Bin 39272 -> 40839 bytes test/pptx/lists/deleted-layouts.pptx | Bin 29897 -> 31545 bytes test/pptx/lists/moved-layouts.pptx | Bin 40653 -> 42233 bytes test/pptx/lists/output.pptx | Bin 27015 -> 28667 bytes test/pptx/lists/templated.pptx | Bin 40166 -> 41733 bytes test/pptx/raw-ooxml/deleted-layouts.pptx | Bin 29790 -> 31438 bytes test/pptx/raw-ooxml/moved-layouts.pptx | Bin 40546 -> 42126 bytes test/pptx/raw-ooxml/output.pptx | Bin 26908 -> 28560 bytes test/pptx/raw-ooxml/templated.pptx | Bin 40059 -> 41626 bytes test/pptx/remove-empty-slides/deleted-layouts.pptx | Bin 46218 -> 47866 bytes test/pptx/remove-empty-slides/moved-layouts.pptx | Bin 56903 -> 58553 bytes test/pptx/remove-empty-slides/output.pptx | Bin 43346 -> 44994 bytes test/pptx/remove-empty-slides/templated.pptx | Bin 56404 -> 58053 bytes .../slide-breaks-slide-level-1/deleted-layouts.pptx | Bin 30590 -> 32238 bytes .../slide-breaks-slide-level-1/moved-layouts.pptx | Bin 41343 -> 42926 bytes test/pptx/slide-breaks-slide-level-1/output.pptx | Bin 27705 -> 29357 bytes test/pptx/slide-breaks-slide-level-1/templated.pptx | Bin 40858 -> 42426 bytes test/pptx/slide-breaks-toc/deleted-layouts.pptx | Bin 32364 -> 34012 bytes test/pptx/slide-breaks-toc/moved-layouts.pptx | Bin 43118 -> 44701 bytes test/pptx/slide-breaks-toc/output.pptx | Bin 29481 -> 31133 bytes test/pptx/slide-breaks-toc/templated.pptx | Bin 42634 -> 44201 bytes test/pptx/slide-breaks/deleted-layouts.pptx | Bin 31414 -> 33062 bytes test/pptx/slide-breaks/moved-layouts.pptx | Bin 42171 -> 43751 bytes test/pptx/slide-breaks/output.pptx | Bin 28531 -> 30183 bytes test/pptx/slide-breaks/templated.pptx | Bin 41683 -> 43250 bytes .../h1-h2-with-table/deleted-layouts.pptx | Bin 29137 -> 30786 bytes .../h1-h2-with-table/moved-layouts.pptx | Bin 39829 -> 41479 bytes .../pptx/slide-level-0/h1-h2-with-table/output.pptx | Bin 26259 -> 27907 bytes .../slide-level-0/h1-h2-with-table/templated.pptx | Bin 39330 -> 40979 bytes .../h1-with-image/deleted-layouts.pptx | Bin 45469 -> 47118 bytes .../slide-level-0/h1-with-image/moved-layouts.pptx | Bin 56156 -> 57804 bytes test/pptx/slide-level-0/h1-with-image/output.pptx | Bin 42596 -> 44245 bytes .../pptx/slide-level-0/h1-with-image/templated.pptx | Bin 55657 -> 57306 bytes .../h1-with-table/deleted-layouts.pptx | Bin 29044 -> 30693 bytes .../slide-level-0/h1-with-table/moved-layouts.pptx | Bin 39731 -> 41381 bytes test/pptx/slide-level-0/h1-with-table/output.pptx | Bin 26166 -> 27814 bytes .../pptx/slide-level-0/h1-with-table/templated.pptx | Bin 39232 -> 40881 bytes .../h2-with-image/deleted-layouts.pptx | Bin 45469 -> 47118 bytes .../slide-level-0/h2-with-image/moved-layouts.pptx | Bin 56156 -> 57804 bytes test/pptx/slide-level-0/h2-with-image/output.pptx | Bin 42596 -> 44245 bytes .../pptx/slide-level-0/h2-with-image/templated.pptx | Bin 55657 -> 57306 bytes .../deleted-layouts.pptx | Bin 34561 -> 34504 bytes .../speaker-notes-after-metadata/moved-layouts.pptx | Bin 45321 -> 45193 bytes test/pptx/speaker-notes-after-metadata/output.pptx | Bin 31688 -> 31634 bytes .../speaker-notes-after-metadata/templated.pptx | Bin 44828 -> 44690 bytes .../speaker-notes-afterheader/deleted-layouts.pptx | Bin 33588 -> 33532 bytes .../speaker-notes-afterheader/moved-layouts.pptx | Bin 44349 -> 44220 bytes test/pptx/speaker-notes-afterheader/output.pptx | Bin 30709 -> 30653 bytes test/pptx/speaker-notes-afterheader/templated.pptx | Bin 43855 -> 43719 bytes .../speaker-notes-afterseps/deleted-layouts.pptx | Bin 54484 -> 54429 bytes .../pptx/speaker-notes-afterseps/moved-layouts.pptx | Bin 65173 -> 65119 bytes test/pptx/speaker-notes-afterseps/output.pptx | Bin 51609 -> 51548 bytes test/pptx/speaker-notes-afterseps/templated.pptx | Bin 64671 -> 64614 bytes test/pptx/speaker-notes/deleted-layouts.pptx | Bin 38291 -> 38236 bytes test/pptx/speaker-notes/moved-layouts.pptx | Bin 49054 -> 48929 bytes test/pptx/speaker-notes/output.pptx | Bin 35412 -> 35358 bytes test/pptx/speaker-notes/templated.pptx | Bin 48560 -> 48423 bytes test/pptx/start-numbering-at/deleted-layouts.pptx | Bin 29873 -> 31521 bytes test/pptx/start-numbering-at/moved-layouts.pptx | Bin 40630 -> 42209 bytes test/pptx/start-numbering-at/output.pptx | Bin 26991 -> 28643 bytes test/pptx/start-numbering-at/templated.pptx | Bin 40142 -> 41709 bytes test/pptx/tables/deleted-layouts.pptx | Bin 30417 -> 32065 bytes test/pptx/tables/moved-layouts.pptx | Bin 41174 -> 42753 bytes test/pptx/tables/output.pptx | Bin 27532 -> 29184 bytes test/pptx/tables/templated.pptx | Bin 40686 -> 42253 bytes test/pptx/two-column/deleted-layouts.pptx | Bin 28919 -> 30568 bytes test/pptx/two-column/moved-layouts.pptx | Bin 39676 -> 41256 bytes test/pptx/two-column/output.pptx | Bin 26038 -> 27689 bytes test/pptx/two-column/templated.pptx | Bin 39189 -> 40756 bytes 145 files changed, 2 insertions(+), 4 deletions(-) (limited to 'test/pptx/endnotes-toc') diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 0b6ca50c2..43f94b247 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -239,8 +239,8 @@ alwaysInheritedPatterns = , "ppt/slideLayouts/_rels/slideLayout*.xml.rels" , "ppt/slideMasters/slideMaster1.xml" , "ppt/slideMasters/_rels/slideMaster1.xml.rels" - , "ppt/theme/theme1.xml" - , "ppt/theme/_rels/theme1.xml.rels" + , "ppt/theme/theme*.xml" + , "ppt/theme/_rels/theme*.xml.rels" , "ppt/presProps.xml" , "ppt/tableStyles.xml" , "ppt/media/image*" @@ -252,8 +252,6 @@ contingentInheritedPatterns pres = [] <> if presHasSpeakerNotes pres then map compile [ "ppt/notesMasters/notesMaster*.xml" , "ppt/notesMasters/_rels/notesMaster*.xml.rels" - , "ppt/theme/theme2.xml" - , "ppt/theme/_rels/theme2.xml.rels" ] else [] diff --git a/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx b/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx index 100da7c7f..5038f2aaf 100644 Binary files a/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx and b/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx b/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx index d142f045b..90353a560 100644 Binary files a/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx and b/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/output.pptx b/test/pptx/blanks/just-speaker-notes/output.pptx index 18f44c4cd..799c0f14a 100644 Binary files a/test/pptx/blanks/just-speaker-notes/output.pptx and b/test/pptx/blanks/just-speaker-notes/output.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/templated.pptx b/test/pptx/blanks/just-speaker-notes/templated.pptx index 8beb704a4..5e3afb5f8 100644 Binary files a/test/pptx/blanks/just-speaker-notes/templated.pptx and b/test/pptx/blanks/just-speaker-notes/templated.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx b/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx index 98a1586df..7716e1cbf 100644 Binary files a/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx and b/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx b/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx index fca99b672..3dc6c817e 100644 Binary files a/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx and b/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/output.pptx b/test/pptx/blanks/nbsp-in-body/output.pptx index ed5c77e05..1df3f9574 100644 Binary files a/test/pptx/blanks/nbsp-in-body/output.pptx and b/test/pptx/blanks/nbsp-in-body/output.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/templated.pptx b/test/pptx/blanks/nbsp-in-body/templated.pptx index 4104f6230..1cf58a1bb 100644 Binary files a/test/pptx/blanks/nbsp-in-body/templated.pptx and b/test/pptx/blanks/nbsp-in-body/templated.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx b/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx index 98a1586df..7716e1cbf 100644 Binary files a/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx and b/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx b/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx index fca99b672..3dc6c817e 100644 Binary files a/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx and b/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/output.pptx b/test/pptx/blanks/nbsp-in-heading/output.pptx index ed5c77e05..e528091d7 100644 Binary files a/test/pptx/blanks/nbsp-in-heading/output.pptx and b/test/pptx/blanks/nbsp-in-heading/output.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/templated.pptx b/test/pptx/blanks/nbsp-in-heading/templated.pptx index 4104f6230..1f2d91399 100644 Binary files a/test/pptx/blanks/nbsp-in-heading/templated.pptx and b/test/pptx/blanks/nbsp-in-heading/templated.pptx differ diff --git a/test/pptx/code-custom/deleted-layouts.pptx b/test/pptx/code-custom/deleted-layouts.pptx index fdcc7ce1d..b49cd4896 100644 Binary files a/test/pptx/code-custom/deleted-layouts.pptx and b/test/pptx/code-custom/deleted-layouts.pptx differ diff --git a/test/pptx/code-custom/moved-layouts.pptx b/test/pptx/code-custom/moved-layouts.pptx index a14eeb6c8..c6806f37f 100644 Binary files a/test/pptx/code-custom/moved-layouts.pptx and b/test/pptx/code-custom/moved-layouts.pptx differ diff --git a/test/pptx/code-custom/output.pptx b/test/pptx/code-custom/output.pptx index 5e9c2c630..a72bebbe2 100644 Binary files a/test/pptx/code-custom/output.pptx and b/test/pptx/code-custom/output.pptx differ diff --git a/test/pptx/code-custom/templated.pptx b/test/pptx/code-custom/templated.pptx index 0e640f373..2bdb526fa 100644 Binary files a/test/pptx/code-custom/templated.pptx and b/test/pptx/code-custom/templated.pptx differ diff --git a/test/pptx/code/deleted-layouts.pptx b/test/pptx/code/deleted-layouts.pptx index c7f78ac40..df7814599 100644 Binary files a/test/pptx/code/deleted-layouts.pptx and b/test/pptx/code/deleted-layouts.pptx differ diff --git a/test/pptx/code/moved-layouts.pptx b/test/pptx/code/moved-layouts.pptx index 4d66b1310..71e8560bd 100644 Binary files a/test/pptx/code/moved-layouts.pptx and b/test/pptx/code/moved-layouts.pptx differ diff --git a/test/pptx/code/output.pptx b/test/pptx/code/output.pptx index aab0cc6f5..4b70df2c7 100644 Binary files a/test/pptx/code/output.pptx and b/test/pptx/code/output.pptx differ diff --git a/test/pptx/code/templated.pptx b/test/pptx/code/templated.pptx index a03109217..1285a9273 100644 Binary files a/test/pptx/code/templated.pptx and b/test/pptx/code/templated.pptx differ diff --git a/test/pptx/comparison/both-columns/deleted-layouts.pptx b/test/pptx/comparison/both-columns/deleted-layouts.pptx index 6a5affdbf..27f9d9ac7 100644 Binary files a/test/pptx/comparison/both-columns/deleted-layouts.pptx and b/test/pptx/comparison/both-columns/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/both-columns/moved-layouts.pptx b/test/pptx/comparison/both-columns/moved-layouts.pptx index 88282fabb..a658045ef 100644 Binary files a/test/pptx/comparison/both-columns/moved-layouts.pptx and b/test/pptx/comparison/both-columns/moved-layouts.pptx differ diff --git a/test/pptx/comparison/both-columns/output.pptx b/test/pptx/comparison/both-columns/output.pptx index 477072fb4..560c7d41a 100644 Binary files a/test/pptx/comparison/both-columns/output.pptx and b/test/pptx/comparison/both-columns/output.pptx differ diff --git a/test/pptx/comparison/both-columns/templated.pptx b/test/pptx/comparison/both-columns/templated.pptx index 431d22392..2fb38880d 100644 Binary files a/test/pptx/comparison/both-columns/templated.pptx and b/test/pptx/comparison/both-columns/templated.pptx differ diff --git a/test/pptx/comparison/extra-image/deleted-layouts.pptx b/test/pptx/comparison/extra-image/deleted-layouts.pptx index beed077f7..267c7cb69 100644 Binary files a/test/pptx/comparison/extra-image/deleted-layouts.pptx and b/test/pptx/comparison/extra-image/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/extra-image/moved-layouts.pptx b/test/pptx/comparison/extra-image/moved-layouts.pptx index f86f5b043..b7023026c 100644 Binary files a/test/pptx/comparison/extra-image/moved-layouts.pptx and b/test/pptx/comparison/extra-image/moved-layouts.pptx differ diff --git a/test/pptx/comparison/extra-image/output.pptx b/test/pptx/comparison/extra-image/output.pptx index a0eb5e847..06d632ee7 100644 Binary files a/test/pptx/comparison/extra-image/output.pptx and b/test/pptx/comparison/extra-image/output.pptx differ diff --git a/test/pptx/comparison/extra-image/templated.pptx b/test/pptx/comparison/extra-image/templated.pptx index a434ba29f..af84388c4 100644 Binary files a/test/pptx/comparison/extra-image/templated.pptx and b/test/pptx/comparison/extra-image/templated.pptx differ diff --git a/test/pptx/comparison/extra-text/deleted-layouts.pptx b/test/pptx/comparison/extra-text/deleted-layouts.pptx index 6a5affdbf..27f9d9ac7 100644 Binary files a/test/pptx/comparison/extra-text/deleted-layouts.pptx and b/test/pptx/comparison/extra-text/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/extra-text/moved-layouts.pptx b/test/pptx/comparison/extra-text/moved-layouts.pptx index 88282fabb..a658045ef 100644 Binary files a/test/pptx/comparison/extra-text/moved-layouts.pptx and b/test/pptx/comparison/extra-text/moved-layouts.pptx differ diff --git a/test/pptx/comparison/extra-text/output.pptx b/test/pptx/comparison/extra-text/output.pptx index 8de7d23b2..560c7d41a 100644 Binary files a/test/pptx/comparison/extra-text/output.pptx and b/test/pptx/comparison/extra-text/output.pptx differ diff --git a/test/pptx/comparison/extra-text/templated.pptx b/test/pptx/comparison/extra-text/templated.pptx index 431d22392..2fb38880d 100644 Binary files a/test/pptx/comparison/extra-text/templated.pptx and b/test/pptx/comparison/extra-text/templated.pptx differ diff --git a/test/pptx/comparison/non-text-first/deleted-layouts.pptx b/test/pptx/comparison/non-text-first/deleted-layouts.pptx index bd7aa69b7..be30d8368 100644 Binary files a/test/pptx/comparison/non-text-first/deleted-layouts.pptx and b/test/pptx/comparison/non-text-first/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/non-text-first/moved-layouts.pptx b/test/pptx/comparison/non-text-first/moved-layouts.pptx index a01def95c..c4879b7d5 100644 Binary files a/test/pptx/comparison/non-text-first/moved-layouts.pptx and b/test/pptx/comparison/non-text-first/moved-layouts.pptx differ diff --git a/test/pptx/comparison/non-text-first/output.pptx b/test/pptx/comparison/non-text-first/output.pptx index cb7843fce..099cf6729 100644 Binary files a/test/pptx/comparison/non-text-first/output.pptx and b/test/pptx/comparison/non-text-first/output.pptx differ diff --git a/test/pptx/comparison/non-text-first/templated.pptx b/test/pptx/comparison/non-text-first/templated.pptx index 32db19cbf..31ac01f18 100644 Binary files a/test/pptx/comparison/non-text-first/templated.pptx and b/test/pptx/comparison/non-text-first/templated.pptx differ diff --git a/test/pptx/comparison/one-column/deleted-layouts.pptx b/test/pptx/comparison/one-column/deleted-layouts.pptx index 5fd7cf9b6..27620f05f 100644 Binary files a/test/pptx/comparison/one-column/deleted-layouts.pptx and b/test/pptx/comparison/one-column/deleted-layouts.pptx differ diff --git a/test/pptx/comparison/one-column/moved-layouts.pptx b/test/pptx/comparison/one-column/moved-layouts.pptx index d5df2b751..fc64d3af5 100644 Binary files a/test/pptx/comparison/one-column/moved-layouts.pptx and b/test/pptx/comparison/one-column/moved-layouts.pptx differ diff --git a/test/pptx/comparison/one-column/output.pptx b/test/pptx/comparison/one-column/output.pptx index 6914162ff..854a968af 100644 Binary files a/test/pptx/comparison/one-column/output.pptx and b/test/pptx/comparison/one-column/output.pptx differ diff --git a/test/pptx/comparison/one-column/templated.pptx b/test/pptx/comparison/one-column/templated.pptx index a30a24453..9e671af1d 100644 Binary files a/test/pptx/comparison/one-column/templated.pptx and b/test/pptx/comparison/one-column/templated.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx b/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx index b5afcc021..3cd09a916 100644 Binary files a/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx and b/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx b/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx index 05806a767..8e76bc94c 100644 Binary files a/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx and b/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/output.pptx b/test/pptx/content-with-caption/heading-text-image/output.pptx index b3e89757b..5c680e878 100644 Binary files a/test/pptx/content-with-caption/heading-text-image/output.pptx and b/test/pptx/content-with-caption/heading-text-image/output.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/templated.pptx b/test/pptx/content-with-caption/heading-text-image/templated.pptx index 3b0fe64c3..bdde384a4 100644 Binary files a/test/pptx/content-with-caption/heading-text-image/templated.pptx and b/test/pptx/content-with-caption/heading-text-image/templated.pptx differ diff --git a/test/pptx/content-with-caption/image-text/deleted-layouts.pptx b/test/pptx/content-with-caption/image-text/deleted-layouts.pptx index e9e0551ac..376880b41 100644 Binary files a/test/pptx/content-with-caption/image-text/deleted-layouts.pptx and b/test/pptx/content-with-caption/image-text/deleted-layouts.pptx differ diff --git a/test/pptx/content-with-caption/image-text/moved-layouts.pptx b/test/pptx/content-with-caption/image-text/moved-layouts.pptx index 77d706ed3..9e33d3163 100644 Binary files a/test/pptx/content-with-caption/image-text/moved-layouts.pptx and b/test/pptx/content-with-caption/image-text/moved-layouts.pptx differ diff --git a/test/pptx/content-with-caption/image-text/output.pptx b/test/pptx/content-with-caption/image-text/output.pptx index 94a2e8b88..c88030b94 100644 Binary files a/test/pptx/content-with-caption/image-text/output.pptx and b/test/pptx/content-with-caption/image-text/output.pptx differ diff --git a/test/pptx/content-with-caption/image-text/templated.pptx b/test/pptx/content-with-caption/image-text/templated.pptx index bef1921a7..a22e9ae3e 100644 Binary files a/test/pptx/content-with-caption/image-text/templated.pptx and b/test/pptx/content-with-caption/image-text/templated.pptx differ diff --git a/test/pptx/content-with-caption/text-image/deleted-layouts.pptx b/test/pptx/content-with-caption/text-image/deleted-layouts.pptx index 68d3d7b9b..2dcb8b78e 100644 Binary files a/test/pptx/content-with-caption/text-image/deleted-layouts.pptx and b/test/pptx/content-with-caption/text-image/deleted-layouts.pptx differ diff --git a/test/pptx/content-with-caption/text-image/moved-layouts.pptx b/test/pptx/content-with-caption/text-image/moved-layouts.pptx index feade1096..7d187a168 100644 Binary files a/test/pptx/content-with-caption/text-image/moved-layouts.pptx and b/test/pptx/content-with-caption/text-image/moved-layouts.pptx differ diff --git a/test/pptx/content-with-caption/text-image/output.pptx b/test/pptx/content-with-caption/text-image/output.pptx index efa814d65..751121cf2 100644 Binary files a/test/pptx/content-with-caption/text-image/output.pptx and b/test/pptx/content-with-caption/text-image/output.pptx differ diff --git a/test/pptx/content-with-caption/text-image/templated.pptx b/test/pptx/content-with-caption/text-image/templated.pptx index ebd552252..4f0aaaa7a 100644 Binary files a/test/pptx/content-with-caption/text-image/templated.pptx and b/test/pptx/content-with-caption/text-image/templated.pptx differ diff --git a/test/pptx/document-properties-short-desc/deleted-layouts.pptx b/test/pptx/document-properties-short-desc/deleted-layouts.pptx index a866f3c1f..79517481a 100644 Binary files a/test/pptx/document-properties-short-desc/deleted-layouts.pptx and b/test/pptx/document-properties-short-desc/deleted-layouts.pptx differ diff --git a/test/pptx/document-properties-short-desc/moved-layouts.pptx b/test/pptx/document-properties-short-desc/moved-layouts.pptx index 8834f885f..51608c2e9 100644 Binary files a/test/pptx/document-properties-short-desc/moved-layouts.pptx and b/test/pptx/document-properties-short-desc/moved-layouts.pptx differ diff --git a/test/pptx/document-properties-short-desc/output.pptx b/test/pptx/document-properties-short-desc/output.pptx index de5e68151..02c241b89 100644 Binary files a/test/pptx/document-properties-short-desc/output.pptx and b/test/pptx/document-properties-short-desc/output.pptx differ diff --git a/test/pptx/document-properties-short-desc/templated.pptx b/test/pptx/document-properties-short-desc/templated.pptx index d39dc0c91..82ccc072c 100644 Binary files a/test/pptx/document-properties-short-desc/templated.pptx and b/test/pptx/document-properties-short-desc/templated.pptx differ diff --git a/test/pptx/document-properties/deleted-layouts.pptx b/test/pptx/document-properties/deleted-layouts.pptx index 1f52481f3..12f6570cf 100644 Binary files a/test/pptx/document-properties/deleted-layouts.pptx and b/test/pptx/document-properties/deleted-layouts.pptx differ diff --git a/test/pptx/document-properties/moved-layouts.pptx b/test/pptx/document-properties/moved-layouts.pptx index c1d2d5282..9a9d4ac3e 100644 Binary files a/test/pptx/document-properties/moved-layouts.pptx and b/test/pptx/document-properties/moved-layouts.pptx differ diff --git a/test/pptx/document-properties/output.pptx b/test/pptx/document-properties/output.pptx index 6bcbd1b9c..cfd3261bc 100644 Binary files a/test/pptx/document-properties/output.pptx and b/test/pptx/document-properties/output.pptx differ diff --git a/test/pptx/document-properties/templated.pptx b/test/pptx/document-properties/templated.pptx index 841ae8c42..3d52d22df 100644 Binary files a/test/pptx/document-properties/templated.pptx and b/test/pptx/document-properties/templated.pptx differ diff --git a/test/pptx/endnotes-toc/deleted-layouts.pptx b/test/pptx/endnotes-toc/deleted-layouts.pptx index 60110a64e..3e613e038 100644 Binary files a/test/pptx/endnotes-toc/deleted-layouts.pptx and b/test/pptx/endnotes-toc/deleted-layouts.pptx differ diff --git a/test/pptx/endnotes-toc/moved-layouts.pptx b/test/pptx/endnotes-toc/moved-layouts.pptx index d1200bd7d..e64cd9c77 100644 Binary files a/test/pptx/endnotes-toc/moved-layouts.pptx and b/test/pptx/endnotes-toc/moved-layouts.pptx differ diff --git a/test/pptx/endnotes-toc/output.pptx b/test/pptx/endnotes-toc/output.pptx index a028b346f..bb431f511 100644 Binary files a/test/pptx/endnotes-toc/output.pptx and b/test/pptx/endnotes-toc/output.pptx differ diff --git a/test/pptx/endnotes-toc/templated.pptx b/test/pptx/endnotes-toc/templated.pptx index 38a0c437d..63b066f0d 100644 Binary files a/test/pptx/endnotes-toc/templated.pptx and b/test/pptx/endnotes-toc/templated.pptx differ diff --git a/test/pptx/endnotes/deleted-layouts.pptx b/test/pptx/endnotes/deleted-layouts.pptx index 0b0bd2f53..1d7ccb928 100644 Binary files a/test/pptx/endnotes/deleted-layouts.pptx and b/test/pptx/endnotes/deleted-layouts.pptx differ diff --git a/test/pptx/endnotes/moved-layouts.pptx b/test/pptx/endnotes/moved-layouts.pptx index 0d4c491b9..0f071207c 100644 Binary files a/test/pptx/endnotes/moved-layouts.pptx and b/test/pptx/endnotes/moved-layouts.pptx differ diff --git a/test/pptx/endnotes/output.pptx b/test/pptx/endnotes/output.pptx index 9d46036fe..e4e661804 100644 Binary files a/test/pptx/endnotes/output.pptx and b/test/pptx/endnotes/output.pptx differ diff --git a/test/pptx/endnotes/templated.pptx b/test/pptx/endnotes/templated.pptx index 863cc29d4..a97a7eed8 100644 Binary files a/test/pptx/endnotes/templated.pptx and b/test/pptx/endnotes/templated.pptx differ diff --git a/test/pptx/images/deleted-layouts.pptx b/test/pptx/images/deleted-layouts.pptx index 2f8754e90..9f0f41c37 100644 Binary files a/test/pptx/images/deleted-layouts.pptx and b/test/pptx/images/deleted-layouts.pptx differ diff --git a/test/pptx/images/moved-layouts.pptx b/test/pptx/images/moved-layouts.pptx index 7951a09f6..f26ac9e8f 100644 Binary files a/test/pptx/images/moved-layouts.pptx and b/test/pptx/images/moved-layouts.pptx differ diff --git a/test/pptx/images/output.pptx b/test/pptx/images/output.pptx index 89325e577..993209a45 100644 Binary files a/test/pptx/images/output.pptx and b/test/pptx/images/output.pptx differ diff --git a/test/pptx/images/templated.pptx b/test/pptx/images/templated.pptx index 7c0ed9a17..06b337538 100644 Binary files a/test/pptx/images/templated.pptx and b/test/pptx/images/templated.pptx differ diff --git a/test/pptx/inline-formatting/deleted-layouts.pptx b/test/pptx/inline-formatting/deleted-layouts.pptx index 2fbe21a45..ac9fa4725 100644 Binary files a/test/pptx/inline-formatting/deleted-layouts.pptx and b/test/pptx/inline-formatting/deleted-layouts.pptx differ diff --git a/test/pptx/inline-formatting/moved-layouts.pptx b/test/pptx/inline-formatting/moved-layouts.pptx index 427492130..49a2409d1 100644 Binary files a/test/pptx/inline-formatting/moved-layouts.pptx and b/test/pptx/inline-formatting/moved-layouts.pptx differ diff --git a/test/pptx/inline-formatting/output.pptx b/test/pptx/inline-formatting/output.pptx index 473b9498d..f1a4a0a36 100644 Binary files a/test/pptx/inline-formatting/output.pptx and b/test/pptx/inline-formatting/output.pptx differ diff --git a/test/pptx/inline-formatting/templated.pptx b/test/pptx/inline-formatting/templated.pptx index dd778a102..6930b785c 100644 Binary files a/test/pptx/inline-formatting/templated.pptx and b/test/pptx/inline-formatting/templated.pptx differ diff --git a/test/pptx/lists/deleted-layouts.pptx b/test/pptx/lists/deleted-layouts.pptx index e527d3c5f..1670eada1 100644 Binary files a/test/pptx/lists/deleted-layouts.pptx and b/test/pptx/lists/deleted-layouts.pptx differ diff --git a/test/pptx/lists/moved-layouts.pptx b/test/pptx/lists/moved-layouts.pptx index 2947c3211..f7590c5f9 100644 Binary files a/test/pptx/lists/moved-layouts.pptx and b/test/pptx/lists/moved-layouts.pptx differ diff --git a/test/pptx/lists/output.pptx b/test/pptx/lists/output.pptx index ffc2eb9f7..95510e92e 100644 Binary files a/test/pptx/lists/output.pptx and b/test/pptx/lists/output.pptx differ diff --git a/test/pptx/lists/templated.pptx b/test/pptx/lists/templated.pptx index 2493e7890..7af437bfe 100644 Binary files a/test/pptx/lists/templated.pptx and b/test/pptx/lists/templated.pptx differ diff --git a/test/pptx/raw-ooxml/deleted-layouts.pptx b/test/pptx/raw-ooxml/deleted-layouts.pptx index 2da1b7a63..a7bd12281 100644 Binary files a/test/pptx/raw-ooxml/deleted-layouts.pptx and b/test/pptx/raw-ooxml/deleted-layouts.pptx differ diff --git a/test/pptx/raw-ooxml/moved-layouts.pptx b/test/pptx/raw-ooxml/moved-layouts.pptx index e58304172..614682671 100644 Binary files a/test/pptx/raw-ooxml/moved-layouts.pptx and b/test/pptx/raw-ooxml/moved-layouts.pptx differ diff --git a/test/pptx/raw-ooxml/output.pptx b/test/pptx/raw-ooxml/output.pptx index 29164af15..841495315 100644 Binary files a/test/pptx/raw-ooxml/output.pptx and b/test/pptx/raw-ooxml/output.pptx differ diff --git a/test/pptx/raw-ooxml/templated.pptx b/test/pptx/raw-ooxml/templated.pptx index 0f20f9826..1dd23da2e 100644 Binary files a/test/pptx/raw-ooxml/templated.pptx and b/test/pptx/raw-ooxml/templated.pptx differ diff --git a/test/pptx/remove-empty-slides/deleted-layouts.pptx b/test/pptx/remove-empty-slides/deleted-layouts.pptx index 51981b241..488abc02a 100644 Binary files a/test/pptx/remove-empty-slides/deleted-layouts.pptx and b/test/pptx/remove-empty-slides/deleted-layouts.pptx differ diff --git a/test/pptx/remove-empty-slides/moved-layouts.pptx b/test/pptx/remove-empty-slides/moved-layouts.pptx index ddca32a52..1e1cf1e44 100644 Binary files a/test/pptx/remove-empty-slides/moved-layouts.pptx and b/test/pptx/remove-empty-slides/moved-layouts.pptx differ diff --git a/test/pptx/remove-empty-slides/output.pptx b/test/pptx/remove-empty-slides/output.pptx index 9e8b5eed2..e2871a882 100644 Binary files a/test/pptx/remove-empty-slides/output.pptx and b/test/pptx/remove-empty-slides/output.pptx differ diff --git a/test/pptx/remove-empty-slides/templated.pptx b/test/pptx/remove-empty-slides/templated.pptx index 579467452..c730b2103 100644 Binary files a/test/pptx/remove-empty-slides/templated.pptx and b/test/pptx/remove-empty-slides/templated.pptx differ diff --git a/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx b/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx index 2c891cd1d..334fdea9c 100644 Binary files a/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx and b/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx differ diff --git a/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx b/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx index 8471b1d10..3faabfd93 100644 Binary files a/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx and b/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx differ diff --git a/test/pptx/slide-breaks-slide-level-1/output.pptx b/test/pptx/slide-breaks-slide-level-1/output.pptx index 449339778..96b9907cc 100644 Binary files a/test/pptx/slide-breaks-slide-level-1/output.pptx and b/test/pptx/slide-breaks-slide-level-1/output.pptx differ diff --git a/test/pptx/slide-breaks-slide-level-1/templated.pptx b/test/pptx/slide-breaks-slide-level-1/templated.pptx index e2815159a..9f23f1d9f 100644 Binary files a/test/pptx/slide-breaks-slide-level-1/templated.pptx and b/test/pptx/slide-breaks-slide-level-1/templated.pptx differ diff --git a/test/pptx/slide-breaks-toc/deleted-layouts.pptx b/test/pptx/slide-breaks-toc/deleted-layouts.pptx index b63994cce..0492ee2ec 100644 Binary files a/test/pptx/slide-breaks-toc/deleted-layouts.pptx and b/test/pptx/slide-breaks-toc/deleted-layouts.pptx differ diff --git a/test/pptx/slide-breaks-toc/moved-layouts.pptx b/test/pptx/slide-breaks-toc/moved-layouts.pptx index 918264bc5..f3e56652c 100644 Binary files a/test/pptx/slide-breaks-toc/moved-layouts.pptx and b/test/pptx/slide-breaks-toc/moved-layouts.pptx differ diff --git a/test/pptx/slide-breaks-toc/output.pptx b/test/pptx/slide-breaks-toc/output.pptx index 9dbfa41a0..b3063b15e 100644 Binary files a/test/pptx/slide-breaks-toc/output.pptx and b/test/pptx/slide-breaks-toc/output.pptx differ diff --git a/test/pptx/slide-breaks-toc/templated.pptx b/test/pptx/slide-breaks-toc/templated.pptx index b83f3f596..bcb2f8276 100644 Binary files a/test/pptx/slide-breaks-toc/templated.pptx and b/test/pptx/slide-breaks-toc/templated.pptx differ diff --git a/test/pptx/slide-breaks/deleted-layouts.pptx b/test/pptx/slide-breaks/deleted-layouts.pptx index fbf4054be..827c7dfda 100644 Binary files a/test/pptx/slide-breaks/deleted-layouts.pptx and b/test/pptx/slide-breaks/deleted-layouts.pptx differ diff --git a/test/pptx/slide-breaks/moved-layouts.pptx b/test/pptx/slide-breaks/moved-layouts.pptx index 90b3b94a6..241605754 100644 Binary files a/test/pptx/slide-breaks/moved-layouts.pptx and b/test/pptx/slide-breaks/moved-layouts.pptx differ diff --git a/test/pptx/slide-breaks/output.pptx b/test/pptx/slide-breaks/output.pptx index e06d9079d..55c09a80e 100644 Binary files a/test/pptx/slide-breaks/output.pptx and b/test/pptx/slide-breaks/output.pptx differ diff --git a/test/pptx/slide-breaks/templated.pptx b/test/pptx/slide-breaks/templated.pptx index 71ba99701..f60f7da06 100644 Binary files a/test/pptx/slide-breaks/templated.pptx and b/test/pptx/slide-breaks/templated.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx index 217b000b6..c315a7a7a 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx b/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx index d8a6c90fe..81b49936d 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx index 512b324bf..3f815d830 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx b/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx index 5ab88e94c..b270d2d4f 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx index 5be799e3b..7bc7cfeee 100644 Binary files a/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx and b/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx b/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx index 395036069..602df1c77 100644 Binary files a/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx and b/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-image/output.pptx b/test/pptx/slide-level-0/h1-with-image/output.pptx index 2f3a53f5c..f725760dc 100644 Binary files a/test/pptx/slide-level-0/h1-with-image/output.pptx and b/test/pptx/slide-level-0/h1-with-image/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-image/templated.pptx b/test/pptx/slide-level-0/h1-with-image/templated.pptx index d306375e9..b203ff671 100644 Binary files a/test/pptx/slide-level-0/h1-with-image/templated.pptx and b/test/pptx/slide-level-0/h1-with-image/templated.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx index 127dcea01..9d58c2c52 100644 Binary files a/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx and b/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx b/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx index 197499bc3..62424de73 100644 Binary files a/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx and b/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-table/output.pptx b/test/pptx/slide-level-0/h1-with-table/output.pptx index 44dbbf90c..d30fd88c3 100644 Binary files a/test/pptx/slide-level-0/h1-with-table/output.pptx and b/test/pptx/slide-level-0/h1-with-table/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-table/templated.pptx b/test/pptx/slide-level-0/h1-with-table/templated.pptx index 87b45dda2..eb2a78647 100644 Binary files a/test/pptx/slide-level-0/h1-with-table/templated.pptx and b/test/pptx/slide-level-0/h1-with-table/templated.pptx differ diff --git a/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx b/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx index 5be799e3b..7bc7cfeee 100644 Binary files a/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx and b/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx b/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx index 395036069..602df1c77 100644 Binary files a/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx and b/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx differ diff --git a/test/pptx/slide-level-0/h2-with-image/output.pptx b/test/pptx/slide-level-0/h2-with-image/output.pptx index 948659d6a..f725760dc 100644 Binary files a/test/pptx/slide-level-0/h2-with-image/output.pptx and b/test/pptx/slide-level-0/h2-with-image/output.pptx differ diff --git a/test/pptx/slide-level-0/h2-with-image/templated.pptx b/test/pptx/slide-level-0/h2-with-image/templated.pptx index d306375e9..b203ff671 100644 Binary files a/test/pptx/slide-level-0/h2-with-image/templated.pptx and b/test/pptx/slide-level-0/h2-with-image/templated.pptx differ diff --git a/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx b/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx index 48f75ae42..9010ba04a 100644 Binary files a/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx and b/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx b/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx index 8f7aee710..ca53605b7 100644 Binary files a/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx and b/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx differ diff --git a/test/pptx/speaker-notes-after-metadata/output.pptx b/test/pptx/speaker-notes-after-metadata/output.pptx index 7fe3d3ae7..607115858 100644 Binary files a/test/pptx/speaker-notes-after-metadata/output.pptx and b/test/pptx/speaker-notes-after-metadata/output.pptx differ diff --git a/test/pptx/speaker-notes-after-metadata/templated.pptx b/test/pptx/speaker-notes-after-metadata/templated.pptx index a9e883ada..3be3ed0af 100644 Binary files a/test/pptx/speaker-notes-after-metadata/templated.pptx and b/test/pptx/speaker-notes-after-metadata/templated.pptx differ diff --git a/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx b/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx index 831d37446..2c2a0936b 100644 Binary files a/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx and b/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes-afterheader/moved-layouts.pptx b/test/pptx/speaker-notes-afterheader/moved-layouts.pptx index 7ba1c3a11..a9c8bfa0a 100644 Binary files a/test/pptx/speaker-notes-afterheader/moved-layouts.pptx and b/test/pptx/speaker-notes-afterheader/moved-layouts.pptx differ diff --git a/test/pptx/speaker-notes-afterheader/output.pptx b/test/pptx/speaker-notes-afterheader/output.pptx index bcb5dd214..ff403aa1c 100644 Binary files a/test/pptx/speaker-notes-afterheader/output.pptx and b/test/pptx/speaker-notes-afterheader/output.pptx differ diff --git a/test/pptx/speaker-notes-afterheader/templated.pptx b/test/pptx/speaker-notes-afterheader/templated.pptx index 010c4cce4..15435c45a 100644 Binary files a/test/pptx/speaker-notes-afterheader/templated.pptx and b/test/pptx/speaker-notes-afterheader/templated.pptx differ diff --git a/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx b/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx index de607ae41..f6abb0b27 100644 Binary files a/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx and b/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes-afterseps/moved-layouts.pptx b/test/pptx/speaker-notes-afterseps/moved-layouts.pptx index 8eb81bee1..6a770fc75 100644 Binary files a/test/pptx/speaker-notes-afterseps/moved-layouts.pptx and b/test/pptx/speaker-notes-afterseps/moved-layouts.pptx differ diff --git a/test/pptx/speaker-notes-afterseps/output.pptx b/test/pptx/speaker-notes-afterseps/output.pptx index 4288b84b6..7e56147f1 100644 Binary files a/test/pptx/speaker-notes-afterseps/output.pptx and b/test/pptx/speaker-notes-afterseps/output.pptx differ diff --git a/test/pptx/speaker-notes-afterseps/templated.pptx b/test/pptx/speaker-notes-afterseps/templated.pptx index 96338a2b5..3184ff74e 100644 Binary files a/test/pptx/speaker-notes-afterseps/templated.pptx and b/test/pptx/speaker-notes-afterseps/templated.pptx differ diff --git a/test/pptx/speaker-notes/deleted-layouts.pptx b/test/pptx/speaker-notes/deleted-layouts.pptx index 558bb7930..5429b88e0 100644 Binary files a/test/pptx/speaker-notes/deleted-layouts.pptx and b/test/pptx/speaker-notes/deleted-layouts.pptx differ diff --git a/test/pptx/speaker-notes/moved-layouts.pptx b/test/pptx/speaker-notes/moved-layouts.pptx index 283170569..13e34698d 100644 Binary files a/test/pptx/speaker-notes/moved-layouts.pptx and b/test/pptx/speaker-notes/moved-layouts.pptx differ diff --git a/test/pptx/speaker-notes/output.pptx b/test/pptx/speaker-notes/output.pptx index f0e51e597..74041a40d 100644 Binary files a/test/pptx/speaker-notes/output.pptx and b/test/pptx/speaker-notes/output.pptx differ diff --git a/test/pptx/speaker-notes/templated.pptx b/test/pptx/speaker-notes/templated.pptx index 27df2d994..80a3e3dea 100644 Binary files a/test/pptx/speaker-notes/templated.pptx and b/test/pptx/speaker-notes/templated.pptx differ diff --git a/test/pptx/start-numbering-at/deleted-layouts.pptx b/test/pptx/start-numbering-at/deleted-layouts.pptx index 68b4215df..7bfe9868f 100644 Binary files a/test/pptx/start-numbering-at/deleted-layouts.pptx and b/test/pptx/start-numbering-at/deleted-layouts.pptx differ diff --git a/test/pptx/start-numbering-at/moved-layouts.pptx b/test/pptx/start-numbering-at/moved-layouts.pptx index e1b2d4de8..0100365ec 100644 Binary files a/test/pptx/start-numbering-at/moved-layouts.pptx and b/test/pptx/start-numbering-at/moved-layouts.pptx differ diff --git a/test/pptx/start-numbering-at/output.pptx b/test/pptx/start-numbering-at/output.pptx index 4320128b3..3ba9a236a 100644 Binary files a/test/pptx/start-numbering-at/output.pptx and b/test/pptx/start-numbering-at/output.pptx differ diff --git a/test/pptx/start-numbering-at/templated.pptx b/test/pptx/start-numbering-at/templated.pptx index efc56ac7a..8a144d601 100644 Binary files a/test/pptx/start-numbering-at/templated.pptx and b/test/pptx/start-numbering-at/templated.pptx differ diff --git a/test/pptx/tables/deleted-layouts.pptx b/test/pptx/tables/deleted-layouts.pptx index d533d3c28..163d4ca5e 100644 Binary files a/test/pptx/tables/deleted-layouts.pptx and b/test/pptx/tables/deleted-layouts.pptx differ diff --git a/test/pptx/tables/moved-layouts.pptx b/test/pptx/tables/moved-layouts.pptx index 56608a039..1b0e606da 100644 Binary files a/test/pptx/tables/moved-layouts.pptx and b/test/pptx/tables/moved-layouts.pptx differ diff --git a/test/pptx/tables/output.pptx b/test/pptx/tables/output.pptx index e41219844..1c89d8032 100644 Binary files a/test/pptx/tables/output.pptx and b/test/pptx/tables/output.pptx differ diff --git a/test/pptx/tables/templated.pptx b/test/pptx/tables/templated.pptx index 0a8c3e8d9..5755bfe9d 100644 Binary files a/test/pptx/tables/templated.pptx and b/test/pptx/tables/templated.pptx differ diff --git a/test/pptx/two-column/deleted-layouts.pptx b/test/pptx/two-column/deleted-layouts.pptx index 9622ed2cd..1d7bd87d3 100644 Binary files a/test/pptx/two-column/deleted-layouts.pptx and b/test/pptx/two-column/deleted-layouts.pptx differ diff --git a/test/pptx/two-column/moved-layouts.pptx b/test/pptx/two-column/moved-layouts.pptx index a17f96b18..71760268c 100644 Binary files a/test/pptx/two-column/moved-layouts.pptx and b/test/pptx/two-column/moved-layouts.pptx differ diff --git a/test/pptx/two-column/output.pptx b/test/pptx/two-column/output.pptx index 270a7eeac..396dc2a74 100644 Binary files a/test/pptx/two-column/output.pptx and b/test/pptx/two-column/output.pptx differ diff --git a/test/pptx/two-column/templated.pptx b/test/pptx/two-column/templated.pptx index 6d9470372..8901695b1 100644 Binary files a/test/pptx/two-column/templated.pptx and b/test/pptx/two-column/templated.pptx differ -- cgit v1.2.3 From aa78765bf9d21b3a617a9eafba59dd59e362aa6b Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Thu, 7 Oct 2021 15:25:15 +0100 Subject: pptx: Remove excessive layout tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I added the tests for moved layouts and deleted layouts, I added them to all tests. However, this doesn’t really give a lot more info than having single tests, and the extra tests take up time and disk space. This commit removes the moved-layouts and deleted-layouts tests, in favour of a single test for each of those scenarios. --- test/Tests/Writers/Powerpoint.hs | 35 +++++++++------------ test/pptx/background-image/deleted-layouts.pptx | Bin 56230 -> 0 bytes test/pptx/background-image/moved-layouts.pptx | Bin 66932 -> 0 bytes .../blanks/just-speaker-notes/deleted-layouts.pptx | Bin 35147 -> 0 bytes .../blanks/just-speaker-notes/moved-layouts.pptx | Bin 45837 -> 0 bytes test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx | Bin 32085 -> 0 bytes test/pptx/blanks/nbsp-in-body/moved-layouts.pptx | Bin 42772 -> 0 bytes .../blanks/nbsp-in-heading/deleted-layouts.pptx | Bin 32085 -> 0 bytes .../pptx/blanks/nbsp-in-heading/moved-layouts.pptx | Bin 42772 -> 0 bytes test/pptx/code-custom/deleted-layouts.pptx | Bin 32697 -> 0 bytes test/pptx/code-custom/moved-layouts.pptx | Bin 43385 -> 0 bytes test/pptx/code/deleted-layouts.pptx | Bin 32695 -> 0 bytes test/pptx/code/moved-layouts.pptx | Bin 43383 -> 0 bytes .../comparison/both-columns/deleted-layouts.pptx | Bin 47441 -> 0 bytes .../comparison/both-columns/moved-layouts.pptx | Bin 58159 -> 0 bytes .../comparison/extra-image/deleted-layouts.pptx | Bin 47470 -> 0 bytes .../pptx/comparison/extra-image/moved-layouts.pptx | Bin 58185 -> 0 bytes .../comparison/extra-text/deleted-layouts.pptx | Bin 47441 -> 0 bytes test/pptx/comparison/extra-text/moved-layouts.pptx | Bin 58159 -> 0 bytes .../comparison/non-text-first/deleted-layouts.pptx | Bin 47355 -> 0 bytes .../comparison/non-text-first/moved-layouts.pptx | Bin 58050 -> 0 bytes .../comparison/one-column/deleted-layouts.pptx | Bin 30780 -> 0 bytes test/pptx/comparison/one-column/moved-layouts.pptx | Bin 41499 -> 0 bytes .../heading-text-image/deleted-layouts.pptx | Bin 47189 -> 0 bytes .../heading-text-image/moved-layouts.pptx | Bin 57887 -> 0 bytes .../image-text/deleted-layouts.pptx | Bin 47891 -> 0 bytes .../image-text/moved-layouts.pptx | Bin 58578 -> 0 bytes .../text-image/deleted-layouts.pptx | Bin 47129 -> 0 bytes .../text-image/moved-layouts.pptx | Bin 57827 -> 0 bytes .../deleted-layouts.pptx | Bin 31483 -> 0 bytes .../moved-layouts.pptx | Bin 42171 -> 0 bytes test/pptx/document-properties/deleted-layouts.pptx | Bin 31886 -> 0 bytes test/pptx/document-properties/moved-layouts.pptx | Bin 42573 -> 0 bytes test/pptx/endnotes-toc/deleted-layouts.pptx | Bin 32280 -> 0 bytes test/pptx/endnotes-toc/moved-layouts.pptx | Bin 42967 -> 0 bytes test/pptx/endnotes/deleted-layouts.pptx | Bin 31458 -> 0 bytes test/pptx/endnotes/moved-layouts.pptx | Bin 42146 -> 0 bytes test/pptx/images/deleted-layouts.pptx | Bin 49113 -> 0 bytes test/pptx/images/moved-layouts.pptx | Bin 59801 -> 0 bytes .../with-flag/deleted-layouts.pptx | Bin 80042 -> 0 bytes .../incremental-lists/with-flag/moved-layouts.pptx | Bin 90782 -> 0 bytes .../without-flag/deleted-layouts.pptx | Bin 78282 -> 0 bytes .../without-flag/moved-layouts.pptx | Bin 89020 -> 0 bytes test/pptx/inline-formatting/deleted-layouts.pptx | Bin 30651 -> 0 bytes test/pptx/inline-formatting/moved-layouts.pptx | Bin 41339 -> 0 bytes test/pptx/layouts/deleted.pptx | Bin 0 -> 55694 bytes test/pptx/layouts/input.native | 23 ++++++++++++++ test/pptx/layouts/moved.pptx | Bin 0 -> 66430 bytes test/pptx/lists/deleted-layouts.pptx | Bin 31540 -> 0 bytes test/pptx/lists/moved-layouts.pptx | Bin 42230 -> 0 bytes test/pptx/raw-ooxml/deleted-layouts.pptx | Bin 31438 -> 0 bytes test/pptx/raw-ooxml/moved-layouts.pptx | Bin 42126 -> 0 bytes test/pptx/remove-empty-slides/deleted-layouts.pptx | Bin 47866 -> 0 bytes test/pptx/remove-empty-slides/moved-layouts.pptx | Bin 58553 -> 0 bytes .../deleted-layouts.pptx | Bin 32233 -> 0 bytes .../slide-breaks-slide-level-1/moved-layouts.pptx | Bin 42923 -> 0 bytes test/pptx/slide-breaks-toc/deleted-layouts.pptx | Bin 34006 -> 0 bytes test/pptx/slide-breaks-toc/moved-layouts.pptx | Bin 44696 -> 0 bytes test/pptx/slide-breaks/deleted-layouts.pptx | Bin 33056 -> 0 bytes test/pptx/slide-breaks/moved-layouts.pptx | Bin 43746 -> 0 bytes .../h1-h2-with-table/deleted-layouts.pptx | Bin 30786 -> 0 bytes .../h1-h2-with-table/moved-layouts.pptx | Bin 41479 -> 0 bytes .../h1-with-image/deleted-layouts.pptx | Bin 47114 -> 0 bytes .../slide-level-0/h1-with-image/moved-layouts.pptx | Bin 57800 -> 0 bytes .../h1-with-table/deleted-layouts.pptx | Bin 30693 -> 0 bytes .../slide-level-0/h1-with-table/moved-layouts.pptx | Bin 41381 -> 0 bytes .../h2-with-image/deleted-layouts.pptx | Bin 47114 -> 0 bytes .../slide-level-0/h2-with-image/moved-layouts.pptx | Bin 57800 -> 0 bytes .../deleted-layouts.pptx | Bin 34486 -> 0 bytes .../moved-layouts.pptx | Bin 45176 -> 0 bytes .../speaker-notes-afterheader/deleted-layouts.pptx | Bin 33507 -> 0 bytes .../speaker-notes-afterheader/moved-layouts.pptx | Bin 44195 -> 0 bytes .../speaker-notes-afterseps/deleted-layouts.pptx | Bin 54374 -> 0 bytes .../speaker-notes-afterseps/moved-layouts.pptx | Bin 65064 -> 0 bytes test/pptx/speaker-notes/deleted-layouts.pptx | Bin 38206 -> 0 bytes test/pptx/speaker-notes/moved-layouts.pptx | Bin 48899 -> 0 bytes test/pptx/start-numbering-at/deleted-layouts.pptx | Bin 31502 -> 0 bytes test/pptx/start-numbering-at/moved-layouts.pptx | Bin 42192 -> 0 bytes test/pptx/tables/deleted-layouts.pptx | Bin 32040 -> 0 bytes test/pptx/tables/moved-layouts.pptx | Bin 42729 -> 0 bytes test/pptx/two-column/all-text/deleted-layouts.pptx | Bin 30567 -> 0 bytes test/pptx/two-column/all-text/moved-layouts.pptx | Bin 41255 -> 0 bytes .../two-column/text-and-image/deleted-layouts.pptx | Bin 48381 -> 0 bytes .../two-column/text-and-image/moved-layouts.pptx | Bin 59075 -> 0 bytes 84 files changed, 38 insertions(+), 20 deletions(-) delete mode 100644 test/pptx/background-image/deleted-layouts.pptx delete mode 100644 test/pptx/background-image/moved-layouts.pptx delete mode 100644 test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx delete mode 100644 test/pptx/blanks/just-speaker-notes/moved-layouts.pptx delete mode 100644 test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx delete mode 100644 test/pptx/blanks/nbsp-in-body/moved-layouts.pptx delete mode 100644 test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx delete mode 100644 test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx delete mode 100644 test/pptx/code-custom/deleted-layouts.pptx delete mode 100644 test/pptx/code-custom/moved-layouts.pptx delete mode 100644 test/pptx/code/deleted-layouts.pptx delete mode 100644 test/pptx/code/moved-layouts.pptx delete mode 100644 test/pptx/comparison/both-columns/deleted-layouts.pptx delete mode 100644 test/pptx/comparison/both-columns/moved-layouts.pptx delete mode 100644 test/pptx/comparison/extra-image/deleted-layouts.pptx delete mode 100644 test/pptx/comparison/extra-image/moved-layouts.pptx delete mode 100644 test/pptx/comparison/extra-text/deleted-layouts.pptx delete mode 100644 test/pptx/comparison/extra-text/moved-layouts.pptx delete mode 100644 test/pptx/comparison/non-text-first/deleted-layouts.pptx delete mode 100644 test/pptx/comparison/non-text-first/moved-layouts.pptx delete mode 100644 test/pptx/comparison/one-column/deleted-layouts.pptx delete mode 100644 test/pptx/comparison/one-column/moved-layouts.pptx delete mode 100644 test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx delete mode 100644 test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx delete mode 100644 test/pptx/content-with-caption/image-text/deleted-layouts.pptx delete mode 100644 test/pptx/content-with-caption/image-text/moved-layouts.pptx delete mode 100644 test/pptx/content-with-caption/text-image/deleted-layouts.pptx delete mode 100644 test/pptx/content-with-caption/text-image/moved-layouts.pptx delete mode 100644 test/pptx/document-properties-short-desc/deleted-layouts.pptx delete mode 100644 test/pptx/document-properties-short-desc/moved-layouts.pptx delete mode 100644 test/pptx/document-properties/deleted-layouts.pptx delete mode 100644 test/pptx/document-properties/moved-layouts.pptx delete mode 100644 test/pptx/endnotes-toc/deleted-layouts.pptx delete mode 100644 test/pptx/endnotes-toc/moved-layouts.pptx delete mode 100644 test/pptx/endnotes/deleted-layouts.pptx delete mode 100644 test/pptx/endnotes/moved-layouts.pptx delete mode 100644 test/pptx/images/deleted-layouts.pptx delete mode 100644 test/pptx/images/moved-layouts.pptx delete mode 100644 test/pptx/incremental-lists/with-flag/deleted-layouts.pptx delete mode 100644 test/pptx/incremental-lists/with-flag/moved-layouts.pptx delete mode 100644 test/pptx/incremental-lists/without-flag/deleted-layouts.pptx delete mode 100644 test/pptx/incremental-lists/without-flag/moved-layouts.pptx delete mode 100644 test/pptx/inline-formatting/deleted-layouts.pptx delete mode 100644 test/pptx/inline-formatting/moved-layouts.pptx create mode 100644 test/pptx/layouts/deleted.pptx create mode 100644 test/pptx/layouts/input.native create mode 100644 test/pptx/layouts/moved.pptx delete mode 100644 test/pptx/lists/deleted-layouts.pptx delete mode 100644 test/pptx/lists/moved-layouts.pptx delete mode 100644 test/pptx/raw-ooxml/deleted-layouts.pptx delete mode 100644 test/pptx/raw-ooxml/moved-layouts.pptx delete mode 100644 test/pptx/remove-empty-slides/deleted-layouts.pptx delete mode 100644 test/pptx/remove-empty-slides/moved-layouts.pptx delete mode 100644 test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx delete mode 100644 test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx delete mode 100644 test/pptx/slide-breaks-toc/deleted-layouts.pptx delete mode 100644 test/pptx/slide-breaks-toc/moved-layouts.pptx delete mode 100644 test/pptx/slide-breaks/deleted-layouts.pptx delete mode 100644 test/pptx/slide-breaks/moved-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx delete mode 100644 test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx delete mode 100644 test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx delete mode 100644 test/pptx/speaker-notes-after-metadata/moved-layouts.pptx delete mode 100644 test/pptx/speaker-notes-afterheader/deleted-layouts.pptx delete mode 100644 test/pptx/speaker-notes-afterheader/moved-layouts.pptx delete mode 100644 test/pptx/speaker-notes-afterseps/deleted-layouts.pptx delete mode 100644 test/pptx/speaker-notes-afterseps/moved-layouts.pptx delete mode 100644 test/pptx/speaker-notes/deleted-layouts.pptx delete mode 100644 test/pptx/speaker-notes/moved-layouts.pptx delete mode 100644 test/pptx/start-numbering-at/deleted-layouts.pptx delete mode 100644 test/pptx/start-numbering-at/moved-layouts.pptx delete mode 100644 test/pptx/tables/deleted-layouts.pptx delete mode 100644 test/pptx/tables/moved-layouts.pptx delete mode 100644 test/pptx/two-column/all-text/deleted-layouts.pptx delete mode 100644 test/pptx/two-column/all-text/moved-layouts.pptx delete mode 100644 test/pptx/two-column/text-and-image/deleted-layouts.pptx delete mode 100644 test/pptx/two-column/text-and-image/moved-layouts.pptx (limited to 'test/pptx/endnotes-toc') diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index b2df80e5f..84bdd7476 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -7,7 +7,6 @@ import System.FilePath import Text.DocTemplates (ToContext(toVal), Context(..)) import qualified Data.Map as M import Data.Text (pack) -import Data.List (unzip4) -- templating is important enough, and can break enough things, that -- we want to run all our tests with both default formatting and a @@ -17,11 +16,9 @@ modifyPptxName :: FilePath -> String -> FilePath modifyPptxName fp suffix = addExtension (takeDirectory fp ++ suffix) "pptx" -pptxTests :: String -> WriterOptions -> FilePath -> FilePath -> (TestTree, TestTree, TestTree, TestTree) +pptxTests :: String -> WriterOptions -> FilePath -> FilePath -> (TestTree, TestTree) pptxTests name opts native pptx = let referenceDoc = "pptx/reference-depth.pptx" - movedLayoutsReferenceDoc = "pptx/reference-moved-layouts.pptx" - deletedLayoutsReferenceDoc = "pptx/reference-deleted-layouts.pptx" in ( ooxmlTest writePowerpoint @@ -35,28 +32,14 @@ pptxTests name opts native pptx = opts{writerReferenceDoc=Just referenceDoc} native (modifyPptxName pptx "/templated") - , ooxmlTest - writePowerpoint - name - opts{writerReferenceDoc=Just movedLayoutsReferenceDoc} - native - (modifyPptxName pptx "/moved-layouts") - , ooxmlTest - writePowerpoint - name - opts{writerReferenceDoc=Just deletedLayoutsReferenceDoc} - native - (modifyPptxName pptx "/deleted-layouts") ) -groupPptxTests :: [(TestTree, TestTree, TestTree, TestTree)] -> [TestTree] +groupPptxTests :: [(TestTree, TestTree)] -> [TestTree] groupPptxTests pairs = - let (noRefs, refs, movedLayouts, deletedLayouts) = unzip4 pairs + let (noRefs, refs) = unzip pairs in [ testGroup "Default slide formatting" noRefs , testGroup "With `--reference-doc` pptx file" refs - , testGroup "With layouts in reference doc moved" movedLayouts - , testGroup "With layouts in reference doc deleted" deletedLayouts ] @@ -272,5 +255,17 @@ tests = let def { writerReferenceDoc = Just "pptx/footer/higher-slide-number/reference.pptx"} "pptx/footer/input.native" "pptx/footer/higher-slide-number/output.pptx" + , ooxmlTest + writePowerpoint + "Layouts can be moved around in reference doc" + def {writerReferenceDoc = Just "pptx/reference-moved-layouts.pptx"} + "pptx/layouts/input.native" + "pptx/layouts/moved.pptx" + , ooxmlTest + writePowerpoint + "Layouts can be missing from the reference doc" + def {writerReferenceDoc = Just "pptx/reference-deleted-layouts.pptx"} + "pptx/layouts/input.native" + "pptx/layouts/deleted.pptx" ] in regularTests <> referenceSpecificTests diff --git a/test/pptx/background-image/deleted-layouts.pptx b/test/pptx/background-image/deleted-layouts.pptx deleted file mode 100644 index e46a58ad7..000000000 Binary files a/test/pptx/background-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/background-image/moved-layouts.pptx b/test/pptx/background-image/moved-layouts.pptx deleted file mode 100644 index 98fe33095..000000000 Binary files a/test/pptx/background-image/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx b/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx deleted file mode 100644 index f729c3ce6..000000000 Binary files a/test/pptx/blanks/just-speaker-notes/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx b/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx deleted file mode 100644 index dfae6a645..000000000 Binary files a/test/pptx/blanks/just-speaker-notes/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx b/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx deleted file mode 100644 index dcd88cb24..000000000 Binary files a/test/pptx/blanks/nbsp-in-body/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx b/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx deleted file mode 100644 index 0a69853fa..000000000 Binary files a/test/pptx/blanks/nbsp-in-body/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx b/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx deleted file mode 100644 index dcd88cb24..000000000 Binary files a/test/pptx/blanks/nbsp-in-heading/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx b/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx deleted file mode 100644 index 0a69853fa..000000000 Binary files a/test/pptx/blanks/nbsp-in-heading/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/code-custom/deleted-layouts.pptx b/test/pptx/code-custom/deleted-layouts.pptx deleted file mode 100644 index f8b1c789e..000000000 Binary files a/test/pptx/code-custom/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/code-custom/moved-layouts.pptx b/test/pptx/code-custom/moved-layouts.pptx deleted file mode 100644 index 810b46dd1..000000000 Binary files a/test/pptx/code-custom/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/code/deleted-layouts.pptx b/test/pptx/code/deleted-layouts.pptx deleted file mode 100644 index 3127e20e5..000000000 Binary files a/test/pptx/code/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/code/moved-layouts.pptx b/test/pptx/code/moved-layouts.pptx deleted file mode 100644 index 7a2e3b7ac..000000000 Binary files a/test/pptx/code/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/both-columns/deleted-layouts.pptx b/test/pptx/comparison/both-columns/deleted-layouts.pptx deleted file mode 100644 index 6d80e275f..000000000 Binary files a/test/pptx/comparison/both-columns/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/both-columns/moved-layouts.pptx b/test/pptx/comparison/both-columns/moved-layouts.pptx deleted file mode 100644 index 2840e0535..000000000 Binary files a/test/pptx/comparison/both-columns/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/extra-image/deleted-layouts.pptx b/test/pptx/comparison/extra-image/deleted-layouts.pptx deleted file mode 100644 index 771ad409a..000000000 Binary files a/test/pptx/comparison/extra-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/extra-image/moved-layouts.pptx b/test/pptx/comparison/extra-image/moved-layouts.pptx deleted file mode 100644 index 2418e98c1..000000000 Binary files a/test/pptx/comparison/extra-image/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/extra-text/deleted-layouts.pptx b/test/pptx/comparison/extra-text/deleted-layouts.pptx deleted file mode 100644 index c87b3f3ee..000000000 Binary files a/test/pptx/comparison/extra-text/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/extra-text/moved-layouts.pptx b/test/pptx/comparison/extra-text/moved-layouts.pptx deleted file mode 100644 index 2840e0535..000000000 Binary files a/test/pptx/comparison/extra-text/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/non-text-first/deleted-layouts.pptx b/test/pptx/comparison/non-text-first/deleted-layouts.pptx deleted file mode 100644 index 95b2e3a3c..000000000 Binary files a/test/pptx/comparison/non-text-first/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/non-text-first/moved-layouts.pptx b/test/pptx/comparison/non-text-first/moved-layouts.pptx deleted file mode 100644 index 5a60028d4..000000000 Binary files a/test/pptx/comparison/non-text-first/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/one-column/deleted-layouts.pptx b/test/pptx/comparison/one-column/deleted-layouts.pptx deleted file mode 100644 index 6a705c735..000000000 Binary files a/test/pptx/comparison/one-column/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/comparison/one-column/moved-layouts.pptx b/test/pptx/comparison/one-column/moved-layouts.pptx deleted file mode 100644 index f456151a5..000000000 Binary files a/test/pptx/comparison/one-column/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx b/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx deleted file mode 100644 index d01a8f9d8..000000000 Binary files a/test/pptx/content-with-caption/heading-text-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx b/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx deleted file mode 100644 index 69cb830a9..000000000 Binary files a/test/pptx/content-with-caption/heading-text-image/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/content-with-caption/image-text/deleted-layouts.pptx b/test/pptx/content-with-caption/image-text/deleted-layouts.pptx deleted file mode 100644 index e9aebd579..000000000 Binary files a/test/pptx/content-with-caption/image-text/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/content-with-caption/image-text/moved-layouts.pptx b/test/pptx/content-with-caption/image-text/moved-layouts.pptx deleted file mode 100644 index c27f1e1cf..000000000 Binary files a/test/pptx/content-with-caption/image-text/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/content-with-caption/text-image/deleted-layouts.pptx b/test/pptx/content-with-caption/text-image/deleted-layouts.pptx deleted file mode 100644 index f15e674c7..000000000 Binary files a/test/pptx/content-with-caption/text-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/content-with-caption/text-image/moved-layouts.pptx b/test/pptx/content-with-caption/text-image/moved-layouts.pptx deleted file mode 100644 index 39566cd7f..000000000 Binary files a/test/pptx/content-with-caption/text-image/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/document-properties-short-desc/deleted-layouts.pptx b/test/pptx/document-properties-short-desc/deleted-layouts.pptx deleted file mode 100644 index a6da0c338..000000000 Binary files a/test/pptx/document-properties-short-desc/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/document-properties-short-desc/moved-layouts.pptx b/test/pptx/document-properties-short-desc/moved-layouts.pptx deleted file mode 100644 index 4cff1d486..000000000 Binary files a/test/pptx/document-properties-short-desc/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/document-properties/deleted-layouts.pptx b/test/pptx/document-properties/deleted-layouts.pptx deleted file mode 100644 index a2a58af34..000000000 Binary files a/test/pptx/document-properties/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/document-properties/moved-layouts.pptx b/test/pptx/document-properties/moved-layouts.pptx deleted file mode 100644 index e24d904a2..000000000 Binary files a/test/pptx/document-properties/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/endnotes-toc/deleted-layouts.pptx b/test/pptx/endnotes-toc/deleted-layouts.pptx deleted file mode 100644 index 3e613e038..000000000 Binary files a/test/pptx/endnotes-toc/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/endnotes-toc/moved-layouts.pptx b/test/pptx/endnotes-toc/moved-layouts.pptx deleted file mode 100644 index e64cd9c77..000000000 Binary files a/test/pptx/endnotes-toc/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/endnotes/deleted-layouts.pptx b/test/pptx/endnotes/deleted-layouts.pptx deleted file mode 100644 index 1d7ccb928..000000000 Binary files a/test/pptx/endnotes/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/endnotes/moved-layouts.pptx b/test/pptx/endnotes/moved-layouts.pptx deleted file mode 100644 index 0f071207c..000000000 Binary files a/test/pptx/endnotes/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/images/deleted-layouts.pptx b/test/pptx/images/deleted-layouts.pptx deleted file mode 100644 index 3c3ed787f..000000000 Binary files a/test/pptx/images/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/images/moved-layouts.pptx b/test/pptx/images/moved-layouts.pptx deleted file mode 100644 index b22f3652a..000000000 Binary files a/test/pptx/images/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/incremental-lists/with-flag/deleted-layouts.pptx b/test/pptx/incremental-lists/with-flag/deleted-layouts.pptx deleted file mode 100644 index 3e92d4dab..000000000 Binary files a/test/pptx/incremental-lists/with-flag/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/incremental-lists/with-flag/moved-layouts.pptx b/test/pptx/incremental-lists/with-flag/moved-layouts.pptx deleted file mode 100644 index 050842865..000000000 Binary files a/test/pptx/incremental-lists/with-flag/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/incremental-lists/without-flag/deleted-layouts.pptx b/test/pptx/incremental-lists/without-flag/deleted-layouts.pptx deleted file mode 100644 index 4816c0b39..000000000 Binary files a/test/pptx/incremental-lists/without-flag/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/incremental-lists/without-flag/moved-layouts.pptx b/test/pptx/incremental-lists/without-flag/moved-layouts.pptx deleted file mode 100644 index 4f27db07b..000000000 Binary files a/test/pptx/incremental-lists/without-flag/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/inline-formatting/deleted-layouts.pptx b/test/pptx/inline-formatting/deleted-layouts.pptx deleted file mode 100644 index ac9fa4725..000000000 Binary files a/test/pptx/inline-formatting/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/inline-formatting/moved-layouts.pptx b/test/pptx/inline-formatting/moved-layouts.pptx deleted file mode 100644 index 49a2409d1..000000000 Binary files a/test/pptx/inline-formatting/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/layouts/deleted.pptx b/test/pptx/layouts/deleted.pptx new file mode 100644 index 000000000..f7116b2f4 Binary files /dev/null and b/test/pptx/layouts/deleted.pptx differ diff --git a/test/pptx/layouts/input.native b/test/pptx/layouts/input.native new file mode 100644 index 000000000..0cee2d14e --- /dev/null +++ b/test/pptx/layouts/input.native @@ -0,0 +1,23 @@ +Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "Testing",Space,Str "Layouts"])]}) +[Header 2 ("slide-1",[],[]) [Str "Slide",Space,Str "1"] +,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "title",Space,Str "and",Space,Str "content",Space,Str "slide"] +,Header 2 ("slide-2",[],[]) [Str "Slide",Space,Str "2"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Para [Str "This"]] + ,Div ("",["column"],[]) + [Para [Str "\8230is",Space,Str "a",Space,Str "two-column",Space,Str "slide"]]] +,Header 2 ("slide-3",[],[]) [Str "Slide",Space,Str "3"] +,Para [Str "This",Space,Str "slide",Space,Str "is",Space,Str "a",Space,Str "Content",Space,Str "with",Space,Str "Caption",Space,Str "slide"] +,Para [Image ("",[],[]) [Str "Content"] ("lalune.jpg","fig:")] +,Header 2 ("slide-4",[],[]) [Str "Slide",Space,Str "4"] +,Div ("",["columns"],[]) + [Div ("",["column"],[]) + [Para [Str "This",Space,Str "slide",Space,Str "is",Space,Str "a",Space,Str "Comparison",Space,Str "slide:"] + ,Para [Image ("",[],[]) [Str "Content"] ("lalune.jpg","fig:")]] + ,Div ("",["column"],[]) + [Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "other",Space,Str "text"]]] +,Header 1 ("section-header",[],[]) [Str "Section",Space,Str "header"] +,Header 2 ("section",[],[]) [] +,Div ("",["notes"],[]) + [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "blank",Space,Str "slide"]]] diff --git a/test/pptx/layouts/moved.pptx b/test/pptx/layouts/moved.pptx new file mode 100644 index 000000000..e41465a86 Binary files /dev/null and b/test/pptx/layouts/moved.pptx differ diff --git a/test/pptx/lists/deleted-layouts.pptx b/test/pptx/lists/deleted-layouts.pptx deleted file mode 100644 index d064b7fd5..000000000 Binary files a/test/pptx/lists/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/lists/moved-layouts.pptx b/test/pptx/lists/moved-layouts.pptx deleted file mode 100644 index 8a9c9ec59..000000000 Binary files a/test/pptx/lists/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/raw-ooxml/deleted-layouts.pptx b/test/pptx/raw-ooxml/deleted-layouts.pptx deleted file mode 100644 index a7bd12281..000000000 Binary files a/test/pptx/raw-ooxml/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/raw-ooxml/moved-layouts.pptx b/test/pptx/raw-ooxml/moved-layouts.pptx deleted file mode 100644 index 614682671..000000000 Binary files a/test/pptx/raw-ooxml/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/remove-empty-slides/deleted-layouts.pptx b/test/pptx/remove-empty-slides/deleted-layouts.pptx deleted file mode 100644 index 488abc02a..000000000 Binary files a/test/pptx/remove-empty-slides/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/remove-empty-slides/moved-layouts.pptx b/test/pptx/remove-empty-slides/moved-layouts.pptx deleted file mode 100644 index 1e1cf1e44..000000000 Binary files a/test/pptx/remove-empty-slides/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx b/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx deleted file mode 100644 index b6b004cd6..000000000 Binary files a/test/pptx/slide-breaks-slide-level-1/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx b/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx deleted file mode 100644 index 229e4c32a..000000000 Binary files a/test/pptx/slide-breaks-slide-level-1/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-breaks-toc/deleted-layouts.pptx b/test/pptx/slide-breaks-toc/deleted-layouts.pptx deleted file mode 100644 index e3b3b2807..000000000 Binary files a/test/pptx/slide-breaks-toc/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-breaks-toc/moved-layouts.pptx b/test/pptx/slide-breaks-toc/moved-layouts.pptx deleted file mode 100644 index ecc942803..000000000 Binary files a/test/pptx/slide-breaks-toc/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-breaks/deleted-layouts.pptx b/test/pptx/slide-breaks/deleted-layouts.pptx deleted file mode 100644 index ada3453b0..000000000 Binary files a/test/pptx/slide-breaks/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-breaks/moved-layouts.pptx b/test/pptx/slide-breaks/moved-layouts.pptx deleted file mode 100644 index 0fe10f443..000000000 Binary files a/test/pptx/slide-breaks/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx deleted file mode 100644 index c315a7a7a..000000000 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx b/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx deleted file mode 100644 index 81b49936d..000000000 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx deleted file mode 100644 index 478dde788..000000000 Binary files a/test/pptx/slide-level-0/h1-with-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx b/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx deleted file mode 100644 index 63b411888..000000000 Binary files a/test/pptx/slide-level-0/h1-with-image/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx b/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx deleted file mode 100644 index 9d58c2c52..000000000 Binary files a/test/pptx/slide-level-0/h1-with-table/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx b/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx deleted file mode 100644 index 62424de73..000000000 Binary files a/test/pptx/slide-level-0/h1-with-table/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx b/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx deleted file mode 100644 index 478dde788..000000000 Binary files a/test/pptx/slide-level-0/h2-with-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx b/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx deleted file mode 100644 index 63b411888..000000000 Binary files a/test/pptx/slide-level-0/h2-with-image/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx b/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx deleted file mode 100644 index 07e21ef02..000000000 Binary files a/test/pptx/speaker-notes-after-metadata/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx b/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx deleted file mode 100644 index d6673aac0..000000000 Binary files a/test/pptx/speaker-notes-after-metadata/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx b/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx deleted file mode 100644 index 0ccdd72b7..000000000 Binary files a/test/pptx/speaker-notes-afterheader/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes-afterheader/moved-layouts.pptx b/test/pptx/speaker-notes-afterheader/moved-layouts.pptx deleted file mode 100644 index 81f0a56cb..000000000 Binary files a/test/pptx/speaker-notes-afterheader/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx b/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx deleted file mode 100644 index 33dedf2c3..000000000 Binary files a/test/pptx/speaker-notes-afterseps/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes-afterseps/moved-layouts.pptx b/test/pptx/speaker-notes-afterseps/moved-layouts.pptx deleted file mode 100644 index 28bcf3887..000000000 Binary files a/test/pptx/speaker-notes-afterseps/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes/deleted-layouts.pptx b/test/pptx/speaker-notes/deleted-layouts.pptx deleted file mode 100644 index 5f407086a..000000000 Binary files a/test/pptx/speaker-notes/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/speaker-notes/moved-layouts.pptx b/test/pptx/speaker-notes/moved-layouts.pptx deleted file mode 100644 index 83d5ed0af..000000000 Binary files a/test/pptx/speaker-notes/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/start-numbering-at/deleted-layouts.pptx b/test/pptx/start-numbering-at/deleted-layouts.pptx deleted file mode 100644 index d99fedfa6..000000000 Binary files a/test/pptx/start-numbering-at/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/start-numbering-at/moved-layouts.pptx b/test/pptx/start-numbering-at/moved-layouts.pptx deleted file mode 100644 index 98db3ec74..000000000 Binary files a/test/pptx/start-numbering-at/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/tables/deleted-layouts.pptx b/test/pptx/tables/deleted-layouts.pptx deleted file mode 100644 index 7ad714058..000000000 Binary files a/test/pptx/tables/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/tables/moved-layouts.pptx b/test/pptx/tables/moved-layouts.pptx deleted file mode 100644 index 9628717d7..000000000 Binary files a/test/pptx/tables/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/two-column/all-text/deleted-layouts.pptx b/test/pptx/two-column/all-text/deleted-layouts.pptx deleted file mode 100644 index a321128b5..000000000 Binary files a/test/pptx/two-column/all-text/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/two-column/all-text/moved-layouts.pptx b/test/pptx/two-column/all-text/moved-layouts.pptx deleted file mode 100644 index 90b1d9254..000000000 Binary files a/test/pptx/two-column/all-text/moved-layouts.pptx and /dev/null differ diff --git a/test/pptx/two-column/text-and-image/deleted-layouts.pptx b/test/pptx/two-column/text-and-image/deleted-layouts.pptx deleted file mode 100644 index 46274ffac..000000000 Binary files a/test/pptx/two-column/text-and-image/deleted-layouts.pptx and /dev/null differ diff --git a/test/pptx/two-column/text-and-image/moved-layouts.pptx b/test/pptx/two-column/text-and-image/moved-layouts.pptx deleted file mode 100644 index c25331e23..000000000 Binary files a/test/pptx/two-column/text-and-image/moved-layouts.pptx and /dev/null differ -- cgit v1.2.3 From 8de261ba4e1e03f9dd5f78297d7299e9d78bbcfd Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Thu, 23 Sep 2021 16:01:38 +0100 Subject: pptx: Line up continuation paragraphs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit changes the `marL` and `indent` values used for plain paragraphs and numbered lists, and changes the spacing defined in the reference doc master for bulleted lists. For paragraphs, there is now a left-indent taken from the `otherStyle` in the master. For numbered lists, the number is positioned where the text would be if this were a plain paragraph, and the text is indented to the next level. This means that continuation paragraphs line up nicely with numbered lists. It also /mostly/ matches the observed PowerPoint behaviour when inserting paragraphs and numbered lists: the only difference is that PowerPoint was using a different margin value for the first level numbered lists – I’ve changed this to match the other levels, as I don’t think it makes the spacing unappealing and it allows continuation paragraphs at any level to line up. With bulleted lists, I’m keeping the observed PowerPoint behaviour of specifying only a level, letting `marL` and `indent` be automatically taken from `bodyStyle`. To that end, this commit changes the `bodyStyle` spacing in the master of the default reference doc, to: - line up the text of the first paragraph in each bullet with any continuation paragraphs - line up nested bullet markers in any continuation paragraphs with the first paragraph, matching lists and plain paragraphs This does mean the continuation paragraphs still won’t line up for anyone using their own reference doc where they haven’t matched the `otherStyle` and `bodyStyle` indent levels, but I think people in that situation will be able to troubleshoot. --- data/pptx/ppt/slideMasters/slideMaster1.xml | 2 +- src/Text/Pandoc/Writers/Powerpoint/Output.hs | 100 +++++++++++++++++++-- src/Text/Pandoc/Writers/Powerpoint/Presentation.hs | 3 +- test/pptx/background-image/output.pptx | Bin 53358 -> 53318 bytes test/pptx/blanks/just-speaker-notes/output.pptx | Bin 32267 -> 32227 bytes test/pptx/blanks/nbsp-in-body/output.pptx | Bin 29205 -> 29165 bytes test/pptx/blanks/nbsp-in-heading/output.pptx | Bin 29205 -> 29165 bytes test/pptx/code-custom/output.pptx | Bin 29807 -> 29776 bytes test/pptx/code/output.pptx | Bin 29806 -> 29773 bytes test/pptx/comparison/both-columns/output.pptx | Bin 44570 -> 44530 bytes test/pptx/comparison/extra-image/output.pptx | Bin 44599 -> 44559 bytes test/pptx/comparison/extra-text/output.pptx | Bin 44570 -> 44530 bytes test/pptx/comparison/non-text-first/output.pptx | Bin 44484 -> 44444 bytes test/pptx/comparison/one-column/output.pptx | Bin 27902 -> 27862 bytes .../heading-text-image/output.pptx | Bin 44318 -> 44278 bytes .../content-with-caption/image-text/output.pptx | Bin 45019 -> 44979 bytes .../content-with-caption/text-image/output.pptx | Bin 44258 -> 44218 bytes .../document-properties-short-desc/output.pptx | Bin 28613 -> 28573 bytes test/pptx/document-properties/output.pptx | Bin 29015 -> 28976 bytes test/pptx/endnotes-toc/output.pptx | Bin 29399 -> 29363 bytes test/pptx/endnotes/output.pptx | Bin 28580 -> 28544 bytes test/pptx/images/output.pptx | Bin 46235 -> 46195 bytes test/pptx/incremental-lists/with-flag/output.pptx | Bin 77136 -> 77125 bytes .../incremental-lists/with-flag/templated.pptx | Bin 90251 -> 90277 bytes .../incremental-lists/without-flag/output.pptx | Bin 75386 -> 75374 bytes .../incremental-lists/without-flag/templated.pptx | Bin 88495 -> 88522 bytes test/pptx/inline-formatting/output.pptx | Bin 27772 -> 27736 bytes test/pptx/list-level/output.pptx | Bin 28635 -> 28632 bytes test/pptx/list-level/templated.pptx | Bin 41701 -> 41735 bytes test/pptx/lists/output.pptx | Bin 28657 -> 28639 bytes test/pptx/lists/templated.pptx | Bin 41724 -> 41742 bytes test/pptx/raw-ooxml/output.pptx | Bin 28560 -> 28524 bytes test/pptx/remove-empty-slides/output.pptx | Bin 44994 -> 44958 bytes test/pptx/slide-breaks-slide-level-1/output.pptx | Bin 29354 -> 29314 bytes test/pptx/slide-breaks-toc/output.pptx | Bin 31123 -> 31087 bytes test/pptx/slide-breaks/output.pptx | Bin 30179 -> 30139 bytes .../slide-level-0/h1-h2-with-table/output.pptx | Bin 27907 -> 27871 bytes test/pptx/slide-level-0/h1-with-image/output.pptx | Bin 44242 -> 44202 bytes test/pptx/slide-level-0/h1-with-table/output.pptx | Bin 27814 -> 27778 bytes test/pptx/slide-level-0/h2-with-image/output.pptx | Bin 44242 -> 44202 bytes test/pptx/speaker-notes-after-metadata/output.pptx | Bin 31617 -> 31577 bytes test/pptx/speaker-notes-afterheader/output.pptx | Bin 30629 -> 30589 bytes test/pptx/speaker-notes-afterseps/output.pptx | Bin 51486 -> 51450 bytes test/pptx/speaker-notes/output.pptx | Bin 35329 -> 35289 bytes test/pptx/start-numbering-at/output.pptx | Bin 28620 -> 28605 bytes test/pptx/start-numbering-at/templated.pptx | Bin 41686 -> 41707 bytes test/pptx/tables/output.pptx | Bin 29160 -> 29122 bytes test/pptx/two-column/all-text/output.pptx | Bin 27689 -> 27649 bytes test/pptx/two-column/text-and-image/output.pptx | Bin 45510 -> 45470 bytes 49 files changed, 94 insertions(+), 11 deletions(-) (limited to 'test/pptx/endnotes-toc') diff --git a/data/pptx/ppt/slideMasters/slideMaster1.xml b/data/pptx/ppt/slideMasters/slideMaster1.xml index 69f0af019..2e0425358 100644 --- a/data/pptx/ppt/slideMasters/slideMaster1.xml +++ b/data/pptx/ppt/slideMasters/slideMaster1.xml @@ -1,2 +1,2 @@ -Click to edit Master title styleClick to edit Master text stylesSecond levelThird levelFourth levelFifth level4/5/2019‹#› \ No newline at end of file +Click to edit Master title styleClick to edit Master text stylesSecond levelThird levelFourth levelFifth level4/5/2019‹#› diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 487dcad2e..e799297de 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -126,6 +126,7 @@ data WriterEnv = WriterEnv { envRefArchive :: Archive , envSpeakerNotesIdMap :: M.Map Int Int , envInSpeakerNotes :: Bool , envSlideLayouts :: Maybe SlideLayouts + , envOtherStyleIndents :: Maybe Indents } deriving (Show) @@ -145,6 +146,7 @@ instance Default WriterEnv where , envSpeakerNotesIdMap = mempty , envInSpeakerNotes = False , envSlideLayouts = Nothing + , envOtherStyleIndents = Nothing } type SlideLayouts = SlideLayoutsOf SlideLayout @@ -183,6 +185,39 @@ data Placeholder = Placeholder , index :: Int } deriving (Show, Eq) +-- | Paragraph indentation info. +data Indents = Indents + { level1 :: Maybe LevelIndents + , level2 :: Maybe LevelIndents + , level3 :: Maybe LevelIndents + , level4 :: Maybe LevelIndents + , level5 :: Maybe LevelIndents + , level6 :: Maybe LevelIndents + , level7 :: Maybe LevelIndents + , level8 :: Maybe LevelIndents + , level9 :: Maybe LevelIndents + } deriving (Show, Eq) + +levelIndent :: Indents -> Int -> Maybe LevelIndents +levelIndent is index = getter is + where + getter = case index of + 0 -> level1 + 1 -> level2 + 2 -> level3 + 3 -> level4 + 4 -> level5 + 5 -> level6 + 6 -> level7 + 7 -> level8 + 8 -> level9 + _ -> const Nothing + +data LevelIndents = LevelIndents + { marL :: EMU + , indent :: EMU + } deriving (Show, Eq) + data MediaInfo = MediaInfo { mInfoFilePath :: FilePath , mInfoLocalId :: Int , mInfoGlobalId :: Int @@ -580,6 +615,33 @@ presentationToArchive opts meta pres = do , slInReferenceDoc = True } + master <- getMaster' refArchive distArchive + + let otherStyleIndents = do + let ns = elemToNameSpaces master + txStyles <- findChild (elemName ns "p" "txStyles") master + otherStyle <- findChild (elemName ns "p" "otherStyle") txStyles + let makeLevelIndents name = do + e <- findChild (elemName ns "a" name) otherStyle + pure LevelIndents + { indent = fromMaybe (-342900) + (findAttr (QName "indent" Nothing Nothing) e + >>= readTextAsInteger) + , marL = fromMaybe 347663 + (findAttr (QName "marL" Nothing Nothing) e + >>= readTextAsInteger) + } + pure Indents + { level1 = makeLevelIndents "lvl1pPr" + , level2 = makeLevelIndents "lvl2pPr" + , level3 = makeLevelIndents "lvl3pPr" + , level4 = makeLevelIndents "lvl4pPr" + , level5 = makeLevelIndents "lvl5pPr" + , level6 = makeLevelIndents "lvl6pPr" + , level7 = makeLevelIndents "lvl7pPr" + , level8 = makeLevelIndents "lvl8pPr" + , level9 = makeLevelIndents "lvl9pPr" + } utctime <- P.getTimestamp @@ -605,6 +667,7 @@ presentationToArchive opts meta pres = do , envSlideIdMap = makeSlideIdMap pres , envSpeakerNotesIdMap = makeSpeakerNotesMap pres , envSlideLayouts = Just layouts + , envOtherStyleIndents = otherStyleIndents } let st = def { stMediaGlobalIds = initialGlobalIds refArchive distArchive @@ -910,6 +973,10 @@ getMaster :: PandocMonad m => P m Element getMaster = do refArchive <- asks envRefArchive distArchive <- asks envDistArchive + getMaster' refArchive distArchive + +getMaster' :: PandocMonad m => Archive -> Archive -> m Element +getMaster' refArchive distArchive = parseXml refArchive distArchive "ppt/slideMasters/slideMaster1.xml" getMasterRels :: PandocMonad m => P m Element @@ -1196,15 +1263,32 @@ surroundWithMathAlternate element = paragraphToElement :: PandocMonad m => Paragraph -> P m Element paragraphToElement par = do + indents <- asks envOtherStyleIndents let - attrs = [("lvl", tshow $ pPropLevel $ paraProps par)] <> - (case pPropMarginLeft (paraProps par) of - Just px -> [("marL", tshow $ pixelsToEmu px)] - Nothing -> [] - ) <> - (case pPropIndent (paraProps par) of - Just px -> [("indent", tshow $ pixelsToEmu px)] - Nothing -> [] + lvl = pPropLevel (paraProps par) + attrs = [("lvl", tshow lvl)] <> + (case (pPropIndent (paraProps par), pPropMarginLeft (paraProps par)) of + (Just px1, Just px2) -> [ ("indent", tshow $ pixelsToEmu px1) + , ("marL", tshow $ pixelsToEmu px2) + ] + (Just px1, Nothing) -> [("indent", tshow $ pixelsToEmu px1)] + (Nothing, Just px2) -> [("marL", tshow $ pixelsToEmu px2)] + (Nothing, Nothing) -> fromMaybe [] $ do + indents' <- indents + thisLevel <- levelIndent indents' lvl + nextLevel <- levelIndent indents' (lvl + 1) + let (m, i) = + case pPropBullet (paraProps par) of + Nothing -> + (Just (marL thisLevel), Just 0) + Just (AutoNumbering _) -> + ( Just (marL nextLevel) + , Just (marL thisLevel - marL nextLevel) + ) + Just Bullet -> (Nothing, Nothing) + pure ( toList ((,) "indent" . tshow <$> i) + <> toList ((,) "marL" . tshow <$> m) + ) ) <> (case pPropAlign (paraProps par) of Just AlgnLeft -> [("algn", "l")] diff --git a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs index 2f94dcc17..fd6b83120 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs @@ -541,8 +541,7 @@ blockToParagraphs blk = do addLogMessage $ BlockNotRendered blk return [] --- | Make sure the bullet env gets turned off after the first paragraph, and --- indent any continuation paragraphs. +-- | Make sure the bullet env gets turned off after the first para. multiParList :: [Block] -> Pres [Paragraph] multiParList [] = return [] multiParList (b:bs) = do diff --git a/test/pptx/background-image/output.pptx b/test/pptx/background-image/output.pptx index abe82ebc2..1e678e0a4 100644 Binary files a/test/pptx/background-image/output.pptx and b/test/pptx/background-image/output.pptx differ diff --git a/test/pptx/blanks/just-speaker-notes/output.pptx b/test/pptx/blanks/just-speaker-notes/output.pptx index 0c4ed20fa..9a36ccf1f 100644 Binary files a/test/pptx/blanks/just-speaker-notes/output.pptx and b/test/pptx/blanks/just-speaker-notes/output.pptx differ diff --git a/test/pptx/blanks/nbsp-in-body/output.pptx b/test/pptx/blanks/nbsp-in-body/output.pptx index 6265c842f..08c764feb 100644 Binary files a/test/pptx/blanks/nbsp-in-body/output.pptx and b/test/pptx/blanks/nbsp-in-body/output.pptx differ diff --git a/test/pptx/blanks/nbsp-in-heading/output.pptx b/test/pptx/blanks/nbsp-in-heading/output.pptx index 6265c842f..08c764feb 100644 Binary files a/test/pptx/blanks/nbsp-in-heading/output.pptx and b/test/pptx/blanks/nbsp-in-heading/output.pptx differ diff --git a/test/pptx/code-custom/output.pptx b/test/pptx/code-custom/output.pptx index 6c7a1a9ab..1e5085e9c 100644 Binary files a/test/pptx/code-custom/output.pptx and b/test/pptx/code-custom/output.pptx differ diff --git a/test/pptx/code/output.pptx b/test/pptx/code/output.pptx index 8fd00ff74..a3f31dfdc 100644 Binary files a/test/pptx/code/output.pptx and b/test/pptx/code/output.pptx differ diff --git a/test/pptx/comparison/both-columns/output.pptx b/test/pptx/comparison/both-columns/output.pptx index 47f807754..efb67f2e7 100644 Binary files a/test/pptx/comparison/both-columns/output.pptx and b/test/pptx/comparison/both-columns/output.pptx differ diff --git a/test/pptx/comparison/extra-image/output.pptx b/test/pptx/comparison/extra-image/output.pptx index f700e09a8..e26e5b49c 100644 Binary files a/test/pptx/comparison/extra-image/output.pptx and b/test/pptx/comparison/extra-image/output.pptx differ diff --git a/test/pptx/comparison/extra-text/output.pptx b/test/pptx/comparison/extra-text/output.pptx index 47f807754..efb67f2e7 100644 Binary files a/test/pptx/comparison/extra-text/output.pptx and b/test/pptx/comparison/extra-text/output.pptx differ diff --git a/test/pptx/comparison/non-text-first/output.pptx b/test/pptx/comparison/non-text-first/output.pptx index c8a2bd0e3..f36c53ddb 100644 Binary files a/test/pptx/comparison/non-text-first/output.pptx and b/test/pptx/comparison/non-text-first/output.pptx differ diff --git a/test/pptx/comparison/one-column/output.pptx b/test/pptx/comparison/one-column/output.pptx index e70dd2326..8d9031ac8 100644 Binary files a/test/pptx/comparison/one-column/output.pptx and b/test/pptx/comparison/one-column/output.pptx differ diff --git a/test/pptx/content-with-caption/heading-text-image/output.pptx b/test/pptx/content-with-caption/heading-text-image/output.pptx index 0677879aa..6802b7361 100644 Binary files a/test/pptx/content-with-caption/heading-text-image/output.pptx and b/test/pptx/content-with-caption/heading-text-image/output.pptx differ diff --git a/test/pptx/content-with-caption/image-text/output.pptx b/test/pptx/content-with-caption/image-text/output.pptx index f461b6ed3..0bd64e340 100644 Binary files a/test/pptx/content-with-caption/image-text/output.pptx and b/test/pptx/content-with-caption/image-text/output.pptx differ diff --git a/test/pptx/content-with-caption/text-image/output.pptx b/test/pptx/content-with-caption/text-image/output.pptx index be376c1ed..a0d8806c0 100644 Binary files a/test/pptx/content-with-caption/text-image/output.pptx and b/test/pptx/content-with-caption/text-image/output.pptx differ diff --git a/test/pptx/document-properties-short-desc/output.pptx b/test/pptx/document-properties-short-desc/output.pptx index 737ca7e8d..418d158ca 100644 Binary files a/test/pptx/document-properties-short-desc/output.pptx and b/test/pptx/document-properties-short-desc/output.pptx differ diff --git a/test/pptx/document-properties/output.pptx b/test/pptx/document-properties/output.pptx index ef05c01b5..55ca48b5d 100644 Binary files a/test/pptx/document-properties/output.pptx and b/test/pptx/document-properties/output.pptx differ diff --git a/test/pptx/endnotes-toc/output.pptx b/test/pptx/endnotes-toc/output.pptx index bb431f511..a6cc2db24 100644 Binary files a/test/pptx/endnotes-toc/output.pptx and b/test/pptx/endnotes-toc/output.pptx differ diff --git a/test/pptx/endnotes/output.pptx b/test/pptx/endnotes/output.pptx index e4e661804..ea29cbcf8 100644 Binary files a/test/pptx/endnotes/output.pptx and b/test/pptx/endnotes/output.pptx differ diff --git a/test/pptx/images/output.pptx b/test/pptx/images/output.pptx index 9b04881f3..098547e87 100644 Binary files a/test/pptx/images/output.pptx and b/test/pptx/images/output.pptx differ diff --git a/test/pptx/incremental-lists/with-flag/output.pptx b/test/pptx/incremental-lists/with-flag/output.pptx index 82f5f926f..230d29253 100644 Binary files a/test/pptx/incremental-lists/with-flag/output.pptx and b/test/pptx/incremental-lists/with-flag/output.pptx differ diff --git a/test/pptx/incremental-lists/with-flag/templated.pptx b/test/pptx/incremental-lists/with-flag/templated.pptx index e8482b25f..263d9c355 100644 Binary files a/test/pptx/incremental-lists/with-flag/templated.pptx and b/test/pptx/incremental-lists/with-flag/templated.pptx differ diff --git a/test/pptx/incremental-lists/without-flag/output.pptx b/test/pptx/incremental-lists/without-flag/output.pptx index 62e66e1fe..450cd16ea 100644 Binary files a/test/pptx/incremental-lists/without-flag/output.pptx and b/test/pptx/incremental-lists/without-flag/output.pptx differ diff --git a/test/pptx/incremental-lists/without-flag/templated.pptx b/test/pptx/incremental-lists/without-flag/templated.pptx index ac7be9564..e7ab48aa0 100644 Binary files a/test/pptx/incremental-lists/without-flag/templated.pptx and b/test/pptx/incremental-lists/without-flag/templated.pptx differ diff --git a/test/pptx/inline-formatting/output.pptx b/test/pptx/inline-formatting/output.pptx index f1a4a0a36..7744b7d2e 100644 Binary files a/test/pptx/inline-formatting/output.pptx and b/test/pptx/inline-formatting/output.pptx differ diff --git a/test/pptx/list-level/output.pptx b/test/pptx/list-level/output.pptx index 5e3506958..02c609b40 100644 Binary files a/test/pptx/list-level/output.pptx and b/test/pptx/list-level/output.pptx differ diff --git a/test/pptx/list-level/templated.pptx b/test/pptx/list-level/templated.pptx index 8853a3082..a7b23ccf9 100644 Binary files a/test/pptx/list-level/templated.pptx and b/test/pptx/list-level/templated.pptx differ diff --git a/test/pptx/lists/output.pptx b/test/pptx/lists/output.pptx index e23f47218..857a3e28c 100644 Binary files a/test/pptx/lists/output.pptx and b/test/pptx/lists/output.pptx differ diff --git a/test/pptx/lists/templated.pptx b/test/pptx/lists/templated.pptx index 290b5b519..5510a7123 100644 Binary files a/test/pptx/lists/templated.pptx and b/test/pptx/lists/templated.pptx differ diff --git a/test/pptx/raw-ooxml/output.pptx b/test/pptx/raw-ooxml/output.pptx index 841495315..1813bbd28 100644 Binary files a/test/pptx/raw-ooxml/output.pptx and b/test/pptx/raw-ooxml/output.pptx differ diff --git a/test/pptx/remove-empty-slides/output.pptx b/test/pptx/remove-empty-slides/output.pptx index e2871a882..d0d5e824c 100644 Binary files a/test/pptx/remove-empty-slides/output.pptx and b/test/pptx/remove-empty-slides/output.pptx differ diff --git a/test/pptx/slide-breaks-slide-level-1/output.pptx b/test/pptx/slide-breaks-slide-level-1/output.pptx index cb65ab335..d443bc04e 100644 Binary files a/test/pptx/slide-breaks-slide-level-1/output.pptx and b/test/pptx/slide-breaks-slide-level-1/output.pptx differ diff --git a/test/pptx/slide-breaks-toc/output.pptx b/test/pptx/slide-breaks-toc/output.pptx index f2660ef93..e24b45e12 100644 Binary files a/test/pptx/slide-breaks-toc/output.pptx and b/test/pptx/slide-breaks-toc/output.pptx differ diff --git a/test/pptx/slide-breaks/output.pptx b/test/pptx/slide-breaks/output.pptx index 7c2c7db5e..a5208ecf8 100644 Binary files a/test/pptx/slide-breaks/output.pptx and b/test/pptx/slide-breaks/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx index 3f815d830..bd772d44e 100644 Binary files a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx and b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-image/output.pptx b/test/pptx/slide-level-0/h1-with-image/output.pptx index 70fc6aee2..1102f549c 100644 Binary files a/test/pptx/slide-level-0/h1-with-image/output.pptx and b/test/pptx/slide-level-0/h1-with-image/output.pptx differ diff --git a/test/pptx/slide-level-0/h1-with-table/output.pptx b/test/pptx/slide-level-0/h1-with-table/output.pptx index d30fd88c3..c0bc6b162 100644 Binary files a/test/pptx/slide-level-0/h1-with-table/output.pptx and b/test/pptx/slide-level-0/h1-with-table/output.pptx differ diff --git a/test/pptx/slide-level-0/h2-with-image/output.pptx b/test/pptx/slide-level-0/h2-with-image/output.pptx index 70fc6aee2..1102f549c 100644 Binary files a/test/pptx/slide-level-0/h2-with-image/output.pptx and b/test/pptx/slide-level-0/h2-with-image/output.pptx differ diff --git a/test/pptx/speaker-notes-after-metadata/output.pptx b/test/pptx/speaker-notes-after-metadata/output.pptx index f68d6f0ef..4e5635e0c 100644 Binary files a/test/pptx/speaker-notes-after-metadata/output.pptx and b/test/pptx/speaker-notes-after-metadata/output.pptx differ diff --git a/test/pptx/speaker-notes-afterheader/output.pptx b/test/pptx/speaker-notes-afterheader/output.pptx index 9df78756b..f59b29f6a 100644 Binary files a/test/pptx/speaker-notes-afterheader/output.pptx and b/test/pptx/speaker-notes-afterheader/output.pptx differ diff --git a/test/pptx/speaker-notes-afterseps/output.pptx b/test/pptx/speaker-notes-afterseps/output.pptx index b54ba4465..aad79e3dc 100644 Binary files a/test/pptx/speaker-notes-afterseps/output.pptx and b/test/pptx/speaker-notes-afterseps/output.pptx differ diff --git a/test/pptx/speaker-notes/output.pptx b/test/pptx/speaker-notes/output.pptx index 6ae003d7a..7b44c50c2 100644 Binary files a/test/pptx/speaker-notes/output.pptx and b/test/pptx/speaker-notes/output.pptx differ diff --git a/test/pptx/start-numbering-at/output.pptx b/test/pptx/start-numbering-at/output.pptx index ecfc6901a..e08d300e5 100644 Binary files a/test/pptx/start-numbering-at/output.pptx and b/test/pptx/start-numbering-at/output.pptx differ diff --git a/test/pptx/start-numbering-at/templated.pptx b/test/pptx/start-numbering-at/templated.pptx index f3f46ef30..30a097eb8 100644 Binary files a/test/pptx/start-numbering-at/templated.pptx and b/test/pptx/start-numbering-at/templated.pptx differ diff --git a/test/pptx/tables/output.pptx b/test/pptx/tables/output.pptx index 4398e35be..407062ca3 100644 Binary files a/test/pptx/tables/output.pptx and b/test/pptx/tables/output.pptx differ diff --git a/test/pptx/two-column/all-text/output.pptx b/test/pptx/two-column/all-text/output.pptx index 45f651ceb..8a1dce949 100644 Binary files a/test/pptx/two-column/all-text/output.pptx and b/test/pptx/two-column/all-text/output.pptx differ diff --git a/test/pptx/two-column/text-and-image/output.pptx b/test/pptx/two-column/text-and-image/output.pptx index aab0b3b59..e45bf3d58 100644 Binary files a/test/pptx/two-column/text-and-image/output.pptx and b/test/pptx/two-column/text-and-image/output.pptx differ -- cgit v1.2.3