summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-11-30 15:01:47 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-11-30 15:01:47 +0000
commitd44e3116c4d43664c0b8c9978696d3f26558e724 (patch)
tree55a3659e507414e2037748c11178f655596d43b7
parent1becba6356524f199edea28c718a052e0e6f1478 (diff)
parent4c21d28b6be2a07b6f91aae401f347b5877a123d (diff)
slideshow1: merge with DEV300 m45
-rw-r--r--apache-commons/java/codec/makefile.mk4
-rw-r--r--apache-commons/java/httpclient/makefile.mk4
-rw-r--r--apache-commons/java/lang/makefile.mk4
-rw-r--r--apache-commons/java/logging/makefile.mk4
-rw-r--r--jfreereport/java/libbase/makefile.mk19
-rw-r--r--reportbuilder/java/com/sun/star/report/StorageRepository.java3
-rw-r--r--reportbuilder/java/com/sun/star/report/makefile.mk6
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/makefile.mk27
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/ImageProducer.java22
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/chart/ChartRawReportTarget.java30
-rw-r--r--reportbuilder/util/description.xml2
-rw-r--r--reportbuilder/util/makefile.mk5
12 files changed, 96 insertions, 34 deletions
diff --git a/apache-commons/java/codec/makefile.mk b/apache-commons/java/codec/makefile.mk
index 7945803bf867..6a6d637fde7d 100644
--- a/apache-commons/java/codec/makefile.mk
+++ b/apache-commons/java/codec/makefile.mk
@@ -43,7 +43,7 @@ ANT_BUILDFILE=build.xml
.INCLUDE : antsettings.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && "$(ENABLE_MEDIAWIKI)" == "YES"
# --- Files --------------------------------------------------------
TARFILE_NAME=commons-codec-1.3-src
@@ -71,7 +71,7 @@ BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -f $(ANT_BUILDFILE) jar
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && "$(ENABLE_MEDIAWIKI)" == "YES"
.INCLUDE : tg_ext.mk
.ENDIF
diff --git a/apache-commons/java/httpclient/makefile.mk b/apache-commons/java/httpclient/makefile.mk
index 8d3c696705f2..7070a07d5a6a 100644
--- a/apache-commons/java/httpclient/makefile.mk
+++ b/apache-commons/java/httpclient/makefile.mk
@@ -43,7 +43,7 @@ ANT_BUILDFILE=build.xml
.INCLUDE : antsettings.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && "$(ENABLE_MEDIAWIKI)" == "YES"
# --- Files --------------------------------------------------------
TARFILE_NAME=commons-httpclient-3.1-src
@@ -74,7 +74,7 @@ BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -Dcommons-logging.jar=
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && "$(ENABLE_MEDIAWIKI)" == "YES"
.INCLUDE : tg_ext.mk
.ENDIF
diff --git a/apache-commons/java/lang/makefile.mk b/apache-commons/java/lang/makefile.mk
index 3699660632f5..5db479dbd58c 100644
--- a/apache-commons/java/lang/makefile.mk
+++ b/apache-commons/java/lang/makefile.mk
@@ -43,7 +43,7 @@ ANT_BUILDFILE=build.xml
.INCLUDE : antsettings.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && "$(ENABLE_MEDIAWIKI)" == "YES"
# --- Files --------------------------------------------------------
TARFILE_NAME=commons-lang-2.3-src
@@ -71,7 +71,7 @@ BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -f $(ANT_BUILDFILE) jar
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && "$(ENABLE_MEDIAWIKI)" == "YES"
.INCLUDE : tg_ext.mk
.ENDIF
diff --git a/apache-commons/java/logging/makefile.mk b/apache-commons/java/logging/makefile.mk
index ab3476974b1b..8874c700a998 100644
--- a/apache-commons/java/logging/makefile.mk
+++ b/apache-commons/java/logging/makefile.mk
@@ -43,7 +43,7 @@ ANT_BUILDFILE=build.xml
.INCLUDE : antsettings.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && ( "$(ENABLE_MEDIAWIKI)" == "YES" || "$(ENABLE_REPORTBUILDER)" == "YES" )
# --- Files --------------------------------------------------------
TARFILE_NAME=commons-logging-1.1.1-src
@@ -75,7 +75,7 @@ BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -f $(ANT_BUILDFILE) -Ds
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
-.IF "$(SOLAR_JAVA)" != ""
+.IF "$(SOLAR_JAVA)" != "" && ( "$(ENABLE_MEDIAWIKI)" == "YES" || "$(ENABLE_REPORTBUILDER)" == "YES" )
.INCLUDE : tg_ext.mk
.ENDIF
diff --git a/jfreereport/java/libbase/makefile.mk b/jfreereport/java/libbase/makefile.mk
index 0fab39a8a2c6..c11070d0a12a 100644
--- a/jfreereport/java/libbase/makefile.mk
+++ b/jfreereport/java/libbase/makefile.mk
@@ -66,13 +66,22 @@ BUILD_ACTION=$(ANT) -Dlib="../../../class" -Dbuild.label="build-$(RSCREVISION)"
.IF "$(SOLAR_JAVA)" != ""
.INCLUDE : tg_ext.mk
-$(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(CLASSDIR)$/commons-logging-1.1.1.jar
ALLTAR : $(CLASSDIR)$/$(TARGET)$(VERSION).jar
-$(CLASSDIR)$/commons-logging-1.1.1.jar :
- $(COPY) $(SOLARBINDIR)$/commons-logging-1.1.1.jar $(CLASSDIR)$/commons-logging-1.1.1.jar
-
-$(CLASSDIR)$/$(TARGET)$(VERSION).jar : $(CLASSDIR)$/commons-logging-1.1.1.jar $(PACKAGE_DIR)$/$(INSTALL_FLAG_FILE)
+# XCLASSPATH/CLASSPATH does not work and we only can give lib once. But
+# the build.xmls fortunately take *.jar out of lib so we can copy our
+# commons-logging.jar here - yes, even in the system-apache commons case.
+# Sucks.
+$(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(CLASSDIR)$/commons-logging.jar
+
+$(CLASSDIR)$/commons-logging.jar :
+.IF "$(SYSTEM_APACHE_COMMONS)" != "YES"
+ $(COPY) $(SOLARBINDIR)$/commons-logging-1.1.1.jar $(CLASSDIR)$/commons-logging.jar
+.ELSE
+ $(COPY) $(COMMONS_LOGGING_JAR) $(CLASSDIR)$/commons-logging.jar
+.ENDIF
+
+$(CLASSDIR)$/$(TARGET)$(VERSION).jar : $(CLASSDIR)$/commons-logging.jar $(PACKAGE_DIR)$/$(INSTALL_FLAG_FILE)
$(COPY) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/build$/lib$/$(TARGET).jar $(CLASSDIR)$/$(TARGET)$(VERSION).jar
.ENDIF
diff --git a/reportbuilder/java/com/sun/star/report/StorageRepository.java b/reportbuilder/java/com/sun/star/report/StorageRepository.java
index bf5687da14ae..b32bcb3dab86 100644
--- a/reportbuilder/java/com/sun/star/report/StorageRepository.java
+++ b/reportbuilder/java/com/sun/star/report/StorageRepository.java
@@ -70,6 +70,7 @@ public class StorageRepository implements InputRepository, OutputRepository
{
this.input = input;
this.output = output;
+
}
public StorageRepository(final XStorage storage, final boolean isOutput)
@@ -118,7 +119,7 @@ public class StorageRepository implements InputRepository, OutputRepository
}
try
{
- final XStream stream = (XStream) UnoRuntime.queryInterface(XStream.class, output.openStreamElement(name, ElementModes.WRITE | ElementModes.TRUNCATE));
+ final XStream stream = output.openStreamElement(name, ElementModes.WRITE | ElementModes.TRUNCATE);
stream.getInputStream().closeInput();
if (mimeType != null)
{
diff --git a/reportbuilder/java/com/sun/star/report/makefile.mk b/reportbuilder/java/com/sun/star/report/makefile.mk
index 9c5c2998f5c0..5b36aff44ee8 100644
--- a/reportbuilder/java/com/sun/star/report/makefile.mk
+++ b/reportbuilder/java/com/sun/star/report/makefile.mk
@@ -39,10 +39,10 @@ PACKAGE = com$/sun$/star$/report
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
-.IF "$(SYSTEM_JFREEREPORT)" == "YES"
-XCLASSPATH!:==$(XCLASSPATH)$(PATH_SEPERATOR)$(JCOMMON_JAR)$(PATH_SEPERATOR)$(COMMONS_LOGGING_JAR)
+.IF "$(SYSTEM_APACHE_COMMONS)" == "YES"
+XCLASSPATH!:==$(XCLASSPATH)$(PATH_SEPERATOR)$(COMMONS_LOGGING_JAR)
.ELSE
-JARFILES += jcommon-1.0.10.jar commons-logging-1.1.1.jar
+JARFILES += commons-logging-1.1.1.jar
.ENDIF
JAVAFILES := DataRow.java\
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/makefile.mk b/reportbuilder/java/com/sun/star/report/pentaho/makefile.mk
index fc2abb55e96a..5d448a6bc2be 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/makefile.mk
+++ b/reportbuilder/java/com/sun/star/report/pentaho/makefile.mk
@@ -41,10 +41,19 @@ nodep=true
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
.IF "$(SYSTEM_JFREEREPORT)" == "YES"
-XCLASSPATH!:=$(XCLASSPATH)$(FLUTE_JAR)$(PATH_SEPERATOR)$(LIBBASE_JAR)$(PATH_SEPERATOR)$(LIBXML_JAR)$(PATH_SEPERATOR)$(JFREEREPORT_JAR)$(PATH_SEPERATOR)$(LIBLOADER_JAR)$(PATH_SEPERATOR)$(SAC_JAR)$(PATH_SEPERATOR)$(LIBLAYOUT_JAR)$(PATH_SEPERATOR)$(LIBSERIALIZER_JAR)$(PATH_SEPERATOR)$(LIBFONTS_JAR)$(PATH_SEPERATOR)$(LIBFORMULA_JAR)$(PATH_SEPERATOR)$(LIBREPOSITORY_JAR)$(PATH_SEPERATOR)$(COMMONS_LOGGING_JAR)
-COMP=fix_system_jfreereport
+XCLASSPATH!:=$(XCLASSPATH)$(FLUTE_JAR)$(PATH_SEPERATOR)$(LIBBASE_JAR)$(PATH_SEPERATOR)$(LIBXML_JAR)$(PATH_SEPERATOR)$(JFREEREPORT_JAR)$(PATH_SEPERATOR)$(LIBLOADER_JAR)$(PATH_SEPERATOR)$(SAC_JAR)$(PATH_SEPERATOR)$(LIBLAYOUT_JAR)$(PATH_SEPERATOR)$(LIBSERIALIZER_JAR)$(PATH_SEPERATOR)$(LIBFONTS_JAR)$(PATH_SEPERATOR)$(LIBFORMULA_JAR)$(PATH_SEPERATOR)$(LIBREPOSITORY_JAR)
.ELSE
-JARFILES += flute-1.3.0.jar libbase-1.0.0.jar libfonts-1.0.0.jar libformula-0.2.0.jar liblayout-0.2.9.jar libloader-1.0.0.jar librepository-1.0.0.jar libxml-1.0.0.jar flow-engine-0.9.2.jar sac.jar commons-logging-1.1.1.jar
+JARFILES += flute-1.3.0.jar libbase-1.0.0.jar libfonts-1.0.0.jar libformula-0.2.0.jar liblayout-0.2.9.jar libloader-1.0.0.jar librepository-1.0.0.jar libxml-1.0.0.jar flow-engine-0.9.2.jar sac.jar
+.ENDIF
+
+.IF "$(SYSTEM_APACHE_COMMONS)" == "YES"
+XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(COMMONS_LOGGING_JAR)
+.ELSE
+JARFILES += commons-logging-1.1.1.jar
+.ENDIF
+
+.IF "$(SYSTEM_JFREEREPORT)" == "YES" || "$(SYSTEM_APACHE_COMMONS)" == "YES"
+COMP=fix_system_libs
.ENDIF
JAVAFILES := $(shell @$(FIND) . -name "*.java")
@@ -94,13 +103,19 @@ CUSTOMMANIFESTFILE = Manifest.mf
$(JARTARGETN) : $(COMP) $(PROPERTYFILES) $(CSSFILES) $(XSDFILES) $(TXTFILES) $(XMLFILES)
.ENDIF # "$(JARTARGETN)"!=""
-fix_system_jfreereport:
- @echo "Fix Java Class-Path entry for JFree JFreeReport libraries from system."
+fix_system_libs:
+ @echo "Fix Java Class-Path entry for libraries from system."
+.IF ("$(SYSTEM_JFREEREPORT)" != "YES" && "$(SYSTEM_APACHE_COMMONS)" == "YES")
+ @$(SED) -r -e "s#commons-logging-1.1.1.jar#file://$(COMMONS_LOGGING_JAR)#" \
+ -i ../../../../../../$(INPATH)/class/sun-report-builder/META-INF/MANIFEST.MF
+.ENDIF
+.IF ("$(SYSTEM_JFREEREPORT)" == "YES" && "$(SYSTEM_APACHE_COMMONS)" == "YES")
@$(SED) '/flute/,/sac/d' -i ../../../../../../$(INPATH)/class/sun-report-builder/META-INF/MANIFEST.MF
@$(SED) -r -e "s#^Class-Path.*#\0\n file://$(LIBBASE_JAR)\n file://$(SAC_JAR)\n file://$(LIBXML_JAR)\n\
file://$(FLUTE_JAR)\n file://$(JFREEREPORT_JAR)\n file://$(LIBLAYOUT_JAR)\n file://$(LIBLOADER_JAR)\n file://$(LIBFORMULA_JAR)\n\
- file://$(LIBREPOSITORY_JAR)\n file://$(LIBFONTS_JAR)\n file://$(LIBSERIALIZER_JAR)#" \
+ file://$(LIBREPOSITORY_JAR)\n file://$(LIBFONTS_JAR)\n file://$(LIBSERIALIZER_JAR)\n file://$(COMMONS_LOGGING_JAR)#" \
-i ../../../../../../$(INPATH)/class/sun-report-builder/META-INF/MANIFEST.MF
+.ENDIF
$(CLASSDIR)$/$(PACKAGE)$/%.properties : %.properties
@@-$(MKDIRHIER) $(@:d)
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/ImageProducer.java b/reportbuilder/java/com/sun/star/report/pentaho/output/ImageProducer.java
index 94f2d4fffad0..9866d1a41c5e 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/ImageProducer.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/ImageProducer.java
@@ -146,7 +146,7 @@ public class ImageProducer
final byte b = keyData[i];
hashValue = b + hashValue * 23;
}
- this.hashCode = new Integer(hashValue);
+ this.hashCode = Integer.valueOf(hashValue);
return hashValue;
}
}
@@ -154,7 +154,6 @@ public class ImageProducer
private final InputRepository inputRepository;
private final OutputRepository outputRepository;
private final ImageService imageService;
- private final DefaultNameGenerator nameGenerator;
public ImageProducer(final InputRepository inputRepository,
final OutputRepository outputRepository,
@@ -177,7 +176,6 @@ public class ImageProducer
this.outputRepository = outputRepository;
this.imageService = imageService;
this.imageCache = new HashMap();
- this.nameGenerator = new DefaultNameGenerator(outputRepository);
}
/**
@@ -275,8 +273,10 @@ public class ImageProducer
// copy the image into the local output-storage
// todo: Implement data-fingerprinting so that we can detect the mime-type
- final String name = nameGenerator.generateName("Pictures/image", mimeType);
- final OutputStream outputStream = outputRepository.createOutputStream(name, mimeType);
+ final OutputRepository storage = outputRepository.openOutputRepository("Pictures", null);
+ final DefaultNameGenerator nameGenerator = new DefaultNameGenerator(storage);
+ final String name = nameGenerator.generateName("image", mimeType);
+ final OutputStream outputStream = storage.createOutputStream(name, mimeType);
final ByteArrayInputStream bin = new ByteArrayInputStream(data);
try
@@ -285,11 +285,12 @@ public class ImageProducer
} finally
{
outputStream.close();
+ storage.closeOutputRepository();
}
final CSSNumericValue widthVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getWidth() / 100.0);
final CSSNumericValue heightVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getHeight() / 100.0);
- final OfficeImage officeImage = new OfficeImage(name, widthVal, heightVal);
+ final OfficeImage officeImage = new OfficeImage("Pictures/" + name, widthVal, heightVal);
imageCache.put(imageKey, officeImage);
return officeImage;
}
@@ -442,8 +443,10 @@ public class ImageProducer
}
// copy the image into the local output-storage
- final String name = nameGenerator.generateName("Pictures/image", mimeType);
- final OutputStream outputStream = outputRepository.createOutputStream(name, mimeType);
+ final OutputRepository storage = outputRepository.openOutputRepository("Pictures", null);
+ final DefaultNameGenerator nameGenerator = new DefaultNameGenerator(storage);
+ final String name = nameGenerator.generateName("image", mimeType);
+ final OutputStream outputStream = storage.createOutputStream(name, mimeType);
final ByteArrayInputStream bin = new ByteArrayInputStream(data);
try
@@ -452,7 +455,8 @@ public class ImageProducer
} finally
{
outputStream.close();
+ storage.closeOutputRepository();
}
- return name;
+ return "Pictures/" + name;
}
}
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/chart/ChartRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/chart/ChartRawReportTarget.java
index a98b64495579..56a2c036f2e8 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/chart/ChartRawReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/chart/ChartRawReportTarget.java
@@ -38,12 +38,16 @@ import com.sun.star.report.OfficeToken;
import com.sun.star.report.pentaho.PentahoReportEngineMetaData;
import com.sun.star.report.pentaho.output.OfficeDocumentReportTarget;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
import org.jfree.layouting.util.AttributeMap;
import org.jfree.report.DataFlags;
import org.jfree.report.DataSourceException;
import org.jfree.report.ReportProcessingException;
import org.jfree.report.flow.ReportJob;
+import org.jfree.report.flow.ReportStructureRoot;
import org.jfree.report.flow.ReportTargetUtil;
+import org.pentaho.reporting.libraries.base.util.IOUtils;
import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
import org.pentaho.reporting.libraries.xmlns.common.AttributeList;
@@ -253,4 +257,30 @@ public class ChartRawReportTarget extends OfficeDocumentReportTarget
}
super.processText(text);
}
+ public void endReport(final ReportStructureRoot report)
+ throws DataSourceException, ReportProcessingException
+ {
+ super.endReport(report);
+ try
+ {
+ // now copy the meta.xml
+ if (getInputRepository().isReadable("meta.xml"))
+ {
+ final InputStream inputStream = getInputRepository().createInputStream("meta.xml");
+ try
+ {
+ final OutputStream outputMetaStream = getOutputRepository().createOutputStream("meta.xml", "text/xml");
+ IOUtils.getInstance().copyStreams(inputStream, outputMetaStream);
+ outputMetaStream.close();
+ } finally
+ {
+ inputStream.close();
+ }
+ }
+ }
+ catch (IOException ioe)
+ {
+ throw new ReportProcessingException("Failed to write settings document");
+ }
+ }
}
diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml
index 6e9dc128271a..5a9bef4a5532 100644
--- a/reportbuilder/util/description.xml
+++ b/reportbuilder/util/description.xml
@@ -3,7 +3,7 @@
xmlns:d="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<display-name>
- <name lang="en-US">Sun™ Report Builder</name>
+ <name lang="en-US">Sun Report Builder</name>
<!-- <name lang="en-US">Sun(TM) Report Builder</name> -->
</display-name>
<registration>
diff --git a/reportbuilder/util/makefile.mk b/reportbuilder/util/makefile.mk
index 0dd34f039078..6cb9d9808087 100644
--- a/reportbuilder/util/makefile.mk
+++ b/reportbuilder/util/makefile.mk
@@ -110,7 +110,10 @@ COMPONENT_EXTJARFILES += \
$(EXTENSIONDIR)$/librepository-1.0.0.jar \
$(EXTENSIONDIR)$/libxml-1.0.0.jar \
$(EXTENSIONDIR)$/flow-engine-0.9.2.jar \
- $(EXTENSIONDIR)$/sac.jar \
+ $(EXTENSIONDIR)$/sac.jar
+.ENDIF
+.IF "$(SYSTEM_APACHE_COMMONS)" != "YES"
+COMPONENT_EXTJARFILES += \
$(EXTENSIONDIR)$/commons-logging-1.1.1.jar
.ENDIF