From 8e5a79f264dd1ebe80e048397b6281e318d25e82 Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Fri, 20 Aug 2021 14:40:09 +0100 Subject: pptx: Make first heading title if slide level is 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, the pptx writer adds a slide break before any table, “columns” div, or paragraph starting with an image, unless the only thing before it on the same slide is a heading at the slide level. In that case, the item and heading are kept on the same slide, and the heading is used as the slide title (inserted into the layout’s “title” placeholder). However, if the slide level is set to 0 (as was recently enabled) this makes it impossible to have a slide with a title which contains any of those items in its body. This commit changes this behaviour: now if the slide level is 0, then items will be kept with a heading of any level, if the heading’s the only thing before the item on the same slide. --- test/pptx/slide-level-0-h1-h2-with-table.native | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/pptx/slide-level-0-h1-h2-with-table.native (limited to 'test/pptx/slide-level-0-h1-h2-with-table.native') diff --git a/test/pptx/slide-level-0-h1-h2-with-table.native b/test/pptx/slide-level-0-h1-h2-with-table.native new file mode 100644 index 000000000..c6e65ecf5 --- /dev/null +++ b/test/pptx/slide-level-0-h1-h2-with-table.native @@ -0,0 +1,14 @@ +[Header 1 ("hello",[],[]) [Str "Hello"] +,Header 2 ("there",[],[]) [Str "There"] +,Table ("",[],[]) (Caption Nothing + []) + [(AlignDefault,ColWidth 5.555555555555555e-2)] + (TableHead ("",[],[]) + []) + [(TableBody ("",[],[]) (RowHeadColumns 0) + [] + [Row ("",[],[]) + [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) + [Plain [Str "1"]]]])] + (TableFoot ("",[],[]) + [])] -- cgit v1.2.3