Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / sw / source / core / text / itrpaint.hxx
blob12b95664ad4c8004a7b331a3ebbe9da7179c0c41
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _ITRPAINT_HXX
20 #define _ITRPAINT_HXX
21 #include "itrtxt.hxx"
23 class SwSaveClip; // SwTxtPainter
24 class SwMultiPortion;
26 /*************************************************************************
27 * class SwTxtPainter
28 *************************************************************************/
30 class SwTxtPainter : public SwTxtCursor
32 sal_Bool bPaintDrop;
34 SwLinePortion *CalcPaintOfst( const SwRect &rPaint );
35 void CheckSpecialUnderline( const SwLinePortion* pPor,
36 long nAdjustBaseLine = 0 );
37 protected:
38 void CtorInitTxtPainter( SwTxtFrm *pFrm, SwTxtPaintInfo *pInf );
39 inline SwTxtPainter(SwTxtNode* pTxtNode) : SwTxtCursor(pTxtNode) { }
41 public:
42 inline SwTxtPainter( SwTxtFrm *pTxtFrm, SwTxtPaintInfo *pTxtPaintInf ) : SwTxtCursor(pTxtFrm!=NULL?pTxtFrm->GetTxtNode():NULL)
43 { CtorInitTxtPainter( pTxtFrm, pTxtPaintInf ); }
44 void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
45 const sal_Bool bUnderSz );
46 void PaintDropPortion();
47 // if PaintMultiPortion is called recursively, we have to pass the
48 // surrounding SwBidiPortion
49 void PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti,
50 const SwMultiPortion* pEnvPor = 0 );
51 inline void SetPaintDrop( const sal_Bool bNew ) { bPaintDrop = bNew; }
52 inline sal_Bool IsPaintDrop() const { return bPaintDrop; }
53 inline SwTxtPaintInfo &GetInfo()
54 { return (SwTxtPaintInfo&)SwTxtIter::GetInfo(); }
55 inline const SwTxtPaintInfo &GetInfo() const
56 { return (const SwTxtPaintInfo&)SwTxtIter::GetInfo(); }
61 #endif
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */