LibreOffice Module sw (master) 1
porftn.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 <sal/config.h>
23
24#include <string_view>
25
26#include "porfld.hxx"
27
28class SwTextFootnote;
29
31{
33 sal_uInt16 m_nOrigHeight;
34 // #i98418#
37public:
38 SwFootnotePortion( const OUString &rExpand, SwTextFootnote *pFootnote,
39 sal_uInt16 nOrig = USHRT_MAX );
40 sal_uInt16& Orig() { return m_nOrigHeight; }
41
42 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
43 virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
44 virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override;
45 virtual bool Format( SwTextFormatInfo &rInf ) override;
46
47 // #i98418#
48 void SetPreferredScriptType( SwFontScript nPreferredScriptType );
49
50 const SwTextFootnote* GetTextFootnote() const { return m_pFootnote; };
51};
52
54{
55public:
56 SwFootnoteNumPortion( const OUString &rExpand, std::unique_ptr<SwFont> pFntL )
57 : SwNumberPortion( rExpand, std::move(pFntL), true, false, 0, false )
59};
60
68{
69 OUString m_aErgo;
70public:
71 SwQuoVadisPortion( const OUString &rExp, OUString aStr );
72 virtual bool Format( SwTextFormatInfo &rInf ) override;
73 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
74 virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
75
76 void SetNumber( const OUString& rStr ) { m_aErgo = rStr; }
77 const OUString& GetQuoText() const { return m_aExpand; }
78 const OUString &GetContText() const { return m_aErgo; }
79
80 // Field cloner for SplitGlue
81 virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
82
83 // Accessibility: pass information about this portion to the PortionHandler
84 virtual void HandlePortion( SwPortionHandler& rPH ) const override;
85};
86
94{
95public:
96 SwErgoSumPortion( const OUString &rExp, std::u16string_view rStr );
97 virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) const override;
98 virtual bool Format( SwTextFormatInfo &rInf ) override;
99
100 // Field cloner for SplitGlue
101 virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
102};
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Used in footnotes if they break across pages, follow starts with this portion.
Definition: porftn.hxx:94
SwErgoSumPortion(const OUString &rExp, std::u16string_view rStr)
Definition: txtftn.cxx:1513
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: txtftn.cxx:1529
virtual SwFieldPortion * Clone(const OUString &rExpand) const override
Definition: txtftn.cxx:1508
virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) const override
the parameter is actually SwTwips apparently?
Definition: txtftn.cxx:1524
OUString m_aExpand
Definition: porfld.hxx:38
SwFootnoteNumPortion(const OUString &rExpand, std::unique_ptr< SwFont > pFntL)
Definition: porftn.hxx:56
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: txtftn.cxx:1398
SwFontScript mnPreferredScriptType
Definition: porftn.hxx:36
virtual SwPosSize GetTextSize(const SwTextSizeInfo &rInfo) const override
Definition: txtftn.cxx:1426
SwTextFootnote * m_pFootnote
Definition: porftn.hxx:32
void SetPreferredScriptType(SwFontScript nPreferredScriptType)
Definition: txtftn.cxx:1435
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: txtftn.cxx:1417
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const override
Definition: txtftn.cxx:1392
bool mbPreferredScriptTypeSet
Definition: porftn.hxx:35
SwFootnotePortion(const OUString &rExpand, SwTextFootnote *pFootnote, sal_uInt16 nOrig=USHRT_MAX)
Definition: txtftn.cxx:1379
const SwTextFootnote * GetTextFootnote() const
Definition: porftn.hxx:50
sal_uInt16 m_nOrigHeight
Definition: porftn.hxx:33
sal_uInt16 & Orig()
Definition: porftn.hxx:40
void SetWhichPor(const PortionType nNew)
Definition: porlin.hxx:101
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
Used in footnotes if they break across pages, master has this portion at the end.
Definition: porftn.hxx:68
const OUString & GetContText() const
Definition: porftn.hxx:78
OUString m_aErgo
Definition: porftn.hxx:69
virtual void HandlePortion(SwPortionHandler &rPH) const override
Definition: txtftn.cxx:1490
const OUString & GetQuoText() const
Definition: porftn.hxx:77
void SetNumber(const OUString &rStr)
Definition: porftn.hxx:76
virtual SwFieldPortion * Clone(const OUString &rExpand) const override
Definition: txtftn.cxx:1441
SwQuoVadisPortion(const OUString &rExp, OUString aStr)
Definition: txtftn.cxx:1446
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const override
Definition: txtftn.cxx:1480
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: txtftn.cxx:1453
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: txtftn.cxx:1495
SwTextAttr subclass for footnotes and endnotes.
Definition: txtftn.hxx:34
SwFontScript
Definition: swfont.hxx:124