LCOV - code coverage report
Current view: top level - sw/inc - fmtsrnd.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 12 13 92.3 %
Date: 2015-06-13 12:38:46 Functions: 11 12 91.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_SW_INC_FMTSRND_HXX
      20             : #define INCLUDED_SW_INC_FMTSRND_HXX
      21             : 
      22             : #include "swdllapi.h"
      23             : #include <hintids.hxx>
      24             : #include <format.hxx>
      25             : #include <svl/eitem.hxx>
      26             : 
      27             : #include <fmtsrndenum.hxx>
      28             : class IntlWrapper;
      29             : 
      30             : // SwFormatSurround: How document content under the frame shall behave.
      31       15436 : class SW_DLLPUBLIC SwFormatSurround: public SfxEnumItem
      32             : {
      33             :     bool    bAnchorOnly :1;
      34             :     bool    bContour    :1;
      35             :     bool    bOutside    :1;
      36             : public:
      37             :     SwFormatSurround( SwSurround eNew = SURROUND_PARALLEL );
      38             :     SwFormatSurround( const SwFormatSurround & );
      39             :     inline SwFormatSurround &operator=( const SwFormatSurround &rCpy );
      40             : 
      41             :     // "Pure virtual Methods" of SfxPoolItem.
      42             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      43             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
      44             :     virtual sal_uInt16          GetValueCount() const SAL_OVERRIDE;
      45             :     virtual bool GetPresentation( SfxItemPresentation ePres,
      46             :                                     SfxMapUnit eCoreMetric,
      47             :                                     SfxMapUnit ePresMetric,
      48             :                                     OUString &rText,
      49             :                                     const IntlWrapper*    pIntl = 0 ) const SAL_OVERRIDE;
      50             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      51             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      52             : 
      53      625915 :     SwSurround GetSurround()const { return SwSurround( GetValue() ); }
      54      165762 :     bool    IsAnchorOnly()  const { return bAnchorOnly; }
      55       12096 :     bool    IsContour()     const { return bContour; }
      56          80 :     bool    IsOutside()     const { return bOutside; }
      57           0 :     void    SetSurround  ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
      58         285 :     void    SetAnchorOnly( bool bNew )      { bAnchorOnly = bNew; }
      59        1205 :     void    SetContour( bool bNew )         { bContour = bNew; }
      60         200 :     void    SetOutside( bool bNew )         { bOutside = bNew; }
      61             : 
      62             :     void dumpAsXml(struct _xmlTextWriter* pWriter) const SAL_OVERRIDE;
      63             : };
      64             : 
      65             : inline SwFormatSurround &SwFormatSurround::operator=( const SwFormatSurround &rCpy )
      66             : {
      67             :     bAnchorOnly = rCpy.IsAnchorOnly();
      68             :     bContour = rCpy.IsContour();
      69             :     bOutside = rCpy.IsOutside();
      70             :     SfxEnumItem::SetValue( rCpy.GetValue() );
      71             :     return *this;
      72             : }
      73             : 
      74      743234 : inline const SwFormatSurround &SwAttrSet::GetSurround(bool bInP) const
      75      743234 :     { return static_cast<const SwFormatSurround&>(Get( RES_SURROUND,bInP)); }
      76             : 
      77      743234 : inline const SwFormatSurround &SwFormat::GetSurround(bool bInP) const
      78      743234 :     { return m_aSet.GetSurround(bInP); }
      79             : 
      80             : #endif
      81             : 
      82             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11