docx
    Preparing search index...

    Class DrawingPatchAbstract

    A patch for a drawing in a template whose alt text holds the placeholder, such as {{sales}}, rather than for the placeholder in text. It changes the drawing, and the parts it refers to, in place. ImagePatch is one: it replaces a picture's image. So is ChartDataPatch from docx/charts, which replaces the data of a chart made in Word.

    A drawing's alt text is its description (descr) or title. A drawing patch leaves the placeholder in text as it is.

    Hierarchy (View Summary)

    Index
    type: "drawing" = PatchType.DRAWING
    • Changes a drawing whose alt text holds the placeholder, and the parts it refers to. patchDocument calls it for each such drawing before it patches text, so it only sees the template's own drawings.

      A relationship the drawing referred to that nothing in its part refers to once it is patched, such as to a picture's old image, is then removed, and so is the part it referred to, unless something else refers to it.

      Parameters

      Returns void

      If the drawing can't be patched, which stops the document being patched