xref: /trunk/main/sw/source/core/layout/virtoutp.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 _VIRTOUTP_HXX
24 #define _VIRTOUTP_HXX
25 
26 #include <vcl/virdev.hxx>
27 
28 #include "swtypes.hxx"		// UCHAR
29 #include "swrect.hxx"		// SwRect
30 
31 class ViewShell;
32 #define VIRTUALHEIGHT 64
33 
34 /*************************************************************************
35  *						class SwTxtVout
36  *************************************************************************/
37 
38 class SwLayVout
39 {
40 	friend void _FrmFinit();	//loescht das Vout
41 private:
42 	ViewShell*		pSh;
43 	OutputDevice*	pOut;
44 	VirtualDevice*	pVirDev;
45 	SwRect			aRect;
46 	SwRect			aOrgRect;
47 	Size			aSize;
48 	sal_uInt16			nCount;
49 
50 	sal_Bool DoesFit( const Size &rOut );
51 
52 public:
SwLayVout()53     SwLayVout() : pSh(0), pOut(0), pVirDev(0), aSize(0, VIRTUALHEIGHT), nCount(0) {}
~SwLayVout()54 	~SwLayVout() { delete pVirDev; }
55 
56     /// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const>
57     void Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn );
Leave()58 	void Leave() { --nCount; Flush(); }
59 
SetOrgRect(SwRect & rRect)60 	void SetOrgRect( SwRect &rRect ) { aOrgRect = rRect; }
GetOrgRect() const61 	const SwRect& GetOrgRect() const { return aOrgRect; }
62 
IsFlushable()63 	sal_Bool IsFlushable() { return 0 != pOut; }
64 	void _Flush();
Flush()65 	void Flush() { if( pOut ) _Flush(); }
66 };
67 
68 
69 
70 #endif
71