D
David Thielen
Hi all;
1. For a given slide, how do you know which Slide layout it is
referencing to get formatting information, I know that you can use the
placeholder tag ph to get formatting information from a layout, but
neither the type or the idx attributes are unique across the entire
package, so for a set of matching ph tags how does it know which one
to choose to take the formatting from?
2. For this question a shape within a slide.xml file I will call
sldShape, and a shape within a layout file I will call layoutShape.
Assume that my layoutShape is a placeholder for my sldShape. In the
example code below you can see that the textbody in my sldShape has no
formatting attributes or modifiers, which means its pulling this
information from a layout. But when I look at the matching layout file
with the matching layoutShape, there is a lot of formatting
information in the a:lstStyle, but it contains formatting for all 9
levels, how do I know which level the sldShape is pulling formatting
from? OR am I wrong in my assumption that the formatting is being
pulled from the layout, and it is actually being pulled from another
file because since nothing was specified it is defaulting to
formatting in the slideMaster , presentation or theme file?
So in the code below the two shapes in the slide file are “ctrTitle”
and “subtitle,idx=1” in the matching layout file (im pretty sure this
is the layout file powerpoint is using to render this slide) there
isn’t any meaningful information for “ctrTitle” as far as formatting
and style goes except for the xfrm positioning info, and in the
subtitle shape within the layout file there is a lot of formatting
info, and nothing to distinguish which set should be used.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:cSld>
<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr id="1" name=""/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<aff x="0" y="0"/>
<a:ext cx="0" cy="0"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="0" cy="0"/>
</a:xfrm>
</p:grpSpPr>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="2" name="Title 1"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="ctrTitle"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:r>
<a:rPr lang="en-US" dirty="0"
smtClean="0"/>
<a:t>Title</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="3" name="Subtitle 2"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="subTitle" idx="1"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:r>
<a:rPr lang="en-US" smtClean="0"/>
<a:t>Subtitle</a:t>
</a:r>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
</p:spTree>
</p:cSld>
<p:clrMapOvr>
<a:masterClrMapping/>
</p:clrMapOvr>
</p:sld>
slideLayout1.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sldLayout
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns="http://schemas.openxmlformats.org/presentationml/2006/main"
type="title" preserve="1">
<p:cSld name="Title Slide">
<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr id="1" name=""/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<aff x="0" y="0"/>
<a:ext cx="0" cy="0"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="0" cy="0"/>
</a:xfrm>
</p:grpSpPr>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="2" name="Title 1"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="ctrTitle"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<aff x="685800" y="2130425"/>
<a:ext cx="7772400" cy="1470025"/>
</a:xfrm>
</p:spPr>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:r>
<a:rPr lang="en-US" smtClean="0"/>
<a:t>Click to edit Master title
style</a:t>
</a:r>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="3" name="Subtitle 2"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="subTitle" idx="1"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<aff x="1371600" y="3886200"/>
<a:ext cx="6400800" cy="1752600"/>
</a:xfrm>
</p:spPr>
<p:txBody>
<a:bodyPr/>
<a:lstStyle>
<a:lvl1pPr marL="0" indent="0" algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl1pPr>
<a:lvl2pPr marL="457200" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl2pPr>
<a:lvl3pPr marL="914400" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl3pPr>
<a:lvl4pPr marL="1371600" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl4pPr>
<a:lvl5pPr marL="1828800" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl5pPr>
<a:lvl6pPr marL="2286000" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl6pPr>
<a:lvl7pPr marL="2743200" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl7pPr>
<a:lvl8pPr marL="3200400" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl8pPr>
<a:lvl9pPr marL="3657600" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl9pPr>
</a:lstStyle>
<a>
<a:r>
<a:rPr lang="en-US" smtClean="0"/>
<a:t>Click to edit Master subtitle
style</a:t>
</a:r>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="4" name="Date Placeholder 3"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="dt" sz="half" idx="10"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:fld
id="{520D00AB-20BA-4991-ACE0-DBA3E20F63D0}" type="datetimeFigureOut">
<a:rPr lang="en-US" smtClean="0"/>
<a:t>6/12/2008</a:t>
</a:fld>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="5" name="Footer Placeholder 4"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="ftr" sz="quarter" idx="11"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="6" name="Slide Number Placeholder
5"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="sldNum" sz="quarter" idx="12"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:fld
id="{C6B2EECF-23C3-4AE6-8F60-3D48DBDBCAC4}" type="slidenum">
<a:rPr lang="en-US" smtClean="0"/>
<a:t>‹#›</a:t>
</a:fld>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
</p:spTree>
</p:cSld>
<p:clrMapOvr>
<a:masterClrMapping/>
</p:clrMapOvr>
</p:sldLayout>
The simple example that I am referring to was created in powerpoint
2007, and all I did was open a new file, change the title field to say
‘title’ and the subtitle field to say ‘subtitle’ and then I saved as
..pptx. So more complete versions of this code could be generated very
easily with powerpoint 2007 if more code is needed. Also Ive placed
the file at http://www.windwardreports.com/temp/sample_pptx.zip
thanks - dave
david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm
1. For a given slide, how do you know which Slide layout it is
referencing to get formatting information, I know that you can use the
placeholder tag ph to get formatting information from a layout, but
neither the type or the idx attributes are unique across the entire
package, so for a set of matching ph tags how does it know which one
to choose to take the formatting from?
2. For this question a shape within a slide.xml file I will call
sldShape, and a shape within a layout file I will call layoutShape.
Assume that my layoutShape is a placeholder for my sldShape. In the
example code below you can see that the textbody in my sldShape has no
formatting attributes or modifiers, which means its pulling this
information from a layout. But when I look at the matching layout file
with the matching layoutShape, there is a lot of formatting
information in the a:lstStyle, but it contains formatting for all 9
levels, how do I know which level the sldShape is pulling formatting
from? OR am I wrong in my assumption that the formatting is being
pulled from the layout, and it is actually being pulled from another
file because since nothing was specified it is defaulting to
formatting in the slideMaster , presentation or theme file?
So in the code below the two shapes in the slide file are “ctrTitle”
and “subtitle,idx=1” in the matching layout file (im pretty sure this
is the layout file powerpoint is using to render this slide) there
isn’t any meaningful information for “ctrTitle” as far as formatting
and style goes except for the xfrm positioning info, and in the
subtitle shape within the layout file there is a lot of formatting
info, and nothing to distinguish which set should be used.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:cSld>
<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr id="1" name=""/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<aff x="0" y="0"/>
<a:ext cx="0" cy="0"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="0" cy="0"/>
</a:xfrm>
</p:grpSpPr>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="2" name="Title 1"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="ctrTitle"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:r>
<a:rPr lang="en-US" dirty="0"
smtClean="0"/>
<a:t>Title</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="3" name="Subtitle 2"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="subTitle" idx="1"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:r>
<a:rPr lang="en-US" smtClean="0"/>
<a:t>Subtitle</a:t>
</a:r>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
</p:spTree>
</p:cSld>
<p:clrMapOvr>
<a:masterClrMapping/>
</p:clrMapOvr>
</p:sld>
slideLayout1.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sldLayout
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns="http://schemas.openxmlformats.org/presentationml/2006/main"
type="title" preserve="1">
<p:cSld name="Title Slide">
<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr id="1" name=""/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<aff x="0" y="0"/>
<a:ext cx="0" cy="0"/>
<a:chOff x="0" y="0"/>
<a:chExt cx="0" cy="0"/>
</a:xfrm>
</p:grpSpPr>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="2" name="Title 1"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="ctrTitle"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<aff x="685800" y="2130425"/>
<a:ext cx="7772400" cy="1470025"/>
</a:xfrm>
</p:spPr>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:r>
<a:rPr lang="en-US" smtClean="0"/>
<a:t>Click to edit Master title
style</a:t>
</a:r>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="3" name="Subtitle 2"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="subTitle" idx="1"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<aff x="1371600" y="3886200"/>
<a:ext cx="6400800" cy="1752600"/>
</a:xfrm>
</p:spPr>
<p:txBody>
<a:bodyPr/>
<a:lstStyle>
<a:lvl1pPr marL="0" indent="0" algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl1pPr>
<a:lvl2pPr marL="457200" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl2pPr>
<a:lvl3pPr marL="914400" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl3pPr>
<a:lvl4pPr marL="1371600" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl4pPr>
<a:lvl5pPr marL="1828800" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl5pPr>
<a:lvl6pPr marL="2286000" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl6pPr>
<a:lvl7pPr marL="2743200" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl7pPr>
<a:lvl8pPr marL="3200400" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl8pPr>
<a:lvl9pPr marL="3657600" indent="0"
algn="ctr">
<a:buNone/>
<a:defRPr>
<a:solidFill>
<a:schemeClr val="tx1">
<a:tint val="75000"/>
</a:schemeClr>
</a:solidFill>
</a:defRPr>
</a:lvl9pPr>
</a:lstStyle>
<a>
<a:r>
<a:rPr lang="en-US" smtClean="0"/>
<a:t>Click to edit Master subtitle
style</a:t>
</a:r>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="4" name="Date Placeholder 3"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="dt" sz="half" idx="10"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:fld
id="{520D00AB-20BA-4991-ACE0-DBA3E20F63D0}" type="datetimeFigureOut">
<a:rPr lang="en-US" smtClean="0"/>
<a:t>6/12/2008</a:t>
</a:fld>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="5" name="Footer Placeholder 4"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="ftr" sz="quarter" idx="11"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
<p:sp>
<p:nvSpPr>
<p:cNvPr id="6" name="Slide Number Placeholder
5"/>
<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
<p:nvPr>
<ph type="sldNum" sz="quarter" idx="12"/>
</p:nvPr>
</p:nvSpPr>
<p:spPr/>
<p:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a>
<a:fld
id="{C6B2EECF-23C3-4AE6-8F60-3D48DBDBCAC4}" type="slidenum">
<a:rPr lang="en-US" smtClean="0"/>
<a:t>‹#›</a:t>
</a:fld>
<a:endParaRPr lang="en-US"/>
</a>
</p:txBody>
</p:sp>
</p:spTree>
</p:cSld>
<p:clrMapOvr>
<a:masterClrMapping/>
</p:clrMapOvr>
</p:sldLayout>
The simple example that I am referring to was created in powerpoint
2007, and all I did was open a new file, change the title field to say
‘title’ and the subtitle field to say ‘subtitle’ and then I saved as
..pptx. So more complete versions of this code could be generated very
easily with powerpoint 2007 if more code is needed. Also Ive placed
the file at http://www.windwardreports.com/temp/sample_pptx.zip
thanks - dave
david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm