diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-05 11:18:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-09 13:34:47 +0200 |
commit | 6636b2bacad2026bbc3bc84894d296f98eaaa3cc (patch) | |
tree | bfe18243ee192e1bee503f05cd26422d1c081b41 /reportbuilder | |
parent | fa517ab03d9e65291a4b0f25a1188ffe454f6f3e (diff) |
no need to call getComposer by reflection
Change-Id: Icf2cdeaab013814b669ce6d6cd243ce43856e940
Diffstat (limited to 'reportbuilder')
-rw-r--r-- | reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java index befae9f9ee66..3596413c0b7f 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, |