LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/editeng - udlnitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 15 86.7 %
Date: 2012-12-27 Functions: 15 17 88.2 %
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_UDLNITEM_HXX
      20             : #define _SVX_UDLNITEM_HXX
      21             : 
      22             : #include <svl/eitem.hxx>
      23             : #include <vcl/vclenum.hxx>
      24             : #include <tools/color.hxx>
      25             : #include <editeng/editengdllapi.h>
      26             : 
      27             : class SvXMLUnitConverter;
      28             : namespace rtl
      29             : {
      30             :     class OUString;
      31             : }
      32             : 
      33             : // class SvxTextLineItem ------------------------------------------------
      34             : 
      35             : /* Value container for underline and overline font effects */
      36             : 
      37       20283 : class EDITENG_DLLPUBLIC SvxTextLineItem : public SfxEnumItem
      38             : {
      39             :     Color mColor;
      40             : public:
      41             :     TYPEINFO();
      42             : 
      43             :     SvxTextLineItem( const FontUnderline eSt,
      44             :                      const sal_uInt16 nId );
      45             : 
      46             :     // "pure virtual Methods" from SfxPoolItem
      47             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      48             :                             SfxMapUnit eCoreMetric,
      49             :                             SfxMapUnit ePresMetric,
      50             :                             String &rText, const IntlWrapper * = 0 ) const;
      51             : 
      52             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      53             :     virtual SfxPoolItem*    Create(SvStream &, sal_uInt16) const;
      54             :     virtual SvStream&       Store(SvStream &, sal_uInt16 nItemVersion) const;
      55             :     virtual rtl::OUString   GetValueTextByPos( sal_uInt16 nPos ) const;
      56             :     virtual sal_uInt16      GetValueCount() const;
      57             : 
      58             :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      59             :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      60             : 
      61             :     // MS VC4.0 messes things up
      62        2889 :     void                    SetValue( sal_uInt16 nNewVal )
      63        2889 :                                 {SfxEnumItem::SetValue(nNewVal); }
      64             :     virtual int             HasBoolValue() const;
      65             :     virtual sal_Bool        GetBoolValue() const;
      66             :     virtual void            SetBoolValue( sal_Bool bVal );
      67             : 
      68             :     virtual int             operator==( const SfxPoolItem& ) const;
      69             : 
      70         858 :     inline SvxTextLineItem& operator=(const SvxTextLineItem& rTextLine)
      71             :         {
      72         858 :             SetValue( rTextLine.GetValue() );
      73         858 :             SetColor( rTextLine.GetColor() );
      74         858 :             return *this;
      75             :         }
      76             : 
      77             :     // enum cast
      78      126906 :     FontUnderline           GetLineStyle() const
      79      126906 :                                 { return (FontUnderline)GetValue(); }
      80           0 :     void                    SetLineStyle( FontUnderline eNew )
      81           0 :                                 { SetValue((sal_uInt16) eNew); }
      82             : 
      83       32619 :     const Color&            GetColor() const                { return mColor; }
      84        9893 :     void                    SetColor( const Color& rCol )   { mColor = rCol; }
      85             : };
      86             : 
      87             : // class SvxUnderlineItem ------------------------------------------------
      88             : 
      89             : /* Value container for underline font effects */
      90             : 
      91       16309 : class EDITENG_DLLPUBLIC SvxUnderlineItem : public SvxTextLineItem
      92             : {
      93             : public:
      94             :     TYPEINFO();
      95             : 
      96             :     SvxUnderlineItem( const FontUnderline eSt,
      97             :                       const sal_uInt16 nId );
      98             : 
      99             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
     100             :     virtual SfxPoolItem*    Create(SvStream &, sal_uInt16) const;
     101             :     virtual rtl::OUString   GetValueTextByPos( sal_uInt16 nPos ) const;
     102             : };
     103             : 
     104             : // class SvxOverlineItem ------------------------------------------------
     105             : 
     106             : /* Value container for overline font effects */
     107             : 
     108       13769 : class EDITENG_DLLPUBLIC SvxOverlineItem : public SvxTextLineItem
     109             : {
     110             : public:
     111             :     TYPEINFO();
     112             : 
     113             :     SvxOverlineItem( const FontUnderline eSt,
     114             :                      const sal_uInt16 nId );
     115             : 
     116             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
     117             :     virtual SfxPoolItem*    Create(SvStream &, sal_uInt16) const;
     118             :     virtual rtl::OUString   GetValueTextByPos( sal_uInt16 nPos ) const;
     119             : };
     120             : 
     121             : #endif // #ifndef _SVX_UDLNITEM_HXX
     122             : 
     123             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10