Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _PORFTN_HXX
29 : : #define _PORFTN_HXX
30 : :
31 : : #include "porfld.hxx"
32 : :
33 : : class SwTxtFrm;
34 : : class SwTxtFtn;
35 : :
36 : : /*************************************************************************
37 : : * class SwFtnPortion
38 : : *************************************************************************/
39 : :
40 [ - + ]: 284 : class SwFtnPortion : public SwFldPortion
41 : : {
42 : : SwTxtFrm *pFrm; // To be able to call RemoveFtn in the dtor
43 : : SwTxtFtn *pFtn;
44 : : KSHORT nOrigHeight;
45 : : // #i98418#
46 : : bool mbPreferredScriptTypeSet;
47 : : sal_uInt8 mnPreferredScriptType;
48 : : public:
49 : : SwFtnPortion( const XubString &rExpand, SwTxtFrm *pFrm, SwTxtFtn *pFtn,
50 : : KSHORT nOrig = KSHRT_MAX );
51 : 132 : inline KSHORT& Orig() { return nOrigHeight; }
52 : :
53 : : virtual void Paint( const SwTxtPaintInfo &rInf ) const;
54 : : virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
55 : : virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
56 : : virtual sal_Bool Format( SwTxtFormatInfo &rInf );
57 : :
58 : : // #i98418#
59 : : void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
60 : :
61 : 132 : const SwTxtFtn* GetTxtFtn() const { return pFtn; };
62 : : OUTPUT_OPERATOR
63 : : };
64 : :
65 : : /*************************************************************************
66 : : * class SwFtnNumPortion
67 : : *************************************************************************/
68 : :
69 [ - + ]: 256 : class SwFtnNumPortion : public SwNumberPortion
70 : : {
71 : : public:
72 : 128 : inline SwFtnNumPortion( const XubString &rExpand, SwFont *pFntL )
73 : 128 : : SwNumberPortion( rExpand, pFntL, sal_True, sal_False, 0, false )
74 : 128 : { SetWhichPor( POR_FTNNUM ); }
75 : :
76 : : OUTPUT_OPERATOR
77 : : };
78 : :
79 : : /*************************************************************************
80 : : * class SwQuoVadisPortion
81 : : *************************************************************************/
82 : :
83 [ # # ][ # # ]: 0 : class SwQuoVadisPortion : public SwFldPortion
84 : : {
85 : : XubString aErgo;
86 : : public:
87 : : SwQuoVadisPortion( const XubString &rExp, const XubString& rStr );
88 : : virtual sal_Bool Format( SwTxtFormatInfo &rInf );
89 : : virtual void Paint( const SwTxtPaintInfo &rInf ) const;
90 : : virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
91 : :
92 : 0 : inline void SetNumber( const XubString& rStr ) { aErgo = rStr; }
93 : 0 : inline const XubString &GetQuoTxt() const { return aExpand; }
94 : 0 : inline const XubString &GetContTxt() const { return aErgo; }
95 : :
96 : : // Field cloner for SplitGlue
97 : : virtual SwFldPortion *Clone( const XubString &rExpand ) const;
98 : :
99 : : // Accessibility: pass information about this portion to the PortionHandler
100 : : virtual void HandlePortion( SwPortionHandler& rPH ) const;
101 : :
102 : : OUTPUT_OPERATOR
103 : : };
104 : :
105 : : /*************************************************************************
106 : : * class SwErgoSumPortion
107 : : *************************************************************************/
108 : :
109 [ # # ]: 0 : class SwErgoSumPortion : public SwFldPortion
110 : : {
111 : : public:
112 : : SwErgoSumPortion( const XubString &rExp, const XubString& rStr );
113 : : virtual xub_StrLen GetCrsrOfst( const KSHORT nOfst ) const;
114 : : virtual sal_Bool Format( SwTxtFormatInfo &rInf );
115 : :
116 : : // Field cloner for SplitGlue
117 : : virtual SwFldPortion *Clone( const XubString &rExpand ) const;
118 : : OUTPUT_OPERATOR
119 : : };
120 : :
121 : : CLASSIO( SwFtnPortion )
122 : : CLASSIO( SwFtnNumPortion )
123 : : CLASSIO( SwQuoVadisPortion )
124 : : CLASSIO( SwErgoSumPortion )
125 : :
126 : :
127 : : #endif
128 : :
129 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|