LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/inc - fmtsrnd.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 12 13 92.3 %
Date: 2013-07-09 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 _FMTSRND_HXX
      20             : #define _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             : // SwFmtSurround: How document content under the frame shall behave.
      31        1740 : class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem
      32             : {
      33             :     sal_Bool    bAnchorOnly :1;
      34             :     sal_Bool    bContour    :1;
      35             :     sal_Bool    bOutside    :1;
      36             : public:
      37             :     SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL );
      38             :     SwFmtSurround( const SwFmtSurround & );
      39             :     inline SwFmtSurround &operator=( const SwFmtSurround &rCpy );
      40             : 
      41             :     // "Pure virtual Methods" of SfxPoolItem.
      42             :     virtual int             operator==( const SfxPoolItem& ) const;
      43             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      44             :     virtual sal_uInt16          GetValueCount() const;
      45             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      46             :                                     SfxMapUnit eCoreMetric,
      47             :                                     SfxMapUnit ePresMetric,
      48             :                                     OUString &rText,
      49             :                                     const IntlWrapper*    pIntl = 0 ) const;
      50             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      51             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      52             : 
      53             : 
      54        9220 :     SwSurround GetSurround()const { return SwSurround( GetValue() ); }
      55        2972 :     sal_Bool    IsAnchorOnly()  const { return bAnchorOnly; }
      56        3300 :     sal_Bool    IsContour()     const { return bContour; }
      57          12 :     sal_Bool    IsOutside()     const { return bOutside; }
      58           0 :     void    SetSurround  ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
      59          31 :     void    SetAnchorOnly( sal_Bool bNew )      { bAnchorOnly = bNew; }
      60          93 :     void    SetContour( sal_Bool bNew )         { bContour = bNew; }
      61          79 :     void    SetOutside( sal_Bool bNew )         { bOutside = bNew; }
      62             : };
      63             : 
      64             : inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
      65             : {
      66             :     bAnchorOnly = rCpy.IsAnchorOnly();
      67             :     bContour = rCpy.IsContour();
      68             :     bOutside = rCpy.IsOutside();
      69             :     SfxEnumItem::SetValue( rCpy.GetValue() );
      70             :     return *this;
      71             : }
      72             : 
      73       12535 : inline const SwFmtSurround &SwAttrSet::GetSurround(sal_Bool bInP) const
      74       12535 :     { return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
      75             : 
      76       12535 : inline const SwFmtSurround &SwFmt::GetSurround(sal_Bool bInP) const
      77       12535 :     { return aSet.GetSurround(bInP); }
      78             : 
      79             : #endif
      80             : 
      81             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10