Page 1 of 1

Implement GLOW effect on docx4j and build it from source

PostPosted: Fri Jan 02, 2015 5:16 pm
by docx4jUserOnProblem
Currently docx4j (v3.2.1) drops the text effects on docx files. How am I suppose to implement that on docx4j's current version and build it from the source that I've downloaded.

Re: Implement GLOW effect on docx4j and build it from source

PostPosted: Thu Jan 08, 2015 7:33 am
by jason
You'd need to:

1. add it to the relevant XSD (/xsd/wml), the w14 or w15 one (whichever it belongs in according to [MS-DOCX]) and integrate in wml.xsd as necessary/appropriate

2. generate java classes using xjc

Please note that docx4j's org.docx4j.wml source code was generated that way, but contains some patches (ie code not generated by xjc), so you can't quite just replace those classes with the code you've generated.

Re: Implement GLOW effect on docx4j and build it from source

PostPosted: Tue Jan 13, 2015 1:38 pm
by docx4jUserOnProblem
jason wrote:You'd need to:
Please note that docx4j's org.docx4j.wml source code was generated that way, but contains some patches (ie code not generated by xjc), so you can't quite just replace those classes with the code you've generated.


I'm almost done with comparing the generated classes with docx4j's generated classes (w/ modifications). Just a late and direct question, When comparing two classes, how and when can I tell that i'll implement what was in docx4j? or should I just stick to what was generated?

P.S. What tools are you using in developing/maintaining docx4j?

Re: Implement GLOW effect on docx4j and build it from source

PostPosted: Wed Jan 14, 2015 7:52 pm
by docx4jUserOnProblem
Hi Jason,

Thank you for your continuous support I was able to get through with implementing text effects(glow, reflection, shadow, etc). I just have a problem though upon integrating my newly built docx4j to our actual project. It is in regards to versioning. Our project uses docx4j v2.8.1. In v2.8.1, the datatype for tblLook is CTShortHexNumber, but then in v3.2.1(which was we hope to use, since it is the latest) tblLook is now of CTTblLook type. Because of this change, several errors(such as: <Class name> cannot be resolved, <Variable name> cannot be resolved, Import cannot be resolved, etc) emerged. Question is, how am I going to solve this?

BTW, I've read about this post.
http://www.docx4java.org/forums/docx-java-f6/how-to-set-banded-columns-rows-using-docx4j-t1494.html


But my brain wasn't able to comprehend hence I seek for more brief and precise answer from you.

Regards,
Gadi

Re: Implement GLOW effect on docx4j and build it from source

PostPosted: Thu Jan 15, 2015 10:47 am
by jason
docx4jUserOnProblem wrote:In v2.8.1, the datatype for tblLook is CTShortHexNumber, but then in v3.2.1(which was we hope to use, since it is the latest) tblLook is now of CTTblLook type. Because of this change, several errors(such as: <Class name> cannot be resolved, <Variable name> cannot be resolved, Import cannot be resolved, etc) emerged. Question is, how am I going to solve this?


Make a docx4j 3.2.1 branch of your project, then go through and update your code to address any changes to the API. There shouldn't be many.

Once you are satisfied things are working properly, you can commit to 3.2.1 :-)

Re: Implement GLOW effect on docx4j and build it from source

PostPosted: Thu Jan 15, 2015 2:42 pm
by docx4jUserOnProblem
Hi Jason,

Thank you for the light speed reply, I already tried :
- to simply changed the datatypes of variable tblLook from being CTTblLook to CTShortHexNumber in CTTblPrBase.java. Why? Because I also tried to bind the schema > generated the classes > compare the generated classes #1 (CTTblLook tblLook) with generated classes #2 (CTShortHexNumber tblLook) and found that the only difference between the two is the datatype. But still, there is an error on the part of our parser since the parser expects to accept CTShortHexNumber(why? because it was coded since v2.8.1). My solution then is i'll try to parse CTTblLook to CTShortHexNumber... but to no avail. :cry:

And here I come to you to seek your boosterish advice, my master. :D

Regards,
Gadi


Hail master jason! OTL