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

paraStyle and blockTableStyle names are not handled separately #108

Open
joeUser555 opened this issue Feb 21, 2023 · 3 comments
Open

paraStyle and blockTableStyle names are not handled separately #108

joeUser555 opened this issue Feb 21, 2023 · 3 comments

Comments

@joeUser555
Copy link

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

I defined a paraStyle and a blockTableStyle with an identical name.

What I expect to happen:

In a para element the paraStyle name referenced should give the paraStyle with this name.

What actually happened:

The blockTableStyle with the identical name got returned and caused an exception:

AttributeError: 
paragraph text '<para>paraStyle Helvetica 12pt</para>' caused exception 'TableStyle' object has no attribute 'name'

style-name-conflict.rml.txt

What version of Python and Zope/Addons I am using:

Ubuntu 22.04, Python 3.10, zope-event-4.6

@joeUser555 joeUser555 changed the title paraStyle and blockTableStyle names are not handled separate paraStyle and blockTableStyle names are not handled separately Feb 21, 2023
@regebro
Copy link
Contributor

regebro commented Mar 23, 2023

Yes, this is correct, and as far as I can tell reportlab behaves the same.

@joeUser555
Copy link
Author

If paraStyle names and blockTableStyle names share the same namespace the parser should yield a warning or better an error if the style name is use in both categories in one document.

@regebro
Copy link
Contributor

regebro commented Mar 24, 2023

Warning if you redefine a style does make sense.

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

No branches or pull requests

2 participants