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
24#include <optional>
25
26class SwSaveClip; // SwTextPainter
27class SwMultiPortion;
29
31{
33
34 SwLinePortion *CalcPaintOfst(const SwRect &rPaint, bool& rbSkippedNumPortions);
35 void CheckSpecialUnderline( const SwLinePortion* pPor,
36 tools::Long nAdjustBaseLine = 0 );
37protected:
38 void CtorInitTextPainter( SwTextFrame *pFrame, SwTextPaintInfo *pInf );
39 explicit SwTextPainter(SwTextNode const * pTextNode)
40 : SwTextCursor(pTextNode)
41 , m_bPaintDrop(false)
42 {
43 }
44
45public:
46 SwTextPainter(SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf)
47 : SwTextCursor(pTextFrame->GetTextNodeFirst())
48 {
49 CtorInitTextPainter( pTextFrame, pTextPaintInf );
50 }
51 void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
52 const bool bUnderSz,
53 ::std::optional<SwTaggedPDFHelper> & roTaggedLabel,
54 ::std::optional<SwTaggedPDFHelper> & roTaggedParagraph,
55 bool isPDFTaggingEnabled);
56 void PaintDropPortion();
57 // if PaintMultiPortion is called recursively, we have to pass the
58 // surrounding SwBidiPortion
59 void PaintMultiPortion( const SwRect &rPaint, SwMultiPortion& rMulti,
60 const SwMultiPortion* pEnvPor = nullptr );
61 void SetPaintDrop( const bool bNew ) { m_bPaintDrop = bNew; }
62 bool IsPaintDrop() const { return m_bPaintDrop; }
64 { return static_cast<SwTextPaintInfo&>(SwTextIter::GetInfo()); }
65 const SwTextPaintInfo &GetInfo() const
66 { return static_cast<const SwTextPaintInfo&>(SwTextIter::GetInfo()); }
67};
68
69bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt );
70
71/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
Definition: swfont.hxx:135
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:168
SwTextInfo & GetInfo()
Definition: itrtxt.hxx:96
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
void DrawTextLine(const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz, ::std::optional< SwTaggedPDFHelper > &roTaggedLabel, ::std::optional< SwTaggedPDFHelper > &roTaggedParagraph, bool isPDFTaggingEnabled)
Definition: itrpaint.cxx:126
void PaintDropPortion()
Definition: txtdrop.cxx:651
SwTextPainter(SwTextNode const *pTextNode)
Definition: itrpaint.hxx:39
SwLinePortion * CalcPaintOfst(const SwRect &rPaint, bool &rbSkippedNumPortions)
Definition: itrpaint.cxx:73
void PaintMultiPortion(const SwRect &rPaint, SwMultiPortion &rMulti, const SwMultiPortion *pEnvPor=nullptr)
Definition: pormulti.cxx:1520
const SwTextPaintInfo & GetInfo() const
Definition: itrpaint.hxx:65
SwTextPaintInfo & GetInfo()
Definition: itrpaint.hxx:63
SwTextPainter(SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf)
Definition: itrpaint.hxx:46
bool IsPaintDrop() const
Definition: itrpaint.hxx:62
void CheckSpecialUnderline(const SwLinePortion *pPor, tools::Long nAdjustBaseLine=0)
Definition: itrpaint.cxx:581
void CtorInitTextPainter(SwTextFrame *pFrame, SwTextPaintInfo *pInf)
Definition: itrpaint.cxx:64
void SetPaintDrop(const bool bNew)
Definition: itrpaint.hxx:61
bool m_bPaintDrop
Definition: itrpaint.hxx:32
bool IsUnderlineBreak(const SwLinePortion &rPor, const SwFont &rFnt)
Definition: itrpaint.cxx:47
long Long