aboutsummaryrefslogtreecommitdiff
path: root/test/pptx
diff options
context:
space:
mode:
authorEmily Bourke <undergroundquizscene@protonmail.com>2021-08-20 14:40:09 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-08-27 09:47:03 -0700
commit8e5a79f264dd1ebe80e048397b6281e318d25e82 (patch)
treec55e64b8e59243aa9168906c2892ec0827c6b8c5 /test/pptx
parente4d7a6177f6ef7bf835f61ed01b0229423cd0e55 (diff)
downloadpandoc-8e5a79f264dd1ebe80e048397b6281e318d25e82.tar.gz
pptx: Make first heading title if slide level is 0
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.
Diffstat (limited to 'test/pptx')
-rw-r--r--test/pptx/slide-level-0-h1-h2-with-table.native14
-rw-r--r--test/pptx/slide-level-0-h1-h2-with-table.pptxbin0 -> 26985 bytes
-rw-r--r--test/pptx/slide-level-0-h1-h2-with-table_deleted_layouts.pptxbin0 -> 29828 bytes
-rw-r--r--test/pptx/slide-level-0-h1-h2-with-table_moved_layouts.pptxbin0 -> 40552 bytes
-rw-r--r--test/pptx/slide-level-0-h1-h2-with-table_templated.pptxbin0 -> 40052 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-image.native2
-rw-r--r--test/pptx/slide-level-0-h1-with-image.pptxbin0 -> 42596 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-image_deleted_layouts.pptxbin0 -> 45433 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-image_moved_layouts.pptxbin0 -> 56156 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-image_templated.pptxbin0 -> 55657 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-table.native13
-rw-r--r--test/pptx/slide-level-0-h1-with-table.pptxbin0 -> 26166 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-table_deleted_layouts.pptxbin0 -> 29008 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-table_moved_layouts.pptxbin0 -> 39731 bytes
-rw-r--r--test/pptx/slide-level-0-h1-with-table_templated.pptxbin0 -> 39232 bytes
-rw-r--r--test/pptx/slide-level-0-h2-with-image.native2
-rw-r--r--test/pptx/slide-level-0-h2-with-image.pptxbin0 -> 42596 bytes
-rw-r--r--test/pptx/slide-level-0-h2-with-image_deleted_layouts.pptxbin0 -> 45433 bytes
-rw-r--r--test/pptx/slide-level-0-h2-with-image_moved_layouts.pptxbin0 -> 56156 bytes
-rw-r--r--test/pptx/slide-level-0-h2-with-image_templated.pptxbin0 -> 55657 bytes
20 files changed, 31 insertions, 0 deletions
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 ("",[],[])
+ [])]
diff --git a/test/pptx/slide-level-0-h1-h2-with-table.pptx b/test/pptx/slide-level-0-h1-h2-with-table.pptx
new file mode 100644
index 000000000..197a6833f
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-h2-with-table.pptx
Binary files 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
new file mode 100644
index 000000000..5e776e05c
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-h2-with-table_deleted_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..35204de1b
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-h2-with-table_moved_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..5c659952e
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-h2-with-table_templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0-h1-with-image.native b/test/pptx/slide-level-0-h1-with-image.native
new file mode 100644
index 000000000..0f5033b54
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-image.native
@@ -0,0 +1,2 @@
+[Header 1 ("hello",[],[]) [Str "Hello"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("lalune.jpg","fig:")]]
diff --git a/test/pptx/slide-level-0-h1-with-image.pptx b/test/pptx/slide-level-0-h1-with-image.pptx
new file mode 100644
index 000000000..2f3a53f5c
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-image.pptx
Binary files 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
new file mode 100644
index 000000000..16c61d1be
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-image_deleted_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..395036069
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-image_moved_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..d306375e9
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-image_templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0-h1-with-table.native b/test/pptx/slide-level-0-h1-with-table.native
new file mode 100644
index 000000000..b961e900d
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-table.native
@@ -0,0 +1,13 @@
+[Header 1 ("hello",[],[]) [Str "Hello"]
+,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]]])]
+ (TableFoot ("",[],[])
+ [])]
diff --git a/test/pptx/slide-level-0-h1-with-table.pptx b/test/pptx/slide-level-0-h1-with-table.pptx
new file mode 100644
index 000000000..44dbbf90c
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-table.pptx
Binary files 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
new file mode 100644
index 000000000..0eb7c0b08
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-table_deleted_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..197499bc3
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-table_moved_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..87b45dda2
--- /dev/null
+++ b/test/pptx/slide-level-0-h1-with-table_templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0-h2-with-image.native b/test/pptx/slide-level-0-h2-with-image.native
new file mode 100644
index 000000000..5def0cb92
--- /dev/null
+++ b/test/pptx/slide-level-0-h2-with-image.native
@@ -0,0 +1,2 @@
+[Header 2 ("hello",[],[]) [Str "Hello"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("lalune.jpg","fig:")]]
diff --git a/test/pptx/slide-level-0-h2-with-image.pptx b/test/pptx/slide-level-0-h2-with-image.pptx
new file mode 100644
index 000000000..948659d6a
--- /dev/null
+++ b/test/pptx/slide-level-0-h2-with-image.pptx
Binary files 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
new file mode 100644
index 000000000..afc096ce6
--- /dev/null
+++ b/test/pptx/slide-level-0-h2-with-image_deleted_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..395036069
--- /dev/null
+++ b/test/pptx/slide-level-0-h2-with-image_moved_layouts.pptx
Binary files 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
new file mode 100644
index 000000000..d306375e9
--- /dev/null
+++ b/test/pptx/slide-level-0-h2-with-image_templated.pptx
Binary files differ