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