xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r1060719 - /xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/render/xml/XMLRenderer.java
Date Wed, 19 Jan 2011 09:08:18 GMT
Author: jeremias
Date: Wed Jan 19 09:08:18 2011
New Revision: 1060719

URL: http://svn.apache.org/viewvc?rev=1060719&view=rev
Log:
Bugfix: don't use toString() but properly generate the color function.

Modified:
    xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/render/xml/XMLRenderer.java

Modified: xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=1060719&r1=1060718&r2=1060719&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/render/xml/XMLRenderer.java
(original)
+++ xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/render/xml/XMLRenderer.java
Wed Jan 19 09:08:18 2011
@@ -122,6 +122,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setUserAgent(FOUserAgent agent) {
         super.setUserAgent(agent);
 
@@ -143,6 +144,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     public void setupFontInfo(FontInfo inFontInfo) throws FOPException {
         if (mimic != null) {
             mimic.setupFontInfo(inFontInfo);
@@ -214,7 +216,7 @@ public class XMLRenderer extends Abstrac
                     //TODO Remove the following line (makes changes in the test checks necessary)
                     addAttribute(name, bkg.toString());
                     if (bkg.getColor() != null) {
-                        addAttribute("bkg-color", bkg.getColor().toString());
+                        addAttribute("bkg-color", ColorUtil.colorToString(bkg.getColor()));
                     }
                     if (bkg.getURL() != null) {
                         addAttribute("bkg-img", bkg.getURL());
@@ -277,6 +279,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     public void processOffDocumentItem(OffDocumentItem oDI) {
         if (oDI instanceof BookmarkData) {
             renderBookmarkTree((BookmarkData) oDI);
@@ -298,6 +301,7 @@ public class XMLRenderer extends Abstrac
      * Renders a BookmarkTree object
      * @param bookmarkRoot the BookmarkData object representing the top of the tree
      */
+    @Override
     protected void renderBookmarkTree(BookmarkData bookmarkRoot) {
         if (bookmarkRoot.getWhenToProcess() == OffDocumentItem.END_OF_DOC) {
             endPageSequence();
@@ -346,6 +350,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     public void startRenderer(OutputStream outputStream)
                 throws IOException {
         log.debug("Rendering areas to Area Tree XML");
@@ -377,6 +382,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     public void stopRenderer() throws IOException {
         endPageSequence();
         endElement("areaTree");
@@ -392,6 +398,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     public void renderPage(PageViewport page) throws IOException, FOPException {
         atts.clear();
         addAttribute("bounds", page.getViewArea());
@@ -416,6 +423,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     protected void handleExtensionAttachments(List attachments) {
         if (attachments != null && attachments.size() > 0) {
             startElement("extension-attachments");
@@ -438,6 +446,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     public void startPageSequence(PageSequence pageSequence) {
         handleDocumentExtensionAttachments();
         endPageSequence();  // move this before handleDocumentExtensionAttachments() ?
@@ -502,6 +511,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderRegionViewport(RegionViewport port) {
         if (port != null) {
             atts.clear();
@@ -549,11 +559,13 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     protected void startVParea(CTM ctm, Rectangle2D clippingRect) {
         //only necessary for graphical output
     }
 
     /** {@inheritDoc} */
+    @Override
     protected void endVParea() {
         //only necessary for graphical output
     }
@@ -562,6 +574,7 @@ public class XMLRenderer extends Abstrac
      * {@inheritDoc}
      *          org.apache.fop.area.inline.InlineArea)
      */
+    @Override
     protected void renderInlineAreaBackAndBorders(InlineArea area) {
         //only necessary for graphical output
     }
@@ -569,6 +582,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderBeforeFloat(BeforeFloat bf) {
         startElement("beforeFloat");
         super.renderBeforeFloat(bf);
@@ -578,6 +592,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderFootnote(Footnote footnote) {
         atts.clear();
         addAttribute("top-offset", footnote.getTop());
@@ -589,6 +604,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderMainReference(MainReference mr) {
         atts.clear();
         addAreaAttributes(mr);
@@ -610,7 +626,7 @@ public class XMLRenderer extends Abstrac
             addTraitAttributes(span);
             startElement("span", atts);
             for (int c = 0; c < span.getColumnCount(); c++) {
-                NormalFlow flow = (NormalFlow) span.getNormalFlow(c);
+                NormalFlow flow = span.getNormalFlow(c);
 
                 renderFlow(flow);
             }
@@ -622,6 +638,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderFlow(NormalFlow flow) {
         // the normal flow reference area contains stacked blocks
         atts.clear();
@@ -633,6 +650,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     protected void renderReferenceArea(Block block) {
         handleBlockTraits(block);
 
@@ -643,6 +661,7 @@ public class XMLRenderer extends Abstrac
     }
 
     /** {@inheritDoc} */
+    @Override
     protected void renderBlock(Block block) {
         atts.clear();
         addAreaAttributes(block);
@@ -691,6 +710,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderLineArea(LineArea line) {
         atts.clear();
         addAreaAttributes(line);
@@ -703,6 +723,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderInlineArea(InlineArea inlineArea) {
         atts.clear();
         if (inlineArea.getClass() == InlineArea.class) {
@@ -721,6 +742,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderViewport(Viewport viewport) {
         atts.clear();
         addAreaAttributes(viewport);
@@ -738,6 +760,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     public void renderImage(Image image, Rectangle2D pos) {
         atts.clear();
         addAreaAttributes(image);
@@ -751,6 +774,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     public void renderContainer(Container cont) {
         startElement("container");
         super.renderContainer(cont);
@@ -763,6 +787,7 @@ public class XMLRenderer extends Abstrac
      * @param pos the position of the foreign object
      * @see org.apache.fop.render.AbstractRenderer#renderForeignObject(ForeignObject, Rectangle2D)
      */
+    @Override
     public void renderForeignObject(ForeignObject fo, Rectangle2D pos) {
         atts.clear();
         addAreaAttributes(fo);
@@ -779,6 +804,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderInlineSpace(Space space) {
         atts.clear();
         addAreaAttributes(space);
@@ -791,6 +817,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderText(TextArea text) {
         atts.clear();
         if (text.getTextWordSpaceAdjust() != 0) {
@@ -811,6 +838,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderWord(WordArea word) {
         atts.clear();
         addAttribute("offset", word.getOffset());
@@ -838,6 +866,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderSpace(SpaceArea space) {
         atts.clear();
         addAttribute("offset", space.getOffset());
@@ -853,6 +882,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderInlineParent(InlineParent ip) {
         atts.clear();
         addAreaAttributes(ip);
@@ -866,6 +896,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderInlineBlockParent(InlineBlockParent ibp) {
         atts.clear();
         addAreaAttributes(ibp);
@@ -879,6 +910,7 @@ public class XMLRenderer extends Abstrac
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void renderLeader(Leader area) {
         atts.clear();
         addAreaAttributes(area);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message