xref: /trunk/main/sw/inc/swregion.hxx (revision 1d2dbeb0)
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 #ifndef _SWREGION_HXX
24 #define _SWREGION_HXX
25 
26 #include <svl/svarray.hxx>
27 
28 #include "swrect.hxx"
29 
30 SV_DECL_VARARR( SwRects, SwRect, 20, 8 )
31 
32 class SwRegionRects : public SwRects
33 {
34 	SwRect aOrigin;	// die Kopie des StartRects
35 
36 	inline void InsertRect( const SwRect &rRect, const sal_uInt16 nPos, sal_Bool &rDel);
37 
38 public:
39 	SwRegionRects( const SwRect& rStartRect, sal_uInt16 nInit = 20,
40 											 sal_uInt16 nGrow = 8 );
41 	// Zum Ausstanzen aus aOrigin.
42 	void operator-=( const SwRect& rRect );
43 
44 	// Aus Loechern werden Flaechen, aus Flaechen werden Loecher.
45 	void Invert();
46 	// Benachbarte Rechtecke zusammenfassen.
47 	void Compress( sal_Bool bFuzzy = sal_True );
48 
GetOrigin() const49 	inline const SwRect &GetOrigin() const { return aOrigin; }
ChangeOrigin(const SwRect & rRect)50 	inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; }
51 };
52 
53 #endif	//_SWREGION_HXX
54