LCOV - code coverage report
Current view: top level - libreoffice/sw/source/core/text - porftn.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 12 58.3 %
Date: 2012-12-27 Functions: 7 14 50.0 %
Legend: Lines: hit not hit

          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 _PORFTN_HXX
      20             : #define _PORFTN_HXX
      21             : 
      22             : #include "porfld.hxx"
      23             : 
      24             : class SwTxtFrm;
      25             : class SwTxtFtn;
      26             : 
      27             : /*************************************************************************
      28             :  *                      class SwFtnPortion
      29             :  *************************************************************************/
      30             : 
      31          10 : class SwFtnPortion : public SwFldPortion
      32             : {
      33             :     SwTxtFtn *pFtn;
      34             :     KSHORT nOrigHeight;
      35             :     // #i98418#
      36             :     bool mbPreferredScriptTypeSet;
      37             :     sal_uInt8 mnPreferredScriptType;
      38             : public:
      39             :     SwFtnPortion( const XubString &rExpand, SwTxtFtn *pFtn,
      40             :                   KSHORT nOrig = KSHRT_MAX );
      41           5 :     inline KSHORT& Orig() { return nOrigHeight; }
      42             : 
      43             :     virtual void Paint( const SwTxtPaintInfo &rInf ) const;
      44             :     virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
      45             :     virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
      46             :     virtual sal_Bool Format( SwTxtFormatInfo &rInf );
      47             : 
      48             :     // #i98418#
      49             :     void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
      50             : 
      51           5 :     const SwTxtFtn* GetTxtFtn() const { return pFtn; };
      52             :     OUTPUT_OPERATOR
      53             : };
      54             : 
      55             : /*************************************************************************
      56             :  *                      class SwFtnNumPortion
      57             :  *************************************************************************/
      58             : 
      59          10 : class SwFtnNumPortion : public SwNumberPortion
      60             : {
      61             : public:
      62           5 :     inline SwFtnNumPortion( const XubString &rExpand, SwFont *pFntL )
      63           5 :          : SwNumberPortion( rExpand, pFntL, sal_True, sal_False, 0, false )
      64           5 :          { SetWhichPor( POR_FTNNUM ); }
      65             : 
      66             :     OUTPUT_OPERATOR
      67             : };
      68             : 
      69             : /*************************************************************************
      70             :  *                      class SwQuoVadisPortion
      71             :  *************************************************************************/
      72             : 
      73           0 : class SwQuoVadisPortion : public SwFldPortion
      74             : {
      75             :     XubString   aErgo;
      76             : public:
      77             :             SwQuoVadisPortion( const XubString &rExp, const XubString& rStr );
      78             :     virtual sal_Bool Format( SwTxtFormatInfo &rInf );
      79             :     virtual void Paint( const SwTxtPaintInfo &rInf ) const;
      80             :     virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
      81             : 
      82           0 :     inline void SetNumber( const XubString& rStr ) { aErgo = rStr; }
      83           0 :     inline const XubString &GetQuoTxt() const { return aExpand; }
      84           0 :     inline const XubString &GetContTxt() const { return aErgo; }
      85             : 
      86             :     // Field cloner for SplitGlue
      87             :     virtual SwFldPortion *Clone( const XubString &rExpand ) const;
      88             : 
      89             :     // Accessibility: pass information about this portion to the PortionHandler
      90             :     virtual void HandlePortion( SwPortionHandler& rPH ) const;
      91             : 
      92             :     OUTPUT_OPERATOR
      93             : };
      94             : 
      95             : /*************************************************************************
      96             :  *                      class SwErgoSumPortion
      97             :  *************************************************************************/
      98             : 
      99           0 : class SwErgoSumPortion : public SwFldPortion
     100             : {
     101             : public:
     102             :             SwErgoSumPortion( const XubString &rExp, const XubString& rStr );
     103             :     virtual xub_StrLen GetCrsrOfst( const KSHORT nOfst ) const;
     104             :     virtual sal_Bool Format( SwTxtFormatInfo &rInf );
     105             : 
     106             :     // Field cloner for SplitGlue
     107             :     virtual SwFldPortion *Clone( const XubString &rExpand ) const;
     108             :     OUTPUT_OPERATOR
     109             : };
     110             : 
     111             : CLASSIO( SwFtnPortion )
     112             : CLASSIO( SwFtnNumPortion )
     113             : CLASSIO( SwQuoVadisPortion )
     114             : CLASSIO( SwErgoSumPortion )
     115             : 
     116             : 
     117             : #endif
     118             : 
     119             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10