update dev300-m58
[ooovba.git] / offapi / com / sun / star / sheet / XNamedRanges.idl
blob47fa54931050aca23abc35e11efbed2f592dd6f2
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: XNamedRanges.idl,v $
10 * $Revision: 1.11 $
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 #ifndef __com_sun_star_sheet_XNamedRanges_idl__
32 #define __com_sun_star_sheet_XNamedRanges_idl__
34 #ifndef __com_sun_star_container_XNameAccess_idl__
35 #include <com/sun/star/container/XNameAccess.idl>
36 #endif
38 #ifndef __com_sun_star_table_CellAddress_idl__
39 #include <com/sun/star/table/CellAddress.idl>
40 #endif
42 #ifndef __com_sun_star_table_CellRangeAddress_idl__
43 #include <com/sun/star/table/CellRangeAddress.idl>
44 #endif
46 #ifndef __com_sun_star_sheet_Border_idl__
47 #include <com/sun/star/sheet/Border.idl>
48 #endif
50 //=============================================================================
52 module com { module sun { module star { module sheet {
54 //=============================================================================
56 /** provides access to the members in a collection of named ranges and to
57 insert and remove them.
59 @see com::sun::star::sheet::NamedRanges
60 @see com::sun::star::sheet::NamedRange
62 published interface XNamedRanges: com::sun::star::container::XNameAccess
64 //-------------------------------------------------------------------------
66 /** adds a new named range to the collection.
68 @param aName
69 the new name of the named range.
71 @param aContent
72 the formula expression.
74 <p>A cell range address is one possible content of a named
75 range.</p>
77 @param aPosition
78 specifies the base address for relative cell references.
80 @param nType
81 a combination of flags that specify the type of a named range,
82 as defined in <type>NamedRangeFlag</type>.
84 <p>This parameter will be zero for any common named range.</p>
86 void addNewByName(
87 [in] string aName,
88 [in] string aContent,
89 [in] com::sun::star::table::CellAddress aPosition,
90 [in] long nType );
92 //-------------------------------------------------------------------------
94 /** creates named cell ranges from titles in a cell range.
96 <p>The names for the named ranges are taken from title cells in the
97 top or bottom row, or from the cells of the left or right column
98 of the range (depending on the parameter <const>aBorder</const>.
99 The named ranges refer to single columns or rows in the inner
100 part of the original range, excluding the labels.</p>
102 <p>Example: The source range is A1:B3. The named ranges shall be
103 created using row titles. This requires <member>Border::TOP</member>
104 for the second parameter. The method creates two named ranges. The
105 name of the first is equal to the content of cell A1 and contains the
106 range $Sheet.$A$2:$A$3 (excluding the title cell). The latter named
107 range is named using cell B1 and contains the cell range address
108 $Sheet.$B$2:$B$3.</p>
110 @param aSource
111 the cell range used to create the named ranges.
113 @param aBorder
114 specifies the location of the title cells.
116 void addNewFromTitles(
117 [in] com::sun::star::table::CellRangeAddress aSource,
118 [in] com::sun::star::sheet::Border aBorder );
120 //-------------------------------------------------------------------------
122 /** removes a named range from the collection.
124 void removeByName( [in] string aName );
126 //-------------------------------------------------------------------------
128 /** writes a list of all named ranges into the document.
130 <p>The first column of the list contains the names. The second
131 column contains the contents of the named ranges.</p>
133 @param aOutputPosition
134 specifies the top left cell of the output range.
136 void outputList( [in] com::sun::star::table::CellAddress aOutputPosition );
140 //=============================================================================
142 }; }; }; };
144 #endif