LCOV - code coverage report
Current view: top level - include/editeng - formatbreakitem.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 10 13 76.9 %
Date: 2015-06-13 12:38:46 Functions: 6 7 85.7 %
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 INCLUDED_EDITENG_FORMATBREAKITEM_HXX
      20             : #define INCLUDED_EDITENG_FORMATBREAKITEM_HXX
      21             : 
      22             : #include <svl/eitem.hxx>
      23             : #include <editeng/svxenum.hxx>
      24             : #include <editeng/editengdllapi.h>
      25             : 
      26             : 
      27             : // class SvxFormatBreakItem -------------------------------------------------
      28             : 
      29             : /*  [Description]
      30             : 
      31             :     This item Describes a wrap-attribute
      32             :     Automatic?, Page or column break, before or after?
      33             : */
      34             : #define FMTBREAK_NOAUTO ((sal_uInt16)0x0001)
      35             : 
      36        3547 : class EDITENG_DLLPUBLIC SvxFormatBreakItem : public SfxEnumItem
      37             : {
      38             : public:
      39             :     TYPEINFO_OVERRIDE();
      40             : 
      41             :     inline SvxFormatBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/,
      42             :                             const sal_uInt16 nWhich );
      43             :     inline SvxFormatBreakItem( const SvxFormatBreakItem& rBreak );
      44             :     inline SvxFormatBreakItem& operator=( const SvxFormatBreakItem& rCpy );
      45             : 
      46             :     // "pure virtual Methods" from SfxPoolItem
      47             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      48             :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      49             :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      50             : 
      51             :     virtual bool GetPresentation( SfxItemPresentation ePres,
      52             :                                     SfxMapUnit eCoreMetric,
      53             :                                     SfxMapUnit ePresMetric,
      54             :                                     OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
      55             :     virtual OUString    GetValueTextByPos( sal_uInt16 nPos ) const SAL_OVERRIDE;
      56             : 
      57             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      58             :     virtual SvStream&        Store( SvStream& , sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
      59             :     virtual sal_uInt16       GetVersion( sal_uInt16 nFileVersion ) const SAL_OVERRIDE;
      60             :     virtual SfxPoolItem*     Create( SvStream&, sal_uInt16 ) const SAL_OVERRIDE;
      61             :     virtual sal_uInt16       GetValueCount() const SAL_OVERRIDE;
      62             : 
      63             :     // MS VC4.0 messes things up
      64         697 :     void             SetValue( sal_uInt16 nNewVal )
      65         697 :                                 {SfxEnumItem::SetValue(nNewVal); }
      66      197980 :     SvxBreak             GetBreak() const { return SvxBreak( GetValue() ); }
      67             :     void                     SetBreak( const SvxBreak eNew )
      68             :                                 { SetValue( (sal_uInt16)eNew ); }
      69             : };
      70             : 
      71             : 
      72         692 : inline SvxFormatBreakItem::SvxFormatBreakItem( const SvxBreak eBreak,
      73             :                                          const sal_uInt16 _nWhich ) :
      74         692 :     SfxEnumItem( _nWhich, (sal_uInt16)eBreak )
      75         692 : {}
      76             : 
      77        1400 : inline SvxFormatBreakItem::SvxFormatBreakItem( const SvxFormatBreakItem& rBreak ) :
      78        1400 :     SfxEnumItem( rBreak )
      79        1400 : {}
      80             : 
      81           0 : inline SvxFormatBreakItem& SvxFormatBreakItem::operator=(
      82             :     const SvxFormatBreakItem& rBreak )
      83             : {
      84           0 :     SetValue( rBreak.GetValue() );
      85           0 :     return *this;
      86             : }
      87             : 
      88             : #endif
      89             : 
      90             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11