OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only

OFFICE 2049 custom shape enhancement

  • 1.  OFFICE 2049 custom shape enhancement

    Posted 01-12-2017 17:06
      |   view attached
    Hi all, this comment is for https://issues.oasis-open.org/browse/OFFICE-2049 and result of my task to look, how LibreOffice handles lighten/darken. Apache OpenOffice: On import of a *.pptx file AOO keeps the information, which kind of preset shape it is. When converting to ODF format, it writes the kind of shape into the draw:type attribute, e.g. draw:type="quad-bevel". When the file is read later on, AOO depends rendering on the draw:type value. There exist no other information in the file. So if you change to draw:type="non-primitive" manually, the shape is rendered different, without lighten or darken. LibreOffice: When LO imports a *.pptx file and converts it to ODF format, then it too writes a specific attribute e.g. draw:type="ooxml-bevel". In addition it not only writes the attribute draw:enhanced-path, but an attribute drawooo:enhanced-path too. In this own namespace the path has additional commands. LibreOffice uses H, I, J, K for the values darken, darkenLess, lighten, and lightenLess of the attribute "fill" of the "path" element in OOXML. The current implementation works already, but has some glitches. SVG has nothing similar to lighten or darken, because in SVG the filling is not an attribute of the path, but it is only a style property. ODF refers to the commands in SVG path, but they are already different to ODF, e.g. ODF has not the distinction of upper and lower case and has the commands F and S, which you can use to exclude a subpath from fill or stroke. Therefore SVG is no obstacle for adding commands. ODF should allow to keep and use those lighten/darken informations, which are possible in OOXML. That is needed for a better interoperability to OOXML. The way LibreOffice does it, is one possible way to store those lighten/darken informations, which are possible in OOXML. With such additional path commands this feature is usable for all shapes with enhanced geometry. Other ways I can think of: (1) Specify a set of special draw:type values, which cover those shapes, which are contained in the file "presetShapeDefinitions.xml" of the OOXML standard. That way all consumers and producers of ODF whould use the same strings for those shapes. A disadvantage would be, that only this special preset shapes are treated. Other problems are mentioned in [OFFICE-2049], [OFFICE-1867] and the original mail http://lists.oasis-open.org/archives/opendocument-users/200601/msg00014.html (2) Specify an additional attribute of the <draw:enhanced-geometry> element. Such attribute would carry a parallel list of fill information for the subpaths. Such attribute could take more information than lighten/darken, e.g. opacity would be possible or multiple colors. There are three files attached, the original pptx file from PowerPoint 2010 and the ODF files, which AOO and LO generate from the pptx. The shape type Bevel contains all four lighten/darken variants. The file has in the upper part three shapes and in the lower part an image of how it looks in PowerPoint. Kind regards Regina Attachment: TypeBevel.pptx Description: application/vnd.openxmlformats-officedocument.presentationml.presentation Attachment: TypeBevel_resaved_by_AOO4.1.odp Description: OpenOffice Impress presentation Attachment: TypeBevel_resaved_by_LO54.odp Description: OpenOffice Impress presentation

    Attachment(s)

    pptx
    TypeBevel.pptx   72 KB 1 version