diff options
author | Emily Bourke <undergroundquizscene@protonmail.com> | 2021-09-08 14:05:22 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-09-13 08:30:36 -0700 |
commit | 0ebe65e651766a2b3d006d3dee4afdfd43a386d5 (patch) | |
tree | 55bf6ebc804e6fca086c2318b38af66b6ecdfa84 /test/pptx | |
parent | 6271b09c50444b107d8595f553700fa382718246 (diff) | |
download | pandoc-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) | bin | 30568 -> 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) | bin | 41256 -> 41256 bytes | |||
-rw-r--r-- | test/pptx/two-column/all-text/output.pptx (renamed from test/pptx/two-column/output.pptx) | bin | 27689 -> 27689 bytes | |||
-rw-r--r-- | test/pptx/two-column/all-text/templated.pptx (renamed from test/pptx/two-column/templated.pptx) | bin | 40756 -> 40756 bytes | |||
-rw-r--r-- | test/pptx/two-column/text-and-image/deleted-layouts.pptx | bin | 0 -> 48392 bytes | |||
-rw-r--r-- | test/pptx/two-column/text-and-image/input.native | 12 | ||||
-rw-r--r-- | test/pptx/two-column/text-and-image/moved-layouts.pptx | bin | 0 -> 59086 bytes | |||
-rw-r--r-- | test/pptx/two-column/text-and-image/output.pptx | bin | 0 -> 45520 bytes | |||
-rw-r--r-- | test/pptx/two-column/text-and-image/templated.pptx | bin | 0 -> 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 Binary files differindex 1d7bd87d3..1d7bd87d3 100644 --- a/test/pptx/two-column/deleted-layouts.pptx +++ b/test/pptx/two-column/all-text/deleted-layouts.pptx 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 Binary files differindex 71760268c..71760268c 100644 --- a/test/pptx/two-column/moved-layouts.pptx +++ b/test/pptx/two-column/all-text/moved-layouts.pptx diff --git a/test/pptx/two-column/output.pptx b/test/pptx/two-column/all-text/output.pptx Binary files differindex 396dc2a74..396dc2a74 100644 --- a/test/pptx/two-column/output.pptx +++ b/test/pptx/two-column/all-text/output.pptx diff --git a/test/pptx/two-column/templated.pptx b/test/pptx/two-column/all-text/templated.pptx Binary files differindex 8901695b1..8901695b1 100644 --- a/test/pptx/two-column/templated.pptx +++ b/test/pptx/two-column/all-text/templated.pptx diff --git a/test/pptx/two-column/text-and-image/deleted-layouts.pptx b/test/pptx/two-column/text-and-image/deleted-layouts.pptx Binary files differnew file mode 100644 index 000000000..297fd6bad --- /dev/null +++ b/test/pptx/two-column/text-and-image/deleted-layouts.pptx 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 Binary files differnew file mode 100644 index 000000000..c9a6e577e --- /dev/null +++ b/test/pptx/two-column/text-and-image/moved-layouts.pptx diff --git a/test/pptx/two-column/text-and-image/output.pptx b/test/pptx/two-column/text-and-image/output.pptx Binary files differnew file mode 100644 index 000000000..bfd532ed9 --- /dev/null +++ b/test/pptx/two-column/text-and-image/output.pptx diff --git a/test/pptx/two-column/text-and-image/templated.pptx b/test/pptx/two-column/text-and-image/templated.pptx Binary files differnew file mode 100644 index 000000000..23e6b283f --- /dev/null +++ b/test/pptx/two-column/text-and-image/templated.pptx |