merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sheet / XNamedRanges.idl
blob36fb40485ce64be948288ebe20a34e3cceb7ff1b
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_sheet_XNamedRanges_idl__
29 #define __com_sun_star_sheet_XNamedRanges_idl__
31 #ifndef __com_sun_star_container_XNameAccess_idl__
32 #include <com/sun/star/container/XNameAccess.idl>
33 #endif
35 #ifndef __com_sun_star_table_CellAddress_idl__
36 #include <com/sun/star/table/CellAddress.idl>
37 #endif
39 #ifndef __com_sun_star_table_CellRangeAddress_idl__
40 #include <com/sun/star/table/CellRangeAddress.idl>
41 #endif
43 #ifndef __com_sun_star_sheet_Border_idl__
44 #include <com/sun/star/sheet/Border.idl>
45 #endif
47 //=============================================================================
49 module com { module sun { module star { module sheet {
51 //=============================================================================
53 /** provides access to the members in a collection of named ranges and to
54 insert and remove them.
56 @see com::sun::star::sheet::NamedRanges
57 @see com::sun::star::sheet::NamedRange
59 published interface XNamedRanges: com::sun::star::container::XNameAccess
61 //-------------------------------------------------------------------------
63 /** adds a new named range to the collection.
65 @param aName
66 the new name of the named range.
68 @param aContent
69 the formula expression.
71 <p>A cell range address is one possible content of a named
72 range.</p>
74 @param aPosition
75 specifies the base address for relative cell references.
77 @param nType
78 a combination of flags that specify the type of a named range,
79 as defined in <type>NamedRangeFlag</type>.
81 <p>This parameter will be zero for any common named range.</p>
83 void addNewByName(
84 [in] string aName,
85 [in] string aContent,
86 [in] com::sun::star::table::CellAddress aPosition,
87 [in] long nType );
89 //-------------------------------------------------------------------------
91 /** creates named cell ranges from titles in a cell range.
93 <p>The names for the named ranges are taken from title cells in the
94 top or bottom row, or from the cells of the left or right column
95 of the range (depending on the parameter <const>aBorder</const>.
96 The named ranges refer to single columns or rows in the inner
97 part of the original range, excluding the labels.</p>
99 <p>Example: The source range is A1:B3. The named ranges shall be
100 created using row titles. This requires <member>Border::TOP</member>
101 for the second parameter. The method creates two named ranges. The
102 name of the first is equal to the content of cell A1 and contains the
103 range $Sheet.$A$2:$A$3 (excluding the title cell). The latter named
104 range is named using cell B1 and contains the cell range address
105 $Sheet.$B$2:$B$3.</p>
107 @param aSource
108 the cell range used to create the named ranges.
110 @param aBorder
111 specifies the location of the title cells.
113 void addNewFromTitles(
114 [in] com::sun::star::table::CellRangeAddress aSource,
115 [in] com::sun::star::sheet::Border aBorder );
117 //-------------------------------------------------------------------------
119 /** removes a named range from the collection.
121 void removeByName( [in] string aName );
123 //-------------------------------------------------------------------------
125 /** writes a list of all named ranges into the document.
127 <p>The first column of the list contains the names. The second
128 column contains the contents of the named ranges.</p>
130 @param aOutputPosition
131 specifies the top left cell of the output range.
133 void outputList( [in] com::sun::star::table::CellAddress aOutputPosition );
137 //=============================================================================
139 }; }; }; };
141 #endif