Page 1 of 1

Migrating from 2.8.0 to 3.0.0

PostPosted: Tue May 27, 2014 8:33 pm
by Bertrand
I am migrating from 2.8.0 to 3.0.0.

What is the equilavent to the following removed methods?

Code: Select all
org.docx4j.model.PropertyResolver.getFontnameFromStyle(org.docx4j.wml.Style)
org.docx4j.model.PropertyResolver.getDefaultFont()


Is there a migration guide anywhere?

Thank you,

Bertrand

Re: Migrating from 2.8.0 to 3.0.0

PostPosted: Wed May 28, 2014 8:07 pm
by jason
Hi Bertrand

Well, in 3.1, RunFontSelector contains getDefaultFont(); one way it is invoked is from MainDocumentPart's fontsInUse()

As to getFontnameFromStyle, at line 351 RunFontSelector does:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting

        rPr = propertyResolver.getEffectiveRPrUsingPStyleRPr(rPr, pRPr);
       
        :
       
        /* eg
         *
                                <w:r>
                                  <w:rPr>
                                    <w:rFonts w:ascii="Courier New" w:cs="Times New Roman" />
                                  </w:rPr>
                                  <w:t>English العربية</w:t>
                                </w:r>
                               
         */


        :      
                RFonts rFonts = rPr.getRFonts();
 
Parsed in 0.013 seconds, using GeSHi 1.0.8.4


Hope this helps .. Jason