LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/editeng - hyznitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 11 90.9 %
Date: 2012-08-25 Functions: 12 13 92.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           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 _SVX_HYZNITEM_HXX
      29                 :            : #define _SVX_HYZNITEM_HXX
      30                 :            : 
      31                 :            : #include <svl/poolitem.hxx>
      32                 :            : #include <editeng/editengdllapi.h>
      33                 :            : 
      34                 :            : class SvXMLUnitConverter;
      35                 :            : namespace rtl
      36                 :            : {
      37                 :            :     class OUString;
      38                 :            : }
      39                 :            : 
      40                 :            : // class SvxHyphenZoneItem -----------------------------------------------
      41                 :            : 
      42                 :            : /*  [Description]
      43                 :            : 
      44                 :            :     This item describes a hyphenation attribute  (automatic?, number of
      45                 :            :     characters at the end of the line and start).
      46                 :            : */
      47                 :            : 
      48         [ -  + ]:      19934 : class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem
      49                 :            : {
      50                 :            :     sal_Bool bHyphen:  1;
      51                 :            :     sal_Bool bPageEnd: 1;
      52                 :            :     sal_uInt8 nMinLead;
      53                 :            :     sal_uInt8 nMinTrail;
      54                 :            :     sal_uInt8 nMaxHyphens;
      55                 :            : 
      56                 :            :     friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & );
      57                 :            : 
      58                 :            : public:
      59                 :            :     TYPEINFO();
      60                 :            : 
      61                 :            :     SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/,
      62                 :            :                        const sal_uInt16 nId  );
      63                 :            : 
      64                 :            :     // "pure virtual Methods" from SfxPoolItem
      65                 :            :     virtual int              operator==( const SfxPoolItem& ) const;
      66                 :            :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      67                 :            :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      68                 :            : 
      69                 :            :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      70                 :            :                                     SfxMapUnit eCoreMetric,
      71                 :            :                                     SfxMapUnit ePresMetric,
      72                 :            :                                     String &rText, const IntlWrapper * = 0 ) const;
      73                 :            : 
      74                 :            :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const;
      75                 :            :     virtual SfxPoolItem*     Create(SvStream &, sal_uInt16) const;
      76                 :            :     virtual SvStream&        Store(SvStream &, sal_uInt16 nItemVersion ) const;
      77                 :            : 
      78                 :         30 :     inline void SetHyphen( const sal_Bool bNew ) { bHyphen = bNew; }
      79                 :      15026 :     inline sal_Bool IsHyphen() const { return bHyphen; }
      80                 :            : 
      81                 :          0 :     inline void SetPageEnd( const sal_Bool bNew ) { bPageEnd = bNew; }
      82                 :         78 :     inline sal_Bool IsPageEnd() const { return bPageEnd; }
      83                 :            : 
      84                 :       1483 :     inline sal_uInt8 &GetMinLead() { return nMinLead; }
      85                 :         96 :     inline sal_uInt8 GetMinLead() const { return nMinLead; }
      86                 :            : 
      87                 :       1483 :     inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
      88                 :         96 :     inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
      89                 :            : 
      90                 :         76 :     inline sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; }
      91                 :      29068 :     inline sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; }
      92                 :            : 
      93                 :            :     inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew )
      94                 :            :     {
      95                 :            :         bHyphen = rNew.IsHyphen();
      96                 :            :         bPageEnd = rNew.IsPageEnd();
      97                 :            :         nMinLead = rNew.GetMinLead();
      98                 :            :         nMinTrail = rNew.GetMinTrail();
      99                 :            :         nMaxHyphens = rNew.GetMaxHyphens();
     100                 :            :         return *this;
     101                 :            :     }
     102                 :            : };
     103                 :            : 
     104                 :            : #endif
     105                 :            : 
     106                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10