Skip to content

Support noGrp, noRot, noMove, noResize options to shape creation #438

Open
@sancarn

Description

@sancarn

Support noGrp, noRot, noMove, noResize options to shape creation

Open XML supports the following tag:

<p:cNvSpPr>
  <a:spLocks noGrp="1" noRot="1" noMove="1" noResize="1"/>
</p:cNvSpPr>

and

<p:cNvPicPr>
  <a:picLocks noChangeAspect="1" noChangeArrowheads="1" noRot="1" noMove="1" noResize="1"/>
</p:cNvPicPr>

These properties can be used to prevent viewers from rotating, moving, resizing, etc. of shapes and images. It'd be nice if this were supported in this library :)

See: Shape locks and Picture locks specification.

Examples:

Shape

<p:sp>
  <p:nvSpPr>
    <p:cNvPr id="3" name="Subtitle 2"/>
    <p:cNvSpPr>
      <a:spLocks noGrp="1" noRot="1" noMove="1" noResize="1"/>
    </p:cNvSpPr>
    <p:nvPr>
      <p:ph type="subTitle" idx="1"/>
    </p:nvPr>
  </p:nvSpPr>
  <p:spPr>
    <a:xfrm>
      <a:off 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:p>
      <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-GB"/>
    </a:p>
  </p:txBody>
</p:sp>

Picture

<p:pic>
  <p:nvPicPr>
    <p:cNvPr id="1026" name="Picture 2" descr="C:\Users\John\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\08V2XF2F\MC900325596[1].wmf"/>
    <p:cNvPicPr>
      <a:picLocks noChangeAspect="1" noChangeArrowheads="1" noRot="1" noMove="1" noResize="1"/>
    </p:cNvPicPr>
    <p:nvPr userDrawn="1"/>
  </p:nvPicPr>
  <p:blipFill>
    <a:blip r:embed="rId2">
      <a:extLst>
        <a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
          <a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0"/>
        </a:ext>
      </a:extLst>
    </a:blip>
    <a:srcRect/>
    <a:stretch>
      <a:fillRect/>
    </a:stretch>
  </p:blipFill>
  <p:spPr bwMode="auto">
    <a:xfrm>
      <a:off x="381000" y="304800"/>
      <a:ext cx="1088746" cy="637970"/>
    </a:xfrm>
    <a:prstGeom prst="rect">
      <a:avLst/>
    </a:prstGeom>
    <a:noFill/>
    <a:extLst>
      <a:ext uri="{909E8E84-426E-40DD-AFC4-6F175D3DCCD1}">
        <a14:hiddenFill xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main">
          <a:solidFill>
            <a:srgbClr val="FFFFFF"/>
          </a:solidFill>
        </a14:hiddenFill>
      </a:ext>
    </a:extLst>
  </p:spPr>
</p:pic>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions