update dev300-m58
[ooovba.git] / sw / source / core / text / porftn.hxx
blobc25b86574ffb751a8939571856ded069e6937d67
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: porftn.hxx,v $
10 * $Revision: 1.12 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _PORFTN_HXX
31 #define _PORFTN_HXX
33 #include "porfld.hxx"
35 class SwTxtFrm;
36 class SwTxtFtn;
38 /*************************************************************************
39 * class SwFtnPortion
40 *************************************************************************/
42 class SwFtnPortion : public SwFldPortion
44 SwTxtFrm *pFrm; // um im Dtor RemoveFtn rufen zu koennen.
45 SwTxtFtn *pFtn;
46 KSHORT nOrigHeight;
47 // --> OD 2009-01-29 #i98418#
48 bool mbPreferredScriptTypeSet;
49 BYTE mnPreferredScriptType;
50 // <--
51 public:
52 SwFtnPortion( const XubString &rExpand, SwTxtFrm *pFrm, SwTxtFtn *pFtn,
53 KSHORT nOrig = KSHRT_MAX );
54 inline KSHORT& Orig() { return nOrigHeight; }
56 virtual void Paint( const SwTxtPaintInfo &rInf ) const;
57 virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
58 virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
59 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
61 // --> OD 2009-01-29 #i98418#
62 void SetPreferredScriptType( BYTE nPreferredScriptType );
63 // <--
65 const SwTxtFtn* GetTxtFtn() const { return pFtn; };
66 OUTPUT_OPERATOR
69 /*************************************************************************
70 * class SwFtnNumPortion
71 *************************************************************************/
73 class SwFtnNumPortion : public SwNumberPortion
75 public:
76 inline SwFtnNumPortion( const XubString &rExpand, SwFont *pFntL )
77 // --> OD 2008-01-23 #newlistlevelattrs#
78 : SwNumberPortion( rExpand, pFntL, sal_True, sal_False, 0, false )
79 // <--
80 { SetWhichPor( POR_FTNNUM ); }
82 OUTPUT_OPERATOR
85 /*************************************************************************
86 * class SwQuoVadisPortion
87 *************************************************************************/
89 class SwQuoVadisPortion : public SwFldPortion
91 XubString aErgo;
92 public:
93 SwQuoVadisPortion( const XubString &rExp, const XubString& rStr );
94 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
95 virtual void Paint( const SwTxtPaintInfo &rInf ) const;
96 virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
98 inline void SetNumber( const XubString& rStr ) { aErgo = rStr; }
99 inline const XubString &GetQuoTxt() const { return aExpand; }
100 inline const XubString &GetContTxt() const { return aErgo; }
102 // Felder-Cloner fuer SplitGlue
103 virtual SwFldPortion *Clone( const XubString &rExpand ) const;
105 // Accessibility: pass information about this portion to the PortionHandler
106 virtual void HandlePortion( SwPortionHandler& rPH ) const;
108 OUTPUT_OPERATOR
111 /*************************************************************************
112 * class SwErgoSumPortion
113 *************************************************************************/
115 class SwErgoSumPortion : public SwFldPortion
117 public:
118 SwErgoSumPortion( const XubString &rExp, const XubString& rStr );
119 virtual xub_StrLen GetCrsrOfst( const KSHORT nOfst ) const;
120 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
122 // Felder-Cloner fuer SplitGlue
123 virtual SwFldPortion *Clone( const XubString &rExpand ) const;
124 OUTPUT_OPERATOR
127 CLASSIO( SwFtnPortion )
128 CLASSIO( SwFtnNumPortion )
129 CLASSIO( SwQuoVadisPortion )
130 CLASSIO( SwErgoSumPortion )
133 #endif