diff options
-rw-r--r-- | src/java/org/apache/fop/apps/FOUserAgent.java | 11 | ||||
-rw-r--r-- | src/java/org/apache/fop/cli/CommandLineOptions.java | 3 | ||||
-rw-r--r-- | status.xml | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java index 7fc706708..ab9d8335f 100644 --- a/src/java/org/apache/fop/apps/FOUserAgent.java +++ b/src/java/org/apache/fop/apps/FOUserAgent.java @@ -127,13 +127,8 @@ public class FOUserAgent { throw new NullPointerException("The factory parameter must not be null"); } this.factory = factory; - try { - if (factory.getUserConfig() != null) { - configure(factory.getUserConfig()); - } - } catch (ConfigurationException cfge) { - log.error("Error while initializing the user asgent: " - + cfge.getMessage()); + if (factory.getUserConfig() != null) { + configure(factory.getUserConfig()); } } @@ -287,7 +282,7 @@ public class FOUserAgent { * Configures the FOUserAgent through the factory's configuration. * @see org.apache.avalon.framework.configuration.Configurable */ - protected void configure(Configuration cfg) throws ConfigurationException { + public void configure(Configuration cfg) { setBaseURL(FopFactory.getBaseURLfromConfig(cfg, "base")); if (cfg.getChild("target-resolution", false) != null) { this.targetResolution diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java index efa3daa18..fb93a060e 100644 --- a/src/java/org/apache/fop/cli/CommandLineOptions.java +++ b/src/java/org/apache/fop/cli/CommandLineOptions.java @@ -136,6 +136,9 @@ public class CommandLineOptions { } checkSettings(); createUserConfig(); + if (factory.getUserConfig() != null) { + foUserAgent.configure(factory.getUserConfig()); + } addXSLTParameter("fop-output-format", getOutputFormat()); addXSLTParameter("fop-version", Version.getVersion()); } diff --git a/status.xml b/status.xml index 1dc0245fa..562f9b0cb 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,10 @@ <changes> <release version="FOP Trunk"> + <action context="Code" dev="MM" type="fix"> + Bugfix: FOUserAgent specific configuration parameters specified in config file + were not set when FOP was invoked from command line. + </action> <action context="Code" dev="JM" type="add"> Added support for PDF/A-1b and PDF/X-3:2003. (Note: this may still be a bit incomplete. Feedback is welcome!) |