Nothing in Writer/ODPresentation emits presentation:class. A shape marked
$shape->setPlaceHolder(new Placeholder(Placeholder::PH_TYPE_TITLE));
is written as an ordinary draw:frame, so the title of a slide stops being a title. Measured on one
report written both ways and converted by LibreOffice: the PPTX carries 6 /H elements in the
tagged PDF, the ODP none. The ODF LibreOffice itself makes of that deck holds
presentation:class="title" six times, so the format is not the limitation.
The class alone buys nothing
Measured on a two-shape deck -- one title and one body placeholder -- written by this library and
converted to a tagged PDF:
| the frame carries |
ODF 1.2 |
tag tree |
| what the Writer emits today |
valid |
Div:2, P:2 |
+ presentation:class |
valid |
Div:2, P:2 -- unchanged |
+ presentation:class + draw:layer="layout" |
valid |
Div:2, P:2 -- unchanged |
presentation:style-name in place of draw:style-name, no class |
valid |
Div:2, P:2 -- unchanged |
the class and presentation:style-name in place of draw:style-name |
valid |
Div:1, H:1, P:2 |
| the same deck written as PPTX, for reference |
-- |
Div:1, H:1, P:2 |
| the ODP LibreOffice makes of that PPTX |
-- |
Div:1, H:1, P:2 |
A title becomes a title only when the class is paired with a style of family presentation. Either
half on its own leaves the frame a paragraph.
The two style attributes are mutually exclusive
ODF 1.2 spells them as a <choice> (OpenDocument-v1.2-os-schema.rng:6412-6437):
<choice>
<group> draw:style-name? draw:class-names? </group>
<group> presentation:style-name? presentation:class-names? </group>
</choice>
A frame carries one group or the other; writing both answers with
Invalid attribute style-name for element frame. So writeTxtStyle() (Content.php:971) has to
emit pr{shapeId} of family presentation instead of gr{shapeId} of family graphic for a
placeholder, carrying the same style:graphic-properties. A replacement, not an addition.
style:parent-style-name="Default-title" is not needed: LibreOffice writes one, but measured
without it the file is valid and the /H still appears. Master pages and presentation-page-layout
stay out of this.
The map
The branch already exists -- getPlaceholderField() (Content.php:717) reads the placeholder for
text:page-number and text:date. What is added beside it is the class map, and ODF does not spell
three of the seven the way OOXML does:
Placeholder::PH_TYPE_* |
presentation:class |
title |
title |
body |
outline |
subTitle |
subtitle |
ftr |
footer |
dt |
date-time |
sldNum |
page-number |
chart |
chart |
presentation-classes in the schema (:7752-7770) is a closed list of seventeen values, so a typo
fails assertIsSchemaODF12Valid() rather than shipping.
PR to follow.
Nothing in
Writer/ODPresentationemitspresentation:class. A shape markedis written as an ordinary
draw:frame, so the title of a slide stops being a title. Measured on onereport written both ways and converted by LibreOffice: the PPTX carries 6
/Helements in thetagged PDF, the ODP none. The ODF LibreOffice itself makes of that deck holds
presentation:class="title"six times, so the format is not the limitation.The class alone buys nothing
Measured on a two-shape deck -- one
titleand onebodyplaceholder -- written by this library andconverted to a tagged PDF:
Div:2, P:2+ presentation:classDiv:2, P:2-- unchanged+ presentation:class+ draw:layer="layout"Div:2, P:2-- unchangedpresentation:style-namein place ofdraw:style-name, no classDiv:2, P:2-- unchangedpresentation:style-namein place ofdraw:style-nameDiv:1, H:1, P:2Div:1, H:1, P:2Div:1, H:1, P:2A title becomes a title only when the class is paired with a style of family
presentation. Eitherhalf on its own leaves the frame a paragraph.
The two style attributes are mutually exclusive
ODF 1.2 spells them as a
<choice>(OpenDocument-v1.2-os-schema.rng:6412-6437):A frame carries one group or the other; writing both answers with
Invalid attribute style-name for element frame. SowriteTxtStyle()(Content.php:971) has toemit
pr{shapeId}of familypresentationinstead ofgr{shapeId}of familygraphicfor aplaceholder, carrying the same
style:graphic-properties. A replacement, not an addition.style:parent-style-name="Default-title"is not needed: LibreOffice writes one, but measuredwithout it the file is valid and the
/Hstill appears. Master pages andpresentation-page-layoutstay out of this.
The map
The branch already exists --
getPlaceholderField()(Content.php:717) reads the placeholder fortext:page-numberandtext:date. What is added beside it is the class map, and ODF does not spellthree of the seven the way OOXML does:
Placeholder::PH_TYPE_*presentation:classtitletitlebodyoutlinesubTitlesubtitleftrfooterdtdate-timesldNumpage-numberchartchartpresentation-classesin the schema (:7752-7770) is a closed list of seventeen values, so a typofails
assertIsSchemaODF12Valid()rather than shipping.PR to follow.