]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Resolved a build problem after the last merge from trunk.
authorJeremias Maerki <jeremias@apache.org>
Tue, 12 Aug 2008 12:48:28 +0000 (12:48 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 12 Aug 2008 12:48:28 +0000 (12:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@685134 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/PrintRendererConfigurator.java
src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java

index 001a99dcaf46c7a628a78bf4392de75fcc3a9fd9..806331e88521c854ceee79e16147da7f765b94a3 100644 (file)
@@ -87,7 +87,9 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
         PrintRenderer printRenderer = (PrintRenderer)renderer;
         FontResolver fontResolver = printRenderer.getFontResolver();
 
-        List embedFontInfoList = buildFontList(cfg, fontResolver);
+        FontEventListener listener = new FontEventAdapter(
+                renderer.getUserAgent().getEventBroadcaster());
+        List embedFontInfoList = buildFontList(cfg, fontResolver, listener);
         printRenderer.addFontList(embedFontInfoList);
     }
 
@@ -95,10 +97,12 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
      * Builds the font list from configuration.
      * @param cfg the configuration object
      * @param fontResolver a font resolver
+     * @param listener the font event listener
      * @return the list of {@code EmbedFontInfo} objects
      * @throws FOPException if an error occurs while processing the configuration
      */
-    protected List buildFontList(Configuration cfg, FontResolver fontResolver) throws FOPException {
+    protected List buildFontList(Configuration cfg, FontResolver fontResolver,
+                    FontEventListener listener) throws FOPException {
         FopFactory factory = userAgent.getFactory();
         FontManager fontManager = factory.getFontManager();
         if (fontResolver == null) {
@@ -109,8 +113,6 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
         boolean strict = factory.validateUserConfigStrictly();
         FontCache fontCache = fontManager.getFontCache();
 
-        FontEventListener listener = new FontEventAdapter(
-                renderer.getUserAgent().getEventBroadcaster());
         List/*<EmbedFontInfo>*/ embedFontInfoList = buildFontListFromConfiguration(cfg,
                 fontResolver, strict, fontManager, listener);
 
index 2504a44576ff412cdedccfd48634cfe8d87f57bd..50b48971721a97df2eb156df8ec228f086575e95 100644 (file)
@@ -30,6 +30,7 @@ import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fonts.CustomFontCollection;
 import org.apache.fop.fonts.FontCollection;
 import org.apache.fop.fonts.FontEventAdapter;
+import org.apache.fop.fonts.FontEventListener;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontManager;
 import org.apache.fop.fonts.FontResolver;
@@ -215,15 +216,16 @@ public class PDFRendererConfigurator extends PrintRendererConfigurator
         List fontCollections = new java.util.ArrayList();
         fontCollections.add(new Base14FontCollection(fontManager.isBase14KerningEnabled()));
 
+        FontEventListener listener = new FontEventAdapter(userAgent.getEventBroadcaster());
         Configuration cfg = super.getRendererConfig(painter.getMimeType());
         if (cfg != null) {
             FontResolver fontResolver = new DefaultFontResolver(userAgent);
-            List fontList = buildFontList(cfg, fontResolver);
+            List fontList = buildFontList(cfg, fontResolver, listener);
             fontCollections.add(new CustomFontCollection(fontResolver, fontList));
         }
 
         FontInfo fontInfo = new FontInfo();
-        fontInfo.setEventListener(new FontEventAdapter(userAgent.getEventBroadcaster()));
+        fontInfo.setEventListener(listener);
         fontManager.setup(fontInfo,
                 (FontCollection[])fontCollections.toArray(
                         new FontCollection[fontCollections.size()]));