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

Generated by: LCOV version 1.10