1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_table_XCell_idl__ 29#define __com_sun_star_table_XCell_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35#ifndef __com_sun_star_table_CellContentType_idl__ 36#include <com/sun/star/table/CellContentType.idl> 37#endif 38 39//============================================================================= 40 41module com { module sun { module star { module table { 42 43//============================================================================= 44 45/** provides methods to access the contents of a cell in a table. 46 47 @see com::sun::star::table::Cell 48 */ 49published interface XCell: com::sun::star::uno::XInterface 50{ 51 //------------------------------------------------------------------------- 52 53 /** returns the formula string of a cell. 54 55 <p>Even if the cell does not contain a formula, an assignment of 56 this attribute's value to another cell's formula attribute would 57 create the same cell content. This is because this attribute contains 58 the original text value of a string cell. The value of a 59 <em>value cell</em> will be formatted using the number format's 60 default format or the formula string, including "=", of a formula 61 cell.</p> 62 */ 63 string getFormula(); 64 65 //------------------------------------------------------------------------- 66 67 /** sets a formula into the cell. 68 69 <p>When assigned, the string will be interpreted and a value, text 70 or formula cell is created, depending on the text and the number 71 format.</p> 72 */ 73 void setFormula( [in] string aFormula ); 74 75 //------------------------------------------------------------------------- 76 77 /** returns the floating point value of the cell. 78 79 <p>For a <em>value cell</em> the value is returnd, for a 80 <em>string cell</em> zero is returned and for a <em>formula cell</em> 81 the result value of a formula is returned.</p> 82 */ 83 double getValue(); 84 85 //------------------------------------------------------------------------- 86 87 /** sets a floating point value into the cell. 88 89 <p>After a call to this method the type of the cell is 90 <member>CellContentType::VALUE</member>.</p> 91 */ 92 void setValue( [in] double nValue ); 93 94 //------------------------------------------------------------------------- 95 96 /** returns the type of the cell. 97 */ 98 com::sun::star::table::CellContentType getType(); 99 100 //------------------------------------------------------------------------- 101 102 /** returns the error value of the cell. 103 104 <P>If the cell does not contain a formula, the error is always 105 zero.</p> 106 */ 107 long getError(); 108 109}; 110 111//============================================================================= 112 113}; }; }; }; 114 115#endif 116 117