Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving overflow handling in DOCX emitter #1265

Closed
wimjongman opened this issue Apr 14, 2023 Discussed in #1261 · 6 comments · Fixed by #1262
Closed

Improving overflow handling in DOCX emitter #1265

wimjongman opened this issue Apr 14, 2023 Discussed in #1261 · 6 comments · Fixed by #1262
Labels
Milestone

Comments

@wimjongman
Copy link
Contributor

Discussed in #1261

Originally posted by hvbtup April 11, 2023
Way back in 2013, some kind of support of the CSS overflow property was added to BIRT.

Unfortunately, the default in BIRT is hidden which is different from the CSS default visible.

This is causing me headache in the BIRT DOCX emitter, because the emitter respects this setting and thus long words get truncated.
A long word is a word that is too wide for the cell. This is not uncommon in German, e.g. "Bundestagspräsident".

Other users experienced the same issue.

See #1013 where I proposed a dirty workaround in the report.
I tried this workaround last week, but the designer would not accept the modified XML.
Anywy, even if it works, it is a really ugly workaround.

What makes things difficult here is that

  • The CSS specs say that this property is not inherited (which makes sense).
  • The overflow property cannot be specified in a style in BIRT.

I think the latter is an incorrect consequence of the first point; the original developer probably thought: If it cannot be inherited anyway, so why use it in a style?
But IMHO this is a misconception and it absolutely makes sense to specify the property in a style.
We don't have cascading style sheets in BIRT anyway. With "inheritance", BIRT means that e.g. a property of a cell can be inherited from the same property at table level. So "inheritable or not" is only related to the layout element tree structure in BIRT, but not to inherited CSS classes.

I propose to make the following changes to BIRT and I'm asking you for your opinion here:

  1. Change the default value for overflow to be visible instead of hidden.
  2. Allow setting this property in the style editor.

Not sure about:
3) Allow overriding the default value for overflow with a RenderOption for the emitter, similar to PDF_WORDBREAK for the PDF emitter.
4) Should we increase the version number of the RPTDesign XML file? I don't think this is needed. It's only a changed default value, and probably 99% of all BIRT reports don't care about this anyway.

Note: The PDF emitter needs emitter options to support this. I'm always using

options.setOption(IPDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES);
options.setOption(IPDFRenderOption.PDF_TEXT_WRAPPING, true);
options.setOption(IPDFRenderOption.PDF_WORDBREAK, true);
@reiner-killet
Copy link

reiner-killet commented Sep 8, 2023

I just installed BIRT 4.13 to check if there is an improvement concerning the possibility to change the default from "Hidden" to "Visible". Styles are still missing this attribute, no setting found in the configuration. So I still have to manipulate my templates in Visual Studio Code and add some styles. That's poor.

@merks
Copy link
Contributor

merks commented Sep 8, 2023

Shouldn’t you try 4.14 to see these changes?

https://download.eclipse.org/birt/updates/nightly

@reiner-killet
Copy link

reiner-killet commented Sep 8, 2023 via email

@hvbtup
Copy link
Contributor

hvbtup commented Sep 8, 2023

@reiner-killet Please try 4.14 as Ed advised instead of reacting with pointless questions.

@reiner-killet
Copy link

reiner-killet commented Sep 8, 2023 via email

@wimjongman
Copy link
Contributor Author

Is there an easier way to achieve the same result?

Yes, probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants