[Libreoffice-commits] core.git: reportbuilder/java
Noel Grandin
noel at peralex.com
Tue Dec 9 03:35:55 PST 2014
reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java | 29 ----------
1 file changed, 1 insertion(+), 28 deletions(-)
New commits:
commit 6636b2bacad2026bbc3bc84894d296f98eaaa3cc
Author: Noel Grandin <noel at peralex.com>
Date: Fri Dec 5 11:18:33 2014 +0200
no need to call getComposer by reflection
Change-Id: Icf2cdeaab013814b669ce6d6cd243ce43856e940
diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
index befae9f..3596413 100644
--- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
@@ -41,8 +41,6 @@ import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import java.lang.reflect.Method;
-
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -280,32 +278,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
final String command,
final int commandType)
{
- final Class[] parameter = new Class[2];
- parameter[0] = int.class;
- parameter[1] = String.class;
- try
- {
- final Object[] param = new Object[2];
- param[0] = commandType;
- param[1] = command;
- final Method call = tools.getClass().getMethod("getComposer", parameter);
- return (XSingleSelectQueryComposer) call.invoke(tools, param);
- }
- catch (NoSuchMethodException ex)
- {
- }
- catch (IllegalAccessException ex)
- {
- // should not happen
- // assert False
- }
- catch (java.lang.reflect.InvocationTargetException ex)
- {
- // should not happen
- // assert False
- }
-
- return null;
+ return tools.getComposer(commandType, command);
}
private void fillParameter(final Map parameters,
More information about the Libreoffice-commits
mailing list