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 #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_PORFTN_HXX
20 #define INCLUDED_SW_SOURCE_CORE_TEXT_PORFTN_HXX
21 
22 #include "porfld.hxx"
23 
24 class SwTextFrame;
25 class SwTextFootnote;
26 
28 {
30  sal_uInt16 nOrigHeight;
31  // #i98418#
34 public:
35  SwFootnotePortion( const OUString &rExpand, SwTextFootnote *pFootnote,
36  sal_uInt16 nOrig = USHRT_MAX );
37  sal_uInt16& Orig() { return nOrigHeight; }
38 
39  virtual void Paint( const SwTextPaintInfo &rInf ) const override;
40  virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
41  virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override;
42  virtual bool Format( SwTextFormatInfo &rInf ) override;
43 
44  // #i98418#
45  void SetPreferredScriptType( SwFontScript nPreferredScriptType );
46 
47  const SwTextFootnote* GetTextFootnote() const { return pFootnote; };
48 };
49 
51 {
52 public:
53  SwFootnoteNumPortion( const OUString &rExpand, std::unique_ptr<SwFont> pFntL )
54  : SwNumberPortion( rExpand, std::move(pFntL), true, false, 0, false )
56 };
57 
65 {
66  OUString aErgo;
67 public:
68  SwQuoVadisPortion( const OUString &rExp, const OUString& rStr );
69  virtual bool Format( SwTextFormatInfo &rInf ) override;
70  virtual void Paint( const SwTextPaintInfo &rInf ) const override;
71  virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
72 
73  void SetNumber( const OUString& rStr ) { aErgo = rStr; }
74  const OUString& GetQuoText() const { return m_aExpand; }
75  const OUString &GetContText() const { return aErgo; }
76 
77  // Field cloner for SplitGlue
78  virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
79 
80  // Accessibility: pass information about this portion to the PortionHandler
81  virtual void HandlePortion( SwPortionHandler& rPH ) const override;
82 };
83 
91 {
92 public:
93  SwErgoSumPortion( const OUString &rExp, const OUString& rStr );
94  virtual TextFrameIndex GetCursorOfst(sal_uInt16 nOfst) const override;
95  virtual bool Format( SwTextFormatInfo &rInf ) override;
96 
97  // Field cloner for SplitGlue
98  virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
99 };
100 
101 #endif
102 
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
virtual SwFieldPortion * Clone(const OUString &rExpand) const override
Definition: txtftn.cxx:1431
virtual void HandlePortion(SwPortionHandler &rPH) const override
Definition: txtftn.cxx:1413
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: txtftn.cxx:1321
const SwTextFootnote * GetTextFootnote() const
Definition: porftn.hxx:47
const OUString & GetContText() const
Definition: porftn.hxx:75
const OUString & GetQuoText() const
Definition: porftn.hxx:74
bool mbPreferredScriptTypeSet
Definition: porftn.hxx:32
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: txtftn.cxx:1418
SwTextFootnote *const pFootnote
Definition: porftn.hxx:29
void SetNumber(const OUString &rStr)
Definition: porftn.hxx:73
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const override
Definition: txtftn.cxx:1315
virtual SwFieldPortion * Clone(const OUString &rExpand) const override
Definition: txtftn.cxx:1364
void SetPreferredScriptType(SwFontScript nPreferredScriptType)
Definition: txtftn.cxx:1358
SwQuoVadisPortion(const OUString &rExp, const OUString &rStr)
Definition: txtftn.cxx:1369
void SetWhichPor(const PortionType nNew)
Definition: porlin.hxx:96
SwFootnoteNumPortion(const OUString &rExpand, std::unique_ptr< SwFont > pFntL)
Definition: porftn.hxx:53
OUString m_aExpand
Definition: porfld.hxx:36
OUString aErgo
Definition: porftn.hxx:66
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const override
Definition: txtftn.cxx:1403
Used in footnotes if they break across pages, master has this portion at the end. ...
Definition: porftn.hxx:64
virtual TextFrameIndex GetCursorOfst(sal_uInt16 nOfst) const override
the parameter is actually SwTwips apparently?
Definition: txtftn.cxx:1447
virtual SwPosSize GetTextSize(const SwTextSizeInfo &rInfo) const override
Definition: txtftn.cxx:1349
Used in footnotes if they break across pages, follow starts with this portion.
Definition: porftn.hxx:90
sal_uInt16 nOrigHeight
Definition: porftn.hxx:30
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: txtftn.cxx:1340
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:259
sal_uInt16 & Orig()
Definition: porftn.hxx:37
SwFontScript
Definition: swfont.hxx:119
SwFontScript mnPreferredScriptType
Definition: porftn.hxx:33
SwFootnotePortion(const OUString &rExpand, SwTextFootnote *pFootnote, sal_uInt16 nOrig=USHRT_MAX)
Definition: txtftn.cxx:1302
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: txtftn.cxx:1376
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: txtftn.cxx:1452
SwErgoSumPortion(const OUString &rExp, const OUString &rStr)
Definition: txtftn.cxx:1436