• Jacobo Aragunde Pérez's avatar
    ooxml: preserve artistic effects on shapes. · 642a252c
    Jacobo Aragunde Pérez yazdı
    Bitmaps can define artistic effects like in the following example:
    
      <a:blip r:embed="rId5">
        <a:extLst>
          <a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}">
            <a14:imgProps
             xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main">
              <a14:imgLayer r:embed="rId6">
                <a14:imgEffect>
                  <a14:artisticMarker trans="14000" size="80" />
                </a14:imgEffect>
              </a14:imgLayer>
            </a14:imgProps>
          </a:ext>
        </a:extLst>
      </a:blip>
    
    LO core doesn't support them, but I'm preserving them using the shape
    grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject
    so the grab bag of the XShape is not discarded.
    
    Added several Context and Properties objects on the import side to
    traverse and save the relevant tags, and added the corresponding code
    on the export side to extract the grab bag and output the effect back.
    
    Also added a unit test for a selection of artistic effects.
    
    TODO: Word saves the original bitmap as an embedded wdp file so the
    effect can be undone. We must preserve it too and add the reference to
    the a14:imgLayer tag.
    
    Change-Id: I61d427f83e4c8f353eb073da0114cd73ba50ba4b
    642a252c
shape.cxx 60.4 KB