LCOV - code coverage report
Current view: top level - svx/inc/svx - algitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2012-08-25 Functions: 4 5 80.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 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_ALGITEM_HXX
      29                 :            : #define _SVX_ALGITEM_HXX
      30                 :            : 
      31                 :            : #include <svx/svxids.hrc>
      32                 :            : #include <svl/poolitem.hxx>
      33                 :            : #include <svl/eitem.hxx>
      34                 :            : #include <editeng/svxenum.hxx>
      35                 :            : #include "svx/svxdllapi.h"
      36                 :            : 
      37                 :            : class SvStream;
      38                 :            : 
      39                 :            : //------------------------------------------------------------------------
      40                 :            : 
      41         [ -  + ]:        512 : class SVX_DLLPUBLIC SvxOrientationItem: public SfxEnumItem
      42                 :            : {
      43                 :            : public:
      44                 :            :     TYPEINFO();
      45                 :            : 
      46                 :            :     SvxOrientationItem(
      47                 :            :         const SvxCellOrientation eOrientation /*= SVX_ORIENTATION_STANDARD*/,
      48                 :            :         const sal_uInt16 nId );
      49                 :            : 
      50                 :            :     SvxOrientationItem(
      51                 :            :         sal_Int32 nRotation, sal_Bool bStacked,
      52                 :            :         const sal_uInt16 nId );
      53                 :            : 
      54                 :            :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      55                 :            :                                     SfxMapUnit eCoreMetric,
      56                 :            :                                     SfxMapUnit ePresMetric,
      57                 :            :                                     String &rText, const IntlWrapper * = 0 ) const;
      58                 :            : 
      59                 :            :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      60                 :            :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      61                 :            : 
      62                 :            :     virtual sal_uInt16          GetValueCount() const;
      63                 :            :     virtual String          GetValueText( sal_uInt16 nVal ) const;
      64                 :            :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      65                 :            :     virtual SfxPoolItem*    Create( SvStream& rStream, sal_uInt16 nVer ) const;
      66                 :            : 
      67                 :            :     inline  SvxOrientationItem& operator=(const SvxOrientationItem& rOrientation)
      68                 :            :             {
      69                 :            :                 SetValue( rOrientation.GetValue() );
      70                 :            :                 return *this;
      71                 :            :             }
      72                 :            : 
      73                 :            :     /** Returns sal_True, if the item represents STACKED state. */
      74                 :            :     sal_Bool                    IsStacked() const;
      75                 :            :     /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */
      76                 :            :     sal_Int32                   GetRotation( sal_Int32 nStdAngle = 0 ) const;
      77                 :            :     /** Fills this item according to passed item values. */
      78                 :            :     void                    SetFromRotation( sal_Int32 nRotation, sal_Bool bStacked );
      79                 :            : };
      80                 :            : 
      81                 :            : //------------------------------------------------------------------------
      82                 :            : 
      83         [ -  + ]:       3738 : class SVX_DLLPUBLIC SvxMarginItem: public SfxPoolItem
      84                 :            : {
      85                 :            :     sal_Int16       nLeftMargin;
      86                 :            :     sal_Int16       nTopMargin;
      87                 :            :     sal_Int16       nRightMargin;
      88                 :            :     sal_Int16       nBottomMargin;
      89                 :            : public:
      90                 :            :     TYPEINFO();
      91                 :            :     SvxMarginItem( const sal_uInt16 nId  );
      92                 :            :     SvxMarginItem( sal_Int16 nLeft, sal_Int16 nTop /*= 0*/,
      93                 :            :                    sal_Int16 nRight /*= 0*/, sal_Int16 nBottom /*= 0*/,
      94                 :            :                    const sal_uInt16 nId  );
      95                 :            :     SvxMarginItem( const SvxMarginItem& );
      96                 :            : 
      97                 :            :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      98                 :            :                                     SfxMapUnit eCoreMetric,
      99                 :            :                                     SfxMapUnit ePresMetric,
     100                 :            :                                     String &rText, const IntlWrapper * = 0 ) const;
     101                 :            : 
     102                 :            :     virtual int              operator==( const SfxPoolItem& ) const;
     103                 :            :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const;
     104                 :            :     virtual SfxPoolItem*     Create( SvStream& rStream, sal_uInt16 nVer ) const;
     105                 :            :     virtual SvStream&        Store( SvStream&, sal_uInt16 nItemVersion ) const;
     106                 :            : 
     107                 :            :     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
     108                 :            :     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
     109                 :            : 
     110                 :            :             sal_Int16           GetLeftMargin() const {return nLeftMargin; }
     111                 :            :             sal_Bool            SetLeftMargin(sal_Int16 nLeft);
     112                 :            :             sal_Int16           GetTopMargin() const {return nTopMargin; }
     113                 :            :             sal_Bool            SetTopMargin(sal_Int16 nTop);
     114                 :            :             sal_Int16           GetRightMargin() const {return nRightMargin; }
     115                 :            :             sal_Bool            SetRightMargin(sal_Int16 nRight);
     116                 :            :             sal_Int16           GetBottomMargin() const {return nBottomMargin; }
     117                 :            :             sal_Bool            SetBottomMargin(sal_Int16 nBottom);
     118                 :            : 
     119                 :            :     inline  SvxMarginItem& operator=(const SvxMarginItem& rMargin)
     120                 :            :             {
     121                 :            :                 nLeftMargin = rMargin.nLeftMargin;
     122                 :            :                 nTopMargin = rMargin.nTopMargin;
     123                 :            :                 nRightMargin = rMargin.nRightMargin;
     124                 :            :                 nBottomMargin = rMargin.nBottomMargin;
     125                 :            :                 return *this;
     126                 :            :             }
     127                 :            : };
     128                 :            : 
     129                 :            : #endif
     130                 :            : 
     131                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10