Author: jleroux
Date: Sat Jul 7 04:36:37 2007
New Revision: 554181
URL:
http://svn.apache.org/viewvc?view=rev&rev=554181Log:
A patch from Oleg Andreyev "ApacheFopFactory initialize font base url to default value independently of <font-base> tag in fop.xconf" (
https://issues.apache.org/jira/browse/OFBIZ-990)
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/ApacheFopFactory.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/ApacheFopFactory.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/ApacheFopFactory.java?view=diff&rev=554181&r1=554180&r2=554181==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/ApacheFopFactory.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/ApacheFopFactory.java Sat Jul 7 04:36:37 2007
@@ -47,11 +47,14 @@
String fopPath = UtilProperties.getPropertyValue("fop.properties", "fop.path","framework/widget/config");
File userConfigFile = new File(fopPath + "/fop.xconf");
fopFactory.setUserConfig(userConfigFile);
- String ofbizHome = System.getProperty("ofbiz.home");
- String fopFontBaseUrl = UtilProperties.getPropertyValue("fop.properties", "fop.font.base.url",
+ String fopFontBaseUrl = fopFactory.getFontBaseURL();
+ if (fopFontBaseUrl == null) {
+ String ofbizHome = System.getProperty("ofbiz.home");
+ fopFontBaseUrl = UtilProperties.getPropertyValue("fop.properties", "fop.font.base.url",
"file:///" + ofbizHome + "/framework/widget/config/");
- Debug.log("FOP-FontBaseURL: " + fopFontBaseUrl, module);
- fopFactory.setFontBaseURL(fopFontBaseUrl);
+ fopFactory.setFontBaseURL(fopFontBaseUrl);
+ }
+ Debug.logInfo("FOP-FontBaseURL: " + fopFontBaseUrl, module);
} catch (Exception e) {
Debug.logWarning("Error reading FOP configuration", module);
}