-
Notifications
You must be signed in to change notification settings - Fork 48
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
setStyleNumberWrappedParagraphsAttribute("no-limit") not valid #141
Comments
Nice catch! You are right there should not be Integer being generated for this attribute The issue is related to code generation therefore dependent on #135 On the branch odf12-codegen you may find the root problem at the Apache Velocity template in the odfdom project: Easy to spot if you compare the generated class and the template side by side in Visual Studio Code with the velocity extension: $valueObject is wrong, we have to go backwards to find out when it was set wrong. I won't be able to fix this until the end of January (earliest). I will definitely focus again on the generation part next year and will do improvements in the MSV, see If someone is interested to help, I am interested to provide guidance by messenger, mail, phone. Anything that helps! |
From a bit longer look: codeModel is part of the given Java context, see codeModel is the SourceCodeModel class and the above function getValueTypes can therefore be found here: Happy debugging :-) |
One last thing, on one side is the generated Java source of ODFDOM and on the other side the ODF XML RelaxNG grammar, which defines all possible ODF documents and is the 'basement' for the code generation. Of course, we should look at the XML grammar pattern and it is a choice between a positive integer and the "no-limit" string. NOTE: Michael and I become last year editors of the OASIS ODF TC and I enhanced the rng file a bit using HTML quite similar as HTML is being used for RFCs - but not automated it generation, yet - see https://github.com/tdf/odftoolkit/blob/master/xslt-runner/src/test/resources/HowTo.md |
PS: Velocity is yet-another-syntax and helpful to have syntax highlighted (e.g. in VSCode with extension) the user guide is here: The previous mentioned generation of RNG HTML files would be needed in the ODF TC GitHub: https://github.com/oasis-tcs/odf-tc/ I am not a web developer (yet) therefore many of you can do much better in creating something more useable than I did above with the ODF RNG HTML. Any helping hand is most welcome :-) |
Fixed by
As a positive integer and "no-limit" is allowed as the attribute value of the ODF XML. If you got further feedback, please let us know, |
I do:
StyleGraphicPropertiesElement gsp =
(StyleGraphicPropertiesElement) OdfXMLFactory.newOdfElement(contentDom,
StyleGraphicPropertiesElement.ELEMENT_NAME);
gsp.setStyleNumberWrappedParagraphsAttribute("no-limit");
and get:
The method setStyleNumberWrappedParagraphsAttribute(Integer) in the type StyleGraphicPropertiesElement is not applicable for the arguments (String)
The odf docs says:
20.318style:number-wrapped-paragraphs
The style:number-wrapped-paragraphs attribute specifies the number of paragraphs that can wrap around a frame if the anchor position of a frame or drawing shape is a paragraph or a character, and the wrap mode specified by the style:wrap attribute is left, right, parallel, or dynamic.
This attribute is only recognized in frames or styles that have a style:wrap attribute attached with a value of left, right, parallel, or dynamic.
The defined values for the style:number-wrapped-paragraphs attribute are:
●no-limit: there is no limit on the number of paragraphs that may wrap around a frame.
●a value of type positiveInteger
The style:number-wrapped-paragraphs attribute is usable with the following element: style:graphic-properties 17.21.
The values of the style:number-wrapped-paragraphs attribute are no-limit or a value of type positiveInteger 18.2.
so how do I set "no-limit" ? Use 0?
The text was updated successfully, but these errors were encountered: