1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
26 class SwSaveClip
; // SwTextPainter
28 class SwTaggedPDFHelper
;
30 class SwTextPainter
: public SwTextCursor
34 SwLinePortion
*CalcPaintOfst(const SwRect
&rPaint
, bool& rbSkippedNumPortions
);
35 void CheckSpecialUnderline( const SwLinePortion
* pPor
,
36 tools::Long nAdjustBaseLine
= 0 );
38 void CtorInitTextPainter( SwTextFrame
*pFrame
, SwTextPaintInfo
*pInf
);
39 explicit SwTextPainter(SwTextNode
const * pTextNode
)
40 : SwTextCursor(pTextNode
)
46 SwTextPainter(SwTextFrame
*pTextFrame
, SwTextPaintInfo
*pTextPaintInf
)
47 : SwTextCursor(pTextFrame
->GetTextNodeFirst())
49 CtorInitTextPainter( pTextFrame
, pTextPaintInf
);
51 void DrawTextLine( const SwRect
&rPaint
, SwSaveClip
&rClip
,
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
; }
63 SwTextPaintInfo
&GetInfo()
64 { return static_cast<SwTextPaintInfo
&>(SwTextIter::GetInfo()); }
65 const SwTextPaintInfo
&GetInfo() const
66 { return static_cast<const SwTextPaintInfo
&>(SwTextIter::GetInfo()); }
69 bool IsUnderlineBreak( const SwLinePortion
& rPor
, const SwFont
& rFnt
);
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */