aboutsummaryrefslogtreecommitdiff
path: root/test/pptx
diff options
context:
space:
mode:
authorEmily Bourke <undergroundquizscene@protonmail.com>2021-09-08 14:05:22 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-13 08:30:36 -0700
commit0ebe65e651766a2b3d006d3dee4afdfd43a386d5 (patch)
tree55bf6ebc804e6fca086c2318b38af66b6ecdfa84 /test/pptx
parent6271b09c50444b107d8595f553700fa382718246 (diff)
downloadpandoc-0ebe65e651766a2b3d006d3dee4afdfd43a386d5.tar.gz
pptx: Fix logic for choosing Comparison layout
There was a mistake in the logic used to choose between the Comparison and Two Content layouts: if one column contained only non-text (an image or a table) and the other contained only text, the Comparison layout was chosen instead of the desired Two Content layout. This commit fixes that logic: > If either column contains text followed by non-text, use Comparison. Otherwise, use Two Content. It also adds a test asserting this behaviour.
Diffstat (limited to 'test/pptx')
-rw-r--r--test/pptx/two-column/all-text/deleted-layouts.pptx (renamed from test/pptx/two-column/deleted-layouts.pptx)bin30568 -> 30568 bytes
-rw-r--r--test/pptx/two-column/all-text/input.native (renamed from test/pptx/two-column/input.native)0
-rw-r--r--test/pptx/two-column/all-text/moved-layouts.pptx (renamed from test/pptx/two-column/moved-layouts.pptx)bin41256 -> 41256 bytes
-rw-r--r--test/pptx/two-column/all-text/output.pptx (renamed from test/pptx/two-column/output.pptx)bin27689 -> 27689 bytes
-rw-r--r--test/pptx/two-column/all-text/templated.pptx (renamed from test/pptx/two-column/templated.pptx)bin40756 -> 40756 bytes
-rw-r--r--test/pptx/two-column/text-and-image/deleted-layouts.pptxbin0 -> 48392 bytes
-rw-r--r--test/pptx/two-column/text-and-image/input.native12
-rw-r--r--test/pptx/two-column/text-and-image/moved-layouts.pptxbin0 -> 59086 bytes
-rw-r--r--test/pptx/two-column/text-and-image/output.pptxbin0 -> 45520 bytes
-rw-r--r--test/pptx/two-column/text-and-image/templated.pptxbin0 -> 58586 bytes
10 files changed, 12 insertions, 0 deletions
diff --git a/test/pptx/two-column/deleted-layouts.pptx b/test/pptx/two-column/all-text/deleted-layouts.pptx
index 1d7bd87d3..1d7bd87d3 100644
--- a/test/pptx/two-column/deleted-layouts.pptx
+++ b/test/pptx/two-column/all-text/deleted-layouts.pptx
Binary files differ
diff --git a/test/pptx/two-column/input.native b/test/pptx/two-column/all-text/input.native
index 086f74889..086f74889 100644
--- a/test/pptx/two-column/input.native
+++ b/test/pptx/two-column/all-text/input.native
diff --git a/test/pptx/two-column/moved-layouts.pptx b/test/pptx/two-column/all-text/moved-layouts.pptx
index 71760268c..71760268c 100644
--- a/test/pptx/two-column/moved-layouts.pptx
+++ b/test/pptx/two-column/all-text/moved-layouts.pptx
Binary files differ
diff --git a/test/pptx/two-column/output.pptx b/test/pptx/two-column/all-text/output.pptx
index 396dc2a74..396dc2a74 100644
--- a/test/pptx/two-column/output.pptx
+++ b/test/pptx/two-column/all-text/output.pptx
Binary files differ
diff --git a/test/pptx/two-column/templated.pptx b/test/pptx/two-column/all-text/templated.pptx
index 8901695b1..8901695b1 100644
--- a/test/pptx/two-column/templated.pptx
+++ b/test/pptx/two-column/all-text/templated.pptx
Binary files 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
new file mode 100644
index 000000000..297fd6bad
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/deleted-layouts.pptx
Binary files differ
diff --git a/test/pptx/two-column/text-and-image/input.native b/test/pptx/two-column/text-and-image/input.native
new file mode 100644
index 000000000..796c2c7f4
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/input.native
@@ -0,0 +1,12 @@
+[Header 1 ("slide-1",[],[]) [Str "Slide",Space,Str "1"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [Para [Str "This",Space,Str "should",Space,Str "use",Space,Str "Two",Space,Str "Content,",Space,Emph [Str "not"],Space,Str "Comparison!"]]]
+,Header 1 ("slide-2",[],[]) [Str "Slide",Space,Str "2"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "This",Space,Str "should",Space,Str "also",Space,Str "use",Space,Str "Two",Space,Str "Content"]]
+ ,Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]]
diff --git a/test/pptx/two-column/text-and-image/moved-layouts.pptx b/test/pptx/two-column/text-and-image/moved-layouts.pptx
new file mode 100644
index 000000000..c9a6e577e
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/moved-layouts.pptx
Binary files differ
diff --git a/test/pptx/two-column/text-and-image/output.pptx b/test/pptx/two-column/text-and-image/output.pptx
new file mode 100644
index 000000000..bfd532ed9
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/output.pptx
Binary files differ
diff --git a/test/pptx/two-column/text-and-image/templated.pptx b/test/pptx/two-column/text-and-image/templated.pptx
new file mode 100644
index 000000000..23e6b283f
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/templated.pptx
Binary files differ