Expand description
演示文稿分组(Section,<p14:sectionLst> 扩展元素)。
本模块对应 PowerPoint 2010 引入的“章节分组“功能——把若干 slide 归入命名分组,便于在“大纲视图“中折叠 / 跳转。
§OOXML 结构
sectionLst 是 <p:presentation> 内 <p:extLst> 的扩展元素,
命名空间为 p14(PowerPoint 2010 main):
<p:presentation>
...
<p:extLst>
<p:ext uri="{521415D9-36F7-43E2-AB2F-B90AF26B5E64}">
<p14:sectionLst xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main">
<p14:section name="章节一">
<p14:sldIdLst>
<p14:sldId id="256"/>
<p14:sldId id="257"/>
</p14:sldIdLst>
</p14:section>
</p14:sectionLst>
</p:ext>
</p:extLst>
</p:presentation>§与 python-pptx 的对应
python-pptx 截至 v1.0 仍未提供 section API,本模块是 pptx-rs 的扩展实现, 参考 OOXML 规范 [MS-PPT] 2.6.4 节。
§序列化约束
- 必须放在
<p:extLst>内的<p:ext>元素中,且 uri 固定为{521415D9-36F7-43E2-AB2F-B90AF26B5E64}; <p:extLst>在<p:defaultTextStyle>之后;- section 的
<p14:sldId>只有id属性(无r:id)。
Structs§
- Section
- 单个章节(
<p14:section>)。 - Section
List - 章节列表(
<p14:sectionLst>)。
Constants§
- SECTION_
EXT_ URI - sectionLst 扩展元素的固定 URI(PowerPoint 2010 section 特征 GUID)。