Changeset 871
- Timestamp:
- 08/22/09 17:45:37 (3 years ago)
- Location:
- trunk/docx4j/src/main/java/org/docx4j
- Files:
-
- 25 edited
-
JcrNodeMapper/AlfrescoJcrNodeMapper.java (modified) (1 diff)
-
convert/in/FlatOpcXmlImporter.java (modified) (1 diff)
-
diff/Differencer.java (modified) (1 diff)
-
fonts/BestMatchingMapper.java (modified) (2 diffs)
-
fonts/Mapper.java (modified) (1 diff)
-
jaxb/NamespacePrefixMapper.java (modified) (2 diffs)
-
jaxb/NamespacePrefixMapperRelationshipsPart.java (modified) (2 diffs)
-
model/listnumbering/Emulator.java (modified) (1 diff)
-
model/listnumbering/NumberFormatLowerLetter.java (modified) (2 diffs)
-
openpackaging/Base.java (modified) (1 diff)
-
openpackaging/packages/WordprocessingMLPackage.java (modified) (2 diffs)
-
openpackaging/parts/DocPropsCorePart.java (modified) (1 diff)
-
openpackaging/parts/DocPropsCustomPart.java (modified) (2 diffs)
-
openpackaging/parts/DocPropsExtendedPart.java (modified) (1 diff)
-
openpackaging/parts/Dom4jXmlPart.java (modified) (1 diff)
-
openpackaging/parts/ThemePart.java (modified) (1 diff)
-
openpackaging/parts/WordprocessingML/BinaryPartAbstractImage.java (modified) (4 diffs)
-
openpackaging/parts/WordprocessingML/FontTablePart.java (modified) (1 diff)
-
openpackaging/parts/WordprocessingML/FooterPart.java (modified) (1 diff)
-
openpackaging/parts/WordprocessingML/HeaderPart.java (modified) (1 diff)
-
openpackaging/parts/WordprocessingML/NumberingDefinitionsPart.java (modified) (1 diff)
-
openpackaging/parts/WordprocessingML/StyleDefinitionsPart.java (modified) (1 diff)
-
openpackaging/parts/relationships/RelationshipsPart.java (modified) (1 diff)
-
utils/ResourceUtils.java (modified) (2 diffs)
-
wml/P.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/JcrNodeMapper/AlfrescoJcrNodeMapper.java
r296 r871 68 68 69 69 log.info("getting {http://www.alfresco.org/model/content/1.0}content"); 70 System.out.println("getting {http://www.alfresco.org/model/content/1.0}content");71 70 // Jackrabbit's jcr:data = Alfresco's cm:content 72 71 -
trunk/docx4j/src/main/java/org/docx4j/convert/in/FlatOpcXmlImporter.java
r854 r871 531 531 boolean prettyprint = true; 532 532 533 System.out.println(533 log.debug( 534 534 org.docx4j.XmlUtils. 535 535 marshaltoString(result, suppressDeclaration, prettyprint, -
trunk/docx4j/src/main/java/org/docx4j/diff/Differencer.java
r840 r871 1220 1220 } 1221 1221 } catch (XMLStreamException e) { 1222 System.out.println("Issue at element: " + reader.getLocalName() + "\n"); 1223 e.printStackTrace(); 1222 log.error("Issue at element: " + reader.getLocalName() + "\n", e); 1224 1223 throw e; 1225 1224 } -
trunk/docx4j/src/main/java/org/docx4j/fonts/BestMatchingMapper.java
r713 r871 170 170 u2.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 171 171 172 System.out.println("unmarshalling fonts.substitutions \n\n" );172 log.info("unmarshalling fonts.substitutions" ); 173 173 // Get the xml file 174 174 java.io.InputStream is2 = null; … … 714 714 715 715 if (fopPanose == null ) { 716 System.out.println(fontName + " .. lacks Panose!");716 log.warn(fontName + " .. lacks Panose!"); 717 717 } else if (fopPanose!=null ) { 718 System.out.println(fontName + " .. " + fopPanose);718 log.debug(fontName + " .. " + fopPanose); 719 719 } 720 720 // long pd = fopPanose.difference(nfontInfo.getPanose().getPanoseArray()); -
trunk/docx4j/src/main/java/org/docx4j/fonts/Mapper.java
r715 r871 25 25 26 26 import org.apache.log4j.Logger; 27 import org.docx4j.XmlUtils;28 27 29 28 /** -
trunk/docx4j/src/main/java/org/docx4j/jaxb/NamespacePrefixMapper.java
r779 r871 68 68 * value will be ignored and the system will generate one. 69 69 */ 70 public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { 70 public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) 71 // Implement the interface 72 { 73 74 return getPreferredPrefixStatic(namespaceUri, suggestion, requirePrefix); 75 76 } 77 78 79 protected static String getPreferredPrefixStatic(String namespaceUri, String suggestion, boolean requirePrefix) { 71 80 72 81 if (namespaceUri.equals(Namespaces.NS_WORD12)) { … … 215 224 public String getNamespaceURI(String prefix) { 216 225 226 return getNamespaceURIStatic(prefix); 227 } 228 229 protected static String getNamespaceURIStatic(String prefix) { 230 217 231 if (prefix.equals("w")) 218 232 return Namespaces.NS_WORD12; -
trunk/docx4j/src/main/java/org/docx4j/jaxb/NamespacePrefixMapperRelationshipsPart.java
r788 r871 22 22 23 23 public class NamespacePrefixMapperRelationshipsPart extends com.sun.xml.bind.marshaller.NamespacePrefixMapper { 24 // Must use 'internal' for Java 625 26 24 27 25 /** … … 61 59 * value will be ignored and the system will generate one. 62 60 */ 63 public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { 61 public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) 62 // Implement the interface 63 { 64 65 return getPreferredPrefixStatic( namespaceUri, suggestion, requirePrefix); 66 } 67 68 protected static String getPreferredPrefixStatic(String namespaceUri, String suggestion, boolean requirePrefix) { 64 69 65 70 // if (namespaceUri.equals("http://schemas.openxmlformats.org/wordprocessingml/2006/main")) { -
trunk/docx4j/src/main/java/org/docx4j/model/listnumbering/Emulator.java
r757 r871 166 166 167 167 if (numPr==null) { 168 System.out.println("Couldn't get NumPr from " + pStyleVal);169 System.out.println(168 log.warn("Couldn't get NumPr from " + pStyleVal); 169 log.debug( 170 170 org.docx4j.XmlUtils.marshaltoString(style, true, true) 171 171 ); -
trunk/docx4j/src/main/java/org/docx4j/model/listnumbering/NumberFormatLowerLetter.java
r750 r871 1 1 package org.docx4j.model.listnumbering; 2 2 3 import org.apache.log4j.Logger; 4 3 5 public class NumberFormatLowerLetter extends NumberFormat { 6 7 protected static Logger log = Logger.getLogger(NumberFormatLowerLetter.class); 4 8 5 9 public String format( int in ) { … … 8 12 StringBuilder out = new StringBuilder(); 9 13 10 for( int i=0; i < str.length() ; i++ ) { 11 12 13 int dig = Character.digit(str.charAt(i), 36); 14 15 16 char cdig = Character.forDigit(dig+9, 36); 17 18 19 System.out.println(str.charAt(i) + " --> " + cdig); 20 14 for (int i = 0; i < str.length(); i++) { 15 int dig = Character.digit(str.charAt(i), 36); 16 char cdig = Character.forDigit(dig + 9, 36); 17 log.debug(str.charAt(i) + " --> " + cdig); 21 18 out.append(cdig); 22 23 } 24 25 return out.toString(); 26 19 } 20 return out.toString(); 27 21 } 28 22 -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/Base.java
r668 r871 82 82 return contentType.toString(); 83 83 } else { 84 System.out.println("WARNING: content type was null. " +84 log.warn("WARNING: content type was null. " + 85 85 "You should set this before adding the part."); 86 86 return null; -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java
r854 r871 41 41 import org.docx4j.XmlUtils; 42 42 import org.docx4j.convert.out.flatOpcXml.FlatOpcXmlCreator; 43 import org.docx4j.fonts.BestMatchingMapper;44 43 import org.docx4j.fonts.IdentityPlusMapper; 45 44 import org.docx4j.fonts.Mapper; … … 293 292 java.util.Map fontsInUse = this.getMainDocumentPart().fontsInUse(); 294 293 295 if ( fm instanceof BestMatchingMapper ) { 294 //if ( fm instanceof BestMatchingMapper ) { 295 if ( fm.getClass().getName().equals("org.docx4j.fonts.BestMatchingMapper") ) { 296 296 297 297 -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/DocPropsCorePart.java
r302 r871 102 102 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 103 103 104 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );104 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 105 105 106 106 jaxbElement = u.unmarshal( is ); 107 107 108 108 109 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );109 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 110 110 111 111 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/DocPropsCustomPart.java
r542 r871 127 127 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 128 128 129 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );129 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 130 130 131 131 jaxbElement = u.unmarshal( is ); 132 132 133 133 134 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );134 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 135 135 136 136 } catch (Exception e ) { … … 149 149 for (org.docx4j.docProps.custom.Properties.Property prop: customProps.getProperty() ) { 150 150 151 System.out.println(prop.getName());151 log.info(prop.getName()); 152 152 153 153 if (prop.getName().equals(propName)) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/DocPropsExtendedPart.java
r609 r871 114 114 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 115 115 116 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );116 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 117 117 118 118 jaxbElement = u.unmarshal( is ); 119 119 120 120 121 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );121 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 122 122 123 123 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/Dom4jXmlPart.java
r667 r871 40 40 * the Part should extend this class. 41 41 * */ 42 @Deprecated 42 43 public abstract class Dom4jXmlPart extends Part { 43 44 -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/ThemePart.java
r302 r871 98 98 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 99 99 100 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );100 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 101 101 102 102 jaxbElement = u.unmarshal( is ); 103 103 104 104 105 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );105 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 106 106 107 107 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/BinaryPartAbstractImage.java
r684 r871 523 523 Dimension dPx = size.getDimensionPx(); 524 524 525 System.out.println(info.getOriginalURI() + " " + info.getMimeType()525 log.debug(info.getOriginalURI() + " " + info.getMimeType() 526 526 + " " + Math.round(dPx.getWidth()) +"x" + Math.round(dPx.getHeight())); 527 527 528 System.out.println("Resolution:" + Math.round(size.getDpiHorizontal()) + "x" + Math.round(size.getDpiVertical()) );529 System.out.println("Print size: " + Math.round(dPt.getWidth()/72) + "\" x" + Math.round(dPt.getHeight()/72)+"\"" );528 log.debug("Resolution:" + Math.round(size.getDpiHorizontal()) + "x" + Math.round(size.getDpiVertical()) ); 529 log.debug("Print size: " + Math.round(dPt.getWidth()/72) + "\" x" + Math.round(dPt.getHeight()/72)+"\"" ); 530 530 531 531 } … … 605 605 */ 606 606 607 System.out.println("Start ImageMagick...");607 log.info("Start ImageMagick..."); 608 608 Process p = Runtime.getRuntime().exec("imconvert -density " + density + " -units PixelsPerInch - png:-"); 609 609 … … 635 635 copy2(is, new BufferedOutputStream(p.getOutputStream())); 636 636 p.getOutputStream().close(); 637 System.out.println("Image copied...");637 log.debug("Image copied..."); 638 638 } catch (IOException ioe) { 639 639 … … 644 644 645 645 if (p.waitFor()!=0) { 646 System.err.println("Error");646 log.error("Error"); 647 647 } 648 System.out.println("End Process...");648 log.debug("End Process..."); 649 649 } 650 650 -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/FontTablePart.java
r695 r871 96 96 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 97 97 98 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );98 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 99 99 100 100 jaxbElement = u.unmarshal( is ); 101 101 102 102 103 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );103 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 104 104 105 105 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/FooterPart.java
r545 r871 89 89 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 90 90 91 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );91 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 92 92 93 93 jaxbElement = u.unmarshal( is ); 94 94 95 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );95 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 96 96 97 97 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/HeaderPart.java
r545 r871 89 89 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 90 90 91 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );91 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 92 92 93 93 jaxbElement = u.unmarshal( is ); 94 94 95 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );95 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 96 96 97 97 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/NumberingDefinitionsPart.java
r757 r871 310 310 jaxbElement = u.unmarshal( is ); 311 311 312 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );312 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 313 313 314 314 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/WordprocessingML/StyleDefinitionsPart.java
r757 r871 95 95 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 96 96 97 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );97 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 98 98 99 99 jaxbElement = u.unmarshal( is ); 100 100 101 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );101 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 102 102 103 103 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/relationships/RelationshipsPart.java
r869 r871 756 756 u.setEventHandler(new org.docx4j.jaxb.JaxbValidationEventHandler()); 757 757 758 System.out.println("unmarshalling " + this.getClass().getName() + " \n\n" );758 log.info("unmarshalling " + this.getClass().getName() + " \n\n" ); 759 759 760 760 jaxbElement = u.unmarshal( is ); 761 761 762 762 763 System.out.println("\n\n" + this.getClass().getName() + " unmarshalled \n\n" );763 log.info("\n\n" + this.getClass().getName() + " unmarshalled \n\n" ); 764 764 765 765 } catch (Exception e ) { -
trunk/docx4j/src/main/java/org/docx4j/utils/ResourceUtils.java
r305 r871 21 21 package org.docx4j.utils; 22 22 23 import org.apache.log4j.Logger; 24 23 25 public class ResourceUtils { 26 27 protected static Logger log = Logger.getLogger(ResourceUtils.class); 24 28 25 29 public static java.io.InputStream getResource(String filename) throws java.io.IOException … … 30 34 31 35 if (url == null ) { 32 System.out.println("Couldn't get resource!!");36 log.error("Couldn't get resource: " + filename); 33 37 } 34 38 -
trunk/docx4j/src/main/java/org/docx4j/wml/P.java
r809 r871 678 678 List<Object> children = getParagraphContent(); 679 679 680 // System.out.println("p.toString");680 // log.debug("p.toString"); 681 681 682 682 for (Object o : children ) { 683 // System.out.println(" " + o.getClass().getName() );683 // log.debug(" " + o.getClass().getName() ); 684 684 if ( o instanceof org.docx4j.wml.R) { 685 // System.out.println("Hit R");685 // log.debug("Hit R"); 686 686 org.docx4j.wml.R run = (org.docx4j.wml.R)o; 687 687 List runContent = run.getRunContent(); … … 690 690 // TODO - unmarshall directly to Text. 691 691 if ( ((JAXBElement)o2).getDeclaredType().getName().equals("org.docx4j.wml.Text") ) { 692 // System.out.println("Found Text");692 // log.debug("Found Text"); 693 693 org.docx4j.wml.Text t = (org.docx4j.wml.Text)((JAXBElement)o2).getValue(); 694 694 result.append( t.getValue() ); 695 695 } 696 696 } else { 697 // System.out.println(o2.getClass().getName());697 // log.debug(o2.getClass().getName()); 698 698 } 699 699 }
Note: See TracChangeset
for help on using the changeset viewer.
