merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / table / XCell.idl
blob7bc0fdffcafa3c91b56ea0747efd8bea32fa882a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_table_XCell_idl__
29 #define __com_sun_star_table_XCell_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include <com/sun/star/uno/XInterface.idl>
33 #endif
35 #ifndef __com_sun_star_table_CellContentType_idl__
36 #include <com/sun/star/table/CellContentType.idl>
37 #endif
39 //=============================================================================
41 module com { module sun { module star { module table {
43 //=============================================================================
45 /** provides methods to access the contents of a cell in a table.
47 @see com::sun::star::table::Cell
49 published interface XCell: com::sun::star::uno::XInterface
51 //-------------------------------------------------------------------------
53 /** returns the formula string of a cell.
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>
63 string getFormula();
65 //-------------------------------------------------------------------------
67 /** sets a formula into the cell.
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>
73 void setFormula( [in] string aFormula );
75 //-------------------------------------------------------------------------
77 /** returns the floating point value of the cell.
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>
83 double getValue();
85 //-------------------------------------------------------------------------
87 /** sets a floating point value into the cell.
89 <p>After a call to this method the type of the cell is
90 <member>CellContentType::VALUE</member>.</p>
92 void setValue( [in] double nValue );
94 //-------------------------------------------------------------------------
96 /** returns the type of the cell.
98 com::sun::star::table::CellContentType getType();
100 //-------------------------------------------------------------------------
102 /** returns the error value of the cell.
104 <P>If the cell does not contain a formula, the error is always
105 zero.</p>
107 long getError();
111 //=============================================================================
113 }; }; }; };
115 #endif