summaryrefslogtreecommitdiff
path: root/reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java
diff options
context:
space:
mode:
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java')
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java b/reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java
index 30c9711dce05..7a25d05c593f 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/SOFormulaOpCodeMapper.java
@@ -55,7 +55,6 @@ public final class SOFormulaOpCodeMapper extends WeakBase
this.parser = parser;
}
-
// com.sun.star.sheet.XFormulaOpCodeMapper:
public int getOpCodeExternal()
{
@@ -69,13 +68,15 @@ public final class SOFormulaOpCodeMapper extends WeakBase
public com.sun.star.sheet.FormulaToken[] getMappings(String[] Names, int Language) throws com.sun.star.lang.IllegalArgumentException
{
- if ( Language != FormulaLanguage.ODFF )
+ if (Language != FormulaLanguage.ODFF)
+ {
throw new IllegalArgumentException();
+ }
final ArrayList token = new ArrayList();
final Map parserNames = parser.getNames();
for (int i = 0; i < Names.length; i++)
{
- if ( parserNames.containsKey(Names[i]) )
+ if (parserNames.containsKey(Names[i]))
{
token.add(((FormulaOpCodeMapEntry) parserNames.get(Names[i])).Token);
}
@@ -86,36 +87,38 @@ public final class SOFormulaOpCodeMapper extends WeakBase
public com.sun.star.sheet.FormulaOpCodeMapEntry[] getAvailableMappings(int Language, int Groups) throws com.sun.star.lang.IllegalArgumentException
{
- if ( Language != FormulaLanguage.ODFF )
+ if (Language != FormulaLanguage.ODFF)
+ {
throw new IllegalArgumentException();
+ }
final ArrayList token = new ArrayList();
- if ( Groups == FormulaMapGroup.SPECIAL )
+ if (Groups == FormulaMapGroup.SPECIAL)
{
return (com.sun.star.sheet.FormulaOpCodeMapEntry[]) parser.getSpecialOpCodes().toArray(new FormulaOpCodeMapEntry[parser.getSpecialOpCodes().size()]);
}
else
{
- if ( (Groups & FormulaMapGroup.ARRAY_SEPARATORS) != 0 )
+ if ((Groups & FormulaMapGroup.ARRAY_SEPARATORS) != 0)
{
token.addAll(parser.getGroup(SOFormulaParser.ARRAY_SEPARATORS).values());
}
- if ( (Groups & FormulaMapGroup.SEPARATORS) != 0 )
+ if ((Groups & FormulaMapGroup.SEPARATORS) != 0)
{
token.addAll(parser.getGroup(SOFormulaParser.SEPARATORS).values());
}
- if ( (Groups & FormulaMapGroup.ARRAY_SEPARATORS) != 0 )
+ if ((Groups & FormulaMapGroup.ARRAY_SEPARATORS) != 0)
{
token.addAll(parser.getGroup(SOFormulaParser.ARRAY_SEPARATORS).values());
}
- if ( (Groups & FormulaMapGroup.UNARY_OPERATORS) != 0 )
+ if ((Groups & FormulaMapGroup.UNARY_OPERATORS) != 0)
{
token.addAll(parser.getGroup(SOFormulaParser.UNARY_OPERATORS).values());
}
- if ( (Groups & FormulaMapGroup.BINARY_OPERATORS) != 0 )
+ if ((Groups & FormulaMapGroup.BINARY_OPERATORS) != 0)
{
token.addAll(parser.getGroup(SOFormulaParser.BINARY_OPERATORS).values());
}
- if ( (Groups & FormulaMapGroup.FUNCTIONS) != 0 )
+ if ((Groups & FormulaMapGroup.FUNCTIONS) != 0)
{
token.addAll(parser.getGroup(SOFormulaParser.FUNCTIONS).values());
}
@@ -142,6 +145,7 @@ public final class SOFormulaOpCodeMapper extends WeakBase
/**
* This method is a simple helper function to used in the static component initialisation functions as well as
* in getSupportedServiceNames.
+ * @return
*/
public static String[] getServiceNames()
{