LibreOffice Module sw (master) 1
itrpaint.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "itrtxt.hxx"
23
24class SwSaveClip; // SwTextPainter
25class SwMultiPortion;
26
28{
30
31 SwLinePortion *CalcPaintOfst( const SwRect &rPaint );
32 void CheckSpecialUnderline( const SwLinePortion* pPor,
33 tools::Long nAdjustBaseLine = 0 );
34protected:
35 void CtorInitTextPainter( SwTextFrame *pFrame, SwTextPaintInfo *pInf );
36 explicit SwTextPainter(SwTextNode const * pTextNode)
37 : SwTextCursor(pTextNode)
38 , m_bPaintDrop(false)
39 {
40 }
41
42public:
43 SwTextPainter(SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf)
44 : SwTextCursor(pTextFrame->GetTextNodeFirst())
45 {
46 CtorInitTextPainter( pTextFrame, pTextPaintInf );
47 }
48 void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
49 const bool bUnderSz );
50 void PaintDropPortion();
51 // if PaintMultiPortion is called recursively, we have to pass the
52 // surrounding SwBidiPortion
53 void PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti,
54 const SwMultiPortion* pEnvPor = nullptr );
55 void SetPaintDrop( const bool bNew ) { m_bPaintDrop = bNew; }
56 bool IsPaintDrop() const { return m_bPaintDrop; }
58 { return static_cast<SwTextPaintInfo&>(SwTextIter::GetInfo()); }
59 const SwTextPaintInfo &GetInfo() const
60 { return static_cast<const SwTextPaintInfo&>(SwTextIter::GetInfo()); }
61};
62
63bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt );
64
65/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class for anything that can be part of a line in the Writer layout.
Definition: porlin.hxx:52
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:165
SwTextInfo & GetInfo()
Definition: itrtxt.hxx:96
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:111
SwLinePortion * CalcPaintOfst(const SwRect &rPaint)
Definition: itrpaint.cxx:72
void DrawTextLine(const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz)
Definition: itrpaint.cxx:120
void PaintDropPortion()
Definition: txtdrop.cxx:651
SwTextPainter(SwTextNode const *pTextNode)
Definition: itrpaint.hxx:36
void PaintMultiPortion(const SwRect &rPaint, SwMultiPortion &rMulti, const SwMultiPortion *pEnvPor=nullptr)
Definition: pormulti.cxx:1520
const SwTextPaintInfo & GetInfo() const
Definition: itrpaint.hxx:59
SwTextPaintInfo & GetInfo()
Definition: itrpaint.hxx:57
SwTextPainter(SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf)
Definition: itrpaint.hxx:43
bool IsPaintDrop() const
Definition: itrpaint.hxx:56
void CheckSpecialUnderline(const SwLinePortion *pPor, tools::Long nAdjustBaseLine=0)
Definition: itrpaint.cxx:502
void CtorInitTextPainter(SwTextFrame *pFrame, SwTextPaintInfo *pInf)
Definition: itrpaint.cxx:63
void SetPaintDrop(const bool bNew)
Definition: itrpaint.hxx:55
bool m_bPaintDrop
Definition: itrpaint.hxx:29
bool IsUnderlineBreak(const SwLinePortion &rPor, const SwFont &rFnt)
Definition: itrpaint.cxx:46
long Long