Examples of FreeRefFunction


Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

            fail("expectecd exception");
        } catch (NotImplementedException e) {
            ;
        }

        AnalysisToolPak.registerFunction("CUBEMEMBERPROPERTY", new FreeRefFunction() {
            public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
                return ErrorEval.NUM_ERROR;
            }
        });
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

        } catch (IllegalArgumentException e){
            assertEquals("ISODD is a function from the Excel Analysis Toolpack. " +
                    "Use AnalysisToolpack.registerFunction(String name, FreeRefFunction func) instead.", e.getMessage());
        }

        FreeRefFunction atpFunc = new FreeRefFunction() {
            public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
                return ErrorEval.NUM_ERROR;
            }
        };
        try {
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

    public void testAddNameX(){
        InternalWorkbook wb = TestHSSFWorkbook.getInternalWorkbook(new HSSFWorkbook());
        assertNotNull(wb.getNameXPtg("ISODD", UDFFinder.DEFAULT));

        FreeRefFunction NotImplemented = new FreeRefFunction() {
            public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
                throw new RuntimeException("not implemented");
            }
        };
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

        return m;
    }

    private static void r(Map<String, FreeRefFunction> m, String functionName, FreeRefFunction pFunc) {
        FreeRefFunction func = pFunc == null ? new NotImplemented(functionName) : pFunc;
        m.put(functionName, func);
    }
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

    public void testAddNameX(){
        InternalWorkbook wb = TestHSSFWorkbook.getInternalWorkbook(new HSSFWorkbook());
        assertNotNull(wb.getNameXPtg("ISODD", UDFFinder.DEFAULT));

        FreeRefFunction NotImplemented = new FreeRefFunction() {
            public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
                throw new RuntimeException("not implemented");
            }
        };
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

        super(usedToolPacks);
        _funcMap = new HashMap<Integer, String>();
    }

    public FreeRefFunction findFunction(String name) {
        FreeRefFunction func = super.findFunction(name);
        if (func != null) {
            int idx = getFunctionIndex(name);
            _funcMap.put(idx, name);
        }
        return func;
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

     throw new RuntimeException("Not implemented yet");
  }

  public NameXPtg getNameXPtg(String name) {
        IndexedUDFFinder udfFinder = (IndexedUDFFinder)getUDFFinder();
        FreeRefFunction func = udfFinder.findFunction(name);
    if(func == null) return null;
        else return new NameXPtg(0, udfFinder.getFunctionIndex(name));
  }
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

        Iterator<String> keysIt = xlsMacroList.keySet().iterator();
        int x = 0;
        while (keysIt.hasNext()) {
            String name = keysIt.next();
            FreeRefFunction function = xlsMacroList.get(name);
            names[x] = name;
            functions[x] = function;
        }

        UDFFinder udff1 = new DefaultUDFFinder(names, functions);
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

     throw new RuntimeException("Not implemented yet");
  }

  public NameXPtg getNameXPtg(String name) {
        IndexedUDFFinder udfFinder = (IndexedUDFFinder)getUDFFinder();
        FreeRefFunction func = udfFinder.findFunction(name);
    if(func == null) return null;
        else return new NameXPtg(0, udfFinder.getFunctionIndex(name));
  }
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.FreeRefFunction

        public BloombergAddIn() {
            // dummy function that returns NA
            // don't care about the implementation, we are not interested in evaluation
            // and this method will never be called
            FreeRefFunction NA = new FreeRefFunction() {
                public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
                    return ErrorEval.NA;
                }
            };
            _functionsByName = new HashMap<String, FreeRefFunction>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.