LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/editeng - hyphenzoneitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 11 90.9 %
Date: 2013-07-09 Functions: 12 13 92.3 %
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 _SVX_HYZNITEM_HXX
      20             : #define _SVX_HYZNITEM_HXX
      21             : 
      22             : #include <svl/poolitem.hxx>
      23             : #include <editeng/editengdllapi.h>
      24             : 
      25             : class SvXMLUnitConverter;
      26             : 
      27             : // class SvxHyphenZoneItem -----------------------------------------------
      28             : 
      29             : /*  [Description]
      30             : 
      31             :     This item describes a hyphenation attribute  (automatic?, number of
      32             :     characters at the end of the line and start).
      33             : */
      34             : 
      35       12116 : class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem
      36             : {
      37             :     sal_Bool bHyphen:  1;
      38             :     sal_Bool bPageEnd: 1;
      39             :     sal_uInt8 nMinLead;
      40             :     sal_uInt8 nMinTrail;
      41             :     sal_uInt8 nMaxHyphens;
      42             : 
      43             :     friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & );
      44             : 
      45             : public:
      46             :     TYPEINFO();
      47             : 
      48             :     SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/,
      49             :                        const sal_uInt16 nId  );
      50             : 
      51             :     // "pure virtual Methods" from SfxPoolItem
      52             :     virtual int              operator==( const SfxPoolItem& ) const;
      53             :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      54             :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      55             : 
      56             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      57             :                                     SfxMapUnit eCoreMetric,
      58             :                                     SfxMapUnit ePresMetric,
      59             :                                     OUString &rText, const IntlWrapper * = 0 ) const;
      60             : 
      61             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const;
      62             :     virtual SfxPoolItem*     Create(SvStream &, sal_uInt16) const;
      63             :     virtual SvStream&        Store(SvStream &, sal_uInt16 nItemVersion ) const;
      64             : 
      65          17 :     inline void SetHyphen( const sal_Bool bNew ) { bHyphen = bNew; }
      66        7863 :     inline sal_Bool IsHyphen() const { return bHyphen; }
      67             : 
      68           0 :     inline void SetPageEnd( const sal_Bool bNew ) { bPageEnd = bNew; }
      69          41 :     inline sal_Bool IsPageEnd() const { return bPageEnd; }
      70             : 
      71         845 :     inline sal_uInt8 &GetMinLead() { return nMinLead; }
      72          47 :     inline sal_uInt8 GetMinLead() const { return nMinLead; }
      73             : 
      74         845 :     inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
      75          47 :     inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
      76             : 
      77          34 :     inline sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; }
      78       15237 :     inline sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; }
      79             : 
      80             :     inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew )
      81             :     {
      82             :         bHyphen = rNew.IsHyphen();
      83             :         bPageEnd = rNew.IsPageEnd();
      84             :         nMinLead = rNew.GetMinLead();
      85             :         nMinTrail = rNew.GetMinTrail();
      86             :         nMaxHyphens = rNew.GetMaxHyphens();
      87             :         return *this;
      88             :     }
      89             : };
      90             : 
      91             : #endif
      92             : 
      93             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10