aboutsummaryrefslogtreecommitdiff
path: root/test/pptx
diff options
context:
space:
mode:
authordespresc <christian.j.j.despres@gmail.com>2020-04-04 16:35:42 -0400
committerdespresc <christian.j.j.despres@gmail.com>2020-04-15 23:03:22 -0400
commit4e34d366df31937cdc69b6b366355f10a84c16b2 (patch)
tree844503b0f59439acaec5d2f8e2f016e2eb1d214c /test/pptx
parentf8ce38975b547fe7fc8c12ccee3a940b35d8b9cf (diff)
downloadpandoc-4e34d366df31937cdc69b6b366355f10a84c16b2.tar.gz
Adapt to the newest Table type, fix some previous adaptation issues
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
Diffstat (limited to 'test/pptx')
-rw-r--r--test/pptx/speaker_notes_afterseps.native78
-rw-r--r--test/pptx/tables.native152
2 files changed, 127 insertions, 103 deletions
diff --git a/test/pptx/speaker_notes_afterseps.native b/test/pptx/speaker_notes_afterseps.native
index 1e4ac331c..a12bdff08 100644
--- a/test/pptx/speaker_notes_afterseps.native
+++ b/test/pptx/speaker_notes_afterseps.native
@@ -2,44 +2,52 @@
,Div ("",["notes"],[])
[Para [Str "chicken",Space,Str "and",Space,Str "dumplings"]]
,Table ("",[],[]) (Caption Nothing
- [Para [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax,",Space,Str "with",Space,Str "alignment"]]) [(AlignRight,Nothing),(AlignLeft,Nothing),(AlignCenter,Nothing),(AlignDefault,Nothing)] 0
+ [Para [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax,",Space,Str "with",Space,Str "alignment"]])
+ [(AlignRight,ColWidthDefault)
+ ,(AlignLeft,ColWidthDefault)
+ ,(AlignCenter,ColWidthDefault)
+ ,(AlignDefault,ColWidthDefault)]
+ (TableHead ("",[],[])
[Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Right"]]
- ,Cell ("",[],[]) Nothing 1 1
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Left"]]
- ,Cell ("",[],[]) Nothing 1 1
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Center"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "Default"]]]]
- [Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]]]
- []
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "Default"]]]])
+ [(TableBody ("",[],[]) (RowHeadColumns {getRowHeadColumns = 0})
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]]])]
+ (TableFoot ("",[],[])
+ [])
,Div ("",["notes"],[])
[Para [Str "foo",Space,Str "bar"]]
,Div ("",["columns"],[])
@@ -52,4 +60,4 @@
,Div ("",["column"],[])
[Para [Str "Some",Space,Str "other",Space,Emph [Str "stuff"]]]]
,Div ("",["notes"],[])
- [Para [Str "Some",Space,Str "notes",Space,Str "outside",Space,Str "the",Space,Str "column"]]]
+ [Para [Str "Some",Space,Str "notes",Space,Str "outside",Space,Str "the",Space,Str "column"]]] \ No newline at end of file
diff --git a/test/pptx/tables.native b/test/pptx/tables.native
index 1541e6d93..109f961dc 100644
--- a/test/pptx/tables.native
+++ b/test/pptx/tables.native
@@ -1,79 +1,95 @@
[Header 2 ("a-table-with-a-caption",[],[]) [Str "A",Space,Str "Table,",Space,Str "with",Space,Str "a",Space,Str "caption"]
,Table ("",[],[]) (Caption Nothing
- [Para [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax,",Space,Str "with",Space,Str "alignment"]]) [(AlignRight,Nothing),(AlignLeft,Nothing),(AlignCenter,Nothing),(AlignDefault,Nothing)] 0
+ [Para [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax,",Space,Str "with",Space,Str "alignment"]])
+ [(AlignRight,ColWidthDefault)
+ ,(AlignLeft,ColWidthDefault)
+ ,(AlignCenter,ColWidthDefault)
+ ,(AlignDefault,ColWidthDefault)]
+ (TableHead ("",[],[])
[Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Right"]]
- ,Cell ("",[],[]) Nothing 1 1
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Left"]]
- ,Cell ("",[],[]) Nothing 1 1
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Center"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "Default"]]]]
- [Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]]]
- []
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "Default"]]]])
+ [(TableBody ("",[],[]) (RowHeadColumns {getRowHeadColumns = 0})
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]]])]
+ (TableFoot ("",[],[])
+ [])
,Table ("",[],[]) (Caption Nothing
- []) [(AlignRight,Nothing),(AlignLeft,Nothing),(AlignCenter,Nothing),(AlignDefault,Nothing)] 0
+ [])
+ [(AlignRight,ColWidthDefault)
+ ,(AlignLeft,ColWidthDefault)
+ ,(AlignCenter,ColWidthDefault)
+ ,(AlignDefault,ColWidthDefault)]
+ (TableHead ("",[],[])
[Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Right"]]
- ,Cell ("",[],[]) Nothing 1 1
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Left"]]
- ,Cell ("",[],[]) Nothing 1 1
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
[Plain [Str "Center"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "Default"]]]]
- [Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]
- ,Cell ("",[],[]) Nothing 1 1
- [Plain [Str "1"]]]]
- []]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "Default"]]]])
+ [(TableBody ("",[],[]) (RowHeadColumns {getRowHeadColumns = 0})
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "12"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "123"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan {getRowSpan = 1}) (ColSpan {getColSpan = 1})
+ [Plain [Str "1"]]]])]
+ (TableFoot ("",[],[])
+ [])] \ No newline at end of file