Update ooo320-m1
[ooovba.git] / qadevOOo / tests / java / ifc / sheet / _XCellRangeFormula.java
blobe44345c302ab6dc34442b586f3b7cc69f2cf5361
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _XCellRangeFormula.java,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package ifc.sheet;
33 import com.sun.star.sheet.XCellRangeFormula;
35 public class _XCellRangeFormula extends lib.MultiMethodTest {
37 public XCellRangeFormula oObj = null;
39 public String[][] orgValue = null;
41 public void _getFormulaArray() {
42 Object noArray = tEnv.getObjRelation("noArray");
43 if (noArray != null) {
44 log.println("Component " + noArray.toString() +
45 " doesn't really support this Interface");
46 log.println("It doesn't make sense to get an FormulaArray from"
47 + " the whole sheet");
48 tRes.tested("getFormulaArray()", true);
49 return;
51 orgValue = oObj.getFormulaArray();
52 String[][] newValue = oObj.getFormulaArray();
53 newValue[0][0] = "inserted";
54 oObj.setFormulaArray(newValue);
55 boolean res = oObj.getFormulaArray()[0][0].equals(newValue[0][0]);
56 tRes.tested("getFormulaArray()",res);
59 public void _setFormulaArray() {
60 requiredMethod("getFormulaArray()");
61 Object noArray = tEnv.getObjRelation("noArray");
62 if (noArray != null) {
63 log.println("Component " + noArray.toString() +
64 " doesn't really support this Interface");
65 log.println("It doesn't make sense to set an FormulaArray over"
66 + " the whole sheet");
67 tRes.tested("setFormulaArray()", true);
68 return;
70 oObj.setFormulaArray(orgValue);
71 boolean res = oObj.getFormulaArray()[0][0].equals(orgValue[0][0]);
72 tRes.tested("setFormulaArray()",res);