summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reportdesign/java/com/sun/star/report/pentaho/SOReportJobFactory.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/reportdesign/java/com/sun/star/report/pentaho/SOReportJobFactory.java b/reportdesign/java/com/sun/star/report/pentaho/SOReportJobFactory.java
index 5951e952839b..4a4b1867b0a0 100644
--- a/reportdesign/java/com/sun/star/report/pentaho/SOReportJobFactory.java
+++ b/reportdesign/java/com/sun/star/report/pentaho/SOReportJobFactory.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: SOReportJobFactory.java,v $
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
@@ -176,8 +176,7 @@ public class SOReportJobFactory
catch (java.lang.IncompatibleClassChangeError e2)
{
Log.error("Detected an IncompatibleClassChangeError");
- e2.printStackTrace(System.err);
- System.err.println(e2);
+ throw new com.sun.star.lang.WrappedTargetException("caught a " + e2.getClass().getName(), this, new com.sun.star.uno.Exception(e2.getLocalizedMessage()));
}
Thread.currentThread().setContextClassLoader(cl);
@@ -190,6 +189,8 @@ public class SOReportJobFactory
XStorage output = null;
XRowSet rowSet = null;
String mimetype = null;
+ String author = null;
+ String title = null;
for (int i = 0; i < namedValue.length; ++i)
{
@@ -218,6 +219,14 @@ public class SOReportJobFactory
{
mimetype = (String) aProps.Value;
}
+ else if (ReportEngineParameterNames.AUTHOR.equalsIgnoreCase(aProps.Name))
+ {
+ author = (String) aProps.Value;
+ }
+ else if (ReportEngineParameterNames.TITLE.equalsIgnoreCase(aProps.Name))
+ {
+ title = (String) aProps.Value;
+ }
}
if (input == null || output == null)
@@ -257,7 +266,6 @@ public class SOReportJobFactory
final ReportJobDefinition definition = engine.createJobDefinition();
final JobProperties procParms = definition.getProcessingParameters();
procParms.setProperty(ReportEngineParameterNames.INPUT_REPOSITORY, storageRepository);
-
procParms.setProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY, storageRepository);
procParms.setProperty(ReportEngineParameterNames.INPUT_NAME, inputName);
procParms.setProperty(ReportEngineParameterNames.OUTPUT_NAME, outputName);
@@ -265,6 +273,10 @@ public class SOReportJobFactory
procParms.setProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY, dataFactory);
procParms.setProperty(ReportEngineParameterNames.IMAGE_SERVICE, new SOImageService(m_cmpCtx));
procParms.setProperty(ReportEngineParameterNames.INPUT_REPORTJOB_FACTORY, this);
+ if ( author != null)
+ procParms.setProperty(ReportEngineParameterNames.AUTHOR, author);
+ if ( title != null)
+ procParms.setProperty(ReportEngineParameterNames.TITLE, title);
return engine.createJob(definition);
}
@@ -335,8 +347,6 @@ public class SOReportJobFactory
}
catch (java.lang.IncompatibleClassChangeError e2)
{
- e2.printStackTrace(System.err);
- System.err.println(e2);
}
return xFactory;