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 SwTextFootnote;
25 
27 {
29  sal_uInt16 nOrigHeight;
30  // #i98418#
33 public:
34  SwFootnotePortion( const OUString &rExpand, SwTextFootnote *pFootnote,
35  sal_uInt16 nOrig = USHRT_MAX );
36  sal_uInt16& Orig() { return nOrigHeight; }
37 
38  virtual void Paint( const SwTextPaintInfo &rInf ) const override;
39  virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
40  virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override;
41  virtual bool Format( SwTextFormatInfo &rInf ) override;
42 
43  // #i98418#
44  void SetPreferredScriptType( SwFontScript nPreferredScriptType );
45 
46  const SwTextFootnote* GetTextFootnote() const { return pFootnote; };
47 };
48 
50 {
51 public:
52  SwFootnoteNumPortion( const OUString &rExpand, std::unique_ptr<SwFont> pFntL )
53  : SwNumberPortion( rExpand, std::move(pFntL), true, false, 0, false )
55 };
56 
64 {
65  OUString aErgo;
66 public:
67  SwQuoVadisPortion( const OUString &rExp, const OUString& rStr );
68  virtual bool Format( SwTextFormatInfo &rInf ) override;
69  virtual void Paint( const SwTextPaintInfo &rInf ) const override;
70  virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
71 
72  void SetNumber( const OUString& rStr ) { aErgo = rStr; }
73  const OUString& GetQuoText() const { return m_aExpand; }
74  const OUString &GetContText() const { return aErgo; }
75 
76  // Field cloner for SplitGlue
77  virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
78 
79  // Accessibility: pass information about this portion to the PortionHandler
80  virtual void HandlePortion( SwPortionHandler& rPH ) const override;
81 };
82 
90 {
91 public:
92  SwErgoSumPortion( const OUString &rExp, const OUString& rStr );
93  virtual TextFrameIndex GetCursorOfst(sal_uInt16 nOfst) const override;
94  virtual bool Format( SwTextFormatInfo &rInf ) override;
95 
96  // Field cloner for SplitGlue
97  virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
98 };
99 
100 #endif
101 
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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:46
const OUString & GetContText() const
Definition: porftn.hxx:74
const OUString & GetQuoText() const
Definition: porftn.hxx:73
bool mbPreferredScriptTypeSet
Definition: porftn.hxx:31
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: txtftn.cxx:1418
SwTextFootnote *const pFootnote
Definition: porftn.hxx:28
void SetNumber(const OUString &rStr)
Definition: porftn.hxx:72
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:93
SwFootnoteNumPortion(const OUString &rExpand, std::unique_ptr< SwFont > pFntL)
Definition: porftn.hxx:52
OUString m_aExpand
Definition: porfld.hxx:34
OUString aErgo
Definition: porftn.hxx:65
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:63
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:89
sal_uInt16 nOrigHeight
Definition: porftn.hxx:29
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: txtftn.cxx:1340
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:261
sal_uInt16 & Orig()
Definition: porftn.hxx:36
SwFontScript
Definition: swfont.hxx:119
SwFontScript mnPreferredScriptType
Definition: porftn.hxx:32
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