Skip to content

ODT Emitter always uses text:anchor-type="paragraph" for images regardless of display setting #2395

Description

@SR-Cochise

Description

ODT knows three different ways to anchor image within a document:

  1. "paragraph"
  2. "at-character"
  3. "as-char"

Regardless of display type in the layout of a rptdesign the ODT emitter always creates xml like this:

<text:p>
    <draw:frame draw:style-name="Draw1" draw:name="Image75" text:anchor-type="paragraph" svg:width="0.10416666666666667in" svg:height="0.10416666666666667in" draw:z-index="0">
    <draw:image xlink:href="Pictures/Image1.png"/><svg:title/></draw:frame>
</text:p>

This is no problem for MS Word or Open/Libre Office but Google Docs ignores / removes images that aren't anchored as "as-char".
Minimal solution would switch between

  • text:anchor-type="paragraph" for display type "block"
  • text:anchor-type="at-char" for display type "inline"

Optimal solution would probably have to use an advanced / user-property that knows all three types of anchoring.

Environment

  • OS: any
  • Browser: any
  • BIRT Version: 4.15+ (oldest tested)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementSmall change to improve the current supported functionality

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions