1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_sheet_XSheetCellRangeContainer_idl__
25#define __com_sun_star_sheet_XSheetCellRangeContainer_idl__
26
27#ifndef __com_sun_star_sheet_XSheetCellRanges_idl__
28#include <com/sun/star/sheet/XSheetCellRanges.idl>
29#endif
30
31#ifndef __com_sun_star_table_CellRangeAddress_idl__
32#include <com/sun/star/table/CellRangeAddress.idl>
33#endif
34
35#ifndef __com_sun_star_container_NoSuchElementException_idl__
36#include <com/sun/star/container/NoSuchElementException.idl>
37#endif
38
39//=============================================================================
40
41module com {  module sun {  module star {  module sheet {
42
43//=============================================================================
44
45/** provides methods to access cell ranges in a collection via index and
46	to add and remove cell ranges.
47
48	@see com::sun::star::sheet::SheetCellRanges
49 */
50published interface XSheetCellRangeContainer: com::sun::star::sheet::XSheetCellRanges
51{
52	//-------------------------------------------------------------------------
53
54	/** adds the given range to the collection of cell ranges.
55
56		@param aCellRangeAddress
57			contains the address of the new range.
58
59		@param bMergeRanges
60			defines how the range should be added. To merge the ranges
61			takes more time, but the memory usage is lower.
62	 */
63	void addRangeAddress(
64			[in] com::sun::star::table::CellRangeAddress aCellRangeAddress,
65			[in] boolean bMergeRanges );
66
67	//-------------------------------------------------------------------------
68
69	/** removes the given range from the collection of cell ranges.
70
71		@param aCellRangeAddress
72			contains the address of the range to be removed.
73
74			<p>The specified range must fit exactly to an element of the
75			collection. The method does not try to shorten a range.</p>
76
77		@throws <type scope="com::sun::star::container">NoSuchElementException</type>
78			if the collection does not contain the specified range.
79	 */
80	void removeRangeAddress(
81			[in] com::sun::star::table::CellRangeAddress aCellRangeAddress )
82		raises( com::sun::star::container::NoSuchElementException );
83
84	//-------------------------------------------------------------------------
85
86	/** adds the given ranges to the collection of cell ranges.
87
88		@param aCellRangeAddresses
89			contains a sequence of addresses of all new ranges.
90
91		@param bMergeRanges
92			defines how the ranges should be added. To merge the ranges
93			takes more time, but the memory usage is lower.
94	 */
95	void addRangeAddresses(
96			[in] sequence<com::sun::star::table::CellRangeAddress> aCellRangeAddresses,
97			[in] boolean bMergeRanges );
98
99	//-------------------------------------------------------------------------
100
101	/** removes the given ranges from the collection of cell ranges.
102
103		@param aCellRangeAddresses
104			contains a sequence of addresses of all ranges to be removed.
105
106			<p>All specified ranges must fit exactly to elements of the
107			collection. The method does not try to shorten ranges.</p>
108
109		@throws <type scope="com::sun::star::container">NoSuchElementException</type>
110			if the collection does not contain any of the specified ranges.
111	 */
112	void removeRangeAddresses(
113			[in] sequence<com::sun::star::table::CellRangeAddress> aCellRangeAddresses )
114		raises( com::sun::star::container::NoSuchElementException);
115
116};
117
118//=============================================================================
119
120}; }; }; };
121
122#endif
123
124