LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/editeng - shaditem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 12 58.3 %
Date: 2012-12-27 Functions: 9 10 90.0 %
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_SHADITEM_HXX
      20             : #define _SVX_SHADITEM_HXX
      21             : 
      22             : #include <tools/color.hxx>
      23             : #include <svl/eitem.hxx>
      24             : #include <editeng/svxenum.hxx>
      25             : #include <editeng/editengdllapi.h>
      26             : 
      27             : namespace rtl
      28             : {
      29             :     class OUString;
      30             : }
      31             : 
      32             : // class SvxShadowItem ---------------------------------------------------
      33             : 
      34             : /*  [Description]
      35             : 
      36             :     This item describes the shadow attribute (color, width and position).
      37             : */
      38             : 
      39             : #define SHADOW_TOP      ((sal_uInt16)0)
      40             : #define SHADOW_BOTTOM   ((sal_uInt16)1)
      41             : #define SHADOW_LEFT     ((sal_uInt16)2)
      42             : #define SHADOW_RIGHT    ((sal_uInt16)3)
      43             : 
      44         333 : class EDITENG_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface
      45             : {
      46             :     Color               aShadowColor;
      47             :     sal_uInt16              nWidth;
      48             :     SvxShadowLocation   eLocation;
      49             : public:
      50             :     TYPEINFO();
      51             : 
      52             :     explicit SvxShadowItem( const sal_uInt16 nId ,
      53             :                  const Color *pColor = 0, const sal_uInt16 nWidth = 100 /*5pt*/,
      54             :                  const SvxShadowLocation eLoc = SVX_SHADOW_NONE );
      55             : 
      56             :     inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow );
      57             : 
      58             :     // "pure virtual Methods" from SfxPoolItem
      59             :     virtual int              operator==( const SfxPoolItem& ) const;
      60             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      61             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      62             : 
      63             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      64             :                                     SfxMapUnit eCoreMetric,
      65             :                                     SfxMapUnit ePresMetric,
      66             :                                     String &rText, const IntlWrapper * = 0 ) const;
      67             : 
      68             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const;
      69             :     virtual SfxPoolItem*     Create(SvStream &, sal_uInt16) const;
      70             :     virtual SvStream&        Store(SvStream &, sal_uInt16 nItemVersion ) const;
      71             :     virtual bool             ScaleMetrics( long nMult, long nDiv );
      72             :     virtual bool             HasMetrics() const;
      73             : 
      74          29 :     const Color& GetColor() const { return aShadowColor;}
      75           2 :     void SetColor( const Color &rNew ) { aShadowColor = rNew; }
      76             : 
      77        1022 :     sal_uInt16 GetWidth() const { return nWidth; }
      78       39904 :     SvxShadowLocation GetLocation() const { return eLocation; }
      79             : 
      80           2 :     void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; }
      81           4 :     void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; }
      82             : 
      83             :     // Calculate width of the shadow on the page.
      84             :     sal_uInt16 CalcShadowSpace( sal_uInt16 nShadow ) const;
      85             : 
      86             :     virtual sal_uInt16      GetValueCount() const;
      87             :     virtual rtl::OUString   GetValueTextByPos( sal_uInt16 nPos ) const;
      88             :     virtual sal_uInt16      GetEnumValue() const;
      89             :     virtual void            SetEnumValue( sal_uInt16 nNewVal );
      90             : };
      91             : 
      92           0 : inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow )
      93             : {
      94           0 :     aShadowColor = rFmtShadow.aShadowColor;
      95           0 :     nWidth = rFmtShadow.GetWidth();
      96           0 :     eLocation = rFmtShadow.GetLocation();
      97           0 :     return *this;
      98             : }
      99             : 
     100             : #endif // #ifndef _SVX_SHADITEM_HXX
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10