Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / sw / source / core / text / porftn.hxx
blob75b660f5cc0be0f336ce209bb31b02f081471e24
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _PORFTN_HXX
20 #define _PORFTN_HXX
22 #include "porfld.hxx"
24 class SwTxtFrm;
25 class SwTxtFtn;
27 /*************************************************************************
28 * class SwFtnPortion
29 *************************************************************************/
31 class SwFtnPortion : public SwFldPortion
33 SwTxtFrm *pFrm; // To be able to call RemoveFtn in the dtor
34 SwTxtFtn *pFtn;
35 KSHORT nOrigHeight;
36 // #i98418#
37 bool mbPreferredScriptTypeSet;
38 sal_uInt8 mnPreferredScriptType;
39 public:
40 SwFtnPortion( const XubString &rExpand, SwTxtFrm *pFrm, SwTxtFtn *pFtn,
41 KSHORT nOrig = KSHRT_MAX );
42 inline KSHORT& Orig() { return nOrigHeight; }
44 virtual void Paint( const SwTxtPaintInfo &rInf ) const;
45 virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
46 virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
47 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
49 // #i98418#
50 void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
52 const SwTxtFtn* GetTxtFtn() const { return pFtn; };
53 OUTPUT_OPERATOR
56 /*************************************************************************
57 * class SwFtnNumPortion
58 *************************************************************************/
60 class SwFtnNumPortion : public SwNumberPortion
62 public:
63 inline SwFtnNumPortion( const XubString &rExpand, SwFont *pFntL )
64 : SwNumberPortion( rExpand, pFntL, sal_True, sal_False, 0, false )
65 { SetWhichPor( POR_FTNNUM ); }
67 OUTPUT_OPERATOR
70 /*************************************************************************
71 * class SwQuoVadisPortion
72 *************************************************************************/
74 class SwQuoVadisPortion : public SwFldPortion
76 XubString aErgo;
77 public:
78 SwQuoVadisPortion( const XubString &rExp, const XubString& rStr );
79 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
80 virtual void Paint( const SwTxtPaintInfo &rInf ) const;
81 virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
83 inline void SetNumber( const XubString& rStr ) { aErgo = rStr; }
84 inline const XubString &GetQuoTxt() const { return aExpand; }
85 inline const XubString &GetContTxt() const { return aErgo; }
87 // Field cloner for SplitGlue
88 virtual SwFldPortion *Clone( const XubString &rExpand ) const;
90 // Accessibility: pass information about this portion to the PortionHandler
91 virtual void HandlePortion( SwPortionHandler& rPH ) const;
93 OUTPUT_OPERATOR
96 /*************************************************************************
97 * class SwErgoSumPortion
98 *************************************************************************/
100 class SwErgoSumPortion : public SwFldPortion
102 public:
103 SwErgoSumPortion( const XubString &rExp, const XubString& rStr );
104 virtual xub_StrLen GetCrsrOfst( const KSHORT nOfst ) const;
105 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
107 // Field cloner for SplitGlue
108 virtual SwFldPortion *Clone( const XubString &rExpand ) const;
109 OUTPUT_OPERATOR
112 CLASSIO( SwFtnPortion )
113 CLASSIO( SwFtnNumPortion )
114 CLASSIO( SwQuoVadisPortion )
115 CLASSIO( SwErgoSumPortion )
118 #endif
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */