ExVEx.OOXML.Drawing (ExVEx v0.2.0)

Copy Markdown View Source

Parse, shift, and serialize an xl/drawings/drawing*.xml part.

Drawings are anchored to cells via <xdr:from> and <xdr:to> (or the namespace-local forms) elements that contain <col>, <row>, <colOff>, <rowOff> children. A structural row/column shift on the owning sheet rewrites the row/col values inside each anchor.

The OOXML schema uses zero-based indices for drawing anchors while the shift primitive expects 1-based indices, so this module translates on the way in and out.

Summary

Functions

shift_xml(xml, shift)

@spec shift_xml(binary(), ExVEx.Mutation.Shift.t()) ::
  {:ok, binary()} | {:error, term()}