LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/editeng - charrotateitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 7 42.9 %
Date: 2012-08-25 Functions: 4 8 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVX_CHARROTATEITEM_HXX
      29                 :            : #define _SVX_CHARROTATEITEM_HXX
      30                 :            : 
      31                 :            : #include <svl/intitem.hxx>
      32                 :            : #include <editeng/editengdllapi.h>
      33                 :            : 
      34                 :            : // class SvxCharRotateItem ----------------------------------------------
      35                 :            : 
      36                 :            : /* [Description]
      37                 :            : 
      38                 :            :     This item defines a character rotation value (0,1 degree). Currently
      39                 :            :     character can only be rotated 90,0 and 270,0 degrees.
      40                 :            :     The flag FitToLine defines only a UI-Information -
      41                 :            :     if true it must also create a SvxCharScaleItem.
      42                 :            : 
      43                 :            : */
      44                 :            : 
      45         [ -  + ]:        699 : class EDITENG_DLLPUBLIC SvxCharRotateItem : public SfxUInt16Item
      46                 :            : {
      47                 :            :     sal_Bool bFitToLine;
      48                 :            : public:
      49                 :            :     TYPEINFO();
      50                 :            : 
      51                 :            :     SvxCharRotateItem( sal_uInt16 nValue /*= 0*/,
      52                 :            :                        sal_Bool bFitIntoLine /*= sal_False*/,
      53                 :            :                        const sal_uInt16 nId );
      54                 :            : 
      55                 :            :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      56                 :            :     virtual SfxPoolItem*    Create(SvStream &, sal_uInt16) const;
      57                 :            :     virtual SvStream&       Store(SvStream & rStrm, sal_uInt16 nIVer) const;
      58                 :            :     virtual sal_uInt16          GetVersion( sal_uInt16 nFileVersion ) const;
      59                 :            : 
      60                 :            :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      61                 :            :                                     SfxMapUnit eCoreMetric,
      62                 :            :                                     SfxMapUnit ePresMetric,
      63                 :            :                                     String &rText,
      64                 :            :                                     const IntlWrapper * = 0 ) const;
      65                 :            : 
      66                 :            :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      67                 :            :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      68                 :            : 
      69                 :            :     inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem )
      70                 :            :     {
      71                 :            :         SetValue( rItem.GetValue() );
      72                 :            :         SetFitToLine( rItem.IsFitToLine() );
      73                 :            :         return *this;
      74                 :            :     }
      75                 :            : 
      76                 :            :     virtual int              operator==( const SfxPoolItem& ) const;
      77                 :            : 
      78                 :            :     // our currently only degree values
      79                 :          0 :     void SetTopToBotton()                   { SetValue( 2700 ); }
      80                 :          0 :     void SetBottomToTop()                   { SetValue(  900 ); }
      81                 :          0 :     sal_Bool IsTopToBotton() const          { return 2700 == GetValue(); }
      82                 :          0 :     sal_Bool IsBottomToTop() const          { return  900 == GetValue(); }
      83                 :            : 
      84                 :       3617 :     sal_Bool IsFitToLine() const            { return bFitToLine; }
      85                 :         14 :     void SetFitToLine( sal_Bool b )         { bFitToLine = b; }
      86                 :            : };
      87                 :            : 
      88                 :            : #endif
      89                 :            : 
      90                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10