LCOV - code coverage report
Current view: top level - sw/source/core/text - porexp.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 8 8 100.0 %
Date: 2014-11-03 Functions: 9 10 90.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             : 
      20             : #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_POREXP_HXX
      21             : #define INCLUDED_SW_SOURCE_CORE_TEXT_POREXP_HXX
      22             : 
      23             : #include "portxt.hxx"
      24             : 
      25       24966 : class SwExpandPortion : public SwTxtPortion
      26             : {
      27             : public:
      28       24946 :     inline  SwExpandPortion() { SetWhichPor( POR_EXP ); }
      29             :     virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
      30             :     virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
      31             :     virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
      32             :     virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
      33             :     virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
      34             : 
      35             :     // Accessibility: pass information about this portion to the PortionHandler
      36             :     virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
      37             : 
      38             :     OUTPUT_OPERATOR_OVERRIDE
      39             : };
      40             : 
      41        2764 : class SwBlankPortion : public SwExpandPortion
      42             : {
      43             :     sal_Unicode cChar;
      44             :     bool bMulti;        // For multiportion brackets
      45             : public:
      46        1396 :     inline  SwBlankPortion( sal_Unicode cCh, bool bMult = false )
      47        1396 :         : cChar( cCh ), bMulti( bMult )
      48        1396 :         { cChar = cCh; SetLen(1); SetWhichPor( POR_BLANK ); }
      49             : 
      50             :     bool IsMulti() const { return bMulti; }
      51             :     void SetMulti( bool bNew ) { bMulti = bNew; }
      52             : 
      53             :     virtual SwLinePortion *Compress() SAL_OVERRIDE;
      54             :     virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
      55             :     virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
      56             :     virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
      57             :     virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
      58             :     sal_uInt16 MayUnderflow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx,
      59             :         bool bUnderflow ) const;
      60             : 
      61             :     // Accessibility: pass information about this portion to the PortionHandler
      62             :     virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
      63             : 
      64             :     OUTPUT_OPERATOR_OVERRIDE
      65             : };
      66             : 
      67         380 : class SwPostItsPortion : public SwExpandPortion
      68             : {
      69             :     bool    bScript;
      70             : public:
      71             :             SwPostItsPortion( bool bScrpt );
      72             :     virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
      73             :     virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
      74             :     virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
      75             :     virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
      76          32 :     bool IsScript() const { return bScript; }
      77             :     OUTPUT_OPERATOR_OVERRIDE
      78             : };
      79             : 
      80             : #endif
      81             : 
      82             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10