update dev300-m58
[ooovba.git] / sw / source / core / text / itrpaint.hxx
blobc366ca7a65721a6fc5f94da5257f947ff9a63d76
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: itrpaint.hxx,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 ************************************************************************/
30 #ifndef _ITRPAINT_HXX
31 #define _ITRPAINT_HXX
32 #include "itrtxt.hxx"
34 class SwSaveClip; // SwTxtPainter
35 class SwMultiPortion;
37 /*************************************************************************
38 * class SwTxtPainter
39 *************************************************************************/
41 class SwTxtPainter : public SwTxtCursor
43 sal_Bool bPaintDrop;
45 SwLinePortion *CalcPaintOfst( const SwRect &rPaint );
46 void CheckSpecialUnderline( const SwLinePortion* pPor,
47 long nAdjustBaseLine = 0 );
48 protected:
49 void CtorInitTxtPainter( SwTxtFrm *pFrm, SwTxtPaintInfo *pInf );
50 inline SwTxtPainter(SwTxtNode* pTxtNode) : SwTxtCursor(pTxtNode) { }
52 public:
53 inline SwTxtPainter( SwTxtFrm *pTxtFrm, SwTxtPaintInfo *pTxtPaintInf ) : SwTxtCursor(pTxtFrm!=NULL?pTxtFrm->GetTxtNode():NULL)
54 { CtorInitTxtPainter( pTxtFrm, pTxtPaintInf ); }
55 void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
56 const sal_Bool bUnderSz );
57 void PaintDropPortion();
58 // if PaintMultiPortion is called recursively, we have to pass the
59 // surrounding SwBidiPortion
60 void PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti,
61 const SwMultiPortion* pEnvPor = 0 );
62 inline void SetPaintDrop( const sal_Bool bNew ) { bPaintDrop = bNew; }
63 inline sal_Bool IsPaintDrop() const { return bPaintDrop; }
64 inline SwTxtPaintInfo &GetInfo()
65 { return (SwTxtPaintInfo&)SwTxtIter::GetInfo(); }
66 inline const SwTxtPaintInfo &GetInfo() const
67 { return (const SwTxtPaintInfo&)SwTxtIter::GetInfo(); }
72 #endif