Line data Source code
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 SwTxtFrm;
25 : class SwTxtFtn;
26 :
27 556 : class SwFtnPortion : public SwFldPortion
28 : {
29 : SwTxtFtn *pFtn;
30 : sal_uInt16 nOrigHeight;
31 : // #i98418#
32 : bool mbPreferredScriptTypeSet;
33 : sal_uInt8 mnPreferredScriptType;
34 : public:
35 : SwFtnPortion( const OUString &rExpand, SwTxtFtn *pFtn,
36 : sal_uInt16 nOrig = USHRT_MAX );
37 242 : sal_uInt16& Orig() { return nOrigHeight; }
38 :
39 : virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
40 : virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
41 : virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
42 : virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
43 :
44 : // #i98418#
45 : void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
46 :
47 268 : const SwTxtFtn* GetTxtFtn() const { return pFtn; };
48 : OUTPUT_OPERATOR_OVERRIDE
49 : };
50 :
51 472 : class SwFtnNumPortion : public SwNumberPortion
52 : {
53 : public:
54 236 : SwFtnNumPortion( const OUString &rExpand, SwFont *pFntL )
55 236 : : SwNumberPortion( rExpand, pFntL, true, false, 0, false )
56 236 : { SetWhichPor( POR_FTNNUM ); }
57 :
58 : OUTPUT_OPERATOR_OVERRIDE
59 : };
60 :
61 0 : class SwQuoVadisPortion : public SwFldPortion
62 : {
63 : OUString aErgo;
64 : public:
65 : SwQuoVadisPortion( const OUString &rExp, const OUString& rStr );
66 : virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
67 : virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
68 : virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
69 :
70 0 : void SetNumber( const OUString& rStr ) { aErgo = rStr; }
71 0 : const OUString GetQuoTxt() const { return aExpand; }
72 0 : const OUString &GetContTxt() const { return aErgo; }
73 :
74 : // Field cloner for SplitGlue
75 : virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
76 :
77 : // Accessibility: pass information about this portion to the PortionHandler
78 : virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
79 :
80 : OUTPUT_OPERATOR_OVERRIDE
81 : };
82 :
83 0 : class SwErgoSumPortion : public SwFldPortion
84 : {
85 : public:
86 : SwErgoSumPortion( const OUString &rExp, const OUString& rStr );
87 : virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
88 : virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
89 :
90 : // Field cloner for SplitGlue
91 : virtual SwFldPortion *Clone( const OUString &rExpand ) const SAL_OVERRIDE;
92 : OUTPUT_OPERATOR_OVERRIDE
93 : };
94 :
95 : #endif
96 :
97 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|