Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / ifc / sheet / _XCellRangeFormula.java
blob1b3c588d890e7858031863d0b5b33bb0c9267b91
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package ifc.sheet;
21 import com.sun.star.sheet.XCellRangeFormula;
23 public class _XCellRangeFormula extends lib.MultiMethodTest {
25 public XCellRangeFormula oObj = null;
27 public String[][] orgValue = null;
29 public void _getFormulaArray() {
30 Object noArray = tEnv.getObjRelation("noArray");
31 if (noArray != null) {
32 log.println("Component " + noArray.toString() +
33 " doesn't really support this Interface");
34 log.println("It doesn't make sense to get an FormulaArray from"
35 + " the whole sheet");
36 tRes.tested("getFormulaArray()", true);
37 return;
39 orgValue = oObj.getFormulaArray();
40 String[][] newValue = oObj.getFormulaArray();
41 newValue[0][0] = "inserted";
42 oObj.setFormulaArray(newValue);
43 boolean res = oObj.getFormulaArray()[0][0].equals(newValue[0][0]);
44 tRes.tested("getFormulaArray()",res);
47 public void _setFormulaArray() {
48 requiredMethod("getFormulaArray()");
49 Object noArray = tEnv.getObjRelation("noArray");
50 if (noArray != null) {
51 log.println("Component " + noArray.toString() +
52 " doesn't really support this Interface");
53 log.println("It doesn't make sense to set an FormulaArray over"
54 + " the whole sheet");
55 tRes.tested("setFormulaArray()", true);
56 return;
58 oObj.setFormulaArray(orgValue);
59 boolean res = oObj.getFormulaArray()[0][0].equals(orgValue[0][0]);
60 tRes.tested("setFormulaArray()",res);